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

ReadContentAs() public méthode

public ReadContentAs ( Type type, IXmlNamespaceResolver namespaceResolver ) : object
type System.Type
namespaceResolver IXmlNamespaceResolver
Résultat object
        public override object ReadContentAs(Type type, IXmlNamespaceResolver namespaceResolver)
        {
            if (type == typeof(Guid[]))
            {
                string[] values = (string[])ReadContentAs(typeof(string[]), namespaceResolver);
                Guid[] guids = new Guid[values.Length];
                for (int i = 0; i < values.Length; i++)
                    guids[i] = XmlConverter.ToGuid(values[i]);
                return guids;
            }
            if (type == typeof(UniqueId[]))
            {
                string[] values = (string[])ReadContentAs(typeof(string[]), namespaceResolver);
                UniqueId[] uniqueIds = new UniqueId[values.Length];
                for (int i = 0; i < values.Length; i++)
                    uniqueIds[i] = XmlConverter.ToUniqueId(values[i]);
                return uniqueIds;
            }
            return base.ReadContentAs(type, namespaceResolver);
        }

Same methods

XmlDictionaryReader::ReadContentAs ( System type, System namespaceResolver ) : object