Exemplo n.º 1
0
 public ComponentModel(MEFv3.ExportProvider exportProvider)
 {
     this.ExportProvider = exportProvider;
 }
Exemplo n.º 2
0
    public async Task TestAssemblyIsInMefCatalog()
    {
        Microsoft.VisualStudio.Composition.ExportProvider ep = await this.mef.CreateExportProviderAsync();

        Assert.NotNull(ep.GetExportedValue <SomeMefExport>());
    }
Exemplo n.º 3
0
 /// <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;
 }
Exemplo n.º 4
0
            internal MefV1ExportProvider(ExportProvider exportProvider)
            {
                Requires.NotNull(exportProvider, nameof(exportProvider));

                this.exportProvider = exportProvider;
            }
Exemplo n.º 5
0
 private CompositionService([MefV1.Import] ExportProvider exportProvider)
 {
     Requires.NotNull(exportProvider, nameof(exportProvider));
     this.container = new MefV1.Hosting.CompositionContainer(MefV1.Hosting.CompositionOptions.IsThreadSafe, exportProvider.AsExportProvider());
 }
Exemplo n.º 6
0
        /// <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));
        }