예제 #1
0
 public static XamlNode GetNamespaceDeclaration(XamlDomNamespace nsNode)
 {
     _xamlNode.Clear();
     _xamlNode.Namespace    = nsNode.NamespaceDeclaration;
     _xamlNode.NodeType     = XamlNodeType.NamespaceDeclaration;
     _xamlNode.LineNumber   = nsNode.StartLineNumber;
     _xamlNode.LinePosition = nsNode.StartLinePosition;
     return(_xamlNode);
 }
예제 #2
0
        public override void WriteNamespace(NamespaceDeclaration namespaceDeclaration)
        {
            if (_namespaces == null)
            {
                _namespaces = new List <XamlDomNamespace>();
            }

            var nsNode = new XamlDomNamespace(namespaceDeclaration);

            nsNode.StartLineNumber   = _lineNumber;
            nsNode.StartLinePosition = _linePosition;
            nsNode.EndLineNumber     = _lineNumber;
            nsNode.EndLinePosition   = _linePosition;

            _namespaces.Add(nsNode);
        }