EditorFactory.SetSite Method
Sets the service provider.
Namespace: Microsoft.VisualStudio.Package
Assemblies: Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
Syntax
'Dichiarazione
Public Overridable Function SetSite ( _
psp As IServiceProvider _
) As Integer
'Utilizzo
Dim instance As EditorFactory
Dim psp As IServiceProvider
Dim returnValue As Integer
returnValue = instance.SetSite(psp)
public virtual int SetSite(
IServiceProvider psp
)
public:
virtual int SetSite(
IServiceProvider^ psp
)
abstract SetSite :
psp:IServiceProvider -> int
override SetSite :
psp:IServiceProvider -> int
public function SetSite(
psp : IServiceProvider
) : int
Parameters
- psp
Type: Microsoft.VisualStudio.OLE.Interop.IServiceProvider
The IServiceProvider object of the editor being initialized.
Return Value
Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Implements
IVsEditorFactory.SetSite(IServiceProvider)
Remarks
This method also gets the language and editor extensions.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.