Esempio n. 1
0
        public override SignatureHelpState GetCurrentArgumentState(SyntaxNode root, int position, ISyntaxFactsService syntaxFacts, TextSpan currentSpan, CancellationToken cancellationToken)
        {
            if (GetOuterMostTupleExpressionInSpan(root, position, syntaxFacts, currentSpan, cancellationToken, out var expression))
            {
                return(CommonSignatureHelpUtilities.GetSignatureHelpState(expression, position,
                                                                          getOpenToken: s_getOpenToken,
                                                                          getCloseToken: s_getCloseToken,
                                                                          getArgumentsWithSeparators: s_getArgumentsWithSeparators,
                                                                          getArgumentNames: s_getArgumentNames));
            }

            if (GetOuterMostParenthesizedExpressionInSpan(root, position, syntaxFacts, currentSpan, cancellationToken, out var parenthesizedExpression))
            {
                if (currentSpan.Start == parenthesizedExpression.SpanStart)
                {
                    return(new SignatureHelpState(
                               argumentIndex: 0,
                               argumentCount: 0,
                               argumentName: string.Empty,
                               argumentNames: null));
                }
            }

            return(null);
        }
Esempio n. 2
0
 internal static SignatureHelpState GetSignatureHelpState(AttributeArgumentListSyntax argumentList, int position)
 {
     return(CommonSignatureHelpUtilities.GetSignatureHelpState(
                argumentList, position,
                s_getAttributeArgumentListOpenToken,
                s_getAttributeArgumentListCloseToken,
                s_getAttributeArgumentListArgumentsWithSeparators,
                s_getAttributeArgumentListNames));
 }
Esempio n. 3
0
 internal static SignatureHelpState GetSignatureHelpState(InitializerExpressionSyntax argumentList, int position)
 {
     return(CommonSignatureHelpUtilities.GetSignatureHelpState(
                argumentList, position,
                s_getInitializerExpressionOpenToken,
                s_getInitializerExpressionCloseToken,
                s_getInitializerExpressionArgumentsWithSeparators,
                s_getInitializerExpressionNames));
 }