Initialize() private method

private Initialize ( BuilderInfo src ) : void
src BuilderInfo
return void
Ejemplo n.º 1
0
 internal BuilderInfo Clone()
 {
     BuilderInfo info = new BuilderInfo();
     info.Initialize(this);
     Debug.Assert(info.NodeType != XmlNodeType.Text || XmlCharType.Instance.IsOnlyWhitespace(info.Value));
     return info;
 }
Ejemplo n.º 2
0
        private void DeclareNamespace(string nspace, string prefix)
        {
            int index = NewNamespace();

            Debug.Assert(_namespaceList[index] != null && _namespaceList[index] is BuilderInfo);

            BuilderInfo ns = (BuilderInfo)_namespaceList[index];

            if (prefix == _atoms.Empty)
            {
                ns.Initialize(_atoms.Empty, _atoms.Xmlns, _atoms.XmlnsNamespace);
            }
            else
            {
                ns.Initialize(_atoms.Xmlns, prefix, _atoms.XmlnsNamespace);
            }
            ns.Depth    = _recordDepth;
            ns.NodeType = XmlNodeType.Attribute;
            ns.Value    = nspace;

            _scopeManager.PushNamespace(prefix, nspace);
        }
Ejemplo n.º 3
0
        private void ResetRecord(int state)
        {
            Debug.Assert(_recordState == NoRecord || _recordState == SomeRecord);

            if ((state & StateMachine.BeginRecord) != 0)
            {
                _attributeCount = 0;
                _namespaceCount = 0;
                _currentInfo    = _mainNode;

                _currentInfo.Initialize(_atoms.Empty, _atoms.Empty, _atoms.Empty);
                _currentInfo.NodeType      = XmlNodeType.None;
                _currentInfo.IsEmptyTag    = false;
                _currentInfo.htmlProps     = null;
                _currentInfo.htmlAttrProps = null;
            }
        }
Ejemplo n.º 4
0
        private void BeginAttribute(string prefix, string name, string nspace, object?htmlAttrProps, bool search)
        {
            int attrib = FindAttribute(name, nspace, ref prefix);

            if (attrib == -1)
            {
                attrib = NewAttribute();
            }

            Debug.Assert(_attributeList[attrib] != null && _attributeList[attrib] is BuilderInfo);

            BuilderInfo attribute = (BuilderInfo)_attributeList[attrib] !;

            attribute.Initialize(prefix, name, nspace);
            attribute.Depth         = _recordDepth;
            attribute.NodeType      = XmlNodeType.Attribute;
            attribute.htmlAttrProps = htmlAttrProps as HtmlAttributeProps;
            attribute.search        = search;
            _currentInfo            = attribute;
        }
Ejemplo n.º 5
0
        private void ResetRecord(int state)
        {
            Debug.Assert(_recordState == NoRecord || _recordState == SomeRecord);

            if ((state & StateMachine.BeginRecord) != 0)
            {
                _attributeCount = 0;
                _namespaceCount = 0;
                _currentInfo = _mainNode;

                _currentInfo.Initialize(_atoms.Empty, _atoms.Empty, _atoms.Empty);
                _currentInfo.NodeType = XmlNodeType.None;
                _currentInfo.IsEmptyTag = false;
                _currentInfo.htmlProps = null;
                _currentInfo.htmlAttrProps = null;
            }
        }