BlockVoid() static private method

static private BlockVoid ( Expression expressions ) : BlockExpression
expressions Expression
return BlockExpression
Ejemplo n.º 1
0
        public TryStatementBuilder Fault(params Expression[] body)
        {
            ContractUtils.RequiresNotNullItems(body, nameof(body));

            if (_finally != null)
            {
                throw Error.CannotHaveFaultAndFinally();
            }

            if (_fault != null)
            {
                throw Error.FaultAlreadyDefined();
            }

            _fault = body.Length == 1 ? body[0] : Utils.BlockVoid(body);

            return(this);
        }
Ejemplo n.º 2
0
 public TryStatementBuilder Filter(ParameterExpression holder, Expression condition, params Expression[] body)
 {
     return(Filter(holder, condition, Utils.BlockVoid(body)));
 }
Ejemplo n.º 3
0
 public TryStatementBuilder Finally(params Expression[] body)
 {
     return(Finally(Utils.BlockVoid(body)));
 }
Ejemplo n.º 4
0
 public TryStatementBuilder Catch(ParameterExpression holder, params Expression[] body)
 {
     return(Catch(holder, Utils.BlockVoid(body)));
 }
Ejemplo n.º 5
0
 public TryStatementBuilder Filter(Type type, Expression condition, params Expression[] body)
 {
     return(Filter(type, condition, Utils.BlockVoid(body)));
 }
Ejemplo n.º 6
0
 public TryStatementBuilder Catch(Type type, params Expression[] body)
 {
     return(Catch(type, Utils.BlockVoid(body)));
 }
Ejemplo n.º 7
0
 public static TryStatementBuilder Try(params Expression[] body)
 {
     ContractUtils.RequiresNotNull(body, "body");
     return(new TryStatementBuilder(Utils.BlockVoid(body)));
 }
Ejemplo n.º 8
0
 public Expression Else(params Expression[] body)
 {
     ContractUtils.RequiresNotNullItems(body, "body");
     return(Else(Utils.BlockVoid(body)));
 }
Ejemplo n.º 9
0
 public IfStatementBuilder ElseIf(Expression test, params Expression[] body)
 {
     ContractUtils.RequiresNotNullItems(body, "body");
     return(ElseIf(test, Utils.BlockVoid(body)));
 }
Ejemplo n.º 10
0
 public static Expression IfThen(Expression test, params Expression[] body)
 {
     return(IfThenElse(test, Utils.BlockVoid(body), null));
 }