44 lines
No EOL
1.2 KiB
C#
44 lines
No EOL
1.2 KiB
C#
using JD.Remoting;
|
|
using JD.Remoting.Services;
|
|
using Plume.ErrorList;
|
|
using Plume.Interfaces.Modules;
|
|
using Plume.Interfaces.WPF.Modules;
|
|
using Plume.Output;
|
|
|
|
namespace JD.EngineLogger
|
|
{
|
|
public sealed class EngineLoggerModule : IWpfModule
|
|
{
|
|
private ErrorListModule _errorListModule;
|
|
private OutputModule _outputModule;
|
|
private IModuleSetup _setup;
|
|
|
|
public void Dispose()
|
|
{
|
|
_errorListModule?.Dispose();
|
|
_outputModule?.Dispose();
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public void Setup(IModuleSetup setup)
|
|
{
|
|
_setup = setup;
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public void Initialize(IWpfModuleContext context)
|
|
{
|
|
EngineLoggerPlugin plugin = new EngineLoggerPlugin(context.LoggerManager);
|
|
context.ServiceManager.GetPluginService().Register(plugin);
|
|
|
|
_errorListModule = new ErrorListModule();
|
|
_errorListModule.Setup(new ErrorListModuleSetup(plugin.ErrorListProvider));
|
|
_errorListModule.Initialize(context);
|
|
|
|
|
|
_outputModule = new OutputModule();
|
|
_outputModule.Setup(new OutputModuleSetup(plugin.OutputProvider));
|
|
_outputModule.Initialize(context);
|
|
}
|
|
}
|
|
} |