<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://msmvps.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Paulo Morgado - All Comments</title><link>http://msmvps.com/blogs/paulomorgado/default.aspx</link><description>.NET Development &amp;amp; Architecture</description><dc:language>en</dc:language><generator>CommunityServer 2008 SP1 (Build: 30619.63)</generator><item><title>Making PathInfo And ASP.NET Themes Work Together</title><link>http://msmvps.com/blogs/paulomorgado/archive/2008/07/23/pathinfo-and-asp-net-themes-why-can-t-they-work-together.aspx#1641945</link><pubDate>Thu, 24 Jul 2008 00:13:13 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1641945</guid><dc:creator>Paulo Morgado</dc:creator><description>&lt;p&gt;On my last post I wrote about the problem that arises when we try the use path infos and ASP.NET Themes&lt;/p&gt;
&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1641945" width="1" height="1"&gt;</description></item><item><title>Making PathInfo And ASP.NET Themes Work Together</title><link>http://msmvps.com/blogs/paulomorgado/archive/2008/07/23/pathinfo-and-asp-net-themes-why-can-t-they-work-together.aspx#1641943</link><pubDate>Thu, 24 Jul 2008 00:13:06 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1641943</guid><dc:creator>Paulo Morgado</dc:creator><description>&lt;p&gt;On my last post I wrote about the problem that arises when we try the use path infos and ASP.NET Themes&lt;/p&gt;
&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1641943" width="1" height="1"&gt;</description></item><item><title>C#/VB Conventions at Matt&amp;#8217;s Blog</title><link>http://msmvps.com/blogs/paulomorgado/archive/2007/05/20/naming-conventions-for-c.aspx#1641791</link><pubDate>Tue, 22 Jul 2008 21:19:24 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1641791</guid><dc:creator>C#/VB Conventions at Matt’s Blog</dc:creator><description>&lt;p&gt;Pingback from &amp;nbsp;C#/VB Conventions at Matt&amp;#8217;s Blog&lt;/p&gt;
&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1641791" width="1" height="1"&gt;</description></item><item><title>ControlActivationService and SimpleWorkItemActivationService</title><link>http://msmvps.com/blogs/paulomorgado/archive/2006/11/04/An-Hierarchical-CAB-WorkItem-Activation-Service.aspx#1641789</link><pubDate>Tue, 22 Jul 2008 21:16:42 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1641789</guid><dc:creator>Notes</dc:creator><description>&lt;p&gt;ControlActivationService and SimpleWorkItemActivationService&lt;/p&gt;
&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1641789" width="1" height="1"&gt;</description></item><item><title>re: Make The HttpValueCollection Class Public And Move It To System.DLL</title><link>http://msmvps.com/blogs/paulomorgado/archive/2008/07/15/make-the-httpvaluecollection-class-public-and-move-it-to-system-dll.aspx#1640959</link><pubDate>Tue, 15 Jul 2008 20:06:49 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1640959</guid><dc:creator>Paulo Morgado</dc:creator><description>&lt;p&gt;Just look into it with Reflector and you’ll see.&lt;/p&gt;
&lt;p&gt;I want to be able to build a new read-only instance.&lt;/p&gt;
&lt;p&gt;I want to be able to build a new empty instance without having to parse an empty string.&lt;/p&gt;
&lt;p&gt;I want to be able to parse a string using a specified encoding.&lt;/p&gt;
&lt;p&gt;I want to convert the collection to a string choosing to URL-encode or not.&lt;/p&gt;
&lt;p&gt;I want to convert the collection to a string specifying the keys to exclude.&lt;/p&gt;
&lt;p&gt;The HttpUtility.ParseQueryString method was introduced in version 2.0 but the HttpValueCollection class was in the framework since version 1.1 (and probably 1.0). If it was found useful to parse a query string form outside of the System.Web assembly, why not expose the full set of features.&lt;/p&gt;
&lt;p&gt;I’ve implemented classes like this several projects whenever I need to specify a list or a name/value collection as a string. Why would I invent another encoding or this if one has already been invented?&lt;/p&gt;
&lt;p&gt;With the CLR in SQL Server I can pass a list or dictionary to a stored procedure and have it expanded to a table inside the database.&lt;/p&gt;
&lt;p&gt;You need the ReflectionPermition to get non public constructors. You also need System.Web.dll and you don’t have it in the upcoming client profile or the compact framework, for example.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1640959" width="1" height="1"&gt;</description></item><item><title>re: Make The HttpValueCollection Class Public And Move It To System.DLL</title><link>http://msmvps.com/blogs/paulomorgado/archive/2008/07/15/make-the-httpvaluecollection-class-public-and-move-it-to-system-dll.aspx#1640895</link><pubDate>Tue, 15 Jul 2008 14:06:23 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1640895</guid><dc:creator>PeterRitchie</dc:creator><description>&lt;p&gt;What sort of things do you want to do with HttpValueCollection? &amp;nbsp;It&amp;#39;s essentially just a NameValueCollection--or is there something specific in the HttpValueCollection interface that you&amp;#39;re looking to get access to?&lt;/p&gt;
&lt;p&gt;Is it more a problem with referencing the System.Web assembly?&lt;/p&gt;
&lt;p&gt;It&amp;#39;s not really a solution; but you can always access an internal class via reflection:&lt;/p&gt;
&lt;p&gt;Type t = Type.GetType(&amp;quot;System.Web.HttpValueCollection, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&amp;quot;);&lt;/p&gt;
&lt;p&gt;ConstructorInfo constructorInfo = t.GetConstructor(BindingFlags.NonPublic | BindingFlags.Instance, null, new Type[]{typeof(String), typeof(Boolean), typeof(Boolean), typeof(Encoding)}, null);&lt;/p&gt;
&lt;p&gt;NameValueCollection o = constructorInfo.Invoke(new object[] { &amp;quot;a=1&amp;amp;b=2&amp;quot;, false, true, Encoding.UTF8}) as NameValueCollection;&lt;/p&gt;
&lt;p&gt;...which could be in a wrapper class like HttpValueCollectionWrapper...&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1640895" width="1" height="1"&gt;</description></item><item><title>re: Unit Testing With CAB</title><link>http://msmvps.com/blogs/paulomorgado/archive/2006/11/03/Unit-Testing-With-CAB.aspx#1640877</link><pubDate>Tue, 15 Jul 2008 11:00:15 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1640877</guid><dc:creator>Paulo Morgado</dc:creator><description>&lt;p&gt;Have you looked here (&lt;a rel="nofollow" target="_new" href="http://www.codeplex.com/smartclient"&gt;www.codeplex.com/smartclient&lt;/a&gt;)?&lt;/p&gt;
&lt;p&gt;I think all code has unit tests.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1640877" width="1" height="1"&gt;</description></item><item><title>re: Unit Testing With CAB</title><link>http://msmvps.com/blogs/paulomorgado/archive/2006/11/03/Unit-Testing-With-CAB.aspx#1640873</link><pubDate>Tue, 15 Jul 2008 09:24:26 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1640873</guid><dc:creator>anotheryang</dc:creator><description>&lt;p&gt;Hi,these days I also try to find a sample to do unit testing with CAB, and can you send the sample you refered to me, thanks a lot!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1640873" width="1" height="1"&gt;</description></item><item><title>re: WCSF 2.0 And IIS7 Integrated Pipeline Mode</title><link>http://msmvps.com/blogs/paulomorgado/archive/2008/03/11/wcsf-2-0-and-iis7-integrated-pipeline-mode.aspx#1639699</link><pubDate>Mon, 07 Jul 2008 23:30:55 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1639699</guid><dc:creator>Paulo Morgado</dc:creator><description>&lt;p&gt;Thanks Josh.&lt;/p&gt;
&lt;p&gt;Can you provide a link to that information that BeginRequest is not thread safe in integrated pipeline mode? I can&amp;#39;t seem to find it.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1639699" width="1" height="1"&gt;</description></item><item><title>re: WCSF 2.0 And IIS7 Integrated Pipeline Mode</title><link>http://msmvps.com/blogs/paulomorgado/archive/2008/03/11/wcsf-2-0-and-iis7-integrated-pipeline-mode.aspx#1639695</link><pubDate>Mon, 07 Jul 2008 23:10:07 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1639695</guid><dc:creator>Josh</dc:creator><description>&lt;p&gt;And if that didn&amp;#39;t work (because bool is not a reference type :( ) try this...&lt;/p&gt;
&lt;pre&gt;//0=false 1=true

   private int initialized = 0;

   protected override void Application_Start(object sender, EventArgs e)
   {
       // Override the application start so that we can call it at first Application_BeginRequest

       // this is necissary for IIS7 Integrated Pipeline because Request is not available in Application_Start
   }

   protected void Application_BeginRequest(object sender, EventArgs e)
   {
       if (System.Threading.Interlocked.Exchange(ref initialized, 1) == 0)
       {
           base.Application_Start(sender, e);
       }
   }&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1639695" width="1" height="1"&gt;</description></item><item><title>re: WCSF 2.0 And IIS7 Integrated Pipeline Mode</title><link>http://msmvps.com/blogs/paulomorgado/archive/2008/03/11/wcsf-2-0-and-iis7-integrated-pipeline-mode.aspx#1639694</link><pubDate>Mon, 07 Jul 2008 23:05:07 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1639694</guid><dc:creator>Josh</dc:creator><description>&lt;p&gt;On busy sites you may need to worry about multithreading as BeginRequest is not threadsafe.&lt;/p&gt;
&lt;pre&gt;private bool initialized = false;

   protected override void Application_Start(object sender, EventArgs e)
   {
       // Override the application start so that we can call it at first Application_BeginRequest

       // this is necissary for IIS7 Integrated Pipeline because Request is not available in Application_Start
   }

   protected void Application_BeginRequest(object sender, EventArgs e)
   {
       if (System.Threading.Interlocked.CompareExchange(ref initialized, true, false))
       {
           base.Application_Start(sender, e);
       }
   }&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1639694" width="1" height="1"&gt;</description></item><item><title>re: WSDL Merger</title><link>http://msmvps.com/blogs/paulomorgado/archive/2007/02/08/wsdl-merger.aspx#1639288</link><pubDate>Thu, 03 Jul 2008 21:16:15 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1639288</guid><dc:creator>Paulo Morgado</dc:creator><description>&lt;p&gt;That&amp;#39;s exactly what António&amp;#39;s WsdlMerger does.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1639288" width="1" height="1"&gt;</description></item><item><title>re: WSDL Merger</title><link>http://msmvps.com/blogs/paulomorgado/archive/2007/02/08/wsdl-merger.aspx#1639260</link><pubDate>Thu, 03 Jul 2008 16:55:11 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1639260</guid><dc:creator>mohan</dc:creator><description>&lt;p&gt;how can i combine more than one wsdl files into one wsdl file. &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1639260" width="1" height="1"&gt;</description></item><item><title>re: .NET Reflector 5.1.2.0 Released</title><link>http://msmvps.com/blogs/paulomorgado/archive/2008/05/19/net-reflector-5-1-2-0-released.aspx#1639034</link><pubDate>Tue, 01 Jul 2008 20:04:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1639034</guid><dc:creator>Paulo Morgado</dc:creator><description>&lt;p&gt;It&amp;#39;s up for me. At least now it is.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1639034" width="1" height="1"&gt;</description></item><item><title>re: .NET Reflector 5.1.2.0 Released</title><link>http://msmvps.com/blogs/paulomorgado/archive/2008/05/19/net-reflector-5-1-2-0-released.aspx#1638997</link><pubDate>Tue, 01 Jul 2008 13:29:50 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1638997</guid><dc:creator>GP</dc:creator><description>&lt;p&gt;The link is down&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1638997" width="1" height="1"&gt;</description></item><item><title>Porquê Usar Valores Aleatórios Para Testes Unitários</title><link>http://msmvps.com/blogs/paulomorgado/archive/2008/06/24/using-random-values-for-unit-testing.aspx#1638831</link><pubDate>Mon, 30 Jun 2008 00:38:23 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1638831</guid><dc:creator>Paulo Morgado</dc:creator><description>&lt;p&gt;Numa entrada anterior mencionei a minha biblioteca para geração de valores aleatórios para efeitos de&lt;/p&gt;
&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1638831" width="1" height="1"&gt;</description></item><item><title>re: Using Random Values For Unit Testing</title><link>http://msmvps.com/blogs/paulomorgado/archive/2008/06/24/using-random-values-for-unit-testing.aspx#1638827</link><pubDate>Sun, 29 Jun 2008 23:42:22 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1638827</guid><dc:creator>Paulo Morgado</dc:creator><description>&lt;p&gt;Hi Simon. I&amp;#39;m fine, and you?&lt;/p&gt;
&lt;p&gt;I hope this answers your question:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://msmvps.com/blogs/paulomorgado/archive/2008/06/30/why-use-random-values-for-unit-testing.aspx"&gt;msmvps.com/.../why-use-random-values-for-unit-testing.aspx&lt;/a&gt;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1638827" width="1" height="1"&gt;</description></item><item><title>Why Use Random Values For Unit Testing</title><link>http://msmvps.com/blogs/paulomorgado/archive/2008/06/24/using-random-values-for-unit-testing.aspx#1638826</link><pubDate>Sun, 29 Jun 2008 23:40:27 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1638826</guid><dc:creator>Paulo Morgado</dc:creator><description>&lt;p&gt;On a previous post I introduced a library for generating random values for purposes of unit testing.&lt;/p&gt;
&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1638826" width="1" height="1"&gt;</description></item><item><title>Why Use Random Values For Unit Testing</title><link>http://msmvps.com/blogs/paulomorgado/archive/2008/06/24/using-random-values-for-unit-testing.aspx#1638824</link><pubDate>Sun, 29 Jun 2008 23:40:11 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1638824</guid><dc:creator>Paulo Morgado</dc:creator><description>&lt;p&gt;On a previous post I introduced a library for generating random values for purposes of unit testing.&lt;/p&gt;
&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1638824" width="1" height="1"&gt;</description></item><item><title>re: Using Random Values For Unit Testing</title><link>http://msmvps.com/blogs/paulomorgado/archive/2008/06/24/using-random-values-for-unit-testing.aspx#1637469</link><pubDate>Wed, 25 Jun 2008 08:27:05 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1637469</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Paulo,&lt;/p&gt;
&lt;p&gt;Hope you&amp;#39;re well!&lt;/p&gt;
&lt;p&gt;Interesting post - I totally agree that a wider range of test values significantly increases the benefit of unit tests, but I&amp;#39;d generally want every instance of the test I run to be repeatable on *every* run. So I&amp;#39;d be inclined to use the data source functionality in VSTS Unit Tests, for example. In other words, decide my random (or hand crafted) range of values at design time, not test execution time.&lt;/p&gt;
&lt;p&gt;How would you deal with diagnosing a problem in a failed test? Do you find you need to explicitly log more information (e.g. all the arguments to your method) in the event of a failure? Or have I missed something obvious?!&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1637469" width="1" height="1"&gt;</description></item></channel></rss>