예제 #1
0
        protected void Application_Start()
        {
            // Initialize Couchbase & ClusterHelper
            CouchbaseConfig.Initialize();

            AreaRegistration.RegisterAllAreas();
            GlobalConfiguration.Configure(WebApiConfig.Register);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
        }
예제 #2
0
        public void Configuration(IAppBuilder app)
        {
            //ConfigureAuth(app);
            CouchbaseConfig.Initialize();

            var context = new OwinContext(app.Properties);
            var token   = context.Get <CancellationToken>("host.OnAppDisposing");

            if (token != CancellationToken.None)
            {
                token.Register(() =>
                {
                    // code to run on shutdown
                    CouchbaseConfig.Close();
                });
            }
        }
예제 #3
0
 protected void Application_End()
 {
     CouchbaseConfig.Close();
 }
 protected void Application_Start()
 {
     CouchbaseConfig.Register();
     GlobalConfiguration.Configure(WebApiConfig.Register);
 }