<PackageReference Include="System.Configuration.ConfigurationManager" Version="10.0.0-preview.1.25080.5" />

StringValidatorAttribute

Declaratively instructs .NET to perform string validation on a configuration property. This class cannot be inherited.
using System.Configuration.Internal; using System.Xml; using System.Configuration.Internal; using System.Xml; namespace System.Configuration { internal sealed class ConfigXmlWhitespace : XmlWhitespace, IConfigErrorInfo { private string _filename = filename; private int _line = line; int IConfigErrorInfo.LineNumber { get { return _line; } } string IConfigErrorInfo.Filename { get { return _filename; } } public ConfigXmlWhitespace(string filename, int line, string comment, XmlDocument doc) : base(comment, doc) { } public override XmlNode CloneNode(bool deep) { XmlNode xmlNode = base.CloneNode(deep); XmlNode xmlNode; ConfigXmlWhitespace configXmlWhitespace = xmlNode as ConfigXmlWhitespace; ConfigXmlWhitespace configXmlWhitespace; if (configXmlWhitespace != null) { configXmlWhitespace._line = _line; configXmlWhitespace._filename = _filename; } return xmlNode; } } }