IBraceCompletionSessionProvider.TryCreateSession, méthode
If appropriate, creates an IBraceCompletionSession based on the language context at the openingPoint.
Espace de noms : Microsoft.VisualStudio.Text.BraceCompletion
Assembly : Microsoft.VisualStudio.Text.UI (dans Microsoft.VisualStudio.Text.UI.dll)
Syntaxe
'Déclaration
Function TryCreateSession ( _
textView As ITextView, _
openingPoint As SnapshotPoint, _
openingBrace As Char, _
closingBrace As Char, _
<OutAttribute> ByRef session As IBraceCompletionSession _
) As Boolean
bool TryCreateSession(
ITextView textView,
SnapshotPoint openingPoint,
char openingBrace,
char closingBrace,
out IBraceCompletionSession session
)
bool TryCreateSession(
ITextView^ textView,
SnapshotPoint openingPoint,
wchar_t openingBrace,
wchar_t closingBrace,
[OutAttribute] IBraceCompletionSession^% session
)
abstract TryCreateSession :
textView:ITextView *
openingPoint:SnapshotPoint *
openingBrace:char *
closingBrace:char *
session:IBraceCompletionSession byref -> bool
function TryCreateSession(
textView : ITextView,
openingPoint : SnapshotPoint,
openingBrace : char,
closingBrace : char,
session : IBraceCompletionSession
) : boolean
Paramètres
textView
Type : Microsoft.VisualStudio.Text.Editor.ITextViewThe view containing the openingPoint.
openingPoint
Type : Microsoft.VisualStudio.Text.SnapshotPointThe insertion point of the openingBrace within the subject buffer. The content type of the subject buffer must match one of the [ContentType] attributes for this extension.
openingBrace
Type : CharThe opening brace that has been typed by the user.
closingBrace
Type : CharThe closing brace character.
session
Type : Microsoft.VisualStudio.Text.BraceCompletion.IBraceCompletionSession%The brace completion session, if it has been created.
Valeur de retour
Type : Boolean
true if the openingPoint was a valid point in the buffer to start a IBraceCompletionSession.
Notes
Opening points within strings and comments are usually invalid points to start an IBraceCompletionSession and return false.
Sécurité .NET Framework
- Confiance totale accordée à l'appelant immédiat. Ce membre ne peut pas être utilisé par du code d'un niveau de confiance partiel. Pour plus d'informations, voir Utilisation de bibliothèques à partir de code d'un niveau de confiance partiel.