SetSite Method
TOC
Collapse the table of content
Expand the table of content

LanguageService.SetSite Method (Object)

 

Called to set or site the service provider for this language service.

Namespace:   Microsoft.VisualStudio.Package
Assembly:  Microsoft.VisualStudio.Package.LanguageService.14.0 (in Microsoft.VisualStudio.Package.LanguageService.14.0.dll)

public void SetSite(
	object site
)

Parameters

site
Type: System.Object

[in] The object that is to be the parent service provider for this language service. This cannot be a null value!

You can call this method after you instantiate the language service in your implementation of the LanguageService.Initialize method. Typically, the VSPackage is passed as the service provider. When LanguageService.GetService is called, it typically passes the request on the service provider given by LanguageService.SetSite. The object passed in must be derived from VSPackage and implement either the IServiceProvider or IOleServiceProvider interface.

The base method stores the service provider in an internal variable and calls GetProviderLocale on the service provider object (which is why the object must be derived from Microsoft.VisualStudio.Shell.Package).

Return to top
Show:
© 2016 Microsoft