mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-13 11:27:42 +01:00
Load services asynchronously whenever possible (#893)
This commit is contained in:
parent
fba8c7163c
commit
8e7f370ddd
66 changed files with 959 additions and 899 deletions
|
|
@ -20,15 +20,6 @@ namespace Dalamud.Game
|
|||
/// </summary>
|
||||
protected bool IsResolved { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Setup the resolver, calling the appopriate method based on the process architecture.
|
||||
/// </summary>
|
||||
public void Setup()
|
||||
{
|
||||
var scanner = Service<SigScanner>.Get();
|
||||
this.Setup(scanner);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Setup the resolver, calling the appopriate method based on the process architecture.
|
||||
/// </summary>
|
||||
|
|
@ -55,11 +46,13 @@ namespace Dalamud.Game
|
|||
this.SetupInternal(scanner);
|
||||
|
||||
var className = this.GetType().Name;
|
||||
DebugScannedValues[className] = new List<(string, IntPtr)>();
|
||||
var list = new List<(string, IntPtr)>();
|
||||
lock (DebugScannedValues)
|
||||
DebugScannedValues[className] = list;
|
||||
|
||||
foreach (var property in this.GetType().GetProperties().Where(x => x.PropertyType == typeof(IntPtr)))
|
||||
{
|
||||
DebugScannedValues[className].Add((property.Name, (IntPtr)property.GetValue(this)));
|
||||
list.Add((property.Name, (IntPtr)property.GetValue(this)));
|
||||
}
|
||||
|
||||
this.IsResolved = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue