private void Init(XmlWriterSettings settings)
 {
     if (elementPropertySearch == null)
     {
         attributePropertySearch = new TernaryTreeReadOnly(HtmlTernaryTree.htmlAttributes);
         elementPropertySearch = new TernaryTreeReadOnly(HtmlTernaryTree.htmlElements);
     }
     this.elementScope = new ByteStack(10);
     this.uriEscapingBuffer = new byte[5];
     this.currentElementProperties = ElementProperties.DEFAULT;
     this.mediaType = settings.MediaType;
 }
Exemplo n.º 2
0
        private void Init(XmlWriterSettings settings)
        {
            Debug.Assert((int)ElementProperties.URI_PARENT == (int)AttributeProperties.URI);
            Debug.Assert((int)ElementProperties.BOOL_PARENT == (int)AttributeProperties.BOOLEAN);
            Debug.Assert((int)ElementProperties.NAME_PARENT == (int)AttributeProperties.NAME);

            _elementScope             = new ByteStack(StackIncrement);
            _uriEscapingBuffer        = new byte[5];
            _currentElementProperties = ElementProperties.DEFAULT;

            _mediaType = settings.MediaType;
            _doNotEscapeUriAttributes = settings.DoNotEscapeUriAttributes;
        }
//
// Private methods
//

        private void Init(XmlWriterSettings settings)
        {
            Debug.Assert((int)ElementProperties.URI_PARENT == (int)AttributeProperties.URI);
            Debug.Assert((int)ElementProperties.BOOL_PARENT == (int)AttributeProperties.BOOLEAN);
            Debug.Assert((int)ElementProperties.NAME_PARENT == (int)AttributeProperties.NAME);

            if (elementPropertySearch == null)
            {
                //elementPropertySearch should be init last for the mutli thread safe situation.
                attributePropertySearch = new TernaryTreeReadOnly(HtmlTernaryTree.htmlAttributes);
                elementPropertySearch   = new TernaryTreeReadOnly(HtmlTernaryTree.htmlElements);
            }

            elementScope             = new ByteStack(StackIncrement);
            uriEscapingBuffer        = new byte[5];
            currentElementProperties = ElementProperties.DEFAULT;

            mediaType = settings.MediaType;
        }
Exemplo n.º 4
0
        private void Init(XmlWriterSettings settings)
        {
            Debug.Assert((int)ElementProperties.URI_PARENT == (int)AttributeProperties.URI);
            Debug.Assert((int)ElementProperties.BOOL_PARENT == (int)AttributeProperties.BOOLEAN);
            Debug.Assert((int)ElementProperties.NAME_PARENT == (int)AttributeProperties.NAME);

            if (elementPropertySearch == null)
            {
                //elementPropertySearch should be init last for the mutli thread safe situation.
                attributePropertySearch = new TernaryTreeReadOnly(HtmlTernaryTree.htmlAttributes);
                elementPropertySearch = new TernaryTreeReadOnly(HtmlTernaryTree.htmlElements);
            }

            elementScope = new ByteStack(StackIncrement);
            _uriEscapingBuffer = new byte[5];
            currentElementProperties = ElementProperties.DEFAULT;

            _mediaType = settings.MediaType;
            _doNotEscapeUriAttributes = settings.DoNotEscapeUriAttributes;
        }