117 references to Format
System.Private.Xml (117)
System\Xml\BinaryXml\XmlBinaryReader.cs (7)
1109throw new InvalidCastException(SR.Format(SR.XmlBinary_CastNotSupported, _token, "Boolean")); 1199throw new InvalidCastException(SR.Format(SR.XmlBinary_CastNotSupported, _token, "DateTime")); 1294throw new InvalidCastException(SR.Format(SR.XmlBinary_CastNotSupported, _token, "Double")); 1389throw new InvalidCastException(SR.Format(SR.XmlBinary_CastNotSupported, _token, "Float")); 1484throw new InvalidCastException(SR.Format(SR.XmlBinary_CastNotSupported, _token, "Decimal")); 1579throw new InvalidCastException(SR.Format(SR.XmlBinary_CastNotSupported, _token, "Int32")); 1674throw new InvalidCastException(SR.Format(SR.XmlBinary_CastNotSupported, _token, "Int64"));
System\Xml\Core\XmlReader.cs (2)
1443return new InvalidOperationException(AddLineInfo(SR.Format(SR.Xml_InvalidReadContentAs, methodName, nodeType), lineInfo)); 1448return new InvalidOperationException(AddLineInfo(SR.Format(SR.Xml_InvalidReadElementContentAs, methodName, nodeType), lineInfo));
System\Xml\Core\XmlTextWriter.cs (2)
1211throw new InvalidOperationException(SR.Format(SR.Xml_WrongToken, s_tokenName[(int)token], s_stateName[(int)State.Error])); 1217throw new InvalidOperationException(SR.Format(SR.Xml_WrongToken, s_tokenName[(int)token], s_stateName[(int)_currentState]));
System\Xml\Core\XmlWellFormedWriter.cs (2)
1851throw new InvalidOperationException(SR.Format(SR.Xml_WrongToken, tokenName[(int)token], GetStateName(_currentState))); 2073string wrongTokenMessage = SR.Format(SR.Xml_WrongToken, tokenName[(int)token], GetStateName(currentState));
System\Xml\Core\XmlWellFormedWriterAsync.cs (1)
1279throw new InvalidOperationException(SR.Format(SR.Xml_WrongToken, tokenName[(int)token], GetStateName(_currentState)));
System\Xml\Schema\DataTypeImplementation.cs (1)
2041exception = new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, _dateTimeFlags.ToString()));
System\Xml\Schema\FacetChecker.cs (1)
1012return new OverflowException(SR.Format(SR.XmlConvert_Overflow, value.ToString(CultureInfo.InvariantCulture), datatype.TypeCodeString));
System\Xml\Schema\SchemaSetCompiler.cs (1)
1675_restrictionErrorMsg = SR.Format(SR.Sch_ElementFromElement, derivedElement.QualifiedName, baseElement.QualifiedName);
System\Xml\Schema\XmlSchemaValidator.cs (3)
2673builder.Append(SR.Format(SR.Sch_ElementNameAndNamespace, name.Name, name.Namespace)); 2713builder.Append(SR.Format(SR.Sch_ElementNameAndNamespace, subBuilder, name.Namespace)); 2758return SR.Format(SR.Sch_ElementNameAndNamespace, localName, ns);
System\Xml\Schema\XmlValueConverter.cs (7)
478return new InvalidCastException(SR.Format(SR.XmlConvert_TypeBadMapping, XmlTypeName, sourceType.Name)); 639throw new InvalidCastException(SR.Format(SR.XmlConvert_TypeNoNamespace, value, prefix)); 644throw new InvalidCastException(SR.Format(SR.XmlConvert_TypeNoNamespace, value, prefix)); 770throw new InvalidCastException(SR.Format(SR.XmlConvert_TypeNoPrefix, qname, qname.Namespace)); 2493throw new InvalidCastException(SR.Format(SR.XmlConvert_TypeToString, XmlTypeName, sourceType.Name)); 2496throw new InvalidCastException(SR.Format(SR.XmlConvert_TypeFromString, XmlTypeName, destinationType.Name)); 3128return new InvalidCastException(SR.Format(SR.XmlConvert_TypeListBadMapping, XmlTypeName, sourceType.Name));
System\Xml\Schema\XsdDateTime.cs (1)
143throw new FormatException(SR.Format(SR.XmlConvert_BadFormat, text, kinds));
System\Xml\Schema\XsdDuration.cs (3)
326exception = new OverflowException(SR.Format(SR.XmlConvert_Overflow, durationType, "TimeSpan")); 629return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, durationType)); 632return new OverflowException(SR.Format(SR.XmlConvert_Overflow, s, durationType));
System\Xml\Serialization\Compilation.cs (2)
190throw new InvalidOperationException(SR.Format(SR.XmlPregenInvalidXmlSerializerAssemblyAttribute, "AssemblyName", "CodeBase")); 543throw new InvalidOperationException(SR.Format(SR.XmlMissingType, typeName, assembly.FullName));
System\Xml\Serialization\Mappings.cs (3)
626throw new InvalidOperationException(SR.Format(SR.XmlIllegalSimpleContentExtension, TypeDesc!.FullName, BaseMapping.TypeDesc.FullName)); 1208throw new InvalidOperationException(SR.Format(SR.XmlSerializableSchemaError, nameof(IXmlSerializable), args.Message)); 1294throw new InvalidOperationException(SR.Format(SR.XmlGetSchemaEmptyTypeName, _type!.FullName, _getSchemaMethod.Name));
System\Xml\Serialization\Models.cs (1)
210throw new InvalidOperationException(SR.Format(SR.XmlSerializerUnsupportedMember, $"{member.DeclaringType!.FullName}.{member.Name}", type.FullName), typeDesc.Exception);
System\Xml\Serialization\SoapAttributeOverrides.cs (1)
32throw new InvalidOperationException(SR.Format(SR.XmlMultipleAttributeOverrides, type.FullName, member));
System\Xml\Serialization\SoapReflectionImporter.cs (4)
169throw new InvalidOperationException(SR.Format(SR.XmlInvalidDataTypeUsage, dataType, "SoapElementAttribute.DataType")); 697throw new InvalidOperationException(SR.Format(SR.XmlIllegalSoapAttribute, accessorName, accessor.TypeDesc.FullName)); 751throw new InvalidOperationException(SR.Format(SR.XmlInvalidDefaultEnumValue, a.SoapDefaultValue.GetType().FullName, fieldTypeDesc.FullName)); 755throw new InvalidOperationException(SR.Format(SR.XmlInvalidDefaultValue, strValue, a.SoapDefaultValue.GetType().FullName));
System\Xml\Serialization\Types.cs (3)
895exception = new NotSupportedException(SR.Format(SR.XmlUnsupportedInterfaceDetails, $"{memberInfo.DeclaringType!.FullName}.{memberInfo.Name}", type.FullName)); 1085throw new InvalidOperationException(SR.Format(SR.XmlReadOnlyPropertyError, propertyInfo.DeclaringType, propertyInfo.Name)); 1326throw new NotSupportedException(SR.Format(SR.XmlUnsupportedIDictionaryDetails, memberInfo, type.FullName));
System\Xml\Serialization\XmlAttributeOverrides.cs (1)
42throw new InvalidOperationException(SR.Format(SR.XmlAttributeSetAgain, type.FullName, member));
System\Xml\Serialization\Xmlcustomformatter.cs (2)
215throw new InvalidOperationException(SR.Format(SR.XmlUnknownConstant, originalValue, typeName ?? "enum")); 464throw new InvalidOperationException(SR.Format(SR.XmlUnknownConstant, parts[i], typeName));
System\Xml\Serialization\XmlReflectionImporter.cs (23)
273throw new InvalidOperationException(SR.Format(SR.XmlInvalidNotNullable, model.TypeDesc.BaseTypeDesc!.FullName, "XmlRoot")); 333throw new InvalidOperationException(SR.Format(SR.XmlMethodTypeNameConflict, accessor.Name, accessor.Namespace)); 392throw new InvalidOperationException(SR.Format(SR.XmlInvalidDataTypeUsage, dataType, "XmlElementAttribute.DataType")); 449throw new InvalidOperationException(SR.Format(SR.XmlSerializableAttributes, model.TypeDesc.FullName, nameof(XmlSchemaProviderAttribute))); 614return new InvalidOperationException(SR.Format(SR.XmlIllegalTypeContext, typeDesc.FullName, GetContextName(context))); 903throw new InvalidOperationException(SR.Format(SR.XmlSequenceInconsistent, "Order", member.Name)); 1440throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierMemberMissing, choice.MemberName, accessorName)); 1457throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierMemberMissing, choice.MemberName, accessorName)); 1471throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierMemberMissing, choice.MemberName, accessorName)); 1562throw new InvalidOperationException(SR.Format(SR.XmlIllegalAttrOrText, accessorName, accessor.TypeDesc.ArrayElementTypeDesc.FullName)); 1637throw new InvalidOperationException(SR.Format(SR.XmlInvalidNotNullable, typeModel.TypeDesc.BaseTypeDesc!.FullName, "XmlElement")); 1810throw new InvalidOperationException(SR.Format(SR.XmlInvalidNotNullable, typeModel.TypeDesc.BaseTypeDesc!.FullName, "XmlElement")); 1853throw new InvalidOperationException(SR.Format(SR.XmlIllegalAttrOrText, accessorName, accessor.TypeDesc)); 1878throw new InvalidOperationException(SR.Format(SR.XmlInvalidNotNullable, typeModel.TypeDesc.BaseTypeDesc!.FullName, "XmlElement")); 2039throw new InvalidOperationException(SR.Format(SR.XmlRpcLitElementNamespace, "Namespace", xmlElement.Namespace)); 2043throw new InvalidOperationException(SR.Format(SR.XmlRpcLitElementNullable, "IsNullable", "true")); 2048throw new InvalidOperationException(SR.Format(SR.XmlRpcLitElementNamespace, "Namespace", a.XmlArray.Namespace)); 2065throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierMissing, nameof(XmlChoiceIdentifierAttribute), accessorName)); 2076throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierMissing, nameof(XmlChoiceIdentifierAttribute), accessorName)); 2114throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdDuplicate, choiceMapping.TypeName, choiceId)); 2135throw new InvalidOperationException(SR.Format(SR.XmlInvalidDefaultValue, strValue, a.XmlDefaultValue.GetType().FullName)); 2168throw new InvalidOperationException(SR.Format(SR.XmlDuplicateElementName, existing.Name, existing.Namespace)); 2176throw new InvalidOperationException(SR.Format(SR.XmlDuplicateAttributeName, existing.Name, existing.Namespace));
System\Xml\Serialization\XmlSchemaExporter.cs (4)
261throw new InvalidOperationException(SR.Format(SR.XmlDuplicateTypeName, newTypeName, newNamespace)); 876if (value.GetType() != typeof(string)) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorDetails, SR.Format(SR.XmlInvalidDefaultValue, value, value.GetType().FullName))); 932throw new InvalidOperationException(SR.Format(SR.XmlInvalidDefaultValue, value, pm.TypeDesc.Name)); 935throw new InvalidOperationException(SR.Format(SR.XmlInvalidDefaultValue, value, pm.TypeDesc.Name));
System\Xml\Serialization\XmlSchemaImporter.cs (5)
270throw new InvalidOperationException(SR.Format(SR.XmlElementHasNoName, parentType.Name, parentType.Namespace)); 430throw new NotSupportedException(SR.Format(SR.XmlUnsupportedRedefine, type.Name, typeNs)); 523throw new InvalidOperationException(SR.Format(SR.XmlTypeUsedTwice, type.QualifiedName.Name, type.QualifiedName.Namespace)); 966throw new InvalidOperationException(SR.Format(SR.XmlDuplicateElementInScope, element.Name, element.Namespace)); 970throw new InvalidOperationException(SR.Format(SR.XmlDuplicateElementInScope1, element.Name, element.Namespace));
System\Xml\Serialization\XmlSchemas.cs (3)
393throw new InvalidOperationException(SR.Format(SR.XmlSchemaIncludeLocation, this.GetType().Name, external.SchemaLocation)); 560item = SR.Format(SR.XmlSchema, ns, details); 588string err = SR.Format(SR.XmlSerializableMergeItem, ns, GetSchemaItem(src, ns, null));
System\Xml\Serialization\XmlSerializationReader.cs (2)
1315return new InvalidOperationException(SR.Format(SR.XmlUnknownConstant, value, enumType.Name)); 1328return new InvalidCastException(SR.Format(SR.XmlInvalidCast, value.GetType().FullName, type.FullName));
System\Xml\Serialization\XmlSerializationWriter.cs (4)
832return new InvalidOperationException(SR.Format(SR.XmlUnknownAnyElement, name, ns)); 837return new InvalidOperationException(SR.Format(SR.XmlInvalidChoiceIdentifierValue, type, identifier)); 848return new InvalidOperationException(SR.Format(SR.XmlUnknownConstant, value, typeName)); 1446throw new InvalidOperationException(SR.Format(SR.XmlDuplicateNs, prefix, ns));
System\Xml\Serialization\XmlSerializer.cs (2)
491throw new InvalidOperationException(SR.Format(SR.XmlSerializeErrorDetails, lineInfo.LineNumber.ToString(CultureInfo.InvariantCulture), lineInfo.LinePosition.ToString(CultureInfo.InvariantCulture)), e); 665throw new ArgumentException(SR.Format(SR.XmlPregenOrphanType, type.FullName, nameOrLocation), nameof(types));
System\Xml\XmlConvert.cs (25)
722throw new ArgumentException(SR.Format(SR.Sch_InvalidDateTimeOption, dateTimeOption, nameof(dateTimeOption))); 756throw new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Boolean")); 774return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Boolean")); 794return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Char")); 809return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Decimal")); 824return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Integer")); 840return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "SByte")); 855return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Int16")); 870return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Int32")); 885return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Int64")); 900return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Byte")); 916return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "UInt16")); 932return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "UInt32")); 948return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "UInt64")); 990return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Single")); 1037return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Double")); 1121throw new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "TimeSpan")); 1233throw new ArgumentException(SR.Format(SR.Sch_InvalidDateTimeOption, dateTimeOption, nameof(dateTimeOption))); 1278exception = new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Guid")); 1282exception = new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Guid")); 1314throw new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Uri")); 1321throw new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Uri")); 1336return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Uri")); 1341return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Uri")); 1784throw new ArgumentException(SR.Format(SR.Sch_InvalidDateTimeOption, dateTimeOption, nameof(dateTimeOption)));
System\Xml\Xslt\XslCompiledTransform.cs (1)
192throw new ArgumentException(SR.Format(SR.Xslt_IncompatibleCompiledStylesheetVersion, generatedCodeAttr.Version, s_version), nameof(compiledStylesheet));