37 lines
948 B
C#
37 lines
948 B
C#
using System;
|
|
using JD.Shotgun.Service;
|
|
using JD.Shotgun.WPF.Settings;
|
|
using Plume.Interfaces.Application;
|
|
using Plume.Interfaces.Modules;
|
|
using Plume.Interfaces.WPF.Modules;
|
|
|
|
namespace JD.Shotgun.WPF
|
|
{
|
|
[NeededService(ServiceType = typeof(IShotgunService))]
|
|
public class ShotgunModule : IWpfModule
|
|
{
|
|
/// <inheritdoc />
|
|
public void Dispose()
|
|
{
|
|
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public void Setup(IModuleSetup setup)
|
|
{
|
|
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public void Initialize(IWpfModuleContext context)
|
|
{
|
|
var shotgunService = context.ServiceManager.Get<IShotgunService>();
|
|
if (shotgunService == null)
|
|
{
|
|
throw new ArgumentException($"Unable to find a valid {nameof(IShotgunService)}.");
|
|
}
|
|
|
|
context.SettingsManager.Register<ShotgunSettings>("Shotgun");
|
|
}
|
|
}
|
|
}
|