System.Xml.XmlDictionaryReader.TryGetNamespaceUriAsDictionaryString C# (CSharp) Méthode

TryGetNamespaceUriAsDictionaryString() public méthode

public TryGetNamespaceUriAsDictionaryString ( System &namespaceUri ) : bool
namespaceUri System
Résultat bool
        public virtual bool TryGetNamespaceUriAsDictionaryString(out System.Xml.XmlDictionaryString namespaceUri) { throw null; }
        public virtual bool TryGetValueAsDictionaryString(out System.Xml.XmlDictionaryString value) { throw null; }

Same methods

XmlDictionaryReader::TryGetNamespaceUriAsDictionaryString ( XmlDictionaryString &namespaceUri ) : bool

Usage Example

Exemple #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();
            }
        }
All Usage Examples Of System.Xml.XmlDictionaryReader::TryGetNamespaceUriAsDictionaryString