Exemple #1
0
            /// <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));
            }
Exemple #2
0
 protected override void SetBootstrapperCreationOptions(BootstrapperCreationOptions options)
 {
     options.ConfigureServices(c =>
     {
         _auditingStore = Substitute.For <IAuditingStore>();
         c.Services.ReplaceOrAdd(ServiceDescriptor.Singleton(_auditingStore), true);
     });
     base.SetBootstrapperCreationOptions(options);
 }
Exemple #3
0
 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)
 {
 }
Exemple #5
0
 protected override void SetBootstrapperCreationOptions(BootstrapperCreationOptions options) => options.UseAspectCore();
Exemple #6
0
 protected virtual void SetBootstrapperCreationOptions(BootstrapperCreationOptions options)
 {
 }
 public TestBootstrapper(ExtendedSimpleContainerAdapter iocContainerAdapter, BootstrapperCreationOptions creationOptions) :
     base(iocContainerAdapter, creationOptions)
 {
     PlatformProvider.Current = new NetStandardPlatformProvider();
 }
Exemple #8
0
 protected override void SetBootstrapperCreationOptions(BootstrapperCreationOptions options)
 {
     base.SetBootstrapperCreationOptions(options);
     options.UseAspectCore();
 }
Exemple #9
0
 protected override void SetBootstrapperCreationOptions(BootstrapperCreationOptions options)
 {
     options.UseAspectCore();
     options.ConfigureServices(c => c.Services.AddTransient <IAuthorizeAttributeTestService, AuthorizeAttributeTestService>());
     base.SetBootstrapperCreationOptions(options);
 }