System\ComponentModel\Composition\Hosting\ExportProvider.cs (27)
39/// The <see cref="ImportDefinition"/> that defines the conditions of the
44/// the conditions defined by <see cref="ImportDefinition"/>, if found; otherwise, an
52/// <see cref="ImportDefinition.Cardinality"/> is <see cref="ImportCardinality.ExactlyOne"/> and
54/// <see cref="ImportDefinition"/>.
58/// <see cref="ImportDefinition.Cardinality"/> is <see cref="ImportCardinality.ZeroOrOne"/> or
60/// objects that match the conditions of the specified <see cref="ImportDefinition"/>.
63public IEnumerable<Export> GetExports(ImportDefinition definition)
72/// The <see cref="ImportDefinition"/> that defines the conditions of the
78/// the conditions defined by <see cref="ImportDefinition"/>, if found; otherwise, an
86/// <see cref="ImportDefinition.Cardinality"/> is <see cref="ImportCardinality.ExactlyOne"/> and
88/// <see cref="ImportDefinition"/>.
92/// <see cref="ImportDefinition.Cardinality"/> is <see cref="ImportCardinality.ZeroOrOne"/> or
94/// objects that match the conditions of the specified <see cref="ImportDefinition"/>.
97public IEnumerable<Export> GetExports(ImportDefinition definition, AtomicComposition? atomicComposition)
122/// The <see cref="ImportDefinition"/> that defines the conditions of the
128/// objects that match the conditions defined by <see cref="ImportDefinition"/>, if found;
132/// <see langword="true"/> if <see cref="ImportDefinition.Cardinality"/> is
135/// <see cref="ImportDefinition"/>. <see langword="true"/> if
136/// <see cref="ImportDefinition.Cardinality"/> is <see cref="ImportCardinality.ZeroOrOne"/> or
138/// that matches the conditions of the specified <see cref="ImportDefinition"/>; otherwise,
144public bool TryGetExports(ImportDefinition definition, AtomicComposition? atomicComposition, out IEnumerable<Export>? exports)
156/// The <see cref="ImportDefinition"/> that defines the conditions of the
162/// the conditions defined by <see cref="ImportDefinition"/>, if found; otherwise, an
169/// if <see cref="ImportDefinition.Cardinality"/> is <see cref="ImportCardinality.ExactlyOne"/>
171/// specified <see cref="ImportDefinition"/>, an <see cref="IEnumerable{T}"/> should be returned.
174protected abstract IEnumerable<Export>? GetExportsCore(ImportDefinition definition, AtomicComposition? atomicComposition);
208private ExportCardinalityCheckResult TryGetExportsCore(ImportDefinition definition, AtomicComposition? atomicComposition, out IEnumerable<Export>? exports)
System\ComponentModel\Composition\ReflectionModel\ReflectionComposablePart.cs (18)
19private volatile Dictionary<ImportDefinition, object?>? _importValues;
20private volatile Dictionary<ImportDefinition, ImportingItem>? _importsCache;
60private Dictionary<ImportDefinition, object?> ImportValues
72value = new Dictionary<ImportDefinition, object?>();
81private Dictionary<ImportDefinition, ImportingItem> ImportsCache
93value = new Dictionary<ImportDefinition, ImportingItem>();
131public sealed override IEnumerable<ImportDefinition> ImportDefinitions
187public override void SetImport(ImportDefinition definition, IEnumerable<Export> exports)
370foreach (ImportDefinition definition in ImportDefinitions.Where(definition => definition.IsPrerequisite))
381private void EnsureSettable(ImportDefinition definition)
392private static void EnsureCardinality(ImportDefinition definition, Export[] exports)
448IEnumerable<ImportDefinition> members = ImportDefinitions.Where(import => !import.IsPrerequisite);
456IEnumerable<ImportDefinition> members = ImportDefinitions.Where(import => import.IsPrerequisite);
462private void SetExportedValueForImport(ImportingItem import, ImportDefinition definition, object value)
472where TImportDefinition : ImportDefinition
510private bool TryGetImportValue(ImportDefinition definition, out object? value)
583private ImportingItem? GetImportingItemFromDefinition(ImportDefinition definition)
597private static ImportingItem? GetImportingItem(ImportDefinition definition)