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 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。