71 references to TypeDesc
dotnet-svcutil-lib (71)
FrameworkFork\Microsoft.Xml\Xml\Serialization\SoapReflectionImporter.cs (25)
200if (!model.TypeDesc.IsPrimitive) 209if (model.TypeDesc.FullName != td.FullName) 211throw new InvalidOperationException(string.Format(ResXml.XmlDataTypeMismatch, dataType, "SoapElementAttribute.DataType", model.TypeDesc.FullName)); 220switch (model.TypeDesc.Kind) 233if (model.TypeDesc.IsOptionalValue) 235TypeDesc baseTypeDesc = model.TypeDesc.BaseTypeDesc; 240TypeDesc valueTypeDesc = string.IsNullOrEmpty(dataType) ? model.TypeDesc.BaseTypeDesc : _typeScope.GetTypeDesc(dataType, XmlSchema.Namespace); 241string xsdTypeName = string.IsNullOrEmpty(dataType) ? model.TypeDesc.BaseTypeDesc.Name : dataType; 245return CreateNullableMapping(baseMapping, model.TypeDesc.Type); 252throw new NotSupportedException(string.Format(ResXml.XmlUnsupportedSoapTypeKind, model.TypeDesc.FullName)); 327if (model.TypeDesc.Kind == TypeKind.Root) return GetRootMapping(); 334string typeName = XsdTypeName(model.Type, a, model.TypeDesc.Name); 337StructMapping mapping = (StructMapping)GetTypeMapping(typeName, typeNs, model.TypeDesc); 342mapping.TypeDesc = model.TypeDesc; 387if (model.TypeDesc.BaseTypeDesc != null) 429if (model.TypeDesc.IsValueType) 430throw new NotSupportedException(string.Format(ResXml.XmlRpcRefsInValueType, model.TypeDesc.FullName)); 455throw new NotSupportedException(string.Format(ResXml.XmlRpcArrayOfValueTypes, model.TypeDesc.FullName)); 457mapping.TypeDesc = model.TypeDesc; 471if (existingMapping.TypeDesc == model.TypeDesc) 577mapping.TypeDesc = model.TypeDesc; 590string typeName = XsdTypeName(model.Type, a, model.TypeDesc.Name); 593EnumMapping mapping = (EnumMapping)GetTypeMapping(typeName, typeNs, model.TypeDesc); 598mapping.TypeDesc = model.TypeDesc; 612throw new InvalidOperationException(string.Format(ResXml.XmlNoSerializableMembers, model.TypeDesc.FullName));
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlReflectionImporter.cs (46)
278if (root.IsNullableSpecified && !root.IsNullable && model.TypeDesc.IsOptionalValue) 280throw new InvalidOperationException(string.Format(ResXml.XmlInvalidNotNullable, model.TypeDesc.BaseTypeDesc.FullName, "XmlRoot")); 281element.IsNullable = root.IsNullableSpecified ? root.IsNullable : model.TypeDesc.IsNullable || model.TypeDesc.IsOptionalValue; 282CheckNullable(element.IsNullable, model.TypeDesc, element.Mapping); 285element.IsNullable = model.TypeDesc.IsNullable || model.TypeDesc.IsOptionalValue; 394TypeDesc modelTypeDesc = TypeScope.IsOptionalValue(model.Type) ? model.TypeDesc.BaseTypeDesc : model.TypeDesc; 416switch (model.TypeDesc.Kind) 427if (context != ImportContext.Element) throw UnsupportedException(model.TypeDesc, context); 435if (context != ImportContext.Element) throw UnsupportedException(model.TypeDesc, context); 436if (model.TypeDesc.IsOptionalValue) 438TypeDesc valueTypeDesc = string.IsNullOrEmpty(dataType) ? model.TypeDesc.BaseTypeDesc : _typeScope.GetTypeDesc(dataType, XmlSchema.Namespace); 442baseMapping = ImportTypeMapping(_modelScope.GetTypeModel(model.TypeDesc.BaseTypeDesc.Type), ns, context, dataType, null, repeats, openModel, limiter); 443return CreateNullableMapping(baseMapping, model.TypeDesc.Type); 450if (model.TypeDesc.Kind == TypeKind.Serializable) 455throw new InvalidOperationException(string.Format(ResXml.XmlSerializableAttributes, model.TypeDesc.FullName, typeof(XmlSchemaProviderAttribute).Name)); 462if (model.TypeDesc.IsSpecial) 463return ImportSpecialMapping(model.Type, model.TypeDesc, ns, context, limiter); 464throw UnsupportedException(model.TypeDesc, context); 473throw CreateTypeReflectionException(model.TypeDesc.FullName, e); 728if (model.TypeDesc.Kind == TypeKind.Root) return GetRootMapping(); 738string typeName = IsAnonymousType(a, ns) ? null : XsdTypeName(model.Type, a, model.TypeDesc.Name); 741StructMapping mapping = (StructMapping)GetTypeMapping(typeName, typeNs, model.TypeDesc, _types, model.Type); 745mapping.TypeDesc = model.TypeDesc; 796if (model.TypeDesc.BaseTypeDesc != null) 1092mapping.TypeDesc = model.TypeDesc; 1118if (existingMapping.TypeDesc == model.TypeDesc) 1175mapping.TypeDesc = model.TypeDesc; 1191string typeName = IsAnonymousType(a, ns) ? null : XsdTypeName(model.Type, a, model.TypeDesc.Name); 1194EnumMapping mapping = (EnumMapping)GetTypeMapping(typeName, typeNs, model.TypeDesc, _types, model.Type); 1198mapping.TypeDesc = model.TypeDesc; 1203throw new InvalidOperationException(string.Format(ResXml.XmlIllegalAttributeFlagsArray, model.TypeDesc.FullName)); 1218throw new InvalidOperationException(string.Format(ResXml.XmlNoSerializableMembers, model.TypeDesc.FullName)); 1646if (xmlElement.IsNullableSpecified && !xmlElement.IsNullable && typeModel.TypeDesc.IsOptionalValue) 1648throw new InvalidOperationException(string.Format(ResXml.XmlInvalidNotNullable, typeModel.TypeDesc.BaseTypeDesc.FullName, "XmlElement")); 1649element.IsNullable = xmlElement.IsNullableSpecified ? xmlElement.IsNullable : typeModel.TypeDesc.IsOptionalValue; 1694typeModel.TypeDesc.IsMixed = true; 1821if (xmlElement.IsNullableSpecified && !xmlElement.IsNullable && typeModel.TypeDesc.IsOptionalValue) 1823throw new InvalidOperationException(string.Format(ResXml.XmlInvalidNotNullable, typeModel.TypeDesc.BaseTypeDesc.FullName, "XmlElement")); 1824element.IsNullable = xmlElement.IsNullableSpecified ? xmlElement.IsNullable : typeModel.TypeDesc.IsOptionalValue; 1889if (xmlElement.IsNullableSpecified && !xmlElement.IsNullable && typeModel.TypeDesc.IsOptionalValue) 1891throw new InvalidOperationException(string.Format(ResXml.XmlInvalidNotNullable, typeModel.TypeDesc.BaseTypeDesc.FullName, "XmlElement")); 1892element.IsNullable = xmlElement.IsNullableSpecified ? xmlElement.IsNullable : typeModel.TypeDesc.IsOptionalValue; 1939typeModel.TypeDesc.IsMixed = true;