Compartilhar via


EditArray Constructor

Initializes a new instance of the EditArray class using a Source object and an IVsTextView object.

Namespace:  Microsoft.VisualStudio.Package
Assemblies:   Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.12.0 (in Microsoft.VisualStudio.Package.LanguageService.12.0.dll)
  Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.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 Sub New ( _
    source As Source, _
    view As IVsTextView, _
    merge As Boolean, _
    description As String _
)
public EditArray(
    Source source,
    IVsTextView view,
    bool merge,
    string description
)
public:
EditArray(
    Source^ source, 
    IVsTextView^ view, 
    bool merge, 
    String^ description
)
new : 
        source:Source * 
        view:IVsTextView * 
        merge:bool * 
        description:string -> EditArray
public function EditArray(
    source : Source, 
    view : IVsTextView, 
    merge : boolean, 
    description : String
)

Parameters

  • merge
    Type: Boolean

    [in] true if the edits are to be merged where possible, otherwise false.

  • description
    Type: String

    [in] The description of the edit operations.

Remarks

This constructor calls the other EditArray.#ctor constructor to process the source, merge, and description parameters. This constructor then calls the GetSelectionSpan method on the IVsTextView object to obtain the current selection. This selection is restored after the edit operations are complete.

When this constructor is used, a CompoundViewAction class is instantiated to apply the edit operations to the view. This allows the view to optimize the edit operations.

.NET Framework Security

See Also

Reference

EditArray Class

Microsoft.VisualStudio.Package Namespace