mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-19 06:17:43 +01:00
Remove InitialiationTask from interface
This commit is contained in:
parent
da969dec5c
commit
a3217bb86d
2 changed files with 11 additions and 17 deletions
|
|
@ -81,7 +81,9 @@ internal sealed class GameConfig : IServiceType, IGameConfig, IDisposable
|
|||
public event EventHandler<ConfigChangeEvent>? UiControlChanged;
|
||||
#pragma warning restore 67
|
||||
|
||||
/// <inheritdoc/>
|
||||
/// <summary>
|
||||
/// Gets a task representing the initialization state of this class.
|
||||
/// </summary>
|
||||
public Task InitializationTask => this.tcsInitialization.Task;
|
||||
|
||||
/// <inheritdoc/>
|
||||
|
|
@ -251,13 +253,15 @@ internal class GameConfigPluginScoped : IDisposable, IServiceType, IGameConfig
|
|||
[ServiceManager.ServiceDependency]
|
||||
private readonly GameConfig gameConfigService = Service<GameConfig>.Get();
|
||||
|
||||
private readonly Task initializationTask;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GameConfigPluginScoped"/> class.
|
||||
/// </summary>
|
||||
internal GameConfigPluginScoped()
|
||||
{
|
||||
this.gameConfigService.Changed += this.ConfigChangedForward;
|
||||
this.InitializationTask = this.gameConfigService.InitializationTask.ContinueWith(
|
||||
this.initializationTask = this.gameConfigService.InitializationTask.ContinueWith(
|
||||
r =>
|
||||
{
|
||||
if (!r.IsCompletedSuccessfully)
|
||||
|
|
@ -281,9 +285,6 @@ internal class GameConfigPluginScoped : IDisposable, IServiceType, IGameConfig
|
|||
/// <inheritdoc/>
|
||||
public event EventHandler<ConfigChangeEvent>? UiControlChanged;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public Task InitializationTask { get; }
|
||||
|
||||
/// <inheritdoc/>
|
||||
public GameConfigSection System => this.gameConfigService.System;
|
||||
|
||||
|
|
@ -297,7 +298,7 @@ internal class GameConfigPluginScoped : IDisposable, IServiceType, IGameConfig
|
|||
public void Dispose()
|
||||
{
|
||||
this.gameConfigService.Changed -= this.ConfigChangedForward;
|
||||
this.InitializationTask.ContinueWith(
|
||||
this.initializationTask.ContinueWith(
|
||||
r =>
|
||||
{
|
||||
if (!r.IsCompletedSuccessfully)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue