public async Task <IActionResult> Interrupt([FromBody] InterruptArgs args) { if (!await Scheduler.Interrupt(args.Id)) { throw new InvalidOperationException("Cannot interrupt execution " + args.Id); } return(NoContent()); }
public FrameRingPresenter() { VideoStartTimer.Tick += VideoStartTimer_Ticked; IsVisibleChanged += VisibleDpChanged; RingEngine = new RingEngine <IFrameRingEntry>(); RingEngine.CurrentEntryChanged += NextRingElement; RingEngine.BufferedEntryAdded += BufferedEntryAdded; RingEngine.InterruptEntryAvailable += args => { var resultArgs = new InterruptArgs(args.InterruptName); InterruptFrameAvailable?.Invoke(resultArgs); args.Result.RingEntryFrame = resultArgs.Result; }; InitializeComponent(); Loaded += OnLoaded; }