[Mono-dev] [PATCH] System.Configuration.Provider.ProviderBase.cs
Atsushi Eno
atsushi at ximian.com
Fri Aug 31 11:15:14 EDT 2007
Hi Gert,
Thanks for the checkin.
Atsushi Eno
Gert Driesen wrote:
>
> Hi John,
>
> This is now "fixed" in SVN (with matching unit tests).
>
> Gert
> *From:* mono-devel-list-bounces at lists.ximian.com
> [mailto:mono-devel-list-bounces at lists.ximian.com] *On Behalf Of *John
> Anderson
> *Sent:* vrijdag 31 augustus 2007 10:19
> *To:* Atsushi Eno
> *Cc:* mono-devel
> *Subject:* Re: [Mono-dev] [PATCH]
> System.Configuration.Provider.ProviderBase.cs
>
> On 8/31/07, *Atsushi Eno* <atsushi at ximian.com
> <mailto:atsushi at ximian.com>> wrote:
>
> Your code does not verify that your change must be correct. It
> just shows the fact that it *affects* on our ASP.NET
> <http://ASP.NET> behavior
> (Or is that a general way for .NET developers to identify the
> source of bugs?). What I expected was rather like below:
>
> using System;
> using System.Collections.Specialized;
> using System.Configuration.Provider;
>
> public class MyProvider : ProviderBase
> {
> public static void Main ()
> {
> NameValueCollection config = new NameValueCollection ();
> config ["name"] = "Name";
> config ["description"] = "DESC";
> config ["foo"] = "FOO";
> Console.WriteLine (config ["description"]);
> MyProvider p = new MyProvider ();
> p.Initialize ("Foo", config);
> Console.WriteLine (config ["name"]);
> Console.WriteLine (config ["description"]);
> Console.WriteLine (config ["foo"]);
> Console.WriteLine ("{0} {1}", p.Name, p.Description);
> }
> }
>
> Yes, you were right, this test shows how funny behavior .net does.
>
>
> Sorry about my test, Yours is much better. But as you can see with your
> test, on MS.NET <http://MS.NET>
> it removes the description config. This is a pretty well known behavior
> of the provider, I've seen
> many code examples of custom providers where they check config after
> running base initialize to check
> if any unknown attributes were defined in the config.
>
> Thanks
More information about the Mono-devel-list
mailing list