次の方法で共有


ITextBuffer.IsReadOnly Method

Definition

Overloads

IsReadOnly(Span)

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

IsReadOnly(Int32)

Determines whether a text insertion would be prohibited at position due to an IReadOnlyRegion.

IsReadOnly(Span, Boolean)

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

IsReadOnly(Int32, Boolean)

Determines whether a text insertion would be prohibited at position due to an IReadOnlyRegion.

IsReadOnly(Span)

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

public:
 bool IsReadOnly(Microsoft::VisualStudio::Text::Span span);
public:
 bool IsReadOnly(Microsoft::VisualStudio::Text::Span span);
bool IsReadOnly(Microsoft::VisualStudio::Text::Span span);
public bool IsReadOnly (Microsoft.VisualStudio.Text.Span span);
abstract member IsReadOnly : Microsoft.VisualStudio.Text.Span -> bool
Public Function IsReadOnly (span As Span) As Boolean

Parameters

span
Span

The span to check.

Returns

true if the entire span could be deleted or replaced, otherwise false.

Exceptions

span is null.

The End property of span is greater than CurrentSnapshot.Length.

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

Applies to

IsReadOnly(Int32)

Determines whether a text insertion would be prohibited at position due to an IReadOnlyRegion.

public:
 bool IsReadOnly(int position);
public:
 bool IsReadOnly(int position);
bool IsReadOnly(int position);
public bool IsReadOnly (int position);
abstract member IsReadOnly : int -> bool
Public Function IsReadOnly (position As Integer) As Boolean

Parameters

position
Int32

The position of the proposed text insertion.

Returns

true if an IReadOnlyRegion would prohibit insertions at this position, otherwise false.

Exceptions

position is negative or greater than CurrentSnapshot.Length.

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

Applies to

IsReadOnly(Span, Boolean)

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

public:
 bool IsReadOnly(Microsoft::VisualStudio::Text::Span span, bool isEdit);
public:
 bool IsReadOnly(Microsoft::VisualStudio::Text::Span span, bool isEdit);
bool IsReadOnly(Microsoft::VisualStudio::Text::Span span, bool isEdit);
public bool IsReadOnly (Microsoft.VisualStudio.Text.Span span, bool isEdit);
abstract member IsReadOnly : Microsoft.VisualStudio.Text.Span * bool -> bool
Public Function IsReadOnly (span As Span, isEdit As Boolean) As Boolean

Parameters

span
Span

The span to check.

isEdit
Boolean

true if this check is part of an edit. false for a query without side effects.

Returns

true if the entire span could be deleted or replaced, false otherwise.

Exceptions

span is null.

The End property of span is greater than CurrentSnapshot.Length.

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

Applies to

IsReadOnly(Int32, Boolean)

Determines whether a text insertion would be prohibited at position due to an IReadOnlyRegion.

public:
 bool IsReadOnly(int position, bool isEdit);
public:
 bool IsReadOnly(int position, bool isEdit);
bool IsReadOnly(int position, bool isEdit);
public bool IsReadOnly (int position, bool isEdit);
abstract member IsReadOnly : int * bool -> bool
Public Function IsReadOnly (position As Integer, isEdit As Boolean) As Boolean

Parameters

position
Int32

The position of the proposed text insertion.

isEdit
Boolean

true if this check is part of an edit. false for a query without side effects.

Returns

true if an IReadOnlyRegion would prohibit insertions at this position, otherwise false.

Exceptions

position is negative or greater than CurrentSnapshot.Length.

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

Applies to