Table of Contents

Class HostedServiceBase

Namespace
Oqtane.Infrastructure
Assembly
Oqtane.Server.dll
public abstract class HostedServiceBase
Inheritance
HostedServiceBase
Derived

Constructors

HostedServiceBase(IServiceScopeFactory)

public HostedServiceBase(IServiceScopeFactory serviceScopeFactory)

Parameters

serviceScopeFactory IServiceScopeFactory

Properties

EndDate

public DateTime? EndDate { get; set; }

Property Value

DateTime?

Frequency

public string Frequency { get; set; }

Property Value

string

Interval

public int Interval { get; set; }

Property Value

int

IsEnabled

public bool IsEnabled { get; set; }

Property Value

bool

Name

public string Name { get; set; }

Property Value

string

RetentionHistory

public int RetentionHistory { get; set; }

Property Value

int

StartDate

public DateTime? StartDate { get; set; }

Property Value

DateTime?

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

ExecuteAsync(CancellationToken)

protected Task ExecuteAsync(CancellationToken stoppingToken)

Parameters

stoppingToken CancellationToken

Returns

Task

ExecuteJob(IServiceProvider)

public virtual string ExecuteJob(IServiceProvider provider)

Parameters

provider IServiceProvider

Returns

string

ExecuteJobAsync(IServiceProvider)

public virtual Task<string> ExecuteJobAsync(IServiceProvider provider)

Parameters

provider IServiceProvider

Returns

Task<string>

StartAsync(CancellationToken)

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

public Task StartAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Indicates that the start process has been aborted.

Returns

Task

A Task that represents the asynchronous Start operation.

StopAsync(CancellationToken)

Triggered when the application host is performing a graceful shutdown.

public Task StopAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Indicates that the shutdown process should no longer be graceful.

Returns

Task

A Task that represents the asynchronous Stop operation.