Esempio n. 1
0
        public async Task ChangeStatus(bool isRunning)
        {
            var name = await _twitter.GetName();

            if (isRunning && name.EndsWith(_underMaintenanceSuffix))
            {
                name = name.Replace(_underMaintenanceSuffix, "");
            }

            if (!isRunning && !name.EndsWith(_underMaintenanceSuffix))
            {
                name += _underMaintenanceSuffix;
            }

            await _twitter.SetName(name);
        }
Esempio n. 2
0
 public static InfoPrinter GetInfoPrinter(ITwitter twitter) => new InfoPrinter(twitter.GetName(), twitter.GetAge(), twitter.GetFriendsCount());