private static MajidBootstrapper AddMajidBootstrapper <TStartupModule>(IServiceCollection services, Action <MajidBootstrapperOptions> optionsAction) where TStartupModule : MajidModule { var majidBootstrapper = MajidBootstrapper.Create <TStartupModule>(optionsAction); services.AddSingleton(majidBootstrapper); return(majidBootstrapper); }
protected void InitializeMajid() { LocalIocManager.RegisterIfNot <IMajidSession, TestMajidSession>(); PreInitialize(); MajidBootstrapper.Initialize(); PostInitialize(); MajidSession = LocalIocManager.Resolve <TestMajidSession>(); }
protected MajidIntegratedTestBase(bool initializeMajid = true, IIocManager localIocManager = null) { LocalIocManager = localIocManager ?? new IocManager(); MajidBootstrapper = MajidBootstrapper.Create <TStartupModule>(options => { options.IocManager = LocalIocManager; }); if (initializeMajid) { InitializeMajid(); } }
public virtual void Dispose() { MajidBootstrapper.Dispose(); LocalIocManager.Dispose(); }