mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2025-05-23 11:16:59 -04:00
26 lines
No EOL
785 B
C#
26 lines
No EOL
785 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<ISettingsService, SettingsService>();
|
|
SimpleIoc.Default.Register<IUpdateService, UpdateService>();
|
|
}
|
|
|
|
public T Resolve<T>(string key = null)
|
|
{
|
|
return ServiceLocator.Current.GetInstance<T>(key);
|
|
}
|
|
}
|
|
} |