Esempio n. 1
0
        internal static BuildResult?ConvertToBuildResult(Microsoft.TeamFoundation.Build.Client.BuildStatus buildStatus)
        {
            switch (buildStatus)
            {
            case Microsoft.TeamFoundation.Build.Client.BuildStatus.All:
                return(BuildResult.Canceled);

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

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

            case Microsoft.TeamFoundation.Build.Client.BuildStatus.None:
                return(BuildResult.None);

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

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

            case Microsoft.TeamFoundation.Build.Client.BuildStatus.Stopped:
                return(BuildResult.Canceled);

            case Microsoft.TeamFoundation.Build.Client.BuildStatus.Succeeded:
                return(BuildResult.Succeeded);

            default:
                return(BuildResult.None);
            }
        }
Esempio n. 2
0
        internal static BuildStatus?Convert(Microsoft.TeamFoundation.Build.Client.BuildStatus status)
        {
            switch (status)
            {
            case Microsoft.TeamFoundation.Build.Client.BuildStatus.All:
                return(BuildStatus.All);

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

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

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

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

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

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

            case Microsoft.TeamFoundation.Build.Client.BuildStatus.Succeeded:
                return(BuildStatus.Completed);

            default:
                return(BuildStatus.None);
            }
        }