MefInjection<TService> Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Extenders using the VisualStudio.Extensibility model to develop in-process extension can use MefInjection<TService> to retrieve MEF services through .NET dependency injection.
public class MefInjection<TService> : Microsoft.VisualStudio.Extensibility.VSSdkCompatibility.MefInjection<TService,TService> where TService : class
type MefInjection<'Service (requires 'Service : null)> = class
inherit MefInjection<'Service, 'Service (requires 'Service : null and 'Service : null)>
Public Class MefInjection(Of TService)
Inherits MefInjection(Of TService, TService)
Type Parameters
- TService
The type of the retrieved service. TService
is passed to GetExtensions<T>() when retrieving the service.
- Inheritance
Remarks
Extensions should retrieve instances of this type through dependency injection.
Constructors
MefInjection<TService>(AsyncServiceProviderInjection<SComponentModel,IComponentModel>) |
This constructor is for internal use only. Creates an instance of MefInjection<TService>. |
Methods
GetServiceAsync() |
Asynchronously returns the retrieved service. (Inherited from MefInjection<TService,TInterface>) |