ITextBuffer.IsReadOnly, méthode (Span, Boolean)

Détermine si une modification ou suppression de texte serait interdite au niveau de l'span à cause d'une IReadOnlyRegion.

Espace de noms :  Microsoft.VisualStudio.Text
Assembly :  Microsoft.VisualStudio.Text.Data (dans Microsoft.VisualStudio.Text.Data.dll)

Syntaxe

'Déclaration
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

Paramètres

  • isEdit
    Type : Boolean

    true si ce contrôle fait partie d'une modification. false pour une requête sans effets secondaires.

Valeur de retour

Type : Boolean
true si l'étendue entière a pu être supprimée ou remplacée ; sinon, false.

Exceptions

Exception Condition
ArgumentNullException

span a la valeur nullune référence null (Nothing en Visual Basic).

InvalidOperationException

TakeThreadOwnership a été précédemment appelé, et cet appel est effectué d'un thread différent.

ArgumentOutOfRangeException

La propriété d'End d'span est plus supérieure à la longueur d'CurrentSnapshot.

Sécurité .NET Framework

Voir aussi

Référence

ITextBuffer Interface

IsReadOnly, surcharge

Microsoft.VisualStudio.Text, espace de noms