11 writes to XmlName
System.Private.DataContractSerialization (11)
System\Runtime\Serialization\ClassDataContract.cs (1)
1365boundClassContract.XmlName = CreateQualifiedName(DataContract.ExpandGenericParameters(XmlConvert.DecodeName(xmlName.Name), new GenericNameProvider(DataContract.GetClrTypeFullName(UnderlyingType), genericParams)), xmlName.Namespace);
System\Runtime\Serialization\CollectionDataContract.cs (1)
1405boundCollectionContract.XmlName = CreateQualifiedName(DataContract.ExpandGenericParameters(XmlConvert.DecodeName(XmlName.Name), new GenericNameProvider(DataContract.GetClrTypeFullName(UnderlyingType), paramContracts)),
System\Runtime\Serialization\DataContract.cs (1)
487dataContract.XmlName = originalDataContract.XmlName;
System\Runtime\Serialization\EnumDataContract.cs (2)
133_baseContract.XmlName = baseTypeName; 175_baseContract.XmlName = value;
System\Runtime\Serialization\SchemaImporter.cs (6)
656dataContract.XmlName = typeName; 707xmlDataContract.XmlName = typeName; 826dataContract.XmlName = typeName; 1052dataContract.XmlName = typeName; 1126dataContract.ItemContract.XmlName = new XmlQualifiedName(genericInfo.GetExpandedXmlName().Name, typeName.Namespace); 1196dataContract.XmlName = typeName;
169 references to XmlName
System.Private.DataContractSerialization (113)
System\Runtime\Serialization\ClassDataContract.cs (4)
991membersInHierarchy.Add(new Member(member, currContract.XmlName!.Namespace, baseTypeIndex)); 1151ThrowInvalidDataContractException(SR.Format(SR.ValueTypeCannotHaveBaseType, XmlName!.Name, XmlName.Namespace, _baseContract.XmlName!.Name, _baseContract.XmlName.Namespace)); 1330xmlName = XmlName;
System\Runtime\Serialization\CollectionDataContract.cs (6)
533XmlName = CreateQualifiedName(Globals.ArrayPrefix + itemContract.XmlName.Name, itemContract.XmlName.Namespace); 1402boundCollectionContract.ItemName = ItemNameSetExplicit ? ItemName : boundCollectionContract.ItemContract.XmlName.Name; 1405boundCollectionContract.XmlName = CreateQualifiedName(DataContract.ExpandGenericParameters(XmlConvert.DecodeName(XmlName.Name), new GenericNameProvider(DataContract.GetClrTypeFullName(UnderlyingType), paramContracts)), 1406IsCollectionDataContract(UnderlyingType) ? XmlName.Namespace : DataContract.GetCollectionNamespace(boundCollectionContract.ItemContract.XmlName.Namespace));
System\Runtime\Serialization\DataContract.cs (18)
484if (dataContract.XmlName != originalDataContract.XmlName) 487dataContract.XmlName = originalDataContract.XmlName; 1322xmlName = builtInContract.XmlName; 1436genericInfo.Add(new GenericInfo(XmlName, null)); 1442itemName = XmlName; 1604localName = dataContract.XmlName.Name; 1605ns = dataContract.XmlName.Namespace; 2030knownDataContracts.TryAdd(itemDataContract.XmlName, itemDataContract); 2056else if (nameToDataContractTable.TryGetValue(dataContract.XmlName, out DataContract? alreadyExistingContract)) 2061throw new InvalidOperationException(SR.Format(SR.DupContractInKnownTypes, type, alreadyExistingContract.UnderlyingType, dataContract.XmlName.Namespace, dataContract.XmlName.Name)); 2064nameToDataContractTable.Add(dataContract.XmlName, dataContract); 2079return (XmlName.Name == dataContract.XmlName.Name && XmlName.Namespace == dataContract.XmlName.Namespace && IsReference == dataContract.IsReference); 2352_genericParams[i] = qname = ((DataContract)o).XmlName;
System\Runtime\Serialization\DataContractSet.cs (12)
91Add(dataContract.XmlName, dataContract); 112throw new InvalidOperationException(SR.Format(SR.DupContractInDataContractSet, dataContract.XmlName.Name, dataContract.XmlName.Namespace)); 116throw new InvalidOperationException(SR.Format(SR.DupTypeContractInDataContractSet, (typeNamesEqual ? dataContract.UnderlyingType.AssemblyQualifiedName : DataContract.GetClrTypeFullName(dataContract.UnderlyingType)), (typeNamesEqual ? dataContractInSet.UnderlyingType.AssemblyQualifiedName : DataContract.GetClrTypeFullName(dataContractInSet.UnderlyingType)), dataContract.XmlName.Name, dataContract.XmlName.Namespace)); 145Add(classDataContract.BaseClassContract.XmlName, classDataContract.BaseClassContract); 166Add(memberDataContract.XmlName, memberDataContract); 188Add(itemContract.XmlName, itemContract); 450if (genericXmlName != dataContract.XmlName) 451throw new InvalidDataContractException(SR.Format(SR.GenericTypeNameMismatch, dataContract.XmlName.Name, dataContract.XmlName.Namespace, genericXmlName.Name, genericXmlName.Namespace)); 550xmlName = SchemaImporter.ImportActualType(xmlDataContract.XsdType?.Annotation, xmlName, dataContract.XmlName);
System\Runtime\Serialization\EnumDataContract.cs (1)
162get => _baseContract.XmlName;
System\Runtime\Serialization\Json\JsonDataContract.cs (2)
293_knownDataContracts.TryAdd(itemContract.XmlName, itemContract); 299_knownDataContracts.TryAdd(itemDataContract.XmlName, itemDataContract);
System\Runtime\Serialization\Json\JsonFormatReaderGenerator.cs (3)
70BeginMethod(_ilg, "Read" + DataContract.SanitizeTypeName(classContract.XmlName!.Name) + "FromJson", typeof(JsonFormatClassReaderDelegate), memberAccessFlag); 154BeginMethod(_ilg, "Read" + DataContract.SanitizeTypeName(collectionContract.XmlName.Name) + "FromJson" + "IsGetOnly", typeof(JsonFormatGetOnlyCollectionReaderDelegate), memberAccessFlag); 158BeginMethod(_ilg, "Read" + DataContract.SanitizeTypeName(collectionContract.XmlName.Name) + "FromJson", typeof(JsonFormatCollectionReaderDelegate), memberAccessFlag);
System\Runtime\Serialization\Json\JsonFormatWriterGenerator.cs (2)
63BeginMethod(_ilg, "Write" + DataContract.SanitizeTypeName(classContract.XmlName.Name) + "ToJson", typeof(JsonFormatClassWriterDelegate), memberAccessFlag); 90BeginMethod(_ilg, "Write" + DataContract.SanitizeTypeName(collectionContract.XmlName.Name) + "ToJson", typeof(JsonFormatCollectionWriterDelegate), memberAccessFlag);
System\Runtime\Serialization\Json\XmlObjectSerializerWriteContextComplexJson.cs (4)
275throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.DcTypeNotFoundOnSerialize, DataContract.GetClrTypeFullName(dataContract.UnderlyingType), dataContract.XmlName.Name, dataContract.XmlName.Namespace)); 405if (rootTypeDataContract.XmlName == typeQName) 421if (itemContract.XmlName == typeQName)
System\Runtime\Serialization\ReflectionReader.cs (1)
239var value = ReflectionReadValue(xmlReader, context, dataMember, classContract.XmlName.Namespace);
System\Runtime\Serialization\ReflectionXmlFormatReader.cs (2)
109return classContract.XmlName!.Namespace; 119return collectionContract.XmlName.Namespace;
System\Runtime\Serialization\ReflectionXmlFormatWriter.cs (2)
238string? ns = classContract.XmlName.Namespace; 242if (ns == currentContract.XmlName.Namespace)
System\Runtime\Serialization\SchemaExporter.cs (13)
86XmlSchema schema = GetSchema(dataContract.XmlName.Namespace); 106if (schema == null || dataContract.XmlName.Namespace != dataContract.TopLevelElementNamespace!.Value) 122type.Name = classDataContract.XmlName.Name; 140actualTypeElement = ExportActualType(memberTypeContract.XmlName); 141SchemaHelper.AddSchemaImport(memberTypeContract.XmlName.Namespace, schema); 158XmlSchemaComplexContentExtension extension = CreateTypeContent(type, classDataContract.BaseClassContract.XmlName, schema); 192element.SchemaTypeName = dataContract.XmlName; 197SchemaHelper.AddSchemaImport(dataContract.XmlName.Namespace, schema); 364type.Name = collectionDataContract.XmlName.Name; 426type.Name = enumDataContract.XmlName.Name; 467type.Name = dataContract.XmlName.Name; 476_ = CreateTypeContent(type, dataContract.BaseClassContract.XmlName, schema); 518if (!(typeQName.Equals(dataContract.XmlName)))
System\Runtime\Serialization\SchemaImporter.cs (18)
110elementNameList.Add(ImportType(typeName).XmlName); 117elementNameList.Add(ImportAnonymousElement(element, element.QualifiedName).XmlName); 121elementNameList.Add(ImportAnonymousGlobalElement(element, element.QualifiedName, schema.TargetNamespace).XmlName); 230if (!knownDataContracts.TryGetValue(dataContract.XmlName, out _)) 232knownDataContracts.Add(dataContract.XmlName, dataContract); 558return (baseContract.XmlName == expectedBase || baseContract is EnumDataContract); 670ThrowTypeCannotBeImportedException(dataContract.XmlName.Name, dataContract.XmlName.Namespace, SR.Format(SR.DerivedTypeNotISerializable, baseTypeName.Name, baseTypeName.Namespace)); 838ThrowISerializableTypeCannotBeImportedException(dataContract.XmlName.Name, dataContract.XmlName.Namespace, SR.Format(SR.BaseTypeNotISerializable, baseTypeName.Name, baseTypeName.Namespace)); 903ThrowTypeCannotBeImportedException(dataContract.XmlName.Name, dataContract.XmlName.Namespace, SR.Format(dataContract.IsISerializable ? SR.InvalidISerializableDerivation : SR.InvalidClassDerivation, baseTypeName.Name, baseTypeName.Namespace)); 913knownDataContracts.Add(dataContract.XmlName, dataContract); 946XmlQualifiedName typeName = dataContract.XmlName; 1120_dataContractSet.Remove(keyValueContract.XmlName); 1141genericInfo.Add(new GenericInfo(dataMember.MemberTypeContract.XmlName, null)); 1145genericInfo = new GenericInfo(dataMember.MemberTypeContract.XmlName, null); 1407_dataContractSet.Add(dataContract.XmlName, dataContract);
System\Runtime\Serialization\XmlDataContract.cs (4)
401return (XmlName.Name == dataContract.XmlName.Name && XmlName.Namespace == dataContract.XmlName.Namespace);
System\Runtime\Serialization\XmlFormatReaderGenerator.cs (7)
92_ilg.BeginMethod("Read" + classContract.XmlName.Name + "FromXml", Globals.TypeOfXmlFormatClassReaderDelegate, memberAccessFlag); 220_ilg.BeginMethod("Read" + collectionContract.XmlName.Name + "FromXml" + "IsGetOnly", Globals.TypeOfXmlFormatGetOnlyCollectionReaderDelegate, memberAccessFlag); 224_ilg.BeginMethod("Read" + collectionContract.XmlName.Name + "FromXml" + string.Empty, Globals.TypeOfXmlFormatCollectionReaderDelegate, memberAccessFlag); 446ReadValue(memberType, dataMember.Name, classContract.XmlName.Namespace); 451value = ReadValue(memberType, dataMember.Name, classContract.XmlName.Namespace); 665string itemNs = collectionContract.XmlName.Namespace; 781string itemNs = collectionContract.XmlName.Namespace;
System\Runtime\Serialization\XmlFormatWriterGenerator.cs (4)
86_ilg.BeginMethod("Write" + classContract.XmlName.Name + "ToXml", Globals.TypeOfXmlFormatClassWriterDelegate, memberAccessFlag); 130_ilg.BeginMethod("Write" + collectionContract.XmlName.Name + "ToXml", Globals.TypeOfXmlFormatCollectionWriterDelegate, memberAccessFlag); 798string ns = classContract.XmlName.Namespace; 802if (ns == currentContract.XmlName.Namespace)
System\Runtime\Serialization\XmlObjectSerializerContext.cs (5)
230DataContract? knownContract = ResolveDataContractFromKnownTypes(dataContract.XmlName.Name, dataContract.XmlName.Namespace, null /*memberTypeContract*/, declaredType); 268&& memberTypeContract.XmlName == qname) 274if (rootTypeDataContract.XmlName == qname) 291if (itemContract.XmlName == typeQName)
System\Runtime\Serialization\XmlObjectSerializerWriteContext.cs (4)
245DataContract? knownContract = ResolveDataContractFromKnownTypes(dataContract.XmlName.Name, dataContract.XmlName.Namespace, null /*memberTypeContract*/, declaredType); 248throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.DcTypeNotFoundOnSerialize, DataContract.GetClrTypeFullName(dataContract.UnderlyingType), dataContract.XmlName.Name, dataContract.XmlName.Namespace));
System\Runtime\Serialization\XsdDataContractExporter.cs (1)
198return dataContract.XmlName;
System.Runtime.Serialization.Schema (56)
System\Runtime\Serialization\Schema\CodeExporter.cs (56)
62_clrNamespaces.Add(clrNamespace, dataContract.XmlName.Namespace); 63_namespaces.Add(dataContract.XmlName.Namespace, clrNamespace); 226ExportClassDataContractHierarchy(dataContract.XmlName, dataContract, contractCodeDomInfo, new Dictionary<XmlQualifiedName, object?>()); 264if (contractNamesInHierarchy.ContainsKey(classContract.XmlName)) 265throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(SR.Format(SR.TypeCannotBeImported, typeName.Name, typeName.Namespace, SR.Format(SR.CircularTypeReference, classContract.XmlName.Name, classContract.XmlName.Namespace)))); 266contractNamesInHierarchy.Add(classContract.XmlName, null); 424CodeNamespace ns = GetCodeNamespace(clrNamespace, dataContract.XmlName.Namespace, contractCodeDomInfo); 428string typeName = XmlConvert.DecodeName(dataContract.XmlName.Name); 473string originalName = dataContract.XmlName.Name; 478DataContract? containingDataContract = _dataContractSet.GetDataContract(new XmlQualifiedName(containingTypeName, dataContract.XmlName.Namespace)); 541Type? type = _dataContractSet.GetReferencedType(dataContract.XmlName, dataContract, out DataContract? referencedContract, out object[]? parameters, SupportsGenericTypeReference); 551throw ExceptionUtil.ThrowHelperError(new InvalidOperationException(SR.Format(SR.ReferencedTypeDoesNotMatch, type.AssemblyQualifiedName, dataContract.XmlName.Name, dataContract.XmlName.Namespace))); 560throw ExceptionUtil.ThrowHelperError(new InvalidDataContractException(SR.Format(SR.TypeMustBeIXmlSerializable, GetClrTypeFullName(type), GetClrTypeFullName(typeof(IXmlSerializable)), dataContract.XmlName.Name, dataContract.XmlName.Namespace))); 569throw ExceptionUtil.ThrowHelperError(new InvalidOperationException(SR.Format(SR.ReferencedTypeDoesNotMatch, type.AssemblyQualifiedName, dataContract.XmlName.Name, dataContract.XmlName.Namespace))); 581referencedContract.XmlName.Name, 582referencedContract.XmlName.Namespace))); 636if (itemName != itemContract.XmlName.Name) 643return (collectionContract.XmlName.Name == expectedType.Name && collectionContract.XmlName.Namespace == expectedType.Namespace); 716if (DataContract.GetBuiltInDataContract(dataContract.XmlName.Name, dataContract.XmlName.Namespace) == null) 717type = surrogateProvider.GetReferencedTypeOnImport(dataContract.XmlName.Name, dataContract.XmlName.Namespace, _dataContractSet.SurrogateData[dataContract]); 797string dataContractName = GetNameForAttribute(classDataContract.XmlName.Name); 800dataContractAttribute.Arguments.Add(new CodeAttributeArgument(ImportGlobals.NamespaceProperty, new CodePrimitiveExpression(classDataContract.XmlName.Namespace))); 977if (classDataContract.XmlName != pair.Key && !classDataContract.KnownDataContracts.ContainsKey(pair.Key) && !pair.Value.IsBuiltInDataContract) 1054throw ExceptionUtil.ThrowHelperError(new InvalidOperationException(SR.Format(SR.CannotDeriveFromSealedReferenceType, dataContract.XmlName.Name, dataContract.XmlName.Namespace, GetClrTypeFullName(baseType)))); 1080string dataContractName = GetNameForAttribute(enumDataContract.XmlName.Name); 1083dataContractAttribute.Arguments.Add(new CodeAttributeArgument(ImportGlobals.NamespaceProperty, new CodePrimitiveExpression(enumDataContract.XmlName.Namespace))); 1115if (SchemaImportHelper.GetDefaultXmlNamespace(contractCodeDomInfo.ClrNamespace) != classDataContract.XmlName.Namespace) 1116throw ExceptionUtil.ThrowHelperError(new InvalidDataContractException(SR.Format(SR.InvalidClrNamespaceGeneratedForISerializable, classDataContract.XmlName.Name, classDataContract.XmlName.Namespace, SchemaImportHelper.GetDataContractNamespaceFromUri(classDataContract.XmlName.Namespace), contractCodeDomInfo.ClrNamespace))); 1118string dataContractName = GetNameForAttribute(classDataContract.XmlName.Name); 1126throw ExceptionUtil.ThrowHelperError(new InvalidDataContractException(SR.Format(SR.InvalidClrNameGeneratedForISerializable, classDataContract.XmlName.Name, classDataContract.XmlName.Namespace, contractCodeDomInfo.TypeDeclaration.Name))); 1173if (keyValueContract != null && _dataContractSet.GetDataContract(keyValueContract.XmlName) == null) 1197string dataContractName = GetNameForAttribute(collectionContract.XmlName.Name); 1203collectionContract.XmlName.Namespace))); 1227string expectedTypeName = ImportGlobals.ArrayPrefix + itemContract.XmlName.Name; 1228string expectedTypeNs = SchemaImportHelper.GetCollectionNamespace(itemContract.XmlName.Namespace); 1230dataContractName, collectionContract.XmlName.Namespace, 1243collectionContractAttribute.Arguments.Add(new CodeAttributeArgument(ImportGlobals.NamespaceProperty, new CodePrimitiveExpression(collectionContract.XmlName.Namespace))); 1307? XsdDataContractImporter.ImportActualType(xmlDataContract.XsdType?.Annotation, xmlDataContract.XmlName, xmlDataContract.XmlName) 1308: xmlDataContract.XmlName; 1315(xmlDataContract.TopLevelElementName != null && xmlDataContract.TopLevelElementName.Value != xmlDataContract.XmlName.Name) || 1316(xmlDataContract.TopLevelElementNamespace != null && xmlDataContract.TopLevelElementNamespace.Value != xmlDataContract.XmlName.Namespace); 1455if (!Namespaces.TryGetValue(dataContract.XmlName.Namespace, out clrNamespace)) 1463clrNamespace = GetClrNamespace(dataContract.XmlName.Namespace); 1477AddNamespacePair(dataContract.XmlName.Namespace, clrNamespace);