-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCyclePresetModule.cs
More file actions
21 lines (18 loc) · 818 Bytes
/
Copy pathCyclePresetModule.cs
File metadata and controls
21 lines (18 loc) · 818 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
using AssettoServer.Server.Plugin;
using Autofac;
using CyclePresetPlugin.Preset;
using CyclePresetPlugin.Restart;
using Microsoft.Extensions.DependencyInjection;
namespace CyclePresetPlugin;
public class CyclePresetModule : AssettoServerModule<CyclePresetConfiguration>
{
protected override void Load(ContainerBuilder builder)
{
// Register Base Stuff
builder.RegisterType<PresetConfigurationManager>().AsSelf().SingleInstance();
builder.RegisterType<RestartImplementation>().AsSelf().SingleInstance();
builder.RegisterType<PresetImplementation>().AsSelf().SingleInstance();
builder.RegisterType<PresetManager>().AsSelf().SingleInstance();
builder.RegisterType<CyclePresetPlugin>().AsSelf().As<IAssettoServerAutostart>().SingleInstance();
}
}