src\Microsoft.DotNet.Wpf\src\Shared\MS\Utility\FrugalList.cs (14)
331throw new ArgumentException(SR.Format(SR.FrugalList_TargetMapCannotHoldAllData, oldList.ToString(), this.ToString()), nameof(oldList));
612throw new ArgumentException(SR.Format(SR.FrugalList_TargetMapCannotHoldAllData, oldList.ToString(), this.ToString()), nameof(oldList));
1096throw new ArgumentException(SR.Format(SR.FrugalList_TargetMapCannotHoldAllData, oldList.ToString(), this.ToString()), nameof(oldList));
1135throw new ArgumentException(SR.Format(SR.FrugalList_TargetMapCannotHoldAllData, oldList.ToString(), this.ToString()), nameof(oldList));
1424throw new ArgumentException(SR.Format(SR.FrugalList_TargetMapCannotHoldAllData, oldList.ToString(), this.ToString()), nameof(oldList));
1499throw new ArgumentException(SR.Format(SR.FrugalList_TargetMapCannotHoldAllData, oldList.ToString(), this.ToString()), nameof(oldList));
1789throw new InvalidOperationException(SR.FrugalList_CannotPromoteBeyondArray);
2169throw new InvalidOperationException(SR.FrugalList_CannotPromoteBeyondArray);
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\XmlCompatibilityReader.cs (32)
234Error(SR.XCRUnknownCompatElement, elementName);
275Error(SR.XCRInvalidACChild, Reader.Name);
325Error(SR.XCRChoiceNotFound);
837Error(SR.XCRCompatCycle, mappedNamespace);
967Error(SR.XCRInvalidFormat, callerContext);
977Error(SR.XCRUndefinedPrefix, prefix);
982Error(SR.XCRInvalidXMLName, pair);
1013Error(SR.XCRUndefinedPrefix, prefix);
1083Error(SR.XCRUnknownCompatAttrib, attributeName);
1167Error(SR.Format(SR.XCRInvalidACChild, Reader.Name));
1173Error(SR.XCRChoiceNotFound);
1203Error(SR.XCRChoiceOnlyInAC);
1209Error(SR.XCRChoiceAfterFallback);
1217Error(SR.XCRRequiresAttribNotFound);
1223Error(SR.XCRInvalidRequiresAttribute);
1244Error(SR.XCRInvalidAttribInElement, attributeName, Choice);
1276Error(SR.XCRInvalidRequiresAttribute);
1319Error(SR.XCRFallbackOnlyInAC);
1325Error(SR.XCRChoiceNotFound);
1331Error(SR.XCRMultipleFallbackFound);
1349Error(SR.XCRInvalidAttribInElement, attributeName, Fallback);
1421Error(SR.XCRMustUnderstandFailed, namespaceUri);
1917_reader.Error(SR.XCRNSProcessContentNotIgnorable, key);
1929_reader.Error(SR.XCRNSPreserveNotIgnorable, key);
1941_reader.Error(SR.XCRNSPreserveNotIgnorable, key);
1972_reader.Error(SR.XCRDuplicateWildcardProcessContent, _namespaceName);
1976_reader.Error(SR.XCRDuplicateProcessContent, _namespaceName, elementName);
1984_reader.Error(SR.XCRInvalidProcessContent, _namespaceName);
2027_reader.Error(SR.XCRDuplicateWildcardPreserve, _namespaceName);
2031_reader.Error(SR.XCRDuplicatePreserve, itemName, _namespaceName);
2039_reader.Error(SR.XCRInvalidPreserve, _namespaceName);
System\Xaml\InfosetObjects\DeferredWriter.cs (28)
81throw new XamlInternalException(SR.Format(SR.TemplateNotCollected, methodName));
103throw new XamlInternalException(SR.Format(SR.MissingCase, _mode.ToString(), methodName));
116throw new XamlInternalException(SR.Format(SR.TemplateNotCollected, "WriteEndObject"));
133throw new XamlInternalException(SR.Format(SR.MissingCase, _mode.ToString(), "WriteEndObject"));
154throw new XamlInternalException(SR.Format(SR.TemplateNotCollected, "WriteMember"));
162throw new XamlInternalException(SR.Format(SR.MissingCase, _mode.ToString(), "WriteMember"));
175throw new XamlInternalException(SR.Format(SR.TemplateNotCollected, "WriteEndMember"));
183throw new XamlInternalException(SR.Format(SR.MissingCase, _mode.ToString(), "WriteEndMember"));
196throw new XamlInternalException(SR.Format(SR.TemplateNotCollected, "WriteValue"));
222throw new XamlInternalException(SR.Format(SR.MissingCase, _mode.ToString(), "WriteValue"));
234throw new XamlInternalException(SR.Format(SR.TemplateNotCollected, "WriteNamespace"));
247throw new XamlInternalException(SR.Format(SR.MissingCase, _mode.ToString(), "WriteNamespace"));
288throw new XamlInternalException(SR.Format(SR.TemplateNotCollected, nameof(SetLineInfo)));
300throw new XamlInternalException(SR.Format(SR.MissingCase, _mode.ToString(), nameof(SetLineInfo)));
System\Xaml\InfosetObjects\XamlObjectWriter.cs (91)
62throw new ArgumentException(SR.SavedContextSchemaContextNull, nameof(savedContext));
76throw new ArgumentException(SR.SavedContextSchemaContextMismatch, nameof(schemaContext));
264string err = SR.ValueMustBeFollowedByEndMember;
278? SR.Format(SR.NoPropertyInCurrentFrame_GO, xamlType.ToString())
279: SR.NoPropertyInCurrentFrame_GO_noType;
304_context.CurrentInstance = inst ?? throw _context.WithLineInfo(new XamlObjectWriterException(SR.Format(SR.GetObjectNull, parentInstance.GetType(), parentProperty.Name)));
334string 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,
413string err = SR.ValueMustBeFollowedByEndMember;
419string err = SR.NoTypeInCurrentFrame_EO;
425string err = SR.Format(SR.OpenPropertyInCurrentFrame_EO, _context.CurrentType.ToString(),
588err = SR.ValueMustBeFollowedByEndMember;
592err = SR.Format(SR.TypeHasNoContentProperty, _context.CurrentType);
596err = SR.Format(SR.CantSetUnknownProperty, property.ToString());
600err = SR.Format(SR.OpenPropertyInCurrentFrame_SM, _context.CurrentType.ToString(),
606err = SR.Format(SR.NoTypeInCurrentFrame_SM, property.ToString());
645throw _context.WithLineInfo(new XamlObjectWriterException(SR.Format(SR.LateConstructionDirective, property.Name)));
654throw _context.WithLineInfo(new XamlObjectWriterException(SR.Format(SR.SettingPropertiesIsNotAllowed, property.Name)));
663throw _context.WithLineInfo(new XamlObjectWriterException(SR.Format(SR.AttachedPropOnFwdRefTC,
715? SR.Format(SR.NoPropertyInCurrentFrame_EM, _context.CurrentType.ToString())
716: SR.NoPropertyInCurrentFrame_EM_noType;
846? SR.Format(SR.NoPropertyInCurrentFrame_V, value, _context.CurrentType.ToString())
847: SR.Format(SR.NoPropertyInCurrentFrame_V_noType, value);
898throw new ArgumentException(SR.NamespaceDeclarationPrefixCannotBeNull);
903throw new ArgumentException(SR.NamespaceDeclarationNamespaceCannotBeNull);
918string err = SR.ValueMustBeFollowedByEndMember;
924string err = SR.Format(SR.NoPropertyInCurrentFrame_NS, namespaceDeclaration.Prefix,
1075throw lineInfo.WithLineInfo(new XamlObjectWriterException(SR.Format(SR.MissingKey, instanceType.Name)));
1087throw new InvalidOperationException(SR.Format(SR.ObjectWriterTypeNotAllowed,
1144throw ctx.WithLineInfo(new XamlInternalException(SR.ConstructImplicitType));
1175string errMsg = string.Format(TypeConverterHelper.InvariantEnglishUS, SR.InvalidExpression, factoryMethodName);
1190throw ctx.WithLineInfo(new XamlObjectWriterException(SR.Format(SR.CannotResolveTypeForFactoryMethod, ownerTypeName, propertyName.Name)));
1201throw ctx.WithLineInfo(new XamlObjectWriterException(SR.Format(SR.NotAssignableFrom, currentType.GetQualifiedName(), instType.GetQualifiedName())));
1235throw ctx.WithLineInfo(new XamlInternalException(SR.NonMEWithPositionalParameters));
1245string msg = string.Format(TypeConverterHelper.InvariantEnglishUS, SR.NoSuchConstructor, rawArgs.Count, meType.Name);
1254throw ctx.WithLineInfo(new XamlInternalException(SR.PositionalParamsWrongLength));
1277string err = SR.Format(SR.CantCreateUnknownType, xamlType.GetQualifiedName());
1283throw ctx.WithLineInfo(new XamlObjectWriterException(SR.Format(SR.InitializationSyntaxWithoutTypeConverter, xamlType.GetQualifiedName())));
1327string err = SR.Format(SR.TypeConverterFailed, targetName, value);
1669throw new XamlObjectWriterException(SR.CannotSetBaseUri);
1900Debug.WriteLine(SR.Format(SR.DictionaryFirstChanceException, ctx.ParentType, key, ctx.ParentType.KeyType));
2015string msg = SR.Format(SR.ForwardRefDirectives, names);
2054string msg = SR.Format(SR.ForwardRefDirectives, names);
2108string msg = SR.Format(SR.ForwardRefDirectives, names);
2126throw new XamlInternalException(SR.BadStateObjectWriter);
2200throw ctx.WithLineInfo(new XamlObjectWriterException(SR.Format(SR.NameScopeException, ex.Message), ex));
2228throw ctx.WithLineInfo(new XamlObjectWriterException(SR.Format(SR.DirectiveNotAtRoot, XamlLanguage.Class)));
2233throw ctx.WithLineInfo(new XamlObjectWriterException(SR.Format(SR.DirectiveMustBeString, XamlLanguage.Class)));
2248throw ctx.WithLineInfo(new XamlObjectWriterException(SR.Format(SR.XClassMustMatchRootInstance, className, rootInstanceType.FullName)));
2267throw ctx.WithLineInfo(new XamlObjectWriterException(SR.Format(SR.TransitiveForwardRefDirectives,
2376exceptionMessage.Append(SR.Format(SR.UnresolvedForwardReferences, token.NeededNames[0]));
2381exceptionMessage.Append(SR.Format(SR.LineNumberAndPosition, string.Empty, token.LineNumber, token.LinePosition));
2384exceptionMessage.Append(SR.Format(SR.LineNumberOnly, string.Empty, token.LineNumber));
System\Xaml\MS\Impl\XmlNsInfo.cs (16)
198throw new XamlSchemaException(SR.Format(SR.BadXmlnsDefinition, assembly.FullName));
283throw new XamlSchemaException(SR.Format(SR.BadInternalsVisibleTo1, assembly.FullName));
292throw new XamlSchemaException(SR.Format(SR.BadInternalsVisibleTo2, assemblyName, assembly.FullName), ex);
298throw new XamlSchemaException(SR.Format(SR.BadInternalsVisibleTo2, assemblyName, assembly.FullName), ex);
344throw new XamlSchemaException(SR.Format(SR.BadXmlnsCompat, assembly.FullName));
349throw new XamlSchemaException(SR.Format(SR.DuplicateXmlnsCompat, assembly.FullName, oldns));
396throw new XamlSchemaException(SR.Format(SR.BadXmlnsPrefix, assembly.FullName));
473throw new XamlSchemaException(SR.Format(SR.XmlnsCompatCycle, assembly.FullName, ns));
System\Xaml\Runtime\ClrObjectRuntime.cs (63)
48throw CreateException(SR.Format(SR.CannotCreateBadType, xamlType.Name));
57throw CreateException(SR.Format(SR.NoConstructor, xamlType.UnderlyingType), ex);
66throw CreateException(SR.Format(SR.ConstructorInvocation, xamlType.UnderlyingType), UnwrapTargetInvocationException(ex));
80throw CreateException((SR.Format(SR.CannotResolveTypeForFactoryMethod, xamlType, methodName)));
96throw CreateException(SR.Format(SR.MethodInvocation, qMethodName), UnwrapTargetInvocationException(e));
102throw CreateException(SR.Format(SR.FactoryReturnedNull, qMethodName));
173throw CreateException(SR.Format(SR.TypeConverterFailed2, instance, typeof(string)), ex);
190throw CreateException(SR.Format(SR.CanConvertFromFailed, typeof(T), converter.GetType()), ex);
207throw CreateException(SR.Format(SR.CanConvertToFailed, type, converter.GetType()), ex);
224throw CreateException(SR.Format(SR.TypeConverterFailed2, instance, typeof(string)), ex);
241throw CreateException(SR.Format(SR.TypeConverterFailed2, instance, typeof(T)), ex);
277throw CreateException(SR.Format(SR.GetValue, property), UnwrapTargetInvocationException(e));
306throw CreateException(SR.Format(SR.SetValue, property), UnwrapTargetInvocationException(e));
328throw CreateException(SR.Format(SR.AddCollection, collectionType), UnwrapTargetInvocationException(e));
345throw CreateException(SR.Format(SR.AddDictionary, dictionaryType), UnwrapTargetInvocationException(e));
368throw CreateException(SR.Format(SR.GetItemsException, collectionType), ex);
414throw CreateException(SR.Format(SR.GetItemsException, dictionaryType), ex);
431throw CreateException(SR.Format(SR.APSException, instance));
456throw CreateException(SR.Format(SR.APSException, instance));
476throw CreateException(SR.SetConnectionId, e);
503throw CreateException(SR.Format(SR.InitializationGuard, xamlType), e);
521throw CreateException(SR.Format(SR.ProvideValue, me.GetType()), e);
541throw CreateException(SR.Format(SR.AddDictionary, xamlType), e);
552throw CreateException((SR.Format(SR.XmlDataNull, property.Name)));
557throw new XamlInternalException(SR.Format(SR.XmlValueNotReader, property.Name));
571throw CreateException(SR.Format(SR.SetXmlInstance, property), e);
589throw new XamlObjectWriterException(SR.Format(SR.DeferringLoaderInstanceNull, deferringLoader));
607throw CreateException(SR.DeferredLoad, e);
620throw new XamlObjectWriterException(SR.Format(SR.DeferringLoaderInstanceNull, deferringLoader));
632throw CreateException(SR.DeferredSave, e);
649throw CreateException(SR.Format(SR.ShouldSerializeFailed, member));
732throw CreateException(SR.Format(SR.GetItemsException, collectionType), UnwrapTargetInvocationException(ex));
737throw CreateException(SR.Format(SR.GetItemsReturnedNull, collectionType));
System\Xaml\XamlObjectReader.cs (39)
311throw new InvalidOperationException(SR.ExpectedObjectMarkupInfo);
344throw new XamlObjectReaderException(SR.Format(SR.DeferringLoaderInstanceNull, deferringLoader));
908throw new InvalidOperationException(SR.Format(SR.AttachedPropertyOnTypeConvertedOrStringProperty, property.Name, value.ToString(), props[0].Key.ToString()));
912throw new InvalidOperationException(SR.Format(SR.AttachedPropertyOnDictionaryKey, value.ToString(), props[0].Key.ToString()));
1260throw new XamlObjectReaderException(SR.ObjectReaderInstanceDescriptorIncompatibleArguments);
1267throw new XamlObjectReaderException(SR.ObjectReaderInstanceDescriptorInvalidMethod);
1274throw new XamlObjectReaderException(SR.ObjectReaderInstanceDescriptorIncompatibleArguments);
1288throw new XamlObjectReaderException(SR.Format(SR.ObjectReaderInstanceDescriptorIncompatibleArgumentTypes, "null", parameterInfo.ParameterType));
1294throw new XamlObjectReaderException(SR.Format(SR.ObjectReaderInstanceDescriptorIncompatibleArgumentTypes, argument.GetType(), parameterInfo.ParameterType));
1701throw new XamlObjectReaderException(SR.Format(SR.ObjectReaderNoDefaultConstructor, value.GetType()));
1704throw new XamlObjectReaderException(SR.Format(SR.ObjectReaderNoMatchingConstructor, value.GetType()));
1726throw new XamlObjectReaderException(SR.Format(SR.ObjectReaderTypeIsNested, xamlType.Name));
1730throw new XamlObjectReaderException(SR.Format(SR.ObjectReaderTypeCannotRoundtrip, xamlType.Name));
1781throw new XamlObjectReaderException(SR.Format(SR.ObjectReaderXamlNamedElementAlreadyRegistered, Name));
1806throw new XamlObjectReaderException(SR.ObjectReaderMultidimensionalArrayNotSupported);
1885throw new XamlObjectReaderException(SR.Format(SR.ObjectReaderAttachedPropertyNotFound, owningType, ap.Key.MemberName));
2143throw new XamlObjectReaderException(SR.Format(SR.ObjectReaderXamlNamePropertyMustBeString, property.Name, property.DeclaringType));
2642throw new XamlObjectReaderException(SR.Format(SR.ObjectReaderTypeNotAllowed,
2654throw new XamlObjectReaderException(SR.Format(SR.ObjectReader_TypeNotVisible, clrType.FullName));
2899throw new XamlObjectReaderException(SR.Format(SR.XamlFactoryInvalidXamlNode, reader.NodeType));
2910throw new XamlObjectReaderException(SR.Format(SR.XamlFactoryInvalidXamlNode, reader.NodeType));
2949throw new InvalidOperationException(SR.Format(SR.XamlFactoryInvalidXamlNode, reader.NodeType));
System\Xaml\XamlXmlWriter.cs (60)
166throw new ArgumentException(SR.Format(SR.TypeHasInvalidXamlName, type.Name), nameof(type));
191throw new ArgumentException(SR.Format(SR.MemberHasInvalidXamlName, property.Name), nameof(property));
215throw new ArgumentException(SR.XamlXmlWriterCannotWriteNonstringValue, nameof(value));
230throw new ArgumentException(SR.NamespaceDeclarationPrefixCannotBeNull, nameof(namespaceDeclaration));
235throw new ArgumentException(SR.NamespaceDeclarationNamespaceCannotBeNull, nameof(namespaceDeclaration));
240throw new ArgumentException(SR.NamespaceDeclarationCannotBeXml, nameof(namespaceDeclaration));
398throw new InvalidOperationException(SR.Format(SR.PrefixNotInFrames, prefix));
515throw new XamlXmlWriterException(SR.Format(SR.XamlXmlWriterDuplicateMember, property.Name));
744throw new XamlXmlWriterException(SR.Format(SR.XamlXmlWriterPrefixAlreadyDefinedInCurrentScope, prefix));
749throw new XamlXmlWriterException(SR.Format(SR.XamlXmlWriterNamespaceAlreadyHasPrefixInCurrentScope, ns));
783throw new XamlXmlWriterException(SR.Format(SR.XamlXmlWriterWriteNotSupportedInCurrentState, "WriteObject"));
788throw new XamlXmlWriterException(SR.Format(SR.XamlXmlWriterWriteNotSupportedInCurrentState, "WriteEndObject"));
793throw new XamlXmlWriterException(SR.Format(SR.XamlXmlWriterWriteNotSupportedInCurrentState, "WriteStartMember"));
798throw new XamlXmlWriterException(SR.Format(SR.XamlXmlWriterWriteNotSupportedInCurrentState, "WriteEndMember"));
803throw new XamlXmlWriterException(SR.Format(SR.XamlXmlWriterWriteNotSupportedInCurrentState, "WriteValue"));
808throw new XamlXmlWriterException(SR.Format(SR.XamlXmlWriterWriteNotSupportedInCurrentState, "WriteNamespace"));
936throw new NotSupportedException(SR.MissingCaseXamlNodes);
966throw new XamlXmlWriterException(SR.XamlXmlWriterWriteObjectNotSupportedInCurrentState);
1041throw new InvalidOperationException(SR.Format(SR.XamlXmlWriterWriteNotSupportedInCurrentState, "WriteStartMember"));
1048throw new InvalidOperationException(SR.Format(SR.XamlXmlWriterWriteNotSupportedInCurrentState, "WriteStartMember"));
1073throw new XamlXmlWriterException(SR.ExpandPositionalParametersinTypeWithNoDefaultConstructor);
1092throw new InvalidOperationException(SR.Format(SR.XamlXmlWriterWriteNotSupportedInCurrentState, "WriteEndObject"));
1181throw new XamlXmlWriterException(SR.ExpandPositionalParametersinTypeWithNoDefaultConstructor);
1251throw new InvalidOperationException(SR.Format(SR.XamlXmlWriterWriteNotSupportedInCurrentState, "WriteValue"));
1288throw new InvalidOperationException(SR.Format(SR.WhiteSpaceInCollection, value, containingXamlType.Name));
1330throw new XamlXmlWriterException(SR.Format(SR.CannotWriteXmlSpacePreserveOnMember, frameWithXmlSpacePreserve.Member, value));
1387throw new InvalidOperationException(SR.XamlXmlWriterWriteObjectNotSupportedInCurrentState);
1399throw new InvalidOperationException(SR.XamlXmlWriterIsObjectFromMemberSetForArraysOrNonCollections);
1492throw new InvalidOperationException(SR.Format(SR.WhiteSpaceInCollection, writer.deferredValue, containingXamlType.Name));
1911throw new XamlXmlWriterException(SR.Format(
1912SR.ExpandPositionalParametersWithoutUnderlyingType, objectXamlType.GetQualifiedName()));
1923throw new XamlXmlWriterException(SR.ConstructorNotFoundForGivenPositionalParameters);
1943throw new XamlXmlWriterException(SR.ConstructorNotFoundForGivenPositionalParameters);
1951throw new XamlXmlWriterException(SR.ExpandPositionalParametersWithReadOnlyProperties);
1965throw new XamlXmlWriterException(SR.ConstructorNotFoundForGivenPositionalParameters);
1980throw new XamlXmlWriterException(SR.ConstructorNotFoundForGivenPositionalParameters);
1988throw new XamlXmlWriterException(SR.ConstructorNotFoundForGivenPositionalParameters);
2040throw new InvalidOperationException(SR.Format(SR.XamlXmlWriterWriteNotSupportedInCurrentState, operation));
2065throw new InvalidOperationException(SR.Format(SR.XamlXmlWriterWriteNotSupportedInCurrentState, "WriteGetObject"));