Example #1
0
        private readonly Expression _arg1, _arg2, _arg3;    // storarg for the 2nd, 3rd, and 4th arguments.

        internal Block4(Expression arg0, Expression arg1, Expression arg2, Expression arg3)
        {
            _arg0 = arg0;
            _arg1 = arg1;
            _arg2 = arg2;
            _arg3 = arg3;
        }
Example #2
0
        private readonly Expression _arg1, _arg2, _arg3, _arg4;     // storage for the 2nd - 5th args.

        internal Block5(Expression arg0, Expression arg1, Expression arg2, Expression arg3, Expression arg4)
        {
            _arg0 = arg0;
            _arg1 = arg1;
            _arg2 = arg2;
            _arg3 = arg3;
            _arg4 = arg4;
        }
Example #3
0
        public int IndexOf(Expression item)
        {
            if (_arg0 == item)
            {
                return(0);
            }

            for (int i = 1; i < _provider.ArgumentCount; i++)
            {
                if (_provider.GetArgument(i) == item)
                {
                    return(i);
                }
            }

            return(-1);
        }
Example #4
0
        public int IndexOf(Expression item)
        {
            if (_arg0 == item)
            {
                return(0);
            }

            for (int i = 1; i < _block.ExpressionCount; i++)
            {
                if (_block.GetExpression(i) == item)
                {
                    return(i);
                }
            }

            return(-1);
        }
Example #5
0
 public void Add(Expression item)
 {
     throw new InvalidOperationException();
 }
Example #6
0
 public void Insert(int index, Expression item)
 {
     throw new InvalidOperationException();
 }
Example #7
0
 internal ListArgumentProvider(IArgumentProvider provider, Expression arg0)
 {
     _provider = provider;
     _arg0     = arg0;
 }
Example #8
0
 public bool Remove(Expression item)
 {
     throw new InvalidOperationException();
 }
Example #9
0
 public bool Contains(Expression item)
 {
     return(IndexOf(item) != -1);
 }
Example #10
0
 public bool Remove(Expression item)
 {
     throw new Exception();
 }
Example #11
0
 public void Add(Expression item)
 {
     throw new Exception();
 }
Example #12
0
 public void Insert(int index, Expression item)
 {
     throw new Exception();
 }
Example #13
0
 internal BlockExpressionList(BlockExpression provider, Expression arg0)
 {
     _block = provider;
     _arg0  = arg0;
 }
Example #14
0
        private readonly Expression _arg1, _arg2;   // storage for the 2nd and 3rd arguments.

        internal Block3(Expression arg0, Expression arg1, Expression arg2)
        {
            _arg0 = arg0;
            _arg1 = arg1;
            _arg2 = arg2;
        }
Example #15
0
        private readonly Expression _arg1;      // storage for the 2nd argument.

        internal Block2(Expression arg0, Expression arg1)
        {
            _arg0 = arg0;
            _arg1 = arg1;
        }