2018-11-22 00:18:42 -05:00
|
|
|
|
using Autofac;
|
|
|
|
|
using OpenDiablo2.Common.Interfaces;
|
2018-11-22 17:00:22 -05:00
|
|
|
|
using OpenDiablo2.Core.UI;
|
2018-11-22 00:18:42 -05:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace OpenDiablo2.Core
|
|
|
|
|
{
|
|
|
|
|
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<GameEngine>().AsImplementedInterfaces().SingleInstance();
|
|
|
|
|
builder.RegisterType<MPQProvider>().As<IMPQProvider>().SingleInstance();
|
2018-11-22 17:00:22 -05:00
|
|
|
|
|
|
|
|
|
builder.RegisterType<WideButton>().AsSelf().InstancePerRequest();
|
2018-11-22 00:18:42 -05:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|