public async Task <PlanDef> GetPlanDef(string id) { PlanDef res = new(); var op = _master.AddSynchronousOp(() => { var pd = _master.GetPlanDef(id); if (pd is null) { throw HttpException.NotFound(); } res = new PlanDef(pd); }); await op.WaitAsync(); return(res); }
void selectPlan(string planName) { _currentPlan = _ctrl.GetPlanDef(planName); _ctrl.Send(new Net.SelectPlanMessage(_ctrl.Name, _currentPlan is null ? string.Empty : _currentPlan.Name)); }