<PackageReference Include="System.Configuration.ConfigurationManager" Version="7.0.0-preview.7.22375.6" />

SettingsProperty

public class SettingsProperty
namespace System.Configuration { public class SettingsProperty { internal static bool EnableUnsafeBinaryFormatterInPropertyValueSerialization { get; } = AppContext.TryGetSwitch("System.Configuration.ConfigurationManager.EnableUnsafeBinaryFormatterInPropertyValueSerialization", out bool isEnabled) && isEnabled; public virtual string Name { get; set; } public virtual bool IsReadOnly { get; set; } public virtual object DefaultValue { get; set; } public virtual Type PropertyType { get; set; } public virtual SettingsSerializeAs SerializeAs { get; set; } public virtual SettingsProvider Provider { get; set; } public virtual SettingsAttributeDictionary Attributes { get; set; } public bool ThrowOnErrorDeserializing { get; set; } public bool ThrowOnErrorSerializing { get; set; } public SettingsProperty(string name) { Name = name; Attributes = new SettingsAttributeDictionary(); } public SettingsProperty(string name, Type propertyType, SettingsProvider provider, bool isReadOnly, object defaultValue, SettingsSerializeAs serializeAs, SettingsAttributeDictionary attributes, bool throwOnErrorDeserializing, bool throwOnErrorSerializing) { Name = name; PropertyType = propertyType; Provider = provider; IsReadOnly = isReadOnly; DefaultValue = defaultValue; if (serializeAs == SettingsSerializeAs.Binary) { if (!EnableUnsafeBinaryFormatterInPropertyValueSerialization) throw new NotSupportedException("BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information."); SerializeAs = serializeAs; } Attributes = attributes; ThrowOnErrorDeserializing = throwOnErrorDeserializing; ThrowOnErrorSerializing = throwOnErrorSerializing; } public SettingsProperty(SettingsProperty propertyToCopy) { Name = propertyToCopy.Name; IsReadOnly = propertyToCopy.IsReadOnly; DefaultValue = propertyToCopy.DefaultValue; SerializeAs = propertyToCopy.SerializeAs; Provider = propertyToCopy.Provider; PropertyType = propertyToCopy.PropertyType; ThrowOnErrorDeserializing = propertyToCopy.ThrowOnErrorDeserializing; ThrowOnErrorSerializing = propertyToCopy.ThrowOnErrorSerializing; Attributes = new SettingsAttributeDictionary(propertyToCopy.Attributes); } } }