Exemplo n.º 1
0
 public static void RegisterDependencies(IDependencyConfigurator configurator)
 {
     configurator.Register <IClockVM, ClockVM>();
     configurator.Register <ITimeZonesDataAdapter, TimeZonesDataAdapter>();
     configurator.Register <IConfigurator, IniConfiguratorPrimitive>();
     configurator.Register <ILogger, FileLogger>();
 }
Exemplo n.º 2
0
        public static void Configure(IDependencyConfigurator di)
        {
            di.Register <ControllerFactory, ControllerFactory>(true);
            di.Factory(self => self);
            di.Register <IConnectionService, ConnectionService>();
            di.Register <WebSocketConnection, WebSocketConnection>();
            di.Register <ClientRepository, ClientRepository>(true);
            di.Register <IBroadcastService, BroadcastService>();
            var types = new ControllerTypes();

            di.Factory(d => types);
            di.Factory <IControllerTypeResolver>(d => types);
            di.Register <Catchme, Catchme>(true);
        }
Exemplo n.º 3
0
 public static void RegisterDependencies(IDependencyConfigurator configurator)
 {
     configurator.Register <IWebAPI, WebAPI>();
     configurator.Register <ITimeWatcher, TimeWatcher>();
 }
Exemplo n.º 4
0
 private static void ConfigureController <TController>(IDependencyConfigurator di, ControllerTypes types) where TController : class
 {
     di.Register <TController, TController>();
     types.Add(typeof(TController).Name, typeof(TController));
 }