public void Init(HttpApplication context)
 {
     if (!initialized)
     {
         lock (locker)
         {
             if (!initialized)
             {
                 try
                 {
                     ApiSetup.ConfigureEntryPoints();
                     ApiSetup.RegisterRoutes();
                     initialized = true;
                 }
                 catch (Exception err)
                 {
                     if (err is TypeInitializationException && err.InnerException != null)
                     {
                         err = err.InnerException;
                     }
                     LogManager.GetLogger(GetType()).Error(err);
                 }
             }
         }
     }
 }
Example #2
0
 public void Init(HttpApplication context)
 {
     if (!initialized)
     {
         lock (locker)
         {
             if (!initialized)
             {
                 try
                 {
                     ApiSetup.Init();
                     initialized = true;
                 }
                 catch (Exception err)
                 {
                     if (err is TypeInitializationException && err.InnerException != null)
                     {
                         err = err.InnerException;
                     }
                     LogManager.GetLogger("ASC").Error(err);
                 }
             }
         }
     }
 }
Example #3
0
 protected void Application_Start(object sender, EventArgs e)
 {
     ApiSetup.RegisterRoutes();
 }