src\Microsoft.DotNet.Wpf\src\Shared\MS\Utility\FrugalList.cs (14)
334throw new ArgumentException(SR.Format(SR.FrugalList_TargetMapCannotHoldAllData, oldList.ToString(), this.ToString()), nameof(oldList));
608throw new ArgumentException(SR.Format(SR.FrugalList_TargetMapCannotHoldAllData, oldList.ToString(), this.ToString()), nameof(oldList));
1081throw new ArgumentException(SR.Format(SR.FrugalList_TargetMapCannotHoldAllData, oldList.ToString(), this.ToString()), nameof(oldList));
1120throw new ArgumentException(SR.Format(SR.FrugalList_TargetMapCannotHoldAllData, oldList.ToString(), this.ToString()), nameof(oldList));
1405throw new ArgumentException(SR.Format(SR.FrugalList_TargetMapCannotHoldAllData, oldList.ToString(), this.ToString()), nameof(oldList));
1480throw new ArgumentException(SR.Format(SR.FrugalList_TargetMapCannotHoldAllData, oldList.ToString(), this.ToString()), nameof(oldList));
1769throw new InvalidOperationException(SR.FrugalList_CannotPromoteBeyondArray);
2144throw new InvalidOperationException(SR.FrugalList_CannotPromoteBeyondArray);
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\XmlCompatibilityReader.cs (32)
239Error(SR.XCRUnknownCompatElement, elementName);
277Error(SR.XCRInvalidACChild, Reader.Name);
327Error(SR.XCRChoiceNotFound);
839Error(SR.XCRCompatCycle, mappedNamespace);
968Error(SR.XCRInvalidFormat, callerContext);
978Error(SR.XCRUndefinedPrefix, prefix);
983Error(SR.XCRInvalidXMLName, pair);
1014Error(SR.XCRUndefinedPrefix, prefix);
1083Error(SR.XCRUnknownCompatAttrib, attributeName);
1166Error(SR.Format(SR.XCRInvalidACChild, Reader.Name));
1171Error(SR.XCRChoiceNotFound);
1201Error(SR.XCRChoiceOnlyInAC);
1206Error(SR.XCRChoiceAfterFallback);
1214Error(SR.XCRRequiresAttribNotFound);
1219Error(SR.XCRInvalidRequiresAttribute);
1239Error(SR.XCRInvalidAttribInElement, attributeName, Choice);
1271Error(SR.XCRInvalidRequiresAttribute);
1314Error(SR.XCRFallbackOnlyInAC);
1319Error(SR.XCRChoiceNotFound);
1324Error(SR.XCRMultipleFallbackFound);
1342Error(SR.XCRInvalidAttribInElement, attributeName, Fallback);
1413Error(SR.XCRMustUnderstandFailed, namespaceUri);
1888_reader.Error(SR.XCRNSProcessContentNotIgnorable, key);
1899_reader.Error(SR.XCRNSPreserveNotIgnorable, key);
1910_reader.Error(SR.XCRNSPreserveNotIgnorable, key);
1941_reader.Error(SR.XCRDuplicateWildcardProcessContent, _namespaceName);
1945_reader.Error(SR.XCRDuplicateProcessContent, _namespaceName, elementName);
1953_reader.Error(SR.XCRInvalidProcessContent, _namespaceName);
1996_reader.Error(SR.XCRDuplicateWildcardPreserve, _namespaceName);
2000_reader.Error(SR.XCRDuplicatePreserve, itemName, _namespaceName);
2008_reader.Error(SR.XCRInvalidPreserve, _namespaceName);
System\Xaml\InfosetObjects\DeferredWriter.cs (28)
83throw new XamlInternalException(SR.Format(SR.TemplateNotCollected, methodName));
104throw new XamlInternalException(SR.Format(SR.MissingCase, _mode.ToString(), methodName));
117throw new XamlInternalException(SR.Format(SR.TemplateNotCollected, "WriteEndObject"));
133throw new XamlInternalException(SR.Format(SR.MissingCase, _mode.ToString(), "WriteEndObject"));
153throw new XamlInternalException(SR.Format(SR.TemplateNotCollected, "WriteMember"));
161throw new XamlInternalException(SR.Format(SR.MissingCase, _mode.ToString(), "WriteMember"));
174throw new XamlInternalException(SR.Format(SR.TemplateNotCollected, "WriteEndMember"));
182throw new XamlInternalException(SR.Format(SR.MissingCase, _mode.ToString(), "WriteEndMember"));
195throw new XamlInternalException(SR.Format(SR.TemplateNotCollected, "WriteValue"));
220throw new XamlInternalException(SR.Format(SR.MissingCase, _mode.ToString(), "WriteValue"));
232throw new XamlInternalException(SR.Format(SR.TemplateNotCollected, "WriteNamespace"));
245throw new XamlInternalException(SR.Format(SR.MissingCase, _mode.ToString(), "WriteNamespace"));
286throw new XamlInternalException(SR.Format(SR.TemplateNotCollected, nameof(SetLineInfo)));
301throw new XamlInternalException(SR.Format(SR.MissingCase, _mode.ToString(), nameof(SetLineInfo)));
System\Xaml\InfosetObjects\XamlObjectWriter.cs (91)
67throw new ArgumentException(SR.SavedContextSchemaContextNull, nameof(savedContext));
80throw new ArgumentException(SR.SavedContextSchemaContextMismatch, nameof(schemaContext));
266string err = SR.ValueMustBeFollowedByEndMember;
279? SR.Format(SR.NoPropertyInCurrentFrame_GO, xamlType.ToString())
280: SR.NoPropertyInCurrentFrame_GO_noType;
305_context.CurrentInstance = inst ?? throw _context.WithLineInfo(new XamlObjectWriterException(SR.Format(SR.GetObjectNull, parentInstance.GetType(), parentProperty.Name)));
335string err = SR.ValueMustBeFollowedByEndMember;
340string err = SR.Format(SR.CantCreateUnknownType, xamlType.GetQualifiedName());
346string err = SR.Format(SR.NoPropertyInCurrentFrame_SO, xamlType.ToString(),
375throw new XamlParseException(SR.Format(SR.CantAssignRootInstance,
411string err = SR.ValueMustBeFollowedByEndMember;
416string err = SR.NoTypeInCurrentFrame_EO;
421string err = SR.Format(SR.OpenPropertyInCurrentFrame_EO, _context.CurrentType.ToString(),
581err = SR.ValueMustBeFollowedByEndMember;
585err = SR.Format(SR.TypeHasNoContentProperty, _context.CurrentType);
589err = SR.Format(SR.CantSetUnknownProperty, property.ToString());
593err = SR.Format(SR.OpenPropertyInCurrentFrame_SM, _context.CurrentType.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)));
655throw _context.WithLineInfo(new XamlObjectWriterException(SR.Format(SR.AttachedPropOnFwdRefTC,
705? SR.Format(SR.NoPropertyInCurrentFrame_EM, _context.CurrentType.ToString())
706: SR.NoPropertyInCurrentFrame_EM_noType;
832? SR.Format(SR.NoPropertyInCurrentFrame_V, value, _context.CurrentType.ToString())
833: SR.Format(SR.NoPropertyInCurrentFrame_V_noType, value);
884throw new ArgumentException(SR.NamespaceDeclarationPrefixCannotBeNull);
888throw new ArgumentException(SR.NamespaceDeclarationNamespaceCannotBeNull);
903string err = SR.ValueMustBeFollowedByEndMember;
908string err = SR.Format(SR.NoPropertyInCurrentFrame_NS, namespaceDeclaration.Prefix,
1055throw lineInfo.WithLineInfo(new XamlObjectWriterException(SR.Format(SR.MissingKey, instanceType.Name)));
1066throw new InvalidOperationException(SR.Format(SR.ObjectWriterTypeNotAllowed,
1120throw ctx.WithLineInfo(new XamlInternalException(SR.ConstructImplicitType));
1152string errMsg = string.Format(TypeConverterHelper.InvariantEnglishUS, SR.InvalidExpression, factoryMethodName);
1167throw ctx.WithLineInfo(new XamlObjectWriterException(SR.Format(SR.CannotResolveTypeForFactoryMethod, ownerTypeName, propertyName.Name)));
1178throw ctx.WithLineInfo(new XamlObjectWriterException(SR.Format(SR.NotAssignableFrom, currentType.GetQualifiedName(), instType.GetQualifiedName())));
1211throw ctx.WithLineInfo(new XamlInternalException(SR.NonMEWithPositionalParameters));
1221string msg = string.Format(TypeConverterHelper.InvariantEnglishUS, SR.NoSuchConstructor, rawArgs.Count, meType.Name);
1230throw ctx.WithLineInfo(new XamlInternalException(SR.PositionalParamsWrongLength));
1253string err = SR.Format(SR.CantCreateUnknownType, xamlType.GetQualifiedName());
1258throw ctx.WithLineInfo(new XamlObjectWriterException(SR.Format(SR.InitializationSyntaxWithoutTypeConverter, xamlType.GetQualifiedName())));
1299string err = SR.Format(SR.TypeConverterFailed, targetName, value);
1638throw new XamlObjectWriterException(SR.CannotSetBaseUri);
1862Debug.WriteLine(SR.Format(SR.DictionaryFirstChanceException, ctx.ParentType, key, ctx.ParentType.KeyType));
1970string msg = SR.Format(SR.ForwardRefDirectives, names);
2007string msg = SR.Format(SR.ForwardRefDirectives, names);
2060string msg = SR.Format(SR.ForwardRefDirectives, names);
2077throw new XamlInternalException(SR.BadStateObjectWriter);
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)));
2199throw ctx.WithLineInfo(new XamlObjectWriterException(SR.Format(SR.XClassMustMatchRootInstance, className, rootInstanceType.FullName)));
2218throw ctx.WithLineInfo(new XamlObjectWriterException(SR.Format(SR.TransitiveForwardRefDirectives,
2322exceptionMessage.Append(SR.Format(SR.UnresolvedForwardReferences, token.NeededNames[0]));
2327exceptionMessage.Append(SR.Format(SR.LineNumberAndPosition, string.Empty, token.LineNumber, token.LinePosition));
2329exceptionMessage.Append(SR.Format(SR.LineNumberOnly, string.Empty, token.LineNumber));
System\Xaml\MS\Impl\XmlNsInfo.cs (16)
190throw new XamlSchemaException(SR.Format(SR.BadXmlnsDefinition, assembly.FullName));
271throw new XamlSchemaException(SR.Format(SR.BadInternalsVisibleTo1, assembly.FullName));
279throw new XamlSchemaException(SR.Format(SR.BadInternalsVisibleTo2, assemblyName, assembly.FullName), ex);
284throw new XamlSchemaException(SR.Format(SR.BadInternalsVisibleTo2, assemblyName, assembly.FullName), ex);
329throw new XamlSchemaException(SR.Format(SR.BadXmlnsCompat, assembly.FullName));
334throw new XamlSchemaException(SR.Format(SR.DuplicateXmlnsCompat, assembly.FullName, oldns));
378throw new XamlSchemaException(SR.Format(SR.BadXmlnsPrefix, assembly.FullName));
454throw new XamlSchemaException(SR.Format(SR.XmlnsCompatCycle, assembly.FullName, ns));
System\Xaml\Runtime\ClrObjectRuntime.cs (63)
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));
79throw CreateException((SR.Format(SR.CannotResolveTypeForFactoryMethod, xamlType, methodName)));
94throw CreateException(SR.Format(SR.MethodInvocation, qMethodName), UnwrapTargetInvocationException(e));
100throw CreateException(SR.Format(SR.FactoryReturnedNull, qMethodName));
167throw CreateException(SR.Format(SR.TypeConverterFailed2, instance, typeof(string)), ex);
183throw CreateException(SR.Format(SR.CanConvertFromFailed, typeof(T), converter.GetType()), ex);
199throw CreateException(SR.Format(SR.CanConvertToFailed, type, converter.GetType()), ex);
215throw CreateException(SR.Format(SR.TypeConverterFailed2, instance, typeof(string)), ex);
231throw CreateException(SR.Format(SR.TypeConverterFailed2, instance, typeof(T)), ex);
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));
455throw CreateException(SR.SetConnectionId, e);
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));
583throw CreateException(SR.DeferredLoad, e);
596throw new XamlObjectWriterException(SR.Format(SR.DeferringLoaderInstanceNull, deferringLoader));
606throw CreateException(SR.DeferredSave, e);
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\XamlObjectReader.cs (39)
317throw new InvalidOperationException(SR.ExpectedObjectMarkupInfo);
350throw new XamlObjectReaderException(SR.Format(SR.DeferringLoaderInstanceNull, deferringLoader));
915throw new InvalidOperationException(SR.Format(SR.AttachedPropertyOnTypeConvertedOrStringProperty, property.Name, value.ToString(), props[0].Key.ToString()));
919throw new InvalidOperationException(SR.Format(SR.AttachedPropertyOnDictionaryKey, value.ToString(), props[0].Key.ToString()));
1264throw new XamlObjectReaderException(SR.ObjectReaderInstanceDescriptorIncompatibleArguments);
1270throw new XamlObjectReaderException(SR.ObjectReaderInstanceDescriptorInvalidMethod);
1277throw new XamlObjectReaderException(SR.ObjectReaderInstanceDescriptorIncompatibleArguments);
1291throw new XamlObjectReaderException(SR.Format(SR.ObjectReaderInstanceDescriptorIncompatibleArgumentTypes, "null", parameterInfo.ParameterType));
1297throw new XamlObjectReaderException(SR.Format(SR.ObjectReaderInstanceDescriptorIncompatibleArgumentTypes, argument.GetType(), parameterInfo.ParameterType));
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));
1802throw new XamlObjectReaderException(SR.ObjectReaderMultidimensionalArrayNotSupported);
1880throw new XamlObjectReaderException(SR.Format(SR.ObjectReaderAttachedPropertyNotFound, owningType, ap.Key.MemberName));
2135throw new XamlObjectReaderException(SR.Format(SR.ObjectReaderXamlNamePropertyMustBeString, property.Name, property.DeclaringType));
2632throw new XamlObjectReaderException(SR.Format(SR.ObjectReaderTypeNotAllowed,
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\XamlXmlWriter.cs (60)
169throw new ArgumentException(SR.Format(SR.TypeHasInvalidXamlName, type.Name), nameof(type));
194throw new ArgumentException(SR.Format(SR.MemberHasInvalidXamlName, property.Name), nameof(property));
219throw new ArgumentException(SR.XamlXmlWriterCannotWriteNonstringValue, nameof(value));
233throw new ArgumentException(SR.NamespaceDeclarationPrefixCannotBeNull, nameof(namespaceDeclaration));
238throw new ArgumentException(SR.NamespaceDeclarationNamespaceCannotBeNull, nameof(namespaceDeclaration));
243throw new ArgumentException(SR.NamespaceDeclarationCannotBeXml, nameof(namespaceDeclaration));
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"));
924throw new NotSupportedException(SR.MissingCaseXamlNodes);
954throw new XamlXmlWriterException(SR.XamlXmlWriterWriteObjectNotSupportedInCurrentState);
1029throw new InvalidOperationException(SR.Format(SR.XamlXmlWriterWriteNotSupportedInCurrentState, "WriteStartMember"));
1036throw new InvalidOperationException(SR.Format(SR.XamlXmlWriterWriteNotSupportedInCurrentState, "WriteStartMember"));
1061throw new XamlXmlWriterException(SR.ExpandPositionalParametersinTypeWithNoDefaultConstructor);
1080throw new InvalidOperationException(SR.Format(SR.XamlXmlWriterWriteNotSupportedInCurrentState, "WriteEndObject"));
1169throw new XamlXmlWriterException(SR.ExpandPositionalParametersinTypeWithNoDefaultConstructor);
1239throw new InvalidOperationException(SR.Format(SR.XamlXmlWriterWriteNotSupportedInCurrentState, "WriteValue"));
1276throw new InvalidOperationException(SR.Format(SR.WhiteSpaceInCollection, value, containingXamlType.Name));
1316throw new XamlXmlWriterException(SR.Format(SR.CannotWriteXmlSpacePreserveOnMember, frameWithXmlSpacePreserve.Member, value));
1369throw new InvalidOperationException(SR.XamlXmlWriterWriteObjectNotSupportedInCurrentState);
1381throw new InvalidOperationException(SR.XamlXmlWriterIsObjectFromMemberSetForArraysOrNonCollections);
1474throw new InvalidOperationException(SR.Format(SR.WhiteSpaceInCollection, writer.deferredValue, containingXamlType.Name));
1893throw new XamlXmlWriterException(SR.Format(
1894SR.ExpandPositionalParametersWithoutUnderlyingType, objectXamlType.GetQualifiedName()));
1905throw new XamlXmlWriterException(SR.ConstructorNotFoundForGivenPositionalParameters);
1925throw new XamlXmlWriterException(SR.ConstructorNotFoundForGivenPositionalParameters);
1933throw new XamlXmlWriterException(SR.ExpandPositionalParametersWithReadOnlyProperties);
1946throw new XamlXmlWriterException(SR.ConstructorNotFoundForGivenPositionalParameters);
1961throw new XamlXmlWriterException(SR.ConstructorNotFoundForGivenPositionalParameters);
1969throw new XamlXmlWriterException(SR.ConstructorNotFoundForGivenPositionalParameters);
2019throw new InvalidOperationException(SR.Format(SR.XamlXmlWriterWriteNotSupportedInCurrentState, operation));
2044throw new InvalidOperationException(SR.Format(SR.XamlXmlWriterWriteNotSupportedInCurrentState, "WriteGetObject"));