143 references to Type
System.Xml (143)
System\Xml\Serialization\SoapReflectionImporter.cs (3)
216SoapAttributes baseAttributes = GetAttributes(baseTypeDesc.Type); 224baseMapping = ImportTypeMapping(modelScope.GetTypeModel(baseTypeDesc.Type), dataType, limiter); 225return CreateNullableMapping(baseMapping, model.TypeDesc.Type);
System\Xml\Serialization\SourceInfo.cs (1)
51return new SourceInfo("((" + td.CSharpName + ")" + Source + ")", Arg, MemberInfo, td.Type, ILG);
System\Xml\Serialization\Types.cs (3)
679if (typeDesc.Type != null) 680return typeDesc.Type; 1016if (ShouldBeReplaced(pair.Value, structMapping.TypeDesc.Type, out replacedInfo))
System\Xml\Serialization\XmlMembersMapping.cs (2)
27if (mapping.Members[i].TypeDesc.Type != null) { 28key.Append(GenerateKey(mapping.Members[i].TypeDesc.Type, null, null));
System\Xml\Serialization\XmlReflectionImporter.cs (2)
394baseMapping = ImportTypeMapping(modelScope.GetTypeModel(model.TypeDesc.BaseTypeDesc.Type), ns, context, dataType, null, repeats, openModel, limiter); 395return CreateNullableMapping(baseMapping, model.TypeDesc.Type);
System\Xml\Serialization\XmlSchemaExporter.cs (1)
828System.Reflection.MethodInfo format = formatter.GetMethod("ToString", new Type[] { pm.TypeDesc.Type });
System\Xml\Serialization\XmlSerializationGeneratedCode.cs (1)
345Type type = xmlMappings[i].Accessor.Mapping.TypeDesc.Type;
System\Xml\Serialization\XmlSerializationILGen.cs (1)
430Type type = xmlMappings[i].Accessor.Mapping.TypeDesc.Type;
System\Xml\Serialization\XmlSerializationReader.cs (3)
3080if (structMapping.TypeDesc.Type != null && typeof(XmlSchemaObject).IsAssignableFrom(structMapping.TypeDesc.Type)) { 4299if (element.Mapping.TypeDesc.Type == typeof(TimeSpan) && LocalAppContextSwitches.EnableTimeSpanSerialization)
System\Xml\Serialization\XmlSerializationReaderILGen.cs (66)
636RaCodeGen.ILGenForCreateInstance(ilg, mappings[i].TypeDesc.Type, false, false); 637ilg.ConvertValue(mappings[i].TypeDesc.Type, typeof(object)); 709mapping.TypeDesc.Type, 1022ilg.Ldc(Enum.ToObject(mapping.TypeDesc.Type, constants[i].Value)); 1023ilg.ConvertValue(mapping.TypeDesc.Type, typeof(long)); 1056returnType = mapping.TypeDesc.Type; 1123retValues.Add(Enum.ToObject(mapping.TypeDesc.Type, c.Value)); 1147ilg.Ldc(mapping.TypeDesc.Type); 1184derived.TypeDesc.Type, 1230mapping.TypeDesc.Type, 1285LocalBuilder aLoc = ilg.DeclareLocal(mapping.TypeDesc.Type, aVar); 1287RaCodeGen.ILGenForCreateInstance(ilg, td.Type, false, false); 1309nullableMapping.TypeDesc.Type, 1315LocalBuilder oLoc = ilg.DeclareLocal(nullableMapping.TypeDesc.Type, "o"); 1318ilg.InitObj(nullableMapping.TypeDesc.Type); 1367structMapping.TypeDesc.Type, 1543if (structMapping.TypeDesc.Type != null && typeof(XmlSchemaObject).IsAssignableFrom(structMapping.TypeDesc.Type)) { 1721ilg.Ldloc(structMapping.TypeDesc.Type, "o"); 1946ConstructorInfo ctor = xmlnsMember.Mapping.TypeDesc.Type.GetConstructor( 1953WriteSourceEnd(xmlnsMember.Source, xmlnsMember.Mapping.TypeDesc.Type); 1958MethodInfo Add = xmlnsMember.Mapping.TypeDesc.Type.GetMethod( 1972ILGenLoad(xmlnsMember.ArraySource, xmlnsMember.Mapping.TypeDesc.Type); 2101WriteSourceEnd(member.ArraySource, member.Mapping.TypeDesc.IsArrayLike ? member.Mapping.TypeDesc.ArrayElementTypeDesc.Type : member.Mapping.TypeDesc.Type); 2117WriteSourceEnd(member.ArraySource, member.Mapping.TypeDesc.IsArrayLike ? member.Mapping.TypeDesc.ArrayElementTypeDesc.Type : member.Mapping.TypeDesc.Type); 2163WriteSourceEnd(attributeSource, member.Mapping.TypeDesc.ArrayElementTypeDesc.Type); 2169WriteSourceEnd(member.ArraySource, member.Mapping.TypeDesc.IsArrayLike ? member.Mapping.TypeDesc.ArrayElementTypeDesc.Type : member.Mapping.TypeDesc.Type); 2208WriteCreateInstance(a, typeDesc.CannotNew, typeDesc.Type); 2211WriteSourceEnd(member.Source, typeDesc.Type); 2234RaCodeGen.ILGenForCreateInstance(ilg, member.Mapping.TypeDesc.Type, typeDesc.CannotNew, true); 2235WriteSourceEnd(member.Source, member.Mapping.TypeDesc.Type); 2239WriteLocalDecl(a, new SourceInfo(member.Source, member.Source, member.Mapping.MemberInfo, member.Mapping.TypeDesc.Type, ilg)); 2413WriteSourceEnd(member.ArraySource, special.TypeDesc.Type); 2475WriteSourceEnd(member.ArraySource, text.Mapping.TypeDesc.Type); 2680ilg.Ldc(typeDesc.ArrayElementTypeDesc.Type); 2683ilg.ConvertValue(XmlSerializationReader_ShrinkArray.ReturnType, typeDesc.Type); 2684WriteSourceEnd(member.Source, typeDesc.Type); 2694ilg.Ldc(member.Mapping.ChoiceIdentifier.Mapping.TypeDesc.Type); 2697ilg.ConvertValue(XmlSerializationReader_ShrinkArray.ReturnType, member.Mapping.ChoiceIdentifier.Mapping.TypeDesc.Type.MakeArrayType()); 2698WriteSourceEnd(member.ChoiceSource, member.Mapping.ChoiceIdentifier.Mapping.TypeDesc.Type.MakeArrayType()); 3005element.Mapping.TypeDesc.Type, 3009WriteSourceEnd(source, element.Mapping.TypeDesc.Type); 3031WriteSourceEnd(source, element.Mapping.TypeDesc.Type); 3071if (LocalAppContextSwitches.EnableTimeSpanSerialization && element.Mapping.TypeDesc.Type == typeof(TimeSpan)) 3110WriteSourceEnd(source, element.Mapping.TypeDesc.Type); 3114WriteSourceEnd(source, element.Mapping.TypeDesc.Type); 3144WriteSourceEnd(source, element.Mapping.TypeDesc.Type); 3193mapping.TypeDesc.Type, 3197WriteSourceEnd(source, mapping.TypeDesc.Type); 3220ilg.Castclass(special.TypeDesc.Type); 3221WriteSourceEnd(source, special.TypeDesc.Type); 3262RaCodeGen.ILGenForCreateInstance(ilg, sm.TypeDesc.Type, sm.TypeDesc.CannotNew, false); 3270ilg.ConvertValue(typeof(IXmlSerializable), sm.TypeDesc.Type); 3271WriteSourceEnd(source, sm.TypeDesc.Type); 3292RaCodeGen.ILGenForEnumMember(ilg, choice.Mapping.TypeDesc.Type, choice.MemberIds[elementIndex]); 3293WriteSourceEnd(choiceSource, choice.Mapping.TypeDesc.Type); 3328RaCodeGen.ILGenForCreateInstance(ilg, derived.TypeDesc.Type, derived.TypeDesc.CannotNew, false); 3336ilg.ConvertValue(typeof(IXmlSerializable), head.TypeDesc.Type); 3337WriteSourceEnd(source, head.TypeDesc.Type); 3488mapping.TypeDesc.Type, 3494RaCodeGen.ILGenForCreateInstance(ilg, mapping.TypeDesc.Type, mapping.TypeDesc.CannotNew, true); 3543ilg.Ldc(typeDesc.Type); 3583RaCodeGen.WriteArrayLocalDecl(typeName, variableName, new SourceInfo(initValue, initValue, null, arrayTypeDesc.Type, ilg), arrayTypeDesc);
System\Xml\Serialization\XmlSerializationWriter.cs (3)
1814if (!mapping.IsSoap && !mapping.TypeDesc.IsValueType && !mapping.TypeDesc.Type.IsPrimitive) { 2085if (mapping.TypeDesc.Type != null && typeof(XmlSchemaObject).IsAssignableFrom(mapping.TypeDesc.Type)) {
System\Xml\Serialization\XmlSerializationWriterILGen.cs (57)
97source.Load(mapping.TypeDesc.Type); 98argTypes.Add(mapping.TypeDesc.Type); 128new Type[] { mapping.TypeDesc.Type }); 130source.Load(mapping.TypeDesc.Type); 137source.Load(typeDesc.Type); 138returnType = typeDesc.Type; 142Type argType = typeDesc.Type; 150source.Load(typeDesc.Type); 165new Type[] { typeDesc.Type }, 168source.Load(typeDesc.Type); 185source.Load(mapping.TypeDesc.Type); 200ilg.Ldc(Enum.Parse(mapping.TypeDesc.Type, enumDefaultValue, false)); 532if (!mapping.TypeDesc.IsValueType && !mapping.TypeDesc.Type.IsPrimitive) { 558argTypes.Add(mapping.TypeDesc.Type); 579LocalBuilder localTmp = ilg.DeclareLocal(mapping.TypeDesc.Type, "localTmp"); 587ilg.Ldc(Enum.ToObject(mapping.TypeDesc.Type, c.Value)); 675ilg.ConvertValue(mapping.TypeDesc.Type, typeof(Int64)); 695WriteTypeCompare("t", derived.TypeDesc.Type); 714ilg.ConvertValue(oType, derived.TypeDesc.Type); 715argTypes.Add(derived.TypeDesc.Type); 740WriteTypeCompare("t", mapping.TypeDesc.Type); 784new Type[] { mapping.TypeDesc.Type } 798ilg.ConvertValue(ilg.GetVariableType(oVar), mapping.TypeDesc.Type); 818WriteArrayTypeCompare("t", mapping.TypeDesc.Type); 820WriteTypeCompare("t", mapping.TypeDesc.Type); 885argTypes.Add(mapping.TypeDesc.Type); 935WriteTypeCompare("t", mapping.TypeDesc.Type); 976if (mapping.TypeDesc.Type != null && typeof(XmlSchemaObject).IsAssignableFrom(mapping.TypeDesc.Type)) { 1119ilg.Ldloc(memberTypeDesc.Type, aVar); 1173WriteLocalDecl(aiVar, RaCodeGen.GetStringForArrayMember(aVar, iVar, memberTypeDesc), arrayElementTypeDesc.Type); 1228WriteEnumValue((EnumMapping)attribute.Mapping, new SourceInfo(aiVar, aiVar, null, arrayElementTypeDesc.Type, ilg), out argType); 1230WritePrimitiveValue(arrayElementTypeDesc, new SourceInfo(aiVar, aiVar, null, arrayElementTypeDesc.Type, ilg), out argType); 1441MethodInfo getEnumeratorMethod = arrayTypeDesc.Type.GetMethod( 1456Type typeIEnumerable = arrayTypeDesc.IsGenericInterface ? typeof(IEnumerable<>).MakeGenericType(arrayElementTypeDesc.Type) : typeof(IEnumerable); 1465ilg.ConvertValue(arrayTypeDesc.Type, typeIEnumerable); 1478WriteLocalDecl(arrayNamePlusI, "e.Current", arrayElementTypeDesc.Type); 1479WriteElements(new SourceInfo(arrayNamePlusI, null, null, arrayElementTypeDesc.Type, ilg), choiceName + "i", elements, text, choice, arrayNamePlusA, true, true); 1505WriteLocalDecl(arrayNamePlusI, RaCodeGen.GetStringForArrayMember(arrayName, iPlusArrayName, arrayTypeDesc), arrayElementTypeDesc.Type); 1507WriteLocalDecl(choiceName + "i", RaCodeGen.GetStringForArrayMember(choiceName, iPlusArrayName, choice.Mapping.TypeDesc), choice.Mapping.TypeDesc.Type); 1509WriteElements(new SourceInfo(arrayNamePlusI, null, null, arrayElementTypeDesc.Type, ilg), choiceName + "i", elements, text, choice, arrayNamePlusA, true, arrayElementTypeDesc.IsNullable); 1512WriteElements(new SourceInfo(RaCodeGen.GetStringForArrayMember(arrayName, iPlusArrayName, arrayTypeDesc), null, null, arrayElementTypeDesc.Type, ilg), null, elements, text, choice, arrayNamePlusA, true, arrayElementTypeDesc.IsNullable); 1557ILGenLoad(enumSource, choice == null ? null : choice.Mapping.TypeDesc.Type); 1585WriteInstanceOf(source, td.Type); 1631ILGenLoad(enumSource, choice == null ? null : choice.Mapping.TypeDesc.Type); 1754WriteInstanceOf(source, text.Mapping.TypeDesc.Type); 1849if (source.Type == element.Mapping.TypeDesc.Type) { 1850MethodInfo Nullable_get_HasValue = element.Mapping.TypeDesc.Type.GetMethod( 1857source.LoadAddress(element.Mapping.TypeDesc.Type); 1938source.Load(mapping.TypeDesc.Type); 1939argTypes.Add(mapping.TypeDesc.Type); 2094WriteInstanceOf(source, typeDesc.Type); 2181eValue = Enum.ToObject(choiceMapping.TypeDesc.Type, choiceMapping.Constants[i].Value); 2193eValue = Enum.ToObject(choiceMapping.TypeDesc.Type, choiceMapping.Constants[i].Value); 2259return new SourceInfo(GetStringForMember(obj, member.Name, typeDesc), obj, memberInfo, member.TypeDesc.Type, ilg); 2419Type localType = (typeName == arrayTypeDesc.CSharpName) ? arrayTypeDesc.Type : arrayTypeDesc.Type.MakeArrayType();