public DefaultMessageBusAdapter(ILoggerFactory loggerFactory, IMessageBus bus, ISopiApplicationLifetime applicationLifetime, ILockProvider lockProvider) { if (loggerFactory == null) { throw new ArgumentNullException(nameof(loggerFactory)); } _logger = loggerFactory.CreateLogger(GetType()); _bus = bus ?? throw new ArgumentNullException(nameof(bus)); _applicationLifetime = applicationLifetime; _lockProvider = lockProvider; }
public ActionResult <string> PostStop( [FromServices] ISopiApplicationLifetime lifetime) { lifetime.Stop(); return("ok"); }
public SopiLifetimeMiddleware(RequestDelegate next, ILogger <SopiLifetimeMiddleware> logger, ISopiApplicationLifetime lifetime) { _next = next ?? throw new ArgumentNullException(nameof(next)); _logger = logger; _lifetime = lifetime; }