public AppContext(ContainerBuilder builder) { builder.RegisterInstance(this).AsImplementedInterfaces(); RootContainer = builder.Build(); AppDomain.CurrentDomain.AssemblyResolve += CurrentDomainOnAssemblyResolve; Container = LoadModules(); StartConnecting(); Container.Resolve <IStartupActionInvoker>().Load(CancellationToken.None); _notificationIcon.InitializeComponent(); Application.Idle += ApplicationOnIdle; Application.ApplicationExit += ApplicationOnApplicationExit; }