System.Configuration.Configuration.SetSectionXml C# (CSharp) Метод

SetSectionXml() приватный Метод

private SetSectionXml ( System.Configuration.SectionInfo config, string data ) : void
config System.Configuration.SectionInfo
data string
Результат void
		internal void SetSectionXml (SectionInfo config, string data)
		{
			elementData [config] = data;
		}
		

Usage Example

Пример #1
0
 public override void ReadData(Configuration config, XmlReader reader, bool overrideAllowed)
 {
     if (!config.HasFile && !allowLocation)
     {
         throw new ConfigurationErrorsException("The configuration section <" + Name + "> cannot be defined inside a <location> element.", reader);
     }
     if (!config.ConfigHost.IsDefinitionAllowed(config.ConfigPath, allowDefinition, allowExeDefinition))
     {
         object ctx = allowExeDefinition != ConfigurationAllowExeDefinition.MachineToApplication ? (object)allowExeDefinition : (object)allowDefinition;
         throw new ConfigurationErrorsException("The section <" + Name + "> can't be defined in this configuration file (the allowed definition context is '" + ctx + "').", reader);
     }
     if (config.GetSectionXml(this) != null)
     {
         ThrowException("The section <" + Name + "> is defined more than once in the same configuration file.", reader);
     }
     config.SetSectionXml(this, reader.ReadOuterXml());
 }
All Usage Examples Of System.Configuration.Configuration::SetSectionXml