Inheritance: Something
Beispiel #1
0
        public static SubSomething SimpleLoop(IEnumerable <Something> source)
        {
            foreach (Something val in source)
            {
                SubSomething subVal = val as SubSomething;
                if (subVal != null)
                {
                    return(subVal);
                }
            }

            return(null);
        }
Beispiel #2
0
        private static IEnumerable <Something> GenerateTestInput()
        {
            List <Something> data = new List <Something>();

            foreach (int i in Enumerable.Range(0, 1000000))
            {
                Something item = new Something(i.ToString());
                if (i == 999900)
                {
                    item = new SubSomething(i.ToString());
                }
                data.Add(item);
            }
            return(data);
        }
Beispiel #3
0
 protected override bool OutputComparer(SubSomething left, SubSomething right)
 {
     return(left.Id == right.Id);
 }