234 references to SR
System.ComponentModel.Composition (234)
Microsoft\Internal\GenerationServices.cs (2)
156SR.Format(SR.InvalidMetadataValue, value.GetType().FullName));
Microsoft\Internal\LazyServices.cs (2)
18throw new InvalidOperationException(SR.Format(SR.LazyServices_LazyResolvesToNull, typeof(T), argument));
Microsoft\Internal\ReflectionServices.cs (1)
89throw new Exception(SR.Diagnostic_InternalExceptionMessage);
Microsoft\Internal\Requires.cs (4)
100throw new ArgumentException(SR.Format(SR.ArgumentOutOfRange_InvalidEnumInSet, parameterName, value, enumFlagSet.ToString()), parameterName); 119throw new ArgumentException(SR.Format(SR.ArgumentException_EmptyString, parameterName), parameterName);
src\libraries\Common\src\System\Composition\Diagnostics\CompositionTraceSource.cs (3)
50throw new Exception(SR.Format(SR.Diagnostic_InternalExceptionMessage, SR.Diagnostic_TraceUnnecessaryWork));
System\ComponentModel\Composition\AttributedModel\AttributedModelDiscovery.cs (2)
55throw new ArgumentException(SR.Format(SR.Argument_ReflectionContextReturnsReflectionOnlyType, nameof(reflectionContext)), nameof(reflectionContext));
System\ComponentModel\Composition\CatalogReflectionContextAttribute.cs (2)
39throw new InvalidOperationException(SR.ReflectionContext_Type_Required, invalidCastException); 43throw new MissingMethodException(SR.ReflectionContext_Requires_DefaultConstructor, missingMethodException);
System\ComponentModel\Composition\ChangeRejectedException.cs (2)
59return SR.Format( 60SR.CompositionException_ChangesRejected,
System\ComponentModel\Composition\CompositionException.cs (10)
179SR.CompositionException_MultipleErrorsWithMultiplePaths, 187SR.CompositionException_SingleErrorWithMultiplePaths, 194throw new Exception(SR.Diagnostic_InternalExceptionMessage); 200SR.CompositionException_SingleErrorWithSinglePath, 205writer.AppendLine(SR.CompositionException_ReviewErrorProperty); 222writer.Append(SR.CompositionException_PathsCountSeparator); 230writer.AppendLine().Append(SR.CompositionException_ErrorPrefix).Append(' '); 253writer.AppendFormat(CultureInfo.CurrentCulture, SR.CompositionException_ElementPrefix, element.DisplayName); 257writer.AppendFormat(CultureInfo.CurrentCulture, SR.CompositionException_OriginFormat, SR.CompositionException_OriginSeparator, element.DisplayName);
System\ComponentModel\Composition\ConstraintServices.cs (1)
90throw new Exception(SR.Diagnostic_InternalExceptionMessage);
System\ComponentModel\Composition\ContractNameServices.cs (6)
71throw new Exception(SR.Diagnostic_InternalExceptionMessage); 132throw new Exception(SR.Expecting_Empty_Queue); 248throw new Exception(SR.Expecting_Generic_Type); 270throw new Exception(SR.Expecting_AtleastOne_Type); 307throw new Exception(SR.Expecting_Empty_Queue); 351throw new Exception(SR.Diagnostic_InternalExceptionMessage);
System\ComponentModel\Composition\ErrorBuilder.cs (7)
14SR.ImportEngine_PreventedByExistingImport, 23SR.ImportEngine_InvalidStateForRecomposition, 31SR.ImportEngine_ComposeTookTooManyIterations, 57SR.ImportEngine_PartCannotActivate, 72SR.ImportEngine_PartCannotSetImport, 88SR.ImportEngine_PartCannotGetExportedValue, 101SR.ImportEngine_PartCycle,
System\ComponentModel\Composition\ExceptionBuilder.cs (16)
23string message = Format(SR.Argument_NullElement, parameterName); 41throw new ArgumentException(SR.Format(SR.ArgumentException_EmptyString, nameof(memberName)), nameof(memberName)); 44string message = Format(SR.NotImplemented_NotOverriddenByDerived, memberName); 55throw new ArgumentException(SR.ArgumentException_EmptyString); 59string message = Format(SR.ExportDefinitionNotOnThisComposablePart, parameterName); 70throw new ArgumentException(SR.Format(SR.ArgumentException_EmptyString, nameof(parameterName)), nameof(parameterName)); 73string message = Format(SR.ImportDefinitionNotOnThisComposablePart, parameterName); 94throw new ArgumentException(SR.Format(SR.ArgumentException_EmptyString, nameof(parameterName)), nameof(parameterName)); 102return new ArgumentException(SR.Format(SR.ReflectionModel_InvalidPartDefinition, partDefinitionType), parameterName); 111throw new ArgumentException(SR.Format(SR.ArgumentException_EmptyString, nameof(typeName)), nameof(typeName)); 114string message = Format(SR.ExportFactory_TooManyGenericParameters, typeName);
System\ComponentModel\Composition\ExportServices.cs (3)
142throw new CompositionContractMismatchException(SR.Format( 143SR.ContractMismatch_ExportedValueCannotBeCastToT, 179throw new Exception(SR.Diagnostic_InternalExceptionMessage);
System\ComponentModel\Composition\Hosting\ApplicationCatalog.cs (1)
77throw new Exception(SR.Diagnostic_InternalExceptionMessage);
System\ComponentModel\Composition\Hosting\AssemblyCatalog.cs (2)
394throw new ArgumentException(SR.Format(SR.Argument_AssemblyReflectionOnly, nameof(assembly)), nameof(assembly));
System\ComponentModel\Composition\Hosting\AtomicComposition.cs (6)
179throw new InvalidOperationException(SR.InvalidOperation_RevertAndCompleteActionsMustNotThrow, new AggregateException(exceptions)); 214throw new InvalidOperationException(SR.InvalidOperation_RevertAndCompleteActionsMustNotThrow, new AggregateException(exceptions)); 223throw new Exception(SR.Diagnostic_InternalExceptionMessage); 262throw new InvalidOperationException(SR.AtomicComposition_AlreadyNested); 324throw new InvalidOperationException(SR.AtomicComposition_PartOfAnotherAtomicComposition); 333throw new InvalidOperationException(SR.AtomicComposition_AlreadyCompleted);
System\ComponentModel\Composition\Hosting\CatalogExportProvider.CatalogExport.cs (2)
102throw new Exception(SR.Diagnostic_InternalExceptionMessage); 111throw new Exception(SR.Diagnostic_InternalExceptionMessage);
System\ComponentModel\Composition\Hosting\CatalogExportProvider.cs (5)
304throw new Exception(SR.Diagnostic_InternalExceptionMessage); 664throw new Exception(SR.Diagnostic_InternalExceptionMessage); 874throw new InvalidOperationException(SR.Format(SR.ObjectMustBeInitialized, "SourceProvider")); // NOLOC 905throw new InvalidOperationException(SR.ObjectAlreadyInitialized);
System\ComponentModel\Composition\Hosting\ComposablePartExportProvider.cs (5)
156throw new Exception(SR.Diagnostic_InternalExceptionMessage); 258throw new InvalidOperationException(SR.ReentrantCompose); 407throw new InvalidOperationException(SR.Format(SR.ObjectMustBeInitialized, "SourceProvider")); // NOLOC 433throw new InvalidOperationException(SR.ObjectAlreadyInitialized);
System\ComponentModel\Composition\Hosting\CompositionContainer.cs (2)
582throw new Exception(SR.Diagnostic_InternalExceptionMessage); 589throw new Exception(SR.Diagnostic_InternalExceptionMessage);
System\ComponentModel\Composition\Hosting\CompositionService.cs (3)
52throw new Exception(SR.Diagnostic_InternalExceptionMessage); 61throw new Exception(SR.Diagnostic_InternalExceptionMessage); 74throw new ChangeRejectedException(SR.NotSupportedCatalogChanges);
System\ComponentModel\Composition\Hosting\CompositionServices.cs (7)
43throw new Exception(SR.Diagnostic_InternalExceptionMessage); 127throw new Exception(SR.Diagnostic_InternalExceptionMessage); 269throw ExceptionBuilder.CreateDiscoveryException(SR.Discovery_ReservedMetadataNameUsed, member.GetDisplayName(), provider.Name); 276throw ExceptionBuilder.CreateDiscoveryException(SR.Discovery_DuplicateMetadataNameValues, member.GetDisplayName(), provider.Name); 303throw ExceptionBuilder.CreateDiscoveryException(SR.Discovery_ReservedMetadataNameUsed, pi.GetDisplayName(), pi.Name); 310throw ExceptionBuilder.CreateDiscoveryException(SR.Discovery_MetadataContainsValueWithInvalidType, pi.GetDisplayName(), value.GetType().GetDisplayName()); 315throw ExceptionBuilder.CreateDiscoveryException(SR.Discovery_DuplicateMetadataNameValues, member.GetDisplayName(), pi.Name);
System\ComponentModel\Composition\Hosting\DirectoryCatalog.cs (1)
571throw new Exception(SR.Diagnostic_InternalExceptionMessage);
System\ComponentModel\Composition\Hosting\ExportProvider.cs (5)
108throw new ImportCardinalityMismatchException(SR.Format(SR.CardinalityMismatch_NoExports, definition)); 112throw new Exception(SR.Diagnostic_InternalExceptionMessage); 114throw new ImportCardinalityMismatchException(SR.Format(SR.CardinalityMismatch_TooManyExports_Constraint, definition));
System\ComponentModel\Composition\Hosting\ExportProvider.GetExportOverrides.cs (3)
727throw new Exception(SR.Diagnostic_InternalExceptionMessage); 787throw new InvalidOperationException(SR.Format(SR.InvalidMetadataView, metadataViewType.Name));
System\ComponentModel\Composition\Hosting\ImportEngine.cs (1)
723throw new Exception(SR.Diagnostic_InternalExceptionMessage);
System\ComponentModel\Composition\Hosting\TypeCatalog.cs (10)
185throw new ArgumentException(SR.Format(SR.Argument_ElementReflectionOnlyType, nameof(types)), nameof(types)); 196throw new ArgumentException(SR.Format(SR.Argument_ReflectionContextReturnsReflectionOnlyType, nameof(reflectionContext)), nameof(reflectionContext)); 216throw new ArgumentException(SR.Format(SR.Argument_ElementReflectionOnlyType, nameof(types)), nameof(types)); 263throw new Exception(SR.Diagnostic_InternalExceptionMessage); 359return SR.Format( 360SR.TypeCatalog_DisplayNameFormat, 370return SR.TypeCatalog_Empty;
System\ComponentModel\Composition\MetadataViewGenerator.cs (5)
97throw new Exception(SR.Diagnostic_InternalExceptionMessage); 115throw new Exception(SR.Diagnostic_InternalExceptionMessage); 122throw new Exception(SR.Diagnostic_InternalExceptionMessage); 308throw new NotSupportedException(SR.Format( 309SR.InvalidSetterOnMetadataField,
System\ComponentModel\Composition\MetadataViewProvider.cs (13)
41throw new NotSupportedException(SR.Format(SR.NotSupportedInterfaceMetadataView, metadataViewType.FullName), ex); 51throw new CompositionContractMismatchException(SR.Format( 52SR.ContractMismatch_MetadataViewImplementationCanNotBeNull, 59throw new CompositionContractMismatchException(SR.Format( 60SR.ContractMismatch_MetadataViewImplementationDoesNotImplementViewInterface, 83throw new Exception(SR.Diagnostic_InternalExceptionMessage); 91throw new CompositionContractMismatchException(SR.Format( 92SR.CompositionException_MetadataViewInvalidConstructor, 103throw new CompositionContractMismatchException(SR.Format( 104SR.ContractMismatch_InvalidCastOnMetadataField, 114throw new CompositionContractMismatchException(SR.Format( 115SR.ContractMismatch_NullReferenceOnMetadataField,
System\ComponentModel\Composition\Primitives\ComposablePartCatalog.cs (1)
64throw new Exception(SR.Diagnostic_InternalExceptionMessage);
System\ComponentModel\Composition\Primitives\CompositionElement.cs (1)
16private static readonly ICompositionElement UnknownOrigin = new CompositionElement(SR.CompositionElement_UnknownOrigin, (ICompositionElement?)null);
System\ComponentModel\Composition\Primitives\ContractBasedImportDefinition.cs (2)
229SR.Format(SR.Argument_NullElement, "requiredMetadata"));
System\ComponentModel\Composition\Primitives\ImportDefinition.cs (2)
105throw new ArgumentException(SR.Format(SR.ArgumentOutOfRange_InvalidEnum, nameof(cardinality), cardinality, nameof(ImportCardinality)), nameof(cardinality));
System\ComponentModel\Composition\ReflectionModel\ExportfactoryCreator.cs (1)
37throw new Exception(SR.Diagnostic_InternalExceptionMessage);
System\ComponentModel\Composition\ReflectionModel\ExportingMember.cs (6)
54SR.Format( 55SR.ReflectionModel_ExportThrewException, 66SR.Format( 67SR.ExportNotValidOnIndexers, 94SR.Format( 95SR.ReflectionModel_ExportNotReadable,
System\ComponentModel\Composition\ReflectionModel\GenericSpecializationPartCreationInfo.cs (3)
151throw new Exception(SR.Diagnostic_InternalExceptionMessage); 230throw new Exception(SR.Diagnostic_InternalExceptionMessage); 339throw new Exception(SR.Diagnostic_InternalExceptionMessage);
System\ComponentModel\Composition\ReflectionModel\ImportingItem.cs (3)
71throw new Exception(SR.Diagnostic_InternalExceptionMessage); 99SR.Format( 100SR.ReflectionModel_ImportNotAssignableFromExport,
System\ComponentModel\Composition\ReflectionModel\ImportingMember.cs (20)
71SR.Format( 72SR.ReflectionModel_ImportThrewException, 83SR.Format( 84SR.ImportNotValidOnIndexers, 98SR.Format( 99SR.ReflectionModel_ImportNotWritable, 135SR.Format( 136SR.ReflectionModel_ImportCollectionGetThrewException, 157SR.Format( 158SR.ReflectionModel_ImportCollectionConstructionThrewException, 172SR.Format( 173SR.ReflectionModel_ImportCollectionNull, 195SR.Format( 196SR.ReflectionModel_ImportCollectionIsReadOnlyThrewException, 206SR.Format( 207SR.ReflectionModel_ImportCollectionNotWritable, 225SR.Format( 226SR.ReflectionModel_ImportCollectionClearThrewException, 242SR.Format( 243SR.ReflectionModel_ImportCollectionAddThrewException,
System\ComponentModel\Composition\ReflectionModel\ImportType.cs (1)
75throw new Exception(SR.Diagnostic_InternalExceptionMessage);
System\ComponentModel\Composition\ReflectionModel\LazyMemberInfo.cs (11)
31throw new Exception(SR.Diagnostic_InternalExceptionMessage); 106throw new Exception(SR.Diagnostic_InternalExceptionMessage); 132throw new Exception(SR.Diagnostic_InternalExceptionMessage); 157errorMessage = SR.LazyMemberInfo_AccessorsNull; 163errorMessage = SR.LazyMemberInfo_NoAccessors; 172errorMessage = SR.LazyMemberInfo_InvalidPropertyAccessors_Cardinality; 178errorMessage = SR.LazyMemberinfo_InvalidPropertyAccessors_AccessorType; 187errorMessage = SR.LazyMemberInfo_InvalidEventAccessors_Cardinality; 193errorMessage = SR.LazyMemberinfo_InvalidEventAccessors_AccessorType; 204errorMessage = SR.Format(SR.LazyMemberInfo_InvalidAccessorOnSimpleMember, memberType);
System\ComponentModel\Composition\ReflectionModel\ReflectionComposablePart.cs (16)
43throw new ArgumentException(SR.ArgumentValueType, nameof(attributedPart)); 276SR.Format( 277SR.ReflectionModel_PartConstructorMissing, 324SR.Format( 325SR.ReflectionModel_ImportManyOnParameterCanOnlyBeAssigned, 373throw new InvalidOperationException(SR.Format( 374SR.InvalidOperation_GetExportedValueBeforePrereqImportSet, 386throw new InvalidOperationException(SR.InvalidOperation_DefinitionCannotBeRecomposed); 400throw new ArgumentException(SR.Argument_ExportsEmpty, nameof(exports)); 403throw new ArgumentException(SR.Argument_ExportsTooMany, nameof(exports)); 408throw new Exception(SR.Diagnostic_InternalExceptionMessage); 435SR.Format( 436SR.ReflectionModel_PartConstructorThrewException, 491SR.ImportNotSetOnPart, 549SR.Format( 550SR.ReflectionModel_PartOnImportsSatisfiedThrewException,
System\ComponentModel\Composition\ReflectionModel\ReflectionExtensions.cs (7)
20throw new Exception(SR.Diagnostic_InternalExceptionMessage); 27throw new Exception(SR.Diagnostic_InternalExceptionMessage); 38throw new Exception(SR.Diagnostic_InternalExceptionMessage); 53throw new Exception(SR.Diagnostic_InternalExceptionMessage); 69throw new Exception(SR.Diagnostic_InternalExceptionMessage); 75throw new Exception(SR.Diagnostic_InternalExceptionMessage); 92throw new Exception(SR.Diagnostic_InternalExceptionMessage);
System\ComponentModel\Composition\ReflectionModel\ReflectionModelServices.cs (14)
51SR.Format(SR.ReflectionModel_InvalidExportDefinition, exportDefinition.GetType()), 66SR.Format(SR.ReflectionModel_InvalidMemberImportDefinition, importDefinition.GetType()), 81SR.Format(SR.ReflectionModel_InvalidParameterImportDefinition, importDefinition.GetType()), 97SR.Format(SR.ReflectionModel_InvalidImportDefinition, importDefinition.GetType()), 119SR.Format(SR.ReflectionModel_InvalidImportDefinition, importDefinition.GetType()), 420SR.Format(SR.ReflectionModel_InvalidExportDefinition, export.GetType())); 446SR.Format(SR.ReflectionModel_InvalidMemberImportDefinition, import.GetType()));
System\ComponentModel\Composition\ReflectionModel\ReflectionProperty.cs (5)
26throw new Exception(SR.Diagnostic_InternalExceptionMessage); 68throw new Exception(SR.Diagnostic_InternalExceptionMessage); 105throw new Exception(SR.Diagnostic_InternalExceptionMessage); 120throw new Exception(SR.Diagnostic_InternalExceptionMessage); 130throw new Exception(SR.Diagnostic_InternalExceptionMessage);
System\Composition\Diagnostics\CompositionTrace.cs (9)
22SR.CompositionTrace_Rejection_DefinitionResurrected, 35SR.CompositionTrace_Rejection_DefinitionRejected, 49throw new ArgumentException(SR.Format(SR.ArgumentException_EmptyString, nameof(fileName)), nameof(fileName)); 55SR.CompositionTrace_Discovery_AssemblyLoadFailed, 69SR.CompositionTrace_Discovery_DefinitionMarkedWithPartNotDiscoverableAttribute, 82SR.CompositionTrace_Discovery_DefinitionMismatchedExportArity, 94SR.CompositionTrace_Discovery_DefinitionContainsNoExports, 106SR.CompositionTrace_Discovery_MemberMarkedWithMultipleImportAndImportMany,