System.Xml.Xsl.XmlQueryTypeFactory.ItemType.Create C# (CSharp) Method

Create() public static method

Create ItemType from Xsd atomic type.
public static Create ( XmlSchemaSimpleType schemaType, bool isStrict ) : XmlQueryType
schemaType System.Xml.Schema.XmlSchemaSimpleType
isStrict bool
return XmlQueryType
            public static XmlQueryType Create(XmlSchemaSimpleType schemaType, bool isStrict) {
                Debug.Assert(schemaType.Datatype.Variety == XmlSchemaDatatypeVariety.Atomic, "List or Union Xsd types should have been handled by caller.");
                XmlTypeCode code = schemaType.Datatype.TypeCode;

                // If schemaType is a built-in type,
                if (schemaType == XmlSchemaType.GetBuiltInSimpleType(code)) {
                    // Then use statically allocated type
                    return Create(code, isStrict);
                }

                // Otherwise, create a new type
                return new ItemType(code, XmlQualifiedNameTest.Wildcard, schemaType, false, isStrict, true);
            }

Same methods

XmlQueryTypeFactory.ItemType::Create ( XmlTypeCode code, XmlQualifiedNameTest nameTest, XmlSchemaType contentType, bool isNillable ) : XmlQueryType
XmlQueryTypeFactory.ItemType::Create ( XmlTypeCode code, bool isStrict ) : XmlQueryType
XmlQueryTypeFactory.ItemType