BackgroundService クラス
定義
長期 IHostedService を実装するための基底クラス。Base class for implementing a long running IHostedService.
public ref class BackgroundService abstract : IDisposable, Microsoft::Extensions::Hosting::IHostedService
public abstract class BackgroundService : IDisposable, Microsoft.Extensions.Hosting.IHostedService
type BackgroundService = class
interface IHostedService
interface IDisposable
Public MustInherit Class BackgroundService
Implements IDisposable, IHostedService
- 継承
-
BackgroundService
- 実装
コンストラクター
BackgroundService() |
メソッド
Dispose() |
アンマネージ リソースの解放またはリセットに関連付けられているアプリケーション定義のタスクを実行します。Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. |
Equals(Object) |
指定されたオブジェクトが現在のオブジェクトと等しいかどうかを判断します。Determines whether the specified object is equal to the current object. (継承元 Object) |
ExecuteAsync(CancellationToken) |
このメソッドは、IHostedService が開始するときに呼び出されます。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. |
GetHashCode() |
既定のハッシュ関数として機能します。Serves as the default hash function. (継承元 Object) |
GetType() |
現在のインスタンスの Type を取得します。Gets the Type of the current instance. (継承元 Object) |
MemberwiseClone() |
現在の Object の簡易コピーを作成します。Creates a shallow copy of the current Object. (継承元 Object) |
StartAsync(CancellationToken) |
アプリケーション ホストでサービスを開始する準備ができたときにトリガーされます。Triggered when the application host is ready to start the service. |
StopAsync(CancellationToken) |
アプリケーション ホストが正常なシャットダウンを実行しているときにトリガーされます。Triggered when the application host is performing a graceful shutdown. |
ToString() |
現在のオブジェクトを表す文字列を返します。Returns a string that represents the current object. (継承元 Object) |