using System.Collections.Generic; using System.Windows; using Autofac; using Chernobyl.App.Layout; using GalaSoft.MvvmLight; using Chernobyl.Dependency.Autofac; namespace Chernobyl.App { /// /// Injects the core services. /// public class Module : Autofac.Module { /// /// The name of services that are displayed as tools (such as in the /// toolbar of the main window). /// public static readonly string Tool = $"{typeof(Module).Namespace}.Tool"; /// protected override void Load(ContainerBuilder builder) { builder.RegisterType().As().SingleInstance(); builder.RegisterType().As() .WithParameter(new Param>(Tool)) .SingleInstance(); } } }