116 references to TypeKind
System.Xml (116)
System\Xml\Serialization\CodeExporter.cs (2)
199TypeKind kind = arrayMapping.Elements[0].Mapping.TypeDesc.Kind; 200if (kind == TypeKind.Node)
System\Xml\Serialization\Models.cs (14)
43case TypeKind.Enum: 46case TypeKind.Primitive: 49case TypeKind.Array: 50case TypeKind.Collection: 51case TypeKind.Enumerable: 54case TypeKind.Root: 55case TypeKind.Class: 56case TypeKind.Struct: 157if (model.ReadOnly && model.FieldTypeDesc.Kind != TypeKind.Collection && model.FieldTypeDesc.Kind != TypeKind.Enumerable) 182if (fieldInfo.IsInitOnly && typeDesc.Kind != TypeKind.Collection && typeDesc.Kind != TypeKind.Enumerable) 194if (!propertyInfo.CanWrite && typeDesc.Kind != TypeKind.Collection && typeDesc.Kind != TypeKind.Enumerable)
System\Xml\Serialization\SoapReflectionImporter.cs (12)
203case TypeKind.Enum: 205case TypeKind.Primitive: 207case TypeKind.Array: 208case TypeKind.Collection: 209case TypeKind.Enumerable: 211case TypeKind.Root: 212case TypeKind.Class: 213case TypeKind.Struct: 295if (model.TypeDesc.Kind == TypeKind.Root) return GetRootMapping(); 684if (!(fieldTypeDesc.Kind == TypeKind.Primitive || fieldTypeDesc.Kind == TypeKind.Enum)) { 689if (fieldTypeDesc.Kind == TypeKind.Enum) {
System\Xml\Serialization\SoapSchemaImporter.cs (2)
298structMapping.TypeDesc = new TypeDesc(typeName, typeName, TypeKind.Struct, baseTypeDesc, flags); 559enumMapping.TypeDesc = new TypeDesc(typeName, typeName, TypeKind.Enum, null, 0);
System\Xml\Serialization\Types.cs (49)
80TypeKind kind; 92internal TypeDesc(string name, string fullName, XmlSchemaType dataType, TypeKind kind, TypeDesc baseTypeDesc, TypeFlags flags, string formatterName) { 98this.isXsdType = kind == TypeKind.Primitive; 101else if (kind == TypeKind.Enum) 103else if (this.kind == TypeKind.Root) 111internal TypeDesc(string name, string fullName, XmlSchemaType dataType, TypeKind kind, TypeDesc baseTypeDesc, TypeFlags flags) 114internal TypeDesc(string name, string fullName, TypeKind kind, TypeDesc baseTypeDesc, TypeFlags flags) 118: this(type.Name, type.FullName, dataType, TypeKind.Primitive, (TypeDesc)null, flags, formatterName) { 122internal TypeDesc(Type type, string name, string fullName, TypeKind kind, TypeDesc baseTypeDesc, TypeFlags flags, TypeDesc arrayElementTypeDesc) 178internal TypeKind Kind { 264get { return kind == TypeKind.Void; } 268get { return kind == TypeKind.Class; } 272get { return kind == TypeKind.Struct || kind == TypeKind.Class; } 276get { return kind == TypeKind.Array || kind == TypeKind.Collection || kind == TypeKind.Enumerable; } 280get { return kind == TypeKind.Collection; } 284get { return kind == TypeKind.Enumerable; } 288get { return kind == TypeKind.Array; } 292get { return kind == TypeKind.Primitive; } 296get { return kind == TypeKind.Enum; } 304get { return kind == TypeKind.Root; } 321nullableTypeDesc = new TypeDesc("NullableOf" + this.name, "System.Nullable`1[" + this.fullName + "]", null, TypeKind.Struct, this, this.flags | TypeFlags.OptionalValue, this.formatterName); 350get { return kind == TypeKind.Array ? "Length" : "Count"; } 364arrayTypeDesc = new TypeDesc(null, name + "[]", fullName + "[]", TypeKind.Array, null, TypeFlags.Reference | (flags & TypeFlags.UseReflection), this); 690TypeKind kind; 712kind = TypeKind.Root; 716kind = TypeKind.Enum; 723kind = TypeKind.Void; 727kind = TypeKind.Serializable; 732kind = TypeKind.Array; 743kind = TypeKind.Collection; 748kind = TypeKind.Primitive; 751kind = TypeKind.Primitive; 758kind = TypeKind.Enum; 761kind = TypeKind.Struct; 773kind = TypeKind.Attribute; 777kind = TypeKind.Node; 788kind = TypeKind.Class; 795kind = TypeKind.Void; 807kind = TypeKind.Void; 815if (kind == TypeKind.Class && !type.IsAbstract) { 819if (kind == TypeKind.Struct || kind == TypeKind.Class) { 822kind = TypeKind.Enumerable; 833if (directReference && (typeDesc.IsClass || kind == TypeKind.Serializable)) 980if (typeDesc.Kind == TypeKind.Collection || typeDesc.Kind == TypeKind.Enumerable) {
System\Xml\Serialization\XmlReflectionImporter.cs (19)
371case TypeKind.Enum: 373case TypeKind.Primitive: 376case TypeKind.Array: 377case TypeKind.Collection: 378case TypeKind.Enumerable: 385case TypeKind.Root: 386case TypeKind.Class: 387case TypeKind.Struct: 401if (model.TypeDesc.Kind == TypeKind.Serializable) { 452if (typeDesc.Kind == TypeKind.Serializable) { 641if (model.TypeDesc.Kind == TypeKind.Root) return GetRootMapping(); 1365if (accessor.TypeDesc.ArrayElementTypeDesc.Kind == TypeKind.Serializable) { 1586if (element.Mapping.TypeDesc.Kind == TypeKind.Node) { 1623if (accessor.TypeDesc.Kind == TypeKind.Serializable) { 1860if (!(fieldTypeDesc.Kind == TypeKind.Primitive || fieldTypeDesc.Kind == TypeKind.Enum)) { 1866if (fieldTypeDesc.Kind == TypeKind.Enum) { 1935bool isAny = mapping.TypeDesc.Kind == TypeKind.Node; 1956if (typeDesc.Kind == TypeKind.Node) {
System\Xml\Serialization\XmlSchemaExporter.cs (2)
395case TypeKind.Node: { 411case TypeKind.Serializable: {
System\Xml\Serialization\XmlSchemaImporter.cs (4)
581structMapping.TypeDesc = new TypeDesc(typeName, typeName, TypeKind.Struct, baseTypeDesc, flags); 629structMapping.TypeDesc = new TypeDesc(typeName, typeName, TypeKind.Struct, baseTypeDesc, flags); 1607enumMapping.TypeDesc = new TypeDesc(typeName, typeName, TypeKind.Enum, null, 0); 1656enumMapping.TypeDesc = new TypeDesc(typeName, typeName, TypeKind.Enum, null, 0);
System\Xml\Serialization\XmlSerializationReader.cs (4)
3544if (special.TypeDesc.Kind == TypeKind.Attribute) { 3795case TypeKind.Node: 4412case TypeKind.Node: 4421case TypeKind.Serializable:
System\Xml\Serialization\XmlSerializationReaderILGen.cs (4)
2098if (special.TypeDesc.Kind == TypeKind.Attribute) { 2374case TypeKind.Node: 3205case TypeKind.Node: 3223case TypeKind.Serializable:
System\Xml\Serialization\XmlSerializationWriter.cs (2)
2356if (special.TypeDesc.Kind == TypeKind.Attribute || special.TypeDesc.CanBeAttributeValue) { 2736case TypeKind.Node:
System\Xml\Serialization\XmlSerializationWriterILGen.cs (2)
1326if (special.TypeDesc.Kind == TypeKind.Attribute || special.TypeDesc.CanBeAttributeValue) { 1819case TypeKind.Node: