3 types derived from Export
System.ComponentModel.Composition (3)
System\ComponentModel\Composition\Hosting\CatalogExportProvider.CatalogExport.cs (1)
12private class CatalogExport : Export
System\ComponentModel\Composition\Hosting\CatalogExportProvider.FactoryExport.cs (1)
13internal abstract class FactoryExport : Export
System\ComponentModel\Composition\Hosting\CatalogExportProvider.ScopeFactoryExport.cs (1)
29private sealed class ScopeCatalogExport : Export, IDisposable
2 instantiations of Export
System.ComponentModel.Composition (2)
System\ComponentModel\Composition\AttributedModelServices.cs (1)
123return batch.AddExport(new Export(contractName, metadata, () => exportedValue));
System\ComponentModel\Composition\Hosting\ComposablePartExportProvider.cs (1)
382return new Export(export, () => GetExportedValue(part, export));
215 references to Export
System.ComponentModel.Composition (215)
System\ComponentModel\Composition\ExportServices.cs (10)
47internal static Func<Export, object> CreateStronglyTypedLazyFactory(Type? exportType, Type? metadataViewType) 64return (Func<Export, object>)Delegate.CreateDelegate(typeof(Func<Export, object>), genericMethod); 67internal static Func<Export, Lazy<object, object>> CreateSemiStronglyTypedLazyFactory(Type? exportType, Type? metadataViewType) 76return (Func<Export, Lazy<object, object>>)Delegate.CreateDelegate(typeof(Func<Export, Lazy<object, object>>), genericMethod); 79internal static Lazy<T, M> CreateStronglyTypedLazyOfTM<T, M>(Export export) 98internal static Lazy<T> CreateStronglyTypedLazyOfT<T>(Export export) 113internal static Lazy<object?, object> CreateSemiStronglyTypedLazy<T, M>(Export export) 132internal static T GetCastedExportedValue<T>(Export export)
System\ComponentModel\Composition\Hosting\AggregateExportProvider.cs (8)
140/// <see cref="Export"/> to get.</param> 144/// An <see cref="IEnumerable{T}"/> of <see cref="Export"/> objects that match 153/// it should return an empty <see cref="IEnumerable{T}"/> of <see cref="Export"/>. 156protected override IEnumerable<Export> GetExportsCore(ImportDefinition definition, AtomicComposition? atomicComposition) 162var exports = new List<Export>(); 165foreach (var export in provider.GetExports(definition, atomicComposition)) 174IEnumerable<Export>? allExports = null; 180bool cardinalityCheckResult = provider.TryGetExports(definition, atomicComposition, out IEnumerable<Export>? exports);
System\ComponentModel\Composition\Hosting\CatalogExportProvider.cs (13)
32protected override IEnumerable<Export> GetExportsCore(ImportDefinition definition, AtomicComposition? atomicComposition) 57/// uses to produce <see cref="Export"/> objects. 106/// uses to produce <see cref="Export"/> objects. 129/// <see cref="Export"/> objects. The default is <see langword="null"/>. 282/// <see cref="Export"/> to get.</param> 285/// An <see cref="IEnumerable{T}"/> of <see cref="Export"/> objects that match 294/// it should return an empty <see cref="IEnumerable{T}"/> of <see cref="Export"/>. 297protected override IEnumerable<Export> GetExportsCore(ImportDefinition definition, AtomicComposition? atomicComposition) 307_innerExportProvider.TryGetExports(definition, atomicComposition, out IEnumerable<Export>? exports); 311private List<Export> InternalGetExportsCore(ImportDefinition definition, AtomicComposition? atomicComposition) 329List<Export> exports = new List<Export>(); 343private Export CreateExport(ComposablePartDefinition partDefinition, ExportDefinition exportDefinition, bool isExportFactory, CreationPolicy importPolicy)
System\ComponentModel\Composition\Hosting\CatalogExportProvider.FactoryExport.cs (4)
51public abstract Export CreateExportProduct(); 77public Export CreateProductExport() 91private readonly Export _export; 119public override void SetImport(ImportDefinition definition, IEnumerable<Export> exports)
System\ComponentModel\Composition\Hosting\CatalogExportProvider.PartCreatorExport.cs (1)
20public override Export CreateExportProduct()
System\ComponentModel\Composition\Hosting\CatalogExportProvider.ScopeFactoryExport.cs (4)
24public override Export CreateExportProduct() 33private Export? _export; 56Export? export = childContainer.CatalogExportProvider.CreateExport(_scopeFactoryExport.UnderlyingPartDefinition, _scopeFactoryExport.UnderlyingExportDefinition, false, CreationPolicy.Any); 78Export? export;
System\ComponentModel\Composition\Hosting\CatalogExportProvider.ScopeManager.cs (3)
25protected override IEnumerable<Export> GetExportsCore(ImportDefinition definition, AtomicComposition? atomicComposition) 27List<Export> exports = new List<Export>();
System\ComponentModel\Composition\Hosting\ComposablePartExportProvider.cs (8)
105/// <see cref="ComposablePartExportProvider"/> access to <see cref="Export"/> objects. 181/// <see cref="Export"/> to get.</param> 185/// An <see cref="IEnumerable{T}"/> of <see cref="Export"/> objects that match 194/// it should return an empty <see cref="IEnumerable{T}"/> of <see cref="Export"/>. 197protected override IEnumerable<Export>? GetExportsCore(ImportDefinition definition, AtomicComposition? atomicComposition) 217List<Export> exports = new List<Export>(); 380private Export CreateExport(ComposablePart part, ExportDefinition export)
System\ComponentModel\Composition\Hosting\CompositionBatch.cs (3)
152/// The <see cref="Export"/> to add to the <see cref="CompositionBatch"/>. 155/// A <see cref="ComposablePart"/> that can be used remove the <see cref="Export"/> 163public ComposablePart AddExport(Export export)
System\ComponentModel\Composition\Hosting\CompositionBatch.SingleExportComposablePart.cs (3)
16private readonly Export _export; 18public SingleExportComposablePart(Export export) 52public override void SetImport(ImportDefinition definition, IEnumerable<Export> exports)
System\ComponentModel\Composition\Hosting\CompositionContainer.cs (33)
46/// the <see cref="CompositionContainer"/> access to <see cref="Export"/> objects, 67/// the <see cref="CompositionContainer"/> access to <see cref="Export"/> objects, 83/// <param name="catalog">A catalog that provides <see cref="Export"/> objects to the <see cref="CompositionContainer"/>.</param> 86/// the <see cref="CompositionContainer"/> access to <see cref="Export"/> objects, 102/// <param name="catalog">A catalog that provides <see cref="Export"/> objects to the <see cref="CompositionContainer"/>.</param> 108/// the <see cref="CompositionContainer"/> access to <see cref="Export"/> objects, 124/// <param name="catalog">A catalog that provides <see cref="Export"/> objects to the <see cref="CompositionContainer"/>.</param> 130/// the <see cref="CompositionContainer"/> access to <see cref="Export"/> objects, 276/// <see cref="Export"/> objects. The default is an empty 377/// Releases the <see cref="Export"/> from the <see cref="CompositionContainer"/>. The behavior 379/// the <see cref="Export"/> instance. As a general rule non shared exports should be early 383/// an <see cref="Export"/> if it comes from a <see cref="ComposablePart"/> that was constructed 385/// the dependency chain of the <see cref="Export"/>s, detaching references from the container and 386/// calling Dispose on the <see cref="ComposablePart"/>s as needed. If the <see cref="Export"/> 391/// <param name="export"><see cref="Export"/> that needs to be released.</param> 395public void ReleaseExport(Export export) 408/// the <see cref="Export"/> instance. As a general rule non shared exports should be early 414/// the dependency chain of the <see cref="Export"/>s, detaching references from the container and 415/// calling Dispose on the <see cref="ComposablePart"/>s as needed. If the <see cref="Export"/> 420/// <param name="export"><see cref="Export"/> that needs to be released.</param> 435/// Releases a set of <see cref="Export"/>s from the <see cref="CompositionContainer"/>. 438/// <param name="exports"><see cref="Export"/>s that need to be released.</param> 445public void ReleaseExports(IEnumerable<Export> exports) 449foreach (Export export in exports) 456/// Releases a set of <see cref="Export"/>s from the <see cref="CompositionContainer"/>. 459/// <param name="exports"><see cref="Export"/>s that need to be released.</param> 477/// Releases a set of <see cref="Export"/>s from the <see cref="CompositionContainer"/>. 480/// <param name="exports"><see cref="Export"/>s that need to be released.</param> 550/// <see cref="Export"/> to get.</param> 554/// An <see cref="IEnumerable{T}"/> of <see cref="Export"/> objects that match 563/// it should return an empty <see cref="IEnumerable{T}"/> of <see cref="Export"/>. 566protected override IEnumerable<Export>? GetExportsCore(ImportDefinition definition, AtomicComposition? atomicComposition) 570IEnumerable<Export>? exports = null;
System\ComponentModel\Composition\Hosting\ExportProvider.cs (23)
14/// methods for retrieving <see cref="Export"/> objects. 40/// <see cref="Export"/> objects to get. 43/// An <see cref="IEnumerable{T}"/> of <see cref="Export"/> objects that match 53/// there are zero <see cref="Export"/> objects that match the conditions of the specified 59/// <see cref="ImportCardinality.ExactlyOne"/> and there are more than one <see cref="Export"/> 63public IEnumerable<Export> GetExports(ImportDefinition definition) 73/// <see cref="Export"/> objects to get. 77/// An <see cref="IEnumerable{T}"/> of <see cref="Export"/> objects that match 87/// there are zero <see cref="Export"/> objects that match the conditions of the specified 93/// <see cref="ImportCardinality.ExactlyOne"/> and there are more than one <see cref="Export"/> 97public IEnumerable<Export> GetExports(ImportDefinition definition, AtomicComposition? atomicComposition) 101ExportCardinalityCheckResult result = TryGetExportsCore(definition, atomicComposition, out IEnumerable<Export>? exports); 123/// <see cref="Export"/> objects to get. 127/// When this method returns, contains an <see cref="IEnumerable{T}"/> of <see cref="Export"/> 134/// there are zero <see cref="Export"/> objects that match the conditions of the specified 137/// <see cref="ImportCardinality.ExactlyOne"/> and there is exactly one <see cref="Export"/> 144public bool TryGetExports(ImportDefinition definition, AtomicComposition? atomicComposition, out IEnumerable<Export>? exports) 157/// <see cref="Export"/> objects to return. 161/// An <see cref="IEnumerable{T}"/> of <see cref="Export"/> objects that match 170/// and there are zero <see cref="Export"/> objects that match the conditions of the 174protected abstract IEnumerable<Export>? GetExportsCore(ImportDefinition definition, AtomicComposition? atomicComposition); 208private ExportCardinalityCheckResult TryGetExportsCore(ImportDefinition definition, AtomicComposition? atomicComposition, out IEnumerable<Export>? exports) 227exports ??= Array.Empty<Export>();
System\ComponentModel\Composition\Hosting\ExportProvider.GetExportOverrides.cs (17)
220/// The <see cref="Type"/> of the <see cref="Export"/> objects to return. 223/// The <see cref="Type"/> of the metadata view of the <see cref="Export"/> objects to 228/// <see cref="Export"/> object to return; or <see langword="null"/> 238/// The returned <see cref="Export"/> objects are instances of 263IEnumerable<Export> exports = GetExportsCore(type, metadataViewType, contractName, ImportCardinality.ZeroOrMore); 266Func<Export, Lazy<object, object>> typedExportFactory = ExportServices.CreateSemiStronglyTypedLazyFactory(type, metadataViewType); 267foreach (Export export in exports) 713IEnumerable<Export> exports = GetExportsCore(typeof(T), (Type?)null, contractName, ImportCardinality.ZeroOrMore); 716foreach (Export export in exports) 730Export? export = GetExportsCore(typeof(T), (Type?)null, contractName, cardinality).SingleOrDefault(); 737IEnumerable<Export> exports = GetExportsCore(typeof(T), (Type?)null, contractName, ImportCardinality.ZeroOrMore); 740foreach (Export export in exports) 749IEnumerable<Export> exports = GetExportsCore(typeof(T), typeof(TMetadataView), contractName, ImportCardinality.ZeroOrMore); 752foreach (Export export in exports) 761Export? export = GetExportsCore(typeof(T), typeof(TMetadataView), contractName, ImportCardinality.ExactlyOne).SingleOrDefault(); 768Export? export = GetExportsCore(typeof(T), null, contractName, ImportCardinality.ExactlyOne).SingleOrDefault(); 773private IEnumerable<Export> GetExportsCore(Type type, Type? metadataViewType, string? contractName, ImportCardinality cardinality)
System\ComponentModel\Composition\Hosting\ImportEngine.cs (7)
35/// <see cref="ImportEngine"/> access to <see cref="Export"/>s. 215/// <see cref="ComposablePart"/> and releases all the <see cref="Export"/>s used to 462CompositionResult<IEnumerable<Export>> exportsResult = TryGetExports( 737private static CompositionResult<IEnumerable<Export>> TryGetExports(ExportProvider? provider, 742IEnumerable<Export>? exports = null; 747return new CompositionResult<IEnumerable<Export>>(exports!); 754return new CompositionResult<IEnumerable<Export>>(
System\ComponentModel\Composition\Hosting\ImportEngine.PartManager.cs (8)
21private Dictionary<ImportDefinition, Export[]?>? _importCache; 71public CompositionResult TrySetImport(ImportDefinition import, Export[] exports) 93public void SetSavedImport(ImportDefinition import, Export[]? exports, AtomicComposition? atomicComposition) 105_importCache ??= new Dictionary<ImportDefinition, Export[]?>(); 109public Export[]? GetSavedImport(ImportDefinition import) 111Export[]? exports = null; 137public void UpdateDisposableDependencies(ImportDefinition import, Export[] exports) 142foreach (var export in exports)
System\ComponentModel\Composition\ImportCardinalityMismatchException.cs (1)
12/// does not match the cardinality of the <see cref="Primitives.Export"/> objects available in an
System\ComponentModel\Composition\Primitives\ComposablePart.cs (2)
167/// An <see cref="IEnumerable{T}"/> of <see cref="Export"/> objects of which 206public abstract void SetImport(ImportDefinition definition, IEnumerable<Export> exports);
System\ComponentModel\Composition\Primitives\CompositionElementExtensions.cs (1)
13public static ICompositionElement ToElement(this Export export)
System\ComponentModel\Composition\Primitives\ContractBasedImportDefinition.cs (10)
54/// <see cref="Export"/> required by the <see cref="ContractBasedImportDefinition"/>. 62/// the metadata names of the <see cref="Export"/> required by the 68/// cardinality of the <see cref="Export"/> objects required by the 115/// <see cref="Export"/> required by the <see cref="ContractBasedImportDefinition"/>. 123/// the metadata names of the <see cref="Export"/> required by the 129/// cardinality of the <see cref="Export"/> objects required by the 196/// An <see cref="IEnumerable{T}"/> of pairs of metadata keys and types of the <see cref="Export"/> required by the 262/// <see cref="ImportDefinition"/> to be satisfied by an <see cref="Export"/>. 279/// A definition for a <see cref="Export"/> used to determine if it satisfies the 283/// <see langword="True"/> if the <see cref="Export"/> satisfies the requirements for
System\ComponentModel\Composition\Primitives\Export.cs (18)
21private volatile object? _exportedValue = Export._EmptyValue; 24/// Initializes a new instance of the <see cref="Export"/> class. 37/// Initializes a new instance of the <see cref="Export"/> class 42/// <see cref="Export"/>. 46/// <see cref="Export"/>. This allows the creation of the object to be delayed 64/// Initializes a new instance of the <see cref="Export"/> class 69/// <see cref="Export"/>. 73/// <see cref="Export"/>; or <see langword="null"/> to set the 79/// <see cref="Export"/>. This allows the creation of the object to be delayed. 97/// Initializes a new instance of the <see cref="Export"/> class 102/// <see cref="Export"/> satisfies. 106/// <see cref="Export"/>. This allows the creation of the object to be delayed. 129/// the <see cref="Export"/> satisfies. 158/// <see cref="Export"/>. 183/// The exported <see cref="object"/> of the <see cref="Export"/>. 202if (_exportedValue == Export._EmptyValue) 205Interlocked.CompareExchange(ref _exportedValue, exportedValue, Export._EmptyValue); 216/// The exported <see cref="object"/> of the <see cref="Export"/>.
System\ComponentModel\Composition\Primitives\ExportDefinition.cs (1)
11/// Describes the contract that an <see cref="Export"/> object satisfies.
System\ComponentModel\Composition\Primitives\ImportCardinality.cs (4)
7/// Indicates the cardinality of the <see cref="Export"/> objects required by an <see cref="ImportDefinition"/>. 12/// Zero or one <see cref="Export"/> objects are required by an <see cref="ImportDefinition"/>. 17/// Exactly one <see cref="Export"/> object is required by an <see cref="ImportDefinition"/>. 22/// Zero or more <see cref="Export"/> objects are required by an <see cref="ImportDefinition"/>.
System\ComponentModel\Composition\Primitives\ImportDefinition.cs (8)
51/// to be satisfied by an <see cref="Export"/>. 61/// cardinality of the <see cref="Export"/> objects required by the 124/// A <see cref="string"/> containing the contract name of the <see cref="Export"/> 174/// cardinality of the <see cref="Export"/> objects required by the 190/// <see cref="ImportDefinition"/> to be satisfied by an <see cref="Export"/>. 243/// <see cref="ImportDefinition"/> can be satisfied by the given <see cref="Export"/>. 246/// A definition for a <see cref="Export"/> used to determine if it satisfies the 250/// <see langword="True"/> if the <see cref="Export"/> satisfies the requirements for
System\ComponentModel\Composition\ReflectionModel\ExportfactoryCreator.cs (6)
23public Func<Export, object> CreateStronglyTypedExportFactoryFactory(Type exportType, Type? metadataViewType) 40Func<Export, object> exportFactoryFactory = (Func<Export, object>)Delegate.CreateDelegate(typeof(Func<Export, object>), this, genericMethod); 44private object CreateStronglyTypedExportFactoryOfT<T>(Export export) 57private object CreateStronglyTypedExportFactoryOfTM<T, M>(Export export)
System\ComponentModel\Composition\ReflectionModel\ExportfactoryCreator.LifetimeContext.cs (3)
14public static Tuple<T, Action> GetExportLifetimeContextFromExport<T>(Export export) 23Export exportProduct = scopeFactoryExport.CreateExportProduct(); 32Export exportProduct = factoryExport.CreateExportProduct();
System\ComponentModel\Composition\ReflectionModel\ImportingItem.cs (5)
33public object? CastExportsToImportType(Export[] exports) 45private Array CastExportsToCollectionImportType(Export[] exports) 65private object? CastExportsToSingleImportType(Export[] exports) 82private object? CastSingleExportToImportType(Type type, Export export) 92private object? Cast(Type type, Export export)
System\ComponentModel\Composition\ReflectionModel\ImportType.cs (6)
21private Func<Export, object>? _castSingleValue; 25internal static Dictionary<Type, Func<Export, object>?>? _castSingleValueCache; 27private static Dictionary<Type, Func<Export, object>?> CastSingleValueCache 31return _castSingleValueCache ??= new Dictionary<Type, Func<Export, object>?>(); 69public Func<Export, object>? CastExport 163private static bool TryGetCastFunction(Type genericType, bool isOpenGeneric, Type[] arguments, out Func<Export, object>? castFunction)
System\ComponentModel\Composition\ReflectionModel\ReflectionComposablePart.cs (5)
186public override void SetImport(ImportDefinition definition, IEnumerable<Export> exports) 201Export[] exportsAsArray = exports.AsArray(); 240private void SetImport(ImportingItem item, Export[] exports) 391private static void EnsureCardinality(ImportDefinition definition, Export[] exports) 499value = import.CastExportsToImportType(Array.Empty<Export>());