private ItemType(XmlTypeCode code, XmlQualifiedNameTest nameTest, XmlSchemaType schemaType, bool isNillable, bool isStrict, bool isNotRtf) {
Debug.Assert(nameTest != null, "nameTest cannot be null");
Debug.Assert(schemaType != null, "schemaType cannot be null");
this.code = code;
this.nameTest = nameTest;
this.schemaType = schemaType;
this.isNillable = isNillable;
this.isStrict = isStrict;
this.isNotRtf = isNotRtf;
Debug.Assert(!IsAtomicValue || schemaType.Datatype.Variety == XmlSchemaDatatypeVariety.Atomic);
switch (code) {
case XmlTypeCode.Item: this.nodeKinds = XmlNodeKindFlags.Any; break;
case XmlTypeCode.Node: this.nodeKinds = XmlNodeKindFlags.Any; break;
case XmlTypeCode.Document: this.nodeKinds = XmlNodeKindFlags.Document; break;
case XmlTypeCode.Element: this.nodeKinds = XmlNodeKindFlags.Element; break;
case XmlTypeCode.Attribute: this.nodeKinds = XmlNodeKindFlags.Attribute; break;
case XmlTypeCode.Namespace: this.nodeKinds = XmlNodeKindFlags.Namespace; break;
case XmlTypeCode.ProcessingInstruction: this.nodeKinds = XmlNodeKindFlags.PI; break;
case XmlTypeCode.Comment: this.nodeKinds = XmlNodeKindFlags.Comment; break;
case XmlTypeCode.Text: this.nodeKinds = XmlNodeKindFlags.Text; break;
default: this.nodeKinds = XmlNodeKindFlags.None; break;
}
}