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); }
public ServiceController(IApiThrottler apiThrottler, IMorpherLog log, IMorpherDatabase morpherDatabase, IMorpherCache morpherCache) { this._apiThrottler = apiThrottler; this._log = log; _morpherDatabase = morpherDatabase; _morpherCache = morpherCache; }
public LoggingMiddleware( OwinMiddleware next, IMorpherLog morpherLog, IAttributeUrls attributeUrls) : base(next) { _morpherLog = morpherLog; _attributeUrls = attributeUrls; }
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()); } }