111,094
社区成员




namespace Microsoft.Extensions.Hosting
{
//
// 摘要:
// Defines methods for objects that are managed by the host.
public interface IHostedService
{
//
// 摘要:
// Triggered when the application host is ready to start the service.
//
// 参数:
// cancellationToken:
// Indicates that the start process has been aborted.
Task StartAsync(CancellationToken cancellationToken);
//
// 摘要:
// Triggered when the application host is performing a graceful shutdown.
//
// 参数:
// cancellationToken:
// Indicates that the shutdown process should no longer be graceful.
Task StopAsync(CancellationToken cancellationToken);
}
}
你要的描述也就只是这个,我有3个插件(service),系统主机(host)启动会根据配置加载他们(host.Builer host.start),他们自己启动会需要自己的参数(Iconfig 和 构造注入)