Ejemplo n.º 1
0
        public virtual DeployUnitInfo GetUnitInfo()
        {
            var deployUnitInfo = new DeployUnitInfo();

            deployUnitInfo.Name = Name;
            deployUnitInfo.HasDeployParameters = HasDeployParameters;

            if (Version == null)
            {
                Version = VersionUtil.GetCurrentVersion(DataDirectory);
                if (Version.DeployFailed)
                {
                    DeployStatus = DeployStatus.DeployFailed;
                }
            }

            if (!Version.DeployFailed)
            {
                deployUnitInfo.LastDeployed = string.Format("Deployed by {0} {1}", Version.UserName, DateUtils.GetFriendlyAge(Version.DeployTimestamp));
            }

            deployUnitInfo.Version      = Version;
            deployUnitInfo.DeployStatus = DeployStatus;

            return(deployUnitInfo);
        }
Ejemplo n.º 2
0
        public virtual DeployUnitInfo GetUnitInfo()
        {
            var deployUnitInfo = new DeployUnitInfo
            {
                Name = Name,
                HasDeployParameters = HasDeployParameters
            };

            if (Version == null)
            {
                Version = VersionUtil.GetCurrentVersion(DataDirectory);
                if (Version.DeployFailed)
                {
                    DeployStatus = DeployStatus.DeployFailed;
                }
            }

            if (!Version.DeployFailed)
            {
                deployUnitInfo.LastDeployed = $"Deployed by {Version.UserName} {DateUtils.GetFriendlyAge(Version.DeployTimestamp)}";
            }

            deployUnitInfo.Version      = Version;
            deployUnitInfo.DeployStatus = DeployStatus;

            return(deployUnitInfo);
        }
        public virtual DeployUnitInfo GetUnitInfo(bool refreshUnitStatus)
        {
            var deployUnitInfo = new DeployUnitInfo
            {
                Name  = Name,
                Group = Group,
                HasDeployParameters = HasDeployParameters
            };

            if (Version == null)
            {
                Version = VersionUtil.GetCurrentVersion(DataDirectory);
                if (Version.DeployFailed)
                {
                    DeployStatus = DeployStatus.DeployFailed;
                }
            }

            if (!Version.DeployFailed)
            {
                if (Version.DeployTimestamp == DateTime.MinValue)
                {
                    deployUnitInfo.LastDeployed = string.Empty;
                }
                else
                {
                    deployUnitInfo.LastDeployed = $"Deployed by {Version.UserName} {DateUtils.GetFriendlyAge(Version.DeployTimestamp)}";
                }
            }

            deployUnitInfo.Version      = Version;
            deployUnitInfo.DeployStatus = DeployStatus;

            if (refreshUnitStatus)
            {
                UpdateUnitStatus();
            }

            return(deployUnitInfo);
        }
Ejemplo n.º 4
0
        public virtual DeployUnitInfo GetUnitInfo()
        {
            var deployUnitInfo = new DeployUnitInfo
            {
                Name = Name,
                HasDeployParameters = HasDeployParameters
            };

            if (Version == null)
            {
                Version = VersionUtil.GetCurrentVersion(DataDirectory);
                if (Version.DeployFailed)
                    DeployStatus = DeployStatus.DeployFailed;
            }

            if (!Version.DeployFailed)
                deployUnitInfo.LastDeployed = $"Deployed by {Version.UserName} {DateUtils.GetFriendlyAge(Version.DeployTimestamp)}";

            deployUnitInfo.Version = Version;
            deployUnitInfo.DeployStatus = DeployStatus;

            return deployUnitInfo;
        }
Ejemplo n.º 5
0
        public virtual DeployUnitInfo GetUnitInfo()
        {
            var deployUnitInfo = new DeployUnitInfo();
            deployUnitInfo.Name = Name;
            deployUnitInfo.HasDeployParameters = HasDeployParameters;

            if (Version == null)
            {
                Version = VersionUtil.GetCurrentVersion(DataDirectory);
                if (Version.DeployFailed)
                {
                    DeployStatus = DeployStatus.DeployFailed;
                }
            }

            if (!Version.DeployFailed)
            {
                deployUnitInfo.LastDeployed = string.Format("Deployed by {0} {1}", Version.UserName, DateUtils.GetFriendlyAge(Version.DeployTimestamp));
            }

            deployUnitInfo.Version = Version;
            deployUnitInfo.DeployStatus = DeployStatus;

            return deployUnitInfo;
        }