C# Class VSEmbed.VsServiceProvider

An out-of-process implementation of Visual Studio's singleton OLE ServiceProvider.
Visual Studio services use this class, both through MEF SVsServiceProvider and Shell.ServiceProvider.GlobalProvider, to load COM services. I need to provide every service used in editor and theme codepaths. Most of the service methods are never actually called. This must be initialized before theme dictionaries or editor services are used
Inheritance: Microsoft.VisualStudio.OLE.Interop.IServiceProvider, SVsServiceProvider
Afficher le fichier Open project: SLaks/VSEmbed Class Usage Examples

Private Properties

Свойство Type Description
AddTaskSchedulerService void
Initialize void
OLE int

Méthodes publiques

Méthode Description
AddService ( System.Guid serviceGuid, object instance ) : void

Adds a new service to the provider (or replaces an existing service).

AddService ( Type serviceType, object instance ) : void

Adds a new service to the provider (or replaces an existing service).

GetService ( Type serviceType ) : object

Gets the specified service from the provider, or null if it has not been registered.

SetMefContainer ( IComponentModel container ) : void

Registers a MEF container in this ServiceProvider.

This is used to provide the IComponentModel service, which is used by many parts of Roslyn and the editor. It's also used by our TextViewHost wrapper control to access the MEF container.

Private Methods

Méthode Description
AddTaskSchedulerService ( ) : void
Initialize ( ) : void
OLE ( [ guidService, [ riid, IntPtr &ppvObject ) : int

Method Details

AddService() public méthode

Adds a new service to the provider (or replaces an existing service).
public AddService ( System.Guid serviceGuid, object instance ) : void
serviceGuid System.Guid
instance object
Résultat void

AddService() public méthode

Adds a new service to the provider (or replaces an existing service).
public AddService ( Type serviceType, object instance ) : void
serviceType System.Type
instance object
Résultat void

GetService() public méthode

Gets the specified service from the provider, or null if it has not been registered.
public GetService ( Type serviceType ) : object
serviceType System.Type
Résultat object

SetMefContainer() public méthode

Registers a MEF container in this ServiceProvider.
This is used to provide the IComponentModel service, which is used by many parts of Roslyn and the editor. It's also used by our TextViewHost wrapper control to access the MEF container.
public SetMefContainer ( IComponentModel container ) : void
container IComponentModel
Résultat void