internal override Expression Convert()
 {
     return(Expression.Switch(
                Type,
                SwitchValue.TryConvert(),
                DefaultBody.TryConvert(),
                SerializableExpressionConverter.Convert(Comparison),
                Cases.Select(c => Expression.SwitchCase(c.Item1.TryConvert(), c.Item2.TryConvert()))));
 }
 public SerializableLoopExpression(LoopExpression expression, SerializableExpressionConverter converter)
     : base(expression)
 {
     Body              = converter.Convert(expression.Body);
     BreakLabelType    = expression.BreakLabel.Type;
     BreakLabelName    = expression.BreakLabel.Name;
     ContinueLabelType = expression.ContinueLabel.Type;
     ContinueLabelName = expression.ContinueLabel.Name;
 }
 internal override Expression Convert()
 {
     return(Expression.MakeBinary(
                NodeType,
                Left.TryConvert(),
                Right.TryConvert(),
                IsLiftedToNull,
                SerializableExpressionConverter.Convert(Method),
                Conversion.TryConvert <LambdaExpression>()));
 }
Exemple #4
0
 public SerializableParameterExpression(ParameterExpression expression, SerializableExpressionConverter converter)
     : base(expression)
 {
     Name = expression.Name;
 }
Exemple #5
0
 public SerializableMemberInitExpression(MemberInitExpression expression, SerializableExpressionConverter converter)
     : base(expression)
 {
     Bindings      = expression.Bindings.Select(converter.Convert).ToList();
     NewExpression = converter.Convert <SerializableNewExpression>(expression.NewExpression);
 }
Exemple #6
0
 public SerializableNewArrayExpression(NewArrayExpression expression, SerializableExpressionConverter converter)
     : base(expression)
 {
     Expressions = converter.Convert(expression.Expressions);
 }
 internal override Expression Convert()
 {
     return(Expression.ListInit(
                NewExpression.TryConvert <NewExpression>(),
                Initializers.Select(i => Expression.ElementInit(SerializableExpressionConverter.Convert(i.Item1), i.Item2.TryConvert()))));
 }
 public SerializableListInitExpression(ListInitExpression expression, SerializableExpressionConverter converter)
     : base(expression)
 {
     Initializers  = expression.Initializers.Select(i => Tuple.Create(converter.Convert(i.AddMethod), converter.Convert(i.Arguments))).ToList();
     NewExpression = converter.Convert <SerializableNewExpression>(expression.NewExpression);
 }
Exemple #9
0
 internal override Expression Convert()
 {
     return(Expression.MakeMemberAccess(
                Expr.TryConvert(),
                SerializableExpressionConverter.Convert(Member)));
 }
 public SerializableUnaryExpression(UnaryExpression expression, SerializableExpressionConverter converter)
     : base(expression)
 {
     Method  = converter.Convert(expression.Method);
     Operand = converter.Convert(expression.Operand);
 }
Exemple #11
0
 public SerializableMemberExpression(MemberExpression expression, SerializableExpressionConverter converter)
     : base(expression)
 {
     Expr   = converter.Convert(expression.Expression);
     Member = converter.Convert(expression.Member);
 }
Exemple #12
0
 public SerializableConstantExpression(ConstantExpression expression, SerializableExpressionConverter converter)
     : base(expression)
 {
     Value = expression.Value;
 }
 public SerializableTypeBinaryExpression(TypeBinaryExpression expression, SerializableExpressionConverter converter)
     : base(expression)
 {
     Expr        = converter.Convert(expression.Expression);
     TypeOperand = expression.TypeOperand;
 }
Exemple #14
0
 public SerializableDefaultExpression(DefaultExpression expression, SerializableExpressionConverter converter)
     : base(expression)
 {
 }
 public SerializableInvocationExpression(InvocationExpression expression, SerializableExpressionConverter converter)
     : base(expression)
 {
     Arguments = converter.Convert(expression.Arguments);
     Expr      = converter.Convert(expression.Expression);
 }
Exemple #16
0
 public SerializableRuntimeVariablesExpression(RuntimeVariablesExpression expression, SerializableExpressionConverter converter)
     : base(expression)
 {
     Variables = converter.Convert <SerializableParameterExpression>(expression.Variables);
 }