コード例 #1
0
        DatabaseBackupInfo GetBackupInfo(string name)
        {
            var backupName = String.IsNullOrEmpty(name)? null : name;

            return(new DatabaseBackupInfo {
                ApplicationVersion = versionProvider.GetHumanReadableProductVersion(),
                Timestamp = environment.GetCurrentUtcTimestamp(),
                Name = backupName
            });
        }
コード例 #2
0
        public void OnActionExecuted(ActionExecutedContext filterContext)
        {
            var viewResult = filterContext.Result as ViewResult;

            if (viewResult == null)
            {
                return;
            }

            viewResult.ViewBag.ApplicationVersion = new ApplicationVersionInfo {
                HumanReadableProductVersion = versionInfoProvider.GetHumanReadableProductVersion(),
                ComponentVersions           = versionInfoProvider.GetComponentVersions(),
            };
        }