private static IItem CreateItem(int index) { IItem current = null; switch (index) { case 0: current = new SomeItem(); break; case 1: current = new AnotherItem(); break; case 2: current = new YetAnotherItem(); break; case 3: current = new YetAnotherItem(); break; case 4: current = new YetAnotherItem(); break; } return(current); }
private static IItem MoveNext(int state) { IItem current = null; switch (state) { case 0: current = new SomeItem(); break; case 1: current = new AnotherItem(); break; case 2: current = new YetAnotherItem(); break; case 3: current = new YetAnotherItem(); break; case 4: current = new YetAnotherItem(); break; } return(current); }