Exemplo n.º 1
0
 /// <summary>
 /// Creates an instance initializing it with the specified parameters.
 /// </summary>
 /// <param name="provider">Application configuration provider</param>
 /// <param name="constructorParams">Constructor parameters</param>
 /// <param name="properties">Configuration instance properties</param>
 /// <param name="instancePrefix">Application instance prefix</param>
 /// <param name="instanceName">Application instance name</param>
 public AppConfigurationSettings(Type provider,
                                 ConstructorParameterSettingsCollection constructorParams = null,
                                 PropertySettingsCollection properties = null,
                                 string instancePrefix = null,
                                 string instanceName   = null)
 {
     InstancePrefix        = instancePrefix;
     InstanceName          = instanceName;
     Provider              = provider;
     ConstructorParameters = constructorParams ?? new ConstructorParameterSettingsCollection();
     Properties            = properties ?? new PropertySettingsCollection();
 }
Exemplo n.º 2
0
 /// <summary>
 /// Creates a new instance of this class and initializes it from the specified XML element.
 /// </summary>
 /// <param name="element">XML element to initialize this instance from.</param>
 public AppConfigurationSettings(XElement element)
 {
     ConstructorParameters = new ConstructorParameterSettingsCollection();
     Properties            = new PropertySettingsCollection();
     ReadFromXml(element);
 }