886 references to Globals
System.Runtime.Serialization (886)
System\Runtime\Serialization\Attributes.cs (2)
108
Id =
Globals
.NewObjectId;
109
Ref =
Globals
.NewObjectId;
System\Runtime\Serialization\BitFlagsGenerator.cs (1)
73
LocalBuilder localArray = ilg.DeclareLocal(
Globals
.TypeOfByteArray, "localArray");
System\Runtime\Serialization\ClassDataContract.cs (33)
344
if (!childType.IsEnum && !
Globals
.TypeOfIXmlSerializable.IsAssignableFrom(childType)
345
&& DataContract.GetBuiltInDataContract(childType) == null && childType !=
Globals
.TypeOfDBNull)
370
if (
Globals
.TypeOfIXmlSerializable.IsAssignableFrom(type))
376
if (type.IsDefined(
Globals
.TypeOfCollectionDataContractAttribute, false))
389
if (
Globals
.TypeOfISerializable.IsAssignableFrom(type))
392
if (type.IsDefined(
Globals
.TypeOfDataContractAttribute, false))
395
if (type ==
Globals
.TypeOfExtensionDataObject)
405
type.GetConstructor(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public, null,
Globals
.EmptyTypeArray, null) != null);
692
if (type ==
Globals
.TypeOfDBNull)
704
this.isISerializable = (
Globals
.TypeOfISerializable.IsAssignableFrom(type));
710
if (baseType != null && !(baseType.IsSerializable &&
Globals
.TypeOfISerializable.IsAssignableFrom(baseType)))
714
if (baseType != null && baseType !=
Globals
.TypeOfObject && baseType !=
Globals
.TypeOfValueType && baseType !=
Globals
.TypeOfUri)
730
hasExtensionData = (
Globals
.TypeOfIExtensibleDataObject.IsAssignableFrom(type));
964
if (this.hasExtensionData && memberContract.MemberType ==
Globals
.TypeOfExtensionDataObject
965
&& member.Name ==
Globals
.ExtensionDataObjectPropertyName)
981
object[] optionalFields = field.GetCustomAttributes(
Globals
.TypeOfOptionalFieldAttribute, false);
1118
if (method.Name ==
Globals
.ExtensionDataSetExplicitMethod || !method.IsPublic)
1123
if (IsValidCallback(method, parameters,
Globals
.TypeOfOnSerializingAttribute, onSerializing, ref prevAttributeType))
1125
if (IsValidCallback(method, parameters,
Globals
.TypeOfOnSerializedAttribute, onSerialized, ref prevAttributeType))
1127
if (IsValidCallback(method, parameters,
Globals
.TypeOfOnDeserializingAttribute, onDeserializing, ref prevAttributeType))
1129
if (IsValidCallback(method, parameters,
Globals
.TypeOfOnDeserializedAttribute, onDeserialized, ref prevAttributeType))
1141
if (method.Name ==
Globals
.ExtensionDataSetExplicitMethod || method.Name ==
Globals
.ExtensionDataSetMethod)
1145
if (method.ReturnType !=
Globals
.TypeOfVoid)
1147
if (parameters == null || parameters.Length != 1 || parameters[0].ParameterType !=
Globals
.TypeOfExtensionDataObject)
1148
DataContract.ThrowInvalidDataContractException(SR.GetString(SR.ExtensionDataSetParameterInvalid, DataContract.GetClrTypeFullName(method.DeclaringType), method,
Globals
.TypeOfExtensionDataObject), method.DeclaringType);
1166
if (method.ReturnType !=
Globals
.TypeOfVoid)
1168
if (parameters == null || parameters.Length != 1 || parameters[0].ParameterType !=
Globals
.TypeOfStreamingContext)
1169
DataContract.ThrowInvalidDataContractException(SR.GetString(SR.CallbackParameterInvalid, DataContract.GetClrTypeFullName(method.DeclaringType), method,
Globals
.TypeOfStreamingContext), method.DeclaringType);
1307
ConstructorInfo ctor = UnderlyingType.GetConstructor(
Globals
.ScanAllMembers, null, SerInfoCtorArgs, null);
1324
ConstructorInfo ctor = type.GetConstructor(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public, null,
Globals
.EmptyTypeArray, null);
System\Runtime\Serialization\CodeExporter.cs (134)
379
get { return DataContract.GetStableName(
Globals
.TypeOfListGeneric); }
384
get { return dataContractSet.GetDataContract(
Globals
.TypeOfListGeneric) as CollectionDataContract; }
389
get { return DataContract.GetStableName(
Globals
.TypeOfDictionaryGeneric); }
394
get { return dataContractSet.GetDataContract(
Globals
.TypeOfDictionaryGeneric) as CollectionDataContract; }
429
typeName = GetClrIdentifier(typeName,
Globals
.DefaultTypeName);
480
nestedTypeName = GetClrIdentifier(nestedTypeName,
Globals
.DefaultTypeName);
548
if (
Globals
.TypeOfIXmlSerializable.IsAssignableFrom(type))
563
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(SR.GetString(SR.TypeMustBeIXmlSerializable, DataContract.GetClrTypeFullName(type), DataContract.GetClrTypeFullName(
Globals
.TypeOfIXmlSerializable), dataContract.StableName.Name, dataContract.StableName.Namespace)));
627
(collectionContract.KeyName !=
Globals
.KeyLocalName || collectionContract.ValueName !=
Globals
.ValueLocalName))
642
type =
Globals
.TypeOfDictionaryGeneric;
713
bool enableStructureCheck = (type !=
Globals
.TypeOfNullable);
742
if (type ==
Globals
.TypeOfNullable && !isParamValueType)
803
AddImportStatement(
Globals
.TypeOfSerializableAttribute.Namespace, contractCodeDomInfo.CodeNamespace);
822
CodeAttributeDeclaration dataContractAttribute = new CodeAttributeDeclaration(DataContract.GetClrTypeFullName(
Globals
.TypeOfDataContractAttribute));
823
dataContractAttribute.Arguments.Add(new CodeAttributeArgument(
Globals
.NameProperty, new CodePrimitiveExpression(dataContractName)));
824
dataContractAttribute.Arguments.Add(new CodeAttributeArgument(
Globals
.NamespaceProperty, new CodePrimitiveExpression(classDataContract.StableName.Namespace)));
825
if (classDataContract.IsReference !=
Globals
.DefaultIsReference)
826
dataContractAttribute.Arguments.Add(new CodeAttributeArgument(
Globals
.IsReferenceProperty, new CodePrimitiveExpression(classDataContract.IsReference)));
828
AddImportStatement(
Globals
.TypeOfDataContractAttribute.Namespace, contractCodeDomInfo.CodeNamespace);
838
type.BaseTypes.Add(
Globals
.TypeOfObject);
852
if (!
Globals
.TypeOfIExtensibleDataObject.IsAssignableFrom(actualType))
854
if (!
Globals
.TypeOfIPropertyChange.IsAssignableFrom(actualType))
876
string fieldName = GetMemberName(AppendToValidClrIdentifier(propertyName,
Globals
.DefaultFieldSuffix), contractCodeDomInfo);
887
CodeAttributeDeclaration dataMemberAttribute = new CodeAttributeDeclaration(DataContract.GetClrTypeFullName(
Globals
.TypeOfDataMemberAttribute));
889
dataMemberAttribute.Arguments.Add(new CodeAttributeArgument(
Globals
.NameProperty, new CodePrimitiveExpression(dataMemberName)));
890
if (dataMember.IsRequired !=
Globals
.DefaultIsRequired)
891
dataMemberAttribute.Arguments.Add(new CodeAttributeArgument(
Globals
.IsRequiredProperty, new CodePrimitiveExpression(dataMember.IsRequired)));
892
if (dataMember.EmitDefaultValue !=
Globals
.DefaultEmitDefaultValue)
893
dataMemberAttribute.Arguments.Add(new CodeAttributeArgument(
Globals
.EmitDefaultValueProperty, new CodePrimitiveExpression(dataMember.EmitDefaultValue)));
894
if (dataMember.Order !=
Globals
.DefaultOrder)
895
dataMemberAttribute.Arguments.Add(new CodeAttributeArgument(
Globals
.OrderProperty, new CodePrimitiveExpression(dataMember.Order)));
900
CodeAttributeDeclaration optionalFieldAttribute = new CodeAttributeDeclaration(DataContract.GetClrTypeFullName(
Globals
.TypeOfOptionalFieldAttribute));
1015
CodeAttributeDeclaration knownTypeAttribute = new CodeAttributeDeclaration(DataContract.GetClrTypeFullName(
Globals
.TypeOfKnownTypeAttribute));
1019
AddImportStatement(
Globals
.TypeOfKnownTypeAttribute.Namespace, contractCodeDomInfo.CodeNamespace);
1027
CodeTypeReference nullableOfMemberType = GetCodeTypeReference(
Globals
.TypeOfNullable);
1037
type.BaseTypes.Add(DataContract.GetClrTypeFullName(
Globals
.TypeOfIExtensibleDataObject));
1041
CodeAttributeDeclaration nonSerializedAttribute = new CodeAttributeDeclaration(DataContract.GetClrTypeFullName(
Globals
.TypeOfNonSerializedAttribute));
1086
type.CustomAttributes.Add(new CodeAttributeDeclaration(DataContract.GetClrTypeFullName(
Globals
.TypeOfFlagsAttribute)));
1087
AddImportStatement(
Globals
.TypeOfFlagsAttribute.Namespace, contractCodeDomInfo.CodeNamespace);
1091
CodeAttributeDeclaration dataContractAttribute = new CodeAttributeDeclaration(DataContract.GetClrTypeFullName(
Globals
.TypeOfDataContractAttribute));
1092
dataContractAttribute.Arguments.Add(new CodeAttributeArgument(
Globals
.NameProperty, new CodePrimitiveExpression(dataContractName)));
1093
dataContractAttribute.Arguments.Add(new CodeAttributeArgument(
Globals
.NamespaceProperty, new CodePrimitiveExpression(enumDataContract.StableName.Namespace)));
1095
AddImportStatement(
Globals
.TypeOfDataContractAttribute.Namespace, contractCodeDomInfo.CodeNamespace);
1110
CodeAttributeDeclaration enumMemberAttribute = new CodeAttributeDeclaration(DataContract.GetClrTypeFullName(
Globals
.TypeOfEnumMemberAttribute));
1112
enumMemberAttribute.Arguments.Add(new CodeAttributeArgument(
Globals
.ValueProperty, new CodePrimitiveExpression(stringValue)));
1148
type.BaseTypes.Add(
Globals
.TypeOfObject);
1149
type.BaseTypes.Add(DataContract.GetClrTypeFullName(
Globals
.TypeOfISerializable));
1216
baseTypeReference = GetCodeTypeReference(
Globals
.TypeOfListGeneric);
1221
string expectedTypeName =
Globals
.ArrayPrefix + itemContract.StableName.Name;
1225
expectedTypeName, expectedTypeNs, DataContract.GetClrTypeFullName(
Globals
.TypeOfIListGeneric), DataContract.GetClrTypeFullName(
Globals
.TypeOfICollectionGeneric))));
1232
CodeAttributeDeclaration collectionContractAttribute = new CodeAttributeDeclaration(DataContract.GetClrTypeFullName(
Globals
.TypeOfCollectionDataContractAttribute));
1233
collectionContractAttribute.Arguments.Add(new CodeAttributeArgument(
Globals
.NameProperty, new CodePrimitiveExpression(dataContractName)));
1234
collectionContractAttribute.Arguments.Add(new CodeAttributeArgument(
Globals
.NamespaceProperty, new CodePrimitiveExpression(collectionContract.StableName.Namespace)));
1235
if (collectionContract.IsReference !=
Globals
.DefaultIsReference)
1236
collectionContractAttribute.Arguments.Add(new CodeAttributeArgument(
Globals
.IsReferenceProperty, new CodePrimitiveExpression(collectionContract.IsReference)));
1237
collectionContractAttribute.Arguments.Add(new CodeAttributeArgument(
Globals
.ItemNameProperty, new CodePrimitiveExpression(GetNameForAttribute(collectionContract.ItemName))));
1240
collectionContractAttribute.Arguments.Add(new CodeAttributeArgument(
Globals
.KeyNameProperty, new CodePrimitiveExpression(GetNameForAttribute(collectionContract.KeyName))));
1241
collectionContractAttribute.Arguments.Add(new CodeAttributeArgument(
Globals
.ValueNameProperty, new CodePrimitiveExpression(GetNameForAttribute(collectionContract.ValueName))));
1244
AddImportStatement(
Globals
.TypeOfCollectionDataContractAttribute.Namespace, contractCodeDomInfo.CodeNamespace);
1262
type.BaseTypes.Add(
Globals
.TypeOfObject);
1266
type.BaseTypes.Add(DataContract.GetClrTypeFullName(
Globals
.TypeOfIXmlSerializable));
1276
DataContract.GetClrTypeFullName(
Globals
.TypeOfXmlSchemaProviderAttribute),
1278
new CodeAttributeArgument(
Globals
.IsAnyProperty, new CodePrimitiveExpression(true)))
1284
DataContract.GetClrTypeFullName(
Globals
.TypeOfXmlSchemaProviderAttribute),
1285
new CodeAttributeArgument(new CodePrimitiveExpression(
Globals
.ExportSchemaMethod)))
1288
CodeMemberField typeNameField = new CodeMemberField(
Globals
.TypeOfXmlQualifiedName, typeNameFieldName);
1293
typeNameField.InitExpression = new CodeObjectCreateExpression(
Globals
.TypeOfXmlQualifiedName, new CodePrimitiveExpression(typeName.Name), new CodePrimitiveExpression(typeName.Namespace));
1303
CodeAttributeDeclaration xmlRootAttribute = new CodeAttributeDeclaration(DataContract.GetClrTypeFullName(
Globals
.TypeOfXmlRootAttribute));
1344
CodeAttributeDeclaration namespaceAttribute = new CodeAttributeDeclaration(DataContract.GetClrTypeFullName(
Globals
.TypeOfContractNamespaceAttribute));
1346
namespaceAttribute.Arguments.Add(new CodeAttributeArgument(
Globals
.ClrNamespaceProperty, new CodePrimitiveExpression(clrNamespace)));
1355
memberName = GetClrIdentifier(memberName,
Globals
.DefaultGeneratedMember);
1358
memberName = AppendToValidClrIdentifier(memberName,
Globals
.DefaultMemberSuffix);
1448
uniqueNamespace = ((clrNamespace.Length == 0) ?
Globals
.DefaultClrNamespace : clrNamespace) + i.ToString(NumberFormatInfo.InvariantInfo);
1501
if (uriString.StartsWith(
Globals
.DataContractXsdBaseNamespace, StringComparison.Ordinal))
1502
AddToNamespace(builder, uriString.Substring(
Globals
.DataContractXsdBaseNamespace.Length), fragments);
1630
get { return new CodeParameterDeclarationExpression(GetCodeTypeReference(
Globals
.TypeOfSerializationInfo),
Globals
.SerializationInfoFieldName); }
1635
get { return new CodeParameterDeclarationExpression(GetCodeTypeReference(
Globals
.TypeOfStreamingContext),
Globals
.ContextFieldName); }
1640
get { return new CodeAttributeDeclaration(GetCodeTypeReference(
Globals
.TypeOfSerializableAttribute)); }
1647
return CreateProperty(GetCodeTypeReference(
Globals
.TypeOfXmlNodeArray),
Globals
.NodeArrayPropertyName,
Globals
.NodeArrayFieldName, false/*isValueType*/);
1656
nodeArrayField.Type = GetCodeTypeReference(
Globals
.TypeOfXmlNodeArray);
1657
nodeArrayField.Name =
Globals
.NodeArrayFieldName;
1671
readXmlMethod.ImplementationTypes.Add(
Globals
.TypeOfIXmlSerializable);
1673
setNode.Left = new CodeFieldReferenceExpression(ThisReference,
Globals
.NodeArrayFieldName);
1675
new CodeTypeReferenceExpression(GetCodeTypeReference(
Globals
.TypeOfXmlSerializableServices)),
1692
writeXmlMethod.ImplementationTypes.Add(
Globals
.TypeOfIXmlSerializable);
1695
new CodeTypeReferenceExpression(GetCodeTypeReference(
Globals
.TypeOfXmlSerializableServices)),
1698
new CodePropertyReferenceExpression(ThisReference,
Globals
.NodeArrayPropertyName)
1712
getSchemaMethod.ImplementationTypes.Add(
Globals
.TypeOfIXmlSerializable);
1724
getSchemaStaticMethod.Name =
Globals
.ExportSchemaMethod;
1725
getSchemaStaticMethod.ReturnType = GetCodeTypeReference(
Globals
.TypeOfXmlQualifiedName);
1726
CodeParameterDeclarationExpression paramDeclaration = new CodeParameterDeclarationExpression(
Globals
.TypeOfXmlSchemaSet, "schemas");
1755
setObjectData.Left = new CodePropertyReferenceExpression(ThisReference,
Globals
.SerializationInfoFieldName);
1756
setObjectData.Right = new CodeArgumentReferenceExpression(
Globals
.SerializationInfoFieldName);
1775
derivedConstructor.BaseConstructorArgs.Add(new CodeVariableReferenceExpression(
Globals
.SerializationInfoFieldName));
1776
derivedConstructor.BaseConstructorArgs.Add(new CodeVariableReferenceExpression(
Globals
.ContextFieldName));
1786
serializationInfoField.Type = GetCodeTypeReference(
Globals
.TypeOfSerializationInfo);
1787
serializationInfoField.Name =
Globals
.SerializationInfoFieldName;
1797
return CreateProperty(GetCodeTypeReference(
Globals
.TypeOfSerializationInfo),
Globals
.SerializationInfoPropertyName,
Globals
.SerializationInfoFieldName, false/*isValueType*/);
1806
getObjectDataMethod.Name =
Globals
.GetObjectDataMethodName;
1810
getObjectDataMethod.ImplementationTypes.Add(
Globals
.TypeOfISerializable);
1815
new CodePropertyReferenceExpression(ThisReference,
Globals
.SerializationInfoPropertyName),
1822
getEnumerator.Type = GetCodeTypeReference(
Globals
.TypeOfSerializationInfoEnumerator);
1823
getEnumerator.Name =
Globals
.EnumeratorFieldName;
1825
new CodePropertyReferenceExpression(ThisReference,
Globals
.SerializationInfoPropertyName),
1826
Globals
.GetEnumeratorMethodName);
1830
getCurrent.Type = GetCodeTypeReference(
Globals
.TypeOfSerializationEntry);
1831
getCurrent.Name =
Globals
.SerializationEntryFieldName;
1833
new CodeVariableReferenceExpression(
Globals
.EnumeratorFieldName),
1834
Globals
.CurrentPropertyName);
1839
new CodeVariableReferenceExpression(
Globals
.SerializationEntryFieldName),
1840
Globals
.NameProperty);
1842
new CodeVariableReferenceExpression(
Globals
.SerializationEntryFieldName),
1843
Globals
.ValueProperty);
1845
new CodeArgumentReferenceExpression(
Globals
.SerializationInfoFieldName),
1846
Globals
.AddValueMethodName,
1852
new CodeVariableReferenceExpression(
Globals
.EnumeratorFieldName),
1853
Globals
.MoveNextMethodName);
1871
extensionDataObjectField.Type = GetCodeTypeReference(
Globals
.TypeOfExtensionDataObject);
1872
extensionDataObjectField.Name =
Globals
.ExtensionDataObjectFieldName;
1883
extensionDataObjectProperty.Type = GetCodeTypeReference(
Globals
.TypeOfExtensionDataObject);
1884
extensionDataObjectProperty.Name =
Globals
.ExtensionDataObjectPropertyName;
1886
extensionDataObjectProperty.ImplementationTypes.Add(
Globals
.TypeOfIExtensibleDataObject);
1889
propertyGet.Expression = new CodeFieldReferenceExpression(ThisReference,
Globals
.ExtensionDataObjectFieldName);
1893
propertySet.Left = new CodeFieldReferenceExpression(ThisReference,
Globals
.ExtensionDataObjectFieldName);
1927
propertyChangedEvent.ImplementationTypes.Add(
Globals
.TypeOfIPropertyChange);
1962
left = new CodeMethodInvokeExpression(new CodeTypeReferenceExpression(
Globals
.TypeOfObject),
System\Runtime\Serialization\CodeGenerator.cs (6)
114
objectEquals =
Globals
.TypeOfObject.GetMethod("Equals", BindingFlags.Public | BindingFlags.Static);
438
ConvertValue(type,
Globals
.TypeOfObject);
440
ConvertValue(type,
Globals
.TypeOfObject);
711
if (arrayType ==
Globals
.TypeOfArray)
1760
LocalBuilder topValue = DeclareLocal(
Globals
.TypeOfString, "topValue");
1771
if (type !=
Globals
.TypeOfString)
System\Runtime\Serialization\CollectionDataContract.cs (61)
512
Globals
.TypeOfIDictionaryGeneric,
513
Globals
.TypeOfIDictionary,
514
Globals
.TypeOfIListGeneric,
515
Globals
.TypeOfICollectionGeneric,
516
Globals
.TypeOfIList,
517
Globals
.TypeOfIEnumerableGeneric,
518
Globals
.TypeOfICollection,
519
Globals
.TypeOfIEnumerable
570
this.keyName = keyName ??
Globals
.KeyLocalName;
571
this.valueName = valueName ??
Globals
.ValueLocalName;
590
if (type ==
Globals
.TypeOfArray)
591
type =
Globals
.TypeOfObjectArray;
604
this.StableName = CreateQualifiedName(
Globals
.ArrayPrefix + itemContract.StableName.Name, itemContract.StableName.Namespace);
821
if (type.IsDefined(
Globals
.TypeOfCollectionDataContractAttribute, false))
827
if (type.IsSerializable || type.IsDefined(
Globals
.TypeOfDataContractAttribute, false))
909
itemType =
Globals
.TypeOfObject;
921
bool isBaseTypeCollection = (baseType != null && baseType !=
Globals
.TypeOfObject
922
&& baseType !=
Globals
.TypeOfValueType && baseType !=
Globals
.TypeOfUri) ? IsCollection(baseType) : false;
927
if (type.IsDefined(
Globals
.TypeOfDataContractAttribute, false))
933
if (
Globals
.TypeOfIXmlSerializable.IsAssignableFrom(type) || IsArraySegment(type))
938
if (!
Globals
.TypeOfIEnumerable.IsAssignableFrom(type))
955
if (interfaceTypeToCheck ==
Globals
.TypeOfIDictionaryGeneric)
957
itemType =
Globals
.TypeOfKeyValue.MakeGenericType(genericArgs);
958
addMethod = type.GetMethod(
Globals
.AddMethodName);
959
getEnumeratorMethod =
Globals
.TypeOfIEnumerableGeneric.MakeGenericType(
Globals
.TypeOfKeyValuePair.MakeGenericType(genericArgs)).GetMethod(
Globals
.GetEnumeratorMethodName);
964
if (interfaceTypeToCheck ==
Globals
.TypeOfICollectionGeneric || interfaceTypeToCheck ==
Globals
.TypeOfIListGeneric)
966
addMethod =
Globals
.TypeOfICollectionGeneric.MakeGenericType(itemType).GetMethod(
Globals
.AddMethodName);
968
getEnumeratorMethod =
Globals
.TypeOfIEnumerableGeneric.MakeGenericType(itemType).GetMethod(
Globals
.GetEnumeratorMethodName);
973
if (interfaceTypeToCheck ==
Globals
.TypeOfIDictionary)
976
addMethod = type.GetMethod(
Globals
.AddMethodName);
980
itemType =
Globals
.TypeOfObject;
981
if (interfaceTypeToCheck ==
Globals
.TypeOfIList)
983
addMethod =
Globals
.TypeOfIList.GetMethod(
Globals
.AddMethodName);
986
getEnumeratorMethod =
Globals
.TypeOfIEnumerable.GetMethod(
Globals
.GetEnumeratorMethodName);
997
defaultCtor = type.GetConstructor(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, null,
Globals
.EmptyTypeArray, null);
1051
knownInterfaceType =
Globals
.TypeOfIEnumerable;
1052
itemType = knownInterfaceType.IsGenericType ? knownInterfaceType.GetGenericArguments()[0] :
Globals
.TypeOfObject;
1094
itemType = isOpenGeneric ?
Globals
.TypeOfKeyValue :
Globals
.TypeOfKeyValue.MakeGenericType(addMethodTypeArray);
1097
addMethodTypeArray = new Type[] {
Globals
.TypeOfObject,
Globals
.TypeOfObject };
1098
itemType =
Globals
.TypeOfKeyValue.MakeGenericType(addMethodTypeArray);
1106
itemType =
Globals
.TypeOfObject;
1127
return type.IsDefined(
Globals
.TypeOfCollectionDataContractAttribute, false);
1165
if (mapping.InterfaceMethods[i].Name ==
Globals
.AddMethodName)
1167
else if (mapping.InterfaceMethods[i].Name ==
Globals
.GetEnumeratorMethodName)
1178
addMethod = type.GetMethod(
Globals
.AddMethodName, BindingFlags.Instance | BindingFlags.Public, null, addMethodTypeArray, null);
1202
addMethod = type.GetMethod(
Globals
.AddMethodName, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, null, addMethodTypeArray, null);
1207
getEnumeratorMethod = type.GetMethod(
Globals
.GetEnumeratorMethodName, BindingFlags.Instance | BindingFlags.Public, null,
Globals
.EmptyTypeArray, null);
1208
if (getEnumeratorMethod == null || !
Globals
.TypeOfIEnumerator.IsAssignableFrom(getEnumeratorMethod.ReturnType))
1212
ienumerableInterface =
Globals
.TypeOfIEnumerable;
1213
getEnumeratorMethod = GetTargetMethodWithName(
Globals
.GetEnumeratorMethodName, type, ienumerableInterface);
System\Runtime\Serialization\Configuration\DeclaredTypeValidator.cs (2)
22
if (type.StartsWith(
Globals
.TypeOfObject.FullName, StringComparison.Ordinal))
25
if (t != null &&
Globals
.TypeOfObject.Equals(t))
System\Runtime\Serialization\DataContract.cs (54)
356
writer.WriteStartElement(
Globals
.SerPrefix, name, ns);
585
else if (
Globals
.TypeOfIXmlSerializable.IsAssignableFrom(type))
592
type =
Globals
.TypeOfReflectionPointer;
596
if (type.IsSerializable || type.IsDefined(
Globals
.TypeOfDataContractAttribute, false) || ClassDataContract.IsNonAttributedTypeValidForSerialization(type))
652
if (type ==
Globals
.TypeOfDateTimeOffset)
654
return
Globals
.TypeOfDateTimeOffsetAdapter;
663
if (type ==
Globals
.TypeOfDateTimeOffsetAdapter)
665
return
Globals
.TypeOfDateTimeOffset;
672
if (
Globals
.TypeOfDateTimeOffset.TypeHandle.Equals(typeHandle))
674
return
Globals
.TypeOfDateTimeOffsetAdapter.TypeHandle;
683
type =
Globals
.TypeOfObject;
990
else if (ns ==
Globals
.DataContractXmlNamespace)
1043
clrTypeStrings.Add(
Globals
.TypeOfInt.Assembly.FullName, clrTypeStringsDictionary.Add(
Globals
.MscorlibAssemblyName));
1142
if (classType.IsSerializable || classType.IsDefined(
Globals
.TypeOfDataContractAttribute, false))
1233
MethodInfo method = UnderlyingType.GetMethod(
Globals
.ParseMethodName, BindingFlags.Public | BindingFlags.Static, null, new Type[] {
Globals
.TypeOfString }, null);
1249
writer.WriteStartElement(
Globals
.SerPrefix, name, ns);
1284
type.IsDefined(
Globals
.TypeOfDataContractAttribute, false) ||
1287
Globals
.TypeOfIXmlSerializable.IsAssignableFrom(type))
1345
while (type.IsGenericType && type.GetGenericTypeDefinition() ==
Globals
.TypeOfNullable)
1355
while (type.IsGenericType && type.GetGenericTypeDefinition() ==
Globals
.TypeOfNullable)
1512
else if (
Globals
.TypeOfIXmlSerializable.IsAssignableFrom(type))
1537
object[] dataContractAttributes = type.GetCustomAttributes(
Globals
.TypeOfDataContractAttribute, false);
1558
object[] collectionContractAttributes = type.GetCustomAttributes(
Globals
.TypeOfCollectionDataContractAttribute, false);
1591
string arrayOfPrefix =
Globals
.ArrayPrefix + GetArrayPrefix(ref itemType);
1607
arrayOfPrefix +=
Globals
.ArrayPrefix;
1618
GenericInfo genericInfo = new GenericInfo(DataContract.GetStableName(
Globals
.TypeOfNullable),
Globals
.TypeOfNullable.FullName);
1626
string name =
Globals
.ArrayPrefix + itemName.Name;
1632
return IsBuiltInNamespace(elementNs) ?
Globals
.CollectionsNamespace : elementNs;
1746
return (ns ==
Globals
.SchemaNamespace || ns ==
Globals
.SerializationNamespace);
1764
return new Uri(
Globals
.DataContractXsdBaseNamespaceUri, clrNs).AbsoluteUri;
1780
if (uri.ToString() ==
Globals
.SerializationNamespace)
1781
ThrowInvalidDataContractException(SR.GetString(SR.DataContractNamespaceReserved,
Globals
.SerializationNamespace), type);
1823
GetClrTypeFullNameUsingTypeForwardedFromAttribute(type.GetElementType()),
Globals
.OpenBracket,
Globals
.CloseBracket);
1834
StringBuilder builder = new StringBuilder(type.GetGenericTypeDefinition().FullName).Append(
Globals
.OpenBracket);
1839
builder.Append(
Globals
.OpenBracket).Append(GetClrTypeFullNameUsingTypeForwardedFromAttribute(genericArgument)).Append(
Globals
.Comma);
1840
builder.Append(
Globals
.Space).Append(GetClrAssemblyName(genericArgument, out hasTypeForwardedFrom));
1841
builder.Append(
Globals
.CloseBracket).Append(
Globals
.Comma);
1845
return builder.Remove(builder.Length - 1, 1).Append(
Globals
.CloseBracket).ToString();
1912
return uriString.StartsWith(
Globals
.DataContractXsdBaseNamespace, StringComparison.Ordinal) ? uriString.Substring(
Globals
.DataContractXsdBaseNamespace.Length) : uriString;
2021
type.GetGenericTypeDefinition() ==
Globals
.TypeOfNullable);
2067
object[] knownTypeAttributes = type.GetCustomAttributes(
Globals
.TypeOfKnownTypeAttribute, false);
2101
MethodInfo method = type.GetMethod(methodName, BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public, null,
Globals
.EmptyTypeArray, null);
2105
if (!
Globals
.TypeOfTypeEnumerable.IsAssignableFrom(method.ReturnType))
2108
object types = method.Invoke(null,
Globals
.EmptyObjectArray);
2437
if (Regex.IsMatch(internalsVisibleAttributeAssemblyName,
Globals
.SimpleSRSInternalsVisiblePattern) ||
2438
Regex.IsMatch(internalsVisibleAttributeAssemblyName,
Globals
.FullSRSInternalsVisiblePattern))
System\Runtime\Serialization\DataContractSerializer.cs (2)
201
knownTypeCollection = new ReadOnlyCollection<Type>(
Globals
.EmptyTypeArray);
515
objType =
Globals
.TypeOfObject;
System\Runtime\Serialization\DataContractSet.cs (6)
359
referencedTypesDictionary.Add(DataContract.GetStableName(
Globals
.TypeOfNullable),
Globals
.TypeOfNullable);
388
XmlQualifiedName genericDictionaryName = DataContract.GetStableName(
Globals
.TypeOfDictionaryGeneric);
390
AddReferencedType(referencedCollectionTypesDictionary,
Globals
.TypeOfDictionaryGeneric);
505
type.IsDefined(
Globals
.TypeOfDataContractAttribute, false) ||
506
(
Globals
.TypeOfIXmlSerializable.IsAssignableFrom(type) && !type.IsGenericTypeDefinition) ||
System\Runtime\Serialization\DataMember.cs (2)
151
this.emitDefaultValue =
Globals
.DefaultEmitDefaultValue;
156
this.emitDefaultValue =
Globals
.DefaultEmitDefaultValue;
System\Runtime\Serialization\DataMemberAttribute.cs (1)
14
bool emitDefaultValue =
Globals
.DefaultEmitDefaultValue;
System\Runtime\Serialization\DictionaryGlobals.cs (13)
89
SchemaInstanceNamespace = dictionary.Add(
Globals
.SchemaInstanceNamespace);
90
SerializationNamespace = dictionary.Add(
Globals
.SerializationNamespace);
91
SchemaNamespace = dictionary.Add(
Globals
.SchemaNamespace);
92
XsiTypeLocalName = dictionary.Add(
Globals
.XsiTypeLocalName);
93
XsiNilLocalName = dictionary.Add(
Globals
.XsiNilLocalName);
96
IdLocalName = dictionary.Add(
Globals
.IdLocalName);
97
RefLocalName = dictionary.Add(
Globals
.RefLocalName);
98
ArraySizeLocalName = dictionary.Add(
Globals
.ArraySizeLocalName);
100
ISerializableFactoryTypeLocalName = dictionary.Add(
Globals
.ISerializableFactoryTypeLocalName);
103
XmlnsNamespace = dictionary.Add(
Globals
.XmlnsNamespace);
133
ClrTypeLocalName = dictionary.Add(
Globals
.ClrTypeLocalName);
134
ClrAssemblyLocalName = dictionary.Add(
Globals
.ClrAssemblyLocalName);
135
Space = dictionary.Add(
Globals
.Space);
System\Runtime\Serialization\EnumDataContract.cs (5)
164
XmlQualifiedName stableName = CreateQualifiedName(localName,
Globals
.SchemaNamespace);
195
IsFlags = type.IsDefined(
Globals
.TypeOfFlagsAttribute, false);
266
isULong = (baseType ==
Globals
.TypeOfULong);
283
object[] memberAttributes = field.GetCustomAttributes(
Globals
.TypeOfEnumMemberAttribute, false);
303
object[] dataMemberAttributes = field.GetCustomAttributes(
Globals
.TypeOfDataMemberAttribute, false);
System\Runtime\Serialization\ExtensionDataObject.cs (24)
99
string id =
Globals
.NewObjectId;
169
get { return (Id !=
Globals
.NewObjectId); }
185
AddQualifiedNameAttribute(element,
Globals
.XsiPrefix,
Globals
.XsiTypeLocalName,
Globals
.SchemaInstanceNamespace, DataContractName, DataContractNamespace);
187
element.AddAttribute(
Globals
.SerPrefix,
Globals
.SerializationNamespace,
Globals
.ClrTypeLocalName, ClrTypeName);
189
element.AddAttribute(
Globals
.SerPrefix,
Globals
.SerializationNamespace,
Globals
.ClrAssemblyLocalName, ClrAssemblyName);
209
if (attribute != null && attribute.prefix ==
Globals
.XmlnsPrefix && attribute.localName == prefix)
217
element.AddAttribute(
Globals
.XmlnsPrefix,
Globals
.XmlnsNamespace, prefix, valueNs);
227
dataType =
Globals
.TypeOfClassDataNode;
252
dataType =
Globals
.TypeOfCollectionDataNode;
283
element.AddAttribute(
Globals
.SerPrefix,
Globals
.SerializationNamespace,
Globals
.ArraySizeLocalName, Size.ToString(NumberFormatInfo.InvariantInfo));
302
dataType =
Globals
.TypeOfXmlDataNode;
340
dataType =
Globals
.TypeOfISerializableDataNode;
366
AddQualifiedNameAttribute(element,
Globals
.SerPrefix,
Globals
.ISerializableFactoryTypeLocalName,
Globals
.SerializationNamespace, FactoryTypeName, FactoryTypeNamespace);
System\Runtime\Serialization\ExtensionDataReader.cs (27)
68
AddPrefix(
Globals
.XsiPrefix,
Globals
.SchemaInstanceNamespace);
69
AddPrefix(
Globals
.SerPrefix,
Globals
.SerializationNamespace);
474
if (dataNodeType ==
Globals
.TypeOfClassDataNode)
476
else if (dataNodeType ==
Globals
.TypeOfCollectionDataNode)
478
else if (dataNodeType ==
Globals
.TypeOfISerializableDataNode)
480
else if (dataNodeType ==
Globals
.TypeOfXmlDataNode)
503
nextElement.AddAttribute(
Globals
.XsiPrefix,
Globals
.SchemaInstanceNamespace,
Globals
.XsiNilLocalName,
Globals
.True);
517
if (node.Id !=
Globals
.NewObjectId && (node.Value == null || !node.IsFinalValue))
528
if (node.Id !=
Globals
.NewObjectId)
536
nextElement.AddAttribute(
Globals
.SerPrefix,
Globals
.SerializationNamespace,
Globals
.RefLocalName, node.Id.ToString(NumberFormatInfo.InvariantInfo));
537
nextElement.AddAttribute(
Globals
.XsiPrefix,
Globals
.SchemaInstanceNamespace,
Globals
.XsiNilLocalName,
Globals
.True);
636
if (type ==
Globals
.TypeOfObject)
639
if (type ==
Globals
.TypeOfObject)
713
if (type ==
Globals
.TypeOfByteArray)
718
else if (type ==
Globals
.TypeOfTimeSpan)
720
else if (type ==
Globals
.TypeOfGuid)
725
else if (type ==
Globals
.TypeOfUri)
System\Runtime\Serialization\Globals.cs (4)
34
idQualifiedName = new XmlQualifiedName(
Globals
.IdLocalName,
Globals
.SerializationNamespace);
47
refQualifiedName = new XmlQualifiedName(
Globals
.RefLocalName,
Globals
.SerializationNamespace);
System\Runtime\Serialization\Json\DataContractJsonSerializer.cs (3)
136
knownTypeCollection = new ReadOnlyCollection<Type>(
Globals
.EmptyTypeArray);
519
if (itemType.IsGenericType && (itemType.GetGenericTypeDefinition() ==
Globals
.TypeOfKeyValue))
521
itemType =
Globals
.TypeOfKeyValuePair.MakeGenericType(itemType.GetGenericArguments());
System\Runtime\Serialization\Json\JsonDataContract.cs (2)
263
traditionalDataContract.UnderlyingType ==
Globals
.TypeOfXmlQualifiedName)
323
DataContract itemDataContract = DataContract.GetDataContract(
Globals
.TypeOfKeyValuePair.MakeGenericType(collectionDataContract.ItemType.GetGenericArguments()));
System\Runtime\Serialization\Json\JsonFormatGeneratorStatics.cs (26)
149
collectionItemNameProperty = typeof(XmlObjectSerializerWriteContextComplexJson).GetProperty("CollectionItemName",
Globals
.ScanAllMembers);
161
extensionDataObjectCtor = typeof(ExtensionDataObject).GetConstructor(
Globals
.ScanAllMembers, null, new Type[] { }, null);
197
getItemContractMethod = typeof(CollectionDataContract).GetProperty("ItemContract",
Globals
.ScanAllMembers).GetGetMethod(true); // nonPublic
209
getJsonDataContractMethod = typeof(JsonDataContract).GetMethod("GetJsonDataContract",
Globals
.ScanAllMembers);
221
getJsonMemberIndexMethod = typeof(XmlObjectSerializerReadContextComplexJson).GetMethod("GetJsonMemberIndex",
Globals
.ScanAllMembers);
233
getRevisedItemContractMethod = typeof(XmlObjectSerializerWriteContextComplexJson).GetMethod("GetRevisedItemContract",
Globals
.ScanAllMembers);
245
getUninitializedObjectMethod = typeof(XmlFormatReaderGenerator).GetMethod("UnsafeGetUninitializedObject",
Globals
.ScanAllMembers, null, new Type[] { typeof(int) }, null);
257
isStartElementMethod0 = typeof(XmlReaderDelegator).GetMethod("IsStartElement",
Globals
.ScanAllMembers, null, new Type[] { }, null);
269
isStartElementMethod2 = typeof(XmlReaderDelegator).GetMethod("IsStartElement",
Globals
.ScanAllMembers, null, new Type[] { typeof(XmlDictionaryString), typeof(XmlDictionaryString) }, null);
281
localNameProperty = typeof(XmlReaderDelegator).GetProperty("LocalName",
Globals
.ScanAllMembers);
293
namespaceProperty = typeof(XmlReaderDelegator).GetProperty("NamespaceProperty",
Globals
.ScanAllMembers);
317
moveToContentMethod = typeof(XmlReaderDelegator).GetMethod("MoveToContent",
Globals
.ScanAllMembers);
329
nodeTypeProperty = typeof(XmlReaderDelegator).GetProperty("NodeType",
Globals
.ScanAllMembers);
353
readJsonValueMethod = typeof(DataContractJsonSerializer).GetMethod("ReadJsonValue",
Globals
.ScanAllMembers);
389
throwDuplicateMemberExceptionMethod = typeof(XmlObjectSerializerReadContextComplexJson).GetMethod("ThrowDuplicateMemberException",
Globals
.ScanAllMembers);
401
throwMissingRequiredMembersMethod = typeof(XmlObjectSerializerReadContextComplexJson).GetMethod("ThrowMissingRequiredMembers",
Globals
.ScanAllMembers);
437
useSimpleDictionaryFormatReadProperty = typeof(XmlObjectSerializerReadContextComplexJson).GetProperty("UseSimpleDictionaryFormat",
Globals
.ScanAllMembers);
449
useSimpleDictionaryFormatWriteProperty = typeof(XmlObjectSerializerWriteContextComplexJson).GetProperty("UseSimpleDictionaryFormat",
Globals
.ScanAllMembers);
461
writeAttributeStringMethod = typeof(XmlWriterDelegator).GetMethod("WriteAttributeString",
Globals
.ScanAllMembers, null, new Type[] { typeof(string), typeof(string), typeof(string), typeof(string) }, null);
473
writeEndElementMethod = typeof(XmlWriterDelegator).GetMethod("WriteEndElement",
Globals
.ScanAllMembers, null, new Type[] { }, null);
485
writeJsonISerializableMethod = typeof(XmlObjectSerializerWriteContextComplexJson).GetMethod("WriteJsonISerializable",
Globals
.ScanAllMembers);
497
writeJsonNameWithMappingMethod = typeof(XmlObjectSerializerWriteContextComplexJson).GetMethod("WriteJsonNameWithMapping",
Globals
.ScanAllMembers);
509
writeJsonValueMethod = typeof(DataContractJsonSerializer).GetMethod("WriteJsonValue",
Globals
.ScanAllMembers);
521
writeStartElementMethod = typeof(XmlWriterDelegator).GetMethod("WriteStartElement",
Globals
.ScanAllMembers, null, new Type[] { typeof(XmlDictionaryString), typeof(XmlDictionaryString) }, null);
534
writeStartElementStringMethod = typeof(XmlWriterDelegator).GetMethod("WriteStartElement",
Globals
.ScanAllMembers, null, new Type[] { typeof(string), typeof(string) }, null);
560
getJsonMemberNameMethod = typeof(XmlObjectSerializerReadContextComplexJson).GetMethod("GetJsonMemberName",
Globals
.ScanAllMembers, null, new Type[] { typeof(XmlReaderDelegator) }, null);
System\Runtime\Serialization\Json\JsonFormatReaderGenerator.cs (44)
148
if (
Globals
.TypeOfIDeserializationCallback.IsAssignableFrom(classContract.UnderlyingType))
158
if (classContract.UnderlyingType ==
Globals
.TypeOfDateTimeOffsetAdapter)
160
ilg.ConvertValue(objectLocal.LocalType,
Globals
.TypeOfDateTimeOffsetAdapter);
162
ilg.ConvertValue(
Globals
.TypeOfDateTimeOffset, ilg.CurrentMethod.ReturnType);
266
type =
Globals
.TypeOfValueType;
270
if (classContract.UnderlyingType ==
Globals
.TypeOfDBNull)
272
ilg.LoadMember(
Globals
.TypeOfDBNull.GetField("Value"));
291
ilg.ConvertValue(
Globals
.TypeOfObject, type);
326
return
Globals
.TypeOfIObjectReference.IsAssignableFrom(classContract.UnderlyingType);
335
ilg.ConvertAddress(objectLocal.LocalType,
Globals
.TypeOfIObjectReference);
336
ilg.Load(
Globals
.NewObjectId);
338
ilg.ConvertValue(
Globals
.TypeOfObject, ilg.CurrentMethod.ReturnType);
348
LocalBuilder extensionDataLocal = ilg.DeclareLocal(
Globals
.TypeOfExtensionDataObject, "extensionData");
376
LocalBuilder memberIndexLocal = ilg.DeclareLocal(
Globals
.TypeOfInt, "memberIndex", -1);
404
ilg.ConvertValue(objectLocal.LocalType,
Globals
.TypeOfObject);
466
LocalBuilder localArray = ilg.DeclareLocal(
Globals
.TypeOfByteArray, name);
507
ConstructorInfo ctor = classContract.UnderlyingType.GetConstructor(
Globals
.ScanAllMembers, null, JsonFormatGeneratorStatics.SerInfoCtorArgs, null);
523
while (type.IsGenericType && type.GetGenericTypeDefinition() ==
Globals
.TypeOfNullable)
530
if ((primitiveContract != null && primitiveContract.UnderlyingType !=
Globals
.TypeOfObject) || nullables != 0 || type.IsValueType)
532
LocalBuilder objectId = ilg.DeclareLocal(
Globals
.TypeOfString, "objectIdRead");
537
ilg.If(objectId, Cmp.EqualTo,
Globals
.NullObjectId);
569
if (primitiveContract != null && primitiveContract.UnderlyingType !=
Globals
.TypeOfObject)
587
ilg.ConvertValue(
Globals
.TypeOfObject, type);
594
ilg.If(objectId, Cmp.NotEqualTo,
Globals
.NullObjectId);
612
Type declaredType = type.IsPointer ?
Globals
.TypeOfReflectionPointer : type;
623
ilg.ConvertValue(
Globals
.TypeOfObject, type);
634
Type type =
Globals
.TypeOfNullable.MakeGenericType(innerType);
652
type =
Globals
.TypeOfDictionaryGeneric.MakeGenericType(itemType.GetGenericArguments());
653
constructor = type.GetConstructor(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, null,
Globals
.EmptyTypeArray, null);
656
type =
Globals
.TypeOfHashtable;
657
constructor = type.GetConstructor(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic, null,
Globals
.EmptyTypeArray, null);
700
LocalBuilder objectId = ilg.DeclareLocal(
Globals
.TypeOfString, "objectIdRead");
718
LocalBuilder i = ilg.DeclareLocal(
Globals
.TypeOfInt, "i");
773
while (keyType.IsGenericType && keyType.GetGenericTypeDefinition() ==
Globals
.TypeOfNullable)
784
if (keyType ==
Globals
.TypeOfString || keyType ==
Globals
.TypeOfObject)
835
ilg.ConvertValue(
Globals
.TypeOfObject, keyType);
862
LocalBuilder size = ilg.DeclareLocal(
Globals
.TypeOfInt, "arraySize");
867
ilg.ConvertValue(
Globals
.TypeOfObject, type);
906
LocalBuilder i = ilg.DeclareLocal(
Globals
.TypeOfInt, "i");
986
ilg.Call(typeof(JsonReaderDelegator).GetMethod(readArrayMethod,
Globals
.ScanAllMembers));
1004
ilg.ConvertValue(
Globals
.TypeOfObject, itemType);
1039
if (collectionContract.AddMethod.ReturnType !=
Globals
.TypeOfVoid)
1047
if (collectionContract.AddMethod.ReturnType !=
Globals
.TypeOfVoid)
System\Runtime\Serialization\Json\JsonFormatWriterGenerator.cs (40)
179
if (objType ==
Globals
.TypeOfDateTimeOffsetAdapter)
181
ilg.ConvertValue(objectArg.ArgType,
Globals
.TypeOfDateTimeOffset);
268
LocalBuilder extensionDataLocal = ilg.DeclareLocal(
Globals
.TypeOfExtensionDataObject, "extensionData");
270
ilg.ConvertValue(objectLocal.LocalType,
Globals
.TypeOfIExtensibleDataObject);
360
LocalBuilder i = ilg.DeclareLocal(
Globals
.TypeOfInt, "i");
395
incrementCollectionCountMethod = XmlFormatGeneratorStatics.IncrementCollectionCountGenericMethod.MakeGenericMethod(
Globals
.TypeOfKeyValuePair.MakeGenericType(collectionContract.ItemType.GetGenericArguments()));
410
enumeratorType =
Globals
.TypeOfGenericDictionaryEnumerator.MakeGenericType(keyValueTypes);
415
keyValueTypes = new Type[] {
Globals
.TypeOfObject,
Globals
.TypeOfObject };
416
enumeratorType =
Globals
.TypeOfDictionaryEnumerator;
422
MethodInfo moveNextMethod = enumeratorType.GetMethod(
Globals
.MoveNextMethodName, BindingFlags.Instance | BindingFlags.Public, null,
Globals
.EmptyTypeArray, null);
423
MethodInfo getCurrentMethod = enumeratorType.GetMethod(
Globals
.GetCurrentMethodName, BindingFlags.Instance | BindingFlags.Public, null,
Globals
.EmptyTypeArray, null);
435
Type ienumeratorInterface =
Globals
.TypeOfIEnumerator;
443
&& interfaceType.GetGenericTypeDefinition() ==
Globals
.TypeOfIEnumeratorGeneric
452
moveNextMethod = CollectionDataContract.GetTargetMethodWithName(
Globals
.MoveNextMethodName, enumeratorType, ienumeratorInterface);
454
getCurrentMethod = CollectionDataContract.GetTargetMethodWithName(
Globals
.GetCurrentMethodName, enumeratorType, ienumeratorInterface);
464
ConstructorInfo dictEnumCtor = enumeratorType.GetConstructor(
Globals
.ScanAllMembers, null, new Type[] {
Globals
.TypeOfIDictionaryEnumerator }, null);
465
ilg.ConvertValue(collectionContract.GetEnumeratorMethod.ReturnType,
Globals
.TypeOfIDictionaryEnumerator);
470
Type ctorParam =
Globals
.TypeOfIEnumeratorGeneric.MakeGenericType(
Globals
.TypeOfKeyValuePair.MakeGenericType(keyValueTypes));
471
ConstructorInfo dictEnumCtor = enumeratorType.GetConstructor(
Globals
.ScanAllMembers, null, new Type[] { ctorParam }, null);
480
Type genericDictionaryKeyValueType =
Globals
.TypeOfKeyValue.MakeGenericType(keyValueTypes);
488
LocalBuilder pairKey = ilg.DeclareLocal(
Globals
.TypeOfString, "key");
527
ilg.ConvertValue(currentValue.LocalType,
Globals
.TypeOfObject);
551
if (primitiveContract == null || primitiveContract.UnderlyingType ==
Globals
.TypeOfObject)
630
ilg.Call(xmlWriterArg, typeof(JsonWriterDelegator).GetMethod(writeArrayMethod,
Globals
.ScanAllMembers, null, new Type[] { type, typeof(XmlDictionaryString), typeof(XmlDictionaryString) }, null), value, itemName, null);
662
memberType =
Globals
.TypeOfReflectionPointer;
667
memberType.GetGenericTypeDefinition() ==
Globals
.TypeOfNullable);
693
if (primitiveContract != null && primitiveContract.UnderlyingType !=
Globals
.TypeOfObject)
706
if (memberType ==
Globals
.TypeOfObject || //boxed Nullable<T>
707
memberType ==
Globals
.TypeOfValueType ||
708
((IList)
Globals
.TypeOfNullable.GetInterfaces()).Contains(memberType))
711
ilg.ConvertValue(memberValue.LocalType,
Globals
.TypeOfObject);
712
memberValue = ilg.DeclareLocal(
Globals
.TypeOfObject, "unwrappedMemberValue");
722
if (memberType ==
Globals
.TypeOfObject) //boxed Nullable<T>
734
ilg.ConvertValue(memberValue.LocalType,
Globals
.TypeOfObject);
753
while (memberType.IsGenericType && memberType.GetGenericTypeDefinition() ==
Globals
.TypeOfNullable)
System\Runtime\Serialization\Json\JsonGlobals.cs (1)
16
public static readonly int DataContractXsdBaseNamespaceLength =
Globals
.DataContractXsdBaseNamespace.Length;
System\Runtime\Serialization\Json\JsonObjectDataContract.cs (2)
46
return DataContractJsonSerializer.ReadJsonValue(DataContract.GetDataContract(
Globals
.TypeOfObjectArray), jsonReader, context);
68
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new XmlException(System.Runtime.Serialization.SR.GetString(System.Runtime.Serialization.SR.XmlInvalidConversion, value,
Globals
.TypeOfInt)));
System\Runtime\Serialization\Json\XmlJsonWriter.cs (2)
287
if (ns ==
Globals
.XmlnsNamespace)
289
return
Globals
.XmlnsPrefix;
System\Runtime\Serialization\Json\XmlObjectSerializerReadContextComplexJson.cs (1)
161
serverTypeNamespace = string.Concat(
Globals
.DataContractXsdBaseNamespace, serverTypeNamespace.Substring(1));
System\Runtime\Serialization\Json\XmlObjectSerializerWriteContextComplexJson.cs (11)
97
else if (dataContractNamespace.StartsWith(
Globals
.DataContractXsdBaseNamespace, StringComparison.Ordinal))
122
(contract.UnderlyingType !=
Globals
.TypeOfObjectArray) &&
186
(oldItemContract.UnderlyingType.GetGenericTypeDefinition() ==
Globals
.TypeOfKeyValue))
231
if (dataType ==
Globals
.TypeOfClassDataNode ||
232
dataType ==
Globals
.TypeOfISerializableDataNode)
237
else if (dataType ==
Globals
.TypeOfCollectionDataNode)
242
else if (dataType ==
Globals
.TypeOfXmlDataNode)
246
else if ((dataType ==
Globals
.TypeOfObject) && (dataNode.Value != null))
290
if ((contractType == typeof(XmlDataContract)) && !
Globals
.TypeOfIXmlSerializable.IsAssignableFrom(declaredType))
321
dataContract = GetDataContract(
Globals
.TypeOfIEnumerable);
398
itemContract = context.GetDataContract(
Globals
.TypeOfKeyValuePair.MakeGenericType(collectionContract.ItemType.GetGenericArguments()));
System\Runtime\Serialization\NetDataContractSerializer.cs (5)
379
writer.WriteAttributeString(
Globals
.SerPrefix, DictionaryGlobals.ClrTypeLocalName, DictionaryGlobals.SerializationNamespace, DataContract.GetClrTypeString(clrTypeName));
381
writer.WriteAttributeString(
Globals
.SerPrefix, DictionaryGlobals.ClrAssemblyLocalName, DictionaryGlobals.SerializationNamespace, DataContract.GetClrTypeString(clrAssemblyName));
441
return GetDataContract(((obj == null) ?
Globals
.TypeOfObject : obj.GetType()), ref surrogateDataContracts);
551
if (string.Equals(newAssembly.Name,
Globals
.MscorlibAssemblySimpleName, StringComparison.OrdinalIgnoreCase) ||
552
string.Equals(newAssembly.Name,
Globals
.MscorlibFileName, StringComparison.OrdinalIgnoreCase))
System\Runtime\Serialization\PrimitiveDataContract.cs (8)
81
helper.XmlFormatWriterMethod = typeof(XmlWriterDelegator).GetMethod(WriteMethodName,
Globals
.ScanAllMembers, null, new Type[] { UnderlyingType, typeof(XmlDictionaryString), typeof(XmlDictionaryString) }, null);
83
helper.XmlFormatWriterMethod = typeof(XmlObjectSerializerWriteContext).GetMethod(WriteMethodName,
Globals
.ScanAllMembers, null, new Type[] { typeof(XmlWriterDelegator), UnderlyingType, typeof(XmlDictionaryString), typeof(XmlDictionaryString) }, null);
99
helper.XmlFormatContentWriterMethod = typeof(XmlWriterDelegator).GetMethod(WriteMethodName,
Globals
.ScanAllMembers, null, new Type[] { UnderlyingType }, null);
101
helper.XmlFormatContentWriterMethod = typeof(XmlObjectSerializerWriteContext).GetMethod(WriteMethodName,
Globals
.ScanAllMembers, null, new Type[] { typeof(XmlWriterDelegator), UnderlyingType }, null);
116
helper.XmlFormatReaderMethod = typeof(XmlReaderDelegator).GetMethod(ReadMethodName,
Globals
.ScanAllMembers);
137
if (attributes.Ref !=
Globals
.NewObjectId)
859
writer.WriteStartElement(
Globals
.SerPrefix, name, ns);
861
writer.WriteStartElement(
Globals
.ElementPrefix, name, ns);
System\Runtime\Serialization\SchemaExporter.cs (62)
75
if (!Schemas.Contains(
Globals
.SerializationNamespace))
77
StringReader reader = new StringReader(
Globals
.SerializationSchema);
80
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.GetString(SR.CouldNotReadSerializationSchema,
Globals
.SerializationNamespace)));
132
genericInfoElement = ExportGenericInfo(classDataContract.UnderlyingType,
Globals
.GenericTypeLocalName,
Globals
.SerializationNamespace);
184
SchemaHelper.AddSchemaImport(
Globals
.SerializationNamespace, schema);
185
schema.Namespaces.Add(
Globals
.SerPrefixForSchema,
Globals
.SerializationNamespace);
201
if (element.SchemaTypeName.Namespace.Equals(
Globals
.SerializationNamespace))
202
schema.Namespaces.Add(
Globals
.SerPrefixForSchema,
Globals
.SerializationNamespace);
229
XmlAttribute emitDefaultValueAttribute = XmlDoc.CreateAttribute(
Globals
.EmitDefaultValueAttribute);
230
emitDefaultValueAttribute.Value =
Globals
.False;
245
XmlAttribute nameAttribute = xmlDoc.CreateAttribute(
Globals
.ActualTypeNameAttribute);
249
XmlAttribute nsAttribute = xmlDoc.CreateAttribute(
Globals
.ActualTypeNamespaceAttribute);
297
collectionName =
Globals
.ArrayPrefix + collectionName;
302
XmlAttribute nameAttribute = XmlDoc.CreateAttribute(
Globals
.GenericNameAttribute);
307
XmlAttribute nsAttribute = XmlDoc.CreateAttribute(
Globals
.GenericNamespaceAttribute);
319
XmlElement argumentElement = ExportGenericInfo(genericArguments[argIndex],
Globals
.GenericParameterLocalName,
Globals
.SerializationNamespace);
322
XmlAttribute nestedLevelAttribute = XmlDoc.CreateAttribute(
Globals
.GenericParameterNestedLevelAttribute);
332
XmlAttribute typeNestedLevelsAttribute = XmlDoc.CreateAttribute(
Globals
.GenericParameterNestedLevelAttribute);
352
DataContractSerializer serializer = new DataContractSerializer(
Globals
.TypeOfObject,
367
genericInfoElement = ExportGenericInfo(collectionDataContract.UnderlyingType,
Globals
.GenericTypeLocalName,
Globals
.SerializationNamespace);
377
element.MaxOccursString =
Globals
.OccursUnbounded;
416
isDictionaryElement.InnerText =
Globals
.True;
466
genericInfoElement = ExportGenericInfo(dataContract.UnderlyingType,
Globals
.GenericTypeLocalName,
Globals
.SerializationNamespace);
475
schema.Namespaces.Add(
Globals
.SerPrefixForSchema,
Globals
.SerializationNamespace);
612
object[] attrs = clrType.GetCustomAttributes(
Globals
.TypeOfXmlSchemaProviderAttribute, false);
638
if (!(
Globals
.TypeOfXmlQualifiedName.IsAssignableFrom(getMethod.ReturnType)) && !(
Globals
.TypeOfXmlSchemaType.IsAssignableFrom(getMethod.ReturnType)))
639
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(SR.GetString(SR.InvalidReturnTypeOnGetSchemaMethod, DataContract.GetClrTypeFullName(clrType), methodName, DataContract.GetClrTypeFullName(getMethod.ReturnType), DataContract.GetClrTypeFullName(
Globals
.TypeOfXmlQualifiedName), typeof(XmlSchemaType))));
753
if (type ==
Globals
.TypeOfXmlElement || type ==
Globals
.TypeOfXmlNodeArray)
756
if (type ==
Globals
.TypeOfXmlElement)
781
schemaRefElement.RefName = new XmlQualifiedName(
Globals
.SchemaLocalName, XmlSchema.Namespace);
869
iSerializableWildcardElement.MaxOccursString =
Globals
.OccursUnbounded;
888
anytypeQualifiedName = new XmlQualifiedName(
Globals
.AnyTypeLocalName,
Globals
.SchemaNamespace);
905
stringQualifiedName = new XmlQualifiedName(
Globals
.StringLocalName,
Globals
.SchemaNamespace);
922
defaultEnumBaseTypeName = new XmlQualifiedName(
Globals
.IntLocalName,
Globals
.SchemaNamespace);
939
enumerationValueAnnotationName = new XmlQualifiedName(
Globals
.EnumerationValueLocalName,
Globals
.SerializationNamespace);
956
surrogateDataAnnotationName = new XmlQualifiedName(
Globals
.SurrogateDataLocalName,
Globals
.SerializationNamespace);
973
defaultValueAnnotation = new XmlQualifiedName(
Globals
.DefaultValueLocalName,
Globals
.SerializationNamespace);
990
actualTypeAnnotationName = new XmlQualifiedName(
Globals
.ActualTypeLocalName,
Globals
.SerializationNamespace);
1007
isDictionaryAnnotationName = new XmlQualifiedName(
Globals
.IsDictionaryLocalName,
Globals
.SerializationNamespace);
1024
isValueTypeName = new XmlQualifiedName(
Globals
.IsValueTypeLocalName,
Globals
.SerializationNamespace);
1036
iSerializableFactoryTypeAttribute.RefName = new XmlQualifiedName(
Globals
.ISerializableFactoryTypeLocalName,
Globals
.SerializationNamespace);
1048
refAttribute.RefName =
Globals
.RefQualifiedName;
1060
idAttribute.RefName =
Globals
.IdQualifiedName;
System\Runtime\Serialization\SchemaHelper.cs (3)
150
schema.Namespaces.Add(
Globals
.TnsPrefix, ns);
168
if (SchemaHelper.NamespacesEqual(ns, schema.TargetNamespace) || SchemaHelper.NamespacesEqual(ns,
Globals
.SchemaNamespace) || SchemaHelper.NamespacesEqual(ns,
Globals
.SchemaInstanceNamespace))
System\Runtime\Serialization\SchemaImporter.cs (44)
51
if (!schemaSet.Contains(
Globals
.SerializationNamespace))
53
StringReader reader = new StringReader(
Globals
.SerializationSchema);
56
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.GetString(SR.CouldNotReadSerializationSchema,
Globals
.SerializationNamespace)));
83
if (schema.TargetNamespace !=
Globals
.SerializationNamespace
84
&& schema.TargetNamespace !=
Globals
.SchemaNamespace)
145
element.Name =
Globals
.SchemaLocalName;
209
return dataContract is PrimitiveDataContract && ((PrimitiveDataContract)dataContract).UnderlyingType ==
Globals
.TypeOfObject;
251
if (schema.TargetNamespace !=
Globals
.SerializationNamespace)
513
if (
Globals
.TypeOfIXmlSerializable.IsAssignableFrom(referencedType))
581
return (localElement.MaxOccursString ==
Globals
.OccursUnbounded || localElement.MaxOccurs > 1);
606
element.RefName.Namespace ==
Globals
.SerializationNamespace &&
611
XmlSchema serializationSchema = XmlSchema.Read(XmlReader.Create(new StringReader(
Globals
.SerializationSchema)), null);
761
&&
Globals
.TypeOfIXmlSerializable.IsAssignableFrom(referencedType))
768
return (XmlDataContract)DataContract.GetBuiltInDataContract(
Globals
.TypeOfXmlElement);
771
return (XmlDataContract)DataContract.GetBuiltInDataContract(
Globals
.TypeOfXmlNodeArray);
1011
memberEmitDefaultValue = emitDefaultValueFromAnnotation != null ? emitDefaultValueFromAnnotation.Value :
Globals
.DefaultEmitDefaultValue;
1017
if (prevMember.Order >
Globals
.DefaultOrder)
1039
XmlNode emitDefaultValueAttribute = defaultValueElement.Attributes.GetNamedItem(
Globals
.EmitDefaultValueAttribute);
1042
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(SR.GetString(SR.AnnotationAttributeNotFound, SchemaExporter.DefaultValueAnnotation.Name, typeName.Name, typeName.Namespace,
Globals
.EmitDefaultValueAttribute)));
1052
XmlNode nameAttribute = actualTypeElement.Attributes.GetNamedItem(
Globals
.ActualTypeNameAttribute);
1055
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(SR.GetString(SR.AnnotationAttributeNotFound, SchemaExporter.ActualTypeAnnotationName.Name, typeName.Name, typeName.Namespace,
Globals
.ActualTypeNameAttribute)));
1056
XmlNode nsAttribute = actualTypeElement.Attributes.GetNamedItem(
Globals
.ActualTypeNamespaceAttribute);
1059
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(SR.GetString(SR.AnnotationAttributeNotFound, SchemaExporter.ActualTypeAnnotationName.Name, typeName.Name, typeName.Namespace,
Globals
.ActualTypeNamespaceAttribute)));
1131
GenericInfo genericInfo = new GenericInfo(DataContract.GetStableName(
Globals
.TypeOfKeyValue),
Globals
.TypeOfKeyValue.FullName);
1147
genericInfo = new GenericInfo(DataContract.GetStableName(
Globals
.TypeOfNullable),
Globals
.TypeOfNullable.FullName);
1286
if (typeElement != null && typeElement.NamespaceURI ==
Globals
.SerializationNamespace)
1288
if (typeElement.LocalName ==
Globals
.GenericTypeLocalName)
1298
XmlNode nameAttribute = typeElement.Attributes.GetNamedItem(
Globals
.GenericNameAttribute);
1301
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(SR.GetString(SR.GenericAnnotationAttributeNotFound, type.Name,
Globals
.GenericNameAttribute)));
1302
XmlNode nsAttribute = typeElement.Attributes.GetNamedItem(
Globals
.GenericNamespaceAttribute);
1305
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(SR.GetString(SR.GenericAnnotationAttributeNotFound, type.Name,
Globals
.GenericNamespaceAttribute)));
1316
if (argumentElement.LocalName !=
Globals
.GenericParameterLocalName ||
1317
argumentElement.NamespaceURI !=
Globals
.SerializationNamespace)
1319
XmlNode nestedLevelAttribute = argumentElement.Attributes.GetNamedItem(
Globals
.GenericParameterNestedLevelAttribute);
1324
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(SR.GetString(SR.GenericAnnotationHasInvalidAttributeValue, argumentElement.LocalName, argumentElement.NamespaceURI, type.Name, nestedLevelAttribute.Value, nestedLevelAttribute.LocalName,
Globals
.TypeOfInt.Name)));
1333
XmlNode typeNestedLevelsAttribute = typeElement.Attributes.GetNamedItem(
Globals
.GenericParameterNestedLevelAttribute);
1338
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(SR.GetString(SR.GenericAnnotationHasInvalidAttributeValue, typeElement.LocalName, typeElement.NamespaceURI, type.Name, typeNestedLevelsAttribute.Value, typeNestedLevelsAttribute.LocalName,
Globals
.TypeOfInt.Name)));
1351
DataContractSerializer serializer = new DataContractSerializer(
Globals
.TypeOfObject, name, ns, knownTypes,
1395
if (TryCheckIfAttribute(typeName, attribute,
Globals
.IdQualifiedName, ref foundId))
1397
if (TryCheckIfAttribute(typeName, attribute,
Globals
.RefQualifiedName, ref foundRef))
1399
if (attribute.RefName.IsEmpty || attribute.RefName.Namespace !=
Globals
.SerializationNamespace || attribute.Use == XmlSchemaUse.Required)
1400
ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.GetString(SR.TypeShouldNotContainAttributes,
Globals
.SerializationNamespace));
System\Runtime\Serialization\XmlDataContract.cs (8)
171
return UnderlyingType ==
Globals
.TypeOfXmlElement || UnderlyingType ==
Globals
.TypeOfXmlNodeArray;
197
if (type.IsDefined(
Globals
.TypeOfDataContractAttribute, false))
199
if (type.IsDefined(
Globals
.TypeOfCollectionDataContractAttribute, false))
211
object[] xmlRootAttributes = (UnderlyingType == null) ? null : UnderlyingType.GetCustomAttributes(
Globals
.TypeOfXmlRootAttribute, false);
217
topLevelElementNamespace = (this.StableName.Namespace ==
Globals
.SchemaNamespace) ? DictionaryGlobals.EmptyString : Namespace;
316
ConstructorInfo ctor = type.GetConstructor(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public, null,
Globals
.EmptyTypeArray, null);
369
ilg.ConvertValue(this.UnderlyingType,
Globals
.TypeOfIXmlSerializable);
System\Runtime\Serialization\XmlFormatGeneratorStatics.cs (77)
25
writeStartElementMethod2 = typeof(XmlWriterDelegator).GetMethod("WriteStartElement",
Globals
.ScanAllMembers, null, new Type[] { typeof(XmlDictionaryString), typeof(XmlDictionaryString) }, null);
38
writeStartElementMethod3 = typeof(XmlWriterDelegator).GetMethod("WriteStartElement",
Globals
.ScanAllMembers, null, new Type[] { typeof(string), typeof(XmlDictionaryString), typeof(XmlDictionaryString) }, null);
51
writeEndElementMethod = typeof(XmlWriterDelegator).GetMethod("WriteEndElement",
Globals
.ScanAllMembers, null, new Type[] { }, null);
64
writeNamespaceDeclMethod = typeof(XmlWriterDelegator).GetMethod("WriteNamespaceDecl",
Globals
.ScanAllMembers, null, new Type[] { typeof(XmlDictionaryString) }, null);
103
dictionaryEnumeratorCtor =
Globals
.TypeOfDictionaryEnumerator.GetConstructor(
Globals
.ScanAllMembers, null, new Type[] {
Globals
.TypeOfIDictionaryEnumerator }, null);
142
getItemContractMethod = typeof(CollectionDataContract).GetProperty("ItemContract",
Globals
.ScanAllMembers).GetGetMethod(true/*nonPublic*/);
155
isStartElementMethod2 = typeof(XmlReaderDelegator).GetMethod("IsStartElement",
Globals
.ScanAllMembers, null, new Type[] { typeof(XmlDictionaryString), typeof(XmlDictionaryString) }, null);
168
isStartElementMethod0 = typeof(XmlReaderDelegator).GetMethod("IsStartElement",
Globals
.ScanAllMembers, null, new Type[] { }, null);
181
getUninitializedObjectMethod = typeof(XmlFormatReaderGenerator).GetMethod("UnsafeGetUninitializedObject",
Globals
.ScanAllMembers, null, new Type[] { typeof(int) }, null);
220
nodeTypeProperty = typeof(XmlReaderDelegator).GetProperty("NodeType",
Globals
.ScanAllMembers);
246
extensionDataObjectCtor = typeof(ExtensionDataObject).GetConstructor(
Globals
.ScanAllMembers, null, new Type[] { }, null);
259
hashtableCtor =
Globals
.TypeOfHashtable.GetConstructor(
Globals
.ScanAllMembers, null,
Globals
.EmptyTypeArray, null);
272
getStreamingContextMethod = typeof(XmlObjectSerializerContext).GetMethod("GetStreamingContext",
Globals
.ScanAllMembers);
285
getCollectionMemberMethod = typeof(XmlObjectSerializerReadContext).GetMethod("GetCollectionMember",
Globals
.ScanAllMembers);
298
storeCollectionMemberInfoMethod = typeof(XmlObjectSerializerReadContext).GetMethod("StoreCollectionMemberInfo",
Globals
.ScanAllMembers, null, new Type[] { typeof(object) }, null);
311
storeIsGetOnlyCollectionMethod = typeof(XmlObjectSerializerWriteContext).GetMethod("StoreIsGetOnlyCollection",
Globals
.ScanAllMembers);
324
throwNullValueReturnedForGetOnlyCollectionExceptionMethod = typeof(XmlObjectSerializerReadContext).GetMethod("ThrowNullValueReturnedForGetOnlyCollectionException",
Globals
.ScanAllMembers);
336
throwArrayExceededSizeExceptionMethod = typeof(XmlObjectSerializerReadContext).GetMethod("ThrowArrayExceededSizeException",
Globals
.ScanAllMembers);
349
incrementItemCountMethod = typeof(XmlObjectSerializerContext).GetMethod("IncrementItemCount",
Globals
.ScanAllMembers);
366
demandSerializationFormatterPermissionMethod = typeof(XmlObjectSerializerContext).GetMethod("DemandSerializationFormatterPermission",
Globals
.ScanAllMembers);
383
demandMemberAccessPermissionMethod = typeof(XmlObjectSerializerContext).GetMethod("DemandMemberAccessPermission",
Globals
.ScanAllMembers);
396
internalDeserializeMethod = typeof(XmlObjectSerializerReadContext).GetMethod("InternalDeserialize",
Globals
.ScanAllMembers, null, new Type[] { typeof(XmlReaderDelegator), typeof(int), typeof(RuntimeTypeHandle), typeof(string), typeof(string) }, null);
409
moveToNextElementMethod = typeof(XmlObjectSerializerReadContext).GetMethod("MoveToNextElement",
Globals
.ScanAllMembers);
422
getMemberIndexMethod = typeof(XmlObjectSerializerReadContext).GetMethod("GetMemberIndex",
Globals
.ScanAllMembers);
435
getMemberIndexWithRequiredMembersMethod = typeof(XmlObjectSerializerReadContext).GetMethod("GetMemberIndexWithRequiredMembers",
Globals
.ScanAllMembers);
448
throwRequiredMemberMissingExceptionMethod = typeof(XmlObjectSerializerReadContext).GetMethod("ThrowRequiredMemberMissingException",
Globals
.ScanAllMembers);
461
skipUnknownElementMethod = typeof(XmlObjectSerializerReadContext).GetMethod("SkipUnknownElement",
Globals
.ScanAllMembers);
474
readIfNullOrRefMethod = typeof(XmlObjectSerializerReadContext).GetMethod("ReadIfNullOrRef",
Globals
.ScanAllMembers, null, new Type[] { typeof(XmlReaderDelegator), typeof(Type), typeof(bool) }, null);
487
readAttributesMethod = typeof(XmlObjectSerializerReadContext).GetMethod("ReadAttributes",
Globals
.ScanAllMembers);
500
resetAttributesMethod = typeof(XmlObjectSerializerReadContext).GetMethod("ResetAttributes",
Globals
.ScanAllMembers);
513
getObjectIdMethod = typeof(XmlObjectSerializerReadContext).GetMethod("GetObjectId",
Globals
.ScanAllMembers);
526
getArraySizeMethod = typeof(XmlObjectSerializerReadContext).GetMethod("GetArraySize",
Globals
.ScanAllMembers);
539
addNewObjectMethod = typeof(XmlObjectSerializerReadContext).GetMethod("AddNewObject",
Globals
.ScanAllMembers);
552
addNewObjectWithIdMethod = typeof(XmlObjectSerializerReadContext).GetMethod("AddNewObjectWithId",
Globals
.ScanAllMembers);
565
replaceDeserializedObjectMethod = typeof(XmlObjectSerializerReadContext).GetMethod("ReplaceDeserializedObject",
Globals
.ScanAllMembers);
578
getExistingObjectMethod = typeof(XmlObjectSerializerReadContext).GetMethod("GetExistingObject",
Globals
.ScanAllMembers);
591
getRealObjectMethod = typeof(XmlObjectSerializerReadContext).GetMethod("GetRealObject",
Globals
.ScanAllMembers);
604
readMethod = typeof(XmlObjectSerializerReadContext).GetMethod("Read",
Globals
.ScanAllMembers);
617
ensureArraySizeMethod = typeof(XmlObjectSerializerReadContext).GetMethod("EnsureArraySize",
Globals
.ScanAllMembers);
630
trimArraySizeMethod = typeof(XmlObjectSerializerReadContext).GetMethod("TrimArraySize",
Globals
.ScanAllMembers);
643
checkEndOfArrayMethod = typeof(XmlObjectSerializerReadContext).GetMethod("CheckEndOfArray",
Globals
.ScanAllMembers);
656
getArrayLengthMethod =
Globals
.TypeOfArray.GetProperty("Length").GetGetMethod();
669
readSerializationInfoMethod = typeof(XmlObjectSerializerReadContext).GetMethod("ReadSerializationInfo",
Globals
.ScanAllMembers);
682
createUnexpectedStateExceptionMethod = typeof(XmlObjectSerializerReadContext).GetMethod("CreateUnexpectedStateException",
Globals
.ScanAllMembers, null, new Type[] { typeof(XmlNodeType), typeof(XmlReaderDelegator) }, null);
695
internalSerializeReferenceMethod = typeof(XmlObjectSerializerWriteContext).GetMethod("InternalSerializeReference",
Globals
.ScanAllMembers);
708
internalSerializeMethod = typeof(XmlObjectSerializerWriteContext).GetMethod("InternalSerialize",
Globals
.ScanAllMembers);
721
writeNullMethod = typeof(XmlObjectSerializerWriteContext).GetMethod("WriteNull",
Globals
.ScanAllMembers, null, new Type[] { typeof(XmlWriterDelegator), typeof(Type), typeof(bool) }, null);
734
incrementArrayCountMethod = typeof(XmlObjectSerializerWriteContext).GetMethod("IncrementArrayCount",
Globals
.ScanAllMembers);
747
incrementCollectionCountMethod = typeof(XmlObjectSerializerWriteContext).GetMethod("IncrementCollectionCount",
Globals
.ScanAllMembers, null, new Type[] { typeof(XmlWriterDelegator), typeof(ICollection) }, null);
760
incrementCollectionCountGenericMethod = typeof(XmlObjectSerializerWriteContext).GetMethod("IncrementCollectionCountGeneric",
Globals
.ScanAllMembers);
773
getDefaultValueMethod = typeof(XmlObjectSerializerWriteContext).GetMethod("GetDefaultValue",
Globals
.ScanAllMembers);
786
getNullableValueMethod = typeof(XmlObjectSerializerWriteContext).GetMethod("GetNullableValue",
Globals
.ScanAllMembers);
799
throwRequiredMemberMustBeEmittedMethod = typeof(XmlObjectSerializerWriteContext).GetMethod("ThrowRequiredMemberMustBeEmitted",
Globals
.ScanAllMembers);
812
getHasValueMethod = typeof(XmlObjectSerializerWriteContext).GetMethod("GetHasValue",
Globals
.ScanAllMembers);
825
writeISerializableMethod = typeof(XmlObjectSerializerWriteContext).GetMethod("WriteISerializable",
Globals
.ScanAllMembers);
838
writeExtensionDataMethod = typeof(XmlObjectSerializerWriteContext).GetMethod("WriteExtensionData",
Globals
.ScanAllMembers);
851
writeXmlValueMethod = typeof(DataContract).GetMethod("WriteXmlValue",
Globals
.ScanAllMembers);
864
readXmlValueMethod = typeof(DataContract).GetMethod("ReadXmlValue",
Globals
.ScanAllMembers);
877
throwTypeNotSerializableMethod = typeof(DataContract).GetMethod("ThrowTypeNotSerializable",
Globals
.ScanAllMembers);
890
namespaceProperty = typeof(DataContract).GetProperty("Namespace",
Globals
.ScanAllMembers);
903
contractNamespacesField = typeof(ClassDataContract).GetField("ContractNamespaces",
Globals
.ScanAllMembers);
916
memberNamesField = typeof(ClassDataContract).GetField("MemberNames",
Globals
.ScanAllMembers);
929
extensionDataSetExplicitMethodInfo = typeof(IExtensibleDataObject).GetMethod(
Globals
.ExtensionDataSetMethod);
942
childElementNamespacesProperty = typeof(ClassDataContract).GetProperty("ChildElementNamespaces",
Globals
.ScanAllMembers);
955
collectionItemNameProperty = typeof(CollectionDataContract).GetProperty("CollectionItemName",
Globals
.ScanAllMembers);
968
childElementNamespaceProperty = typeof(CollectionDataContract).GetProperty("ChildElementNamespace",
Globals
.ScanAllMembers);
981
getDateTimeOffsetMethod = typeof(DateTimeOffsetAdapter).GetMethod("GetDateTimeOffset",
Globals
.ScanAllMembers);
994
getDateTimeOffsetAdapterMethod = typeof(DateTimeOffsetAdapter).GetMethod("GetDateTimeOffsetAdapter",
Globals
.ScanAllMembers);
1007
traceInstructionMethod = typeof(SerializationTrace).GetMethod("TraceInstruction",
Globals
.ScanAllMembers);
1020
throwInvalidDataContractExceptionMethod = typeof(DataContract).GetMethod("ThrowInvalidDataContractException",
Globals
.ScanAllMembers, null, new Type[] { typeof(string), typeof(Type) }, null);
1033
serializeReadOnlyTypesProperty = typeof(XmlObjectSerializerWriteContext).GetProperty("SerializeReadOnlyTypes",
Globals
.ScanAllMembers);
1046
classSerializationExceptionMessageProperty = typeof(ClassDataContract).GetProperty("SerializationExceptionMessage",
Globals
.ScanAllMembers);
1059
collectionSerializationExceptionMessageProperty = typeof(CollectionDataContract).GetProperty("SerializationExceptionMessage",
Globals
.ScanAllMembers);
System\Runtime\Serialization\XmlFormatReaderGenerator.cs (42)
126
ilg.BeginMethod("Read" + classContract.StableName.Name + "FromXml",
Globals
.TypeOfXmlFormatClassReaderDelegate, memberAccessFlag);
149
objectId = ilg.DeclareLocal(
Globals
.TypeOfString, "objectIdRead");
158
if (
Globals
.TypeOfIDeserializationCallback.IsAssignableFrom(classContract.UnderlyingType))
169
if (classContract.UnderlyingType ==
Globals
.TypeOfDateTimeOffsetAdapter)
171
ilg.ConvertValue(objectLocal.LocalType,
Globals
.TypeOfDateTimeOffsetAdapter);
173
ilg.ConvertValue(
Globals
.TypeOfDateTimeOffset, ilg.CurrentMethod.ReturnType);
207
ilg.BeginMethod("Read" + collectionContract.StableName.Name + "FromXml" + "IsGetOnly",
Globals
.TypeOfXmlFormatGetOnlyCollectionReaderDelegate, memberAccessFlag);
211
ilg.BeginMethod("Read" + collectionContract.StableName.Name + "FromXml" + string.Empty,
Globals
.TypeOfXmlFormatCollectionReaderDelegate, memberAccessFlag);
259
type =
Globals
.TypeOfValueType;
263
if (classContract.UnderlyingType ==
Globals
.TypeOfDBNull)
265
ilg.LoadMember(
Globals
.TypeOfDBNull.GetField("Value"));
284
ilg.ConvertValue(
Globals
.TypeOfObject, type);
319
return
Globals
.TypeOfIObjectReference.IsAssignableFrom(classContract.UnderlyingType);
328
ilg.ConvertAddress(objectLocal.LocalType,
Globals
.TypeOfIObjectReference);
331
ilg.ConvertValue(
Globals
.TypeOfObject, ilg.CurrentMethod.ReturnType);
341
LocalBuilder extensionDataLocal = ilg.DeclareLocal(
Globals
.TypeOfExtensionDataObject, "extensionData");
364
LocalBuilder memberIndexLocal = ilg.DeclareLocal(
Globals
.TypeOfInt, "memberIndex", -1);
369
LocalBuilder requiredIndexLocal = hasRequiredMembers ? ilg.DeclareLocal(
Globals
.TypeOfInt, "requiredIndex", firstRequiredMember) : null;
479
while (type.IsGenericType && type.GetGenericTypeDefinition() ==
Globals
.TypeOfNullable)
486
if ((primitiveContract != null && primitiveContract.UnderlyingType !=
Globals
.TypeOfObject) || nullables != 0 || type.IsValueType)
488
LocalBuilder objectId = ilg.DeclareLocal(
Globals
.TypeOfString, "objectIdRead");
493
ilg.If(objectId, Cmp.EqualTo,
Globals
.NullObjectId);
525
if (primitiveContract != null && primitiveContract.UnderlyingType !=
Globals
.TypeOfObject)
543
ilg.ConvertValue(
Globals
.TypeOfObject, type);
550
ilg.If(objectId, Cmp.NotEqualTo,
Globals
.NullObjectId);
568
Type declaredType = type.IsPointer ?
Globals
.TypeOfReflectionPointer : type;
578
ilg.ConvertValue(
Globals
.TypeOfObject, type);
589
Type type =
Globals
.TypeOfNullable.MakeGenericType(innerType);
609
type =
Globals
.TypeOfDictionaryGeneric.MakeGenericType(itemType.GetGenericArguments());
610
constructor = type.GetConstructor(BindingFlags.Instance | BindingFlags.Public, null,
Globals
.EmptyTypeArray, null);
613
type =
Globals
.TypeOfHashtable;
646
LocalBuilder size = ilg.DeclareLocal(
Globals
.TypeOfInt, "arraySize");
650
LocalBuilder objectId = ilg.DeclareLocal(
Globals
.TypeOfString, "objectIdRead");
670
LocalBuilder i = ilg.DeclareLocal(
Globals
.TypeOfInt, "i");
711
LocalBuilder j = ilg.DeclareLocal(
Globals
.TypeOfInt, "j");
746
ilg.ConvertValue(
Globals
.TypeOfObject, type);
756
LocalBuilder size = ilg.DeclareLocal(
Globals
.TypeOfInt, "arraySize");
766
LocalBuilder i = ilg.DeclareLocal(
Globals
.TypeOfInt, "i");
838
ilg.Call(typeof(XmlReaderDelegator).GetMethod(readArrayMethod,
Globals
.ScanAllMembers));
855
ilg.ConvertValue(
Globals
.TypeOfObject, itemType);
886
if (collectionContract.AddMethod.ReturnType !=
Globals
.TypeOfVoid)
892
if (collectionContract.AddMethod.ReturnType !=
Globals
.TypeOfVoid)
System\Runtime\Serialization\XmlFormatWriterGenerator.cs (40)
108
ilg.BeginMethod("Write" + classContract.StableName.Name + "ToXml",
Globals
.TypeOfXmlFormatClassWriterDelegate, memberAccessFlag);
138
ilg.BeginMethod("Write" + collectionContract.StableName.Name + "ToXml",
Globals
.TypeOfXmlFormatCollectionWriterDelegate, memberAccessFlag);
175
if (objType ==
Globals
.TypeOfDateTimeOffsetAdapter)
177
ilg.ConvertValue(objectArg.ArgType,
Globals
.TypeOfDateTimeOffset);
285
LocalBuilder extensionDataLocal = ilg.DeclareLocal(
Globals
.TypeOfExtensionDataObject, "extensionData");
287
ilg.ConvertValue(objectLocal.LocalType,
Globals
.TypeOfIExtensibleDataObject);
397
LocalBuilder i = ilg.DeclareLocal(
Globals
.TypeOfInt, "i");
431
incrementCollectionCountMethod = XmlFormatGeneratorStatics.IncrementCollectionCountGenericMethod.MakeGenericMethod(
Globals
.TypeOfKeyValuePair.MakeGenericType(collectionContract.ItemType.GetGenericArguments()));
446
enumeratorType =
Globals
.TypeOfGenericDictionaryEnumerator.MakeGenericType(keyValueTypes);
451
keyValueTypes = new Type[] {
Globals
.TypeOfObject,
Globals
.TypeOfObject };
452
enumeratorType =
Globals
.TypeOfDictionaryEnumerator;
458
MethodInfo moveNextMethod = enumeratorType.GetMethod(
Globals
.MoveNextMethodName, BindingFlags.Instance | BindingFlags.Public, null,
Globals
.EmptyTypeArray, null);
459
MethodInfo getCurrentMethod = enumeratorType.GetMethod(
Globals
.GetCurrentMethodName, BindingFlags.Instance | BindingFlags.Public, null,
Globals
.EmptyTypeArray, null);
471
Type ienumeratorInterface =
Globals
.TypeOfIEnumerator;
479
&& interfaceType.GetGenericTypeDefinition() ==
Globals
.TypeOfIEnumeratorGeneric
488
moveNextMethod = CollectionDataContract.GetTargetMethodWithName(
Globals
.MoveNextMethodName, enumeratorType, ienumeratorInterface);
490
getCurrentMethod = CollectionDataContract.GetTargetMethodWithName(
Globals
.GetCurrentMethodName, enumeratorType, ienumeratorInterface);
500
ilg.ConvertValue(collectionContract.GetEnumeratorMethod.ReturnType,
Globals
.TypeOfIDictionaryEnumerator);
505
Type ctorParam =
Globals
.TypeOfIEnumeratorGeneric.MakeGenericType(
Globals
.TypeOfKeyValuePair.MakeGenericType(keyValueTypes));
506
ConstructorInfo dictEnumCtor = enumeratorType.GetConstructor(
Globals
.ScanAllMembers, null, new Type[] { ctorParam }, null);
526
ilg.ConvertValue(currentValue.LocalType,
Globals
.TypeOfObject);
543
if (primitiveContract == null || primitiveContract.UnderlyingType ==
Globals
.TypeOfObject)
625
ilg.Call(typeof(XmlWriterDelegator).GetMethod(writeArrayMethod,
Globals
.ScanAllMembers, null, new Type[] { type, typeof(XmlDictionaryString), typeof(XmlDictionaryString) }, null));
639
memberType =
Globals
.TypeOfReflectionPointer;
644
memberType.GetGenericTypeDefinition() ==
Globals
.TypeOfNullable);
670
if (primitiveContract != null && primitiveContract.UnderlyingType !=
Globals
.TypeOfObject && !writeXsiType)
683
if (memberType ==
Globals
.TypeOfObject || //boxed Nullable<T>
684
memberType ==
Globals
.TypeOfValueType ||
685
((IList)
Globals
.TypeOfNullable.GetInterfaces()).Contains(memberType))
688
ilg.ConvertValue(memberValue.LocalType,
Globals
.TypeOfObject);
689
memberValue = ilg.DeclareLocal(
Globals
.TypeOfObject, "unwrappedMemberValue");
699
if (memberType ==
Globals
.TypeOfObject) //boxed Nullable<T>
711
ilg.ConvertValue(memberValue.LocalType,
Globals
.TypeOfObject);
731
while (memberType.IsGenericType && memberType.GetGenericTypeDefinition() ==
Globals
.TypeOfNullable)
755
return type ==
Globals
.TypeOfXmlQualifiedName && (ns != null && ns.Value != null && ns.Value.Length > 0);
764
ilg.Load(
Globals
.ElementPrefix);
System\Runtime\Serialization\XmlObjectSerializer.cs (2)
234
writer.WriteAttributeBool(
Globals
.XsiPrefix, DictionaryGlobals.XsiNilLocalName, DictionaryGlobals.SchemaInstanceNamespace, true);
379
DataContract objectContract = PrimitiveDataContract.GetPrimitiveDataContract(
Globals
.TypeOfObject);
System\Runtime\Serialization\XmlObjectSerializerContext.cs (3)
94
Globals
.SerializationFormatterPermission.Demand();
106
Globals
.MemberAccessPermission.Demand();
122
incrementItemCountMethod = typeof(XmlObjectSerializerContext).GetMethod("IncrementItemCount",
Globals
.ScanAllMembers);
System\Runtime\Serialization\XmlObjectSerializerReadContext.cs (21)
149
if (attributes.Ref !=
Globals
.NewObjectId)
327
if (attributes.Ref !=
Globals
.NewObjectId)
337
return
Globals
.NullObjectId;
339
return
Globals
.NewObjectId;
380
if (id !=
Globals
.NewObjectId)
391
if (id !=
Globals
.NewObjectId)
542
if (xmlDataContract.UnderlyingType ==
Globals
.TypeOfXmlElement)
549
else if (xmlDataContract.UnderlyingType ==
Globals
.TypeOfXmlNodeArray)
582
if (attributes.Ref !=
Globals
.NewObjectId)
594
value = InternalDeserialize(xmlReader,
Globals
.TypeOfObject, name, String.Empty);
629
if (attributes.Ref !=
Globals
.NewObjectId)
683
if (attributes.Id ==
Globals
.NewObjectId)
737
if (xmlReader.NamespaceURI.StartsWith(
Globals
.DataContractXsdBaseNamespace, StringComparison.Ordinal))
745
IDataNode objNode = ReadUnknownPrimitiveData(xmlReader,
Globals
.TypeOfObject, dataContractName, dataContractNamespace);
758
if (valueType ==
Globals
.TypeOfString)
915
if (ns !=
Globals
.SerializationNamespace && ns !=
Globals
.SchemaInstanceNamespace)
1067
Document.CreateAttribute(null,
Globals
.XmlnsPrefix,
Globals
.XmlnsNamespace) :
1068
Document.CreateAttribute(
Globals
.XmlnsPrefix, prefix,
Globals
.XmlnsNamespace);
System\Runtime\Serialization\XmlObjectSerializerReadContextComplex.cs (10)
182
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(XmlObjectSerializer.TryAddLineInfo(xmlReader, SR.GetString(SR.AttributeNotFound,
Globals
.SerializationNamespace,
Globals
.ClrTypeLocalName, xmlReader.NodeType, xmlReader.NamespaceURI, xmlReader.LocalName))));
184
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(XmlObjectSerializer.TryAddLineInfo(xmlReader, SR.GetString(SR.AttributeNotFound,
Globals
.SerializationNamespace,
Globals
.ClrAssemblyLocalName, xmlReader.NodeType, xmlReader.NamespaceURI, xmlReader.LocalName))));
186
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(XmlObjectSerializer.TryAddLineInfo(xmlReader, SR.GetString(SR.AttributeNotFound,
Globals
.SerializationNamespace,
Globals
.ClrTypeLocalName, xmlReader.NodeType, xmlReader.NamespaceURI, xmlReader.LocalName))));
235
if (assemblyName ==
Globals
.MscorlibAssemblyName)
237
assembly =
Globals
.TypeOfInt.Assembly;
395
if (assemblyName ==
Globals
.MscorlibAssemblyName)
397
assembly =
Globals
.TypeOfInt.Assembly;
System\Runtime\Serialization\XmlObjectSerializerWriteContext.cs (20)
121
Type declaredType =
Globals
.TypeOfObject;
239
xmlWriter.WriteAttributeString(
Globals
.SerPrefix, DictionaryGlobals.IdLocalName,
245
xmlWriter.WriteAttributeString(
Globals
.SerPrefix, DictionaryGlobals.RefLocalName, DictionaryGlobals.SerializationNamespace, string.Format(CultureInfo.InvariantCulture, "{0}{1}", "i", objectId));
353
xmlWriter.WriteStartElement(
Globals
.ElementPrefix, name, ns);
363
writer.WriteXmlnsAttribute(
Globals
.XsiPrefix, DictionaryGlobals.SchemaInstanceNamespace);
365
writer.WriteXmlnsAttribute(
Globals
.XsdPrefix, DictionaryGlobals.SchemaNamespace);
498
Globals
.SerializationFormatterPermission.Demand();
508
if (!this.UnsafeTypeForwardingEnabled && serInfo.AssemblyName ==
Globals
.MscorlibAssemblyName)
526
xmlWriter.WriteAttributeQualifiedName(
Globals
.SerPrefix, DictionaryGlobals.ISerializableFactoryTypeLocalName, DictionaryGlobals.SerializationNamespace, typeName, typeNs);
533
xmlWriter.WriteAttributeQualifiedName(
Globals
.SerPrefix, DictionaryGlobals.ISerializableFactoryTypeLocalName, DictionaryGlobals.SerializationNamespace, DataContract.GetClrTypeString(typeName), DataContract.GetClrTypeString(typeNs));
547
InternalSerializeReference(xmlWriter, obj, false /*isDeclaredType*/, false /*writeXsiType*/, -1,
Globals
.TypeOfObject.TypeHandle);
601
if (dataType ==
Globals
.TypeOfClassDataNode)
603
else if (dataType ==
Globals
.TypeOfCollectionDataNode)
605
else if (dataType ==
Globals
.TypeOfXmlDataNode)
607
else if (dataType ==
Globals
.TypeOfISerializableDataNode)
613
if (dataType ==
Globals
.TypeOfObject)
634
Type declaredType = (dataNode.DataContractName == null) ? o.GetType() :
Globals
.TypeOfObject;
684
xmlWriter.WriteAttributeQualifiedName(
Globals
.SerPrefix, DictionaryGlobals.ISerializableFactoryTypeLocalName, DictionaryGlobals.SerializationNamespace, dataNode.FactoryTypeName, dataNode.FactoryTypeNamespace);
784
writer.WriteAttributeQualifiedName(
Globals
.XsiPrefix, DictionaryGlobals.XsiTypeLocalName, DictionaryGlobals.SchemaInstanceNamespace, dataContractName, dataContractNamespace);
789
writer.WriteAttributeQualifiedName(
Globals
.XsiPrefix, DictionaryGlobals.XsiTypeLocalName, DictionaryGlobals.SchemaInstanceNamespace, dataContractName, dataContractNamespace);
System\Runtime\Serialization\XmlObjectSerializerWriteContextComplex.cs (6)
228
xmlWriter.WriteStartElement(
Globals
.ElementPrefix, name, ns);
256
xmlWriter.WriteAttributeInt(
Globals
.SerPrefix, DictionaryGlobals.IdLocalName, DictionaryGlobals.SerializationNamespace, objectId);
259
xmlWriter.WriteAttributeInt(
Globals
.SerPrefix, DictionaryGlobals.RefLocalName, DictionaryGlobals.SerializationNamespace, objectId);
260
xmlWriter.WriteAttributeBool(
Globals
.XsiPrefix, DictionaryGlobals.XsiNilLocalName, DictionaryGlobals.SchemaInstanceNamespace, true);
351
declaredType =
Globals
.TypeOfObject;
376
xmlWriter.WriteAttributeInt(
Globals
.SerPrefix, DictionaryGlobals.ArraySizeLocalName, DictionaryGlobals.SerializationNamespace, size);
System\Runtime\Serialization\XmlReaderDelegator.cs (12)
272
if (valueType ==
Globals
.TypeOfByteArray)
274
else if (valueType ==
Globals
.TypeOfObject)
276
else if (valueType ==
Globals
.TypeOfTimeSpan)
278
else if (valueType ==
Globals
.TypeOfGuid)
280
else if (valueType ==
Globals
.TypeOfUri)
282
else if (valueType ==
Globals
.TypeOfXmlQualifiedName)
327
if (valueType ==
Globals
.TypeOfByteArray)
329
else if (valueType ==
Globals
.TypeOfObject)
331
else if (valueType ==
Globals
.TypeOfTimeSpan)
333
else if (valueType ==
Globals
.TypeOfGuid)
335
else if (valueType ==
Globals
.TypeOfUri)
337
else if (valueType ==
Globals
.TypeOfXmlQualifiedName)
System\Runtime\Serialization\XmlSerializableServices.cs (2)
53
return xmlReader.NamespaceURI !=
Globals
.SerializationNamespace &&
54
xmlReader.NamespaceURI !=
Globals
.SchemaInstanceNamespace &&
System\Runtime\Serialization\XmlWriterDelegator.cs (12)
343
if (valueType ==
Globals
.TypeOfByteArray)
345
else if (valueType ==
Globals
.TypeOfObject)
349
else if (valueType ==
Globals
.TypeOfTimeSpan)
351
else if (valueType ==
Globals
.TypeOfGuid)
353
else if (valueType ==
Globals
.TypeOfUri)
355
else if (valueType ==
Globals
.TypeOfXmlQualifiedName)
420
if (valueType ==
Globals
.TypeOfByteArray)
422
else if (valueType ==
Globals
.TypeOfObject)
428
else if (valueType ==
Globals
.TypeOfTimeSpan)
430
else if (valueType ==
Globals
.TypeOfGuid)
432
else if (valueType ==
Globals
.TypeOfUri)
434
else if (valueType ==
Globals
.TypeOfXmlQualifiedName)