Пример #1
0
            /// <summary>
            /// Initializes a new instance of <see cref="TestBootstrapperContainerBase{TIocContainerAdapter, TIocContainer}.WithRootObject{TRootObject}"/>
            /// </summary>
            /// <param name="iocContainer">The ioc container.</param>
            /// <param name="adapterCreator">The adapter creation function.</param>
            /// <param name="creationOptions">The bootstrapper creation options.</param>
#else
            /// <summary>
            /// Initializes a new instance of <see cref="BootstrapperContainerBase{TIocContainerAdapter, TIocContainer}.WithRootObject{TRootObject}"/>
            /// </summary>
            /// <param name="iocContainer">The ioc container.</param>
            /// <param name="adapterCreator">The adapter creation function.</param>
            /// <param name="creationOptions">The bootstrapper creation options.</param>
#endif
            public WithRootObject(TIocContainer iocContainer,
                                  Func <TIocContainer, TIocContainerAdapter> adapterCreator,
                                  BootstrapperCreationOptions creationOptions) : base(iocContainer, adapterCreator, AddRootObject(creationOptions))
            {
                Use(new CreateRootObjectMiddleware <TIocContainerAdapter>(typeof(TRootObject),
                                                                          creationOptions.DisplayRootView));
            }
Пример #2
0
            /// <summary>
            /// Initializes a new instance of <see cref="TestBootstrapperContainerBase{TIocContainerAdapter, TIocContainer}.WithRootObject{TRootObject}"/>
            /// </summary>
            /// <param name="iocContainer">The ioc container.</param>
            /// <param name="adapterCreator">The adapter creation function.</param>
#else
            /// <summary>
            /// Initializes a new instance of <see cref="BootstrapperContainerBase{TIocContainerAdapter, TIocContainer}.WithRootObject{TRootObject}"/>
            /// </summary>
            /// <param name="iocContainer">The ioc container.</param>
            /// <param name="adapterCreator">The adapter creation function.</param>
#endif
            public WithRootObject(TIocContainer iocContainer,
                                  Func <TIocContainer, TIocContainerAdapter> adapterCreator)
                : this(iocContainer, adapterCreator, new BootstrapperCreationOptions
            {
                ExcludedTypes = new List <Type> {
                    typeof(TRootObject)
                }
            })
            {
            }
Пример #3
0
        BootstrapperContainerBase
#endif
        (
            TIocContainer iocContainer,
            Func <TIocContainer, TIocContainerAdapter> adapterCreator,
            BootstrapperCreationOptions creationOptions) : base(adapterCreator(iocContainer),
Пример #4
0
        BootstrapperContainerBase
#endif
        (
            TIocContainer iocContainer,
            Func <TIocContainer, TIocContainerAdapter> adapterCreator) :
            this(iocContainer, adapterCreator, new BootstrapperCreationOptions())