Пример #1
0
        /// <summary>
        /// Load your modules or register your services here!
        /// </summary>
        /// <param name="kernel">The kernel.</param>
        private static void RegisterServices(IKernel kernel)
        {
            RouteTableStorage routeTableStorage = new RouteTableStorage();

            kernel.Bind <RouteTableStorage>().ToConstant(routeTableStorage);

            var routeTable = routeTableStorage.Load();

            kernel.Bind <RouteTable>().ToConstant(routeTable);

            kernel.Bind <IAuthProvider>().ToConstant(new AuthProvider());
        }
Пример #2
0
 public HostController(RouteTable routeTable, IAuthProvider authProvider, RouteTableStorage routeTableStorage)
 {
     RouteTable        = routeTable;
     AuthProvider      = authProvider;
     RouteTableStorage = routeTableStorage;
 }
Пример #3
0
 public ValuesController(RouteTableStorage routeTableStorage)
 {
     _routeTableStorage = routeTableStorage;
 }