mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-29 11:59:21 +01:00
Implement service locator
This commit is contained in:
parent
06b1163a52
commit
ff1d7f2829
101 changed files with 1614 additions and 1436 deletions
|
|
@ -2,7 +2,6 @@ using System.Collections.Generic;
|
|||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
using Dalamud.Data;
|
||||
using Dalamud.Game.Text.SeStringHandling.Payloads;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
|
|
@ -76,9 +75,8 @@ namespace Dalamud.Game.Text.SeStringHandling
|
|||
/// Creates a SeString from a json. (For testing - not recommended for production use.)
|
||||
/// </summary>
|
||||
/// <param name="json">A serialized SeString produced by ToJson() <see cref="ToJson"/>.</param>
|
||||
/// <param name="dataManager">An initialized instance of DataManager for Lumina queries.</param>
|
||||
/// <returns>A SeString initialized with values from the json.</returns>
|
||||
public static SeString FromJson(string json, DataManager dataManager)
|
||||
public static SeString FromJson(string json)
|
||||
{
|
||||
var s = JsonConvert.DeserializeObject<SeString>(json, new JsonSerializerSettings
|
||||
{
|
||||
|
|
@ -87,11 +85,6 @@ namespace Dalamud.Game.Text.SeStringHandling
|
|||
ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor,
|
||||
});
|
||||
|
||||
foreach (var payload in s.Payloads)
|
||||
{
|
||||
payload.DataResolver = dataManager;
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue