internal new static DatatypeImplementation DeriveByUnion(XmlSchemaSimpleType[] types, XmlSchemaType schemaType) { DatatypeImplementation dt = new Datatype_union(types); dt.baseType = c_anySimpleType; //Base type of a union is anySimpleType dt.variety = XmlSchemaDatatypeVariety.Union; dt.parentSchemaType = schemaType; return dt; }
internal new static DatatypeImplementation DeriveByUnion(XmlSchemaDatatype[] types) { foreach(DatatypeImplementation dt1 in types) { if (dt1.variety == XmlSchemaDatatypeVariety.Union) { throw new XmlSchemaException(Res.Sch_UnionFromUnion); } } DatatypeImplementation dt = new Datatype_union(types); dt.variety = XmlSchemaDatatypeVariety.Union; return dt; }