ITextBuffer.IsReadOnly Method (Span, Boolean)

Determines whether a text modification or deletion would be prohibited at span due to an IReadOnlyRegion.

Namespace:  Microsoft.VisualStudio.Text
Assembly:  Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)


Function IsReadOnly ( _
    span As Span, _
    isEdit As Boolean _
) As Boolean
bool IsReadOnly(
    Span span,
    bool isEdit
bool IsReadOnly(
    Span span, 
    bool isEdit
abstract IsReadOnly : 
        span:Span * 
        isEdit:bool -> bool 
function IsReadOnly(
    span : Span, 
    isEdit : boolean
) : boolean


  • isEdit
    Type: System.Boolean
    true if this check is part of an edit. false for a query without side effects.

Return Value

Type: System.Boolean
true if the entire span could be deleted or replaced, false otherwise.


Exception Condition

span is nulla null reference (Nothing in Visual Basic).


TakeThreadOwnership has previously been called, and this call is being made from a different thread.


The End property of span is greater than the length of CurrentSnapshot.

.NET Framework Security

See Also


ITextBuffer Interface

IsReadOnly Overload

Microsoft.VisualStudio.Text Namespace