public override VisualBasicSyntaxNode VisitInvocationExpression(CSS.InvocationExpressionSyntax node)
 {
     return(SyntaxFactory.InvocationExpression(
                (ExpressionSyntax)node.Expression.Accept(this),
                (ArgumentListSyntax)node.ArgumentList.Accept(this)
                ));
 }
Пример #2
0
 public static glsl.InvocationExpressionSyntax Translate(this cs.InvocationExpressionSyntax node)
 {
     return(new glsl.InvocationExpressionSyntax().Update(
                node.Expression.Translate(),
                node.ArgumentList.Translate()
                ));
 }
        private static bool IsCalledFromAddSteps(InvocationExpressionSyntax invocationExpressionNode, SemanticModel semanticModel)
        {
            var containingMethodSyntax = invocationExpressionNode.FirstAncestorOrSelf<MemberDeclarationSyntax>();

            var blockSyntax = (BlockSyntax)containingMethodSyntax.ChildNodes().Last();

            var controlFlow = semanticModel.AnalyzeControlFlow(blockSyntax.Statements.First(), blockSyntax.Statements.Last());

            if (controlFlow.Succeeded)
            {

            }

            var token = containingMethodSyntax.DescendantTokens().FirstOrDefault(f => f.IsKind(SyntaxKind.IdentifierToken));

            return token.Text == "AddSteps";
        }
        public static bool IsDisposeCallFor(this InvocationExpressionSyntax invocationExpressionSyntax, string name)
        {
            var memberAccessExpressionSyntax = invocationExpressionSyntax.Expression as MemberAccessExpressionSyntax;

            return(memberAccessExpressionSyntax != null && memberAccessExpressionSyntax.IsDisposeCallFor(name));
        }
Пример #5
0
 public override MethodParameterLookupBase <CSharpSyntax.ArgumentSyntax> CreateLookup(CSharpSyntax.InvocationExpressionSyntax invocation, IMethodSymbol method) =>
 new CSharpMethodParameterLookup(invocation.ArgumentList, method);
Пример #6
0
 public override CSharpSyntax.ArgumentSyntax[] GetArguments(CSharpSyntax.InvocationExpressionSyntax invocation) =>
 invocation.ArgumentList.Arguments.ToArray();