Beispiel #1
0
        internal void Execute(ToasterController controller)
        {
            IToasterDataAccessService service = new ToasterDataAccessService();

            controller.Model.Toasters = service.Load();
            controller.ProcessMessage(ToasterAspects.Loaded, null);

            controller.RescheduleTasks();
        }
Beispiel #2
0
        internal void Execute(ToasterController controller, string toast, bool enabled)
        {
            var theToast = controller.Model.Toasters.Single(z => z.Name == toast);

            theToast.EnabledByUser = enabled;

            IToasterDataAccessService service = new ToasterDataAccessService();

            service.Save(controller.Model.Toasters);

            controller.RescheduleTasks();
        }