ViewFilter.OnSetBuffer Method
Called when the buffer of lines is being set or changed in the given view.
Namespace: Microsoft.VisualStudio.Package
Assemblies: Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
Microsoft.VisualStudio.Package.LanguageService.12.0 (in Microsoft.VisualStudio.Package.LanguageService.12.0.dll)
Microsoft.VisualStudio.Package.LanguageService.11.0 (in Microsoft.VisualStudio.Package.LanguageService.11.0.dll)
Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
Syntax
'Declaration
Public Overridable Sub OnSetBuffer ( _
view As IVsTextView, _
buffer As IVsTextLines _
)
public virtual void OnSetBuffer(
IVsTextView view,
IVsTextLines buffer
)
public:
virtual void OnSetBuffer(
IVsTextView^ view,
IVsTextLines^ buffer
)
abstract OnSetBuffer :
view:IVsTextView *
buffer:IVsTextLines -> unit
override OnSetBuffer :
view:IVsTextView *
buffer:IVsTextLines -> unit
public function OnSetBuffer(
view : IVsTextView,
buffer : IVsTextLines
)
Parameters
view
Type: Microsoft.VisualStudio.TextManager.Interop.IVsTextView[in] An IVsTextView object representing the view whose buffer is being changed.
buffer
Type: Microsoft.VisualStudio.TextManager.Interop.IVsTextLines[in] An IVsTextLines object representing the new buffer.
Implements
IVsTextViewEvents.OnSetBuffer(IVsTextView, IVsTextLines)
Remarks
If your language service needs to respond to a buffer being changed, then you must derive a class from the ViewFilter class and override this method.
This method is an implementation of the OnSetBuffer method on the IVsTextViewEvents interface.
The base method does nothing. In debug mode, the base method does assert that the new buffer is the same as the buffer in the Source object obtained from the CodeWindowManager object that was passed to the ViewFilter class constructor.
.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.