다음을 통해 공유


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

매개 변수

  • openingBrace
    형식: Char

    The opening brace that has been typed by the user.

  • closingBrace
    형식: Char

    The closing brace character.

반환 값

형식: 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 네임스페이스