Completor Constructor
Initializes a new instance of the Completor 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 (in Microsoft.VisualStudio.Package.LanguageService.dll)
Syntax
'Declaration
Public Sub New ( _
langsvc As LanguageService, _
view As IVsTextView, _
description As String _
)
public Completor(
LanguageService langsvc,
IVsTextView view,
string description
)
public:
Completor(
LanguageService^ langsvc,
IVsTextView^ view,
String^ description
)
new :
langsvc:LanguageService *
view:IVsTextView *
description:string -> Completor
public function Completor(
langsvc : LanguageService,
view : IVsTextView,
description : String
)
Parameters
- langsvc
Type: Microsoft.VisualStudio.Package.LanguageService
[in] A LanguageService object.
- view
Type: Microsoft.VisualStudio.TextManager.Interop.IVsTextView
[in] An IVsTextView representing the view currently being edited.
- description
Type: System.String
[in] A string used to describe the pending edit operation.
Remarks
This constructor performs the following actions
Caches the parameters for later use.
Calls the GetSource method on the LanguageService object to get the Source object representing the source that is about to be updated.
Creates a new StringBuilder object to manage insertions and deletions into the line of text. This object holds only the text that is to be inserted at the current caret position.
Creates a new CompoundAction object to wrap all changes in a single edit operation.
Obtains the starting caret position by calling the GetCaretPos method on the IVsTextView object. This is where the new text is to be inserted.
Calls the RefreshLine method to obtain the current line of text to change.
Sets the internal caret position to 0. This reflects the offset from the starting caret position as new characters are inserted.
Calls the GetIVsTextMacroHelperIfRecordingOn method on the LanguageService object to cache any active macro recorder.
.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.