public static AgentControlTask Start(IApplicationContext C, IServiceAgent Agent) { var systemTask = task(() => { try { Agent.Start(); } catch (Exception e) { var message = AppMessage.Error(e); C.Notify(message); return(message); } return(inform("Complete")); }); return(new AgentControlTask(C, Agent, systemTask)); }