139 references to Format
System.Xaml (139)
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\ReflectionHelper.cs (3)
353throw new ArgumentException(SR.Format(SR.ParserAttributeArgsLow, attrType.Name)); 366throw new ArgumentException(SR.Format(SR.ParserAttributeArgsLow, attrType.Name)); 371throw new ArgumentException(SR.Format(SR.ParserAttributeArgsHigh, attrType.Name));
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\XmlCompatibilityReader.cs (1)
1166Error(SR.Format(SR.XCRInvalidACChild, Reader.Name));
System\Windows\Markup\ArrayExtension.cs (1)
97throw new InvalidOperationException(SR.Format(SR.MarkupExtensionArrayBadType, Type.Name));
System\Windows\Markup\StaticExtension.cs (4)
69throw new ArgumentException(SR.Format(SR.MarkupExtensionBadStatic, _member)); 76throw new ArgumentException(SR.Format(SR.MarkupExtensionBadStatic, _member)); 96throw new ArgumentException(SR.Format(SR.MarkupExtensionBadStatic, _member)); 112throw new ArgumentException(SR.Format(SR.MarkupExtensionBadStatic, typeNameForError is not null ? $"{typeNameForError}.{_member}" : _member));
System\Windows\Markup\TypeExtension.cs (1)
80throw new InvalidOperationException(SR.Format(SR.MarkupExtensionTypeNameBad, _typeName));
System\Xaml\Context\ObjectWriterContext.cs (2)
170throw new XamlParseException(SR.Format(SR.TypeNotFound, xamlType.GetQualifiedName())); 436throw new ArgumentException(SR.Format(SR.NotAmbientType, xamlType.Name), nameof(types));
System\Xaml\Context\ServiceProviderContext.cs (5)
142throw new ArgumentException(SR.Format(SR.ValueInArrayIsNull, "properties")); 158throw new ArgumentException(SR.Format(SR.ValueInArrayIsNull, "types")); 176throw new ArgumentException(SR.Format(SR.ValueInArrayIsNull, "properties")); 192throw new ArgumentException(SR.Format(SR.ValueInArrayIsNull, "types")); 212throw new ArgumentException(SR.Format(SR.ValueInArrayIsNull, "properties"));
System\Xaml\Context\XamlContext.cs (3)
81throw new XamlInternalException(SR.Format(SR.ParentlessPropertyElement, propName.ScopedName)); 88throw new XamlParseException(SR.Format(SR.PrefixNotFound, propName.Prefix)); 241throw new XamlParseException(SR.Format(SR.PrefixNotFound, typeName.Prefix));
System\Xaml\InfosetObjects\DeferredWriter.cs (7)
83throw new XamlInternalException(SR.Format(SR.TemplateNotCollected, methodName)); 117throw new XamlInternalException(SR.Format(SR.TemplateNotCollected, "WriteEndObject")); 153throw new XamlInternalException(SR.Format(SR.TemplateNotCollected, "WriteMember")); 174throw new XamlInternalException(SR.Format(SR.TemplateNotCollected, "WriteEndMember")); 195throw new XamlInternalException(SR.Format(SR.TemplateNotCollected, "WriteValue")); 232throw new XamlInternalException(SR.Format(SR.TemplateNotCollected, "WriteNamespace")); 286throw new XamlInternalException(SR.Format(SR.TemplateNotCollected, nameof(SetLineInfo)));
System\Xaml\InfosetObjects\XamlObjectWriter.cs (19)
279? SR.Format(SR.NoPropertyInCurrentFrame_GO, xamlType.ToString()) 340string err = SR.Format(SR.CantCreateUnknownType, xamlType.GetQualifiedName()); 585err = SR.Format(SR.TypeHasNoContentProperty, _context.CurrentType); 589err = SR.Format(SR.CantSetUnknownProperty, property.ToString()); 599err = SR.Format(SR.NoTypeInCurrentFrame_SM, property.ToString()); 638throw _context.WithLineInfo(new XamlObjectWriterException(SR.Format(SR.LateConstructionDirective, property.Name))); 647throw _context.WithLineInfo(new XamlObjectWriterException(SR.Format(SR.SettingPropertiesIsNotAllowed, property.Name))); 705? SR.Format(SR.NoPropertyInCurrentFrame_EM, _context.CurrentType.ToString()) 833: SR.Format(SR.NoPropertyInCurrentFrame_V_noType, value); 1055throw lineInfo.WithLineInfo(new XamlObjectWriterException(SR.Format(SR.MissingKey, instanceType.Name))); 1253string err = SR.Format(SR.CantCreateUnknownType, xamlType.GetQualifiedName()); 1258throw ctx.WithLineInfo(new XamlObjectWriterException(SR.Format(SR.InitializationSyntaxWithoutTypeConverter, xamlType.GetQualifiedName()))); 1970string msg = SR.Format(SR.ForwardRefDirectives, names); 2007string msg = SR.Format(SR.ForwardRefDirectives, names); 2060string msg = SR.Format(SR.ForwardRefDirectives, names); 2151throw ctx.WithLineInfo(new XamlObjectWriterException(SR.Format(SR.NameScopeException, ex.Message), ex)); 2181throw ctx.WithLineInfo(new XamlObjectWriterException(SR.Format(SR.DirectiveNotAtRoot, XamlLanguage.Class))); 2186throw ctx.WithLineInfo(new XamlObjectWriterException(SR.Format(SR.DirectiveMustBeString, XamlLanguage.Class))); 2322exceptionMessage.Append(SR.Format(SR.UnresolvedForwardReferences, token.NeededNames[0]));
System\Xaml\MS\Impl\XmlNsInfo.cs (4)
190throw new XamlSchemaException(SR.Format(SR.BadXmlnsDefinition, assembly.FullName)); 271throw new XamlSchemaException(SR.Format(SR.BadInternalsVisibleTo1, assembly.FullName)); 329throw new XamlSchemaException(SR.Format(SR.BadXmlnsCompat, assembly.FullName)); 378throw new XamlSchemaException(SR.Format(SR.BadXmlnsPrefix, assembly.FullName));
System\Xaml\NameScope.cs (6)
40throw new ArgumentException(SR.Format(SR.NameScopeInvalidIdentifierName, name)); 58throw new ArgumentException(SR.Format(SR.NameScopeDuplicateNamesNotAllowed, name)); 78throw new ArgumentException(SR.Format(SR.NameScopeNameNotFound, name)); 146throw new ArgumentException(SR.Format(SR.ReferenceIsNull, "item.Key"), nameof(item)); 150throw new ArgumentException(SR.Format(SR.ReferenceIsNull, "item.Value"), nameof(item)); 160throw new ArgumentException(SR.Format(SR.ReferenceIsNull, "item.Key"), nameof(item));
System\Xaml\NameScopeDictionary.cs (3)
49throw new ArgumentException(SR.Format(SR.NameScopeInvalidIdentifierName, name)); 74throw new ArgumentException(SR.Format(SR.NameScopeDuplicateNamesNotAllowed, name)); 100throw new ArgumentException(SR.Format(SR.NameScopeNameNotFound, name));
System\Xaml\Parser\GenericTypeNameParser.cs (6)
57error = SR.Format(SR.InvalidTypeString, text); 64error = SR.Format(SR.PrefixNotFound, prefix); 269frame.Namespace = ns ?? throw new TypeNameParserException(SR.Format(SR.PrefixNotFound, prefix)); 296throw new TypeNameParserException(SR.Format(SR.InvalidTypeString, _inputText)); 302throw new TypeNameParserException(SR.Format(SR.InvalidTypeString, _inputText)); 313throw new TypeNameParserException(SR.Format(SR.InvalidTypeString, _inputText));
System\Xaml\Parser\MePullParser.cs (1)
413error = SR.Format(SR.MissingComma1, _tokenizer.TokenText);
System\Xaml\Parser\MeScanner.cs (2)
395throw new XamlParseException(this, SR.Format(SR.InvalidClosingBracketCharacers, ch.ToString())); 489throw new XamlParseException(this, SR.Format(SR.MalformedBracketCharacters, ch.ToString()));
System\Xaml\Parser\XamlScanner.cs (2)
252throw LineInfo(new XamlParseException(SR.Format(SR.ParentlessPropertyElement, _xmlReader.Name))); 563throw new XamlParseException(SR.Format(SR.InvalidXamlMemberName, xmlName));
System\Xaml\Runtime\ClrObjectRuntime.cs (24)
49throw CreateException(SR.Format(SR.CannotCreateBadType, xamlType.Name)); 57throw CreateException(SR.Format(SR.NoConstructor, xamlType.UnderlyingType), ex); 65throw CreateException(SR.Format(SR.ConstructorInvocation, xamlType.UnderlyingType), UnwrapTargetInvocationException(ex)); 94throw CreateException(SR.Format(SR.MethodInvocation, qMethodName), UnwrapTargetInvocationException(e)); 100throw CreateException(SR.Format(SR.FactoryReturnedNull, qMethodName)); 266throw CreateException(SR.Format(SR.GetValue, property), UnwrapTargetInvocationException(e)); 292throw CreateException(SR.Format(SR.SetValue, property), UnwrapTargetInvocationException(e)); 313throw CreateException(SR.Format(SR.AddCollection, collectionType), UnwrapTargetInvocationException(e)); 329throw CreateException(SR.Format(SR.AddDictionary, dictionaryType), UnwrapTargetInvocationException(e)); 351throw CreateException(SR.Format(SR.GetItemsException, collectionType), ex); 396throw CreateException(SR.Format(SR.GetItemsException, dictionaryType), ex); 412throw CreateException(SR.Format(SR.APSException, instance)); 435throw CreateException(SR.Format(SR.APSException, instance)); 482throw CreateException(SR.Format(SR.InitializationGuard, xamlType), e); 499throw CreateException(SR.Format(SR.ProvideValue, me.GetType()), e); 519throw CreateException(SR.Format(SR.AddDictionary, xamlType), e); 531throw CreateException((SR.Format(SR.XmlDataNull, property.Name))); 537throw new XamlInternalException(SR.Format(SR.XmlValueNotReader, property.Name)); 549throw CreateException(SR.Format(SR.SetXmlInstance, property), e); 567throw new XamlObjectWriterException(SR.Format(SR.DeferringLoaderInstanceNull, deferringLoader)); 596throw new XamlObjectWriterException(SR.Format(SR.DeferringLoaderInstanceNull, deferringLoader)); 622throw CreateException(SR.Format(SR.ShouldSerializeFailed, member)); 703throw CreateException(SR.Format(SR.GetItemsException, collectionType), UnwrapTargetInvocationException(ex)); 707throw CreateException(SR.Format(SR.GetItemsReturnedNull, collectionType));
System\Xaml\Runtime\DynamicMethodRuntime.cs (2)
235throw new NotSupportedException(SR.Format(SR.CantGetWriteonlyProperty, member)); 252throw new NotSupportedException(SR.Format(SR.CantSetReadonlyProperty, member));
System\Xaml\Schema\CollectionReflector.cs (2)
90throw new XamlSchemaException(SR.Format(SR.AmbiguousCollectionItemType, type)); 97throw new XamlSchemaException(SR.Format(SR.AmbiguousDictionaryItemType, type));
System\Xaml\Schema\XamlMemberInvoker.cs (2)
60throw new NotSupportedException(SR.Format(SR.CantGetWriteonlyProperty, _member)); 79throw new NotSupportedException(SR.Format(SR.CantSetReadonlyProperty, _member));
System\Xaml\Schema\XamlTypeInvoker.cs (1)
328throw new MissingMethodException(SR.Format(SR.NoDefaultConstructor, underlyingType.FullName));
System\Xaml\Schema\XamlValueConverter.cs (1)
34throw new ArgumentException(SR.Format(SR.ArgumentRequired, $"{nameof(converterType)}, {nameof(targetType)}, {nameof(name)}"));
System\Xaml\XamlMarkupExtensionWriter.cs (1)
138throw new InvalidOperationException(SR.Format(SR.XamlMarkupExtensionWriterDuplicateMember, property.Name));
System\Xaml\XamlObjectReader.cs (10)
350throw new XamlObjectReaderException(SR.Format(SR.DeferringLoaderInstanceNull, deferringLoader)); 1698throw new XamlObjectReaderException(SR.Format(SR.ObjectReaderNoDefaultConstructor, value.GetType())); 1700throw new XamlObjectReaderException(SR.Format(SR.ObjectReaderNoMatchingConstructor, value.GetType())); 1722throw new XamlObjectReaderException(SR.Format(SR.ObjectReaderTypeIsNested, xamlType.Name)); 1726throw new XamlObjectReaderException(SR.Format(SR.ObjectReaderTypeCannotRoundtrip, xamlType.Name)); 1777throw new XamlObjectReaderException(SR.Format(SR.ObjectReaderXamlNamedElementAlreadyRegistered, Name)); 2643throw new XamlObjectReaderException(SR.Format(SR.ObjectReader_TypeNotVisible, clrType.FullName)); 2883throw new XamlObjectReaderException(SR.Format(SR.XamlFactoryInvalidXamlNode, reader.NodeType)); 2894throw new XamlObjectReaderException(SR.Format(SR.XamlFactoryInvalidXamlNode, reader.NodeType)); 2933throw new InvalidOperationException(SR.Format(SR.XamlFactoryInvalidXamlNode, reader.NodeType));
System\Xaml\XamlSchemaContext.cs (4)
271throw new ArgumentException(SR.Format(SR.ReferenceIsNull, "xamlTypeName.Name"), nameof(xamlTypeName)); 275throw new ArgumentException(SR.Format(SR.ReferenceIsNull, "xamlTypeName.Namespace"), nameof(xamlTypeName)); 286throw new ArgumentException(SR.Format(SR.CollectionCannotContainNulls, "xamlTypeName.TypeArguments")); 308throw new ArgumentException(SR.Format(SR.CollectionCannotContainNulls, "typeArguments"));
System\Xaml\XamlType.cs (2)
1480throw new ArgumentException(SR.Format(SR.CollectionCannotContainNulls, "typeArguments")); 1646string err = SR.Format(SR.UsableDuringInitializationOnME, this);
System\Xaml\XamlTypeName.cs (1)
225throw new InvalidOperationException(SR.Format(SR.XamlTypeNameCannotGetPrefix, Namespace));
System\Xaml\XamlXmlWriter.cs (19)
169throw new ArgumentException(SR.Format(SR.TypeHasInvalidXamlName, type.Name), nameof(type)); 194throw new ArgumentException(SR.Format(SR.MemberHasInvalidXamlName, property.Name), nameof(property)); 395throw new InvalidOperationException(SR.Format(SR.PrefixNotInFrames, prefix)); 511throw new XamlXmlWriterException(SR.Format(SR.XamlXmlWriterDuplicateMember, property.Name)); 735throw new XamlXmlWriterException(SR.Format(SR.XamlXmlWriterPrefixAlreadyDefinedInCurrentScope, prefix)); 740throw new XamlXmlWriterException(SR.Format(SR.XamlXmlWriterNamespaceAlreadyHasPrefixInCurrentScope, ns)); 773throw new XamlXmlWriterException(SR.Format(SR.XamlXmlWriterWriteNotSupportedInCurrentState, "WriteObject")); 778throw new XamlXmlWriterException(SR.Format(SR.XamlXmlWriterWriteNotSupportedInCurrentState, "WriteEndObject")); 783throw new XamlXmlWriterException(SR.Format(SR.XamlXmlWriterWriteNotSupportedInCurrentState, "WriteStartMember")); 788throw new XamlXmlWriterException(SR.Format(SR.XamlXmlWriterWriteNotSupportedInCurrentState, "WriteEndMember")); 793throw new XamlXmlWriterException(SR.Format(SR.XamlXmlWriterWriteNotSupportedInCurrentState, "WriteValue")); 798throw new XamlXmlWriterException(SR.Format(SR.XamlXmlWriterWriteNotSupportedInCurrentState, "WriteNamespace")); 1029throw new InvalidOperationException(SR.Format(SR.XamlXmlWriterWriteNotSupportedInCurrentState, "WriteStartMember")); 1036throw new InvalidOperationException(SR.Format(SR.XamlXmlWriterWriteNotSupportedInCurrentState, "WriteStartMember")); 1080throw new InvalidOperationException(SR.Format(SR.XamlXmlWriterWriteNotSupportedInCurrentState, "WriteEndObject")); 1239throw new InvalidOperationException(SR.Format(SR.XamlXmlWriterWriteNotSupportedInCurrentState, "WriteValue")); 1893throw new XamlXmlWriterException(SR.Format( 2019throw new InvalidOperationException(SR.Format(SR.XamlXmlWriterWriteNotSupportedInCurrentState, operation)); 2044throw new InvalidOperationException(SR.Format(SR.XamlXmlWriterWriteNotSupportedInCurrentState, "WriteGetObject"));