public ServiceController(IApiThrottler apiThrottler, IMorpherLog log, IMorpherDatabase morpherDatabase, IMorpherCache morpherCache) { this._apiThrottler = apiThrottler; this._log = log; _morpherDatabase = morpherDatabase; _morpherCache = morpherCache; }
public UserCacheSyncer(IMorpherDatabase morpherDatabase, IMorpherCache morpherCache) { _morpherDatabase = morpherDatabase; _morpherCache = morpherCache; // 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 UserCacheLoaderMiddleware( OwinMiddleware next, IApiThrottler apiThrottler, IMorpherCache cache, IMorpherDatabase database) : base(next) { _apiThrottler = apiThrottler; _cache = cache; _database = database; }
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()); } }
public ApiThrottler(IMorpherDatabase morpherDatabase, IMorpherCache morpherCache) { _morpherDatabase = morpherDatabase; _morpherCache = morpherCache; }