private void Initialize(ElementInit elementInit)
        {
            if (elementInit == null) throw new ArgumentNullException("elementInit");

            AddMethod = new MethodInfoNode(Context, elementInit.AddMethod);
            Arguments = new ExpressionNodeList(Context, elementInit.Arguments);
        }
Exemple #2
0
        public UnaryExpressionNode(UnaryExpression expression, Container container) : base(expression, container)//, [Optional]IExpressionParser parser) : base(expression, parser)
        {
            var expressionParser = container.GetInstance <IExpressionParser>();
            var memberInfoParser = container.GetInstance <IMemberInfoParser>();

            Method  = memberInfoParser.Parse <MethodInfoNode>(expression.Method);
            Operand = expressionParser.Parse(expression.Operand);
        }
Exemple #3
0
        public MethodCallExpressionNode(MethodCallExpression expression, Container container) : base(expression, container)//, [Optional]IExpressionParser parser) : base(expression, parser)
        {
            var expressionParser = container.GetInstance <IExpressionParser>();
            var memberInfoParser = container.GetInstance <IMemberInfoParser>();

            Arguments = expression.Arguments.Select(e => expressionParser.Parse(e)).ToList();
            Object    = expression.Object != null?expressionParser.Parse(expression.Object) : null;

            Method = memberInfoParser.Parse <MethodInfoNode>(expression.Method);
        }
        public BinaryExpressionNode(BinaryExpression expression, Container container) : base(expression, container)//, , [Optional]IExpressionParser parser) : base(expression, parser)
        {
            var expressionParser = container.GetInstance <IExpressionParser>();
            var memberInfoParser = container.GetInstance <IMemberInfoParser>();

            Left        = expressionParser.Parse(expression.Left);
            Right       = expressionParser.Parse(expression.Right);
            Conversion  = expressionParser.Parse <LambdaExpressionNode>(expression.Conversion);
            Method      = memberInfoParser.Parse <MethodInfoNode>(expression.Method);
            IsLifToNull = expression.IsLiftedToNull;
        }