Method | Description | |
---|---|---|
ChangeContentType ( IContentType newContentType, object editTag ) : void |
Changes the T:Microsoft.VisualStudio.Utilities.IContentType for this T:Microsoft.VisualStudio.Text.ITextBuffer.
|
|
CheckEditAccess ( ) : bool |
Determines whether edit operations on this text buffer are permitted on the calling thread. If M:Microsoft.VisualStudio.Text.ITextBuffer.TakeThreadOwnership has previously been called, edit operations are permitted only from the same thread that made that call.
|
|
CreateEdit ( ) : ITextEdit |
Creates an T:Microsoft.VisualStudio.Text.ITextEdit object that handles compound edit operations on this buffer. This method is equivalent to CreateEdit(EditOptions.None, null, null). |
|
CreateEdit ( EditOptions options, int reiteratedVersionNumber, object editTag ) : ITextEdit |
Creates an T:Microsoft.VisualStudio.Text.ITextEdit object that handles compound edit operations on this buffer.
|
|
CreateReadOnlyRegionEdit ( ) : IReadOnlyRegionEdit |
Creates an T:Microsoft.VisualStudio.Text.IReadOnlyRegionEdit object that handles adding or removing read-only regions from this buffer.
|
|
Delete ( Span deleteSpan ) : ITextSnapshot |
Deletes a sequence of characters from the buffer. This is a shortcut for creating a new T:Microsoft.VisualStudio.Text.ITextEdit object, using it to delete the text, and then applying it. If the deletion fails on account of a read-only region, the snapshot returned will be the same as the current snapshot of the buffer before the attempted deletion. |
|
GetReadOnlyExtents ( Span span ) : NormalizedSpanCollection |
Gets a list of read-only regions that overlap the given span. This method returns an empty list if there are no read-only regions intersecting the span, or if the span is zero-length. |
|
Insert ( int position, string text ) : ITextSnapshot |
Inserts the given textat the specified positionin the T:Microsoft.VisualStudio.Text.ITextBuffer. This is a shortcut for creating a new T:Microsoft.VisualStudio.Text.ITextEdit object, using it to insert the text, and then applying it. If the insertion fails on account of a read-only region, the snapshot returned will be the same as the current snapshot of the buffer before the attempted insertion. |
|
IsReadOnly ( Span span ) : bool |
Determines whether a text modification or deletion would be prohibited at span due to an T:Microsoft.VisualStudio.Text.IReadOnlyRegion
|
|
IsReadOnly ( Span span, bool isEdit ) : bool |
Determines whether a text modification or deletion would be prohibited at span due to an T:Microsoft.VisualStudio.Text.IReadOnlyRegion
|
|
IsReadOnly ( int position ) : bool |
Determines whether a text insertion would be prohibited at position due to an T:Microsoft.VisualStudio.Text.IReadOnlyRegion.
|
|
IsReadOnly ( int position, bool isEdit ) : bool |
Determines whether a text insertion would be prohibited at position due to an T:Microsoft.VisualStudio.Text.IReadOnlyRegion.
|
|
Replace ( Span replaceSpan, string replaceWith ) : ITextSnapshot |
Replaces a sequence of characters with different text. This is equivalent to first deleting the text to be replaced and then inserting the new text. This is a shortcut for creating a new T:Microsoft.VisualStudio.Text.ITextEdit object, using it to replace the text, and then applying it. If the replacement fails on account of a read-only region, the snapshot returned will be the same as the current snapshot of the buffer before the attempted replacement. |
|
TakeThreadOwnership ( ) : void |
Claims ownership of this buffer for the current thread. All subsequent modifications of this T:Microsoft.VisualStudio.Text.ITextBuffer must be made from the current thread, or else an T:System.InvalidOperationException will be raised.
|
|
TextBufferMock ( string content ) : System |
public ChangeContentType ( IContentType newContentType, object editTag ) : void | ||
newContentType | IContentType | The new |
editTag | object | An arbitrary object that will be associated with this edit transaction. |
return | void |
public CreateEdit ( EditOptions options, int reiteratedVersionNumber, object editTag ) : ITextEdit | ||
options | EditOptions | Options to apply to the compound edit operation. |
reiteratedVersionNumber | int | If not null, indicates that the version to be created by this edit operation is /// the product of an undo or redo operation. |
editTag | object | An arbitrary object that will be associated with this edit transaction. |
return | ITextEdit |
public CreateReadOnlyRegionEdit ( ) : IReadOnlyRegionEdit | ||
return | IReadOnlyRegionEdit |
public Delete ( Span deleteSpan ) : ITextSnapshot | ||
deleteSpan | Span | The span of characters to delete. |
return | ITextSnapshot |
public GetReadOnlyExtents ( Span span ) : NormalizedSpanCollection | ||
span | Span | The span to check for read-only regions. /// |
return | NormalizedSpanCollection |
public Insert ( int position, string text ) : ITextSnapshot | ||
position | int | The buffer position at which the first character of the text will appear. |
text | string | The text to be inserted. |
return | ITextSnapshot |
public IsReadOnly ( Span span ) : bool | ||
span | Span | The span to check. |
return | bool |
public IsReadOnly ( Span span, bool isEdit ) : bool | ||
span | Span | The span to check. |
isEdit | bool | |
return | bool |
public IsReadOnly ( int position ) : bool | ||
position | int | The position of the proposed text insertion. |
return | bool |
public IsReadOnly ( int position, bool isEdit ) : bool | ||
position | int | The position of the proposed text insertion. |
isEdit | bool | |
return | bool |
public Replace ( Span replaceSpan, string replaceWith ) : ITextSnapshot | ||
replaceSpan | Span | The span of characters to replace. |
replaceWith | string | The new text to replace the old. |
return | ITextSnapshot |
public TextBufferMock ( string content ) : System | ||
content | string | |
return | System |