Quantcast
Channel: .NET Framework Class Libraries forum
Viewing all articles
Browse latest Browse all 8156

ApplicationSettingsBase and the initialization of the SettingsProvider

$
0
0

Hej!

The documentation of the "Application Settings Architecture" (http://msdn.microsoft.com/en-us/library/8eyb2ct1.aspx) states the following:

"...For example, suppose that you want to develop and use SqlSettingsProvider , a provider that will store all settings data in a Microsoft SQL Server database. YourSettingsProvider-derived class would receive this information in its Initialize method as a parameter of type System.Collections.Specialized. NameValueCollection."

I have so far found not possibility to influence this "NameValueCollection". The ApplicationSettingsBase seem to call the Initialize method of the SettingsProvider always with the arguments "null, null" (C#). Is there any way to change this behaviour? I would love to be able to transfer configuration information to the (custom) SettingsProvider. (The only chance I currently see is to reimplement the ApplicationSettingsBase class, but I would prefer not to do that.)

Thanks a lot!

Stephan

 


Viewing all articles
Browse latest Browse all 8156

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>