IReadOnlyRegionEdit.CreateReadOnlyRegion Method (Span)
Marks a span of text in this buffer as read-only. The span remains read-only until the IReadOnlyRegion is removed.
Namespace: Microsoft.VisualStudio.Text
Assembly: Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)
Syntax
‘선언
Function CreateReadOnlyRegion ( _
span As Span _
) As IReadOnlyRegion
IReadOnlyRegion CreateReadOnlyRegion(
Span span
)
IReadOnlyRegion^ CreateReadOnlyRegion(
Span span
)
abstract CreateReadOnlyRegion :
span:Span -> IReadOnlyRegion
function CreateReadOnlyRegion(
span : Span
) : IReadOnlyRegion
Parameters
- span
Type: Microsoft.VisualStudio.Text.Span
The span to mark as read-only.
Return Value
Type: Microsoft.VisualStudio.Text.IReadOnlyRegion
The IReadOnlyRegion used to track this read-only region. This object will be used to remove the read-only region.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | span is nulla null reference (Nothing in Visual Basic). |
ArgumentOutOfRangeException | span is past the end of the buffer. |
Remarks
The region is created edge exclusive by default.
.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.