public static IAssimilate Eidetic(this IAssimilate assimilate, Action <EideticConfigurator> configure) { var config = new EideticConfigurator(); configure(config); assimilate.Dependencies(x => x.For <IMemcachedClientConfiguration>() .Use(config.Configuration)); var clientConfig = Assimilate.GetInstanceOf <IMemcachedClientConfiguration>(); assimilate.Dependencies( x => x.For <MemcachedClient>().Use(new MemcachedClient(clientConfig)).AsSingleton()); return(assimilate); }
public static IAssimilate UseTestLogAdapter(this IAssimilate assimilate) { assimilate.Dependencies(x => x.For <ILogProvider>().Use <TestLogProvider>().AsSingleton()); var logManager = GetInstanceOf <ILogManager>(); logManager.Initialize(); return(assimilate); }
public static IAssimilate Daemon(this IAssimilate assimilate, Action <DaemonConfigurator> config) { var daemonConfiguration = new DaemonConfigurator(); config(daemonConfiguration); assimilate .Dependencies(container => container.For <DaemonConfiguration>().Use(daemonConfiguration.Configuration)); return(assimilate); }
public HibernateConfigurator FromFactory(Action <FluentConfiguration> config) { var configuration = Fluently.Configure(); config(configuration); _assimilate.Dependencies( x => x.For <ISessionFactory>().Use(configuration.BuildSessionFactory()).AsSingleton()); return(this); }
public HibernateConfigurator(IAssimilate assimilate) { _assimilate = assimilate; assimilate.Dependencies(x => { x.For<ISessionContext>().Use<InMemoryContext>(); x.For<ISessionManager>().Use<SessionManager>(); x.For<ISessionModule>().Use<SessionModule>(); x.For(typeof (IRepository<>)).Use(typeof (Repository<>)); }); HibernatingRhinos.Profiler.Appender.NHibernate.NHibernateProfiler.Initialize(); }
public static IAssimilate HttpServer(this IAssimilate assimilate, Action <HttpServerConfigurator> configure) { var configurator = new HttpServerConfigurator(new HttpServerConfiguration()); configure(configurator); assimilate .Dependencies(x => { var config = configurator.GetConfiguration(); x.For <IHttpServerConfiguration>().Use(config); x.For <IHttpServer>().Use <HttpServer>(); x.For <IAuthenticationValidator>().Use <WorthlessAuthenticationValidator>(); if (config.AuthSchemes == AuthenticationSchemes.Basic) { x.For <IHttpAuthChallenger>().Use <HttpBasicAuthChallenger>(); } }); return(assimilate); }