Beispiel #1
0
        /// <summary>
        /// The create container.
        /// </summary>
        /// <returns>
        /// The Autofac.IContainer.
        /// </returns>
        private static IContainer CreateContainer()
        {
            var builder = new ContainerBuilder();

            var mainModule = new BaseModule();
            var logModule = new LoggingModule();

            builder.RegisterModule(mainModule);
            builder.RegisterModule(logModule);

            return builder.Build();
        }
Beispiel #2
0
        /// <summary>
        /// The create container.
        /// </summary>
        /// <returns>
        /// The Autofac.IContainer.
        /// </returns>
        private static IContainer CreateContainer()
        {
            var builder = new ContainerBuilder();

            var mainModule = new BaseModule();
            var logModule  = new LoggingModule();

            builder.RegisterModule(mainModule);
            builder.RegisterModule(logModule);

            return(builder.Build());
        }