chore: make all services with interfaces internal

This commit is contained in:
goat 2023-09-17 21:09:00 +02:00
parent ab9b7e1602
commit 5809cf5d7c
No known key found for this signature in database
GPG key ID: 49E2AA8C6A76498B
40 changed files with 67 additions and 86 deletions

View file

@ -5,6 +5,7 @@ using System.IO;
using Dalamud.Data;
using Dalamud.Game.Text.SeStringHandling.Payloads;
using Dalamud.Plugin.Services;
using Newtonsoft.Json;
using Serilog;
@ -27,12 +28,6 @@ public abstract partial class Payload
// To force-invalidate it, Dirty can be set to true
private byte[] encodedData;
/// <summary>
/// Gets the Lumina instance to use for any necessary data lookups.
/// </summary>
[JsonIgnore]
public DataManager DataResolver => Service<DataManager>.Get();
/// <summary>
/// Gets the type of this payload.
/// </summary>
@ -43,6 +38,13 @@ public abstract partial class Payload
/// </summary>
public bool Dirty { get; protected set; } = true;
/// <summary>
/// Gets the Lumina instance to use for any necessary data lookups.
/// </summary>
[JsonIgnore]
// TODO: We should refactor this. It should not be possible to get IDataManager through here.
protected IDataManager DataResolver => Service<DataManager>.Get();
/// <summary>
/// Decodes a binary representation of a payload into its corresponding nice object payload.
/// </summary>