Пример #1
0
        static void Main(string[] args)
        {
            var storage = new InMemoryReminderStorage();
            var item    = new ReminderItem(Guid.NewGuid(), "TeleBot", DateTimeOffset.Now, "Hello man");

            storage.Add(item);
            Console.WriteLine(storage.Get(item.Id));
            storage.Remove(item.Id);
        }
Пример #2
0
        static void Main(string[] args)
        {
            var reminder1 = new ReminderItem(DateTimeOffset.Parse("10.10.2020 8:00"), "Будильник");

            Console.WriteLine(reminder1.WriteProperties());

            var reminder2 = new ReminderItem(DateTimeOffset.Parse("10.10.2020 8:10"), "Повторный будильник");

            Console.WriteLine(reminder2.WriteProperties());
        }
Пример #3
0
        static void Main(string[] args)
        {
            DateTimeOffset datetime = DateTimeOffset.Parse("2020-11-07 13:41");
            ReminderItem   bud1     = new ReminderItem(datetime, "ALARM");

            bud1.WriteProperties();

            DateTimeOffset datetime2 = DateTimeOffset.Parse("2020-11-07 19:32");
            ReminderItem   bud2      = new ReminderItem(datetime2, "ALARM");

            bud2.WriteProperties();
        }
Пример #4
0
        static void Main(string[] args)
        {
            ReminderItem reminder1 = new ReminderItem(
                DateTimeOffset.Parse("2019-04-05 07:00:00"),
                "Первый будильник");

            ReminderItem reminder2 = new ReminderItem(
                DateTimeOffset.Now + TimeSpan.FromSeconds(1),
                "Второй будильник");

            Thread.Sleep(2000);

            reminder1.WriteProperties();
            reminder2.WriteProperties();

            Console.ReadKey();
        }
Пример #5
0
 public PhoneReminderItem(ReminderItem reminder, string phoneNumber)
     : base(reminder.AlarmDate, reminder.AlarmMessage)
 {
     PhoneNumber = phoneNumber;
 }
Пример #6
0
 public ChatReminderItem(ReminderItem reminder, string chatName, string accountName)
     : base(reminder.AlarmDate, reminder.AlarmMessage)
 {
     ChatName    = chatName;
     AccountName = accountName;
 }