private void OnCoreCommandTimedOut(object sender, TimeoutActionEventArgs args) { Log.Debug("Core command {command} timed out", args.Command); if (args.Command == CommandType.Shutdown) { args.Action = TimeoutAction.Cancel; AfterShutdown(); } }
private Func <TimeoutAction> CreateTimeoutHandler(CommandType type) { return(() => { Log.Debug("Timeout occured for command: {command}", type); var args = new TimeoutActionEventArgs(type); CommandTimedOut?.Invoke(this, args); return args.Action; }); }