2018-10-25 19:20:23 +08:00
|
|
|
|
using Autofac;
|
2018-11-01 23:40:50 +08:00
|
|
|
|
using BililiveRecorder.Core.Config;
|
2018-10-29 02:13:54 +08:00
|
|
|
|
using System.Net.Sockets;
|
2018-10-25 19:20:23 +08:00
|
|
|
|
|
|
|
|
|
namespace BililiveRecorder.Core
|
|
|
|
|
{
|
|
|
|
|
public class CoreModule : Module
|
|
|
|
|
{
|
|
|
|
|
public CoreModule()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void Load(ContainerBuilder builder)
|
|
|
|
|
{
|
2018-11-01 23:40:50 +08:00
|
|
|
|
builder.RegisterType<ConfigV1>().AsSelf().InstancePerMatchingLifetimeScope("recorder_root");
|
2018-10-29 02:13:54 +08:00
|
|
|
|
builder.RegisterType<TcpClient>().AsSelf().ExternallyOwned();
|
2018-11-24 23:45:08 +08:00
|
|
|
|
builder.RegisterType<StreamMonitor>().As<IStreamMonitor>().ExternallyOwned();
|
|
|
|
|
builder.RegisterType<RecordedRoom>().As<IRecordedRoom>().ExternallyOwned();
|
2018-11-28 22:29:35 +08:00
|
|
|
|
builder.RegisterType<Recorder>().As<IRecorder>().InstancePerMatchingLifetimeScope("recorder_root");
|
2018-10-25 19:20:23 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|