• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# BuildStatus类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: AppendArgument

 protected static void AppendArgument(StringBuilder sb, string argname, BuildStatus value)
 {
     if(value != BuildStatus.Unknown)
     {
         BeginArgument(sb, argname);
         switch(value)
         {
             case BuildStatus.Error:
                 sb.Append("ERROR");
                 break;
             case BuildStatus.Failure:
                 sb.Append("FAILURE");
                 break;
             case BuildStatus.Success:
                 sb.Append("SUCCESS");
                 break;
             default:
                 throw new ApplicationException();
         }
     }
 }
开发者ID:Kuzq,项目名称:gitter,代码行数:21,代码来源:ObjectLocator.cs


示例17: ChangeProgress

        private void ChangeProgress(BuildStatus status)
        {
            var color = Color.FromArgb(255, 47, 201, 31); 
            var buildButtonText = _strings.Build;
            var progressIndicator = string.Empty;
            var staticIndicatorVisible = false;

            if(status == BuildStatus.Error)
            {
                color = Color.FromArgb(255, 241, 37, 47);
                progressIndicator = "\uF071";
                staticIndicatorVisible = true;
            }
            else if (status == BuildStatus.Running)
            {
                color = Color.FromArgb(255, 38, 156, 245); 
                buildButtonText = _strings.Abort;
                progressIndicator = "\uF021";
            }
            else if (status == BuildStatus.Success)
            {
                progressIndicator = "\uF14A";
                staticIndicatorVisible = true;
            }

            Application.Current.Dispatcher.BeginInvoke(
                DispatcherPriority.Background,
                new Action(() =>
                {
                    BuildButtonText = buildButtonText;
                    ProgressColor = new SolidColorBrush(color);
                    ProgressIndicator = progressIndicator;
                    StaticIndicatorVisible = staticIndicatorVisible;
                    DynamicIndicatorVisible = !staticIndicatorVisible;
                }));
        }
开发者ID:llenroc,项目名称:sharpDox,代码行数:36,代码来源:ProgressBarViewModel.cs


示例18: SetBuildStatus

        private void SetBuildStatus(BuildStatus status )
        {
            _buildStatus = status;

            if (status == BuildStatus.Running)
            {
                this.statusStrip1.BackColor = System.Drawing.Color.Chocolate;
                this.statusStrip1.ForeColor = System.Drawing.Color.White;
            }
            else if (status == BuildStatus.Success)
            {
                this.statusStrip1.BackColor = System.Drawing.Color.ForestGreen;
                this.statusStrip1.ForeColor = System.Drawing.Color.White;
            }
            else if ( status==BuildStatus.Failure )
            {
                this.statusStrip1.BackColor = System.Drawing.Color.Red;
                this.statusStrip1.ForeColor = System.Drawing.Color.White;
            }
            else
            {
                this.statusStrip1.BackColor = System.Drawing.SystemColors.ControlLightLight;
                this.statusStrip1.ForeColor = defaultForeColor;
            }
        }
开发者ID:rgiot,项目名称:phactory,代码行数:25,代码来源:View.cs


示例19: AddRetentionPolicy

 public IRetentionPolicy AddRetentionPolicy(BuildReason reason, BuildStatus status, int numberToKeep, DeleteOptions deleteOptions)
 {
     throw new NotImplementedException();
 }
开发者ID:KjartanThor,项目名称:CustomActivities,代码行数:4,代码来源:MockIBuildDefinition.cs


示例20: CreateManualBuild

 public IBuildDetail CreateManualBuild(string buildNumber, string dropLocation, BuildStatus buildStatus, IBuildController controller, string requestedFor)
 {
     throw new NotImplementedException();
 }
开发者ID:KjartanThor,项目名称:CustomActivities,代码行数:4,代码来源:MockIBuildDefinition.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# BuildTarget类代码示例发布时间:2022-05-24
下一篇:
C# BuildOptions类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap