Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new <see cref="OwinRestService"/>.
        /// </summary>
        /// <param name="kernel">Ninject kernel instance.</param>
        /// <param name="assembliesResolverFactory">Factory used for instantiating <see cref="IAssembliesResolver"/>.</param>
        public OwinRestService(
            IKernel kernel,
            IAssembliesResolverFactory assembliesResolverFactory)
        {
            this.hostKernel = new ChildKernel(kernel);

            assembliesResolver = assembliesResolverFactory
                                 .CreateNew(typeof(OwinRestService).Assembly);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new <see cref="OwinRestService"/>.
        /// </summary>
        /// <param name="kernel">Ninject kernel instance.</param>
        /// <param name="logService">Service used for logging.</param>
        /// <param name="configStore">Configuration storage instance.</param>
        /// <param name="antFactory">Factory used for instantiating <see cref="IAnt"/>.</param>
        /// <param name="assembliesResolverFactory">Factory used for instantiating <see cref="IAssembliesResolver"/>.</param>
        public OwinRestService(
            IKernel kernel,
            ILog logService,
            IConfigStore configStore,
            IAntFactory antFactory,
            IAssembliesResolverFactory assembliesResolverFactory)
        {
            hostKernel = new ChildKernel(kernel);

            this.logService  = logService;
            this.configStore = configStore;

            this.antFactory = antFactory;

            assembliesResolver = assembliesResolverFactory
                                 .CreateNew(typeof(OwinRestService).Assembly);
        }