12 instantiations of TypeDesc
dotnet-svcutil-lib (12)
FrameworkFork\Microsoft.Xml\Xml\Serialization\SoapSchemaImporter.cs (2)
327structMapping.TypeDesc = new TypeDesc(typeName, typeName, TypeKind.Struct, baseTypeDesc, flags); 631enumMapping.TypeDesc = new TypeDesc(typeName, typeName, TypeKind.Enum, null, 0);
FrameworkFork\Microsoft.Xml\Xml\Serialization\Types.cs (6)
372_nullableTypeDesc = new TypeDesc("NullableOf" + _name, "System.Nullable`1[" + _fullName + "]", null, TypeKind.Struct, this, _flags | TypeFlags.OptionalValue, _formatterName); 425_arrayTypeDesc = new TypeDesc(null, _name + "[]", _fullName + "[]", TypeKind.Array, null, TypeFlags.Reference | (_flags & TypeFlags.UseReflection), this); 431TypeDesc newTypeDesc = new TypeDesc(extension.Name, extension.Name, null, _kind, _baseTypeDesc, _flags, null); 657TypeDesc typeDesc = new TypeDesc(type, true, dataType, formatterName, flags); 675TypeDesc typeDesc = new TypeDesc(type, false, dataType, formatterName, flags); 960typeDesc = new TypeDesc(type, CodeIdentifier.MakeValid(TypeName(type)), type.ToString(), kind, null, flags, null);
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSchemaImporter.cs (4)
663structMapping.TypeDesc = new TypeDesc(typeName, typeName, TypeKind.Struct, baseTypeDesc, flags); 717structMapping.TypeDesc = new TypeDesc(typeName, typeName, TypeKind.Struct, baseTypeDesc, flags); 1846enumMapping.TypeDesc = new TypeDesc(typeName, typeName, TypeKind.Enum, null, 0); 1902enumMapping.TypeDesc = new TypeDesc(typeName, typeName, TypeKind.Enum, null, 0);
199 references to TypeDesc
dotnet-svcutil-lib (199)
FrameworkFork\Microsoft.Xml\Xml\Serialization\Mappings.cs (5)
280private TypeDesc _typeDesc; 311internal TypeDesc TypeDesc 702private TypeDesc _typeDesc; 742internal TypeDesc TypeDesc 1029private string GetNullableType(TypeDesc td)
FrameworkFork\Microsoft.Xml\Xml\Serialization\Models.cs (18)
42TypeDesc typeDesc = _typeScope.GetTypeDesc(type, null, directReference); 80TypeDesc typeDesc = _typeScope.GetArrayTypeDesc(type); 91private TypeDesc _typeDesc; 95protected TypeModel(Type type, TypeDesc typeDesc, ModelScope scope) 112internal TypeDesc TypeDesc 120internal ArrayModel(Type type, TypeDesc typeDesc, ModelScope scope) : base(type, typeDesc, scope) { } 130internal PrimitiveModel(Type type, TypeDesc typeDesc, ModelScope scope) : base(type, typeDesc, scope) { } 135internal SpecialModel(Type type, TypeDesc typeDesc, ModelScope scope) : base(type, typeDesc, scope) { } 140internal StructModel(Type type, TypeDesc typeDesc, ModelScope scope) : base(type, typeDesc, scope) { } 185private void CheckSupportedMember(TypeDesc typeDesc, MemberInfo member, Type type) 206TypeDesc typeDesc = ModelScope.TypeScope.GetTypeDesc(fieldInfo.FieldType, fieldInfo, true, false); 219TypeDesc typeDesc = ModelScope.TypeScope.GetTypeDesc(propertyInfo.PropertyType, propertyInfo, true, false); 260private TypeDesc _fieldTypeDesc; 262internal FieldModel(string name, Type fieldType, TypeDesc fieldTypeDesc, bool checkSpecified, bool checkShouldPersist) : 266internal FieldModel(string name, Type fieldType, TypeDesc fieldTypeDesc, bool checkSpecified, bool checkShouldPersist, bool readOnly) 276internal FieldModel(MemberInfo memberInfo, Type fieldType, TypeDesc fieldTypeDesc) 332internal TypeDesc FieldTypeDesc 402internal EnumModel(Type type, TypeDesc typeDesc, ModelScope scope) : base(type, typeDesc, scope) { }
FrameworkFork\Microsoft.Xml\Xml\Serialization\SchemaImporter.cs (3)
153TypeDesc baseTypeDesc; 159TypeDesc typeDescToChange = structMapping.TypeDesc; 182TypeDesc typeDesc = Scope.GetTypeDesc(typeof(object));
FrameworkFork\Microsoft.Xml\Xml\Serialization\SoapCodeExporter.cs (1)
206private void AddElementMetadata(CodeAttributeDeclarationCollection metadata, string elementName, TypeDesc typeDesc, bool isNullable)
FrameworkFork\Microsoft.Xml\Xml\Serialization\SoapReflectionImporter.cs (8)
204TypeDesc td = _typeScope.GetTypeDesc(dataType, XmlSchema.Namespace); 235TypeDesc baseTypeDesc = model.TypeDesc.BaseTypeDesc; 240TypeDesc valueTypeDesc = string.IsNullOrEmpty(dataType) ? model.TypeDesc.BaseTypeDesc : _typeScope.GetTypeDesc(dataType, XmlSchema.Namespace); 258TypeDesc typeDesc = _typeScope.GetTypeDesc(typeof(object)); 279private TypeMapping GetTypeMapping(string typeName, string ns, TypeDesc typeDesc) 290TypeDesc typeDesc = baseMapping.TypeDesc.GetNullableTypeDesc(type); 764private object GetDefaultValue(TypeDesc fieldTypeDesc, SoapAttributes a) 789TypeDesc typeDesc = _typeScope.GetTypeDesc(type);
FrameworkFork\Microsoft.Xml\Xml\Serialization\SoapSchemaImporter.cs (8)
304TypeDesc baseTypeDesc = null; 502TypeDesc td = Scope.GetTypeDesc(typeName.Name, typeName.Namespace); 624TypeDesc sourceTypeDesc = Scope.GetTypeDesc(sourceDataType); 670TypeDesc sourceTypeDesc = GetDataTypeSource(dataType); 680TypeDesc typeDesc = null; 694private TypeDesc GetDataTypeSource(XmlSchemaSimpleType dataType) 698TypeDesc typeDesc = Scope.GetTypeDesc(dataType); 710TypeDesc typeDesc = Scope.GetTypeDesc(name.Name, name.Namespace);
FrameworkFork\Microsoft.Xml\Xml\Serialization\SourceInfo.cs (1)
49public SourceInfo CastTo(TypeDesc td)
FrameworkFork\Microsoft.Xml\Xml\Serialization\Types.cs (45)
77private TypeDesc _arrayElementTypeDesc; 78private TypeDesc _arrayTypeDesc; 79private TypeDesc _nullableTypeDesc; 83private TypeDesc _baseTypeDesc; 92internal TypeDesc(string name, string fullName, XmlSchemaType dataType, TypeKind kind, TypeDesc baseTypeDesc, TypeFlags flags, string formatterName) 112internal TypeDesc(string name, string fullName, XmlSchemaType dataType, TypeKind kind, TypeDesc baseTypeDesc, TypeFlags flags) 115internal TypeDesc(string name, string fullName, TypeKind kind, TypeDesc baseTypeDesc, TypeFlags flags) 119: this(type.Name, type.FullName, dataType, TypeKind.Primitive, (TypeDesc)null, flags, formatterName) 124internal TypeDesc(Type type, string name, string fullName, TypeKind kind, TypeDesc baseTypeDesc, TypeFlags flags, TypeDesc arrayElementTypeDesc) 365internal TypeDesc GetNullableTypeDesc(Type type) 411internal TypeDesc ArrayElementTypeDesc 422internal TypeDesc CreateArrayTypeDesc() 429internal TypeDesc CreateMappedTypeDesc(MappedTypeDesc extension) 431TypeDesc newTypeDesc = new TypeDesc(extension.Name, extension.Name, null, _kind, _baseTypeDesc, _flags, null); 439internal TypeDesc BaseTypeDesc 449internal bool IsDerivedFrom(TypeDesc baseTypeDesc) 451TypeDesc typeDesc = this; 460internal static TypeDesc FindCommonBaseTypeDesc(TypeDesc[] typeDescs) 463TypeDesc leastDerivedTypeDesc = null; 657TypeDesc typeDesc = new TypeDesc(type, true, dataType, formatterName, flags); 675TypeDesc typeDesc = new TypeDesc(type, false, dataType, formatterName, flags); 687internal TypeDesc GetTypeDesc(string name, string ns) 692internal TypeDesc GetTypeDesc(string name, string ns, TypeFlags flags) 694TypeDesc typeDesc = (TypeDesc)s_primitiveNames[name, ns]; 705internal TypeDesc GetTypeDesc(XmlSchemaSimpleType dataType) 707return (TypeDesc)s_primitiveDataTypes[dataType]; 710internal TypeDesc GetTypeDesc(Type type) 715internal TypeDesc GetTypeDesc(Type type, MemberInfo source) 720internal TypeDesc GetTypeDesc(Type type, MemberInfo source, bool directReference) 725internal TypeDesc GetTypeDesc(Type type, MemberInfo source, bool directReference, bool throwOnError) 731TypeDesc typeDesc = (TypeDesc)s_primitiveTypes[type]; 734typeDesc = (TypeDesc)_typeDescs[type]; 747internal TypeDesc GetArrayTypeDesc(Type type) 749TypeDesc typeDesc = (TypeDesc)_arrayTypeDescs[type]; 761internal TypeMapping GetTypeMappingFromTypeDesc(TypeDesc typeDesc) 771internal Type GetTypeFromTypeDesc(TypeDesc typeDesc) 783private TypeDesc ImportTypeDesc(Type type, MemberInfo memberInfo, bool directReference) 785TypeDesc typeDesc = null; 975TypeDesc td = GetTypeDesc(arrayElementType, memberInfo, true, false); 1134private static bool CanWriteProperty(PropertyInfo propertyInfo, TypeDesc typeDesc)
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlCodeExporter.cs (11)
418private void AddDefaultValueAttribute(CodeMemberField field, CodeAttributeDeclarationCollection metadata, object defaultValue, TypeMapping mapping, CodeCommentStatementCollection comments, TypeDesc memberTypeDesc, Accessor accessor, CodeConstructor ctor) 684private void ExportArrayElements(CodeAttributeDeclarationCollection metadata, ArrayMapping array, string ns, TypeDesc elementTypeDesc, int nestingLevel) 857private void ExportText(CodeAttributeDeclarationCollection metadata, TypeDesc typeDesc, string dataType) 871private void ExportAttribute(CodeAttributeDeclarationCollection metadata, string name, string ns, TypeDesc typeDesc, TypeDesc dataTypeDesc, XmlSchemaForm form) 876private void ExportArrayItem(CodeAttributeDeclarationCollection metadata, string name, string ns, TypeDesc typeDesc, TypeDesc dataTypeDesc, bool isNullable, XmlSchemaForm form, int nestingLevel) 881private void ExportElement(CodeAttributeDeclarationCollection metadata, string name, string ns, TypeDesc typeDesc, TypeDesc dataTypeDesc, bool isNullable, XmlSchemaForm form, int sequenceId) 891private void ExportMetadata(CodeAttributeDeclarationCollection metadata, Type attributeType, string name, string ns, TypeDesc typeDesc, TypeDesc dataTypeDesc, object isNullable, XmlSchemaForm form, int nestingLevel, int sequenceId)
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlReflectionImporter.cs (25)
394TypeDesc modelTypeDesc = TypeScope.IsOptionalValue(model.Type) ? model.TypeDesc.BaseTypeDesc : model.TypeDesc; 399TypeDesc td = _typeScope.GetTypeDesc(dataType, XmlSchema.Namespace); 438TypeDesc valueTypeDesc = string.IsNullOrEmpty(dataType) ? model.TypeDesc.BaseTypeDesc : _typeScope.GetTypeDesc(dataType, XmlSchema.Namespace); 501private SpecialMapping ImportSpecialMapping(Type type, TypeDesc typeDesc, string ns, ImportContext context, RecursionLimiter limiter) 631private static Exception UnsupportedException(TypeDesc typeDesc, ImportContext context) 638TypeDesc typeDesc = _typeScope.GetTypeDesc(typeof(object)); 650TypeDesc typeDesc = baseMapping.TypeDesc.GetNullableTypeDesc(type); 712private TypeMapping GetTypeMapping(string typeName, string ns, TypeDesc typeDesc, NameTable typeLib, Type type) 956TypeDesc typeDesc = _typeScope.GetTypeDesc(type); 1137private void CheckContext(TypeDesc typeDesc, ImportContext context) 1323TypeDesc typeDesc = _typeScope.GetTypeDesc(xmlReflectionMember.MemberType); 1501TypeDesc targetTypeDesc = _typeScope.GetTypeDesc(targetType); 1585TypeDesc targetTypeDesc = _typeScope.GetTypeDesc(targetType); 1616TypeDesc targetTypeDesc = _typeScope.GetTypeDesc(targetType); 1631TypeDesc targetTypeDesc = _typeScope.GetTypeDesc(targetType); 1691TypeDesc targetTypeDesc = _typeScope.GetTypeDesc(targetType); 1724TypeDesc arrayElementTypeDesc = _typeScope.GetTypeDesc(arrayElementType); 1875TypeDesc targetTypeDesc = _typeScope.GetTypeDesc(targetType); 1935TypeDesc targetTypeDesc = _typeScope.GetTypeDesc(targetType); 2133private object GetDefaultValue(TypeDesc fieldTypeDesc, Type t, XmlAttributes a) 2154private static XmlArrayItemAttribute CreateArrayItemAttribute(TypeDesc typeDesc, int nestingLevel) 2161private static XmlArrayAttribute CreateArrayAttribute(TypeDesc typeDesc) 2167private static XmlElementAttribute CreateElementAttribute(TypeDesc typeDesc) 2218private static void CheckNullable(bool isNullable, TypeDesc typeDesc, TypeMapping mapping) 2250TypeDesc typeDesc = new TypeScope().GetTypeDesc(type);
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSchemaImporter.cs (12)
602TypeDesc baseTypeDesc = null; 716TypeDesc baseTypeDesc = Scope.GetTypeDesc(baseType); 918TypeDesc[] typeDescs = new TypeDesc[uniqueTypeDescs.Count]; 926member.TypeDesc = TypeDesc.FindCommonBaseTypeDesc(typeDescs); 1653TypeDesc xmlnsTypeDesc = Scope.GetTypeDesc(typeof(XmlSerializerNamespaces)); 1839TypeDesc sourceTypeDesc = Scope.GetTypeDesc((XmlSchemaSimpleType)sourceType); 1929TypeDesc sourceTypeDesc = GetDataTypeSource(dataType, flags); 1940TypeDesc typeDesc = null; 1993private TypeDesc GetDataTypeSource(XmlSchemaSimpleType dataType, TypeFlags flags) 1995TypeDesc typeDesc = null; 2016TypeDesc typeDesc = Scope.GetTypeDesc(name.Name, name.Namespace, flags);
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationGeneratedCode.cs (4)
42private TypeDesc _stringTypeDesc = null; 43private TypeDesc _qnameTypeDesc = null; 67internal TypeDesc StringTypeDesc { get { return _stringTypeDesc; } } 68internal TypeDesc QnameTypeDesc { get { return _qnameTypeDesc; } }
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationILGen.cs (4)
26private TypeDesc _stringTypeDesc = null; 27private TypeDesc _qnameTypeDesc = null; 53internal TypeDesc StringTypeDesc { get { return _stringTypeDesc; } } 54internal TypeDesc QnameTypeDesc { get { return _qnameTypeDesc; } }
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationReader.cs (3)
2194private TypeDesc _td; 2196internal CreateCollectionInfo(string name, TypeDesc td) 2206internal TypeDesc TypeDesc
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriter.cs (26)
817TypeDesc typeDesc = new TypeScope().GetTypeDesc(type); 1689private void WritePrimitiveValue(TypeDesc typeDesc, string source, bool isElement) 1719TypeDesc typeDesc = mapping.TypeDesc; 2543private bool CanOptimizeWriteListSequence(TypeDesc listElementTypeDesc) 2552private void WriteMember(string source, AttributeAccessor attribute, TypeDesc memberTypeDesc, string parent) 2592TypeDesc arrayElementTypeDesc = memberTypeDesc.ArrayElementTypeDesc; 2741TypeDesc typeDesc = attribute.Mapping.TypeDesc; 2747private void WriteMember(string source, string choiceSource, ElementAccessor[] elements, TextAccessor text, ChoiceIdentifierAccessor choice, TypeDesc memberTypeDesc, bool writeAccessors) 2757private void WriteArray(string source, string choiceSource, ElementAccessor[] elements, TextAccessor text, ChoiceIdentifierAccessor choice, TypeDesc arrayTypeDesc) 2797private void WriteArrayItems(ElementAccessor[] elements, TextAccessor text, ChoiceIdentifierAccessor choice, TypeDesc arrayTypeDesc, string arrayName, string choiceName) 2799TypeDesc arrayElementTypeDesc = arrayTypeDesc.ArrayElementTypeDesc; 2908TypeDesc td = elements[0].IsUnbounded ? elements[0].Mapping.TypeDesc.CreateArrayTypeDesc() : elements[0].Mapping.TypeDesc; 2975TypeDesc td = element.IsUnbounded ? element.Mapping.TypeDesc.CreateArrayTypeDesc() : element.Mapping.TypeDesc; 3223TypeDesc td = mapping.TypeDesc.CreateArrayTypeDesc(); 3403TypeDesc td = mapping.TypeDesc; 3488private void WriteChoiceTypeCheck(string source, string fullTypeName, bool useReflection, ChoiceIdentifierAccessor choice, string enumName, TypeDesc typeDesc) 3637private void WriteArrayLocalDecl(string typeName, string variableName, string initValue, TypeDesc arrayTypeDesc) 3836TypeDesc typeDesc = scope.GetTypeDesc(type); 3842private string WriteTypeInfo(TypeScope scope, TypeDesc typeDesc, Type type) 3853TypeDesc elementTypeDesc = typeDesc.ArrayElementTypeDesc; 3893TypeDesc elementTypeDesc = typeDesc.ArrayElementTypeDesc; 3951private void WriteCollectionInfo(string typeVariable, TypeDesc typeDesc, Type type) 4150internal string GetStringForMember(string obj, string memberName, TypeDesc typeDesc) 4155TypeDesc saveTypeDesc = typeDesc; 4196internal string GetStringForArrayMember(string arrayName, string subscript, TypeDesc arrayTypeDesc) 4309internal void WriteArrayLocalDecl(string typeName, string variableName, string initValue, TypeDesc arrayTypeDesc)
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriterILGen.cs (21)
148private void WritePrimitiveValue(TypeDesc typeDesc, SourceInfo source, out Type returnType) 196TypeDesc typeDesc = mapping.TypeDesc; 1199private bool CanOptimizeWriteListSequence(TypeDesc listElementTypeDesc) 1208private void WriteMember(SourceInfo source, AttributeAccessor attribute, TypeDesc memberTypeDesc, string parent) 1259TypeDesc arrayElementTypeDesc = memberTypeDesc.ArrayElementTypeDesc; 1463TypeDesc typeDesc = attribute.Mapping.TypeDesc; 1485private void WriteMember(SourceInfo source, string choiceSource, ElementAccessor[] elements, TextAccessor text, ChoiceIdentifierAccessor choice, TypeDesc memberTypeDesc, bool writeAccessors) 1496private void WriteArray(SourceInfo source, string choiceSource, ElementAccessor[] elements, TextAccessor text, ChoiceIdentifierAccessor choice, TypeDesc arrayTypeDesc) 1556private void WriteArrayItems(ElementAccessor[] elements, TextAccessor text, ChoiceIdentifierAccessor choice, TypeDesc arrayTypeDesc, string arrayName, string choiceName) 1558TypeDesc arrayElementTypeDesc = arrayTypeDesc.ArrayElementTypeDesc; 1653TypeDesc td = elements[0].IsUnbounded ? elements[0].Mapping.TypeDesc.CreateArrayTypeDesc() : elements[0].Mapping.TypeDesc; 1720TypeDesc td = element.IsUnbounded ? element.Mapping.TypeDesc.CreateArrayTypeDesc() : element.Mapping.TypeDesc; 2138TypeDesc td = mapping.TypeDesc; 2281private void WriteChoiceTypeCheck(SourceInfo source, string fullTypeName, ChoiceIdentifierAccessor choice, string enumName, TypeDesc typeDesc) 2356private void WriteArrayLocalDecl(string typeName, string variableName, SourceInfo initValue, TypeDesc arrayTypeDesc) 2448TypeDesc typeDesc = scope.GetTypeDesc(type); 2465internal string GetStringForMember(string obj, string memberName, TypeDesc typeDesc) 2469internal SourceInfo GetSourceForMember(string obj, MemberMapping member, TypeDesc typeDesc, CodeGenerator ilg) 2473internal SourceInfo GetSourceForMember(string obj, MemberMapping member, MemberInfo memberInfo, TypeDesc typeDesc, CodeGenerator ilg) 2496internal string GetStringForArrayMember(string arrayName, string subscript, TypeDesc arrayTypeDesc) 2644internal void WriteArrayLocalDecl(string typeName, string variableName, SourceInfo initValue, TypeDesc arrayTypeDesc)
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializer.cs (4)
511TypeDesc typeDesc = (TypeDesc)TypeScope.PrimtiveTypes[_primitiveType]; 762TypeDesc typeDesc = (TypeDesc)TypeScope.PrimtiveTypes[type];