Esempio n. 1
0
        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();
            }
        }
Esempio n. 2
0
        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;
            });
        }