Esempio n. 1
0
        private static ImageIndex GetImageIndex(BuildStatus buildStatus)
        {
            switch (buildStatus)
            {
            case BuildStatus.Succeeded:
                return(ImageIndex.Green);

            case BuildStatus.InProgress:
                return(ImageIndex.Yellow);

            default:
                return(ImageIndex.Red);
            }
        }
Esempio n. 2
0
 internal static BuildStatus ConvertTFSStatusToBuildStatus(MSBuildStatus status)
 {
     switch (status)
     {
         case MSBuildStatus.Failed:
             return BuildStatus.FinishedWithFailure;
         case MSBuildStatus.Succeeded:
         case MSBuildStatus.PartiallySucceeded:
             return BuildStatus.FinishedSuccefully;
         case MSBuildStatus.InProgress:
             return BuildStatus.Building;
         default:
             return BuildStatus.Unknown;
     }
 }
        private Domain.Model.BuildStatus ParseBuildStatus(BuildStatus buildStatus)
        {
            switch (buildStatus)
            {
            case BuildStatus.Failed:
                return(Domain.Model.BuildStatus.Failed);

            case BuildStatus.PartiallySucceeded:
                return(Domain.Model.BuildStatus.PartiallySucceeded);

            case BuildStatus.Succeeded:
                return(Domain.Model.BuildStatus.Succeeded);
            }

            throw new ArgumentException("BuildStatus Not Mapped");
        }
        public BuildStatus TranslateBuildStatus(Microsoft.TeamFoundation.Build.Client.BuildStatus tfsStatus)
        {
            switch (tfsStatus)
            {
            case Microsoft.TeamFoundation.Build.Client.BuildStatus.Succeeded:
                return(BuildStatus.Succeeded);

            case Microsoft.TeamFoundation.Build.Client.BuildStatus.PartiallySucceeded:
            case Microsoft.TeamFoundation.Build.Client.BuildStatus.Failed:
            case Microsoft.TeamFoundation.Build.Client.BuildStatus.Stopped:
                return(BuildStatus.Failed);

            case Microsoft.TeamFoundation.Build.Client.BuildStatus.InProgress:
                return(BuildStatus.Running);

            case Microsoft.TeamFoundation.Build.Client.BuildStatus.NotStarted:
                return(BuildStatus.Queued);

            default:
                return(BuildStatus.Unknown);
            }
        }
 private static ImageIndex GetImageIndex(BuildStatus buildStatus)
 {
     switch (buildStatus)
     {
         case BuildStatus.Succeeded:
             return ImageIndex.Green;
         case BuildStatus.InProgress:
             return ImageIndex.Yellow;
         default:
             return ImageIndex.Red;
     }
 }