252 references to Format
System.Private.Xml (252)
System\Xml\Core\XmlEncodedRawTextWriter.cs (2)
1852throw new ArgumentException(SR.Format(SR.Xml_IndentCharsNotWhitespace, propertyName)); 1889error = SR.Format(SR.Xml_InvalidSurrogateHighChar, ((uint)chars[i]).ToString("X", CultureInfo.InvariantCulture));
System\Xml\Core\XmlReader.cs (4)
650throw new NotSupportedException(SR.Format(SR.Xml_ReadBinaryContentNotSupported, "ReadContentAsBase64")); 656throw new NotSupportedException(SR.Format(SR.Xml_ReadBinaryContentNotSupported, "ReadElementContentAsBase64")); 662throw new NotSupportedException(SR.Format(SR.Xml_ReadBinaryContentNotSupported, "ReadContentAsBinHex")); 668throw new NotSupportedException(SR.Format(SR.Xml_ReadBinaryContentNotSupported, "ReadElementContentAsBinHex"));
System\Xml\Core\XmlReaderAsync.cs (4)
126throw new NotSupportedException(SR.Format(SR.Xml_ReadBinaryContentNotSupported, "ReadContentAsBase64")); 132throw new NotSupportedException(SR.Format(SR.Xml_ReadBinaryContentNotSupported, "ReadElementContentAsBase64")); 138throw new NotSupportedException(SR.Format(SR.Xml_ReadBinaryContentNotSupported, "ReadContentAsBinHex")); 144throw new NotSupportedException(SR.Format(SR.Xml_ReadBinaryContentNotSupported, "ReadElementContentAsBinHex"));
System\Xml\Core\XmlReaderSettings.cs (2)
523throw new InvalidOperationException(SR.Format(SR.Xml_IncompatibleConformanceLevel, _conformanceLevel.ToString())); 582throw new InvalidOperationException(SR.Format(SR.Xml_IncompatibleConformanceLevel, _conformanceLevel.ToString()));
System\Xml\Core\XmlTextReaderImpl.cs (1)
1792throw new InvalidOperationException(SR.Format(SR.Xml_InvalidReadValueChunk, _curNode.type));
System\Xml\Core\XmlTextReaderImplAsync.cs (1)
617throw new InvalidOperationException(SR.Format(SR.Xml_InvalidReadValueChunk, _curNode.type));
System\Xml\Core\XmlTextWriter.cs (4)
1068throw new ArgumentException(SR.Format(SR.Xml_UndefNamespace, ns)); 1153throw new ArgumentException(SR.Format(SR.Xml_InvalidNameChars, name)); 1738throw new ArgumentException(SR.Format(SR.Xml_InvalidNameChars, name)); 1760throw new ArgumentException(SR.Format(SR.Xml_InvalidXmlSpace, value));
System\Xml\Core\XmlUtf8RawTextWriter.cs (2)
1714throw new ArgumentException(SR.Format(SR.Xml_IndentCharsNotWhitespace, propertyName)); 1751error = SR.Format(SR.Xml_InvalidSurrogateHighChar, ((uint)chars[i]).ToString("X", CultureInfo.InvariantCulture));
System\Xml\Core\XmlWellFormedWriter.cs (4)
825throw new ArgumentException(SR.Format(SR.Xml_InvalidXmlSpace, value)); 1294throw new ArgumentException(SR.Format(SR.Xml_UndefNamespace, ns)); 1643throw new ArgumentException(SR.Format(SR.Xml_NamespaceDeclXmlXmlns, prefix)); 1727throw new ArgumentException(SR.Format(SR.Xml_NamespaceDeclXmlXmlns, prefix));
System\Xml\Core\XmlWellFormedWriterAsync.cs (2)
729throw new ArgumentException(SR.Format(SR.Xml_InvalidXmlSpace, value)); 1145throw new ArgumentException(SR.Format(SR.Xml_UndefNamespace, ns));
System\Xml\Core\XmlWriter.cs (1)
234throw new ArgumentException(SR.Format(SR.Xml_UndefNamespace, ns));
System\Xml\Core\XmlWriterAsync.cs (1)
220throw new ArgumentException(SR.Format(SR.Xml_UndefNamespace, ns));
System\Xml\Dom\DocumentSchemaValidator.cs (3)
270throw new InvalidOperationException(SR.Format(SR.Xml_InvalidXmlDocument, SR.Xdom_NoRootEle)); 316throw new InvalidOperationException(SR.Format(SR.Xml_UnexpectedNodeType, _currentNode.NodeType)); 753throw new InvalidOperationException(SR.Format(SR.Xml_UnexpectedNodeType, _currentNode!.NodeType));
System\Xml\Dom\XmlDeclaration.cs (2)
27throw new ArgumentException(SR.Format(SR.Xdom_standalone, standalone)); 65throw new ArgumentException(SR.Format(SR.Xdom_standalone, value));
System\Xml\Dom\XmlDocument.cs (4)
246throw new ArgumentException(SR.Format(SR.Xdom_Attr_Reserved_XmlNS, namespaceURI)); 1161throw new ArgumentException(SR.Format(SR.Arg_CannotCreateNode, type)); 1256throw new ArgumentException(SR.Format(SR.Xdom_Invalid_NT_String, nodeTypeString)); 1496throw new ArgumentException(SR.Format(SR.XmlDocument_NodeNotFromDocument, nameof(nodeToValidate)));
System\Xml\Resolvers\XmlPreloadedResolver.cs (1)
237throw new XmlException(SR.Format(SR.Xml_CannotResolveUrl, absoluteUri));
System\Xml\Resolvers\XmlPreloadedResolverAsync.cs (1)
30throw new XmlException(SR.Format(SR.Xml_CannotResolveUrl, absoluteUri));
System\Xml\Schema\DataTypeImplementation.cs (6)
3697throw new XmlSchemaException(SR.Format(SR.Sch_InvalidValue, s), e); 3719throw new XmlSchemaException(SR.Format(SR.Sch_InvalidValue, s), e); 3753throw new XmlSchemaException(SR.Format(SR.Sch_InvalidValue, s), e); 3793throw new XmlSchemaException(SR.Format(SR.Sch_InvalidValue, s), e); 3836throw new XmlSchemaException(SR.Format(SR.Sch_InvalidValue, s), e); 3889throw new XmlSchemaException(SR.Format(SR.Sch_InvalidValue, s), e);
System\Xml\Schema\SchemaSetCompiler.cs (2)
1685_restrictionErrorMsg = SR.Format(SR.Sch_ElementFromAnyRule1, derivedElement.QualifiedName.ToString()); 1690_restrictionErrorMsg = SR.Format(SR.Sch_ElementFromAnyRule2, derivedElement.QualifiedName.ToString());
System\Xml\Schema\XmlSchemaObjectTable.cs (8)
287throw new InvalidOperationException(SR.Format(SR.Sch_EnumNotStarted, string.Empty)); 291throw new InvalidOperationException(SR.Format(SR.Sch_EnumFinished, string.Empty)); 346throw new InvalidOperationException(SR.Format(SR.Sch_EnumNotStarted, string.Empty)); 350throw new InvalidOperationException(SR.Format(SR.Sch_EnumFinished, string.Empty)); 362throw new InvalidOperationException(SR.Format(SR.Sch_EnumNotStarted, string.Empty)); 366throw new InvalidOperationException(SR.Format(SR.Sch_EnumFinished, string.Empty)); 378throw new InvalidOperationException(SR.Format(SR.Sch_EnumNotStarted, string.Empty)); 382throw new InvalidOperationException(SR.Format(SR.Sch_EnumFinished, string.Empty));
System\Xml\Schema\XmlSchemaValidator.cs (7)
889throw new InvalidOperationException(SR.Format(SR.Sch_InvalidEndElementMultiple, s_methodNames[(int)ValidatorState.SkipToEndElement])); 1159throw new InvalidOperationException(SR.Format(SR.Sch_InvalidEndElementMultiple, s_methodNames[(int)ValidatorState.EndElement])); 2599string ContinuationString = SR.Format(SR.Sch_ContinuationString, " "); 2677builder.Append(SR.Format(SR.Sch_ElementName, name.Name)); 2717builder.Append(SR.Format(SR.Sch_ElementName, subBuilder)); 2741builder.Append(SR.Format(SR.Sch_AnyElementNS, subBuilder)); 2762return SR.Format(SR.Sch_ElementName, localName);
System\Xml\Serialization\CodeGenerator.cs (3)
868throw new NotSupportedException(SR.Format(SR.UnknownConstantType, valueType.AssemblyQualifiedName)); 1040throw new InvalidOperationException(SR.Format(SR.ArrayTypeIsNotSupported, arrayElementType.AssemblyQualifiedName)); 1085throw new InvalidOperationException(SR.Format(SR.ArrayTypeIsNotSupported, arrayElementType.AssemblyQualifiedName));
System\Xml\Serialization\CodeIdentifier.cs (3)
111if (!IsValid(c)) throw new ArgumentException(SR.Format(SR.XmlInternalErrorDetails, "Invalid identifier character " + ((short)c).ToString(CultureInfo.InvariantCulture)), nameof(c)); 162throw new ArgumentException(SR.Format(SR.XmlInternalErrorDetails, "Unhandled category " + uc), nameof(c)); 173throw new ArgumentException(SR.Format(SR.XmlInvalidIdentifier, ident), nameof(ident));
System\Xml\Serialization\Compilation.cs (7)
88throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Failed to generate XmlSerializer assembly, but did not throw")); 174throw new Exception(SR.Format(SR.FailLoadAssemblyUnderPregenMode, serializerName)); 350throw new InvalidOperationException(SR.Format(SR.XmlPregenTypeDynamic, types[i]!.FullName)); 574throw new InvalidOperationException(SR.Format(SR.XmlInvalidEncodingNotEncoded1, encodingStyle)); 601throw new InvalidOperationException(SR.Format(SR.XmlTypeInBadLoadContext, t.FullName)); 619throw new InvalidOperationException(SR.Format(SR.XmlNotSerializable, mapping.Accessor.Name)); 646throw new InvalidOperationException(SR.Format(SR.XmlNotSerializable, mapping.Accessor.Name));
System\Xml\Serialization\Mappings.cs (6)
120throw new ArgumentException(SR.Format(SR.Xml_InvalidNameChars, name), nameof(name)); 242throw new InvalidOperationException(SR.Format(SR.Xml_InvalidNameChars, Name)); 1083throw new InvalidOperationException(SR.Format(SR.XmlCircularDerivation, TypeDesc!.FullName)); 1323throw new InvalidOperationException(SR.Format(SR.XmlMissingSchema, _xsiType.Namespace)); 1332throw new InvalidOperationException(SR.Format(SR.XmlMissingSchema, _xsiType.Namespace)); 1350if (string.IsNullOrEmpty(_schema.Id)) throw new InvalidOperationException(SR.Format(SR.XmlSerializableNameMissing1, _type!.FullName));
System\Xml\Serialization\Models.cs (2)
67if (!typeDesc.IsSpecial) throw new NotSupportedException(SR.Format(SR.XmlUnsupportedTypeKind, type.FullName)); 209typeDesc.Exception ??= new NotSupportedException(SR.Format(SR.XmlSerializerUnsupportedType, typeDesc.FullName));
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (4)
75throw new ArgumentException(SR.Format(SR.XmlInternalError, "xmlMapping")); 87throw new ArgumentException(SR.Format(SR.XmlInternalError, "xmlMapping")); 1223_ => throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, $"unknown FormatterName: {mapping.TypeDesc.FormatterName}")), 1233throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, $"unknown FormatterName: {mapping.TypeDesc.FormatterName}"));
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (4)
24throw new ArgumentException(SR.Format(SR.XmlInternalError, nameof(xmlMapping))); 33throw new ArgumentException(SR.Format(SR.XmlInternalError, nameof(xmlMapping))); 1117throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Invalid DateTime")); 1372throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, $"Could not find member named {memberName} of type {declaringType}"));
System\Xml\Serialization\SoapReflectionImporter.cs (11)
139return new InvalidOperationException(SR.Format(SR.XmlReflectionError, context), e); 185throw new InvalidOperationException(SR.Format(SR.XmlInvalidTypeAttributes, model.Type.FullName)); 219throw new NotSupportedException(SR.Format(SR.XmlUnsupportedSoapTypeKind, model.TypeDesc.FullName)); 340throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "DeferredWorkItems.Count have changed")); 342throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "DeferredWorkItems.Top have changed")); 401throw new NotSupportedException(SR.Format(SR.XmlRpcRefsInValueType, model.TypeDesc.FullName)); 403throw new NotSupportedException(SR.Format(SR.XmlRpcNestedValueType, member.TypeDesc.FullName)); 426throw new NotSupportedException(SR.Format(SR.XmlRpcArrayOfValueTypes, model.TypeDesc.FullName)); 502throw new InvalidOperationException(SR.Format(SR.XmlInvalidSoapArray, mapping.TypeDesc!.FullName)); 541throw new InvalidOperationException(SR.Format(SR.XmlUdeclaredXsdType, dataType)); 583throw new InvalidOperationException(SR.Format(SR.XmlNoSerializableMembers, model.TypeDesc.FullName));
System\Xml\Serialization\Types.cs (13)
384throw new NotSupportedException(SR.Format(SR.XmlSerializerUnsupportedType, FullName)); 396_exception = new InvalidOperationException(SR.Format(SR.XmlConstructorInaccessible, FullName)); 712throw new InvalidOperationException(SR.Format(SR.XmlUnsupportedOpenGenericType, type)); 776exception = new InvalidOperationException(SR.Format(SR.XmlTypeInaccessible, type.FullName)); 781exception = new InvalidOperationException(SR.Format(SR.XmlTypeStatic, type.FullName)); 799exception ??= new NotSupportedException(SR.Format(SR.XmlSerializerUnsupportedType, type.FullName)); 817exception ??= new NotSupportedException(SR.Format(SR.XmlUnsupportedRank, type.FullName)); 836exception ??= new NotSupportedException(SR.Format(SR.XmlSerializerUnsupportedType, type.FullName)); 891exception = new NotSupportedException(SR.Format(SR.XmlUnsupportedInterface, type.FullName)); 903exception ??= new NotSupportedException(SR.Format(SR.XmlSerializerUnsupportedType, type.FullName)); 1322throw new NotSupportedException(SR.Format(SR.XmlUnsupportedIDictionary, type.FullName)); 1356throw new InvalidOperationException(SR.Format(SR.XmlNoDefaultAccessors, type.FullName)); 1391throw new InvalidOperationException(SR.Format(SR.XmlInvalidArrayTypeSyntax, type));
System\Xml\Serialization\Xmlcustomformatter.cs (3)
75throw new XmlException(SR.Format(SR.XmlUnsupportedDefaultType, type.FullName)); 186if (ids.Length != vals.Length) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Invalid enum")); 254throw new XmlException(SR.Format(SR.XmlUnsupportedDefaultValue, formatter));
System\Xml\Serialization\XmlReflectionImporter.cs (38)
126throw new InvalidOperationException(SR.Format(SR.XmlAnonymousInclude, type.FullName)); 363return new InvalidOperationException(SR.Format(SR.XmlReflectionError, context), e); 368return new InvalidOperationException(SR.Format(SR.XmlTypeReflectionError, context), e); 373return new InvalidOperationException(SR.Format(model.IsProperty ? SR.XmlPropertyReflectionError : SR.XmlFieldReflectionError, model.Name), e); 408throw new InvalidOperationException(SR.Format(SR.XmlInvalidTypeAttributes, model.Type.FullName)); 481throw new ArgumentException(SR.Format(SR.XmlGetSchemaMethodName, provider.MethodName), nameof(provider.MethodName)); 578throw new InvalidOperationException(SR.Format(SR.XmlMissingSchema, baseQname.Namespace)); 609return new InvalidOperationException(SR.Format(SR.XmlInvalidAttributeUse, type.FullName)); 762throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "DeferredWorkItems.Count have changed")); 764throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "DeferredWorkItems.Top have changed")); 787throw new NotSupportedException(SR.Format(SR.XmlUnsupportedInheritance, model.Type.BaseType!.FullName)); 859throw new InvalidOperationException(SR.Format(SR.XmlIllegalMultipleText, model.Type.FullName)); 866throw new InvalidOperationException(SR.Format(SR.XmlMultipleXmlns, model.Type.FullName)); 913throw new InvalidOperationException(SR.Format(SR.XmlMultipleXmlns, model.Type.FullName)); 1153throw new InvalidOperationException(SR.Format(SR.XmlUdeclaredXsdType, dataType)); 1188throw new InvalidOperationException(SR.Format(SR.XmlIllegalAttributeFlagsArray, model.TypeDesc.FullName)); 1203throw new InvalidOperationException(SR.Format(SR.XmlNoSerializableMembers, model.TypeDesc.FullName)); 1252throw new InvalidOperationException(SR.Format(SR.XmlInvalidAttributeType, "XmlAttribute")); 1297throw new InvalidOperationException(SR.Format(SR.XmlSequenceMembers, "Order")); 1425throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierTypeEnum, identifierName)); 1464throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierAmbiguous, choice.MemberName)); 1609throw new InvalidOperationException(SR.Format(SR.XmlIllegalArrayTextAttribute, accessorName)); 1650throw new InvalidOperationException(SR.Format(SR.XmlSequenceMatch, "Order")); 1662throw new InvalidOperationException(SR.Format(SR.XmlIllegalAnyElement, arrayElementType.FullName)); 1700throw new InvalidOperationException(SR.Format(SR.XmlSequenceMatch, "Order")); 1748if (a.XmlAnyElements.Count > 0) throw new InvalidOperationException(SR.Format(SR.XmlIllegalAnyElement, accessor.TypeDesc.FullName)); 1753if (a.XmlAttribute.Type != null) throw new InvalidOperationException(SR.Format(SR.XmlIllegalType, "XmlAttribute")); 1779throw new InvalidOperationException(SR.Format(SR.XmlIllegalType, "XmlText")); 1796throw new InvalidOperationException(SR.Format(SR.XmlIllegalType, "XmlElement")); 1823throw new InvalidOperationException(SR.Format(SR.XmlSequenceMatch, "Order")); 1891throw new InvalidOperationException(SR.Format(SR.XmlSequenceMatch, "Order")); 1903throw new InvalidOperationException(SR.Format(SR.XmlIllegalAnyElement, accessorType.FullName)); 1940throw new InvalidOperationException(SR.Format(SR.XmlSequenceMatch, "Order")); 1954throw new InvalidOperationException(SR.Format(SR.XmlRpcLitArrayElement, accessor.Elements[0].Name)); 1957throw new InvalidOperationException(SR.Format(SR.XmlRpcLitXmlns, accessor.Name)); 2003throw new InvalidOperationException(SR.Format(SR.XmlChoiceMissingAnyValue, accessor.ChoiceIdentifier.Mapping!.TypeDesc!.FullName)); 2174throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Bad accessor type " + accessor.GetType().FullName)); 2209if (isNullable && !typeDesc.IsNullable) throw new InvalidOperationException(SR.Format(SR.XmlInvalidIsNullable, typeDesc.FullName));
System\Xml\Serialization\XmlSchemaExporter.cs (15)
79throw new InvalidOperationException(SR.Format(SR.XmlBareAttributeMember, member.Attribute.Name)); 81throw new InvalidOperationException(SR.Format(SR.XmlBareTextMember, member.Text.Name)); 86throw new InvalidOperationException(SR.Format(SR.XmlIllegalArrayElement, member.Elements[0].Name)); 287throw new InvalidOperationException(SR.Format(SR.XmlIllegalForm, e.Name)); 293throw new InvalidOperationException(SR.Format(SR.XmlIllegalForm, a.Name)); 511throw new InvalidOperationException(SR.Format(SR.XmlDuplicateNamespace, anyNs)); 562throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, $"Unsupported anonymous mapping type: {mapping}")); 619throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Type " + mapping.TypeName + " from namespace '" + ns + "' is an invalid array mapping")); 681throw new InvalidOperationException(SR.Format(SR.XmlInvalidContent, type.ContentModel.Content!.GetType().Name)); 876if (value.GetType() != typeof(string)) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, SR.Format(SR.XmlInvalidDefaultValue, value, value.GetType().FullName))); 916throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Mapping for " + pm.TypeDesc.Name + " missing type property")); 975if (!mapping.IncludeInSchema) throw new InvalidOperationException(SR.Format(SR.XmlCannotIncludeInSchema, mapping.TypeDesc.Name)); 1051throw new InvalidOperationException(SR.Format(SR.XmlIllegalMultipleText, name)); 1074throw new InvalidOperationException(SR.Format(SR.XmlInvalidContent, type.ContentModel.Content!.GetType().Name)); 1143if (!mapping.IncludeInSchema) throw new InvalidOperationException(SR.Format(SR.XmlCannotIncludeInSchema, mapping.TypeDesc!.Name));
System\Xml\Serialization\XmlSchemaImporter.cs (6)
1819throw new InvalidOperationException(SR.Format(SR.XmlMissingGroup, name.Name)); 1828throw new InvalidOperationException(SR.Format(SR.XmlMissingAttributeGroup, name.Name)); 1896throw new InvalidOperationException(SR.Format(SR.XmlInvalidEncoding, name)); 1900throw new InvalidOperationException(SR.Format(SR.XmlMissingDataType, name)); 1926throw new InvalidOperationException(SR.Format(SR.XmlMissingElement, name)); 1934throw new InvalidOperationException(SR.Format(SR.XmlMissingAttribute, name.Name));
System\Xml\Serialization\XmlSchemas.cs (2)
49throw new InvalidOperationException(SR.Format(SR.XmlSchemaDuplicateNamespace, ns)); 262throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "XmlSchemas.Find: Invalid object type " + type.FullName));
System\Xml\Serialization\XmlSerializationReader.cs (24)
948if (arrayInfo.dimensions != 1) throw new InvalidOperationException(SR.Format(SR.XmlInvalidArrayDimentions, CurrentTag())); 967throw new ArgumentNullException(nameof(value), SR.Format(SR.XmlMissingArrayType, CurrentTag())); 972throw new ArgumentException(SR.Format(SR.XmlEmptyArrayType, CurrentTag()), nameof(value)); 993throw new ArgumentException(SR.Format(SR.XmlInvalidArrayDimentions, CurrentTag()), nameof(value)); 1006throw new ArgumentException(SR.Format(SR.XmlInvalidArrayLength, new string(lengthStringSpan)), nameof(value)); 1022throw new ArgumentException(SR.Format(SR.XmlInvalidArrayDimentions, CurrentTag()), nameof(value)); 1074throw new ArgumentException(SR.Format(SR.XmlInvalidArrayLength, dimensions[i]), "value"); 1160throw new InvalidOperationException(SR.Format(SR.XmlUndefinedAlias, prefix)); 1290return new InvalidOperationException(SR.Format(SR.XmlReadOnlyCollection, name)); 1300return new InvalidOperationException(SR.Format(SR.XmlConstructorInaccessible, typeName)); 1305return new InvalidOperationException(SR.Format(SR.XmlConstructorHasSecurityAttributes, typeName)); 1310return new InvalidOperationException(SR.Format(SR.XmlUnknownNode, CurrentTag())); 1326return new InvalidCastException(SR.Format(SR.XmlInvalidNullCast, type.FullName)); 1425if (!href.StartsWith('#')) throw new InvalidOperationException(SR.Format(SR.XmlMissingHref, href)); 1476throw new InvalidOperationException(SR.Format(SR.XmlInvalidHref, id)); 1577if (arrayInfo.dimensions != 1) throw new InvalidOperationException(SR.Format(SR.XmlInvalidArrayDimentions, CurrentTag())); 1663throw new NotSupportedException(SR.Format(SR.XmlRpcArrayOfValueTypes, elementType.FullName)); 2448if (choiceSource == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Can not find " + member.ChoiceIdentifier.MemberName + " in the members mapping.")); 2815if (enumMethodName == null) throw new InvalidOperationException(SR.Format(SR.XmlMissingMethodEnum, mapping.TypeDesc!.Name)); 3059if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, derived.TypeDesc!.Name)); 3096if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, enumMapping.TypeDesc!.Name)); 4624if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, element.Mapping.TypeDesc!.Name)); 4771if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, mapping.TypeDesc!.Name)); 4861if (choiceSource == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "need parent for the " + source));
System\Xml\Serialization\XmlSerializationReaderILGen.cs (7)
373if (choiceSource == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Can not find " + member.ChoiceIdentifier.MemberName + " in the members mapping.")); 693if (enumMethodName == null) throw new InvalidOperationException(SR.Format(SR.XmlMissingMethodEnum, mapping.TypeDesc!.Name)); 1153if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, derived.TypeDesc!.Name)); 1209if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, enumMapping.TypeDesc!.Name)); 3011if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, element.Mapping.TypeDesc!.Name)); 3160if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, mapping.TypeDesc!.Name)); 3289if (choiceSource == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "need parent for the " + source));
System\Xml\Serialization\XmlSerializationWriter.cs (17)
498if (_objectsInUse.ContainsKey(o)) throw new InvalidOperationException(SR.Format(SR.XmlCircularReference, o.GetType().FullName)); 544throw new InvalidOperationException(SR.Format(SR.XmlInvalidXmlns, alias)); 656if (!_objectsInUse.ContainsKey(o)) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "missing stack object of type " + o.GetType().FullName)); 818if (typeof(IXmlSerializable).IsAssignableFrom(type)) return new InvalidOperationException(SR.Format(SR.XmlInvalidSerializable, type.FullName)); 820if (!typeDesc.IsStructLike) return new InvalidOperationException(SR.Format(SR.XmlInvalidUseOfType, type.FullName)); 821return new InvalidOperationException(SR.Format(SR.XmlUnxpectedType, type.FullName)); 858return new InvalidOperationException(SR.Format(SR.XmlIllegalAnyElement, type.FullName)); 1282if (!typeof(IEnumerable).IsAssignableFrom(type)) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "not array like type " + type.FullName)); 1795throw new InvalidOperationException(SR.Format(SR.XmlSerializerUnsupportedType, memberInfos[0])); 2406if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, mapping.TypeDesc!.Name) + Environment.StackTrace); 2454if (defaultValue!.GetType() != typeof(string)) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, name + " has invalid default type " + defaultValue.GetType().Name)); 2757if (enumSource == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Can not find " + member.ChoiceIdentifier.MemberName + " in the members mapping.")); 2985if (methodName == null) throw new InvalidOperationException("derived from " + mapping.TypeDesc!.FullName + ", " + SR.Format(SR.XmlInternalErrorMethod, derived.TypeDesc.Name) + Environment.StackTrace); 3024if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, mapping.TypeDesc.Name) + Environment.StackTrace); 4111if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, structMapping.TypeDesc!.Name) + Environment.StackTrace); 4375throw new InvalidOperationException(SR.Format(SR.XmlUnsupportedDefaultType, type.FullName)); 4484throw new InvalidOperationException(SR.Format(SR.XmlChoiceMissingAnyValue, choiceMapping.TypeDesc!.FullName));
System\Xml\Serialization\XmlSerializationWriterILGen.cs (7)
132if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, mapping.TypeDesc!.Name)); 208if (defaultValue!.GetType() != typeof(string)) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, name + " has invalid default type " + defaultValue.GetType().Name)); 532if (enumSource == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, "Can not find " + member.ChoiceIdentifier.MemberName + " in the members mapping.")); 762if (methodName == null) throw new InvalidOperationException("derived from " + mapping.TypeDesc!.FullName + ", " + SR.Format(SR.XmlInternalErrorMethod, derived.TypeDesc.Name)); 814if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, mapping.TypeDesc.Name)); 2018if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, structMapping.TypeDesc!.Name)); 2309throw new InvalidOperationException(SR.Format(SR.XmlChoiceMissingAnyValue, choiceMapping.TypeDesc!.FullName));
System\Xml\Serialization\XmlSerializer.cs (7)
243throw new FileLoadException(SR.Format(SR.FailLoadAssemblyUnderPregenMode, serializerName)); 372throw new InvalidOperationException(SR.Format(SR.XmlInvalidEncodingNotEncoded1, encodingStyle)); 465throw new InvalidOperationException(SR.Format(SR.XmlInvalidEncodingNotEncoded1, encodingStyle)); 573throw new FileLoadException(SR.Format(SR.FailLoadAssemblyUnderPregenMode, serializerName)); 653throw new InvalidOperationException(SR.Format(SR.XmlPregenTypeDynamic, type.FullName)); 898throw new InvalidOperationException(SR.Format(SR.XmlUnxpectedType, _primitiveType!.FullName)); 980throw new InvalidOperationException(SR.Format(SR.XmlUnxpectedType, _primitiveType!.FullName));
System\Xml\ValidateNames.cs (1)
374throw new XmlException(SR.Format(SR.Xml_EmptyName, string.Empty));
System\Xml\XmlEncoding.cs (1)
32throw new ArgumentException(SR.Format(SR.Enc_InvalidByteInEncoding, -1), (string?)null);
System\Xml\XmlResolver.ThrowingResolver.cs (2)
40throw new XmlException(SR.Format(SR.Xml_NullResolver, absoluteUri)); 45throw new XmlException(SR.Format(SR.Xml_NullResolver, absoluteUri));
System\Xml\XPath\Internal\XPathArrayIterator.cs (1)
58throw new InvalidOperationException(SR.Format(SR.Sch_EnumNotStarted, string.Empty));
System\Xml\XPath\XPathNodeIterator.cs (2)
64throw new InvalidOperationException(SR.Format(SR.Sch_EnumFinished, string.Empty)); 71throw new InvalidOperationException(SR.Format(SR.Sch_EnumNotStarted, string.Empty));
System\Xml\Xsl\ListBase.cs (2)
245throw new InvalidOperationException(SR.Format(SR.Sch_EnumNotStarted, string.Empty)); 248throw new InvalidOperationException(SR.Format(SR.Sch_EnumFinished, string.Empty));
System\Xml\Xsl\QIL\QilValidationVisitor.cs (1)
175message = SR.Format(SR.Qil_Validation, message);
System\Xml\Xslt\XslCompiledTransform.cs (1)
219throw new ArgumentException(SR.Format(SR.Xslt_NotCompiledStylesheet, compiledStylesheet.FullName), nameof(compiledStylesheet));