/// <summary> /// Initializes a new instance of the <see cref="TestBootstrapperContainerBase{TIocContainerAdapter}.WithRootObject{TRootObject}"/> class. /// </summary> /// <param name="iocContainerAdapter">The ioc container adapter.</param> /// <param name="creationOptions">The creation options.</param> #else /// <summary> /// Initializes a new instance of the <see cref="BootstrapperContainerBase{TIocContainerAdapter}.WithRootObject{TRootObject}"/> class. /// </summary> /// <param name="iocContainerAdapter">The ioc container adapter.</param> /// <param name="creationOptions">The creation options.</param> #endif public WithRootObject(TIocContainerAdapter iocContainerAdapter, BootstrapperCreationOptions creationOptions) : base(iocContainerAdapter, AddRootObject(creationOptions)) { Use(new CreateRootObjectMiddleware <TIocContainerAdapter>(typeof(TRootObject), creationOptions.DisplayRootView)); }
protected override void SetBootstrapperCreationOptions(BootstrapperCreationOptions options) { options.ConfigureServices(c => { _auditingStore = Substitute.For <IAuditingStore>(); c.Services.ReplaceOrAdd(ServiceDescriptor.Singleton(_auditingStore), true); }); base.SetBootstrapperCreationOptions(options); }
private static BootstrapperCreationOptions AddRootObject(BootstrapperCreationOptions creationOptions) { if (creationOptions.ExcludedTypes == null) { creationOptions.ExcludedTypes = new List <Type>(); } if (creationOptions.ExcludedTypes.Contains(typeof(TRootObject)) == false) { creationOptions.ExcludedTypes.Add(typeof(TRootObject)); } return(creationOptions); }
public FakeBootstrapperWithContainerAdapter(FakeIocContainer iocContainerAdapter, BootstrapperCreationOptions creationOptions) : base(iocContainerAdapter, creationOptions) { }
protected override void SetBootstrapperCreationOptions(BootstrapperCreationOptions options) => options.UseAspectCore();
protected virtual void SetBootstrapperCreationOptions(BootstrapperCreationOptions options) { }
public TestBootstrapper(ExtendedSimpleContainerAdapter iocContainerAdapter, BootstrapperCreationOptions creationOptions) : base(iocContainerAdapter, creationOptions) { PlatformProvider.Current = new NetStandardPlatformProvider(); }
protected override void SetBootstrapperCreationOptions(BootstrapperCreationOptions options) { base.SetBootstrapperCreationOptions(options); options.UseAspectCore(); }
protected override void SetBootstrapperCreationOptions(BootstrapperCreationOptions options) { options.UseAspectCore(); options.ConfigureServices(c => c.Services.AddTransient <IAuthorizeAttributeTestService, AuthorizeAttributeTestService>()); base.SetBootstrapperCreationOptions(options); }