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