mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-11-20 03:16:26 -05:00
20 lines
695 B
C#
20 lines
695 B
C#
using Autofac;
|
|
using OpenDiablo2.Common.Interfaces;
|
|
using OpenDiablo2.Common.Interfaces.Drawing;
|
|
|
|
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();
|
|
builder.RegisterType<SDL2MusicProvider>().AsImplementedInterfaces().SingleInstance();
|
|
}
|
|
}
|
|
}
|