ITextBufferEdit::Apply Method ()
Visual Studio 2015
Commits all the modifications made with this ITextBufferEdit object to the underlying ITextBuffer. It also causes the ITextBuffer to generate a new snapshot and raise its Changed event if any modifications were made.
Assembly: Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)
Return Value
Type: Microsoft.VisualStudio.Text::ITextSnapshot^A snapshot of the state of the ITextBuffer after the change is applied. If there was no change, or edit was canceled, no new snapshot will be generated, and the previous snapshot will be returned.
| Exception | Condition |
|---|---|
| InvalidOperationException |
Canceled may be true after this method returns if a handler of the buffer's Changing event canceled the change.
This method may be called only once. After it is called, any other calls on this object (other than Dispose) will result in an InvalidOperationException.
Show: