Método IBraceCompletionContextProvider.TryCreateContext
Creates an IBraceCompletionContext to handle language specific actions such as parsing and formatting.
Namespace: Microsoft.VisualStudio.Text.BraceCompletion
Assembly: Microsoft.VisualStudio.Text.UI (em Microsoft.VisualStudio.Text.UI.dll)
Sintaxe
'Declaração
Function TryCreateContext ( _
textView As ITextView, _
openingPoint As SnapshotPoint, _
openingBrace As Char, _
closingBrace As Char, _
<OutAttribute> ByRef context As IBraceCompletionContext _
) As Boolean
bool TryCreateContext(
ITextView textView,
SnapshotPoint openingPoint,
char openingBrace,
char closingBrace,
out IBraceCompletionContext context
)
bool TryCreateContext(
ITextView^ textView,
SnapshotPoint openingPoint,
wchar_t openingBrace,
wchar_t closingBrace,
[OutAttribute] IBraceCompletionContext^% context
)
abstract TryCreateContext :
textView:ITextView *
openingPoint:SnapshotPoint *
openingBrace:char *
closingBrace:char *
context:IBraceCompletionContext byref -> bool
function TryCreateContext(
textView : ITextView,
openingPoint : SnapshotPoint,
openingBrace : char,
closingBrace : char,
context : IBraceCompletionContext
) : boolean
Parâmetros
textView
Tipo: Microsoft.VisualStudio.Text.Editor.ITextViewThe view containing the openingPoint.
openingPoint
Tipo: Microsoft.VisualStudio.Text.SnapshotPointThe insertion point of the openingBrace.
openingBrace
Tipo: CharThe opening brace that has been typed by the user.
closingBrace
Tipo: CharThe closing brace character.
context
Tipo: Microsoft.VisualStudio.Text.BraceCompletion.IBraceCompletionContext%The brace completion context if it has been created.
Valor de retorno
Tipo: Boolean
true if the openingPoint was a valid point in the buffer to start a IBraceCompletionSession.
Comentários
Opening points within strings and comments are usually invalid points to start an IBraceCompletionSession and will return false.
Segurança do .NET Framework
- Confiança total para o chamador imediato. O membro não pode ser usado por código parcialmente confiável. Para obter mais informações, consulte Usando bibliotecas de código parcialmente confiável.