This repository has been archived on 2023-02-02. You can view files and clone it, but cannot push or open issues or pull requests.
mfgames-nitride-cil/examples/CopyFiles/CopyFilesModule.cs

21 lines
585 B
C#
Raw Permalink Normal View History

using Autofac;
namespace CopyFiles;
public class CopyFilesModule : Module
{
/// <inheritdoc />
protected override void Load(ContainerBuilder builder)
{
// This just registers all the non-static classes as singletons
// within the system. We use lifetimes in other components depending
// on how they are used, but in this case, we don't need it.
2022-07-09 04:52:10 +00:00
builder.RegisterAssemblyTypes(
this.GetType()
.Assembly)
.AsSelf()
.AsImplementedInterfaces()
.SingleInstance();
}
}