本文整理汇总了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;
}
示例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
};
}
示例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.");
}
}
示例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;
}
示例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");
}
}
示例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);
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例11: Reset
public void Reset()
{
Translation.ExplicitInputs.Clear();
Translation.ExplicitOutputs.Clear();
Translation.ImplicitInputs.Clear();
Status = BuildStatus.NotStarted;
Dependencies.Clear();
Consumers.Clear();
ImplicitInputsUpToDate = false;
}
示例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;
}
示例13: OnBuildStatusChanged
public void OnBuildStatusChanged(Project project, BuildState buildState, BuildStatus buildStatus)
{
if (BuildStatusChanged != null)
{
BuildStatusChanged(this, new BuildStatusChangedEventArgs
{
Project = project,
BuildState = buildState,
BuildStatus = buildStatus
});
}
}
示例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;
}
}
示例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);
}