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());
}