1281 references to SR
System.Private.DataContractSerialization (1281)
System\Runtime\Serialization\AccessorBuilder.cs (6)
91throw new InvalidOperationException(SR.Format(SR.InvalidMember, DataContract.GetClrTypeFullName(memberInfo.DeclaringType!), memberInfo.Name)); 143throw new InvalidOperationException(SR.Format(SR.NoSetMethodForProperty, propInfo.DeclaringType, propInfo.Name)); 155throw new InvalidOperationException(SR.Format(SR.InvalidMember, DataContract.GetClrTypeFullName(memberInfo.DeclaringType!), memberInfo.Name));
System\Runtime\Serialization\Attributes.cs (6)
108throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.InvalidXsIdDefinition, Id)); 117throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.InvalidXsRefDefinition, Ref)); 130throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.InvalidSizeDefinition, ArraySZSize));
System\Runtime\Serialization\ClassDataContract.cs (79)
262SR.Format((declaringType.IsEnum ? SR.DupEnumMemberValue : SR.DupMemberName), 411throw new SecurityException(SR.Format( 412SR.PartialTrustDataContractTypeNotPublic, 425throw new SecurityException(SR.Format( 426SR.PartialTrustIXmlSerialzableNoPublicConstructor, 437throw new SecurityException(SR.Format( 438SR.PartialTrustNonAttributedSerializableTypeNoPublicConstructor, 449throw new SecurityException(SR.Format( 450SR.PartialTrustDataContractOnDeserializingNotPublic, 462throw new SecurityException(SR.Format( 463SR.PartialTrustDataContractOnDeserializedNotPublic, 481throw new SecurityException(SR.Format( 482SR.PartialTrustDataContractFieldSetNotPublic, 489throw new SecurityException(SR.Format( 490SR.PartialTrustDataContractPropertySetNotPublic, 517throw new SecurityException(SR.Format( 518SR.PartialTrustDataContractTypeNotPublic, 532throw new SecurityException(SR.Format( 533SR.PartialTrustDataContractOnSerializingNotPublic, 545throw new SecurityException(SR.Format( 546SR.PartialTrustDataContractOnSerializedNotPublic, 564throw new SecurityException(SR.Format( 565SR.PartialTrustDataContractFieldGetNotPublic, 572throw new SecurityException(SR.Format( 573SR.PartialTrustDataContractPropertyGetNotPublic, 639throw new InvalidDataContractException(SR.Format(SR.ISerializableCannotHaveDataContract, DataContract.GetClrTypeFullName(type))); 660throw new InvalidDataContractException(SR.Format(SR.AttributedTypesCannotInheritFromNonAttributedSerializableTypes, 672throw new InvalidDataContractException(SR.Format(SR.OnlyDataContractTypesCanHaveExtensionData, DataContract.GetClrTypeFullName(type))); 758SR.Format(SR.InconsistentIsReference, 784SR.Format(SR.ValueTypeCannotHaveIsReference, 826ThrowInvalidDataContractException(SR.Format(SR.TooManyDataMembers, DataContract.GetClrTypeFullName(member.DeclaringType!), member.Name)); 839ThrowInvalidDataContractException(SR.Format(SR.NoGetMethodForProperty, property.DeclaringType, property.Name)); 844_serializationExceptionMessage = SR.Format(SR.NoSetMethodForProperty, property.DeclaringType, property.Name); 848ThrowInvalidDataContractException(SR.Format(SR.IndexedPropertyCannotBeSerialized, property.DeclaringType, property.Name)); 851ThrowInvalidDataContractException(SR.Format(SR.InvalidMember, DataContract.GetClrTypeFullName(type), member.Name)); 857ThrowInvalidDataContractException(SR.Format(SR.InvalidDataMemberName, member.Name, DataContract.GetClrTypeFullName(type))); 869SR.Format(SR.IsRequiredDataMemberOnIsReferenceDataContractType, 889ThrowInvalidDataContractException(SR.Format(SR.TooManyIgnoreDataMemberAttributes, DataContract.GetClrTypeFullName(member.DeclaringType!), member.Name)); 939SR.Format(SR.NonOptionalFieldMemberOnIsReferenceSerializableType, 1108ThrowInvalidDataContractException(SR.Format(SR.DuplicateExtensionDataSetMethod, method, _extensionDataSetMethod, DataContract.GetClrTypeFullName(method.DeclaringType))); 1110DataContract.ThrowInvalidDataContractException(SR.Format(SR.ExtensionDataSetMustReturnVoid, DataContract.GetClrTypeFullName(method.DeclaringType), method), method.DeclaringType); 1112DataContract.ThrowInvalidDataContractException(SR.Format(SR.ExtensionDataSetParameterInvalid, DataContract.GetClrTypeFullName(method.DeclaringType), method, Globals.TypeOfExtensionDataObject), method.DeclaringType); 1125DataContract.ThrowInvalidDataContractException(SR.Format(SR.DuplicateCallback, method, currentCallback, DataContract.GetClrTypeFullName(method.DeclaringType), attributeType), method.DeclaringType); 1127DataContract.ThrowInvalidDataContractException(SR.Format(SR.DuplicateAttribute, prevAttributeType, attributeType, DataContract.GetClrTypeFullName(method.DeclaringType), method), method.DeclaringType); 1129DataContract.ThrowInvalidDataContractException(SR.Format(SR.CallbacksCannotBeVirtualMethods, method, DataContract.GetClrTypeFullName(method.DeclaringType), attributeType), method.DeclaringType); 1133DataContract.ThrowInvalidDataContractException(SR.Format(SR.CallbackMustReturnVoid, DataContract.GetClrTypeFullName(method.DeclaringType), method), method.DeclaringType); 1135DataContract.ThrowInvalidDataContractException(SR.Format(SR.CallbackParameterInvalid, DataContract.GetClrTypeFullName(method.DeclaringType), method, Globals.TypeOfStreamingContext), method.DeclaringType); 1151ThrowInvalidDataContractException(SR.Format(SR.ValueTypeCannotHaveBaseType, XmlName!.Name, XmlName.Namespace, _baseContract.XmlName!.Name, _baseContract.XmlName.Namespace)); 1233internal string? DeserializationExceptionMessage => (_serializationExceptionMessage == null) ? null : SR.Format(SR.ReadOnlyClassDeserialization, _serializationExceptionMessage); 1250throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.SerializationInfo_ConstructorNotFound, DataContract.GetClrTypeFullName(UnderlyingType))); 1267throw new InvalidDataContractException(SR.Format(SR.NonAttributedSerializableTypesMustHaveDefaultConstructor, DataContract.GetClrTypeFullName(type)));
System\Runtime\Serialization\CodeGenerator.cs (27)
419throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.ParameterCountMismatch, methodInfo.Name, methodInfo.GetParameters().Length, expectedCount)); 591throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.NoGetMethodForProperty, property.DeclaringType, property)); 600throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.CannotLoadMemberType, "Unknown", memberInfo.DeclaringType, memberInfo.Name)); 622throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.NoSetMethodForProperty, property.DeclaringType, property)); 628throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.CannotLoadMemberType, "Unknown")); 696throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.CanOnlyStoreIntoArgOrLocGot0, DataContract.GetClrTypeFullName(var.GetType()))); 819throw new NotSupportedException(SR.CharIsInvalidPrimitive); 853throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.UnknownConstantType, DataContract.GetClrTypeFullName(valueType))); 992throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.ArrayTypeIsNotSupported_GeneratingCode, DataContract.GetClrTypeFullName(arrayElementType))); 1030throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.ArrayTypeIsNotSupported_GeneratingCode, DataContract.GetClrTypeFullName(arrayElementType))); 1160throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.NoConversionPossibleTo, DataContract.GetClrTypeFullName(target))); 1173throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.IsNotAssignableFrom, DataContract.GetClrTypeFullName(target), DataContract.GetClrTypeFullName(source))); 1193throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.IsNotAssignableFrom, DataContract.GetClrTypeFullName(target), DataContract.GetClrTypeFullName(source))); 1208throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.ExpectingEnd, expected.ToString()));
System\Runtime\Serialization\CollectionDataContract.cs (58)
355throw new InvalidDataContractException(SR.Format(SR.GetOnlyCollectionMustHaveAddMethod, GetClrTypeFullName(UnderlyingType))); 365throw new InvalidDataContractException(SR.Format(SR.GetOnlyCollectionMustHaveAddMethod, GetClrTypeFullName(UnderlyingType))); 459throw new InvalidDataContractException(SR.Format(SR.InvalidCollectionContractItemName, DataContract.GetClrTypeFullName(UnderlyingType))); 466throw new InvalidDataContractException(SR.Format(SR.InvalidCollectionContractKeyName, DataContract.GetClrTypeFullName(UnderlyingType))); 468throw new InvalidDataContractException(SR.Format(SR.InvalidCollectionContractKeyNoDictionary, DataContract.GetClrTypeFullName(UnderlyingType), collectionContractAttribute.KeyName)); 474throw new InvalidDataContractException(SR.Format(SR.InvalidCollectionContractValueName, DataContract.GetClrTypeFullName(UnderlyingType))); 476throw new InvalidDataContractException(SR.Format(SR.InvalidCollectionContractValueNoDictionary, DataContract.GetClrTypeFullName(UnderlyingType), collectionContractAttribute.ValueName)); 507throw new NotSupportedException(SR.SupportForMultidimensionalArraysNotPresent); 532throw new NotSupportedException(SR.SupportForMultidimensionalArraysNotPresent); 548throw new InvalidDataContractException(SR.Format(SR.CollectionMustHaveGetEnumeratorMethod, GetClrTypeFullName(type))); 550throw new InvalidDataContractException(SR.Format(SR.CollectionMustHaveItemType, GetClrTypeFullName(type))); 571throw new InvalidDataContractException(SR.Format(SR.CollectionMustHaveAddMethod, DataContract.GetClrTypeFullName(type))); 614SR.Format(SR.DupKeyValueName, DataContract.GetClrTypeFullName(UnderlyingType), KeyName), 1017SR.CollectionTypeCannotBeBuiltIn, null, ref dataContract); 1037SR.CollectionTypeCannotHaveDataContract, null, ref dataContract); 1048SR.CollectionTypeIsNotIEnumerable, null, ref dataContract); 1118SR.CollectionTypeDoesNotHaveDefaultCtor, null, ref dataContract); 1124GetReadOnlyCollectionExceptionMessages(type, hasCollectionDataContract, SR.CollectionTypeDoesNotHaveDefaultCtor, null, out serializationExceptionMessage, out deserializationExceptionMessage); 1158SR.CollectionTypeIsNotIEnumerable, null, ref dataContract); 1182SR.CollectionTypeDoesNotHaveAddMethod, DataContract.GetClrTypeFullName(itemType), ref dataContract); 1188GetReadOnlyCollectionExceptionMessages(type, hasCollectionDataContract, SR.CollectionTypeDoesNotHaveAddMethod, DataContract.GetClrTypeFullName(itemType), out serializationExceptionMessage, out deserializationExceptionMessage); 1204SR.CollectionTypeHasMultipleDefinitionsOfInterface, KnownInterfaces[(int)kind - 1].Name, ref dataContract); 1260throw new InvalidDataContractException(GetInvalidCollectionMessage(message, SR.Format(SR.InvalidCollectionDataContract, DataContract.GetClrTypeFullName(type)), param)); 1267dataContract = new CollectionDataContract(type, GetInvalidCollectionMessage(message, SR.Format(SR.InvalidCollectionType, DataContract.GetClrTypeFullName(type)), param)); 1276serializationExceptionMessage = GetInvalidCollectionMessage(message, SR.Format(hasCollectionDataContract ? SR.InvalidCollectionDataContract : SR.InvalidCollectionType, GetClrTypeFullName(type)), param); 1277deserializationExceptionMessage = GetInvalidCollectionMessage(message, SR.Format(SR.ReadOnlyCollectionDeserialization, GetClrTypeFullName(type)), param); 1282return (param == null) ? SR.Format(message, nestedMessage) : SR.Format(message, nestedMessage, param); 1430throw new InvalidDataContractException(SR.Format(SR.CollectionTypeDoesNotHaveDefaultCtor, DataContract.GetClrTypeFullName(UnderlyingType))); 1454throw new SecurityException(SR.Format( 1455SR.PartialTrustCollectionContractTypeNotPublic, 1465throw new SecurityException(SR.Format( 1466SR.PartialTrustCollectionContractTypeNotPublic, 1476throw new SecurityException(SR.Format( 1477SR.PartialTrustCollectionContractNoPublicConstructor, 1487throw new SecurityException(SR.Format( 1488SR.PartialTrustCollectionContractAddMethodNotPublic, 1510throw new SecurityException(SR.Format( 1511SR.PartialTrustCollectionContractTypeNotPublic, 1521throw new SecurityException(SR.Format( 1522SR.PartialTrustCollectionContractTypeNotPublic,
System\Runtime\Serialization\DataContract.cs (68)
92throw new SerializationException(SR.Format(SR.ErrorDeserializing, SR.Format(SR.ErrorTypeInfo, DataContract.GetClrTypeFullName(dataContract.UnderlyingType)), SR.Format(SR.NoSetMethodForProperty, string.Empty, string.Empty))); 171throw new InvalidDataContractException(SR.Format(SR.UnexpectedContractType, DataContract.GetClrTypeFullName(GetType()), DataContract.GetClrTypeFullName(UnderlyingType))); 178throw new InvalidDataContractException(SR.Format(SR.UnexpectedContractType, DataContract.GetClrTypeFullName(GetType()), DataContract.GetClrTypeFullName(UnderlyingType))); 185throw new InvalidDataContractException(SR.Format(SR.UnexpectedContractType, DataContract.GetClrTypeFullName(GetType()), DataContract.GetClrTypeFullName(UnderlyingType))); 190throw new InvalidDataContractException(SR.Format(SR.UnexpectedContractType, DataContract.GetClrTypeFullName(GetType()), DataContract.GetClrTypeFullName(UnderlyingType))); 363throw new SerializationException(SR.DataContractCacheOverflow); 383throw new SerializationException(SR.DataContractCacheOverflow); 411throw new SerializationException(SR.DataContractCacheOverflow); 477ThrowInvalidDataContractException(SR.Format(SR.TypeNotSerializable, type), type); 521ThrowInvalidDataContractException(SR.Format(SR.TypeNotSerializable, type), type); 1003set => ThrowInvalidDataContractException(SR.RequiresClassDataContractToSetIsISerializable); 1145throw new InvalidDataContractException(SR.Format(SR.RecursiveCollectionType, GetClrTypeFullName(itemType))); 1267throw new InvalidDataContractException(SR.Format(SR.InvalidDataContractName, DataContract.GetClrTypeFullName(type))); 1279throw new InvalidDataContractException(SR.Format(SR.InvalidDataContractNamespace, DataContract.GetClrTypeFullName(type))); 1347throw new InvalidDataContractException(SR.Format(SR.TooManyDataContracts, DataContract.GetClrTypeFullName(type))); 1372throw new InvalidDataContractException(SR.Format(SR.TooManyCollectionContracts, DataContract.GetClrTypeFullName(type))); 1379throw new InvalidDataContractException(SR.Format(SR.InvalidCollectionContractName, DataContract.GetClrTypeFullName(type))); 1391throw new InvalidDataContractException(SR.Format(SR.InvalidCollectionContractNamespace, DataContract.GetClrTypeFullName(type))); 1652ThrowInvalidDataContractException(SR.Format(SR.DataContractNamespaceIsNotValid, dataContractNs), type); 1664ThrowInvalidDataContractException(SR.Format(SR.DataContractNamespaceReserved, Globals.SerializationNamespace), type); 1669ThrowInvalidDataContractException(SR.Format(SR.DataContractNamespaceIsNotValid, dataContractNs), type); 1711throw new InvalidDataContractException(SR.Format(SR.InvalidGlobalDataContractNamespace, clrNs)); 1713throw new InvalidDataContractException(SR.Format(SR.DataContractNamespaceAlreadySet, dataContractNs, nsAttribute.ContractNamespace, clrNs)); 1895throw new InvalidDataContractException(SR.Format(SR.GenericNameBraceMismatch, format, genericNameProvider.GetGenericTypeName())); 1913throw new InvalidDataContractException(SR.Format(SR.GenericParameterNotValid, format.Substring(start, i - start), genericNameProvider.GetGenericTypeName(), genericNameProvider.GetParameterCount() - 1)); 1962DataContract.ThrowInvalidDataContractException(SR.Format(SR.KnownTypeAttributeOneScheme, DataContract.GetClrTypeFullName(type)), type); 1972DataContract.ThrowInvalidDataContractException(SR.Format(SR.KnownTypeAttributeOneScheme, DataContract.GetClrTypeFullName(type)), type); 1978DataContract.ThrowInvalidDataContractException(SR.Format(SR.KnownTypeAttributeNoData, DataContract.GetClrTypeFullName(type)), type); 1982DataContract.ThrowInvalidDataContractException(SR.Format(SR.KnownTypeAttributeEmptyString, DataContract.GetClrTypeFullName(type)), type); 1986DataContract.ThrowInvalidDataContractException(SR.Format(SR.KnownTypeAttributeUnknownMethod, methodName, DataContract.GetClrTypeFullName(type)), type); 1989DataContract.ThrowInvalidDataContractException(SR.Format(SR.KnownTypeAttributeReturnType, DataContract.GetClrTypeFullName(type), methodName), type); 1994DataContract.ThrowInvalidDataContractException(SR.Format(SR.KnownTypeAttributeMethodNull, DataContract.GetClrTypeFullName(type)), type); 2000DataContract.ThrowInvalidDataContractException(SR.Format(SR.KnownTypeAttributeValidMethodTypes, DataContract.GetClrTypeFullName(type)), type); 2061throw new InvalidOperationException(SR.Format(SR.DupContractInKnownTypes, type, alreadyExistingContract.UnderlyingType, dataContract.XmlName.Namespace, dataContract.XmlName.Name));
System\Runtime\Serialization\DataContractSerializer.cs (13)
54throw new InvalidOperationException(SR.CannotSetTwice); 370throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.ExceededMaxItemsQuota, MaxItemsInObjectGraph)); 386throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.IsAnyCannotBeNull, declaredType)); 408throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.IsAnyCannotBeSerializedAsDerivedType, graphType, contract.UnderlyingType)); 462throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.ExceededMaxItemsQuota, MaxItemsInObjectGraph)); 482throw XmlObjectSerializer.CreateSerializationExceptionWithReaderDetails(SR.Format(SR.ExpectingElement, expectedNs, expectedName), xmlReader); 487throw XmlObjectSerializer.CreateSerializationExceptionWithReaderDetails(SR.Format(SR.ExpectingElementAtDeserialize, XmlNodeType.Element), xmlReader);
System\Runtime\Serialization\DataContractSet.cs (23)
75throw new InvalidDataContractException(SR.Format(SR.GenericTypeNotExportable, type)); 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)); 275throw new InvalidDataContractException(SR.Format(SR.SurrogatesWithGetOnlyCollectionsNotSupported, 327throw new InvalidOperationException(SR.Format(SR.ReferencedTypesCannotContainNull)); 348throw new InvalidOperationException(SR.Format(SR.ReferencedCollectionTypesCannotContainNull)); 451throw new InvalidDataContractException(SR.Format(SR.GenericTypeNameMismatch, dataContract.XmlName.Name, dataContract.XmlName.Namespace, genericXmlName.Name, genericXmlName.Namespace)); 599errorMessage.Append(SR.Format(((other != null && other.Equals(dataContract)) ? SR.ReferencedTypeMatchingMessage : SR.ReferencedTypeNotMatchingMessage))); 604throw new InvalidOperationException(SR.Format( 605(useReferencedCollectionTypes ? SR.AmbiguousReferencedCollectionTypes1 : SR.AmbiguousReferencedTypes1), 610throw new InvalidOperationException(SR.Format( 611(useReferencedCollectionTypes ? SR.AmbiguousReferencedCollectionTypes3 : SR.AmbiguousReferencedTypes3),
System\Runtime\Serialization\EnumDataContract.cs (18)
149SR.Format(SR.EnumTypeCannotHaveIsReference, 171SR.Format(SR.InvalidEnumBaseType, value.Name, value.Namespace, XmlName.Name, XmlName.Namespace)); 233ThrowInvalidDataContractException(SR.Format(SR.TooManyEnumMembers, DataContract.GetClrTypeFullName(field.DeclaringType!), field.Name)); 240ThrowInvalidDataContractException(SR.Format(SR.InvalidEnumMemberValue, field.Name, DataContract.GetClrTypeFullName(type))); 252ThrowInvalidDataContractException(SR.Format(SR.DataMemberOnEnumField, DataContract.GetClrTypeFullName(field.DeclaringType!), field.Name)); 321throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.InvalidEnumValueOnWrite, value, DataContract.GetClrTypeFullName(UnderlyingType))); 327throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.InvalidEnumValueOnWrite, value, DataContract.GetClrTypeFullName(UnderlyingType))); 367throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.InvalidEnumValueOnRead, stringValue, DataContract.GetClrTypeFullName(UnderlyingType))); 386throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.InvalidEnumValueOnRead, value.Substring(index, count), DataContract.GetClrTypeFullName(UnderlyingType)));
System\Runtime\Serialization\ExtensionDataReader.cs (8)
160throw new XmlException(SR.InvalidXmlDeserializingExtensionData); 251throw new XmlException(SR.InvalidXmlDeserializingExtensionData); 325throw new XmlException(SR.InvalidXmlDeserializingExtensionData); 341throw new SerializationException(SR.InvalidStateInExtensionDataReader); 475throw new SerializationException(SR.Format(SR.InvalidStateInExtensionDataReader)); 652throw new XmlException(SR.Format(SR.InvalidDataNode, DataContract.GetClrTypeFullName(type)));
System\Runtime\Serialization\HybridObjectCache.cs (2)
25throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.MultipleIdDefinition, id));
System\Runtime\Serialization\Json\ByteArrayHelperWithString.cs (2)
47throw new XmlException(SR.Format(SR.XmlInvalidConversion, value, type));
System\Runtime\Serialization\Json\DataContractJsonSerializer.cs (10)
446throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.ExceededMaxItemsQuota, MaxItemsInObjectGraph)); 453throw XmlObjectSerializer.CreateSerializationExceptionWithReaderDetails(SR.Format(SR.ExpectingElement, XmlDictionaryString.Empty, RootName), xmlReader); 458throw XmlObjectSerializer.CreateSerializationExceptionWithReaderDetails(SR.Format(SR.ExpectingElementAtDeserialize, XmlNodeType.Element), xmlReader); 493throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.ExceededMaxItemsQuota, MaxItemsInObjectGraph)); 633throw XmlObjectSerializer.CreateSerializationException(SR.Format( 634SR.JsonUnsupportedForIsReference,
System\Runtime\Serialization\Json\JsonClassDataContract.cs (2)
164throw new SerializationException(SR.Format(SR.JsonDuplicateMemberNames, DataContract.GetClrTypeFullName(_traditionalClassDataContract.UnderlyingType), _traditionalClassDataContract.MemberNames[i].Value));
System\Runtime\Serialization\Json\JsonCollectionDataContract.cs (2)
72throw new InvalidDataContractException(SR.Format(SR.GetOnlyCollectionMustHaveAddMethod, DataContract.GetClrTypeFullName(this.TraditionalDataContract.UnderlyingType)));
System\Runtime\Serialization\Json\JsonDataContract.cs (5)
56throw new InvalidDataContractException(SR.Format(SR.SerializationCodeIsMissingForType, c.UnderlyingType)); 205throw new SerializationException(SR.DataContractCacheOverflow); 272throw new ArgumentException(SR.Format(SR.JsonTypeNotSupportedByDataContractJsonSerializer, traditionalDataContract.UnderlyingType), nameof(traditionalDataContract));
System\Runtime\Serialization\Json\JsonEncodingStreamWrapper.cs (11)
155throw new XmlException(SR.JsonInvalidBytes, e); 219throw new XmlException(SR.JsonInvalidBytes, ex); 291_ => throw new XmlException(SR.JsonEncodingNotSupported), 300_ => throw new XmlException(SR.JsonEncodingNotSupported), 323throw new XmlException(SR.JsonEncodingNotSupported); 341throw new XmlException(SR.JsonInvalidBytes); 351throw new XmlException(SR.Format(SR.JsonExpectedEncoding, GetEncodingName(expEnc), GetEncodingName(actualEnc))); 366throw new XmlException(SR.JsonUnexpectedEndOfFile); 389throw new XmlException(SR.JsonUnexpectedEndOfFile); 458throw new XmlException(SR.JsonInvalidBytes, ex);
System\Runtime\Serialization\Json\JsonFormatReaderGenerator.cs (10)
456throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.SerializationInfo_ConstructorNotFound, DataContract.GetClrTypeFullName(classContract.UnderlyingType))); 493ThrowSerializationException(SR.Format(SR.ValueTypeCannotBeNull, DataContract.GetClrTypeFullName(type))); 509ThrowSerializationException(SR.Format(SR.ValueTypeCannotHaveId, DataContract.GetClrTypeFullName(type))); 532ThrowSerializationException(SR.Format(SR.ValueTypeCannotHaveRef, DataContract.GetClrTypeFullName(type))); 761SR.Format( 762SR.KeyTypeCannotBeParsedInSimpleDictionary,
System\Runtime\Serialization\Json\JsonObjectDataContract.cs (4)
52throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.JsonUnexpectedAttributeValue, contentMode)); 70throw new XmlException(SR.Format(SR.XmlInvalidConversion, value, Globals.TypeOfInt));
System\Runtime\Serialization\Json\JsonReaderDelegator.cs (10)
95throw new XmlException(SR.Format(SR.XmlStartElementExpected, "EndElement")); 153throw new FormatException(SR.Format(SR.JsonInvalidDateTimeString, originalDateTimeValue, JsonGlobals.DateTimeStartGuardWriter, JsonGlobals.DateTimeEndGuardWriter)); 266throw new XmlException(XmlObjectSerializer.TryAddLineInfo(this, SR.Format(SR.XmlInvalidConversion, value, "UInt64"))); 292throw new XmlException(SR.Format(SR.XmlStartElementExpected, "EndElement")); 299throw new XmlException(XmlObjectSerializer.TryAddLineInfo(this, SR.Format(SR.XmlInvalidConversion, value, "UInt64")));
System\Runtime\Serialization\Json\JsonWriterDelegator.cs (1)
197throw XmlObjectSerializer.CreateSerializationException(SR.JsonDateTimeOutOfRange, new ArgumentOutOfRangeException(nameof(value)));
System\Runtime\Serialization\Json\ReflectionJsonFormatReader.cs (4)
181SR.Format(SR.KeyTypeCannotBeParsedInSimpleDictionary, 235throw new NotImplementedException(SR.Format(SR.MustBeGreaterThanZero, keyTypeNullableDepth));
System\Runtime\Serialization\Json\XmlJsonReader.cs (42)
353throw new InvalidOperationException(SR.GenericCallbackException, e); 492new XmlException(SR.Format(SR.JsonEncounteredUnexpectedCharacter, (char)ch))); 549new XmlException(SR.Format(SR.JsonEncounteredUnexpectedCharacter, 590new XmlException(SR.Format(SR.JsonEncounteredUnexpectedCharacter, 678new XmlException(SR.Format(SR.JsonEncounteredUnexpectedCharacter, (char)ch))); 723throw new ArgumentOutOfRangeException(nameof(offset), SR.Format(SR.OffsetExceedsBufferSize, buffer.Length)); 728throw new ArgumentOutOfRangeException(nameof(count), SR.Format(SR.SizeExceedsRemainingBufferSpace, buffer.Length - offset)); 745throw new ArgumentOutOfRangeException(nameof(offset), SR.Format(SR.OffsetExceedsBufferSize, chars.Length)); 750throw new ArgumentOutOfRangeException(nameof(count), SR.Format(SR.SizeExceedsRemainingBufferSpace, chars.Length - offset)); 782throw new ArgumentOutOfRangeException(nameof(offset), SR.Format(SR.JsonOffsetExceedsBufferSize, buffer.Length)); 787throw new ArgumentOutOfRangeException(nameof(count), SR.Format(SR.JsonSizeExceedsRemainingBufferSpace, buffer.Length - offset)); 823throw new ArgumentOutOfRangeException(nameof(offset), SR.Format(SR.OffsetExceedsBufferSize, array.Length)); 828throw new ArgumentOutOfRangeException(nameof(count), SR.Format(SR.SizeExceedsRemainingBufferSpace, array.Length - offset)); 898throw new FormatException(SR.Format(SR.InvalidCharacterEncountered, (char)ch)); 1162new XmlException(SR.Format(SR.JsonEncounteredUnexpectedCharacter, (char)nextByte))); 1181new XmlException(SR.Format(SR.JsonEncounteredUnexpectedCharacter, (char)nextByte))); 1213new XmlException(SR.Format(SR.XmlInvalidLowSurrogate, bufferAsString))); 1263new XmlException(SR.Format(SR.JsonEncounteredUnexpectedCharacter, (char)ch))); 1306XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.JsonInvalidFFFE)); 1573XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.Format(SR.JsonEncounteredUnexpectedCharacter, val[i]))); 1602new XmlException(SR.Format(SR.JsonEncounteredUnexpectedCharacter, val[i]))); 1630throw new NotSupportedException(SR.Format(SR.JsonMethodNotSupported, "CreateSigningNodeWriter"));
System\Runtime\Serialization\Json\XmlJsonWriter.cs (112)
258throw new NotSupportedException(SR.JsonWriteArrayNotSupported); 263throw new NotSupportedException(SR.JsonWriteArrayNotSupported); 268throw new NotSupportedException(SR.JsonWriteArrayNotSupported); 273throw new NotSupportedException(SR.JsonWriteArrayNotSupported); 278throw new NotSupportedException(SR.JsonWriteArrayNotSupported); 283throw new NotSupportedException(SR.JsonWriteArrayNotSupported); 288throw new NotSupportedException(SR.JsonWriteArrayNotSupported); 293throw new NotSupportedException(SR.JsonWriteArrayNotSupported); 298throw new NotSupportedException(SR.JsonWriteArrayNotSupported); 303throw new NotSupportedException(SR.JsonWriteArrayNotSupported); 308throw new NotSupportedException(SR.JsonWriteArrayNotSupported); 313throw new NotSupportedException(SR.JsonWriteArrayNotSupported); 318throw new NotSupportedException(SR.JsonWriteArrayNotSupported); 323throw new NotSupportedException(SR.JsonWriteArrayNotSupported); 328throw new NotSupportedException(SR.JsonWriteArrayNotSupported); 333throw new NotSupportedException(SR.JsonWriteArrayNotSupported); 338throw new NotSupportedException(SR.JsonWriteArrayNotSupported); 343throw new NotSupportedException(SR.JsonWriteArrayNotSupported); 348throw new NotSupportedException(SR.JsonWriteArrayNotSupported); 353throw new NotSupportedException(SR.JsonWriteArrayNotSupported); 365throw new ArgumentOutOfRangeException(nameof(count), SR.Format(SR.JsonSizeExceedsRemainingBufferSpace, buffer.Length - index)); 381throw new ArgumentOutOfRangeException(nameof(count), SR.Format(SR.JsonSizeExceedsRemainingBufferSpace, buffer.Length - index)); 407throw new ArgumentOutOfRangeException(nameof(count), SR.Format(SR.JsonSizeExceedsRemainingBufferSpace, buffer.Length - index)); 415throw new NotSupportedException(SR.Format(SR.JsonMethodNotSupported, "WriteComment")); 420throw new NotSupportedException(SR.Format(SR.JsonMethodNotSupported, "WriteDocType")); 431throw new XmlException(SR.JsonNoMatchingStartAttribute); 477throw new XmlException(SR.Format(SR.JsonUnexpectedAttributeValue, _attributeText)); 511throw new ArgumentException(SR.Format(SR.JsonNamespaceMustBeEmpty, _attributeText)); 544throw new XmlException(SR.JsonEndElementNoOpenNodes); 548throw new XmlException(SR.Format(SR.JsonOpenAttributeMustBeClosedFirst, "WriteEndElement")); 581throw new XmlException(SR.Format(SR.JsonMustSpecifyDataType, JsonGlobals.typeString, JsonGlobals.objectString, JsonGlobals.serverTypeString)); 588throw new XmlException(SR.Format(SR.JsonMustSpecifyDataType, JsonGlobals.itemString, string.Empty, JsonGlobals.itemString)); 644throw new NotSupportedException(SR.Format(SR.JsonMethodNotSupported, "WriteEntityRef")); 661throw new ArgumentException(SR.JsonXmlProcessingInstructionNotSupported, nameof(name)); 666throw new XmlException(SR.JsonXmlInvalidDeclaration); 676throw new ArgumentException(SR.JsonInvalidLocalNameEmpty, nameof(localName)); 696throw new ArgumentOutOfRangeException(nameof(count), SR.Format(SR.JsonSizeExceedsRemainingBufferSpace, buffer.Length - index)); 714throw new ArgumentException(SR.Format(SR.XmlPrefixBoundToNamespace, "xmlns", xmlnsNamespace, ns), nameof(ns)); 719throw new ArgumentException(SR.Format(SR.JsonPrefixMustBeNullOrEmpty, prefix), nameof(prefix)); 742throw new ArgumentException(SR.Format(SR.JsonNamespaceMustBeEmpty, ns), nameof(ns)); 748throw new ArgumentException(SR.JsonInvalidLocalNameEmpty, nameof(localName)); 752throw new XmlException(SR.JsonAttributeMustHaveElement); 756throw new XmlException(SR.Format(SR.JsonOpenAttributeMustBeClosedFirst, "WriteStartAttribute")); 766throw new XmlException(SR.Format(SR.JsonAttributeAlreadyWritten, JsonGlobals.typeString)); 775throw new XmlException(SR.Format(SR.JsonAttributeAlreadyWritten, JsonGlobals.serverTypeString)); 780throw new XmlException(SR.Format(SR.JsonServerTypeSpecifiedForInvalidDataType, 790throw new XmlException(SR.Format(SR.JsonAttributeAlreadyWritten, JsonGlobals.itemString)); 797throw new XmlException(SR.JsonEndElementNoOpenNodes); 804throw new ArgumentException(SR.Format(SR.JsonUnexpectedAttributeLocalName, localName), nameof(localName)); 823throw new XmlException(SR.Format(SR.JsonInvalidWriteState, "WriteStartDocument", WriteState.ToString())); 833throw new ArgumentException(SR.JsonInvalidLocalNameEmpty, nameof(localName)); 839throw new ArgumentException(SR.Format(SR.JsonPrefixMustBeNullOrEmpty, prefix), nameof(prefix)); 846throw new ArgumentException(SR.Format(SR.JsonNamespaceMustBeEmpty, ns), nameof(ns)); 855throw new XmlException(SR.Format(SR.JsonOpenAttributeMustBeClosedFirst, "WriteStartElement")); 859throw new XmlException(SR.JsonMultipleRootElementsNotAllowedOnWriter); 868throw new XmlException(SR.Format(SR.JsonInvalidRootElementName, localName, JsonGlobals.rootString)); 877throw new XmlException(SR.JsonNodeTypeArrayOrObjectNotSpecified); 893throw new XmlException(SR.Format(SR.JsonInvalidItemNameForArrayElement, localName, JsonGlobals.itemString)); 918throw new XmlException(SR.Format(SR.JsonInvalidItemNameForArrayElement, localName, JsonGlobals.itemString)); 924throw new XmlException(SR.JsonInvalidStartElementCall); 1061throw new ArgumentException(SR.Format(SR.JsonOnlyWhitespace, ws[pos].ToString(), "WriteWhitespace"), nameof(ws)); 1069throw new NotSupportedException(SR.Format(SR.JsonMethodNotSupported, "WriteXmlAttribute")); 1074throw new NotSupportedException(SR.Format(SR.JsonMethodNotSupported, "WriteXmlAttribute")); 1081throw new NotSupportedException(SR.Format(SR.JsonMethodNotSupported, "WriteXmlnsAttribute")); 1089throw new NotSupportedException(SR.Format(SR.JsonMethodNotSupported, "WriteXmlnsAttribute")); 1102throw new InvalidOperationException(SR.JsonWriterClosed); 1113throw new InvalidOperationException(SR.XmlIllegalOutsideRoot); 1119throw new XmlException(SR.JsonCannotWriteStandaloneTextAfterQuotedText); 1186throw new InvalidOperationException(SR.JsonMustUseWriteStringForWritingAttributeValues); 1191throw new XmlException(SR.Format(SR.JsonMustSpecifyDataType, JsonGlobals.typeString, JsonGlobals.objectString, JsonGlobals.serverTypeString)); 1198throw new XmlException(SR.Format(SR.JsonMustSpecifyDataType, JsonGlobals.itemString, string.Empty, JsonGlobals.itemString)); 1227throw new XmlException(SR.Format(SR.JsonInvalidDataTypeSpecifiedForServerType, JsonGlobals.typeString, dataTypeSpecified, JsonGlobals.serverTypeString, JsonGlobals.objectString)); 1235throw new XmlException(SR.JsonInvalidMethodBetweenStartEndAttribute); 1239throw new XmlException(SR.Format(SR.JsonCannotWriteTextAfterNonTextAttribute, _dataType.ToString().ToLowerInvariant())); 1432throw new ArgumentException(SR.JsonNestedArraysNotSupported, nameof(value));
System\Runtime\Serialization\Json\XmlObjectSerializerReadContextComplexJson.cs (9)
112throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.JsonUnexpectedAttributeValue, _extensionDataValueType)); 136_ => throw new InvalidOperationException(SR.ParseJsonNumberReturnInvalidNumber), 316SR.Format(SR.JsonDuplicateMemberInInput, DataContract.GetClrTypeFullName(obj.GetType()), memberNames[memberIndex])); 336throw new SerializationException(SR.Format( 337SR.JsonOneRequiredMemberNotFound, DataContract.GetClrTypeFullName(obj.GetType()), stringBuilder.ToString())); 341throw new SerializationException(SR.Format( 342SR.JsonRequiredMembersNotFound, DataContract.GetClrTypeFullName(obj.GetType()), stringBuilder.ToString()));
System\Runtime\Serialization\Json\XmlObjectSerializerWriteContextComplexJson.cs (10)
126throw new SerializationException(SR.Format(SR.EnumTypeNotSupportedByDataContractJsonSerializer, declaredContract.UnderlyingType)); 275throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.DcTypeNotFoundOnSerialize, DataContract.GetClrTypeFullName(dataContract.UnderlyingType), dataContract.XmlName.Name, dataContract.XmlName.Namespace)); 325throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.XmlObjectAssignedToIncompatibleInterface, graph.GetType(), declaredType)); 330throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.CollectionAssignedToIncompatibleInterface, graph.GetType(), declaredType)); 344throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.ChangingFullTypeNameNotSupported, serInfo.FullTypeName, DataContract.GetClrTypeFullName(objType)));
System\Runtime\Serialization\ObjectToIdCache.cs (2)
93throw XmlObjectSerializer.CreateSerializationException(SR.ObjectTableOverflow); 132throw XmlObjectSerializer.CreateSerializationException(SR.ObjectTableOverflow);
System\Runtime\Serialization\PrimitiveDataContract.cs (4)
115throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.CannotDeserializeRefAtTopLevel, attributes.Ref)); 928throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.XmlForObjectCannotHaveContent, localName, ns), xes);
System\Runtime\Serialization\ReflectionReader.cs (8)
291throw new SerializationException(SR.Format(SR.ValueTypeCannotHaveId, DataContract.GetClrTypeFullName(type))); 307throw new SerializationException(SR.Format(SR.ValueTypeCannotHaveRef, DataContract.GetClrTypeFullName(type))); 319throw new SerializationException(SR.Format(SR.ValueTypeCannotBeNull, DataContract.GetClrTypeFullName(type))); 608throw new InvalidDataContractException(SR.Format(SR.CollectionMustHaveAddMethod, DataContract.GetClrTypeFullName(collectionContract.UnderlyingType)));
System\Runtime\Serialization\SchemaExporter.cs (18)
71throw new InvalidOperationException(SR.Format(SR.CouldNotReadSerializationSchema, Globals.SerializationNamespace)); 537throw new InvalidDataContractException(SR.Format(SR.MissingSchemaType, typeQName, DataContract.GetClrTypeFullName(clrType))); 601throw new InvalidDataContractException(SR.Format(SR.InvalidXmlDataContractName, DataContract.GetClrTypeFullName(type))); 627throw new InvalidDataContractException(SR.Format(SR.InvalidGetSchemaMethod, DataContract.GetClrTypeFullName(clrType))); 634throw new InvalidDataContractException(SR.Format(SR.MissingGetSchemaMethod, DataContract.GetClrTypeFullName(clrType), methodName)); 637throw new InvalidDataContractException(SR.Format(SR.InvalidReturnTypeOnGetSchemaMethod, DataContract.GetClrTypeFullName(clrType), methodName, DataContract.GetClrTypeFullName(getMethod.ReturnType), DataContract.GetClrTypeFullName(Globals.TypeOfXmlQualifiedName), typeof(XmlSchemaType))); 644throw new InvalidDataContractException(SR.Format(SR.InvalidNonNullReturnValueByIsAny, DataContract.GetClrTypeFullName(clrType), methodName)); 682throw new InvalidDataContractException(SR.Format(SR.MissingSchemaType, typeName, DataContract.GetClrTypeFullName(clrType))); 707throw new InvalidDataContractException(SR.Format(SR.InvalidReturnSchemaOnGetSchemaMethod, DataContract.GetClrTypeFullName(clrType)));
System\Runtime\Serialization\SchemaImporter.cs (147)
55throw new InvalidOperationException(SR.Format(SR.CouldNotReadSerializationSchema, Globals.SerializationNamespace)); 66throw new ArgumentException(SR.Format(SR.CannotImportInvalidSchemas), ex); 75throw new ArgumentException(SR.Format(SR.CannotImportNullSchema)); 98throw new ArgumentException(SR.Format(SR.CannotImportNullDataContractName)); 373throw new InvalidDataContractException(SR.Format(SR.CannotComputeUniqueName, element.Name)); 391throw new InvalidDataContractException(SR.Format(SR.SpecifiedTypeNotFoundInSchema, typeName.Name, typeName.Namespace)); 421ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.RedefineNotSupported)); 428ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.SimpleTypeUnionNotSupported)); 458ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.SimpleContentNotSupported)); 462ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.MixedContentNotSupported)); 474ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.ComplexTypeRestrictionNotSupported)); 635ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.RootSequenceMustBeRequired)); 637ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.RootSequenceMaxOccursMustBe)); 647ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.RootParticleMustBeSequence)); 670ThrowTypeCannotBeImportedException(dataContract.XmlName.Name, dataContract.XmlName.Namespace, SR.Format(SR.DerivedTypeNotISerializable, baseTypeName.Name, baseTypeName.Namespace)); 686ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.MustContainOnlyLocalElements)); 815ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.IsValueTypeFormattedIncorrectly, isValueTypeInnerText, fe.Message)); 838ThrowISerializableTypeCannotBeImportedException(dataContract.XmlName.Name, dataContract.XmlName.Namespace, SR.Format(SR.BaseTypeNotISerializable, baseTypeName.Name, baseTypeName.Namespace)); 840ThrowISerializableTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.ISerializableDerivedContainsOneOrMoreItems)); 849ThrowISerializableTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.ISerializableDoesNotContainAny)); 852ThrowISerializableTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.ISerializableDoesNotContainAny)); 854ThrowISerializableTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.ISerializableContainsMoreThanOneItems)); 858ThrowISerializableTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.ISerializableDoesNotContainAny)); 863ThrowISerializableTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.ISerializableWildcardMinOccursMustBe, iSerializableWildcardElement.MinOccurs)); 865ThrowISerializableTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.ISerializableWildcardMaxOccursMustBe, iSerializableWildcardElement.MaxOccursString)); 867ThrowISerializableTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.ISerializableWildcardNamespaceInvalid, iSerializableWildcardElement.Namespace)); 869ThrowISerializableTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.ISerializableWildcardProcessContentsInvalid, iSerializableWildcardElement.ProcessContents)); 889ThrowISerializableTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.ISerializableMustRefFactoryTypeAttribute, factoryTypeAttributeRefName.Name, factoryTypeAttributeRefName.Namespace)); 903ThrowTypeCannotBeImportedException(dataContract.XmlName.Name, dataContract.XmlName.Namespace, SR.Format(dataContract.IsISerializable ? SR.InvalidISerializableDerivation : SR.InvalidClassDerivation, baseTypeName.Name, baseTypeName.Namespace)); 932ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.AnonymousTypeNotSupported, typeName.Name, typeName.Namespace)); 937ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.TopLevelElementRepresentsDifferentType, topLevelElement.SchemaTypeName.Name, topLevelElement.SchemaTypeName.Namespace)); 949ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.ElementMinOccursMustBe, element.Name)); 951ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.ElementMaxOccursMustBe, element.Name)); 968ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.FormMustBeQualified, element.Name)); 976ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.ElementRefOnLocalElementNotSupported, element.RefName.Name, element.RefName.Namespace)); 991throw new InvalidDataContractException(SR.Format(SR.InvalidEmitDefaultAnnotation, memberName, typeName.Name, typeName.Namespace)); 1009ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.CannotHaveDuplicateElementNames, memberName)); 1028throw new InvalidDataContractException(SR.Format(SR.AnnotationAttributeNotFound, SchemaExporter.DefaultValueAnnotation.Name, typeName.Name, typeName.Namespace, Globals.EmitDefaultValueAttribute)); 1040throw new InvalidDataContractException(SR.Format(SR.AnnotationAttributeNotFound, SchemaExporter.ActualTypeAnnotationName.Name, typeName.Name, typeName.Namespace, Globals.ActualTypeNameAttribute)); 1043throw new InvalidDataContractException(SR.Format(SR.AnnotationAttributeNotFound, SchemaExporter.ActualTypeAnnotationName.Name, typeName.Name, typeName.Namespace, Globals.ActualTypeNamespaceAttribute)); 1073ThrowArrayTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.ArrayItemFormMustBe, element.Name)); 1093ThrowArrayTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.ElementRefOnLocalElementNotSupported, element.RefName.Name, element.RefName.Namespace)); 1109ThrowArrayTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.InvalidKeyValueType, element.Name)); 1113ThrowArrayTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.InvalidKeyValueTypeNamespace, element.Name, keyValueContract.Namespace)); 1162ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.IsDictionaryFormattedIncorrectly, isDictionaryInnerText, fe.Message)); 1174ThrowEnumTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.EnumListMustContainAnonymousType)); 1178ThrowEnumTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.EnumUnionInAnonymousTypeNotSupported)); 1180ThrowEnumTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.EnumListInAnonymousTypeNotSupported)); 1186ThrowEnumTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.EnumRestrictionInvalid)); 1208ThrowEnumTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.EnumOnlyEnumerationFacetsSupported)); 1210ThrowEnumTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.EnumEnumerationFacetsMustHaveValue)); 1233ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.SimpleTypeRestrictionDoesNotSpecifyBase)); 1287throw new InvalidDataContractException(SR.Format(SR.GenericAnnotationAttributeNotFound, type.Name, Globals.GenericNameAttribute)); 1290throw new InvalidDataContractException(SR.Format(SR.GenericAnnotationAttributeNotFound, type.Name, Globals.GenericNamespaceAttribute)); 1302throw new InvalidDataContractException(SR.Format(SR.GenericAnnotationHasInvalidElement, argumentElement.LocalName, argumentElement.NamespaceURI, type.Name)); 1308throw new InvalidDataContractException(SR.Format(SR.GenericAnnotationHasInvalidAttributeValue, argumentElement.LocalName, argumentElement.NamespaceURI, type.Name, nestedLevelAttribute.Value, nestedLevelAttribute.LocalName, Globals.TypeOfInt.Name)); 1311throw new InvalidDataContractException(SR.Format(SR.GenericAnnotationForNestedLevelMustBeIncreasing, argumentElement.LocalName, argumentElement.NamespaceURI, type.Name)); 1323throw new InvalidDataContractException(SR.Format(SR.GenericAnnotationHasInvalidAttributeValue, typeElement.LocalName, typeElement.NamespaceURI, type.Name, typeNestedLevelsAttribute.Value, typeNestedLevelsAttribute.LocalName, Globals.TypeOfInt.Name)); 1348ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.AbstractTypeNotSupported)); 1350ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.MixedContentNotSupported)); 1356ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.AbstractElementNotSupported, element.Name)); 1358ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.DefaultOnElementNotSupported, element.Name)); 1360ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.FixedOnElementNotSupported, element.Name)); 1362ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.SubstitutionGroupOnElementNotSupported, element.Name)); 1368ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.AnyAttributeNotSupported)); 1386ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.TypeShouldNotContainAttributes, Globals.SerializationNamespace)); 1398ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.CannotHaveDuplicateAttributeNames, refName.Name)); 1418ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.InvalidAnnotationExpectingText, xmlElement.LocalName, xmlElement.NamespaceURI, child.LocalName, child.NamespaceURI)); 1447ThrowTypeCannotBeImportedException(SR.Format(SR.TypeCannotBeImported, name, ns, message)); 1453ThrowTypeCannotBeImportedException(SR.Format(SR.ArrayTypeCannotBeImported, name, ns, message)); 1459ThrowTypeCannotBeImportedException(SR.Format(SR.EnumTypeCannotBeImported, name, ns, message)); 1465ThrowTypeCannotBeImportedException(SR.Format(SR.ISerializableTypeCannotBeImported, name, ns, message)); 1471throw new InvalidDataContractException(SR.Format(SR.TypeCannotBeImportedHowToFix, message));
System\Runtime\Serialization\XmlDataContract.cs (12)
141throw new InvalidDataContractException(SR.Format(SR.IXmlSerializableCannotHaveDataContract, DataContract.GetClrTypeFullName(type))); 143throw new InvalidDataContractException(SR.Format(SR.IXmlSerializableCannotHaveCollectionDataContract, DataContract.GetClrTypeFullName(type))); 177throw new InvalidDataContractException(SR.Format(SR.IsAnyCannotHaveXmlRoot, DataContract.GetClrTypeFullName(UnderlyingType!))); 254throw new InvalidDataContractException(SR.Format(SR.IXmlSerializableMustHaveDefaultConstructor, DataContract.GetClrTypeFullName(UnderlyingType))); 343throw new SecurityException(SR.Format(SR.PartialTrustIXmlSerializableTypeNotPublic, DataContract.GetClrTypeFullName(UnderlyingType)), 353throw new SecurityException(SR.Format(SR.PartialTrustIXmlSerialzableNoPublicConstructor, DataContract.GetClrTypeFullName(UnderlyingType)),
System\Runtime\Serialization\XmlFormatReaderGenerator.cs (6)
530ThrowValidationException(SR.Format(SR.ValueTypeCannotBeNull, DataContract.GetClrTypeFullName(type))); 546ThrowValidationException(SR.Format(SR.ValueTypeCannotHaveId, DataContract.GetClrTypeFullName(type))); 569ThrowValidationException(SR.Format(SR.ValueTypeCannotHaveRef, DataContract.GetClrTypeFullName(type)));
System\Runtime\Serialization\XmlObjectSerializer.cs (21)
104throw XmlObjectSerializer.CreateSerializationException(GetTypeInfoError(SR.ErrorSerializing, GetSerializeType(graph), ex), ex); 108throw XmlObjectSerializer.CreateSerializationException(GetTypeInfoError(SR.ErrorSerializing, GetSerializeType(graph), ex), ex); 172throw XmlObjectSerializer.CreateSerializationException(GetTypeInfoError(SR.ErrorWriteStartObject, GetSerializeType(graph), ex), ex); 176throw XmlObjectSerializer.CreateSerializationException(GetTypeInfoError(SR.ErrorWriteStartObject, GetSerializeType(graph), ex), ex); 189throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.XmlWriterMustBeInElement, writer.WriteState)); 194throw XmlObjectSerializer.CreateSerializationException(GetTypeInfoError(SR.ErrorSerializing, GetSerializeType(graph), ex), ex); 198throw XmlObjectSerializer.CreateSerializationException(GetTypeInfoError(SR.ErrorSerializing, GetSerializeType(graph), ex), ex); 214throw XmlObjectSerializer.CreateSerializationException(GetTypeInfoError(SR.ErrorWriteEndObject, null, ex), ex); 218throw XmlObjectSerializer.CreateSerializationException(GetTypeInfoError(SR.ErrorWriteEndObject, null, ex), ex); 360throw XmlObjectSerializer.CreateSerializationException(GetTypeInfoError(SR.ErrorDeserializing, GetDeserializeType(), ex), ex); 364throw XmlObjectSerializer.CreateSerializationException(GetTypeInfoError(SR.ErrorDeserializing, GetDeserializeType(), ex), ex); 380throw XmlObjectSerializer.CreateSerializationException(GetTypeInfoError(SR.ErrorIsStartObject, GetDeserializeType(), ex), ex); 384throw XmlObjectSerializer.CreateSerializationException(GetTypeInfoError(SR.ErrorIsStartObject, GetDeserializeType(), ex), ex); 437return string.Create(CultureInfo.InvariantCulture, $"{SR.Format(SR.ErrorInLine, reader.LineNumber, reader.LinePosition)} {errorMessage}"); 443return XmlObjectSerializer.CreateSerializationException(TryAddLineInfo(reader, SR.Format(SR.EncounteredWithNameNamespace, errorMessage, reader.NodeType, reader.LocalName, reader.NamespaceURI))); 458string typeInfo = (type == null) ? string.Empty : SR.Format(SR.ErrorTypeInfo, DataContract.GetClrTypeFullName(type)); 460return SR.Format(errorMessage, typeInfo, innerExceptionMessage);
System\Runtime\Serialization\XmlObjectSerializerContext.cs (6)
76throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.ExceededMaxItemsQuota, _maxItemsInObjectGraph)); 152throw new InvalidDataContractException(SR.Format(SR.TypeNotSerializable, memberType)); 199throw new ArgumentException(SR.Format(SR.NullKnownType, "knownTypes"));
System\Runtime\Serialization\XmlObjectSerializerReadContext.cs (39)
60throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.NullValueReturnedForGetOnlyCollection, DataContract.GetClrTypeFullName(type))); 66throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.ArrayExceededSize, arraySize, DataContract.GetClrTypeFullName(type))); 121throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.ErrorDeserializing, SR.Format(SR.ErrorTypeInfo, DataContract.GetClrTypeFullName(declaredType)), SR.Format(SR.XmlStartElementExpected, Globals.RefLocalName))); 162throw XmlObjectSerializer.CreateSerializationException(XmlObjectSerializer.TryAddLineInfo(reader, SR.Format(SR.DcTypeNotFoundOnDeserialize, attributes.XsiTypeNamespace, attributes.XsiTypeName, reader.NamespaceURI, reader.LocalName))); 164throw XmlObjectSerializer.CreateSerializationException(XmlObjectSerializer.TryAddLineInfo(reader, SR.Format(SR.DcTypeNotResolvedOnDeserialize, attributes.XsiTypeNamespace, attributes.XsiTypeName, reader.NamespaceURI, reader.LocalName))); 182throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.FactoryTypeNotISerializable, DataContract.GetClrTypeFullName(factoryDataContract.UnderlyingType), DataContract.GetClrTypeFullName(dataContract.UnderlyingType))); 261throw XmlObjectSerializer.CreateSerializationException(XmlObjectSerializer.TryAddLineInfo(xmlReader, SR.Format(SR.UnexpectedElementExpectingElements, xmlReader.NodeType, xmlReader.LocalName, xmlReader.NamespaceURI, stringBuilder.ToString()))); 367string oldType = (oldObj != null) ? DataContract.GetClrTypeFullName(oldObj.GetType()) : SR.UnknownNullType; 368string newType = (newObj != null) ? DataContract.GetClrTypeFullName(newObj.GetType()) : SR.UnknownNullType; 369throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.FactoryObjectContainsSelfReference, oldType, newType, id)); 385throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.DeserializedObjectWithIdNotFound, id)); 399throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.DeserializedObjectWithIdNotFound, id)); 438throw XmlObjectSerializer.CreateSerializationException(SR.UnexpectedEndOfFile); 458SR.Format(SR.MaxArrayLengthExceeded, int.MaxValue, 487throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.ArrayExceededSizeAttribute, arraySize, itemName.Value, itemNamespace.Value)); 842throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.ArraySizeAttributeIncorrect, arraySize, 0)); 845throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.ArraySizeAttributeIncorrect, arraySize, dataNode.Items.Count)); 927throw XmlObjectSerializer.CreateSerializationException(SR.UnexpectedEndOfFile); 986throw XmlObjectSerializer.CreateSerializationException(SR.UnexpectedEndOfFile); 1082return XmlObjectSerializer.CreateSerializationExceptionWithReaderDetails(SR.Format(SR.ExpectingState, expectedState), xmlReader);
System\Runtime\Serialization\XmlObjectSerializerReadContextComplex.cs (6)
69throw new InvalidDataContractException(SR.Format(SR.SurrogatesWithGetOnlyCollectionsNotSupportedSerDeser, DataContract.GetClrTypeFullName(declaredType))); 90throw new InvalidDataContractException(SR.Format(SR.TypeNotSerializable, memberType)); 111throw new InvalidDataContractException(SR.Format(SR.SurrogatesWithGetOnlyCollectionsNotSupportedSerDeser,
System\Runtime\Serialization\XmlObjectSerializerWriteContext.cs (14)
248throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.DcTypeNotFoundOnSerialize, DataContract.GetClrTypeFullName(dataContract.UnderlyingType), dataContract.XmlName.Name, dataContract.XmlName.Namespace)); 383throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.CannotSerializeObjectWithCycles, DataContract.GetClrTypeFullName(obj.GetType()))); 462throw new SerializationException(SR.Format(SR.RequiredMemberMustBeEmitted, memberName, type.FullName)); 499throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.UnknownXmlType, DataContract.GetClrTypeFullName(obj.GetType()))); 606throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.ResolveTypeReturnedFalse, DataContract.GetClrTypeFullName(DataContractResolver.GetType()), DataContract.GetClrTypeFullName(objectType))); 616throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.ResolveTypeReturnedNull, DataContract.GetClrTypeFullName(DataContractResolver.GetType()), DataContract.GetClrTypeFullName(objectType))); 621throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.ResolveTypeReturnedNull, DataContract.GetClrTypeFullName(DataContractResolver.GetType()), DataContract.GetClrTypeFullName(objectType)));
System\Runtime\Serialization\XmlObjectSerializerWriteContextComplex.cs (4)
188throw new InvalidDataContractException(SR.Format(SR.TypeNotSerializable, memberType)); 209throw new InvalidDataContractException(SR.Format(SR.SurrogatesWithGetOnlyCollectionsNotSupportedSerDeser,
System\Runtime\Serialization\XmlReaderDelegator.cs (11)
55throw new ArgumentOutOfRangeException(nameof(i), SR.XmlElementAttributes); 148throw new ArgumentOutOfRangeException(nameof(i), SR.XmlElementAttributes); 211return new InvalidDataContractException(SR.Format( 212type.IsInterface ? SR.InterfaceTypeCannotBeCreated : SR.InvalidPrimitiveType_Serialization, 338throw new XmlException(XmlObjectSerializer.TryAddLineInfo(this, SR.Format(SR.XmlInvalidConversion, value, type))); 344throw new XmlException(SR.Format(SR.XmlStartElementExpected, "EndElement")); 799throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.ArrayExceededSizeAttribute, expectedLength, itemName.Value, itemNamespace.Value));
System\Runtime\Serialization\XmlSerializableReader.cs (1)
67throw XmlObjectSerializer.CreateSerializationException(SR.IXmlSerializableIllegalOperation);
System\Runtime\Serialization\XmlSerializableServices.cs (2)
26throw XmlObjectSerializer.CreateSerializationException(SR.UnexpectedEndOfFile); 40throw XmlObjectSerializer.CreateSerializationException(SR.UnexpectedEndOfFile);
System\Runtime\Serialization\XmlSerializableWriter.cs (7)
27throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.IXmlSerializableMissingEndElements, (_obj == null ? string.Empty : DataContract.GetClrTypeFullName(_obj.GetType())))); 56throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.IXmlSerializableWritePastSubTree, (_obj == null ? string.Empty : DataContract.GetClrTypeFullName(_obj.GetType())))); 64throw XmlObjectSerializer.CreateSerializationException(SR.Format(SR.IXmlSerializableWritePastSubTree, (_obj == null ? string.Empty : DataContract.GetClrTypeFullName(_obj.GetType())))); 71throw XmlObjectSerializer.CreateSerializationException(SR.IXmlSerializableIllegalOperation);
System\Runtime\Serialization\XmlWriterDelegator.cs (2)
274return new InvalidDataContractException(SR.Format(SR.InvalidPrimitiveType_Serialization, DataContract.GetClrTypeFullName(type)));
System\Runtime\Serialization\XPathQueryGenerator.cs (2)
67throw XmlObjectSerializer.CreateSerializationException(SR.QueryGeneratorPathToMemberNotFound); 83throw XmlObjectSerializer.CreateSerializationException(SR.QueryGeneratorPathToMemberNotFound);
System\Runtime\Serialization\XsdDataContractExporter.cs (11)
95throw new InvalidDataContractException(SR.Format(SR.GenericTypeNotExportable, type)); 114throw new ArgumentException(SR.Format(SR.CannotExportNullAssembly, nameof(assemblies))); 146throw new ArgumentException(SR.Format(SR.CannotExportNullType, nameof(types))); 293throw new ArgumentException(SR.CannotExportNullKnownType); 317throw new ArgumentException(SR.Format(SR.CannotExportNullAssembly, nameof(assemblies))); 355throw new ArgumentException(SR.Format(SR.CannotExportNullType, nameof(types)));
System\Text\Base64Encoding.cs (54)
33throw new FormatException(SR.Format(SR.XmlInvalidBase64Length, charCount.ToString())); 55throw new ArgumentOutOfRangeException(nameof(index), SR.Format(SR.OffsetExceedsBufferSize, chars.Length)); 58throw new ArgumentOutOfRangeException(nameof(count), SR.Format(SR.SizeExceedsRemainingBufferSpace, chars.Length - index)); 63throw new FormatException(SR.Format(SR.XmlInvalidBase64Length, count.ToString())); 80throw new FormatException(SR.Format(SR.XmlInvalidBase64Sequence, new string(pch, 0, 4), index + (int)(pch - _chars))); 90throw new FormatException(SR.Format(SR.XmlInvalidBase64Sequence, new string(pch, 0, 4), index + (int)(pch - _chars))); 106throw new ArgumentOutOfRangeException(nameof(charIndex), SR.Format(SR.OffsetExceedsBufferSize, chars.Length)); 110throw new ArgumentOutOfRangeException(nameof(charCount), SR.Format(SR.SizeExceedsRemainingBufferSpace, chars.Length - charIndex)); 115throw new ArgumentOutOfRangeException(nameof(byteIndex), SR.Format(SR.OffsetExceedsBufferSize, bytes.Length)); 120throw new FormatException(SR.Format(SR.XmlInvalidBase64Length, charCount.ToString())); 140throw new FormatException(SR.Format(SR.XmlInvalidBase64Sequence, new string(pch, 0, 4), charIndex + (int)(pch - _chars))); 150throw new FormatException(SR.Format(SR.XmlInvalidBase64Sequence, new string(pch, 0, 4), charIndex + (int)(pch - _chars))); 154throw new ArgumentException(SR.XmlArrayTooSmall, nameof(bytes)); 179throw new ArgumentOutOfRangeException(nameof(charIndex), SR.Format(SR.OffsetExceedsBufferSize, chars.Length)); 183throw new ArgumentOutOfRangeException(nameof(charCount), SR.Format(SR.SizeExceedsRemainingBufferSpace, chars.Length - charIndex)); 188throw new ArgumentOutOfRangeException(nameof(byteIndex), SR.Format(SR.OffsetExceedsBufferSize, bytes.Length)); 193throw new FormatException(SR.Format(SR.XmlInvalidBase64Length, charCount.ToString())); 212throw new FormatException(SR.Format(SR.XmlInvalidBase64Sequence, "?", charIndex + (int)(pch - _chars))); 222throw new FormatException(SR.Format(SR.XmlInvalidBase64Sequence, "?", charIndex + (int)(pch - _chars))); 226throw new ArgumentException(SR.XmlArrayTooSmall, nameof(bytes)); 248throw new ArgumentOutOfRangeException(nameof(byteCount), SR.Format(SR.ValueMustBeInRange, 0, int.MaxValue / 4 * 3 - 2)); 262throw new ArgumentOutOfRangeException(nameof(byteIndex), SR.Format(SR.OffsetExceedsBufferSize, bytes.Length)); 265throw new ArgumentOutOfRangeException(nameof(byteCount), SR.Format(SR.SizeExceedsRemainingBufferSpace, bytes.Length - byteIndex)); 271throw new ArgumentOutOfRangeException(nameof(charIndex), SR.Format(SR.OffsetExceedsBufferSize, chars.Length)); 273throw new ArgumentException(SR.XmlArrayTooSmall, nameof(chars)); 346throw new ArgumentOutOfRangeException(nameof(byteIndex), SR.Format(SR.OffsetExceedsBufferSize, bytes.Length)); 349throw new ArgumentOutOfRangeException(nameof(byteCount), SR.Format(SR.SizeExceedsRemainingBufferSpace, bytes.Length - byteIndex)); 355throw new ArgumentOutOfRangeException(nameof(charIndex), SR.Format(SR.OffsetExceedsBufferSize, chars.Length)); 358throw new ArgumentException(SR.XmlArrayTooSmall, nameof(chars));
System\Text\BinHexEncoding.cs (20)
15throw new FormatException(SR.Format(SR.XmlInvalidBinHexLength, charCount.ToString())); 29throw new ArgumentOutOfRangeException(nameof(charIndex), SR.Format(SR.OffsetExceedsBufferSize, chars.Length)); 32throw new ArgumentOutOfRangeException(nameof(charCount), SR.Format(SR.SizeExceedsRemainingBufferSpace, chars.Length - charIndex)); 36throw new ArgumentOutOfRangeException(nameof(byteIndex), SR.Format(SR.OffsetExceedsBufferSize, bytes.Length)); 39throw new ArgumentException(SR.XmlArrayTooSmall, nameof(bytes)); 45throw new FormatException(SR.Format(SR.XmlInvalidBinHexSequence, new string(chars, error, 2), error)); 54throw new ArgumentOutOfRangeException(nameof(byteCount), SR.Format(SR.ValueMustBeInRange, 0, int.MaxValue / 2)); 68throw new ArgumentOutOfRangeException(nameof(byteIndex), SR.Format(SR.OffsetExceedsBufferSize, bytes.Length)); 71throw new ArgumentOutOfRangeException(nameof(byteCount), SR.Format(SR.SizeExceedsRemainingBufferSpace, bytes.Length - byteIndex)); 76throw new ArgumentOutOfRangeException(nameof(charIndex), SR.Format(SR.OffsetExceedsBufferSize, chars.Length)); 78throw new ArgumentException(SR.XmlArrayTooSmall, nameof(chars));
System\Text\SurrogateChar.cs (6)
26throw new ArgumentException(SR.Format(SR.XmlInvalidSurrogate, ch.ToString("X", CultureInfo.InvariantCulture)), nameof(ch)); 37throw new ArgumentException(SR.Format(SR.XmlInvalidLowSurrogate, ((int)lowChar).ToString("X", CultureInfo.InvariantCulture)), nameof(lowChar)); 40throw new ArgumentException(SR.Format(SR.XmlInvalidHighSurrogate, ((int)highChar).ToString("X", CultureInfo.InvariantCulture)), nameof(highChar));
System\Xml\EncodingStreamWrapper.cs (25)
105throw new XmlException(SR.XmlDeclarationRequired); 111throw new XmlException(SR.XmlInvalidBytes, ex); 129_ => throw new XmlException(SR.XmlEncodingNotSupported), 138_ => throw new XmlException(SR.XmlEncodingNotSupported), 147_ => throw new XmlException(SR.XmlEncodingNotSupported), 161throw new XmlException(SR.XmlEncodingNotSupported); 200throw new XmlException(SR.UnexpectedEndOfFile); 254throw new XmlException(SR.XmlDeclMissing); 262throw new XmlException(SR.XmlDeclMissing); 269throw new XmlException(SR.XmlBadBOM); 351throw new XmlException(SR.XmlDeclarationRequired); 356throw new XmlException(SR.XmlMalformedDecl); 365throw new XmlException(SR.XmlDeclarationRequired); 374throw new XmlException(SR.XmlMalformedDecl); 381throw new XmlException(SR.XmlMalformedDecl); 435throw new XmlException(SR.UnexpectedEndOfFile); 485throw new XmlException(SR.XmlDeclarationRequired); 493throw new XmlException(SR.XmlInvalidBytes, e); 499throw new XmlException(SR.Format(SR.XmlExpectedEncoding, GetEncodingName(expEnc), GetEncodingName(actualEnc))); 509throw new XmlException(SR.Format(SR.XmlEncodingMismatch, declEnc, docEnc)); 627throw new XmlException(SR.XmlInvalidBytes, ex); 642throw new XmlException(SR.UnexpectedEndOfFile); 663throw new XmlException(SR.UnexpectedEndOfFile);
System\Xml\UniqueId.cs (18)
71throw new ArgumentOutOfRangeException(nameof(offset), SR.Format(SR.OffsetExceedsBufferSize, guid.Length)); 73throw new ArgumentException(SR.Format(SR.XmlArrayTooSmallInput, guidLength), nameof(guid)); 86throw new FormatException(SR.XmlInvalidUniqueId); 100throw new ArgumentOutOfRangeException(nameof(offset), SR.Format(SR.OffsetExceedsBufferSize, chars.Length)); 103throw new ArgumentOutOfRangeException(nameof(count), SR.Format(SR.SizeExceedsRemainingBufferSpace, chars.Length - offset)); 105throw new FormatException(SR.XmlInvalidUniqueId); 206throw new ArgumentOutOfRangeException(nameof(offset), SR.Format(SR.OffsetExceedsBufferSize, chars.Length)); 209throw new ArgumentOutOfRangeException(nameof(chars), SR.Format(SR.XmlArrayTooSmallOutput, count)); 286throw new ArgumentOutOfRangeException(nameof(offset), SR.Format(SR.OffsetExceedsBufferSize, buffer.Length)); 289throw new ArgumentOutOfRangeException(nameof(buffer), SR.Format(SR.XmlArrayTooSmallOutput, guidLength));
System\Xml\XmlBaseReader.cs (38)
130XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.XmlDeclMissingVersion)); 133XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.XmlMalformedDecl)); 136if (!CheckDeclAttribute(0, "version", "1.0", false, SR.XmlInvalidVersion)) 137XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.XmlDeclMissingVersion)); 143if (CheckDeclAttribute(1, "encoding", null, true, SR.XmlInvalidEncoding_UTF8)) 146XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.XmlMalformedDecl)); 150XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.XmlMalformedDecl)); 163XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.XmlMalformedDecl)); 169XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.XmlInvalidStandalone)); 178XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.XmlMalformedDecl)); 184XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.Format(valueSR))); 349XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.Format(SR.XmlSpecificBindingPrefix, "xml", xmlNamespace))); 353XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.Format(SR.XmlSpecificBindingPrefix, "xmlns", xmlnsNamespace))); 502throw new ArgumentOutOfRangeException(nameof(index), SR.XmlElementAttributes); 505throw new ArgumentOutOfRangeException(nameof(index), SR.Format(SR.OffsetExceedsBufferSize, _attributeCount)); 1132throw new ArgumentOutOfRangeException(nameof(offset), SR.Format(SR.OffsetExceedsBufferSize, chars.Length)); 1135throw new ArgumentOutOfRangeException(nameof(count), SR.Format(SR.SizeExceedsRemainingBufferSpace, chars.Length - offset)); 1160throw new ArgumentOutOfRangeException(nameof(offset), SR.Format(SR.OffsetExceedsBufferSize, buffer.Length)); 1163throw new ArgumentOutOfRangeException(nameof(count), SR.Format(SR.SizeExceedsRemainingBufferSpace, buffer.Length - offset)); 1254throw new InvalidOperationException(SR.XmlEndElementNoOpenNodes); 1348throw new ArgumentOutOfRangeException(nameof(offset), SR.Format(SR.OffsetExceedsBufferSize, buffer.Length)); 1351throw new ArgumentOutOfRangeException(nameof(count), SR.Format(SR.SizeExceedsRemainingBufferSpace, buffer.Length - offset)); 1384throw new ArgumentOutOfRangeException(nameof(offset), SR.Format(SR.OffsetExceedsBufferSize, buffer.Length)); 1387throw new ArgumentOutOfRangeException(nameof(count), SR.Format(SR.SizeExceedsRemainingBufferSpace, buffer.Length - offset)); 1719throw new InvalidOperationException(SR.XmlInvalidOperation); 2007throw new InvalidOperationException(SR.XmlCanonicalizationStarted); 2019throw new InvalidOperationException(SR.XmlCanonicalizationNotStarted);
System\Xml\XmlBaseWriter.cs (98)
120throw new InvalidOperationException(SR.XmlWriterClosed); 155throw new InvalidOperationException(SR.Format(SR.XmlInvalidWriteState, "WriteXmlnsAttribute", WriteState.ToString())); 179throw new InvalidOperationException(SR.Format(SR.XmlInvalidWriteState, "WriteXmlnsAttribute", WriteState.ToString())); 207throw new InvalidOperationException(SR.Format(SR.XmlInvalidWriteState, "WriteStartAttribute", WriteState.ToString())); 231throw new ArgumentException(SR.Format(SR.XmlPrefixBoundToNamespace, "xml", xmlNamespace, ns), nameof(ns)); 239throw new ArgumentException(SR.Format(SR.XmlPrefixBoundToNamespace, "xmlns", xmlnsNamespace, ns), nameof(ns)); 253throw new ArgumentException(SR.Format(SR.XmlUndefinedPrefix, prefix), nameof(prefix)); 260throw new ArgumentException(SR.XmlEmptyNamespaceRequiresNullPrefix, nameof(prefix)); 272throw new ArgumentException(SR.Format(SR.XmlSpecificBindingNamespace, "xmlns", ns)); 274throw new ArgumentException(SR.Format(SR.XmlSpecificBindingNamespace, "xml", ns)); 311throw new InvalidOperationException(SR.Format(SR.XmlInvalidWriteState, "WriteEndAttribute", WriteState.ToString())); 334throw new ArgumentException(SR.Format(SR.XmlInvalidXmlSpace, _attributeValue)); 370throw new InvalidOperationException(SR.Format(SR.XmlInvalidWriteState, "WriteEndAttribute", WriteState.ToString())); 398throw new ArgumentException(SR.Format(SR.XmlInvalidXmlSpace, _attributeValue)); 434throw new InvalidOperationException(SR.Format(SR.XmlInvalidWriteState, "WriteComment", WriteState.ToString())); 442throw new ArgumentException(SR.XmlInvalidCommentChars, nameof(text)); 460throw new InvalidOperationException(SR.Format(SR.XmlInvalidWriteState, "WriteFullEndElement", WriteState.ToString())); 472throw new InvalidOperationException(SR.Format(SR.XmlInvalidWriteState, "WriteCData", WriteState.ToString())); 487throw new NotSupportedException(SR.Format(SR.XmlMethodNotSupported, "WriteDocType")); 496throw new InvalidOperationException(SR.XmlOnlyOneRoot); 499throw new ArgumentException(SR.InvalidLocalNameEmpty, nameof(localName)); 501throw new InvalidOperationException(SR.Format(SR.XmlInvalidWriteState, "WriteStartElement", WriteState.ToString())); 513throw new ArgumentException(SR.Format(SR.XmlUndefinedPrefix, prefix), nameof(prefix)); 539throw new InvalidOperationException(SR.XmlOnlyOneRoot); 542throw new InvalidOperationException(SR.Format(SR.XmlInvalidWriteState, "WriteStartElement", WriteState.ToString())); 563throw new ArgumentException(SR.Format(SR.XmlUndefinedPrefix, prefix), nameof(prefix)); 609throw new InvalidOperationException(SR.Format(SR.XmlInvalidDepth, "WriteEndElement", _depth.ToString(CultureInfo.InvariantCulture))); 636throw new InvalidOperationException(SR.Format(SR.XmlInvalidDepth, "WriteEndElement", _depth.ToString(CultureInfo.InvariantCulture))); 720throw new InvalidOperationException(SR.XmlIllegalOutsideRoot); 727throw new InvalidOperationException(SR.XmlIllegalOutsideRoot); 754throw new InvalidOperationException(SR.XmlIllegalOutsideRoot); 760throw new InvalidOperationException(SR.XmlIllegalOutsideRoot); 766throw new InvalidOperationException(SR.XmlIllegalOutsideRoot); 819throw new ArgumentException(SR.Format(SR.XmlNamespaceNotFound, namespaceUri), nameof(namespaceUri)); 847throw new ArgumentException(SR.InvalidLocalNameEmpty, nameof(localName)); 869throw new InvalidOperationException(SR.Format(SR.XmlInvalidWriteState, "WriteStartDocument", WriteState.ToString())); 891throw new ArgumentException(SR.XmlProcessingInstructionNotSupported, nameof(name)); 894throw new InvalidOperationException(SR.XmlInvalidDeclaration); 921throw new InvalidOperationException(SR.XmlNoRootElement); 942throw new NotSupportedException(SR.Format(SR.XmlMethodNotSupported, "WriteEntityRef")); 955throw new NotSupportedException(SR.Format(SR.XmlMethodNotSupported, "WriteNmToken")); 967throw new ArgumentException(SR.XmlOnlyWhitespace, nameof(whitespace)); 1030throw new ArgumentOutOfRangeException(nameof(count), SR.Format(SR.SizeExceedsRemainingBufferSpace, chars.Length - offset)); 1082throw new ArgumentOutOfRangeException(nameof(count), SR.Format(SR.SizeExceedsRemainingBufferSpace, chars.Length - offset)); 1106throw new ArgumentException(SR.XmlMissingLowSurrogate, nameof(ch)); 1227throw new ArgumentException(SR.XmlNestedArraysNotSupported, nameof(value)); 1445throw new ArgumentOutOfRangeException(nameof(count), SR.Format(SR.SizeExceedsRemainingBufferSpace, buffer.Length - offset)); 1591throw new InvalidOperationException(SR.XmlCanonicalizationStarted); 1604throw new InvalidOperationException(SR.XmlCanonicalizationNotStarted); 1632throw new InvalidOperationException(SR.Format(SR.XmlInvalidWriteState, "StartFragment", WriteState.ToString())); 1684throw new InvalidOperationException(SR.Format(SR.XmlInvalidWriteState, "EndFragment", WriteState.ToString())); 1719throw new InvalidOperationException(SR.Format(SR.XmlInvalidWriteState, "WriteFragment", WriteState.ToString())); 1817throw new InvalidOperationException(SR.XmlOnlyOneRoot); 1819throw new InvalidOperationException(SR.XmlOnlyOneRoot); 1821throw new InvalidOperationException(SR.Format(SR.XmlInvalidWriteState, "WriteStartElement", WriteState.ToString())); 1828throw new InvalidOperationException(SR.Format(SR.XmlInvalidPrefixState, WriteState.ToString())); 2150throw new ArgumentException(SR.XmlReservedPrefix, nameof(prefix)); 2163throw new ArgumentException(SR.Format(SR.XmlPrefixBoundToNamespace, prefix, nameSpace.Uri, uri), nameof(prefix)); 2167throw new ArgumentException(SR.XmlEmptyNamespaceRequiresNullPrefix, nameof(prefix)); 2169throw new ArgumentException(SR.Format(SR.XmlSpecificBindingNamespace, "xmlns", uri)); 2172throw new ArgumentException(SR.Format(SR.XmlSpecificBindingNamespace, "xml", uri));
System\Xml\XmlBinaryReader.cs (8)
50throw new ArgumentOutOfRangeException(nameof(offset), SR.Format(SR.OffsetExceedsBufferSize, buffer.Length)); 53throw new ArgumentOutOfRangeException(nameof(count), SR.Format(SR.SizeExceedsRemainingBufferSpace, buffer.Length - offset)); 1231throw new ArgumentOutOfRangeException(nameof(offset), SR.Format(SR.OffsetExceedsBufferSize, array.Length)); 1234throw new ArgumentOutOfRangeException(nameof(count), SR.Format(SR.SizeExceedsRemainingBufferSpace, array.Length - offset));
System\Xml\XmlBinaryReaderSession.cs (2)
26throw new ArgumentOutOfRangeException(nameof(id), SR.XmlInvalidID); 30throw new InvalidOperationException(SR.XmlIDDefined);
System\Xml\XmlBinaryWriter.cs (5)
63throw new InvalidOperationException(SR.XmlOnlySingleValue); 1281throw new ArgumentOutOfRangeException(nameof(offset), SR.Format(SR.OffsetExceedsBufferSize, array.Length)); 1284throw new ArgumentOutOfRangeException(nameof(count), SR.Format(SR.SizeExceedsRemainingBufferSpace, array.Length - offset));
System\Xml\XmlBinaryWriterSession.cs (1)
41throw new InvalidOperationException(SR.XmlKeyAlreadyExists);
System\Xml\XmlCanonicalWriter.cs (43)
98throw new ArgumentException(SR.InvalidInclusivePrefixListCollection); 210throw new ArgumentOutOfRangeException(nameof(prefixOffset), SR.Format(SR.OffsetExceedsBufferSize, prefixBuffer.Length)); 213throw new ArgumentOutOfRangeException(nameof(prefixLength), SR.Format(SR.SizeExceedsRemainingBufferSpace, prefixBuffer.Length - prefixOffset)); 218throw new ArgumentOutOfRangeException(nameof(localNameOffset), SR.Format(SR.OffsetExceedsBufferSize, localNameBuffer.Length)); 221throw new ArgumentOutOfRangeException(nameof(localNameLength), SR.Format(SR.SizeExceedsRemainingBufferSpace, localNameBuffer.Length - localNameOffset)); 364throw new ArgumentOutOfRangeException(nameof(ns), SR.Format(SR.CombinedPrefixNSLength, int.MaxValue / maxBytesPerChar)); 367throw new ArgumentOutOfRangeException(nameof(ns), SR.Format(SR.CombinedPrefixNSLength, int.MaxValue / maxBytesPerChar)); 386throw new ArgumentOutOfRangeException(nameof(prefixOffset), SR.Format(SR.OffsetExceedsBufferSize, prefixBuffer.Length)); 389throw new ArgumentOutOfRangeException(nameof(prefixLength), SR.Format(SR.SizeExceedsRemainingBufferSpace, prefixBuffer.Length - prefixOffset)); 394throw new ArgumentOutOfRangeException(nameof(nsOffset), SR.Format(SR.OffsetExceedsBufferSize, nsBuffer.Length)); 397throw new ArgumentOutOfRangeException(nameof(nsLength), SR.Format(SR.SizeExceedsRemainingBufferSpace, nsBuffer.Length - nsOffset)); 400throw new ArgumentOutOfRangeException(nameof(nsLength), SR.Format(SR.CombinedPrefixNSLength, int.MaxValue)); 437throw new ArgumentOutOfRangeException(nameof(prefixOffset), SR.Format(SR.OffsetExceedsBufferSize, prefixBuffer.Length)); 440throw new ArgumentOutOfRangeException(nameof(prefixLength), SR.Format(SR.SizeExceedsRemainingBufferSpace, prefixBuffer.Length - prefixOffset)); 445throw new ArgumentOutOfRangeException(nameof(localNameOffset), SR.Format(SR.OffsetExceedsBufferSize, localNameBuffer.Length)); 448throw new ArgumentOutOfRangeException(nameof(localNameLength), SR.Format(SR.SizeExceedsRemainingBufferSpace, localNameBuffer.Length - localNameOffset)); 508throw new ArgumentOutOfRangeException(nameof(offset), SR.Format(SR.OffsetExceedsBufferSize, chars.Length)); 511throw new ArgumentOutOfRangeException(nameof(count), SR.Format(SR.SizeExceedsRemainingBufferSpace, chars.Length - offset)); 563throw new ArgumentOutOfRangeException(nameof(offset), SR.Format(SR.OffsetExceedsBufferSize, chars.Length)); 566throw new ArgumentOutOfRangeException(nameof(count), SR.Format(SR.SizeExceedsRemainingBufferSpace, chars.Length - offset)); 600throw new ArgumentOutOfRangeException(nameof(offset), SR.Format(SR.OffsetExceedsBufferSize, chars.Length)); 603throw new ArgumentOutOfRangeException(nameof(count), SR.Format(SR.SizeExceedsRemainingBufferSpace, chars.Length - offset));
System\Xml\XmlConverter.cs (2)
459throw new XmlException(SR.Format(SR.XmlInvalidQualifiedName, qname));
System\Xml\XmlDictionaryAsyncCheckWriter.cs (1)
39throw new InvalidOperationException(SR.XmlAsyncIsRunningException);
System\Xml\XmlDictionaryReader.cs (8)
144throw new PlatformNotSupportedException(SR.PlatformNotSupported_MtomEncoding); 167throw new PlatformNotSupportedException(SR.PlatformNotSupported_MtomEncoding); 464throw new InvalidOperationException(SR.XmlInvalidOperation); 485throw new InvalidOperationException(SR.XmlInvalidOperation); 1011throw new ArgumentOutOfRangeException(nameof(offset), SR.Format(SR.OffsetExceedsBufferSize, array.Length)); 1014throw new ArgumentOutOfRangeException(nameof(count), SR.Format(SR.SizeExceedsRemainingBufferSpace, array.Length - offset));
System\Xml\XmlDictionaryReaderQuotas.cs (11)
70throw new InvalidOperationException(SR.QuotaCopyReadOnly); 95throw new InvalidOperationException(SR.Format(SR.QuotaIsReadOnly, "MaxStringContentLength")); 112throw new InvalidOperationException(SR.Format(SR.QuotaIsReadOnly, "MaxArrayLength")); 129throw new InvalidOperationException(SR.Format(SR.QuotaIsReadOnly, "MaxBytesPerRead")); 147throw new InvalidOperationException(SR.Format(SR.QuotaIsReadOnly, "MaxDepth")); 165throw new InvalidOperationException(SR.Format(SR.QuotaIsReadOnly, "MaxNameTableCharCount"));
System\Xml\XmlDictionaryString.cs (2)
30throw new ArgumentOutOfRangeException(nameof(key), SR.Format(SR.ValueMustBeInRange, MinKey, MaxKey));
System\Xml\XmlDictionaryWriter.cs (6)
67throw new PlatformNotSupportedException(SR.PlatformNotSupported_MtomEncoding); 197throw new XmlException(SR.XmlInvalidStream); 442throw new ArgumentOutOfRangeException(nameof(offset), SR.Format(SR.OffsetExceedsBufferSize, array.Length)); 445throw new ArgumentOutOfRangeException(nameof(count), SR.Format(SR.SizeExceedsRemainingBufferSpace, array.Length - offset));
System\Xml\XmlExceptionHelper.cs (58)
33string s = SR.Format(res, arg1, arg2, arg3); 36s += " " + SR.Format(SR.XmlLineInfo, lineInfo.LineNumber, lineInfo.LinePosition); 48s += " " + SR.Format(SR.XmlLineInfo, lineInfo.LineNumber, lineInfo.LinePosition); 64return SR.XmlFoundEndOfFile; 68return SR.Format(SR.XmlFoundElement, GetName(reader.Prefix, reader.LocalName), reader.NamespaceURI); 70return SR.Format(SR.XmlFoundEndElement, GetName(reader.Prefix, reader.LocalName), reader.NamespaceURI); 74return SR.Format(SR.XmlFoundText, reader.Value); 76return SR.Format(SR.XmlFoundComment, reader.Value); 78return SR.Format(SR.XmlFoundCData, reader.Value); 80return SR.Format(SR.XmlFoundNodeType, reader.NodeType); 86ThrowXmlException(reader, SR.XmlStartElementExpected, GetWhatWasFound(reader)); 92ThrowXmlException(reader, SR.XmlStartElementNameExpected, name, GetWhatWasFound(reader)); 98ThrowXmlException(reader, SR.XmlStartElementLocalNameNsExpected, localName, ns, GetWhatWasFound(reader)); 110ThrowXmlException(reader, SR.XmlFullStartElementExpected, GetWhatWasFound(reader)); 116ThrowXmlException(reader, SR.XmlFullStartElementNameExpected, name, GetWhatWasFound(reader)); 122ThrowXmlException(reader, SR.XmlFullStartElementLocalNameNsExpected, localName, ns, GetWhatWasFound(reader)); 134ThrowXmlException(reader, SR.XmlEndElementExpected, localName, ns, GetWhatWasFound(reader)); 140ThrowXmlException(reader, SR.XmlMaxArrayLengthExceeded, maxArrayLength.ToString(NumberFormatInfo.CurrentInfo)); 146ThrowXmlException(reader, SR.XmlMaxArrayLengthOrMaxItemsQuotaExceeded, maxQuota.ToString(NumberFormatInfo.CurrentInfo)); 152ThrowXmlException(reader, SR.XmlMaxBytesPerReadExceeded, maxBytesPerRead.ToString(NumberFormatInfo.CurrentInfo)); 158ThrowXmlException(reader, SR.XmlMaxDepthExceeded, maxDepth.ToString()); 164ThrowXmlException(reader, SR.XmlMaxStringContentLengthExceeded, maxStringContentLength.ToString(NumberFormatInfo.CurrentInfo)); 170ThrowXmlException(reader, SR.XmlMaxNameTableCharCountExceeded, maxNameTableCharCount.ToString(NumberFormatInfo.CurrentInfo)); 176ThrowXmlException(reader, SR.XmlBase64DataExpected, GetWhatWasFound(reader)); 182ThrowXmlException(reader, SR.XmlUndefinedPrefix, prefix); 188ThrowXmlException(reader, SR.XmlProcessingInstructionNotSupported); 194ThrowXmlException(reader, SR.XmlInvalidXmlByte, b.ToString("X2", CultureInfo.InvariantCulture)); 200ThrowXmlException(reader, SR.XmlUnexpectedEndOfFile, ((XmlBaseReader)reader).GetOpenElements()); 206ThrowXmlException(reader, SR.XmlUnexpectedEndElement); 212ThrowXmlException(reader, SR.XmlTokenExpected, expected, found.ToString()); 218ThrowXmlException(reader, SR.XmlTokenExpected, expected, found); 224ThrowXmlException(reader, SR.XmlInvalidCharRef); 230ThrowXmlException(reader, SR.XmlTagMismatch, GetName(expectedPrefix, expectedLocalName), GetName(foundPrefix, foundLocalName)); 241ThrowXmlException(reader, SR.XmlDuplicateAttribute, name, name, ns); 247ThrowXmlException(reader, SR.XmlDuplicateAttribute, GetName(prefix1, localName), GetName(prefix2, localName), ns); 253ThrowXmlException(reader, SR.XmlInvalidFormat); 259ThrowXmlException(reader, SR.XmlInvalidRootData); 265ThrowXmlException(reader, SR.XmlMultipleRootElements); 271ThrowXmlException(reader, SR.XmlDeclNotFirst); 277ThrowXmlException(reader, SR.XmlConversionOverflow, value, type); 283ThrowXmlException(reader, SR.XmlDictionaryStringIDRange, XmlDictionaryString.MinKey.ToString(NumberFormatInfo.CurrentInfo), XmlDictionaryString.MaxKey.ToString(NumberFormatInfo.CurrentInfo)); 289ThrowXmlException(reader, SR.XmlDictionaryStringIDUndefinedStatic, key.ToString(NumberFormatInfo.CurrentInfo)); 295ThrowXmlException(reader, SR.XmlDictionaryStringIDUndefinedSession, key.ToString(NumberFormatInfo.CurrentInfo)); 301ThrowXmlException(reader, SR.XmlEmptyNamespaceRequiresNullPrefix); 306return new XmlException(SR.Format(SR.XmlInvalidConversionWithoutValue, type), exception); 311return new XmlException(SR.Format(SR.XmlInvalidConversion, value, type), exception); 321return new XmlException(SR.Format(SR.XmlInvalidUTF8Bytes, value), exception);
System\Xml\XmlUTF8TextReader.cs (10)
562throw new ArgumentOutOfRangeException(nameof(offset), SR.Format(SR.OffsetExceedsBufferSize, buffer.Length)); 565throw new ArgumentOutOfRangeException(nameof(count), SR.Format(SR.SizeExceedsRemainingBufferSpace, buffer.Length - offset)); 866XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.XmlSpaceBetweenAttributes)); 899XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.XmlInvalidFFFE)); 1035XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.XmlInvalidCommentChars)); 1168XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.XmlInvalidFFFE)); 1326XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.XmlCDATAInvalidAtTopLevel)); 1369XmlExceptionHelper.ThrowXmlException(this, new XmlException(SR.XmlCloseCData));