Beispiel #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);
        }
Beispiel #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();
                });
            }
        }
Beispiel #3
0
 protected void Application_End()
 {
     CouchbaseConfig.Close();
 }
 protected void Application_Start()
 {
     CouchbaseConfig.Register();
     GlobalConfiguration.Configure(WebApiConfig.Register);
 }