Class ServerHeartbeatTimer
Saves the last time the server was able to write to a file every 10 seconds. Used to fix sessions that don't get ended properly.
public class ServerHeartbeatTimer : IHostedService, IDisposable
- Inheritance
-
ServerHeartbeatTimer
- Implements
- Inherited Members
Constructors
ServerHeartbeatTimer(ILoopTickerFactory, ILogger<ServerHeartbeatTimer>)
public ServerHeartbeatTimer(ILoopTickerFactory tickerFactory, ILogger<ServerHeartbeatTimer> logger)
Parameters
tickerFactoryILoopTickerFactoryloggerILogger<ServerHeartbeatTimer>
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
GetLastBeat()
public DateTimeOffset? GetLastBeat()