public void SetInterval(string[] args) { if (args.Length > 0 && int.Parse(args[0]) < 15) { Console.WriteLine("Minimum interval is 15 minutes"); } else { _intervalInMinutes = args.Length > 0 ? int.Parse(args[0]) : 0; var options = _store.Read <Options>("Options"); options.Interval = _intervalInMinutes; _store.Write("Options", options); Console.WriteLine("Interval changed"); } }
public void SetDefaultSite(string[] args) { if (args.Length < 1) { Console.WriteLine("Site name required"); } else { _questions.Site = args[0]; var options = _store.Read <Options>("Options"); options.DefaultSite = args[0]; _store.Write("Options", options); Console.WriteLine("Default Site changed"); } }