当前位置: 首页>>代码示例>>C#>>正文


C# BuildStatus类代码示例

本文整理汇总了C#中BuildStatus的典型用法代码示例。如果您正苦于以下问题:C# BuildStatus类的具体用法?C# BuildStatus怎么用?C# BuildStatus使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


BuildStatus类属于命名空间,在下文中一共展示了BuildStatus类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ConvertBuildStatus

 public Microsoft.TeamFoundation.Build.Server.BuildStatus ConvertBuildStatus(BuildStatus? status, BuildResult? result)
 {
     if (!status.HasValue)
     {
         return Microsoft.TeamFoundation.Build.Server.BuildStatus.NotStarted;
     }
     BuildStatus value = status.Value;
     switch (value)
     {
         case BuildStatus.None:
             return Microsoft.TeamFoundation.Build.Server.BuildStatus.None;
         case BuildStatus.InProgress:
             return Microsoft.TeamFoundation.Build.Server.BuildStatus.InProgress;
         case BuildStatus.Completed:
             return this.ConvertBuildResult(result);
         case (BuildStatus)3:
         case (BuildStatus)5:
         case (BuildStatus)6:
         case (BuildStatus)7:
             break;
         case BuildStatus.Cancelling:
             return Microsoft.TeamFoundation.Build.Server.BuildStatus.Stopped;
         case BuildStatus.Postponed:
             return Microsoft.TeamFoundation.Build.Server.BuildStatus.NotStarted;
         default:
             if (value == BuildStatus.NotStarted)
             {
                 return Microsoft.TeamFoundation.Build.Server.BuildStatus.NotStarted;
             }
             break;
     }
     return Microsoft.TeamFoundation.Build.Server.BuildStatus.NotStarted;
 }
开发者ID:kria,项目名称:TfsNotificationRelay,代码行数:33,代码来源:Build2Converter.cs

示例2: WithDimensions

 public static BuildLocator WithDimensions(BuildTypeLocator buildType = null,
                                           UserLocator user = null,
                                           string agentName = null,
                                           BuildStatus? status = null,
                                           bool? personal = null,
                                           bool? canceled = null,
                                           bool? running = null,
                                           bool? pinned = null,
                                           int? maxResults = null,
                                           int? startIndex = null,
                                           BuildLocator sinceBuild = null,
                                           DateTime? sinceDate = null,
                                           string[] tags = null,
                                           string branch = null
     )
 {
     return new BuildLocator
                {
                    BuildType = buildType,
                    User = user,
                    AgentName = agentName,
                    Status = status,
                    Personal = personal,
                    Canceled = canceled,
                    Running = running,
                    Pinned = pinned,
                    MaxResults = maxResults,
                    StartIndex = startIndex,
                    SinceBuild = sinceBuild,
                    SinceDate = sinceDate,
                    Tags = tags,
                    Branch = branch
                };
 }
开发者ID:khaister,项目名称:TeamCitySharper,代码行数:34,代码来源:BuildLocator.cs

示例3: Convert

 public static TeamBuildScreen.Core.Models.BuildStatus Convert(BuildStatus status)
 {
     switch (status)
     {
         case BuildStatus.Failed:
             return TeamBuildScreen.Core.Models.BuildStatus.Failed;
             break;
         case BuildStatus.InProgress:
             return TeamBuildScreen.Core.Models.BuildStatus.InProgress;
             break;
         case BuildStatus.NotStarted:
             return TeamBuildScreen.Core.Models.BuildStatus.NotStarted;
             break;
         case BuildStatus.PartiallySucceeded:
             return TeamBuildScreen.Core.Models.BuildStatus.PartiallySucceeded;
             break;
         case BuildStatus.Stopped:
             return TeamBuildScreen.Core.Models.BuildStatus.Stopped;
             break;
         case BuildStatus.Succeeded:
             return TeamBuildScreen.Core.Models.BuildStatus.Succeeded;
             break;
         default:
             throw new NotSupportedException("Unable to convert unrecognised BuildStatus.");
     }
 }
开发者ID:heberop,项目名称:TeamBuildScreen,代码行数:26,代码来源:BuildStatusConverter.cs

示例4: Find

        /// <summary>
        /// Finds the icon for the specified build status.
        /// </summary>
        /// <param name="buildStatus">The build status.</param>
        /// <returns></returns>
        public Icon Find(BuildStatus buildStatus)
        {
            Icon icon;

            switch (buildStatus)
            {
                case BuildStatus.Building:
                    icon = Resources.Yellow;
                    break;

                case BuildStatus.Failed:
                    icon = Resources.Red;
                    break;

                case BuildStatus.Passed:
                    icon = Resources.Blue;
                    break;

                default:
                    icon = Resources.Grey;
                    break;
            }

            return icon;
        }
开发者ID:phil-b-higgins,项目名称:jenkins.net,代码行数:30,代码来源:IconFinder.cs

示例5: Update

 public void Update(BuildStatus status)
 {
     switch (status)
     {
         case BuildStatus.Unknown:
             _lightController.TurnOff(Light.Red);
             _lightController.TurnOff(Light.Yellow);
             _lightController.TurnOff(Light.Green);
             break;
         case BuildStatus.Successful:
             _lightController.TurnOff(Light.Red);
             _lightController.TurnOff(Light.Yellow);
             _lightController.TurnOn(Light.Green);
             break;
         case BuildStatus.Broken:
             _lightController.TurnOn(Light.Red);
             _lightController.TurnOff(Light.Yellow);
             _lightController.TurnOff(Light.Green);
             break;
         case BuildStatus.TestFailures:
             _lightController.TurnOff(Light.Red);
             _lightController.TurnOn(Light.Yellow);
             _lightController.TurnOff(Light.Green);
             break;
         default:
             throw new ArgumentOutOfRangeException("status");
     }
 }
开发者ID:kmckee,项目名称:JenkinsTrafficLight,代码行数:28,代码来源:BuildLight.cs

示例6: Build

 internal Build(TeamCityServiceContext context, XmlNode node)
     : base(context, node)
 {
     _status		= TeamCityUtility.LoadBuildStatus(node.Attributes[StatusProperty.XmlNodeName]);
     _number		= TeamCityUtility.LoadString(node.Attributes[NumberProperty.XmlNodeName]);
     _startDate	= TeamCityUtility.LoadDateForSure(node.Attributes[StartDateProperty.XmlNodeName]);
     _buildtype	= Context.BuildTypes.Lookup(node.Attributes[BuildTypeProperty.XmlNodeName].InnerText);
 }
开发者ID:Kuzq,项目名称:gitter,代码行数:8,代码来源:Build.cs

示例7: MockBuildInfo

 public MockBuildInfo(BuildStatus status, string requestedFor, DateTime startTime, bool buildFinished, DateTime finishTime)
 {
     this.Status = status;
     this.requestedFor = requestedFor;
     this.startTime = startTime;
     this.buildFinished = buildFinished;
     this.finishTime = finishTime;
 }
开发者ID:heberop,项目名称:TeamBuildScreen,代码行数:8,代码来源:MockBuildInfo.cs

示例8: CurrentStatus_should_reflect_the_status_of_the_latest_build

        public void CurrentStatus_should_reflect_the_status_of_the_latest_build(string sampleRss, BuildStatus expectedStatus)
        {
            var rssFeedMock = Substitute.For<IJenkinsRssFeed>();
            rssFeedMock.Read().Returns(sampleRss);

            var monitor = new BuildMonitor(rssFeedMock);

            monitor.GetCurrentBuildStatus().Should().Be(expectedStatus);
        }
开发者ID:kmckee,项目名称:JenkinsTrafficLight,代码行数:9,代码来源:BuildMonitorTests.cs

示例9: BuildState

 public BuildState(string name, BuildStatus status, DateTime finishTime, string uri, string requestedBy, TestStatistics testStatistics)
 {
     Uri = uri;
     Name = name;
     Status = status;
     FinishTime = finishTime;
     Uri = uri;
     RequestedBy = requestedBy;
     TestStatistics = testStatistics;
 }
开发者ID:madsny,项目名称:TfsToSlack,代码行数:10,代码来源:BuildState.cs

示例10: LogEntry

 public LogEntry(string branch, uint revision, Guid id, string author, string data, string message, BuildStatus status = BuildStatus.Pending)
 {
     Branch = branch;
     Revision = revision;
     ID = id;
     Author = author;
     Date = data;
     Message = message;
     Status = status;
 }
开发者ID:eatplayhate,项目名称:versionr,代码行数:10,代码来源:LogEntry.cs

示例11: Reset

 public void Reset()
 {
     Translation.ExplicitInputs.Clear();
     Translation.ExplicitOutputs.Clear();
     Translation.ImplicitInputs.Clear();
     Status = BuildStatus.NotStarted;
     Dependencies.Clear();
     Consumers.Clear();
     ImplicitInputsUpToDate = false;
 }
开发者ID:fifoforlifo,项目名称:QRBuild,代码行数:10,代码来源:BuildNode.cs

示例12: ClientInformation

		/// <summary>
		/// Initializes a new instance of the <see cref="ClientInformation"/> class.
		/// </summary>
		/// <param name="name">The name.</param>
		/// <param name="session">The session identifier.</param>
		/// <param name="status">The status of the build.</param>
		/// <param name="testResults">The test results collection.</param>
		public ClientInformation(string name, Guid session, BuildStatus status, IReadOnlyCollection<TestResult> testResults)
		{
			RequiresNotNull(name);
			RequiresNotNull(status);
			RequiresNotNull(testResults);
			this.name = name;
			this.status = status;
			this.testResults = testResults;
			this.session = session;
		}
开发者ID:jairov4,项目名称:Yorkfield,代码行数:17,代码来源:ClientInformation.cs

示例13: OnBuildStatusChanged

 public void OnBuildStatusChanged(Project project, BuildState buildState, BuildStatus buildStatus)
 {
     if (BuildStatusChanged != null)
     {
         BuildStatusChanged(this, new BuildStatusChangedEventArgs
             {
                 Project = project,
                 BuildState = buildState,
                 BuildStatus = buildStatus
             });
     }
 }
开发者ID:chuck-n0rris,项目名称:AchtungPolizei,代码行数:12,代码来源:Engine.cs

示例14: Add

 public void Add(BuildStatus status)
 {
     All ++;
     switch (status)
     {
         case BuildStatus.SUCCESS:
             Success++;
             break;
         case BuildStatus.IGNORED:
             Ignored++;
             break;
         case BuildStatus.FAILURE:
         case BuildStatus.ERROR:
             Failed++;
             break;
     }
 }
开发者ID:tomdef,项目名称:nTeamCity,代码行数:17,代码来源:TestInBuildSummaryItem.cs

示例15: WriteHeader

 private void WriteHeader(BuildStatus status)
 {
     string message = Environment.NewLine + Environment.NewLine;
     switch (status)
     {
         case BuildStatus.Failed:
             message += "Build failed.";
             break;
         case BuildStatus.SucceedWithWarning:
             message += "Build succeeded with warning.";
             break;
         case BuildStatus.Succeed:
             message += "Build succeeded.";
             break;
         default:
             break;
     }
     WriteToConsole(message, status);
 }
开发者ID:yodamaster,项目名称:docfx,代码行数:19,代码来源:ReplayLogListener.cs


注:本文中的BuildStatus类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。