Exemplo n.º 1
0
        public string FindNamespaceByPrefixInParseStack(string prefix)
        {
            string str;

            if ((this._prescopeNamespaces != null) && this._prescopeNamespaces.TryGetValue(prefix, out str))
            {
                return(str);
            }
            for (XamlParserFrame frame = this._stack.CurrentFrame; frame.Depth > 0; frame = (XamlParserFrame)frame.Previous)
            {
                if (frame.TryGetNamespaceByPrefix(prefix, out str))
                {
                    return(str);
                }
            }
            return(null);
        }
        public string FindNamespaceByPrefixInParseStack(String prefix)
        {
            string xamlNs;

            if (null != _prescopeNamespaces)
            {
                if (_prescopeNamespaces.TryGetValue(prefix, out xamlNs))
                {
                    return(xamlNs);
                }
            }

            XamlParserFrame frame = _stack.CurrentFrame;

            while (frame.Depth > 0)
            {
                if (frame.TryGetNamespaceByPrefix(prefix, out xamlNs))
                {
                    return(xamlNs);
                }
                frame = (XamlParserFrame)frame.Previous;
            }
            return(null);
        }