internal static ClrSimpleTypeInfo CreateSimpleTypeInfo(XmlSchemaType type) { ClrSimpleTypeInfo typeInfo = null; Debug.Assert(type.Datatype != null); switch (type.Datatype.Variety) { case XmlSchemaDatatypeVariety.Atomic: { typeInfo = new AtomicSimpleTypeInfo(type); break; } case XmlSchemaDatatypeVariety.List: { typeInfo = new ListSimpleTypeInfo(type); break; } case XmlSchemaDatatypeVariety.Union: { typeInfo = new UnionSimpleTypeInfo(type); break; } } return(typeInfo); }
internal static ClrSimpleTypeInfo CreateSimpleTypeInfo(XmlSchemaType type) { ClrSimpleTypeInfo typeInfo = null; Debug.Assert(type.Datatype != null); switch (type.Datatype.Variety) { case XmlSchemaDatatypeVariety.Atomic: if (type is XmlSchemaSimpleType simpleType && simpleType.IsEnum()) { typeInfo = new EnumSimpleTypeInfo(simpleType); } else { typeInfo = new AtomicSimpleTypeInfo(type); } break;
internal static ClrSimpleTypeInfo CreateSimpleTypeInfo(XmlSchemaType type) { ClrSimpleTypeInfo typeInfo = null; Debug.Assert(type.Datatype != null); switch (type.Datatype.Variety) { case XmlSchemaDatatypeVariety.Atomic: typeInfo = new AtomicSimpleTypeInfo(type); break; case XmlSchemaDatatypeVariety.List: typeInfo = new ListSimpleTypeInfo(type); break; case XmlSchemaDatatypeVariety.Union: typeInfo = new UnionSimpleTypeInfo(type); break; default: break; } return typeInfo; }