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)

bool IsReadOnly(
	Span span,
	bool isEdit
)

Parameters

span
Type: Microsoft.VisualStudio.Text.Span

The span to check.

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
ArgumentNullException

span is null.

InvalidOperationException

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

ArgumentOutOfRangeException

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

Return to top
Show: