示例#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
        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)));
        }