2018-11-22 00:18:42 -05:00
|
|
|
|
using Autofac;
|
|
|
|
|
using OpenDiablo2.Common.Interfaces;
|
2018-12-07 18:45:54 -05:00
|
|
|
|
using OpenDiablo2.Common.Interfaces.Drawing;
|
2018-11-22 00:18:42 -05:00
|
|
|
|
|
|
|
|
|
namespace OpenDiablo2.SDL2_
|
|
|
|
|
{
|
|
|
|
|
public sealed class AutofacModule : Module
|
|
|
|
|
{
|
|
|
|
|
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
|
|
|
|
|
|
|
|
|
protected override void Load(ContainerBuilder builder)
|
|
|
|
|
{
|
|
|
|
|
log.Info("Configuring OpenDiablo2.Core service implementations.");
|
|
|
|
|
|
|
|
|
|
builder.RegisterType<SDL2RenderWindow>().AsImplementedInterfaces().SingleInstance();
|
2018-11-22 02:24:55 -05:00
|
|
|
|
builder.RegisterType<SDL2MusicPlayer>().AsImplementedInterfaces().SingleInstance();
|
2018-11-22 00:18:42 -05:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|