TryGetNamespaceUriAsDictionaryString() public method

public TryGetNamespaceUriAsDictionaryString ( System &namespaceUri ) : bool
namespaceUri System
return bool
コード例 #1
0
        private void WriteElementNode(XmlDictionaryReader reader, bool defattr)
        {
            XmlDictionaryString str;
            XmlDictionaryString str2;

            if (reader.TryGetLocalNameAsDictionaryString(out str) && reader.TryGetNamespaceUriAsDictionaryString(out str2))
            {
                this.WriteStartElement(reader.Prefix, str, str2);
            }
            else
            {
                this.WriteStartElement(reader.Prefix, reader.LocalName, reader.NamespaceURI);
            }
            if ((defattr || (!reader.IsDefault && ((reader.SchemaInfo == null) || !reader.SchemaInfo.IsDefault))) && reader.MoveToFirstAttribute())
            {
                do
                {
                    if (reader.TryGetLocalNameAsDictionaryString(out str) && reader.TryGetNamespaceUriAsDictionaryString(out str2))
                    {
                        this.WriteStartAttribute(reader.Prefix, str, str2);
                    }
                    else
                    {
                        this.WriteStartAttribute(reader.Prefix, reader.LocalName, reader.NamespaceURI);
                    }
                    while (reader.ReadAttributeValue())
                    {
                        if (reader.NodeType == XmlNodeType.EntityReference)
                        {
                            this.WriteEntityRef(reader.Name);
                        }
                        else
                        {
                            this.WriteTextNode(reader, true);
                        }
                    }
                    this.WriteEndAttribute();
                }while (reader.MoveToNextAttribute());
                reader.MoveToElement();
            }
            if (reader.IsEmptyElement)
            {
                this.WriteEndElement();
            }
        }
コード例 #2
0
        private void WriteArrayNode(XmlDictionaryReader reader, Type type)
        {
            XmlDictionaryString?localName;
            XmlDictionaryString?namespaceUri;

            if (reader.TryGetLocalNameAsDictionaryString(out localName) && reader.TryGetNamespaceUriAsDictionaryString(out namespaceUri))
            {
                WriteArrayNode(reader, reader.Prefix, localName, namespaceUri, type);
            }
            else
            {
                WriteArrayNode(reader, reader.Prefix, reader.LocalName, reader.NamespaceURI, type);
            }
        }
コード例 #3
0
        private void WriteArrayNode(XmlDictionaryReader reader, Type type)
        {
            XmlDictionaryString str;
            XmlDictionaryString str2;

            if (reader.TryGetLocalNameAsDictionaryString(out str) && reader.TryGetNamespaceUriAsDictionaryString(out str2))
            {
                this.WriteArrayNode(reader, reader.Prefix, str, str2, type);
            }
            else
            {
                this.WriteArrayNode(reader, reader.Prefix, reader.LocalName, reader.NamespaceURI, type);
            }
        }
コード例 #4
0
        private void WriteElementNode(XmlDictionaryReader reader, bool defattr)
        {
            XmlDictionaryString?localName;
            XmlDictionaryString?namespaceUri;

            if (reader.TryGetLocalNameAsDictionaryString(out localName) && reader.TryGetNamespaceUriAsDictionaryString(out namespaceUri))
            {
                WriteStartElement(reader.Prefix, localName, namespaceUri);
            }
            else
            {
                WriteStartElement(reader.Prefix, reader.LocalName, reader.NamespaceURI);
            }
            if (defattr || !reader.IsDefault)
            {
                if (reader.MoveToFirstAttribute())
                {
                    do
                    {
                        if (reader.TryGetLocalNameAsDictionaryString(out localName) && reader.TryGetNamespaceUriAsDictionaryString(out namespaceUri))
                        {
                            WriteStartAttribute(reader.Prefix, localName, namespaceUri);
                        }
                        else
                        {
                            WriteStartAttribute(reader.Prefix, reader.LocalName, reader.NamespaceURI);
                        }
                        while (reader.ReadAttributeValue())
                        {
                            if (reader.NodeType == XmlNodeType.EntityReference)
                            {
                                WriteEntityRef(reader.Name);
                            }
                            else
                            {
                                WriteTextNode(reader, true);
                            }
                        }
                        WriteEndAttribute();
                    }while (reader.MoveToNextAttribute());
                    reader.MoveToElement();
                }
            }
            if (reader.IsEmptyElement)
            {
                WriteEndElement();
            }
        }
 private void WriteElementNode(XmlDictionaryReader reader, bool defattr)
 {
     XmlDictionaryString str;
     XmlDictionaryString str2;
     if (reader.TryGetLocalNameAsDictionaryString(out str) && reader.TryGetNamespaceUriAsDictionaryString(out str2))
     {
         this.WriteStartElement(reader.Prefix, str, str2);
     }
     else
     {
         this.WriteStartElement(reader.Prefix, reader.LocalName, reader.NamespaceURI);
     }
     if ((defattr || (!reader.IsDefault && ((reader.SchemaInfo == null) || !reader.SchemaInfo.IsDefault))) && reader.MoveToFirstAttribute())
     {
         do
         {
             if (reader.TryGetLocalNameAsDictionaryString(out str) && reader.TryGetNamespaceUriAsDictionaryString(out str2))
             {
                 this.WriteStartAttribute(reader.Prefix, str, str2);
             }
             else
             {
                 this.WriteStartAttribute(reader.Prefix, reader.LocalName, reader.NamespaceURI);
             }
             while (reader.ReadAttributeValue())
             {
                 if (reader.NodeType == XmlNodeType.EntityReference)
                 {
                     this.WriteEntityRef(reader.Name);
                 }
                 else
                 {
                     this.WriteTextNode(reader, true);
                 }
             }
             this.WriteEndAttribute();
         }
         while (reader.MoveToNextAttribute());
         reader.MoveToElement();
     }
     if (reader.IsEmptyElement)
     {
         this.WriteEndElement();
     }
 }
 private void WriteArrayNode(XmlDictionaryReader reader, Type type)
 {
     XmlDictionaryString str;
     XmlDictionaryString str2;
     if (reader.TryGetLocalNameAsDictionaryString(out str) && reader.TryGetNamespaceUriAsDictionaryString(out str2))
     {
         this.WriteArrayNode(reader, reader.Prefix, str, str2, type);
     }
     else
     {
         this.WriteArrayNode(reader, reader.Prefix, reader.LocalName, reader.NamespaceURI, type);
     }
 }
コード例 #7
0
 void WriteArrayNode(XmlDictionaryReader reader, Type type)
 {
     XmlDictionaryString localName;
     XmlDictionaryString namespaceUri;
     if (reader.TryGetLocalNameAsDictionaryString(out localName) && reader.TryGetNamespaceUriAsDictionaryString(out namespaceUri))
         WriteArrayNode(reader, reader.Prefix, localName, namespaceUri, type);
     else
         WriteArrayNode(reader, reader.Prefix, reader.LocalName, reader.NamespaceURI, type);
 }
コード例 #8
0
 void WriteElementNode(XmlDictionaryReader reader, bool defattr)
 {
     XmlDictionaryString localName;
     XmlDictionaryString namespaceUri;
     if (reader.TryGetLocalNameAsDictionaryString(out localName) && reader.TryGetNamespaceUriAsDictionaryString(out namespaceUri))
     {
         WriteStartElement(reader.Prefix, localName, namespaceUri);
     }
     else
     {
         WriteStartElement(reader.Prefix, reader.LocalName, reader.NamespaceURI);
     }
     if (defattr || (!reader.IsDefault && (reader.SchemaInfo == null || !reader.SchemaInfo.IsDefault)))
     {
         if (reader.MoveToFirstAttribute())
         {
             do
             {
                 if (reader.TryGetLocalNameAsDictionaryString(out localName) && reader.TryGetNamespaceUriAsDictionaryString(out namespaceUri))
                 {
                     WriteStartAttribute(reader.Prefix, localName, namespaceUri);
                 }
                 else
                 {
                     WriteStartAttribute(reader.Prefix, reader.LocalName, reader.NamespaceURI);
                 }
                 while (reader.ReadAttributeValue())
                 {
                     if (reader.NodeType == XmlNodeType.EntityReference)
                     {
                         WriteEntityRef(reader.Name);
                     }
                     else
                     {
                         WriteTextNode(reader, true);
                     }
                 }
                 WriteEndAttribute();
             }
             while (reader.MoveToNextAttribute());
             reader.MoveToElement();
         }
     }
     if (reader.IsEmptyElement)
     {
         WriteEndElement();
     }
 }