Table of Contents

Class PluginLifecycleHostedService

Namespace
JD.AI.Core.Plugins
Assembly
JD.AI.Core.dll

Loads enabled plugins at host startup.

public sealed class PluginLifecycleHostedService : IHostedService
Inheritance
PluginLifecycleHostedService
Implements
Inherited Members

Constructors

PluginLifecycleHostedService(IPluginLifecycleManager, ILogger<PluginLifecycleHostedService>)

public PluginLifecycleHostedService(IPluginLifecycleManager manager, ILogger<PluginLifecycleHostedService> logger)

Parameters

manager IPluginLifecycleManager
logger ILogger<PluginLifecycleHostedService>

Methods

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.