116 references to TypeKind
System.Private.Xml (116)
System\Xml\Serialization\Models.cs (14)
50
case
TypeKind
.Enum:
53
case
TypeKind
.Primitive:
56
case
TypeKind
.Array:
57
case
TypeKind
.Collection:
58
case
TypeKind
.Enumerable:
61
case
TypeKind
.Root:
62
case
TypeKind
.Class:
63
case
TypeKind
.Struct:
197
if (model.ReadOnly && model.FieldTypeDesc.Kind !=
TypeKind
.Collection && model.FieldTypeDesc.Kind !=
TypeKind
.Enumerable)
223
if (fieldInfo.IsInitOnly && typeDesc.Kind !=
TypeKind
.Collection && typeDesc.Kind !=
TypeKind
.Enumerable)
238
if (!propertyInfo.CanWrite && typeDesc.Kind !=
TypeKind
.Collection && typeDesc.Kind !=
TypeKind
.Enumerable)
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (4)
686
if (special.TypeDesc!.Kind ==
TypeKind
.Node)
954
case
TypeKind
.Node:
966
case
TypeKind
.Serializable:
1917
if (special.TypeDesc!.Kind ==
TypeKind
.Attribute)
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (2)
307
case
TypeKind
.Node:
877
if (special.TypeDesc!.Kind ==
TypeKind
.Attribute || special.TypeDesc.CanBeAttributeValue)
System\Xml\Serialization\SoapReflectionImporter.cs (12)
189
case
TypeKind
.Enum:
191
case
TypeKind
.Primitive:
193
case
TypeKind
.Array:
194
case
TypeKind
.Collection:
195
case
TypeKind
.Enumerable:
197
case
TypeKind
.Root:
198
case
TypeKind
.Class:
199
case
TypeKind
.Struct:
298
if (model.TypeDesc.Kind ==
TypeKind
.Root) return GetRootMapping();
742
if (!(fieldTypeDesc.Kind ==
TypeKind
.Primitive || fieldTypeDesc.Kind ==
TypeKind
.Enum))
748
if (fieldTypeDesc.Kind ==
TypeKind
.Enum)
System\Xml\Serialization\Types.cs (47)
88
private readonly
TypeKind
_kind;
99
internal TypeDesc(string name, string fullName, XmlSchemaType? dataType,
TypeKind
kind, TypeDesc? baseTypeDesc, TypeFlags flags, string? formatterName)
106
_isXsdType = kind ==
TypeKind
.Primitive;
109
else if (kind ==
TypeKind
.Enum)
111
else if (_kind ==
TypeKind
.Root)
119
internal TypeDesc(string name, string fullName,
TypeKind
kind, TypeDesc? baseTypeDesc, TypeFlags flags)
124
: this(type!.Name, type.FullName!, dataType,
TypeKind
.Primitive, (TypeDesc?)null, flags, formatterName)
129
internal TypeDesc(Type? type, string name, string fullName,
TypeKind
kind, TypeDesc? baseTypeDesc, TypeFlags flags, TypeDesc? arrayElementTypeDesc)
184
internal
TypeKind
Kind
292
get { return _kind ==
TypeKind
.Void; }
297
get { return _kind ==
TypeKind
.Class; }
302
get { return _kind ==
TypeKind
.Struct || _kind ==
TypeKind
.Class; }
307
get { return _kind ==
TypeKind
.Array || _kind ==
TypeKind
.Collection || _kind ==
TypeKind
.Enumerable; }
312
get { return _kind ==
TypeKind
.Collection; }
317
get { return _kind ==
TypeKind
.Enumerable; }
322
get { return _kind ==
TypeKind
.Array; }
327
get { return _kind ==
TypeKind
.Primitive; }
332
get { return _kind ==
TypeKind
.Enum; }
342
get { return _kind ==
TypeKind
.Root; }
364
_nullableTypeDesc = new TypeDesc($"NullableOf{_name}", $"System.Nullable`1[{_fullName}]", null,
TypeKind
.Struct, this, _flags | TypeFlags.OptionalValue, _formatterName);
407
internal TypeDesc CreateArrayTypeDesc() => _arrayTypeDesc ??= new TypeDesc(null, $"{_name}[]", $"{_fullName}[]",
TypeKind
.Array, null, TypeFlags.Reference | (_flags & TypeFlags.UseReflection), this);
757
TypeKind
kind;
782
kind =
TypeKind
.Root;
787
kind =
TypeKind
.Enum;
793
kind =
TypeKind
.Void;
797
kind =
TypeKind
.Serializable;
803
kind =
TypeKind
.Array;
814
kind =
TypeKind
.Collection;
820
kind =
TypeKind
.Primitive;
824
kind =
TypeKind
.Primitive;
830
kind =
TypeKind
.Enum;
834
kind =
TypeKind
.Struct;
850
kind =
TypeKind
.Attribute;
855
kind =
TypeKind
.Node;
867
kind =
TypeKind
.Class;
875
kind =
TypeKind
.Void;
891
kind =
TypeKind
.Void;
897
if (kind ==
TypeKind
.Class && !type.IsAbstract)
902
if (kind ==
TypeKind
.Struct || kind ==
TypeKind
.Class)
907
kind =
TypeKind
.Enumerable;
917
if (directReference && (typeDesc.IsClass || kind ==
TypeKind
.Serializable))
1089
if (typeDesc.Kind ==
TypeKind
.Collection || typeDesc.Kind ==
TypeKind
.Enumerable)
System\Xml\Serialization\XmlReflectionImporter.cs (19)
427
case
TypeKind
.Enum:
429
case
TypeKind
.Primitive:
432
case
TypeKind
.Array:
433
case
TypeKind
.Collection:
434
case
TypeKind
.Enumerable:
441
case
TypeKind
.Root:
442
case
TypeKind
.Class:
443
case
TypeKind
.Struct:
459
if (model.TypeDesc.Kind ==
TypeKind
.Serializable)
519
if (typeDesc.Kind ==
TypeKind
.Serializable)
730
if (model.TypeDesc.Kind ==
TypeKind
.Root) return GetRootMapping();
1580
if (accessor.TypeDesc.ArrayElementTypeDesc.Kind ==
TypeKind
.Serializable)
1827
if (element.Mapping.TypeDesc!.Kind ==
TypeKind
.Node)
1871
if (accessor.TypeDesc.Kind ==
TypeKind
.Serializable)
2147
if (!(fieldTypeDesc.Kind ==
TypeKind
.Primitive || fieldTypeDesc.Kind ==
TypeKind
.Enum))
2154
if (fieldTypeDesc.Kind ==
TypeKind
.Enum)
2239
bool isAny = mapping.TypeDesc!.Kind ==
TypeKind
.Node;
2266
if (typeDesc.Kind ==
TypeKind
.Node)
System\Xml\Serialization\XmlSchemaExporter.cs (2)
416
case
TypeKind
.Node:
434
case
TypeKind
.Serializable:
System\Xml\Serialization\XmlSchemaImporter.cs (4)
558
structMapping.TypeDesc = new TypeDesc(typeName, typeName,
TypeKind
.Struct, baseTypeDesc, flags);
614
structMapping.TypeDesc = new TypeDesc(typeName, typeName,
TypeKind
.Struct, baseTypeDesc, flags);
1744
enumMapping.TypeDesc = new TypeDesc(typeName, typeName,
TypeKind
.Enum, null, 0);
1801
enumMapping.TypeDesc = new TypeDesc(typeName, typeName,
TypeKind
.Enum, null, 0);
System\Xml\Serialization\XmlSerializationReader.cs (4)
3799
if (special.TypeDesc!.Kind ==
TypeKind
.Attribute)
4081
case
TypeKind
.Node:
4809
case
TypeKind
.Node:
4818
case
TypeKind
.Serializable:
System\Xml\Serialization\XmlSerializationReaderILGen.cs (4)
2037
if (special.TypeDesc!.Kind ==
TypeKind
.Attribute)
2322
case
TypeKind
.Node:
3177
case
TypeKind
.Node:
3193
case
TypeKind
.Serializable:
System\Xml\Serialization\XmlSerializationWriter.cs (2)
3464
if (special.TypeDesc!.Kind ==
TypeKind
.Attribute || special.TypeDesc.CanBeAttributeValue)
3899
case
TypeKind
.Node:
System\Xml\Serialization\XmlSerializationWriterILGen.cs (2)
1360
if (special.TypeDesc!.Kind ==
TypeKind
.Attribute || special.TypeDesc.CanBeAttributeValue)
1874
case
TypeKind
.Node: