8 writes to StableName
System.Runtime.Serialization (8)
System\Runtime\Serialization\ClassDataContract.cs (1)
1432
boundClassContract.
StableName
= CreateQualifiedName(DataContract.ExpandGenericParameters(XmlConvert.DecodeName(stableName.Name), new GenericNameProvider(DataContract.GetClrTypeFullName(this.UnderlyingType), genericParams)), stableName.Namespace);
System\Runtime\Serialization\CollectionDataContract.cs (1)
1247
boundCollectionContract.
StableName
= CreateQualifiedName(DataContract.ExpandGenericParameters(XmlConvert.DecodeName(this.StableName.Name), new GenericNameProvider(DataContract.GetClrTypeFullName(this.UnderlyingType), paramContracts)),
System\Runtime\Serialization\SchemaImporter.cs (6)
665
dataContract.
StableName
= typeName;
716
xmlDataContract.
StableName
= typeName;
845
dataContract.
StableName
= typeName;
1069
dataContract.
StableName
= typeName;
1135
dataContract.ItemContract.
StableName
= new XmlQualifiedName(genericInfo.GetExpandedStableName().Name, typeName.Namespace);
1203
dataContract.
StableName
= typeName;
160 references to StableName
System.Runtime.Serialization (160)
System\Runtime\Serialization\ClassDataContract.cs (4)
1035
membersInHierarchy.Add(new Member(member, currContract.
StableName
.Namespace, baseTypeIndex));
1185
ThrowInvalidDataContractException(SR.GetString(SR.ValueTypeCannotHaveBaseType, StableName.Name, StableName.Namespace, baseContract.
StableName
.Name, baseContract.
StableName
.Namespace));
1414
stableName = this.
StableName
;
System\Runtime\Serialization\CodeExporter.cs (58)
67
this.clrNamespaces.Add(clrNamespace, dataContract.
StableName
.Namespace);
68
this.namespaces.Add(dataContract.
StableName
.Namespace, clrNamespace);
255
stableName = SchemaImporter.ImportActualType(xmlDataContract.XsdType.Annotation, stableName, dataContract.
StableName
);
282
ExportClassDataContractHierarchy(classDataContract.
StableName
, classDataContract, contractCodeDomInfo, new Dictionary<XmlQualifiedName, object>());
311
if (contractNamesInHierarchy.ContainsKey(classContract.
StableName
))
312
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(SR.GetString(SR.TypeCannotBeImported, typeName.Name, typeName.Namespace, SR.GetString(SR.CircularTypeReference, classContract.
StableName
.Name, classContract.
StableName
.Namespace))));
313
contractNamesInHierarchy.Add(classContract.
StableName
, null);
424
CodeNamespace ns = GetCodeNamespace(clrNamespace, dataContract.
StableName
.Namespace, contractCodeDomInfo);
428
string typeName = XmlConvert.DecodeName(dataContract.
StableName
.Name);
471
string originalName = dataContract.
StableName
.Name;
476
DataContract containingDataContract = dataContractSet[new XmlQualifiedName(containingTypeName, dataContract.
StableName
.Namespace)];
543
if (TryGetReferencedType(dataContract.
StableName
, dataContract, out type)
554
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.GetString(SR.ReferencedTypeDoesNotMatch, type.AssemblyQualifiedName, dataContract.
StableName
.Name, dataContract.
StableName
.Namespace)));
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)));
572
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.GetString(SR.ReferencedTypeDoesNotMatch, type.AssemblyQualifiedName, dataContract.
StableName
.Name, dataContract.
StableName
.Namespace)));
578
if (genericStableName != dataContract.
StableName
)
579
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(SR.GetString(SR.GenericTypeNameMismatch, dataContract.
StableName
.Name, dataContract.
StableName
.Namespace, genericStableName.Name, genericStableName.Namespace)));
587
referencedContract.
StableName
.Name,
588
referencedContract.
StableName
.Namespace)));
623
if (collectionContract.ItemName != itemContract.
StableName
.Name)
631
return (collectionContract.
StableName
.Name == expectedType.Name && collectionContract.
StableName
.Namespace == expectedType.Namespace);
680
dataContract.
StableName
.Name,
681
dataContract.
StableName
.Namespace,
821
string dataContractName = GetNameForAttribute(classDataContract.
StableName
.Name);
824
dataContractAttribute.Arguments.Add(new CodeAttributeArgument(Globals.NamespaceProperty, new CodePrimitiveExpression(classDataContract.
StableName
.Namespace)));
1001
if (dataContract.
StableName
!= pair.Key && !dataContract.KnownDataContracts.ContainsKey(pair.Key) && !pair.Value.IsBuiltInDataContract)
1072
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.GetString(SR.CannotDeriveFromSealedReferenceType, dataContract.
StableName
.Name, dataContract.
StableName
.Namespace, DataContract.GetClrTypeFullName(baseType))));
1090
string dataContractName = GetNameForAttribute(enumDataContract.
StableName
.Name);
1093
dataContractAttribute.Arguments.Add(new CodeAttributeArgument(Globals.NamespaceProperty, new CodePrimitiveExpression(enumDataContract.
StableName
.Namespace)));
1125
if (DataContract.GetDefaultStableNamespace(contractCodeDomInfo.ClrNamespace) != dataContract.
StableName
.Namespace)
1126
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(SR.GetString(SR.InvalidClrNamespaceGeneratedForISerializable, dataContract.
StableName
.Name, dataContract.
StableName
.Namespace, DataContract.GetDataContractNamespaceFromUri(dataContract.
StableName
.Namespace), contractCodeDomInfo.ClrNamespace)));
1127
string dataContractName = GetNameForAttribute(dataContract.
StableName
.Name);
1131
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(SR.GetString(SR.InvalidClrNameGeneratedForISerializable, dataContract.
StableName
.Name, dataContract.
StableName
.Namespace, contractCodeDomInfo.TypeDeclaration.Name)));
1174
if (keyValueContract != null && dataContractSet[keyValueContract.
StableName
] == null)
1193
string dataContractName = GetNameForAttribute(collectionContract.
StableName
.Name);
1199
collectionContract.
StableName
.Namespace)));
1221
string expectedTypeName = Globals.ArrayPrefix + itemContract.
StableName
.Name;
1222
string expectedTypeNs = DataContract.GetCollectionNamespace(itemContract.
StableName
.Namespace);
1224
dataContractName, collectionContract.
StableName
.Namespace,
1234
collectionContractAttribute.Arguments.Add(new CodeAttributeArgument(Globals.NamespaceProperty, new CodePrimitiveExpression(collectionContract.
StableName
.Namespace)));
1291
? SchemaImporter.ImportActualType(xmlDataContract.XsdType.Annotation, xmlDataContract.
StableName
, xmlDataContract.
StableName
)
1292
: xmlDataContract.
StableName
;
1299
(xmlDataContract.TopLevelElementName != null && xmlDataContract.TopLevelElementName.Value != xmlDataContract.
StableName
.Name) ||
1300
(xmlDataContract.TopLevelElementNamespace != null && xmlDataContract.TopLevelElementNamespace.Value != xmlDataContract.
StableName
.Namespace);
1434
if (!Namespaces.TryGetValue(dataContract.
StableName
.Namespace, out clrNamespace))
1442
clrNamespace = GetClrNamespace(dataContract.
StableName
.Namespace);
1456
AddNamespacePair(dataContract.
StableName
.Namespace, clrNamespace);
System\Runtime\Serialization\CollectionDataContract.cs (6)
604
this.StableName = CreateQualifiedName(Globals.ArrayPrefix + itemContract.
StableName
.Name, itemContract.
StableName
.Namespace);
1244
boundCollectionContract.ItemName = ItemNameSetExplicit ? this.ItemName : boundCollectionContract.ItemContract.
StableName
.Name;
1247
boundCollectionContract.StableName = CreateQualifiedName(DataContract.ExpandGenericParameters(XmlConvert.DecodeName(this.
StableName
.Name), new GenericNameProvider(DataContract.GetClrTypeFullName(this.UnderlyingType), paramContracts)),
1248
IsCollectionDataContract(UnderlyingType) ? this.
StableName
.Namespace : DataContract.GetCollectionNamespace(boundCollectionContract.ItemContract.
StableName
.Namespace));
System\Runtime\Serialization\DataContract.cs (14)
1510
stableName = builtInContract.
StableName
;
1619
genericInfo.Add(new GenericInfo(this.
StableName
, null));
1624
itemName = this.
StableName
;
1878
localName = dataContract.
StableName
.Name;
1879
ns = dataContract.
StableName
.Namespace;
2247
else if (nameToDataContractTable.TryGetValue(dataContract.
StableName
, out alreadyExistingContract))
2250
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.GetString(SR.DupContractInKnownTypes, type, alreadyExistingContract.UnderlyingType, dataContract.
StableName
.Namespace, dataContract.
StableName
.Name)));
2253
nameToDataContractTable.Add(dataContract.
StableName
, dataContract);
2279
return (
StableName
.Name == dataContract.
StableName
.Name &&
StableName
.Namespace == dataContract.
StableName
.Namespace && IsReference == dataContract.IsReference);
2532
genericParams[i] = qname = ((DataContract)o).
StableName
;
System\Runtime\Serialization\DataContractSet.cs (8)
116
Add(dataContract.
StableName
, dataContract);
134
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.GetString(SR.DupContractInDataContractSet, dataContract.
StableName
.Name, dataContract.
StableName
.Namespace)));
138
throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.GetString(SR.DupTypeContractInDataContractSet, (typeNamesEqual ? dataContract.UnderlyingType.AssemblyQualifiedName : DataContract.GetClrTypeFullName(dataContract.UnderlyingType)), (typeNamesEqual ? dataContractInSet.UnderlyingType.AssemblyQualifiedName : DataContract.GetClrTypeFullName(dataContractInSet.UnderlyingType)), dataContract.
StableName
.Name, dataContract.
StableName
.Namespace)));
165
Add(classDataContract.BaseContract.
StableName
, classDataContract.BaseContract);
184
Add(memberDataContract.
StableName
, memberDataContract);
202
Add(itemContract.
StableName
, itemContract);
System\Runtime\Serialization\Json\JsonDataContract.cs (4)
315
if (!knownDataContracts.ContainsKey(itemContract.
StableName
))
317
knownDataContracts.Add(itemContract.
StableName
, itemContract);
324
if (!knownDataContracts.ContainsKey(itemDataContract.
StableName
))
326
knownDataContracts.Add(itemDataContract.
StableName
, itemDataContract);
System\Runtime\Serialization\Json\JsonFormatReaderGenerator.cs (4)
65
TD.DCJsonGenReaderStart("Collection", collectionContract.
StableName
.Name);
125
BeginMethod(ilg, "Read" + classContract.
StableName
.Name + "FromJson", typeof(JsonFormatClassReaderDelegate), memberAccessFlag);
196
BeginMethod(ilg, "Read" + collectionContract.
StableName
.Name + "FromJson" + "IsGetOnly", typeof(JsonFormatGetOnlyCollectionReaderDelegate), memberAccessFlag);
200
BeginMethod(ilg, "Read" + collectionContract.
StableName
.Name + "FromJson", typeof(JsonFormatCollectionReaderDelegate), memberAccessFlag);
System\Runtime\Serialization\Json\JsonFormatWriterGenerator.cs (2)
95
BeginMethod(ilg, "Write" + classContract.
StableName
.Name + "ToJson", typeof(JsonFormatClassWriterDelegate), memberAccessFlag);
126
BeginMethod(ilg, "Write" + collectionContract.
StableName
.Name + "ToJson", typeof(JsonFormatCollectionWriterDelegate), memberAccessFlag);
System\Runtime\Serialization\Json\XmlObjectSerializerWriteContextComplexJson.cs (4)
356
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(SR.GetString(SR.DcTypeNotFoundOnSerialize, DataContract.GetClrTypeFullName(dataContract.UnderlyingType), dataContract.
StableName
.Name, dataContract.
StableName
.Namespace)));
388
if (rootTypeDataContract.
StableName
== typeQName)
404
if (itemContract.
StableName
== typeQName)
System\Runtime\Serialization\SchemaExporter.cs (13)
93
XmlSchema schema = GetSchema(dataContract.
StableName
.Namespace);
114
if (schema == null || dataContract.
StableName
.Namespace != dataContract.TopLevelElementNamespace.Value)
128
type.Name = classDataContract.
StableName
.Name;
146
actualTypeElement = ExportActualType(memberTypeContract.
StableName
);
147
SchemaHelper.AddSchemaImport(memberTypeContract.
StableName
.Namespace, schema);
164
XmlSchemaComplexContentExtension extension = CreateTypeContent(type, classDataContract.BaseContract.
StableName
, schema);
199
element.SchemaTypeName = dataContract.
StableName
;
204
SchemaHelper.AddSchemaImport(dataContract.
StableName
.Namespace, schema);
363
type.Name = collectionDataContract.
StableName
.Name;
423
type.Name = enumDataContract.
StableName
.Name;
462
type.Name = dataContract.
StableName
.Name;
471
XmlSchemaComplexContentExtension extension = CreateTypeContent(type, dataContract.BaseContract.
StableName
, schema);
511
if (!(typeQName.Equals(dataContract.
StableName
)))
System\Runtime\Serialization\SchemaImporter.cs (18)
115
elementTypeNames[i++] = ImportType(typeName).
StableName
;
122
elementTypeNames[i++] = ImportAnonymousElement(element, element.QualifiedName).
StableName
;
126
elementTypeNames[i++] = ImportAnonymousGlobalElement(element, element.QualifiedName, schema.TargetNamespace).
StableName
;
231
if (!knownDataContracts.TryGetValue(dataContract.
StableName
, out existingContract))
233
knownDataContracts.Add(dataContract.
StableName
, dataContract);
562
return (baseContract.
StableName
== expectedBase || baseContract is EnumDataContract);
678
ThrowTypeCannotBeImportedException(dataContract.
StableName
.Name, dataContract.
StableName
.Namespace, SR.GetString(SR.DerivedTypeNotISerializable, baseTypeName.Name, baseTypeName.Namespace));
856
ThrowISerializableTypeCannotBeImportedException(dataContract.
StableName
.Name, dataContract.
StableName
.Namespace, SR.GetString(SR.BaseTypeNotISerializable, baseTypeName.Name, baseTypeName.Namespace));
922
ThrowTypeCannotBeImportedException(dataContract.
StableName
.Name, dataContract.
StableName
.Namespace, SR.GetString(dataContract.IsISerializable ? SR.InvalidISerializableDerivation : SR.InvalidClassDerivation, baseTypeName.Name, baseTypeName.Namespace));
937
knownDataContracts.Add(dataContract.
StableName
, dataContract);
968
XmlQualifiedName typeName = dataContract.
StableName
;
1129
dataContractSet.Remove(keyValueContract.
StableName
);
1148
genericInfo.Add(new GenericInfo(dataMember.MemberTypeContract.
StableName
, null));
1152
genericInfo = new GenericInfo(dataMember.MemberTypeContract.
StableName
, null);
1419
dataContractSet.Add(dataContract.
StableName
, dataContract);
System\Runtime\Serialization\XmlDataContract.cs (4)
421
return (
StableName
.Name == dataContract.
StableName
.Name &&
StableName
.Namespace == dataContract.
StableName
.Namespace);
System\Runtime\Serialization\XmlFormatReaderGenerator.cs (7)
126
ilg.BeginMethod("Read" + classContract.
StableName
.Name + "FromXml", Globals.TypeOfXmlFormatClassReaderDelegate, memberAccessFlag);
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);
425
ReadValue(memberType, dataMember.Name, classContract.
StableName
.Namespace);
429
value = ReadValue(memberType, dataMember.Name, classContract.
StableName
.Namespace);
628
string itemNs = collectionContract.
StableName
.Namespace;
741
string itemNs = collectionContract.
StableName
.Namespace;
System\Runtime\Serialization\XmlFormatWriterGenerator.cs (4)
108
ilg.BeginMethod("Write" + classContract.
StableName
.Name + "ToXml", Globals.TypeOfXmlFormatClassWriterDelegate, memberAccessFlag);
138
ilg.BeginMethod("Write" + collectionContract.
StableName
.Name + "ToXml", Globals.TypeOfXmlFormatCollectionWriterDelegate, memberAccessFlag);
791
string ns = classContract.
StableName
.Namespace;
795
if (ns == currentContract.
StableName
.Namespace)
System\Runtime\Serialization\XmlObjectSerializerContext.cs (5)
272
DataContract knownContract = ResolveDataContractFromKnownTypes(dataContract.
StableName
.Name, dataContract.
StableName
.Namespace, null /*memberTypeContract*/, declaredType);
337
&& memberTypeContract.
StableName
== qname)
351
if (rootTypeDataContract.
StableName
== typeQName)
358
if (itemContract.
StableName
== typeQName)
System\Runtime\Serialization\XmlObjectSerializerReadContext.cs (2)
216
values["ISerializableType"] = dataContract.
StableName
.Namespace + ":" + dataContract.
StableName
.Name;
System\Runtime\Serialization\XmlObjectSerializerWriteContext.cs (2)
263
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(SR.GetString(SR.DcTypeNotFoundOnSerialize, DataContract.GetClrTypeFullName(dataContract.UnderlyingType), dataContract.
StableName
.Name, dataContract.
StableName
.Namespace)));
System\Runtime\Serialization\XsdDataContractExporter.cs (1)
198
return dataContract.
StableName
;