<PackageReference Include="System.Configuration.ConfigurationManager" Version="9.0.1" />

ConfigurationElement

public abstract class ConfigurationElement
Represents a configuration element within a configuration file.

Gets a reference to the top-level Configuration instance that represents the configuration hierarchy that the current ConfigurationElement instance belongs to.

Gets an ElementInformation object that contains the non-customizable information and functionality of the ConfigurationElement object.

Gets the ContextInformation object for the ConfigurationElement object.

protected bool HasContext { get; }

Gets a value that indicates whether the CurrentConfiguration property is null.

Gets the collection of locked attributes.

Gets the collection of locked elements.

Gets the collection of locked attributes.

Gets the collection of locked elements.

public bool LockItem { get; set; }

Gets or sets a value indicating whether the element is locked.

Initializes a new instance of the ConfigurationElement class.

protected virtual string GetTransformedAssemblyString(string assemblyName)

Returns the transformed version of the specified assembly name.

protected virtual string GetTransformedTypeString(string typeName)

Returns the transformed version of the specified type name.

public virtual bool IsReadOnly()

Gets a value indicating whether the ConfigurationElement object is read-only.

protected virtual void ListErrors(IList errorList)

Adds the invalid-property errors in this ConfigurationElement object, and in all subelements, to the passed list.

protected virtual bool OnDeserializeUnrecognizedAttribute(string name, string value)

Gets a value indicating whether an unknown attribute is encountered during deserialization.

protected virtual bool OnDeserializeUnrecognizedElement(string elementName, XmlReader reader)

Gets a value indicating whether an unknown element is encountered during deserialization.

protected virtual object OnRequiredPropertyNotFound(string name)

Throws an exception when a required property is not found.

protected virtual void PostDeserialize()

Called after deserialization.

protected virtual void PreSerialize(XmlWriter writer)

Called before serialization.

protected void SetPropertyValue(ConfigurationProperty prop, object value, bool ignoreLocks)

Sets a property to the specified value.