Пример #1
0
 public LogSyncer(IMorpherLog morpherLog)
 {
     _morpherLog = morpherLog;
     // Register this job with the hosting environment.
     // Allows for a more graceful stop of the job, in the case of IIS shutting down.
     HostingEnvironment.RegisterObject(this);
 }
Пример #2
0
 public ServiceController(IApiThrottler apiThrottler, IMorpherLog log, IMorpherDatabase morpherDatabase, IMorpherCache morpherCache)
 {
     this._apiThrottler = apiThrottler;
     this._log          = log;
     _morpherDatabase   = morpherDatabase;
     _morpherCache      = morpherCache;
 }
Пример #3
0
 public LoggingMiddleware(
     OwinMiddleware next,
     IMorpherLog morpherLog,
     IAttributeUrls attributeUrls) : base(next)
 {
     _morpherLog    = morpherLog;
     _attributeUrls = attributeUrls;
 }
Пример #4
0
 protected void Application_End()
 {
     if (!isLocal)
     {
         IMorpherLog log =
             (IMorpherLog)AutofacInit.AutofacWebApiDependencyResolver.GetService(typeof(IMorpherLog));
         log.Sync();
         IMorpherDatabase database =
             (IMorpherDatabase)AutofacInit.AutofacWebApiDependencyResolver.GetService(typeof(IMorpherDatabase));
         IMorpherCache cache =
             (IMorpherCache)AutofacInit.AutofacWebApiDependencyResolver.GetService(typeof(IMorpherCache));
         database.UploadMorpherCache(cache.GetAll());
     }
 }