17 instantiations of CompositionContract
Microsoft.DotNet.AsmDiff (1)
MefHelpers.cs (1)
48var constrainedSubset = new CompositionContract(contract.ContractType, contract.ContractName,
System.Composition.Hosting (1)
System\Composition\Hosting\Providers\CurrentScope\CurrentScopeExportDescriptorProvider.cs (1)
11private static readonly CompositionContract s_currentScopeContract = new CompositionContract(typeof(CompositionContext));
System.Composition.Runtime (6)
System\Composition\CompositionContext.cs (3)
76if (TryGetExport(new CompositionContract(exportType, contractName), out export)) 139return GetExport(new CompositionContract(exportType, contractName)); 178var manyContract = new CompositionContract(
System\Composition\Hosting\Core\CompositionContract.cs (3)
128return new CompositionContract(newContractType, _contractName, _metadataConstraints); 163remainingContract = new CompositionContract(_contractType, _contractName); 169remainingContract = new CompositionContract(_contractType, _contractName, remainingConstraints);
System.Composition.TypedParts (9)
System\Composition\Hosting\SinglePartExportDescriptorProvider.cs (1)
31var constrainedSubset = new CompositionContract(contract.ContractType, contract.ContractName,
System\Composition\TypedParts\ContractHelpers.cs (4)
31var importedContract = new CompositionContract(memberType); 41importedContract = new CompositionContract(memberType, ia.ContractName); 52importedContract = new CompositionContract(memberType, ima.ContractName); 89importedContract = new CompositionContract(importedContract.ContractType, importedContract.ContractName, importMetadata);
System\Composition\TypedParts\Discovery\TypeInspector.cs (2)
66var exportKey = new CompositionContract(contractType, export.ContractName); 92var exportKey = new CompositionContract(export.ContractType ?? property.PropertyType, export.ContractName);
System\Composition\TypedParts\TypedPartExportDescriptorProvider.cs (2)
81var unconstrained = new CompositionContract(contract.ContractType, contract.ContractName); 92var constrainedSubset = new CompositionContract(unconstrained.ContractType, unconstrained.ContractName, subsettedConstraints);
96 references to CompositionContract
Microsoft.AspNetCore.App.Analyzers.Test (1)
RouteEmbeddedLanguage\Infrastructure\ExportProviderExtensions.cs (1)
32public override bool TryGetExport(CompositionContract contract, out object export)
Microsoft.DotNet.AsmDiff (3)
MefHelpers.cs (3)
39protected bool IsSupportedContract(CompositionContract contract) 48var constrainedSubset = new CompositionContract(contract.ContractType, contract.ContractName, 74public override IEnumerable<ExportDescriptorPromise> GetExportDescriptors(CompositionContract contract, DependencyAccessor descriptorAccessor)
System.Composition.Hosting (55)
System\Composition\Hosting\CompositionHost.cs (1)
74public override bool TryGetExport(CompositionContract contract, out object export)
System\Composition\Hosting\Core\CompositionDependency.cs (8)
23private readonly CompositionContract _contract; 40public static CompositionDependency Satisfied(CompositionContract contract, ExportDescriptorPromise target, bool isPrerequisite, object site) 65public static CompositionDependency Missing(CompositionContract contract, object site) 87public static CompositionDependency Oversupplied(CompositionContract contract, IEnumerable<ExportDescriptorPromise> targets, object site) 105private CompositionDependency(CompositionContract contract, ExportDescriptorPromise target, bool isPrerequisite, object site) 113private CompositionDependency(CompositionContract contract, object site) 119private CompositionDependency(CompositionContract contract, IEnumerable<ExportDescriptorPromise> targets, object site) 148public CompositionContract Contract { get { return _contract; } }
System\Composition\Hosting\Core\DependencyAccessor.cs (5)
15/// Get all definitions for a specified <see cref="CompositionContract"/>. 19protected abstract IEnumerable<ExportDescriptorPromise> GetPromises(CompositionContract exportKey); 28public IEnumerable<CompositionDependency> ResolveDependencies(object site, CompositionContract contract, bool isPrerequisite) 44public CompositionDependency ResolveRequiredDependency(object site, CompositionContract contract, bool isPrerequisite) 61public bool TryResolveOptionalDependency(object site, CompositionContract contract, bool isPrerequisite, out CompositionDependency dependency)
System\Composition\Hosting\Core\ExportDescriptorPromise.cs (3)
21private readonly CompositionContract _contract; 37CompositionContract contract, 70public CompositionContract Contract { get { return _contract; } }
System\Composition\Hosting\Core\ExportDescriptorProvider.cs (1)
47CompositionContract contract,
System\Composition\Hosting\Core\ExportDescriptorRegistry.cs (4)
13private volatile Dictionary<CompositionContract, ExportDescriptor[]> _partDefinitions = new Dictionary<CompositionContract, ExportDescriptor[]>(); 20public bool TryGetSingleForExport(CompositionContract exportKey, out ExportDescriptor defaultForExport) 29var updatedDefinitions = new Dictionary<CompositionContract, ExportDescriptor[]>(_partDefinitions);
System\Composition\Hosting\Core\ExportDescriptorRegistryUpdate.cs (7)
13private readonly IDictionary<CompositionContract, ExportDescriptor[]> _partDefinitions; 15private readonly Dictionary<CompositionContract, UpdateResult> _updateResults = new Dictionary<CompositionContract, UpdateResult>(); 23IDictionary<CompositionContract, ExportDescriptor[]> partDefinitions, 30public void Execute(CompositionContract contract) 48var resultContract = result.Key; 133protected override IEnumerable<ExportDescriptorPromise> GetPromises(CompositionContract contract)
System\Composition\Hosting\Core\LifetimeContext.cs (1)
195public override bool TryGetExport(CompositionContract contract, out object export)
System\Composition\Hosting\Providers\CurrentScope\CurrentScopeExportDescriptorProvider.cs (2)
11private static readonly CompositionContract s_currentScopeContract = new CompositionContract(typeof(CompositionContext)); 13public override IEnumerable<ExportDescriptorPromise> GetExportDescriptors(CompositionContract contract, DependencyAccessor definitionAccessor)
System\Composition\Hosting\Providers\ExportFactory\ExportFactoryExportDescriptorProvider.cs (5)
16public override IEnumerable<ExportDescriptorPromise> GetExportDescriptors(CompositionContract exportKey, DependencyAccessor definitionAccessor) 22var gldm = gld.CreateStaticDelegate<Func<CompositionContract, DependencyAccessor, object>>(); 26private static ExportDescriptorPromise[] GetExportFactoryDescriptors<TProduct>(CompositionContract exportFactoryContract, DependencyAccessor definitionAccessor) 28var productContract = exportFactoryContract.ChangeType(typeof(TProduct)); 32CompositionContract unwrapped;
System\Composition\Hosting\Providers\ExportFactory\ExportFactoryWithMetadataExportDescriptorProvider.cs (5)
18public override IEnumerable<ExportDescriptorPromise> GetExportDescriptors(CompositionContract contract, DependencyAccessor definitionAccessor) 25var gldm = gld.CreateStaticDelegate<Func<CompositionContract, DependencyAccessor, object>>(); 29private static ExportDescriptorPromise[] GetExportFactoryDescriptors<TProduct, TMetadata>(CompositionContract exportFactoryContract, DependencyAccessor definitionAccessor) 31var productContract = exportFactoryContract.ChangeType(typeof(TProduct)); 35CompositionContract unwrapped;
System\Composition\Hosting\Providers\ImportMany\ImportManyExportDescriptorProvider.cs (7)
17public override IEnumerable<ExportDescriptorPromise> GetExportDescriptors(CompositionContract contract, DependencyAccessor definitionAccessor) 24CompositionContract unwrapped; 32var elementContract = unwrapped.ChangeType(elementType); 35var gimdm = gimd.CreateStaticDelegate<Func<CompositionContract, CompositionContract, DependencyAccessor, object>>(); 39private static ExportDescriptorPromise GetImportManyDescriptor<TElement>(CompositionContract importManyContract, CompositionContract elementContract, DependencyAccessor definitionAccessor)
System\Composition\Hosting\Providers\Lazy\LazyExportDescriptorProvider.cs (3)
17public override IEnumerable<ExportDescriptorPromise> GetExportDescriptors(CompositionContract exportKey, DependencyAccessor definitionAccessor) 23var gldm = gld.CreateStaticDelegate<Func<CompositionContract, DependencyAccessor, object>>(); 27private static ExportDescriptorPromise[] GetLazyDefinitions<TValue>(CompositionContract lazyContract, DependencyAccessor definitionAccessor)
System\Composition\Hosting\Providers\Lazy\LazyWithMetadataExportDescriptorProvider.cs (3)
17public override IEnumerable<ExportDescriptorPromise> GetExportDescriptors(CompositionContract exportKey, DependencyAccessor definitionAccessor) 24var gldm = gld.CreateStaticDelegate<Func<CompositionContract, DependencyAccessor, object>>(); 28private static ExportDescriptorPromise[] GetLazyDefinitions<TValue, TMetadata>(CompositionContract lazyContract, DependencyAccessor definitionAccessor)
System.Composition.Runtime (10)
System\Composition\CompositionContext.cs (3)
25public abstract bool TryGetExport(CompositionContract contract, out object export); 149public object GetExport(CompositionContract contract) 178var manyContract = new CompositionContract(
System\Composition\Hosting\Core\CompositionContract.cs (7)
21/// Construct a <see cref="CompositionContract"/>. 30/// Construct a <see cref="CompositionContract"/>. 40/// Construct a <see cref="CompositionContract"/>. 78var contract = obj as CompositionContract; 125public CompositionContract ChangeType(Type newContractType) 141public bool TryUnwrapMetadataConstraint<T>(string constraintName, out T constraintValue, out CompositionContract remainingContract)
System.Composition.TypedParts (27)
System\Composition\Hosting\InstanceExportDescriptorProvider.cs (1)
19public override IEnumerable<ExportDescriptorPromise> GetExportDescriptors(CompositionContract contract, DependencyAccessor descriptorAccessor)
System\Composition\Hosting\SinglePartExportDescriptorProvider.cs (2)
22protected bool IsSupportedContract(CompositionContract contract) 31var constrainedSubset = new CompositionContract(contract.ContractType, contract.ContractName,
System\Composition\TypedParts\ContractHelpers.cs (1)
31var importedContract = new CompositionContract(memberType);
System\Composition\TypedParts\Discovery\DiscoveredExport.cs (4)
14private readonly CompositionContract _exportKey; 18public DiscoveredExport(CompositionContract exportKey, IDictionary<string, object> metadata) 24public CompositionContract Contract { get { return _exportKey; } } 31CompositionContract contract,
System\Composition\TypedParts\Discovery\DiscoveredInstanceExport.cs (2)
12public DiscoveredInstanceExport(CompositionContract contract, IDictionary<string, object> metadata) 25var newContract = Contract.ChangeType(closedContractType);
System\Composition\TypedParts\Discovery\DiscoveredPropertyExport.cs (2)
17public DiscoveredPropertyExport(CompositionContract contract, IDictionary<string, object> metadata, PropertyInfo property) 39var newContract = Contract.ChangeType(closedContractType);
System\Composition\TypedParts\Discovery\TypeInspector.cs (2)
66var exportKey = new CompositionContract(contractType, export.ContractName); 92var exportKey = new CompositionContract(export.ContractType ?? property.PropertyType, export.ContractName);
System\Composition\TypedParts\ImportInfo.cs (3)
10private readonly CompositionContract _exportKey; 13public ImportInfo(CompositionContract exportKey, bool allowDefault) 21public CompositionContract Contract { get { return _exportKey; } }
System\Composition\TypedParts\TypedPartExportDescriptorProvider.cs (10)
16private readonly Dictionary<CompositionContract, ICollection<DiscoveredExport>> _discoveredParts = new Dictionary<CompositionContract, ICollection<DiscoveredExport>>(); 41private void AddDiscoveredExport(DiscoveredExport export, CompositionContract contract = null) 43var actualContract = contract ?? export.Contract; 55public override IEnumerable<ExportDescriptorPromise> GetExportDescriptors(CompositionContract contract, DependencyAccessor definitionAccessor) 77private void DiscoverConstrainedParts(CompositionContract contract) 81var unconstrained = new CompositionContract(contract.ContractType, contract.ContractName); 92var constrainedSubset = new CompositionContract(unconstrained.ContractType, unconstrained.ContractName, subsettedConstraints); 104private void DiscoverGenericParts(CompositionContract contract) 110var openGenericContract = contract.ChangeType(gtd);