2 types derived from ComposablePartDefinition
System.ComponentModel.Composition (2)
System\ComponentModel\Composition\Hosting\CatalogExportProvider.FactoryExport.cs (1)
53private sealed class FactoryExportPartDefinition : ComposablePartDefinition
System\ComponentModel\Composition\ReflectionModel\ReflectionComposablePartDefinition.cs (1)
14internal sealed class ReflectionComposablePartDefinition : ComposablePartDefinition, ICompositionElement
266 references to ComposablePartDefinition
System.ComponentModel.Composition (266)
System\ComponentModel\Composition\AttributedModel\AttributedModelDiscovery.cs (2)
16public static ComposablePartDefinition? CreatePartDefinitionIfDiscoverable(Type type, ICompositionElement? origin) 63public static ReflectionComposablePart CreatePart(ComposablePartDefinition partDefinition, object attributedPart)
System\ComponentModel\Composition\AttributedModelServices.cs (9)
41public static ComposablePart CreatePart(ComposablePartDefinition partDefinition, object attributedPart) 55public static ComposablePartDefinition CreatePartDefinition(Type type, ICompositionElement? origin) 62public static ComposablePartDefinition CreatePartDefinition(Type type, ICompositionElement? origin, bool ensureIsDiscoverable) 230public static bool Exports(this ComposablePartDefinition part, Type contractType) 246public static bool Exports<T>(this ComposablePartDefinition part) 261public static bool Imports(this ComposablePartDefinition part, Type contractType) 277public static bool Imports<T>(this ComposablePartDefinition part) 293public static bool Imports(this ComposablePartDefinition part, Type contractType, ImportCardinality importCardinality) 310public static bool Imports<T>(this ComposablePartDefinition part, ImportCardinality importCardinality)
System\ComponentModel\Composition\Hosting\AggregateCatalog.cs (6)
110/// <see cref="ComposablePartDefinition"/> for objects that match the constraint defined 119public override IEnumerable<Tuple<ComposablePartDefinition, ExportDefinition>> GetExports(ImportDefinition definition) 127IEnumerable<Tuple<ComposablePartDefinition, ExportDefinition>>? result = null; 128List<Tuple<ComposablePartDefinition, ExportDefinition>>? aggregateResult = null; 145aggregateResult = new List<Tuple<ComposablePartDefinition, ExportDefinition>>(result); 194public override IEnumerator<ComposablePartDefinition> GetEnumerator()
System\ComponentModel\Composition\Hosting\ApplicationCatalog.cs (3)
129public override IEnumerator<ComposablePartDefinition> GetEnumerator() 146/// <see cref="ComposablePartDefinition"/> for objects that match the constraint defined 155public override IEnumerable<Tuple<ComposablePartDefinition, ExportDefinition>> GetExports(ImportDefinition definition)
System\ComponentModel\Composition\Hosting\AssemblyCatalog.cs (3)
409/// <see cref="ComposablePartDefinition"/> for objects that match the constraint defined 425public override IEnumerable<Tuple<ComposablePartDefinition, ExportDefinition>> GetExports(ImportDefinition definition) 527public override IEnumerator<ComposablePartDefinition> GetEnumerator()
System\ComponentModel\Composition\Hosting\AssemblyCatalogDebuggerProxy.cs (1)
28public ReadOnlyCollection<ComposablePartDefinition> Parts
System\ComponentModel\Composition\Hosting\CatalogExportProvider.CatalogChangeProxy.cs (11)
16private readonly List<ComposablePartDefinition> _addedParts; 17private readonly HashSet<ComposablePartDefinition> _removedParts; 20IEnumerable<ComposablePartDefinition> addedParts, 21IEnumerable<ComposablePartDefinition> removedParts) 24_addedParts = new List<ComposablePartDefinition>(addedParts); 25_removedParts = new HashSet<ComposablePartDefinition>(removedParts); 28public override IEnumerator<ComposablePartDefinition> GetEnumerator() 33public override IEnumerable<Tuple<ComposablePartDefinition, ExportDefinition>> GetExports( 42var addedExports = new List<Tuple<ComposablePartDefinition, ExportDefinition>>(); 43foreach (var part in _addedParts) 49addedExports.Add(new Tuple<ComposablePartDefinition, ExportDefinition>(part, export));
System\ComponentModel\Composition\Hosting\CatalogExportProvider.CatalogExport.cs (4)
15protected readonly ComposablePartDefinition _partDefinition; 19ComposablePartDefinition partDefinition, ExportDefinition definition) 63ComposablePartDefinition partDefinition, ExportDefinition definition, CreationPolicy importCreationPolicy) 125ComposablePartDefinition partDefinition, ExportDefinition definition)
System\ComponentModel\Composition\Hosting\CatalogExportProvider.cs (29)
39private readonly Dictionary<ComposablePartDefinition, CatalogPart> _activatedParts = new Dictionary<ComposablePartDefinition, CatalogPart>(); 40private readonly HashSet<ComposablePartDefinition> _rejectedParts = new HashSet<ComposablePartDefinition>(); 343private Export CreateExport(ComposablePartDefinition partDefinition, ExportDefinition exportDefinition, bool isExportFactory, CreationPolicy importPolicy) 365private static ExportDefinition[] GetExportsFromPartDefinitions(IEnumerable<ComposablePartDefinition> partDefinitions) 369foreach (var partDefinition in partDefinitions) 402foreach (var definition in e.RemovedDefinitions) 414var capturedDefinition = definition; 438private CatalogPart GetComposablePart(ComposablePartDefinition partDefinition, bool isSharedPart) 466private CatalogPart GetSharedPart(ComposablePartDefinition partDefinition) 642private bool IsRejected(ComposablePartDefinition definition, AtomicComposition? atomicComposition) 698private bool DetermineRejection(ComposablePartDefinition definition, AtomicComposition? parentAtomicComposition) 790var affectedRejections = new HashSet<ComposablePartDefinition>(); 792ComposablePartDefinition[] rejectedParts; 797foreach (var definition in rejectedParts) 820foreach (var partDefinition in affectedRejections) 830var capturedPartDefinition = partDefinition; 909private AtomicCompositionQueryState QueryPartState(AtomicComposition atomicComposition, ComposablePartDefinition definition) 930ComposablePartDefinition part, 939HashSet<ComposablePartDefinition> hashset, 965protected abstract bool IsMatchingDefinition(ComposablePartDefinition part, int partHashCode); 967public AtomicCompositionQueryState GetQueryState(ComposablePartDefinition definition) 987private readonly ComposablePartDefinition _part; 989public PartEqualsQueryStateNode(ComposablePartDefinition part, PartQueryStateNode? previousNode, AtomicCompositionQueryState state) : 996protected override bool IsMatchingDefinition(ComposablePartDefinition part, int partHashCode) 1008private readonly HashSet<ComposablePartDefinition> _parts; 1009public PartInHashSetQueryStateNode(HashSet<ComposablePartDefinition> parts, PartQueryStateNode? previousNode, AtomicCompositionQueryState state) : 1015protected override bool IsMatchingDefinition(ComposablePartDefinition part, int partHashCode)
System\ComponentModel\Composition\Hosting\CatalogExportProvider.FactoryExport.cs (3)
15private readonly ComposablePartDefinition _partDefinition; 20public FactoryExport(ComposablePartDefinition partDefinition, ExportDefinition exportDefinition) 35protected ComposablePartDefinition UnderlyingPartDefinition
System\ComponentModel\Composition\Hosting\CatalogExportProvider.PartCreatorExport.cs (1)
14public PartCreatorExport(CatalogExportProvider catalogExportProvider, ComposablePartDefinition partDefinition, ExportDefinition exportDefinition) :
System\ComponentModel\Composition\Hosting\CatalogExportProvider.ScopeFactoryExport.cs (1)
17internal ScopeFactoryExport(ScopeManager scopeManager, CompositionScopeDefinition catalog, ComposablePartDefinition partDefinition, ExportDefinition exportDefinition) :
System\ComponentModel\Composition\Hosting\CatalogExportProvider.ScopeManager.cs (1)
68private ScopeFactoryExport CreateScopeExport(CompositionScopeDefinition childCatalog, ComposablePartDefinition partDefinition, ExportDefinition exportDefinition)
System\ComponentModel\Composition\Hosting\ComposablePartCatalogChangeEventArgs.cs (10)
18private readonly IEnumerable<ComposablePartDefinition> _addedDefinitions; 19private readonly IEnumerable<ComposablePartDefinition> _removedDefinitions; 25/// An <see cref="IEnumerable{T}"/> of <see cref="ComposablePartDefinition"/> objects that 29/// An <see cref="IEnumerable{T}"/> of <see cref="ComposablePartDefinition"/> objects that 41public ComposablePartCatalogChangeEventArgs(IEnumerable<ComposablePartDefinition> addedDefinitions, 42IEnumerable<ComposablePartDefinition> removedDefinitions, AtomicComposition? atomicComposition) 56/// An <see cref="IEnumerable{T}"/> of <see cref="ComposablePartDefinition"/> objects that 59public IEnumerable<ComposablePartDefinition> AddedDefinitions 73/// An <see cref="IEnumerable{T}"/> of <see cref="ComposablePartDefinition"/> objects that 76public IEnumerable<ComposablePartDefinition> RemovedDefinitions
System\ComponentModel\Composition\Hosting\ComposablePartCatalogCollection.cs (11)
49var addedParts = new Lazy<IEnumerable<ComposablePartDefinition>>(() => item.ToArray(), LazyThreadSafetyMode.PublicationOnly); 103var removedParts = new Lazy<IEnumerable<ComposablePartDefinition>>(() => catalogs.SelectMany(catalog => catalog).ToArray(), LazyThreadSafetyMode.PublicationOnly); 187var removedParts = new Lazy<IEnumerable<ComposablePartDefinition>>(() => item.ToArray(), LazyThreadSafetyMode.PublicationOnly); 295Lazy<IEnumerable<ComposablePartDefinition>>? addedDefinitions, 296Lazy<IEnumerable<ComposablePartDefinition>>? removedDefinitions) 303var added = (addedDefinitions == null ? Enumerable.Empty<ComposablePartDefinition>() : addedDefinitions.Value); 304var removed = (removedDefinitions == null ? Enumerable.Empty<ComposablePartDefinition>() : removedDefinitions.Value); 315Lazy<IEnumerable<ComposablePartDefinition>>? addedDefinitions, 316Lazy<IEnumerable<ComposablePartDefinition>>? removedDefinitions, 323var added = (addedDefinitions == null ? Enumerable.Empty<ComposablePartDefinition>() : addedDefinitions.Value); 324var removed = (removedDefinitions == null ? Enumerable.Empty<ComposablePartDefinition>() : removedDefinitions.Value);
System\ComponentModel\Composition\Hosting\CompositionConstants.cs (1)
28internal static readonly string PartCreatorTypeIdentity = AttributedModelServices.GetTypeIdentity(typeof(ComposablePartDefinition));
System\ComponentModel\Composition\Hosting\CompositionScopeDefinition.cs (5)
149public override IEnumerator<ComposablePartDefinition> GetEnumerator() 163/// <see cref="ComposablePartDefinition"/> for objects that match the constraint defined 179public override IEnumerable<Tuple<ComposablePartDefinition, ExportDefinition>> GetExports(ImportDefinition definition) 187internal IEnumerable<Tuple<ComposablePartDefinition, ExportDefinition>> GetExportsFromPublicSurface(ImportDefinition definition) 191var exports = new List<Tuple<ComposablePartDefinition, ExportDefinition>>();
System\ComponentModel\Composition\Hosting\CompositionScopeDefinitionDebuggerProxy.cs (1)
25public ReadOnlyCollection<ComposablePartDefinition> Parts
System\ComponentModel\Composition\Hosting\DirectoryCatalog.cs (20)
44/// Creates a catalog of <see cref="ComposablePartDefinition"/>s based on all the *.dll files 78/// Creates a catalog of <see cref="ComposablePartDefinition"/>s based on all the *.dll files 117/// Creates a catalog of <see cref="ComposablePartDefinition"/>s based on all the *.dll files 155/// Creates a catalog of <see cref="ComposablePartDefinition"/>s based on all the given searchPattern 198/// Creates a catalog of <see cref="ComposablePartDefinition"/>s based on all the *.dll files 240/// Creates a catalog of <see cref="ComposablePartDefinition"/>s based on all the *.dll files 285/// Creates a catalog of <see cref="ComposablePartDefinition"/>s based on all the given searchPattern 335/// Creates a catalog of <see cref="ComposablePartDefinition"/>s based on all the given searchPattern 498public override IEnumerator<ComposablePartDefinition> GetEnumerator() 500return _catalogCollection.SelectMany(catalog => catalog as IEnumerable<ComposablePartDefinition>).GetEnumerator(); 513/// <see cref="ComposablePartDefinition"/> for objects that match the constraint defined 522public override IEnumerable<Tuple<ComposablePartDefinition, ExportDefinition>> GetExports(ImportDefinition definition) 554/// Refreshes the <see cref="ComposablePartDefinition"/>s with the latest files in the directory that match 557/// assembly cannot be unloaded from the process so <see cref="ComposablePartDefinition"/>s for those files 576ComposablePartDefinition[] addedDefinitions; 577ComposablePartDefinition[] removedDefinitions; 602.SelectMany(cat => cat.Item2 as IEnumerable<ComposablePartDefinition>) 603.ToArray<ComposablePartDefinition>(); 606.SelectMany(cat => cat.Item2 as IEnumerable<ComposablePartDefinition>) 607.ToArray<ComposablePartDefinition>();
System\ComponentModel\Composition\Hosting\DirectoryCatalog.DirectoryCatalogDebuggerProxy.cs (1)
63public ReadOnlyCollection<ComposablePartDefinition> Parts
System\ComponentModel\Composition\Hosting\FilteredCatalog.cs (7)
16private readonly Func<ComposablePartDefinition, bool> _filter; 27public FilteredCatalog(ComposablePartCatalog catalog, Func<ComposablePartDefinition, bool> filter) : 32internal FilteredCatalog(ComposablePartCatalog catalog, Func<ComposablePartDefinition, bool> filter, FilteredCatalog? complement) 90public override IEnumerator<ComposablePartDefinition> GetEnumerator() 133/// <see cref="ComposablePartDefinition"/> for objects that match the constraint defined 149public override IEnumerable<Tuple<ComposablePartDefinition, ExportDefinition>> GetExports(ImportDefinition definition) 154var exports = new List<Tuple<ComposablePartDefinition, ExportDefinition>>();
System\ComponentModel\Composition\Hosting\FilteredCatalog.DependenciesTraversal.cs (13)
16private readonly IEnumerable<ComposablePartDefinition> _parts; 18private Dictionary<string, List<ComposablePartDefinition>>? _exportersIndex; 36_exportersIndex = new Dictionary<string, List<ComposablePartDefinition>>(); 37foreach (ComposablePartDefinition part in _parts) 46private void AddToExportersIndex(string contractName, ComposablePartDefinition part) 48if (!_exportersIndex!.TryGetValue(contractName, out List<ComposablePartDefinition>? parts)) 50parts = new List<ComposablePartDefinition>(); 56public bool TryTraverse(ComposablePartDefinition part, [NotNullWhen(true)] out IEnumerable<ComposablePartDefinition>? reachableParts) 59List<ComposablePartDefinition>? reachablePartList = null; 65List<ComposablePartDefinition>? candidateReachableParts = null; 72foreach (var candidateReachablePart in candidateReachableParts) 78reachablePartList ??= new List<ComposablePartDefinition>();
System\ComponentModel\Composition\Hosting\FilteredCatalog.DependentsTraversal.cs (13)
22private readonly IEnumerable<ComposablePartDefinition> _parts; 24private Dictionary<string, List<ComposablePartDefinition>>? _importersIndex; 42_importersIndex = new Dictionary<string, List<ComposablePartDefinition>>(); 43foreach (ComposablePartDefinition part in _parts) 55private void AddToImportersIndex(string contractName, ComposablePartDefinition part) 57if (!_importersIndex!.TryGetValue(contractName, out List<ComposablePartDefinition>? parts)) 59parts = new List<ComposablePartDefinition>(); 65public bool TryTraverse(ComposablePartDefinition part, [NotNullWhen(true)] out IEnumerable<ComposablePartDefinition>? reachableParts) 68List<ComposablePartDefinition>? reachablePartList = null; 75List<ComposablePartDefinition>? candidateReachableParts = null; 79foreach (var candidateReachablePart in candidateReachableParts) 85reachablePartList ??= new List<ComposablePartDefinition>();
System\ComponentModel\Composition\Hosting\FilteredCatalog.IComposablePartCatalogTraversal.cs (2)
22bool TryTraverse(ComposablePartDefinition part, [NotNullWhen(true)] out IEnumerable<ComposablePartDefinition>? reachableParts);
System\ComponentModel\Composition\Hosting\FilteredCatalog.Traversal.cs (7)
80private static HashSet<ComposablePartDefinition> GetTraversalClosure(IEnumerable<ComposablePartDefinition> parts, IComposablePartCatalogTraversal traversal) 84var traversedParts = new HashSet<ComposablePartDefinition>(); 89private static void GetTraversalClosure(IEnumerable<ComposablePartDefinition> parts, HashSet<ComposablePartDefinition> traversedParts, IComposablePartCatalogTraversal traversal) 91foreach (var part in parts) 95if (traversal.TryTraverse(part, out IEnumerable<ComposablePartDefinition>? partsToTraverse))
System\ComponentModel\Composition\Hosting\ScopingExtensions.cs (6)
19public static bool Exports(this ComposablePartDefinition part, string contractName) 42public static bool Imports(this ComposablePartDefinition part, string contractName) 67public static bool Imports(this ComposablePartDefinition part, string contractName, ImportCardinality importCardinality) 91public static bool ContainsPartMetadataWithKey(this ComposablePartDefinition part, string key) 109public static bool ContainsPartMetadata<T>(this ComposablePartDefinition part, string key, T value) 135public static FilteredCatalog Filter(this ComposablePartCatalog catalog, Func<ComposablePartDefinition, bool> filter)
System\ComponentModel\Composition\Hosting\TypeCatalog.cs (21)
29private volatile List<ComposablePartDefinition>? _parts; 32private readonly Lazy<Dictionary<string, List<ComposablePartDefinition>>> _contractPartIndex; 81_contractPartIndex = new Lazy<Dictionary<string, List<ComposablePartDefinition>>>(CreateIndex, true); 109_contractPartIndex = new Lazy<Dictionary<string, List<ComposablePartDefinition>>>(CreateIndex, true); 138_contractPartIndex = new Lazy<Dictionary<string, List<ComposablePartDefinition>>>(CreateIndex, true); 171_contractPartIndex = new Lazy<Dictionary<string, List<ComposablePartDefinition>>>(CreateIndex, true); 223public override IEnumerator<ComposablePartDefinition> GetEnumerator() 251private IEnumerable<ComposablePartDefinition> PartsInternal 266var collection = new List<ComposablePartDefinition>(); 269var definition = AttributedModelDiscovery.CreatePartDefinitionIfDiscoverable(type, _definitionOrigin); 287internal override IEnumerable<ComposablePartDefinition>? GetCandidateParts(ImportDefinition definition) 299List<ComposablePartDefinition>? nonGenericMatches = GetCandidateParts(contractName); 300List<ComposablePartDefinition>? genericMatches = GetCandidateParts(genericContractName); 305private List<ComposablePartDefinition>? GetCandidateParts(string? contractName) 312_contractPartIndex.Value.TryGetValue(contractName, out List<ComposablePartDefinition>? contractCandidateParts); 316private Dictionary<string, List<ComposablePartDefinition>> CreateIndex() 318Dictionary<string, List<ComposablePartDefinition>> index = new Dictionary<string, List<ComposablePartDefinition>>(StringComparers.ContractName); 320foreach (var part in PartsInternal) 324List<ComposablePartDefinition>? contractParts = null; 327contractParts = new List<ComposablePartDefinition>();
System\ComponentModel\Composition\PartMetadataAttribute.cs (1)
7/// Specifies metadata for a type to be used as a <see cref="Primitives.ComposablePartDefinition"/> and
System\ComponentModel\Composition\Primitives\ComposablePart.cs (6)
35/// <see cref="ComposablePartDefinition"/>, this property should return the result of 36/// <see cref="ComposablePartDefinition.ExportDefinitions"/>. 63/// <see cref="ComposablePartDefinition"/>, this property should return the result of 64/// <see cref="ComposablePartDefinition.ImportDefinitions"/>. 92/// <see cref="ComposablePartDefinition"/>, this property should return the result of 93/// <see cref="ComposablePartDefinition.Metadata"/>.
System\ComponentModel\Composition\Primitives\ComposablePartCatalog.cs (16)
16/// and return <see cref="ComposablePartDefinition"/> objects. 22public abstract class ComposablePartCatalog : IEnumerable<ComposablePartDefinition>, IDisposable 25private volatile IQueryable<ComposablePartDefinition>? _queryableParts; 27internal static readonly List<Tuple<ComposablePartDefinition, ExportDefinition>> _EmptyExportsList = new List<Tuple<ComposablePartDefinition, ExportDefinition>>(); 40/// A <see cref="IQueryable{T}"/> of <see cref="ComposablePartDefinition"/> objects of the 52public virtual IQueryable<ComposablePartDefinition> Parts 81/// <see cref="ComposablePartDefinition"/> for objects that match the constraint defined 97public virtual IEnumerable<Tuple<ComposablePartDefinition, ExportDefinition>> GetExports(ImportDefinition definition) 103List<Tuple<ComposablePartDefinition, ExportDefinition>>? exports = null; 107foreach (var part in candidateParts) 109if (part.TryGetExports(definition, out Tuple<ComposablePartDefinition, ExportDefinition>? singleMatch, out IEnumerable<Tuple<ComposablePartDefinition, ExportDefinition>>? multipleMatches)) 120internal virtual IEnumerable<ComposablePartDefinition>? GetCandidateParts(ImportDefinition definition) 158public virtual IEnumerator<ComposablePartDefinition> GetEnumerator() 163return Enumerable.Empty<ComposablePartDefinition>().GetEnumerator();
System\ComponentModel\Composition\Primitives\ComposablePartCatalogDebuggerProxy.cs (1)
23public ReadOnlyCollection<ComposablePartDefinition> Parts
System\ComponentModel\Composition\Primitives\ComposablePartDefinition.cs (17)
16internal static readonly IEnumerable<Tuple<ComposablePartDefinition, ExportDefinition>> _EmptyExports = Enumerable.Empty<Tuple<ComposablePartDefinition, ExportDefinition>>(); 19/// Initializes a new instance of the <see cref="ComposablePartDefinition"/> class. 32/// <see cref="ComposablePartDefinition"/>. 38/// <see cref="ComposablePartDefinition"/> do not provide exported values, return 51/// <see cref="ComposablePartDefinition"/>. 57/// <see cref="ComposablePartDefinition"/> do not have imports, return an empty 68/// <see cref="ComposablePartDefinition"/>. The default is an empty, read-only 78/// <see cref="ComposablePartDefinition"/> does contain metadata, 105internal virtual bool TryGetExports(ImportDefinition definition, out Tuple<ComposablePartDefinition, ExportDefinition>? singleMatch, out IEnumerable<Tuple<ComposablePartDefinition, ExportDefinition>>? multipleMatches) 110List<Tuple<ComposablePartDefinition, ExportDefinition>>? multipleExports = null; 111Tuple<ComposablePartDefinition, ExportDefinition>? singleExport = null; 120singleExport = new Tuple<ComposablePartDefinition, ExportDefinition>(this, export); 126multipleExports = new List<Tuple<ComposablePartDefinition, ExportDefinition>>(); 129multipleExports.Add(new Tuple<ComposablePartDefinition, ExportDefinition>(this, export)); 150internal virtual ComposablePartDefinition? GetGenericPartDefinition()
System\ComponentModel\Composition\Primitives\CompositionElementExtensions.cs (2)
40public static ICompositionElement ToElement(this ComposablePartDefinition definition) 45public static string GetDisplayName(this ComposablePartDefinition definition)
System\ComponentModel\Composition\Primitives\PrimitivesServices.cs (4)
12public static bool IsGeneric(this ComposablePartDefinition part) 29internal static IEnumerable<string> GetCandidateContractNames(this ImportDefinition import, ComposablePartDefinition part) 51internal static bool IsImportDependentOnPart(this ImportDefinition import, ComposablePartDefinition part, ExportDefinition export, bool expandGenerics) 64private static ImportDefinition TranslateImport(ImportDefinition import, ComposablePartDefinition part)
System\ComponentModel\Composition\ReflectionModel\ExportfactoryCreator.LifetimeContext.cs (2)
39var factoryPartDefinition = ExportServices.GetCastedExportedValue<ComposablePartDefinition>(export);
System\ComponentModel\Composition\ReflectionModel\ReflectionComposablePartDefinition.cs (18)
131internal override ComposablePartDefinition? GetGenericPartDefinition() 141internal override bool TryGetExports(ImportDefinition definition, out Tuple<ComposablePartDefinition, ExportDefinition>? singleMatch, out IEnumerable<Tuple<ComposablePartDefinition, ExportDefinition>>? multipleMatches) 148List<Tuple<ComposablePartDefinition, ExportDefinition>>? exports = null; 157HashSet<ComposablePartDefinition>? candidates = null; 158ComposablePartDefinition? previousPart = null; 163if (TryMakeGenericPartDefinition(candidateParameters, out ComposablePartDefinition? candidatePart)) 176candidates = new HashSet<ComposablePartDefinition>(); 192if (candidatePart.TryGetExports(definition, out Tuple<ComposablePartDefinition, ExportDefinition>? candidateSingleMatch, out IEnumerable<Tuple<ComposablePartDefinition, ExportDefinition>>? candidateMultipleMatches)) 218private bool TryGetNonGenericExports(ImportDefinition definition, out Tuple<ComposablePartDefinition, ExportDefinition>? singleMatch, out IEnumerable<Tuple<ComposablePartDefinition, ExportDefinition>>? multipleMatches) 223List<Tuple<ComposablePartDefinition, ExportDefinition>>? multipleExports = null; 224Tuple<ComposablePartDefinition, ExportDefinition>? singleExport = null; 234singleExport = new Tuple<ComposablePartDefinition, ExportDefinition>(this, export); 240multipleExports = new List<Tuple<ComposablePartDefinition, ExportDefinition>>(); 243multipleExports.Add(new Tuple<ComposablePartDefinition, ExportDefinition>(this, export)); 297internal bool TryMakeGenericPartDefinition(Type[] genericTypeParameters, [NotNullWhen(true)] out ComposablePartDefinition? genericPartDefinition)
System\ComponentModel\Composition\ReflectionModel\ReflectionModelServices.cs (5)
17public static Lazy<Type> GetPartType(ComposablePartDefinition partDefinition) 30public static bool IsDisposalRequired(ComposablePartDefinition partDefinition) 126public static ComposablePartDefinition CreatePartDefinition( 302public static bool TryMakeGenericPartDefinition(ComposablePartDefinition partDefinition, IEnumerable<Type> genericParameters, [NotNullWhen(true)] out ComposablePartDefinition? specialization)
System\Composition\Diagnostics\CompositionTrace.cs (2)
15internal static void PartDefinitionResurrected(ComposablePartDefinition definition) 27internal static void PartDefinitionRejected(ComposablePartDefinition definition, ChangeRejectedException exception)