private static void Main() { var collection = new SentMessageCollection(); collection.Initialize(1000); //foreach (var item in collection) //{ // Console.WriteLine(item); //} //get all telegrams var actualTelegram = collection.List.Count(a => a.Operator == MobileOperator.Telegram); var count = 0; var telegramIterator = new TelegramIterator(collection); while (telegramIterator.HasNext()) { var item = telegramIterator.Next(); Console.WriteLine(item); count++; } Console.WriteLine($"actual:{actualTelegram} - iterator:{count}"); //get all for acc-2 var itr = new AccountFilterIterator(collection); //get all for date 2019-05-09 }
public TelegramIterator(SentMessageCollection collection) { _collection = collection; }
// Where(w=>w.Target == "acc-2") public AccountFilterIterator(SentMessageCollection collection) { _collection = collection; }