System.Runtime.Serialization.SchemaExporter.IsSpecialXmlType C# (CSharp) Метод

IsSpecialXmlType() статический приватный Метод

static private IsSpecialXmlType ( Type type, XmlQualifiedName &typeName, XmlSchemaType &xsdType, bool &hasRoot ) : bool
type System.Type
typeName System.Xml.XmlQualifiedName
xsdType System.Xml.Schema.XmlSchemaType
hasRoot bool
Результат bool
        internal static bool IsSpecialXmlType(Type type, out XmlQualifiedName typeName, out XmlSchemaType xsdType, out bool hasRoot)
        {
            xsdType = null;
            hasRoot = true;
            if (type == Globals.TypeOfXmlElement || type == Globals.TypeOfXmlNodeArray)
            {
                string name = null;
                if (type == Globals.TypeOfXmlElement)
                {
                    xsdType = CreateAnyElementType();
                    name = "XmlElement";
                    hasRoot = false;
                }
                else
                {
                    xsdType = CreateAnyType();
                    name = "ArrayOfXmlNode";
                    hasRoot = true;
                }
                typeName = new XmlQualifiedName(name, DataContract.GetDefaultStableNamespace(type));
                return true;
            }
            typeName = null;
            return false;
        }
    }