public SerializableInvocationExpression(InvocationExpression expression, SerializableExpressionConverter converter) : base(expression) { Contract.Requires(expression != null); Contract.Requires(converter != null); Arguments = converter.TryConvert(expression.Arguments); Expr = converter.TryConvert(expression.Expression); }
public SerializableListInitExpression(ListInitExpression expression, SerializableExpressionConverter converter) : base(expression) { Contract.Requires(expression != null); Contract.Requires(converter != null); Initializers = expression.Initializers.Select(i => Tuple.Create(SerializableExpressionConverter.Convert(i.AddMethod), converter.TryConvert(i.Arguments))).ToList(); NewExpression = converter.TryConvert <SerializableNewExpression>(expression.NewExpression); }
public SerializableUnaryExpression(UnaryExpression expression, SerializableExpressionConverter converter) : base(expression) { Contract.Requires(expression != null); Contract.Requires(converter != null); Method = SerializableExpressionConverter.Convert(expression.Method); Operand = converter.TryConvert(expression.Operand); }
public SerializableTypeBinaryExpression(TypeBinaryExpression expression, SerializableExpressionConverter converter) : base(expression) { Contract.Requires(expression != null); Contract.Requires(converter != null); Expr = converter.TryConvert(expression.Expression); TypeOperand = expression.TypeOperand; }
public SerializableConditionalExpression(ConditionalExpression expression, SerializableExpressionConverter converter) : base(expression) { Contract.Requires(expression != null); Contract.Requires(converter != null); IfFalse = converter.TryConvert(expression.IfFalse); IfTrue = converter.TryConvert(expression.IfTrue); Test = converter.TryConvert(expression.Test); }
public SerializableIndexExpression(IndexExpression expression, SerializableExpressionConverter converter) : base(expression) { Contract.Requires(expression != null); Contract.Requires(converter != null); Arguments = converter.TryConvert(expression.Arguments); Indexer = expression.Indexer; Object = converter.TryConvert(expression.Object); }
public SerializableBlockExpression(BlockExpression expression, SerializableExpressionConverter converter) : base(expression) { Contract.Requires(expression != null); Contract.Requires(converter != null); Expressions = converter.TryConvert(expression.Expressions); Result = converter.TryConvert(expression.Result); Variables = converter.TryConvert <SerializableParameterExpression>(expression.Variables); }
public SerializableNewExpression(NewExpression expression, SerializableExpressionConverter converter) : base(expression) { Contract.Requires(expression != null); Contract.Requires(converter != null); Arguments = converter.TryConvert(expression.Arguments); Constructor = expression.Constructor; Members = converter.TryConvert(expression.Members); }
public SerializableMethodCallExpression(MethodCallExpression expression, SerializableExpressionConverter converter) : base(expression) { Contract.Requires(expression != null); Contract.Requires(converter != null); Arguments = converter.TryConvert(expression.Arguments); Method = SerializableExpressionConverter.Convert(expression.Method); Object = converter.TryConvert(expression.Object); }
public SerializableLabelExpression(LabelExpression expression, SerializableExpressionConverter converter) : base(expression) { Contract.Requires(expression != null); Contract.Requires(converter != null); DefaultValue = converter.TryConvert(expression.DefaultValue); TargetName = expression.Target.Name; TargetType = expression.Target.Type; }
public SerializableLambdaExpression(LambdaExpression expression, SerializableExpressionConverter converter) : base(expression) { Contract.Requires(expression != null); Contract.Requires(converter != null); Body = converter.TryConvert(expression.Body); Name = expression.Name; Parameters = converter.TryConvert <SerializableParameterExpression>(expression.Parameters); TailCall = expression.TailCall; }
public SerializableGotoExpression(GotoExpression expression, SerializableExpressionConverter converter) : base(expression) { Contract.Requires(expression != null); Contract.Requires(converter != null); Kind = expression.Kind; TargetName = expression.Target.Name; TargetType = expression.Target.Type; Value = converter.TryConvert(expression.Value); }
public SerializableSwitchExpression(SwitchExpression expression, SerializableExpressionConverter converter) : base(expression) { Contract.Requires(expression != null); Contract.Requires(converter != null); Cases = expression.Cases.Select(c => Tuple.Create(converter.TryConvert(c.Body), converter.TryConvert(c.TestValues))).ToList(); Comparison = SerializableExpressionConverter.Convert(expression.Comparison); DefaultBody = converter.TryConvert(expression.DefaultBody); SwitchValue = converter.TryConvert(expression.SwitchValue); }
public SerializableBinaryExpression(BinaryExpression expression, SerializableExpressionConverter converter) : base(expression) { Contract.Requires(expression != null); Contract.Requires(converter != null); Conversion = converter.TryConvert <SerializableLambdaExpression>(expression.Conversion); IsLiftedToNull = expression.IsLiftedToNull; Left = converter.TryConvert(expression.Left); Method = SerializableExpressionConverter.Convert(expression.Method); Right = converter.TryConvert(expression.Right); }
public SerializableLoopExpression(LoopExpression expression, SerializableExpressionConverter converter) : base(expression) { Contract.Requires(expression != null); Contract.Requires(converter != null); Body = converter.TryConvert(expression.Body); BreakLabelType = expression.BreakLabel.Type; BreakLabelName = expression.BreakLabel.Name; ContinueLabelType = expression.ContinueLabel.Type; ContinueLabelName = expression.ContinueLabel.Name; }
public SerializableTryExpression(TryExpression expression, SerializableExpressionConverter converter) : base(expression) { Body = converter.Convert(expression.Body); Fault = converter.Convert(expression.Fault); Finally = converter.Convert(expression.Finally); Handlers = expression.Handlers .Select(h => Tuple.Create( converter.Convert(h.Body), converter.Convert(h.Filter), h.Test, converter.Convert <SerializableParameterExpression>(h.Variable))) .ToList(); }
public SerializableUnaryExpression(UnaryExpression expression, SerializableExpressionConverter converter) : base(expression) { Method = SerializableExpressionConverter.Convert(expression.Method); Operand = converter.Convert(expression.Operand); }
internal override Expression ConvertBack() => Expression.MakeMemberAccess( Expr.TryConvertBack(), SerializableExpressionConverter.Convert(Member));
public SerializableTypeBinaryExpression(TypeBinaryExpression expression, SerializableExpressionConverter converter) : base(expression) { Expr = converter.Convert(expression.Expression); TypeOperand = expression.TypeOperand; }
public SerializableMemberExpression(MemberExpression expression, SerializableExpressionConverter converter) : base(expression) { Expr = converter.Convert(expression.Expression); Member = converter.Convert(expression.Member); }
internal override Expression ConvertBack() => Expression.Call( Object.TryConvertBack(), SerializableExpressionConverter.Convert(Method), Arguments.TryConvert());
internal override Expression ConvertBack() => Expression.MakeUnary( NodeType, Operand.TryConvertBack(), Type, SerializableExpressionConverter.Convert(Method));
public SerializableMemberInitExpression(MemberInitExpression expression, SerializableExpressionConverter converter) : base(expression) { Bindings = expression.Bindings.Select(converter.Convert).ToList(); NewExpression = converter.Convert <SerializableNewExpression>(expression.NewExpression); }
internal override Expression ConvertBack() => Expression.ListInit( NewExpression.TryConvertBack <NewExpression>(), Initializers.Select(i => Expression.ElementInit(SerializableExpressionConverter.Convert(i.Item1), i.Item2.TryConvert())));
public SerializableInvocationExpression(InvocationExpression expression, SerializableExpressionConverter converter) : base(expression) { Arguments = converter.Convert(expression.Arguments); Expr = converter.Convert(expression.Expression); }
internal override Expression Convert() => Expression.Switch( Type, SwitchValue.TryConvert(), DefaultBody.TryConvert(), SerializableExpressionConverter.Convert(Comparison), Cases.Select(c => Expression.SwitchCase(c.Item1.TryConvert(), c.Item2.TryConvert())));
public SerializableRuntimeVariablesExpression(RuntimeVariablesExpression expression, SerializableExpressionConverter converter) : base(expression) { Contract.Requires(expression != null); Contract.Requires(converter != null); Variables = converter.TryConvert <SerializableParameterExpression>(expression.Variables); }
public SerializableRuntimeVariablesExpression(RuntimeVariablesExpression expression, SerializableExpressionConverter converter) : base(expression) { Variables = converter.Convert <SerializableParameterExpression>(expression.Variables); }
public SerializableNewArrayExpression(NewArrayExpression expression, SerializableExpressionConverter converter) : base(expression) { Expressions = converter.Convert(expression.Expressions); }