refactor(messagestore): inject IPluginLogProxy for test isolation
MessageStore's Migrate0 (and the Migrate1/2/3 siblings) called Plugin.Log.Information directly, which prevented an isolated xUnit construction test from running — Dalamud.dll cannot load in the test AppDomain. With IPluginLogProxy threaded through the ctor and the inner MessageEnumerator, the whole MessageStore.cs file is now Dalamud-static free and the Build-Suite covers it (Floor 688 -> 690). This is the second half of F12.2; the remaining ~82 Plugin.Log call sites in the rest of the plugin will be routed through the static Plugin.LogProxy wrapper in a follow-up commit.
This commit is contained in:
@@ -52,7 +52,7 @@ internal class MessageManager : IAsyncDisposable
|
||||
{
|
||||
Plugin = plugin;
|
||||
|
||||
Store = new MessageStore(DatabasePath(), Plugin.PlatformUtil);
|
||||
Store = new MessageStore(DatabasePath(), Plugin.PlatformUtil, Plugin.LogProxy);
|
||||
|
||||
PendingMessageThread = new Thread(() =>
|
||||
ProcessPendingMessages(PendingThreadCancellationToken.Token)
|
||||
|
||||
Reference in New Issue
Block a user