public ComponentModel(MEFv3.ExportProvider exportProvider) { this.ExportProvider = exportProvider; }
public async Task TestAssemblyIsInMefCatalog() { Microsoft.VisualStudio.Composition.ExportProvider ep = await this.mef.CreateExportProviderAsync(); Assert.NotNull(ep.GetExportedValue <SomeMefExport>()); }
/// <summary> /// Initializes a new instance of the <see cref="DelegatingExportProvider"/> class. /// </summary> /// <param name="inner">The instance to forward queries to.</param> protected DelegatingExportProvider(ExportProvider inner) : base(inner.Resolver) { Requires.NotNull(inner, nameof(inner)); this.inner = inner; }
internal MefV1ExportProvider(ExportProvider exportProvider) { Requires.NotNull(exportProvider, nameof(exportProvider)); this.exportProvider = exportProvider; }
private CompositionService([MefV1.Import] ExportProvider exportProvider) { Requires.NotNull(exportProvider, nameof(exportProvider)); this.container = new MefV1.Hosting.CompositionContainer(MefV1.Hosting.CompositionOptions.IsThreadSafe, exportProvider.AsExportProvider()); }
/// <summary> /// Creates an instance of a <see cref="MefV1.Hosting.ExportProvider"/> /// for purposes of compatibility with the version of MEF found in the .NET Framework. /// </summary> /// <param name="exportProvider">The <see cref="Microsoft.VisualStudio.Composition.ExportProvider"/> to wrap.</param> /// <returns>A MEF "v1" shim.</returns> public static MefV1.Hosting.ExportProvider AsExportProvider(this ExportProvider exportProvider) { Requires.NotNull(exportProvider, nameof(exportProvider)); return(new MefV1ExportProvider(exportProvider)); }