Table of Contents

Class LoggerBackgroundService<TLoggerBuffer>

Namespace
JJMasterData.Commons.Logging
Assembly
JJMasterData.Commons.dll
public abstract class LoggerBackgroundService<TLoggerBuffer> : BackgroundService, IHostedService, IDisposable where TLoggerBuffer : LoggerBuffer

Type Parameters

TLoggerBuffer
Inheritance
LoggerBackgroundService<TLoggerBuffer>
Implements
Derived
Inherited Members

Constructors

LoggerBackgroundService(TLoggerBuffer)

protected LoggerBackgroundService(TLoggerBuffer loggerBuffer)

Parameters

loggerBuffer TLoggerBuffer

Methods

ExecuteAsync(CancellationToken)

This method is called when the IHostedService starts. The implementation should return a task that represents the lifetime of the long running operation(s) being performed.

protected override Task ExecuteAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Returns

Task

A Task that represents the long running operations.

Remarks

See Worker Services in .NET for implementation guidelines.

LogAsync(LogMessage, CancellationToken)

protected abstract Task LogAsync(LogMessage logMessage, CancellationToken cancellationToken)

Parameters

logMessage LogMessage
cancellationToken CancellationToken

Returns

Task