public static ILinqStatement BuildStatement(Expression statement)
        {
            LinqStatementBuilder statementBuilder = new LinqStatementBuilder();

            statementBuilder.Visit(statement);
            return(statementBuilder.statement);
        }
 public TryStatementWithLinqExpressions(TryExpression statement)
 {
     Statement       = statement;
     tryStatements   = LinqStatementBuilder.BuildStatements(statement.Body);
     catchStatements = statement.Handlers.ToArray(@catch => new CatchStatementWithLinqExpressions(@catch));
     if (statement.Finally != null)
     {
         finallyStatement = new FinallyStatementWithLinqExpressions(statement);
     }
 }
 public ForStatementWithLinqExpressions(LoopExpression statement)
 {
     LinqStatement  = statement;
     this.statement = LinqStatementBuilder.BuildStatement(statement.Body);
 }
Esempio n. 4
0
 public CatchStatementWithLinqExpressions(CatchBlock statement)
 {
     Statement  = statement;
     type       = TypeReferenceWithReflectionFactory.CreateReference(statement.Test);
     statements = LinqStatementBuilder.BuildStatements(statement.Body);
 }
 public DefaultCaseStatementWithLinqExpressions(SwitchExpression statement)
 {
     Statement  = statement;
     statements = LinqStatementBuilder.BuildStatements(statement.DefaultBody);
 }
 public FinallyStatementWithLinqExpressions(TryExpression statement)
 {
     statements = LinqStatementBuilder.BuildStatements(statement.Finally);
 }
 public SwitchCaseStatementWithLinqExpressions(SwitchCase statement)
 {
     Statement  = statement;
     matches    = LinqExpressionBuilder.BuildExpressions(statement.TestValues);
     statements = LinqStatementBuilder.BuildStatements(statement.Body);
 }
 public BlockStatementWithLinqExpressions(BlockExpression statement)
 {
     Statement  = statement;
     statements = LinqStatementBuilder.BuildStatements(statement.Expressions);
 }