Esempio n. 1
0
        /// <summary>
        /// Load your modules or register your services here!
        /// </summary>
        /// <param name="kernel">The kernel.</param>
        private static void RegisterServices(IKernel kernel)
        {
            var config = new MapperConfiguration(cfg =>
            {
                CoreMapperConfig.Initialize(cfg);
            });

            kernel.Bind <IMapper>().ToConstructor(c => new Mapper(config)).InSingletonScope();

            CoreKernel.Initialize(kernel);
        }
Esempio n. 2
0
        public static void Initialize(IKernel kernel)
        {
            //Services
            var config = new MapperConfiguration(cfg =>
            {
                WebMapperConfig.Initialize(cfg);
            });

            kernel.Bind <IMapper>().ToConstructor(c => new Mapper(config)).InSingletonScope();

            CoreKernel.Initialize(kernel);
        }