Load services asynchronously whenever possible (#893)

This commit is contained in:
kizer 2022-06-25 05:12:51 +09:00 committed by GitHub
parent fba8c7163c
commit 8e7f370ddd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
66 changed files with 959 additions and 899 deletions

View file

@ -14,17 +14,15 @@ namespace Dalamud.Game.ClientState.JobGauge
/// </summary>
[PluginInterface]
[InterfaceVersion("1.0")]
[ServiceManager.BlockingEarlyLoadedService]
public class JobGauges
{
private Dictionary<Type, JobGaugeBase> cache = new();
/// <summary>
/// Initializes a new instance of the <see cref="JobGauges"/> class.
/// </summary>
/// <param name="addressResolver">Address resolver with the JobGauge memory location(s).</param>
public JobGauges(ClientStateAddressResolver addressResolver)
[ServiceManager.ServiceConstructor]
private JobGauges(ClientState clientState)
{
this.Address = addressResolver.JobGaugeData;
this.Address = clientState.AddressResolver.JobGaugeData;
Log.Verbose($"JobGaugeData address 0x{this.Address.ToInt64():X}");
}