Esempio n. 1
0
		public async Task<HealthResult> GetCurrent()
		{
			var result = new HealthResult();
			result.ServicesVersion = AssemblyName
				.GetAssemblyName(HostingEnvironment.ApplicationPhysicalPath + "bin\\Resgrid.Web.Services.dll").Version.ToString();
			result.ApiVersion = "v3";
			result.SiteId = "0";
			result.CacheOnline = _healthService.IsCacheProviderConnected();

			var dbTime = await _healthService.GetDatabaseTimestamp();

			if (!string.IsNullOrWhiteSpace(dbTime))
				result.DatabaseOnline = true;
			else
				result.DatabaseOnline = false;

			return result;
		}
Esempio n. 2
0
        public async Task <HealthResult> GetCurrent()
        {
            var result = new HealthResult();
            var path   = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location) + "\\Resgrid.Web.Services.dll";

            result.ServicesVersion = AssemblyName.GetAssemblyName(path).Version.ToString();
            result.ApiVersion      = "v3";
            result.SiteId          = "0";
            result.CacheOnline     = _healthService.IsCacheProviderConnected();

            var dbTime = await _healthService.GetDatabaseTimestamp();

            if (!string.IsNullOrWhiteSpace(dbTime))
            {
                result.DatabaseOnline = true;
            }
            else
            {
                result.DatabaseOnline = false;
            }

            return(result);
        }