12 instantiations of TypeDesc
System.Xml (12)
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 (6)
321nullableTypeDesc = new TypeDesc("NullableOf" + this.name, "System.Nullable`1[" + this.fullName + "]", null, TypeKind.Struct, this, this.flags | TypeFlags.OptionalValue, this.formatterName); 364arrayTypeDesc = new TypeDesc(null, name + "[]", fullName + "[]", TypeKind.Array, null, TypeFlags.Reference | (flags & TypeFlags.UseReflection), this); 369TypeDesc newTypeDesc = new TypeDesc(extension.Name, extension.Name, null, this.kind, this.baseTypeDesc, this.flags, null); 583TypeDesc typeDesc = new TypeDesc(type, true, dataType, formatterName, flags); 599TypeDesc typeDesc = new TypeDesc(type, false, dataType, formatterName, flags); 830typeDesc = new TypeDesc(type, CodeIdentifier.MakeValid(TypeName(type)), type.ToString(), kind, null, flags, null);
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);
227 references to TypeDesc
System.Xml (227)
System\Xml\Serialization\Mappings.cs (5)
240TypeDesc typeDesc; 267internal TypeDesc TypeDesc { 586TypeDesc typeDesc; 623internal TypeDesc TypeDesc { 866string GetNullableType(TypeDesc td) {
System\Xml\Serialization\Models.cs (18)
40TypeDesc typeDesc = typeScope.GetTypeDesc(type, null, directReference); 74TypeDesc typeDesc = typeScope.GetArrayTypeDesc(type); 84TypeDesc typeDesc; 88protected TypeModel(Type type, TypeDesc typeDesc, ModelScope scope) { 102internal TypeDesc TypeDesc { 108internal ArrayModel(Type type, TypeDesc typeDesc, ModelScope scope) : base(type, typeDesc, scope) { } 116internal PrimitiveModel(Type type, TypeDesc typeDesc, ModelScope scope) : base(type, typeDesc, scope) { } 120internal SpecialModel(Type type, TypeDesc typeDesc, ModelScope scope) : base(type, typeDesc, scope) { } 125internal StructModel(Type type, TypeDesc typeDesc, ModelScope scope) : base(type, typeDesc, scope) { } 163void CheckSupportedMember(TypeDesc typeDesc, MemberInfo member, Type type) { 181TypeDesc typeDesc = ModelScope.TypeScope.GetTypeDesc(fieldInfo.FieldType, fieldInfo, true, false); 192TypeDesc typeDesc = ModelScope.TypeScope.GetTypeDesc(propertyInfo.PropertyType, propertyInfo, true, false); 230TypeDesc fieldTypeDesc; 232internal FieldModel(string name, Type fieldType, TypeDesc fieldTypeDesc, bool checkSpecified, bool checkShouldPersist) : 235internal FieldModel(string name, Type fieldType, TypeDesc fieldTypeDesc, bool checkSpecified, bool checkShouldPersist, bool readOnly) { 244internal FieldModel(MemberInfo memberInfo, Type fieldType, TypeDesc fieldTypeDesc) { 289internal TypeDesc FieldTypeDesc { 345internal EnumModel(Type type, TypeDesc typeDesc, ModelScope scope) : base(type, typeDesc, scope) { }
System\Xml\Serialization\SchemaImporter.cs (3)
140TypeDesc baseTypeDesc; 144TypeDesc typeDescToChange = structMapping.TypeDesc; 164TypeDesc typeDesc = Scope.GetTypeDesc(typeof(object));
System\Xml\Serialization\SoapCodeExporter.cs (1)
193void AddElementMetadata(CodeAttributeDeclarationCollection metadata, string elementName, TypeDesc typeDesc, bool isNullable) {
System\Xml\Serialization\SoapReflectionImporter.cs (8)
188TypeDesc td = typeScope.GetTypeDesc(dataType, XmlSchema.Namespace); 215TypeDesc baseTypeDesc = model.TypeDesc.BaseTypeDesc; 220TypeDesc valueTypeDesc = string.IsNullOrEmpty(dataType) ? model.TypeDesc.BaseTypeDesc : typeScope.GetTypeDesc(dataType, XmlSchema.Namespace); 236TypeDesc typeDesc = typeScope.GetTypeDesc(typeof(object)); 255TypeMapping GetTypeMapping(string typeName, string ns, TypeDesc typeDesc) { 264TypeDesc typeDesc = baseMapping.TypeDesc.GetNullableTypeDesc(type); 682object GetDefaultValue(TypeDesc fieldTypeDesc, SoapAttributes a) { 703TypeDesc typeDesc = typeScope.GetTypeDesc(type);
System\Xml\Serialization\SoapSchemaImporter.cs (8)
277TypeDesc baseTypeDesc = null; 447TypeDesc td = Scope.GetTypeDesc(typeName.Name, typeName.Namespace); 552TypeDesc sourceTypeDesc = Scope.GetTypeDesc(sourceDataType); 595TypeDesc sourceTypeDesc = GetDataTypeSource(dataType); 604TypeDesc typeDesc = null; 616TypeDesc GetDataTypeSource(XmlSchemaSimpleType dataType) { 618TypeDesc typeDesc = Scope.GetTypeDesc(dataType); 628TypeDesc typeDesc = Scope.GetTypeDesc(name.Name, name.Namespace);
System\Xml\Serialization\SourceInfo.cs (1)
50public SourceInfo CastTo(TypeDesc td) {
System\Xml\Serialization\Types.cs (45)
77TypeDesc arrayElementTypeDesc; 78TypeDesc arrayTypeDesc; 79TypeDesc nullableTypeDesc; 83TypeDesc baseTypeDesc; 92internal TypeDesc(string name, string fullName, XmlSchemaType dataType, TypeKind kind, TypeDesc baseTypeDesc, TypeFlags flags, string formatterName) { 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) 316internal TypeDesc GetNullableTypeDesc(Type type) { 353internal TypeDesc ArrayElementTypeDesc { 362internal TypeDesc CreateArrayTypeDesc() { 368internal TypeDesc CreateMappedTypeDesc(MappedTypeDesc extension) { 369TypeDesc newTypeDesc = new TypeDesc(extension.Name, extension.Name, null, this.kind, this.baseTypeDesc, this.flags, null); 377internal TypeDesc BaseTypeDesc { 385internal bool IsDerivedFrom(TypeDesc baseTypeDesc) { 386TypeDesc typeDesc = this; 394internal static TypeDesc FindCommonBaseTypeDesc(TypeDesc[] typeDescs) { 396TypeDesc leastDerivedTypeDesc = null; 583TypeDesc typeDesc = new TypeDesc(type, true, dataType, formatterName, flags); 599TypeDesc typeDesc = new TypeDesc(type, false, dataType, formatterName, flags); 610internal TypeDesc GetTypeDesc(string name, string ns) { 614internal TypeDesc GetTypeDesc(string name, string ns, TypeFlags flags) { 615TypeDesc typeDesc = (TypeDesc)primitiveNames[name, ns]; 624internal TypeDesc GetTypeDesc(XmlSchemaSimpleType dataType) { 625return (TypeDesc)primitiveDataTypes[dataType]; 628internal TypeDesc GetTypeDesc(Type type) { 632internal TypeDesc GetTypeDesc(Type type, MemberInfo source) { 636internal TypeDesc GetTypeDesc(Type type, MemberInfo source, bool directReference) { 640internal TypeDesc GetTypeDesc(Type type, MemberInfo source, bool directReference, bool throwOnError) { 644TypeDesc typeDesc = (TypeDesc)primitiveTypes[type]; 646typeDesc = (TypeDesc)typeDescs[type]; 658internal TypeDesc GetArrayTypeDesc(Type type) { 659TypeDesc typeDesc = (TypeDesc)arrayTypeDescs[type]; 670internal TypeMapping GetTypeMappingFromTypeDesc(TypeDesc typeDesc) { 678internal Type GetTypeFromTypeDesc(TypeDesc typeDesc) { 688TypeDesc ImportTypeDesc(Type type, MemberInfo memberInfo, bool directReference) { 689TypeDesc typeDesc = null; 843TypeDesc td = GetTypeDesc(arrayElementType, memberInfo, true, false); 975static bool CanWriteProperty(PropertyInfo propertyInfo, TypeDesc typeDesc) {
System\Xml\Serialization\XmlCodeExporter.cs (11)
373void AddDefaultValueAttribute(CodeMemberField field, CodeAttributeDeclarationCollection metadata, object defaultValue, TypeMapping mapping, CodeCommentStatementCollection comments, TypeDesc memberTypeDesc, Accessor accessor, CodeConstructor ctor) { 596void ExportArrayElements(CodeAttributeDeclarationCollection metadata, ArrayMapping array, string ns, TypeDesc elementTypeDesc, int nestingLevel) { 748void ExportText(CodeAttributeDeclarationCollection metadata, TypeDesc typeDesc, string dataType) { 759void ExportAttribute(CodeAttributeDeclarationCollection metadata, string name, string ns, TypeDesc typeDesc, TypeDesc dataTypeDesc, XmlSchemaForm form) { 763void ExportArrayItem(CodeAttributeDeclarationCollection metadata, string name, string ns, TypeDesc typeDesc, TypeDesc dataTypeDesc, bool isNullable, XmlSchemaForm form, int nestingLevel) { 767void ExportElement(CodeAttributeDeclarationCollection metadata, string name, string ns, TypeDesc typeDesc, TypeDesc dataTypeDesc, bool isNullable, XmlSchemaForm form, int sequenceId) { 775void ExportMetadata(CodeAttributeDeclarationCollection metadata, Type attributeType, string name, string ns, TypeDesc typeDesc, TypeDesc dataTypeDesc, object isNullable, XmlSchemaForm form, int nestingLevel, int sequenceId) {
System\Xml\Serialization\XmlReflectionImporter.cs (25)
351TypeDesc modelTypeDesc = TypeScope.IsOptionalValue(model.Type) ? model.TypeDesc.BaseTypeDesc : model.TypeDesc; 355TypeDesc td = typeScope.GetTypeDesc(dataType, XmlSchema.Namespace); 390TypeDesc valueTypeDesc = string.IsNullOrEmpty(dataType) ? model.TypeDesc.BaseTypeDesc : typeScope.GetTypeDesc(dataType, XmlSchema.Namespace); 444SpecialMapping ImportSpecialMapping(Type type, TypeDesc typeDesc, string ns, ImportContext context, RecursionLimiter limiter) { 556static Exception UnsupportedException(TypeDesc typeDesc, ImportContext context) { 561TypeDesc typeDesc = typeScope.GetTypeDesc(typeof(object)); 572TypeDesc typeDesc = baseMapping.TypeDesc.GetNullableTypeDesc(type); 627TypeMapping GetTypeMapping(string typeName, string ns, TypeDesc typeDesc, NameTable typeLib, Type type) { 837TypeDesc typeDesc = typeScope.GetTypeDesc(type); 995void CheckContext(TypeDesc typeDesc, ImportContext context) { 1153TypeDesc typeDesc = typeScope.GetTypeDesc(xmlReflectionMember.MemberType); 1304TypeDesc targetTypeDesc = typeScope.GetTypeDesc(targetType); 1381TypeDesc targetTypeDesc = typeScope.GetTypeDesc(targetType); 1409TypeDesc targetTypeDesc = typeScope.GetTypeDesc(targetType); 1423TypeDesc targetTypeDesc = typeScope.GetTypeDesc(targetType); 1476TypeDesc targetTypeDesc = typeScope.GetTypeDesc(targetType); 1505TypeDesc arrayElementTypeDesc = typeScope.GetTypeDesc(arrayElementType); 1635TypeDesc targetTypeDesc = typeScope.GetTypeDesc(targetType); 1691TypeDesc targetTypeDesc = typeScope.GetTypeDesc(targetType); 1858object GetDefaultValue(TypeDesc fieldTypeDesc, Type t, XmlAttributes a) { 1876static XmlArrayItemAttribute CreateArrayItemAttribute(TypeDesc typeDesc, int nestingLevel) { 1882static XmlArrayAttribute CreateArrayAttribute(TypeDesc typeDesc) { 1887static XmlElementAttribute CreateElementAttribute(TypeDesc typeDesc) { 1927static void CheckNullable(bool isNullable, TypeDesc typeDesc, TypeMapping mapping) { 1953TypeDesc typeDesc = new TypeScope().GetTypeDesc(type);
System\Xml\Serialization\XmlSchemaImporter.cs (12)
529TypeDesc baseTypeDesc = null; 628TypeDesc baseTypeDesc = Scope.GetTypeDesc(baseType); 800TypeDesc[] typeDescs = new TypeDesc[uniqueTypeDescs.Count]; 808member.TypeDesc = TypeDesc.FindCommonBaseTypeDesc(typeDescs); 1440TypeDesc xmlnsTypeDesc = Scope.GetTypeDesc(typeof(XmlSerializerNamespaces)); 1600TypeDesc sourceTypeDesc = Scope.GetTypeDesc((XmlSchemaSimpleType)sourceType); 1680TypeDesc sourceTypeDesc = GetDataTypeSource(dataType, flags); 1690TypeDesc typeDesc = null; 1735TypeDesc GetDataTypeSource(XmlSchemaSimpleType dataType, TypeFlags flags) { 1736TypeDesc typeDesc = null; 1754TypeDesc typeDesc = Scope.GetTypeDesc(name.Name, name.Namespace, flags);
System\Xml\Serialization\XmlSerializationGeneratedCode.cs (4)
56TypeDesc stringTypeDesc = null; 57TypeDesc qnameTypeDesc = null; 79internal TypeDesc StringTypeDesc { get { return stringTypeDesc; } } 80internal TypeDesc QnameTypeDesc { get { return qnameTypeDesc; } }
System\Xml\Serialization\XmlSerializationILGen.cs (4)
27TypeDesc stringTypeDesc = null; 28TypeDesc qnameTypeDesc = null; 52internal TypeDesc StringTypeDesc { get { return stringTypeDesc; } } 53internal TypeDesc QnameTypeDesc { get { return qnameTypeDesc; } }
System\Xml\Serialization\XmlSerializationReader.cs (19)
1972TypeDesc td; 1974internal CreateCollectionInfo(string name, TypeDesc td) { 1982internal TypeDesc TypeDesc { 2324string GetChoiceIdentifierSource(MemberMapping mapping, string parent, TypeDesc parentTypeDesc) { 2581void WriteCreateCollection(TypeDesc td, string source) { 2929TypeDesc td = mapping.TypeDesc; 3285TypeDesc td = member.Mapping.TypeDesc; 3319void WriteAddCollectionFixup(TypeDesc typeDesc, bool readOnly, string memberSource, string targetSource) { 3371TypeDesc td = c.TypeDesc; 3640TypeDesc typeDesc = member.Mapping.TypeDesc; 3927TypeDesc td = ((NullableMapping)e.Mapping).BaseMapping.TypeDesc; 3960TypeDesc td = ((NullableMapping)e.Mapping).BaseMapping.TypeDesc; 4027string GetArraySource(TypeDesc typeDesc, string arrayName) { 4030string GetArraySource(TypeDesc typeDesc, string arrayName, bool multiRef) { 4069TypeDesc typeDesc = member.Mapping.TypeDesc; 4130void WriteSourceBeginTyped(string source, TypeDesc typeDesc) { 4170TypeDesc td = arrayMapping.TypeDesc; 4687void WriteCatchCastException(TypeDesc typeDesc, string source, string id) { 4704void WriteArrayLocalDecl( string typeName, string variableName, string initValue, TypeDesc arrayTypeDesc) {
System\Xml\Serialization\XmlSerializationReaderILGen.cs (12)
41TypeDesc td; 43internal CreateCollectionInfo(string name, TypeDesc td) { 51internal TypeDesc TypeDesc { 394string GetChoiceIdentifierSource(MemberMapping mapping, string parent, TypeDesc parentTypeDesc) { 1284TypeDesc td = mapping.TypeDesc; 2189TypeDesc typeDesc = member.Mapping.TypeDesc; 2619string GetArraySource(TypeDesc typeDesc, string arrayName) { 2622string GetArraySource(TypeDesc typeDesc, string arrayName, bool multiRef) { 2659TypeDesc typeDesc = member.Mapping.TypeDesc; 2712void WriteSourceBeginTyped(string source, TypeDesc typeDesc) { 3533void WriteCatchCastException(TypeDesc typeDesc, string source, string id) { 3582void WriteArrayLocalDecl(string typeName, string variableName, string initValue, TypeDesc arrayTypeDesc) {
System\Xml\Serialization\XmlSerializationWriter.cs (26)
714TypeDesc typeDesc = new TypeScope().GetTypeDesc(type); 1451void WritePrimitiveValue(TypeDesc typeDesc, string source, bool isElement) { 1475TypeDesc typeDesc = mapping.TypeDesc; 2201bool CanOptimizeWriteListSequence(TypeDesc listElementTypeDesc) { 2210void WriteMember(string source, AttributeAccessor attribute, TypeDesc memberTypeDesc, string parent) { 2242TypeDesc arrayElementTypeDesc = memberTypeDesc.ArrayElementTypeDesc; 2367TypeDesc typeDesc = attribute.Mapping.TypeDesc; 2373void WriteMember(string source, string choiceSource, ElementAccessor[] elements, TextAccessor text, ChoiceIdentifierAccessor choice, TypeDesc memberTypeDesc, bool writeAccessors) { 2382void WriteArray(string source, string choiceSource, ElementAccessor[] elements, TextAccessor text, ChoiceIdentifierAccessor choice, TypeDesc arrayTypeDesc) { 2418void WriteArrayItems(ElementAccessor[] elements, TextAccessor text, ChoiceIdentifierAccessor choice, TypeDesc arrayTypeDesc, string arrayName, string choiceName) { 2419TypeDesc arrayElementTypeDesc = arrayTypeDesc.ArrayElementTypeDesc; 2512TypeDesc td = elements[0].IsUnbounded ? elements[0].Mapping.TypeDesc.CreateArrayTypeDesc() : elements[0].Mapping.TypeDesc; 2572TypeDesc td = element.IsUnbounded ? element.Mapping.TypeDesc.CreateArrayTypeDesc() : element.Mapping.TypeDesc; 2792TypeDesc td = mapping.TypeDesc.CreateArrayTypeDesc(); 2950TypeDesc td = mapping.TypeDesc; 3028void WriteChoiceTypeCheck(string source, string fullTypeName, bool useReflection, ChoiceIdentifierAccessor choice, string enumName, TypeDesc typeDesc) { 3172void WriteArrayLocalDecl(string typeName, string variableName, string initValue, TypeDesc arrayTypeDesc) { 3353TypeDesc typeDesc = scope.GetTypeDesc(type); 3359string WriteTypeInfo(TypeScope scope, TypeDesc typeDesc, Type type){ 3369TypeDesc elementTypeDesc = typeDesc.ArrayElementTypeDesc; 3408TypeDesc elementTypeDesc = typeDesc.ArrayElementTypeDesc; 3456void WriteCollectionInfo(string typeVariable, TypeDesc typeDesc, Type type){ 3627internal string GetStringForMember(string obj, string memberName, TypeDesc typeDesc){ 3631TypeDesc saveTypeDesc = typeDesc; 3670internal string GetStringForArrayMember(string arrayName, string subscript, TypeDesc arrayTypeDesc){ 3769internal void WriteArrayLocalDecl( string typeName, string variableName, string initValue, TypeDesc arrayTypeDesc) {
System\Xml\Serialization\XmlSerializationWriterILGen.cs (21)
135void WritePrimitiveValue(TypeDesc typeDesc, SourceInfo source, out Type returnType) { 176TypeDesc typeDesc = mapping.TypeDesc; 1101bool CanOptimizeWriteListSequence(TypeDesc listElementTypeDesc) { 1110void WriteMember(SourceInfo source, AttributeAccessor attribute, TypeDesc memberTypeDesc, string parent) { 1159TypeDesc arrayElementTypeDesc = memberTypeDesc.ArrayElementTypeDesc; 1345TypeDesc typeDesc = attribute.Mapping.TypeDesc; 1364void WriteMember(SourceInfo source, string choiceSource, ElementAccessor[] elements, TextAccessor text, ChoiceIdentifierAccessor choice, TypeDesc memberTypeDesc, bool writeAccessors) { 1374void WriteArray(SourceInfo source, string choiceSource, ElementAccessor[] elements, TextAccessor text, ChoiceIdentifierAccessor choice, TypeDesc arrayTypeDesc) { 1430void WriteArrayItems(ElementAccessor[] elements, TextAccessor text, ChoiceIdentifierAccessor choice, TypeDesc arrayTypeDesc, string arrayName, string choiceName) 1432TypeDesc arrayElementTypeDesc = arrayTypeDesc.ArrayElementTypeDesc; 1521TypeDesc td = elements[0].IsUnbounded ? elements[0].Mapping.TypeDesc.CreateArrayTypeDesc() : elements[0].Mapping.TypeDesc; 1581TypeDesc td = element.IsUnbounded ? element.Mapping.TypeDesc.CreateArrayTypeDesc() : element.Mapping.TypeDesc; 1955TypeDesc td = mapping.TypeDesc; 2087void WriteChoiceTypeCheck(SourceInfo source, string fullTypeName, ChoiceIdentifierAccessor choice, string enumName, TypeDesc typeDesc) { 2157void WriteArrayLocalDecl(string typeName, string variableName, SourceInfo initValue, TypeDesc arrayTypeDesc) { 2234TypeDesc typeDesc = scope.GetTypeDesc(type); 2249internal string GetStringForMember(string obj, string memberName, TypeDesc typeDesc) { 2253internal SourceInfo GetSourceForMember(string obj, MemberMapping member, TypeDesc typeDesc, CodeGenerator ilg) 2257internal SourceInfo GetSourceForMember(string obj, MemberMapping member, MemberInfo memberInfo, TypeDesc typeDesc, CodeGenerator ilg) 2279internal string GetStringForArrayMember(string arrayName, string subscript, TypeDesc arrayTypeDesc) { 2417internal void WriteArrayLocalDecl(string typeName, string variableName, SourceInfo initValue, TypeDesc arrayTypeDesc) {
System\Xml\Serialization\XmlSerializer.cs (4)
446TypeDesc typeDesc = (TypeDesc)TypeScope.PrimtiveTypes[primitiveType]; 726TypeDesc typeDesc = (TypeDesc)TypeScope.PrimtiveTypes[type];