Example #1
0
        public void Malformed()
        {
            var asWhere = new WhereEnumerable <int, EmptyEnumerable <int>, EmptyEnumerator <int> >();

            try
            {
                asWhere.Select(x => x);
                Assert.Fail();
            }
            catch (ArgumentException exc)
            {
                Assert.AreEqual("source", exc.ParamName);
            }
        }
Example #2
0
        public void Malformed()
        {
            // where
            {
                var foo = new WhereEnumerable <int, EmptyEnumerable <int>, EmptyEnumerator <int> >();

                // simple
                {
                    try
                    {
                        foo.Where(default(Func <int, bool>));
                        Assert.Fail();
                    }
                    catch (ArgumentException exc)
                    {
                        Assert.AreEqual("source", exc.ParamName);
                    }
                }
            }
        }
Example #3
0
 public WhereEnumerator(WhereEnumerable <T> enumerable)
 {
     this.enumerable       = enumerable;
     this.sourceEnumerator = enumerable.source.GetEnumerator();
 }
Example #4
0
 public OrderJob(GameMasterData *master, Turn *turn, NativeEnumerable <Order> orders)
 {
     this.master = master;
     this.turn   = turn;
     this.orders = orders.Where(new TurnIdEquality(turn->TurnId));
 }