Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
 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);
 }