IBraceCompletionContextProvider.TryCreateContext - метод
Creates an IBraceCompletionContext to handle language specific actions such as parsing and formatting.
Пространство имен: Microsoft.VisualStudio.Text.BraceCompletion
Сборка: Microsoft.VisualStudio.Text.UI (в Microsoft.VisualStudio.Text.UI.dll)
Синтаксис
'Декларация
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
Параметры
textView
Тип: Microsoft.VisualStudio.Text.Editor.ITextViewThe view containing the openingPoint.
openingPoint
Тип: Microsoft.VisualStudio.Text.SnapshotPointThe insertion point of the openingBrace.
openingBrace
Тип: CharThe opening brace that has been typed by the user.
closingBrace
Тип: CharThe closing brace character.
context
Тип: Microsoft.VisualStudio.Text.BraceCompletion.IBraceCompletionContext%The brace completion context if it has been created.
Возвращаемое значение
Тип: Boolean
true if the openingPoint was a valid point in the buffer to start a IBraceCompletionSession.
Заметки
Opening points within strings and comments are usually invalid points to start an IBraceCompletionSession and will return false.
Безопасность платформы .NET Framework
- Полное доверие для непосредственно вызывающего метода. Этот член не может быть использован частично доверенным кодом. Для получения дополнительной информации см. Использование библиотек из не вполне надежного кода.
См. также
Ссылки
IBraceCompletionContextProvider Интерфейс
Microsoft.VisualStudio.Text.BraceCompletion - пространство имен