3 types derived from ComposablePart
System.ComponentModel.Composition (3)
System\ComponentModel\Composition\Hosting\CatalogExportProvider.FactoryExport.cs (1)
88private sealed class FactoryExportPart : ComposablePart, IDisposable
System\ComponentModel\Composition\Hosting\CompositionBatch.SingleExportComposablePart.cs (1)
14private sealed class SingleExportComposablePart : ComposablePart
System\ComponentModel\Composition\ReflectionModel\ReflectionComposablePart.cs (1)
16internal class ReflectionComposablePart : ComposablePart, ICompositionElement
153 references to ComposablePart
System.ComponentModel.Composition (153)
System\ComponentModel\Composition\AttributedModelServices.cs (12)
26public static ComposablePart CreatePart(object attributedPart) 33public static ComposablePart CreatePart(object attributedPart, ReflectionContext reflectionContext) 41public static ComposablePart CreatePart(ComposablePartDefinition partDefinition, object attributedPart) 96public static ComposablePart AddExportedValue<T>(this CompositionBatch batch, T exportedValue) 114public static ComposablePart AddExportedValue<T>(this CompositionBatch batch, string contractName, T exportedValue) 135public static ComposablePart AddPart(this CompositionBatch batch, object attributedPart) 140ComposablePart part = AttributedModelServices.CreatePart(attributedPart); 155Enumerable.Empty<ComposablePart>()); 178public static ComposablePart SatisfyImportsOnce(this ICompositionService compositionService, object attributedPart) 183ComposablePart part = AttributedModelServices.CreatePart(attributedPart); 209public static ComposablePart SatisfyImportsOnce(this ICompositionService compositionService, object attributedPart, ReflectionContext reflectionContext) 215ComposablePart part = AttributedModelServices.CreatePart(attributedPart, reflectionContext);
System\ComponentModel\Composition\CreationPolicy.cs (4)
8/// a new instance of a <see cref="Primitives.ComposablePart"/>. 16/// unless the <see cref="Primitives.ComposablePart"/> or importer requests <see cref="CreationPolicy.NonShared"/>. 21/// A single shared instance of the associated <see cref="Primitives.ComposablePart"/> will be created 27/// A new non-shared instance of the associated <see cref="Primitives.ComposablePart"/> will be created
System\ComponentModel\Composition\ErrorBuilder.cs (6)
10public static CompositionError PreventedByExistingImport(ComposablePart part, ImportDefinition import) 19public static CompositionError InvalidStateForRecompposition(ComposablePart part) 47public static CompositionError CreatePartCannotActivate(ComposablePart part, Exception innerException) 61public static CompositionError CreatePartCannotSetImport(ComposablePart part, ImportDefinition definition, Exception innerException) 77public static CompositionError CreateCannotGetExportedValue(ComposablePart part, ExportDefinition definition, Exception innerException) 93public static CompositionError CreatePartCycle(ComposablePart part)
System\ComponentModel\Composition\ExceptionBuilder.cs (1)
78public static CompositionException CreateCannotGetExportedValue(ComposablePart part, ExportDefinition definition, Exception innerException)
System\ComponentModel\Composition\Hosting\CatalogExportProvider.cs (11)
41private ConditionalWeakTable<object, List<ComposablePart>>? _gcRoots; 451ComposablePart part = partDefinition.CreatePart(); 480ComposablePart? newPart = partDefinition.CreatePart(); 603private void PreventPartCollection(object exportedValue, ComposablePart part) 610List<ComposablePart>? partList; 612ConditionalWeakTable<object, List<ComposablePart>>? gcRoots = _gcRoots; 613gcRoots ??= new ConditionalWeakTable<object, List<ComposablePart>>(); 617partList = new List<ComposablePart>(); 724var newPart = definition.CreatePart(); 1024public CatalogPart(ComposablePart part) 1028public ComposablePart Part { get; }
System\ComponentModel\Composition\Hosting\CatalogExportProvider.FactoryExport.cs (1)
82public override ComposablePart CreatePart()
System\ComponentModel\Composition\Hosting\ComposablePartExportProvider.cs (15)
17private List<ComposablePart> _parts = new List<ComposablePart>(); 206List<ComposablePart>? parts = null; 218foreach (var part in parts) 274foreach (ComposablePart part in batch.PartsToAdd) 305foreach (ComposablePart part in batch.PartsToAdd) 315private List<ComposablePart> GetUpdatedPartsList(ref CompositionBatch batch) 322List<ComposablePart>? parts = null; 328foreach (ComposablePart part in batch.PartsToAdd) 333List<ComposablePart>? partsToRemove = null; 335foreach (ComposablePart part in batch.PartsToRemove) 339partsToRemove ??= new List<ComposablePart>(); 357foreach (ComposablePart part in batch.PartsToRemove) 380private Export CreateExport(ComposablePart part, ExportDefinition export) 385private object? GetExportedValue(ComposablePart part, ExportDefinition export)
System\ComponentModel\Composition\Hosting\CompositionBatch.cs (19)
17private List<ComposablePart> _partsToAdd; 18private ReadOnlyCollection<ComposablePart> _readOnlyPartsToAdd; 19private List<ComposablePart> _partsToRemove; 20private ReadOnlyCollection<ComposablePart> _readOnlyPartsToRemove; 35public CompositionBatch(IEnumerable<ComposablePart>? partsToAdd, IEnumerable<ComposablePart>? partsToRemove) 37_partsToAdd = new List<ComposablePart>(); 40foreach (var part in partsToAdd) 51_partsToRemove = new List<ComposablePart>(); 54foreach (var part in partsToRemove) 70public ReadOnlyCollection<ComposablePart> PartsToAdd 87public ReadOnlyCollection<ComposablePart> PartsToRemove 109public void AddPart(ComposablePart part) 116_partsToAdd = new List<ComposablePart>(_partsToAdd); 133public void RemovePart(ComposablePart part) 140_partsToRemove = new List<ComposablePart>(_partsToRemove); 155/// A <see cref="ComposablePart"/> that can be used remove the <see cref="Export"/> 163public ComposablePart AddExport(Export export) 167ComposablePart part = new SingleExportComposablePart(export);
System\ComponentModel\Composition\Hosting\CompositionContainer.CompositionServiceShim.cs (1)
21void ICompositionService.SatisfyImportsOnce(ComposablePart part)
System\ComponentModel\Composition\Hosting\CompositionContainer.cs (7)
245/// <see cref="ComposablePart"/> objects. The default is <see langword="null"/>. 383/// an <see cref="Export"/> if it comes from a <see cref="ComposablePart"/> that was constructed 386/// calling Dispose on the <see cref="ComposablePart"/>s as needed. If the <see cref="Export"/> 412/// an <see cref="Lazy{T}"/> if it comes from a <see cref="ComposablePart"/> that was constructed 415/// calling Dispose on the <see cref="ComposablePart"/>s as needed. If the <see cref="Export"/> 502/// The <see cref="ComposablePart"/> to set the imports. 514public void SatisfyImportsOnce(ComposablePart part)
System\ComponentModel\Composition\Hosting\CompositionService.cs (1)
47public void SatisfyImportsOnce(ComposablePart part)
System\ComponentModel\Composition\Hosting\CompositionServices.cs (2)
532internal static object? GetExportedValueFromComposedPart(ImportEngine? engine, ComposablePart part, ExportDefinition definition) 556internal static bool IsRecomposable(this ComposablePart part)
System\ComponentModel\Composition\Hosting\ImportEngine.cs (22)
25private ConditionalWeakTable<ComposablePart, PartManager> _partManagers = new ConditionalWeakTable<ComposablePart, PartManager>(); 58/// Previews all the required imports for the given <see cref="ComposablePart"/> to 64/// <see cref="ComposablePart"/>. 67/// The <see cref="ComposablePart"/> to preview the required imports. 83public void PreviewImports(ComposablePart part, AtomicComposition? atomicComposition) 141/// <see cref="ComposablePart"/>. 144/// The <see cref="ComposablePart"/> to set the imports. 156public void SatisfyImports(ComposablePart part) 181/// The <see cref="ComposablePart"/> to set the imports. 193public void SatisfyImportsOnce(ComposablePart part) 215/// <see cref="ComposablePart"/> and releases all the <see cref="Export"/>s used to 216/// satisfy the imports on the <see cref="ComposablePart"/>. 222/// The <see cref="ComposablePart"/> to release the imports on. 227public void ReleaseImports(ComposablePart part, AtomicComposition? atomicComposition) 291ComposablePart part, AtomicComposition? atomicComposition) 327private CompositionResult TrySatisfyImportsStateMachine(PartManager partManager, ComposablePart part) 410private CompositionResult TrySatisfyImports(PartManager partManager, ComposablePart part, bool shouldTrackImports) 455var part = partManager.Part; 632ConditionalWeakTable<ComposablePart, PartManager>? partManagers = null; 662private PartManager? GetPartManager(ComposablePart part, bool createIfNotpresent) 738ComposablePart part, ImportDefinition definition, AtomicComposition? atomicComposition)
System\ComponentModel\Composition\Hosting\ImportEngine.PartManager.cs (3)
23private readonly ComposablePart _part; 27public PartManager(ImportEngine importEngine, ComposablePart part) 33public ComposablePart Part
System\ComponentModel\Composition\Hosting\ImportEngine.RecompositionManager.cs (1)
50public static IEnumerable<ImportDefinition> GetAffectedImports(ComposablePart part, IEnumerable<ExportDefinition> changedExports)
System\ComponentModel\Composition\ICompositionService.cs (3)
9/// Provides methods for composing <see cref="ComposablePart"/> objects. 18/// The <see cref="ComposablePart"/> to set the imports. 30void SatisfyImportsOnce(ComposablePart part);
System\ComponentModel\Composition\PartCreationPolicyAttribute.cs (1)
7/// Specifies <see cref="CreationPolicy"/> for a given <see cref="Primitives.ComposablePart" />.
System\ComponentModel\Composition\PartMetadataAttribute.cs (1)
8/// <see cref="Primitives.ComposablePart"/>.
System\ComponentModel\Composition\PartNotDiscoverableAttribute.cs (1)
7/// Place on a type that should not be discovered as a <see cref="Primitives.ComposablePart" /> in
System\ComponentModel\Composition\Primitives\ComposablePart.cs (19)
15/// Initializes a new instance of the <see cref="ComposablePart"/> class. 26/// the exported values provided by the <see cref="ComposablePart"/>. 29/// The <see cref="ComposablePart"/> has been disposed of. 34/// If the <see cref="ComposablePart"/> was created from a 42/// If the <see cref="ComposablePart"/> does not have exports, return an empty 54/// the imports required by the <see cref="ComposablePart"/>. 57/// The <see cref="ComposablePart"/> has been disposed of. 62/// If the <see cref="ComposablePart"/> was created from a 70/// If the <see cref="ComposablePart"/> does not have imports, return an empty 82/// <see cref="ComposablePart"/>. The default is an empty, read-only 86/// The <see cref="ComposablePart"/> has been disposed of. 91/// If the <see cref="ComposablePart"/> was created from a 102/// <see cref="ComposablePart"/> does not contain metadata, return an 120/// The <see cref="ComposablePart"/> has been disposed of. 123/// An error occurred activating the <see cref="ComposablePart"/>. 145/// property on the <see cref="ComposablePart"/>. 152/// The <see cref="ComposablePart"/> has been disposed of. 179/// property on the <see cref="ComposablePart"/>. 201/// The <see cref="ComposablePart"/> has been disposed of.
System\ComponentModel\Composition\Primitives\ComposablePartDefinition.cs (8)
12/// describe, and allow the creation of, <see cref="ComposablePart"/> objects. 31/// the exported values provided by <see cref="ComposablePart"/> objects created by the 37/// If the <see cref="ComposablePart"/> objects created by the 50/// the imports required by <see cref="ComposablePart"/> objects created by the 56/// If the <see cref="ComposablePart"/> objects created by the 92/// The created <see cref="ComposablePart"/>. 98/// <see cref="ComposablePart"/> on every invoke and should never return 103public abstract ComposablePart CreatePart();
System\ComponentModel\Composition\Primitives\ComposablePartException.cs (1)
12/// <see cref="ComposablePart"/>.
System\ComponentModel\Composition\Primitives\CompositionElementExtensions.cs (1)
35public static ICompositionElement ToElement(this ComposablePart part)
System\ComponentModel\Composition\Primitives\ContractBasedImportDefinition.cs (5)
18/// required by a <see cref="ComposablePart"/> object. 73/// multiple times throughout the lifetime of a <see cref="ComposablePart"/>, otherwise, 78/// satisfied before a <see cref="ComposablePart"/> can start producing exported 134/// multiple times throughout the lifetime of a <see cref="ComposablePart"/>, otherwise, 139/// satisfied before a <see cref="ComposablePart"/> can start producing exported
System\ComponentModel\Composition\Primitives\ImportDefinition.cs (5)
14/// Represents an import required by a <see cref="ComposablePart"/> object. 66/// multiple times throughout the lifetime of a <see cref="ComposablePart"/>, otherwise, 71/// satisfied before a <see cref="ComposablePart"/> can start producing exported 219/// satisfied before a <see cref="ComposablePart"/> can start producing exported 232/// multiple times throughout the lifetime of a <see cref="ComposablePart"/>, otherwise,
System\ComponentModel\Composition\ReflectionModel\ExportfactoryCreator.LifetimeContext.cs (1)
40var part = factoryPartDefinition.CreatePart();
System\ComponentModel\Composition\ReflectionModel\ReflectionComposablePartDefinition.cs (1)
119public override ComposablePart CreatePart()