public IDeadManSwitchSession Create(DeadManSwitchOptions deadManSwitchOptions)
        {
            var deadManSwitchContext   = new DeadManSwitchContext(deadManSwitchOptions);
            var deadManSwitch          = new DeadManSwitch(deadManSwitchContext, _loggerFactory.CreateLogger <DeadManSwitch>());
            var deadManSwitchTriggerer = new DeadManSwitchTriggerer(deadManSwitchContext, deadManSwitchOptions, _loggerFactory.CreateLogger <DeadManSwitchTriggerer>());
            var deadManSwitchWatcher   =
                new DeadManSwitchWatcher(deadManSwitchContext, deadManSwitchOptions, deadManSwitchTriggerer, _loggerFactory.CreateLogger <DeadManSwitchWatcher>());

            return(new DeadManSwitchSession(deadManSwitchContext, deadManSwitch, deadManSwitchWatcher));
        }
예제 #2
0
 public void Dispose()
 {
     DeadManSwitchContext.Dispose();
 }