Coree.NETStandard
  • API
Show / Hide Table of Contents
  • Coree.NETStandard.Abstractions
    • DependencySingleton<T>
    • FluentBase
    • IDependencySingleton
    • IFluentBase
  • Coree.NETStandard.Classes
    • ThreadSafeCollection<T>
    • ThreadSafeValue<T>
  • Coree.NETStandard.CoreeHttpClient
    • CoreeHttpClient
    • CoreeHttpClient2
    • HttpHeadersExtensions
    • HttpRequestHeadersExtensions
    • HttpResponseResult
    • HttpResponseResult.OperationStatus
    • HttpResponseResult2
    • HttpResponseResult2.OperationStatus
    • ICoreeHttpClient
    • Product
    • ProductExtensions
    • RequestContentBuilder
    • RequestParamBuilder
    • ServiceCollectionExtensions
    • UriExtensions
  • Coree.NETStandard.Extensions
    • BoolExtensions
    • CancellationTokenExtensions
    • EnumerableStringExtension
    • EnumerableTExtension
    • HostApplicationBuilderExtensions
    • ServiceProviderExtensions
    • StringBuilderExtension
    • StringsExtensions
  • Coree.NETStandard.HostedServicesCollection
    • HostedServicesCollectionConfig<T>
    • IHostedServicesCollectionConfig<T>
    • ServiceCollectionExtensions
    • ServiceProviderExtensions
  • Coree.NETStandard.Serilog
    • ConditionalLevelSink
    • LoggerSinkConfigurationExtensions
    • OutputTemplates
    • ServiceCollectionExtensions
    • SourceContextShortEnricher
  • Coree.NETStandard.Services
    • IRuntimeInsights
    • RuntimeInsightsService
  • Coree.NETStandard.Services.File
    • FileService
    • IFileService
  • Coree.NETStandard.Services.Process
    • IProcessService
    • ProcessRunExitCodeState
    • ProcessRunResult
    • ProcessService
  • Coree.NETStandard.Services.RuntimeInsights
    • IRuntimeInsightsService
    • RuntimeInsightsService
  • Coree.NETStandard.SpectreConsole
    • CommandAppExtensions
    • HostBuilderExtensions
    • ServiceCollectionExtensions
    • SpectreConsoleHostedService
    • SpectreConsoleHostedService.ExitCode
    • SpectreConsoleTypeRegistrar
    • SpectreConsoleTypeResolver
  • Coree.NETStandard.Utilities
    • MainContext

Class HostedServiceSampleImplementation

Inheritance
object
HostedServiceSampleImplementation
Implements
IHostedService
Namespace: Coree.NETStandard.HostedService
Assembly: Coree.NETStandard.dll
Syntax
public class HostedServiceSampleImplementation : IHostedService

Constructors

| Edit this page View Source

HostedServiceSampleImplementation(IHostedServicesCollectionOptionsProvider<HostedServiceSampleImplementationOptions>, ILogger<HostedServiceSampleImplementation>)

Declaration
public HostedServiceSampleImplementation(IHostedServicesCollectionOptionsProvider<HostedServiceSampleImplementationOptions> optionsList, ILogger<HostedServiceSampleImplementation> logger)
Parameters
Type Name Description
IHostedServicesCollectionOptionsProvider<HostedServiceSampleImplementationOptions> optionsList
ILogger<HostedServiceSampleImplementation> logger

Methods

| Edit this page View Source

StartAsync(CancellationToken)

Triggered when the application host is ready to start the service.

Declaration
public Task StartAsync(CancellationToken cancellationToken)
Parameters
Type Name Description
CancellationToken cancellationToken

Indicates that the start process has been aborted.

Returns
Type Description
Task

A Task that represents the asynchronous Start operation.

| Edit this page View Source

StopAsync(CancellationToken)

Triggered when the application host is performing a graceful shutdown.

Declaration
public Task StopAsync(CancellationToken cancellationToken)
Parameters
Type Name Description
CancellationToken cancellationToken

Indicates that the shutdown process should no longer be graceful.

Returns
Type Description
Task

A Task that represents the asynchronous Stop operation.

Implements

IHostedService
  • Edit this page
  • View Source
In this article
Back to top