public XmlParser(string text, bool isXaml) { this.text = text ?? throw new ArgumentNullException(nameof(text)); xamlAttributeParser = isXaml ? new XamlAttributeParser(this) : null; blockFlags = isXaml ? CodeBracesRangeFlags.XamlBlockBraces : CodeBracesRangeFlags.XmlBlockBraces; references = new List <ReferenceInfo>(); bracesInfo = new List <CodeBracesRange>(); xmlNamespaceReferences = new List <XmlNamespaceReference>(); subStringDict = new Dictionary <SubString, string>(EqualityComparer <SubString> .Default); lineSeparators = new List <int>(); xmlNamespaces = new XmlNamespaces(); xmlNamespaces.Initialize(null); }
public XmlParser(string text, bool isXaml) { if (text == null) { throw new ArgumentNullException(nameof(text)); } this.text = text; this.xamlAttributeParser = isXaml ? new XamlAttributeParser(this) : null; references = new List <ReferenceInfo>(); bracesInfo = new List <CodeBracesRange>(); xmlNamespaceReferences = new List <XmlNamespaceReference>(); subStringDict = new Dictionary <SubString, string>(EqualityComparer <SubString> .Default); xmlNamespaces = new XmlNamespaces(); xmlNamespaces.Initialize(null); }