Example #1
0
        static public IXor7ExpressionSyntax GetRightHandSideExpression(LocalDeclarationStatementSyntax variableDeclarationSyntax)
        {
            var equalsSyntax = variableDeclarationSyntax.Declaration.Variables.Single().ChildNodes().OfType <EqualsValueClauseSyntax>().Single();
            var valueSyntax  = equalsSyntax.Value;

            return(Xor7ExpressionSyntax.FromExpression(valueSyntax));
        }
Example #2
0
        public static IXor2BodyOfMethod GetBodyOfMethod(MethodDeclarationSyntax methodOfClass)
        {
            if (methodOfClass.Body != null)
            {
                return(new Xor2BodyOfMethod(methodOfClass.Body));
            }
            else
            {
                var expression = methodOfClass.ExpressionBody.Expression;

                var xor5RhsExpression = Xor7ExpressionSyntax.FromExpression(expression);
                return(new Xor2BodyOfMethod(xor5RhsExpression));
            }
        }
Example #3
0
 static public IXor7ExpressionSyntax GetRightHandSideExpression(ReturnStatementSyntax returnSyntax)
 => Xor7ExpressionSyntax.FromExpression(returnSyntax.Expression);
Example #4
0
 static public IXor7ExpressionSyntax GetInvocationTarget(InvocationExpressionSyntax syntax)
 => Xor7ExpressionSyntax.FromExpression(syntax.Expression);
Example #5
0
 static public IXor7ExpressionSyntax GetOwner(MemberAccessExpressionSyntax syntax)
 => Xor7ExpressionSyntax.FromExpression(syntax.Expression);