mirror of
https://github.com/BililiveRecorder/BililiveRecorder.git
synced 2024-11-16 19:57:27 +08:00
24 lines
768 B
C#
24 lines
768 B
C#
using Autofac;
|
|
using BililiveRecorder.Core.Config;
|
|
using System.Net.Sockets;
|
|
|
|
namespace BililiveRecorder.Core
|
|
{
|
|
public class CoreModule : Module
|
|
{
|
|
public CoreModule()
|
|
{
|
|
|
|
}
|
|
|
|
protected override void Load(ContainerBuilder builder)
|
|
{
|
|
builder.RegisterType<ConfigV1>().AsSelf().InstancePerMatchingLifetimeScope("recorder_root");
|
|
builder.RegisterType<TcpClient>().AsSelf().ExternallyOwned();
|
|
builder.RegisterType<StreamMonitor>().As<IStreamMonitor>().ExternallyOwned();
|
|
builder.RegisterType<RecordedRoom>().As<IRecordedRoom>().ExternallyOwned();
|
|
builder.RegisterType<Recorder>().As<IRecorder>().InstancePerMatchingLifetimeScope("recorder_root");
|
|
}
|
|
}
|
|
}
|