mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2025-05-20 18:05:13 -04:00
27 lines
No EOL
870 B
C#
27 lines
No EOL
870 B
C#
using CommonServiceLocator;
|
|
using DiscordChatExporter.Core.Services;
|
|
using GalaSoft.MvvmLight.Ioc;
|
|
|
|
namespace DiscordChatExporter.Cli
|
|
{
|
|
public class Container
|
|
{
|
|
public Container()
|
|
{
|
|
ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default);
|
|
SimpleIoc.Default.Reset();
|
|
|
|
// Services
|
|
SimpleIoc.Default.Register<IDataService, DataService>();
|
|
SimpleIoc.Default.Register<IExportService, ExportService>();
|
|
SimpleIoc.Default.Register<IMessageGroupService, MessageGroupService>();
|
|
SimpleIoc.Default.Register<ISettingsService, SettingsService>();
|
|
SimpleIoc.Default.Register<IUpdateService, UpdateService>();
|
|
}
|
|
|
|
public T Resolve<T>(string key = null)
|
|
{
|
|
return ServiceLocator.Current.GetInstance<T>(key);
|
|
}
|
|
}
|
|
} |