mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-01-02 05:43:40 +01:00
Add IGameLifecycle (#1287)
This commit is contained in:
parent
8a6269c178
commit
0ac5c240f6
2 changed files with 32 additions and 10 deletions
24
Dalamud/Plugin/Services/IGameLifecycle.cs
Normal file
24
Dalamud/Plugin/Services/IGameLifecycle.cs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
using System.Threading;
|
||||
|
||||
namespace Dalamud.Plugin.Services;
|
||||
|
||||
/// <summary>
|
||||
/// Class offering cancellation tokens for common gameplay events.
|
||||
/// </summary>
|
||||
public interface IGameLifecycle
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets a token that is cancelled when Dalamud is unloading.
|
||||
/// </summary>
|
||||
public CancellationToken DalamudUnloadingToken { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a token that is cancelled when the game is shutting down.
|
||||
/// </summary>
|
||||
public CancellationToken GameShuttingDownToken { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a token that is cancelled when a character is logging out.
|
||||
/// </summary>
|
||||
public CancellationToken LogoutToken { get; }
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue