54 references to Format
System.Private.DataContractSerialization (54)
System\Runtime\Serialization\ClassDataContract.cs (5)
262
SR.
Format
((declaringType.IsEnum ? SR.DupEnumMemberValue : SR.DupMemberName),
756
SR.
Format
(SR.InconsistentIsReference,
1123
DataContract.ThrowInvalidDataContractException(SR.
Format
(SR.DuplicateCallback, method, currentCallback, DataContract.GetClrTypeFullName(method.DeclaringType), attributeType), method.DeclaringType);
1125
DataContract.ThrowInvalidDataContractException(SR.
Format
(SR.DuplicateAttribute, prevAttributeType, attributeType, DataContract.GetClrTypeFullName(method.DeclaringType), method), method.DeclaringType);
1149
ThrowInvalidDataContractException(SR.
Format
(SR.ValueTypeCannotHaveBaseType, XmlName!.Name, XmlName.Namespace, _baseContract.XmlName!.Name, _baseContract.XmlName.Namespace));
System\Runtime\Serialization\DataContract.cs (1)
2078
throw new InvalidOperationException(SR.
Format
(SR.DupContractInKnownTypes, type, alreadyExistingContract.UnderlyingType, dataContract.XmlName.Namespace, dataContract.XmlName.Name));
System\Runtime\Serialization\DataContractSet.cs (5)
115
throw 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));
326
throw new InvalidOperationException(SR.
Format
(SR.ReferencedTypesCannotContainNull));
347
throw new InvalidOperationException(SR.
Format
(SR.ReferencedCollectionTypesCannotContainNull));
450
throw new InvalidDataContractException(SR.
Format
(SR.GenericTypeNameMismatch, dataContract.XmlName.Name, dataContract.XmlName.Namespace, genericXmlName.Name, genericXmlName.Namespace));
598
errorMessage.Append(SR.
Format
(((other != null && other.Equals(dataContract)) ? SR.ReferencedTypeMatchingMessage : SR.ReferencedTypeNotMatchingMessage)));
System\Runtime\Serialization\EnumDataContract.cs (1)
171
SR.
Format
(SR.InvalidEnumBaseType, value.Name, value.Namespace, XmlName.Name, XmlName.Namespace));
System\Runtime\Serialization\ExtensionDataReader.cs (1)
475
throw new SerializationException(SR.
Format
(SR.InvalidStateInExtensionDataReader));
System\Runtime\Serialization\Json\XmlJsonWriter.cs (2)
780
throw new XmlException(SR.
Format
(SR.JsonServerTypeSpecifiedForInvalidDataType,
1227
throw new XmlException(SR.
Format
(SR.JsonInvalidDataTypeSpecifiedForServerType, JsonGlobals.typeString, dataTypeSpecified, JsonGlobals.serverTypeString, JsonGlobals.objectString));
System\Runtime\Serialization\SchemaExporter.cs (1)
637
throw new InvalidDataContractException(SR.
Format
(SR.InvalidReturnTypeOnGetSchemaMethod, DataContract.GetClrTypeFullName(clrType), methodName, DataContract.GetClrTypeFullName(getMethod.ReturnType), DataContract.GetClrTypeFullName(Globals.TypeOfXmlQualifiedName), typeof(XmlSchemaType)));
System\Runtime\Serialization\SchemaImporter.cs (33)
66
throw new ArgumentException(SR.
Format
(SR.CannotImportInvalidSchemas), ex);
75
throw new ArgumentException(SR.
Format
(SR.CannotImportNullSchema));
98
throw new ArgumentException(SR.
Format
(SR.CannotImportNullDataContractName));
421
ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.
Format
(SR.RedefineNotSupported));
428
ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.
Format
(SR.SimpleTypeUnionNotSupported));
458
ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.
Format
(SR.SimpleContentNotSupported));
462
ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.
Format
(SR.MixedContentNotSupported));
474
ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.
Format
(SR.ComplexTypeRestrictionNotSupported));
635
ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.
Format
(SR.RootSequenceMustBeRequired));
637
ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.
Format
(SR.RootSequenceMaxOccursMustBe));
647
ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.
Format
(SR.RootParticleMustBeSequence));
686
ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.
Format
(SR.MustContainOnlyLocalElements));
840
ThrowISerializableTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.
Format
(SR.ISerializableDerivedContainsOneOrMoreItems));
849
ThrowISerializableTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.
Format
(SR.ISerializableDoesNotContainAny));
852
ThrowISerializableTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.
Format
(SR.ISerializableDoesNotContainAny));
854
ThrowISerializableTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.
Format
(SR.ISerializableContainsMoreThanOneItems));
858
ThrowISerializableTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.
Format
(SR.ISerializableDoesNotContainAny));
1028
throw new InvalidDataContractException(SR.
Format
(SR.AnnotationAttributeNotFound, SchemaExporter.DefaultValueAnnotation.Name, typeName.Name, typeName.Namespace, Globals.EmitDefaultValueAttribute));
1040
throw new InvalidDataContractException(SR.
Format
(SR.AnnotationAttributeNotFound, SchemaExporter.ActualTypeAnnotationName.Name, typeName.Name, typeName.Namespace, Globals.ActualTypeNameAttribute));
1043
throw new InvalidDataContractException(SR.
Format
(SR.AnnotationAttributeNotFound, SchemaExporter.ActualTypeAnnotationName.Name, typeName.Name, typeName.Namespace, Globals.ActualTypeNamespaceAttribute));
1174
ThrowEnumTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.
Format
(SR.EnumListMustContainAnonymousType));
1178
ThrowEnumTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.
Format
(SR.EnumUnionInAnonymousTypeNotSupported));
1180
ThrowEnumTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.
Format
(SR.EnumListInAnonymousTypeNotSupported));
1186
ThrowEnumTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.
Format
(SR.EnumRestrictionInvalid));
1208
ThrowEnumTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.
Format
(SR.EnumOnlyEnumerationFacetsSupported));
1210
ThrowEnumTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.
Format
(SR.EnumEnumerationFacetsMustHaveValue));
1233
ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.
Format
(SR.SimpleTypeRestrictionDoesNotSpecifyBase));
1308
throw new InvalidDataContractException(SR.
Format
(SR.GenericAnnotationHasInvalidAttributeValue, argumentElement.LocalName, argumentElement.NamespaceURI, type.Name, nestedLevelAttribute.Value, nestedLevelAttribute.LocalName, Globals.TypeOfInt.Name));
1323
throw new InvalidDataContractException(SR.
Format
(SR.GenericAnnotationHasInvalidAttributeValue, typeElement.LocalName, typeElement.NamespaceURI, type.Name, typeNestedLevelsAttribute.Value, typeNestedLevelsAttribute.LocalName, Globals.TypeOfInt.Name));
1348
ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.
Format
(SR.AbstractTypeNotSupported));
1350
ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.
Format
(SR.MixedContentNotSupported));
1368
ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.
Format
(SR.AnyAttributeNotSupported));
1418
ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.
Format
(SR.InvalidAnnotationExpectingText, xmlElement.LocalName, xmlElement.NamespaceURI, child.LocalName, child.NamespaceURI));
System\Runtime\Serialization\XmlObjectSerializer.cs (1)
443
return XmlObjectSerializer.CreateSerializationException(TryAddLineInfo(reader, SR.
Format
(SR.EncounteredWithNameNamespace, errorMessage, reader.NodeType, reader.LocalName, reader.NamespaceURI)));
System\Runtime\Serialization\XmlObjectSerializerReadContext.cs (3)
160
throw XmlObjectSerializer.CreateSerializationException(XmlObjectSerializer.TryAddLineInfo(reader, SR.
Format
(SR.DcTypeNotFoundOnDeserialize, attributes.XsiTypeNamespace, attributes.XsiTypeName, reader.NamespaceURI, reader.LocalName)));
162
throw XmlObjectSerializer.CreateSerializationException(XmlObjectSerializer.TryAddLineInfo(reader, SR.
Format
(SR.DcTypeNotResolvedOnDeserialize, attributes.XsiTypeNamespace, attributes.XsiTypeName, reader.NamespaceURI, reader.LocalName)));
259
throw XmlObjectSerializer.CreateSerializationException(XmlObjectSerializer.TryAddLineInfo(xmlReader, SR.
Format
(SR.UnexpectedElementExpectingElements, xmlReader.NodeType, xmlReader.LocalName, xmlReader.NamespaceURI, stringBuilder.ToString())));
System\Xml\XmlBaseReader.cs (1)
184
XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.
Format
(valueSR)));