diff options
Diffstat (limited to 'mcs/class/Mono.Data/ProviderSectionHandler.cs')
-rw-r--r-- | mcs/class/Mono.Data/ProviderSectionHandler.cs | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/mcs/class/Mono.Data/ProviderSectionHandler.cs b/mcs/class/Mono.Data/ProviderSectionHandler.cs index ae552daa554..3f916a96e34 100644 --- a/mcs/class/Mono.Data/ProviderSectionHandler.cs +++ b/mcs/class/Mono.Data/ProviderSectionHandler.cs @@ -37,26 +37,21 @@ namespace Mono.Data { public class ProviderSectionHandler : IConfigurationSectionHandler { - public virtual object Create (object parent, object configContext, XmlNode section) + public virtual object Create(object parent,object configContext,XmlNode section) { - if (section == null) - throw new System.ArgumentNullException ("section"); - - ProviderCollection providers = new ProviderCollection (); + ProviderCollection providers=new ProviderCollection(); XmlNodeList ProviderList = section.SelectNodes ("./provider"); foreach (XmlNode ProviderNode in ProviderList) { - Provider provider = new Provider( - GetStringValue (ProviderNode, "name", true), - GetStringValue (ProviderNode, "connection", true), - GetStringValue (ProviderNode, "adapter", true), - GetStringValue (ProviderNode, "command", true), - GetStringValue (ProviderNode, "assembly", true), - GetStringValue (ProviderNode, "description", false), - GetStringValue (ProviderNode, "parameterprefix", false), - GetStringValue (ProviderNode, "commandbuilder", false)); - providers.Add (provider); + Provider provider=new Provider( + GetStringValue(ProviderNode,"name",true), + GetStringValue(ProviderNode,"connection",true), + GetStringValue(ProviderNode,"adapter",true), + GetStringValue(ProviderNode,"command",true), + GetStringValue(ProviderNode,"assembly",true), + GetStringValue(ProviderNode,"description",false)); + providers.Add(provider); } return providers; } |