internal static void ConfigureDependencies(TinyIoCContainer container, MessageViewerConfiguration config)
        {
            var messageStore =
                new MsSqlMessageStore(
                    new MsSqlMessageStoreConfiguration("Server=.;Database=brighterMessageStore;Trusted_Connection=True",
                        "messages", MsSqlMessageStoreConfiguration.DatabaseType.MsSqlServer));

            container.Register(messageStore);
            container.Register(typeof (IMessageStoreConfigProvider), typeof (MessageStoreConfigProvider));
            container.Register(typeof (IMessageStoreViewerFactory), typeof (MessageStoreViewerFactory));
            container.Register(typeof(IHandleCommand<RepostCommand>), typeof (RepostCommandHandler));
            container.Register(typeof (IAmAMessageRecoverer), typeof (MessageRecoverer));
            container.Register<MessageViewerConfiguration>(config);

            var factory = new HandlerFactory();
            factory.Add(container.Resolve<RepostCommandHandler>());
            container.Register<IHandlerFactory>(factory);
        }
        internal static void ConfigureDependencies(TinyIoCContainer container, MessageViewerConfiguration config)
        {
            var messageStore =
                new MsSqlMessageStore(
                    new MsSqlMessageStoreConfiguration("Server=.;Database=brighterMessageStore;Trusted_Connection=True",
                                                       "messages", MsSqlMessageStoreConfiguration.DatabaseType.MsSqlServer));

            container.Register(messageStore);
            container.Register(typeof(IMessageStoreConfigProvider), typeof(MessageStoreConfigProvider));
            container.Register(typeof(IMessageStoreViewerFactory), typeof(MessageStoreViewerFactory));
            container.Register(typeof(IHandleCommand <RepostCommand>), typeof(RepostCommandHandler));
            container.Register(typeof(IAmAMessageRecoverer), typeof(MessageRecoverer));
            container.Register <MessageViewerConfiguration>(config);

            var factory = new HandlerFactory();

            factory.Add(container.Resolve <RepostCommandHandler>());
            container.Register <IHandlerFactory>(factory);
        }
        internal static void ConfigureDependencies(TinyIoCContainer container)
        {
            var logger = LogProvider.GetLogger("MainNancyModule");
            logger.Log(LogLevel.Debug, () => "GET on messages");

            var messageStore =
                new MsSqlMessageStore(
                    new MsSqlMessageStoreConfiguration("Server=.;Database=brighterMessageStore;Trusted_Connection=True",
                        "messages", MsSqlMessageStoreConfiguration.DatabaseType.MsSqlServer), logger);

            container.Register(messageStore);
            container.Register(typeof (IMessageStoreActivationStateProvider), typeof (MessageStoreActivationStateProvider));
            container.Register(typeof (IMessageStoreViewerFactory), typeof (MessageStoreViewerFactory));
            container.Register(typeof(IHandleCommand<RepostCommand>), typeof (RepostCommandHandler));

            var factory= new HandlerFactory();
            factory.Add(container.Resolve<RepostCommandHandler>());
            container.Register<IHandlerFactory>(factory);
        }
        internal static void ConfigureDependencies(TinyIoCContainer container)
        {
            var logger = LogProvider.GetLogger("MainNancyModule");

            logger.Log(LogLevel.Debug, () => "GET on messages");

            var messageStore =
                new MsSqlMessageStore(
                    new MsSqlMessageStoreConfiguration("Server=.;Database=brighterMessageStore;Trusted_Connection=True",
                                                       "messages", MsSqlMessageStoreConfiguration.DatabaseType.MsSqlServer), logger);

            container.Register(messageStore);
            container.Register(typeof(IMessageStoreConfigProvider), typeof(MessageStoreConfigProvider));
            container.Register(typeof(IMessageStoreViewerFactory), typeof(MessageStoreViewerFactory));
            container.Register(typeof(IHandleCommand <RepostCommand>), typeof(RepostCommandHandler));
            container.Register(typeof(IAmAMessageRecoverer), typeof(MessageRecoverer));

            var factory = new HandlerFactory();

            factory.Add(container.Resolve <RepostCommandHandler>());
            container.Register <IHandlerFactory>(factory);
        }
 public static void Init()
 {
     HandlerFactory.Add(new GenericHandler());
     DataFactory.Add(new SqlDataAccess());
 }