예제 #1
0
파일: Global.asax.cs 프로젝트: vebin/BDDD
 protected static void InitAppRuntime()
 {
     ManualConfigSource configSource = new ManualConfigSource { ObjectContainer = typeof(UnityObjectContainer) };
     application = AppRuntime.Create(configSource);
     application.AppInitEvent += application_AppInitEvent;
     application.Start();
 }
예제 #2
0
 public static void StartBDDD(TestContext context)
 {
     ManualConfigSource configSource = ConfigHelper.GetManualConfigSource();
     application = AppRuntime.Create(configSource);
     application.AppInitEvent += application_AppInitEvent;
     application.Start();
 }
예제 #3
0
파일: MemcachedTest.cs 프로젝트: vebin/BDDD
        public static void Initial(TestContext context)
        {
            ManualConfigSource configSource = ConfigHelper.GetManualConfigSource();
            application = AppRuntime.Create(configSource);
            application.Start();

            var c = application.ObjectContainer.GetRealObjectContainer<UnityContainer>();
            c.RegisterType<ICache, MemcachedCache>();
            c.RegisterType<AbsoluteTimeExpiration, MemcachedAbsoluteTimeExpiration>("SCache",
                                                                                    new InjectionConstructor(
                                                                                        TimeSpan.FromSeconds(5)));
            c.RegisterType<AbsoluteTimeExpiration, MemcachedAbsoluteTimeExpiration>("S1Cache",
                                                                                    new InjectionConstructor(
                                                                                        TimeSpan.FromSeconds(15)));
        }