1 instantiation of PartManager
System.ComponentModel.Composition (1)
System\ComponentModel\Composition\Hosting\ImportEngine.cs (1)
679partManager = new PartManager(this, part);
56 references to PartManager
System.ComponentModel.Composition (56)
System\ComponentModel\Composition\Hosting\ImportEngine.cs (24)
24private readonly Stack<PartManager> _recursionStateStack = new Stack<PartManager>(); 25private ConditionalWeakTable<ComposablePart, PartManager> _partManagers = new ConditionalWeakTable<ComposablePart, PartManager>(); 114var partManager = GetPartManager(part, true)!; 163PartManager partManager = GetPartManager(part, true)!; 200PartManager partManager = GetPartManager(part, true)!; 235PartManager? partManager = GetPartManager(part, false); 290private CompositionResult TryPreviewImportsStateMachine(PartManager partManager, 327private CompositionResult TrySatisfyImportsStateMachine(PartManager partManager, ComposablePart part) 410private CompositionResult TrySatisfyImports(PartManager partManager, ComposablePart part, bool shouldTrackImports) 450private CompositionResult TrySatisfyImportSubset(PartManager partManager, 493IEnumerable<PartManager> affectedParts = _recompositionManager.GetAffectedParts(e.ChangedContractNames); 510foreach (var partManager in affectedParts) 518private CompositionResult TryRecomposeImports(PartManager partManager, 567private CompositionResult TryRecomposeImport(PartManager partManager, bool partComposed, 606private void StartSatisfyingImports(PartManager partManager, AtomicComposition? atomicComposition) 626private void StopSatisfyingImports(PartManager partManager, AtomicComposition? atomicComposition) 632ConditionalWeakTable<ComposablePart, PartManager>? partManagers = null; 662private PartManager? GetPartManager(ComposablePart part, bool createIfNotpresent) 664PartManager? partManager = null; 703PartManager firstPart = _recursionStateStack.First(); 704PartManager? lastPart = null; 706foreach (PartManager testPart in _recursionStateStack.Skip(1))
System\ComponentModel\Composition\Hosting\ImportEngine.EngineContext.cs (10)
18private readonly List<PartManager> _addedPartManagers = new List<PartManager>(); 19private readonly List<PartManager> _removedPartManagers = new List<PartManager>(); 28public void AddPartManager(PartManager part) 38public void RemovePartManager(PartManager part) 48public IEnumerable<PartManager>? GetAddedPartManagers() 57public IEnumerable<PartManager>? GetRemovedPartManagers() 68foreach (var partManager in _addedPartManagers) 73foreach (var partManager in _removedPartManagers)
System\ComponentModel\Composition\Hosting\ImportEngine.RecompositionManager.cs (22)
20private readonly WeakReferenceCollection<PartManager> _partsToIndex = new WeakReferenceCollection<PartManager>(); 21private readonly WeakReferenceCollection<PartManager> _partsToUnindex = new WeakReferenceCollection<PartManager>(); 22private readonly Dictionary<string, WeakReferenceCollection<PartManager>> _partManagerIndex = new Dictionary<string, WeakReferenceCollection<PartManager>>(); 24public void AddPartToIndex(PartManager partManager) 29public void AddPartToUnindex(PartManager partManager) 34public List<PartManager> GetAffectedParts(IEnumerable<string> changedContractNames) 38List<PartManager> parts = new List<PartManager>(); 70public IEnumerable<PartManager> GetPartsImporting(string contractName) 72if (!_partManagerIndex.TryGetValue(contractName, out WeakReferenceCollection<PartManager>? partManagerList)) 74return Enumerable.Empty<PartManager>(); 80private void AddIndexEntries(PartManager partManager) 84if (!_partManagerIndex.TryGetValue(contractName, out WeakReferenceCollection<PartManager>? indexEntries)) 86indexEntries = new WeakReferenceCollection<PartManager>(); 97private void RemoveIndexEntries(PartManager partManager) 101if (_partManagerIndex.TryGetValue(contractName, out WeakReferenceCollection<PartManager>? indexEntries)) 119List<PartManager?> partsToUnindex = _partsToUnindex.AliveItemsToList()!; 127foreach (var partManager in partsToIndex) 142foreach (var partManager in partsToUnindex)