LanguageService.GetCodeWindowManager Method
Instantiates a CodeWindowManager class.
Namespace: Microsoft.VisualStudio.Package
Assemblies: Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
Microsoft.VisualStudio.Package.LanguageService.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.0.dll)
Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
Syntax
‘선언
Public Function GetCodeWindowManager ( _
codeWindow As IVsCodeWindow, _
<OutAttribute> ByRef mgr As IVsCodeWindowManager _
) As Integer
public int GetCodeWindowManager(
IVsCodeWindow codeWindow,
out IVsCodeWindowManager mgr
)
Parameters
- codeWindow
Type: Microsoft.VisualStudio.TextManager.Interop.IVsCodeWindow
[in] The IVsCodeWindow with which to associate a new CodeWindowManager object.
- mgr
Type: Microsoft.VisualStudio.TextManager.Interop.IVsCodeWindowManager%
[out] The new CodeWindowManager object.
Return Value
Type: System.Int32
If successful, returns S_OK; otherwise, returns an error code.
Implements
IVsLanguageInfo.GetCodeWindowManager(IVsCodeWindow, IVsCodeWindowManager%)
Remarks
Visual Studio calls this method to provide an opportunity for your language service to associate itself with a particular code window. If you need to add other elements to the code window besides a Navigation bar (which is already handled by the CodeWindowManager class), then you must derive a class from the CodeWindowManager class and return an instance of your class from this method. Your derived class must call the base constructor for CodeWindowManager.
The base method always returns a new CodeWindowManager object. This base method instantiates a Source object (with a call to CreateSource) that is in turn supplied with a new Colorizer object (from a call to Source.GetColorizer). When the Source object is constructed, it calls CreateExpansionProvider to obtain a new ExpansionProvider object that in turn calls CreateExpansionFunction to obtain an ExpansionFunction object. The CodeWindowManager constructor calls CreateDocumentProperties to obtain a new DocumentProperties object.
.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.