internal XmlElementBuilder(XElement parent, IXmlElementBuilder parentElementBuilder, XName elementName) { _value = null; _parent = parent; _parentElementBuilder = parentElementBuilder; _element = new XElement(elementName); }
public XmlAttributeBuilder(IXmlElementBuilder xmlElementBuilder, XElement element, string attributeName) { Guard.StringNotNullOrEmpty(() => attributeName); Guard.ObjectNotNull(() => xmlElementBuilder); Guard.ObjectNotNull(() => element); _xmlElementBuilder = xmlElementBuilder; _element = element; _attributeName = attributeName; }
public XmlBuilderStream(IXmlElementBuilder node, Encoding encoding) { Encoding = encoding ?? throw new ArgumentNullException(nameof(encoding)); _disposable = node as IDisposable; var enumerable = node == null ? Enumerable.Empty <IXmlElementBuilder>() : Enumerable.Repeat(node, 1); _enumerators = new(); _enumerators.AddLast(enumerable.GetConservativeEnumerator()); }
public XmlBuilderReader(IXmlElementBuilder node) { // ReSharper disable once SuspiciousTypeConversion.Global _disposable = node as IDisposable; var enumerable = node == null ? Enumerable.Empty <IXmlElementBuilder>() : Enumerable.Repeat(node, 1); _enumerators = new LinkedList <ConservativeEnumerator>(); _enumerators.AddLast(enumerable.GetConservativeEnumerator()); _nodeType = XmlNodeType.None; _table = new NameTable(); _namespaceManager = new XmlNamespaceManager(_table); }
public XmlBuilderStream(IXmlElementBuilder node, Encoding encoding) { if (encoding == null) { throw new ArgumentNullException("encoding"); } // ReSharper disable once SuspiciousTypeConversion.Global _disposable = node as IDisposable; _encoding = encoding; var enumerable = node == null ? Enumerable.Empty <IXmlElementBuilder>() : Enumerable.Repeat(node, 1); _enumerators = new LinkedList <ConservativeEnumerator>(); _enumerators.AddLast(enumerable.GetConservativeEnumerator()); }
public XmlBuilderStream(IXmlElementBuilder node) : this(node, Encoding.UTF8) { }