コード例 #1
0
        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
        }
コード例 #2
0
 public TelegramIterator(SentMessageCollection collection)
 {
     _collection = collection;
 }
コード例 #3
0
 // Where(w=>w.Target == "acc-2")
 public AccountFilterIterator(SentMessageCollection collection)
 {
     _collection = collection;
 }