本文整理汇总了C#中TaskResult类的典型用法代码示例。如果您正苦于以下问题:C# TaskResult类的具体用法?C# TaskResult怎么用?C# TaskResult使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TaskResult类属于命名空间,在下文中一共展示了TaskResult类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: TaskState
public TaskState(RemoteTask task, TaskState parentState, string message = "Internal Error (xunit runner): No status reported", TaskResult result = TaskResult.Inconclusive)
{
Task = task;
Message = message;
Result = result;
ParentState = parentState;
}
开发者ID:EddieGarmon,项目名称:resharper-xunit,代码行数:7,代码来源:ReSharperRunnerLogger.cs
示例2: RemoteTaskWrapper
public RemoteTaskWrapper(RemoteTask remoteTask, IRemoteTaskServer server)
{
RemoteTask = remoteTask;
this.server = server;
result = TaskResult.Inconclusive;
}
开发者ID:Booksbaum,项目名称:resharper-xunit,代码行数:7,代码来源:RemoteTaskWrapper.cs
示例3: AssertTaskFinishedCalled
private static void AssertTaskFinishedCalled(FakeRemoteTaskServer.TaskFinishedParameters taskFinishedCall,
RemoteTask remoteTask, string message, TaskResult result)
{
Assert.Equal(remoteTask, taskFinishedCall.RemoteTask);
Assert.Equal(message, taskFinishedCall.Message);
Assert.Equal(result, taskFinishedCall.Result);
}
开发者ID:hazzik,项目名称:ReSharper.XUnitTestRunner,代码行数:7,代码来源:NewReSharperRunnerLoggerTests.cs
示例4: Failed
public void Failed(IExample example, Exception exception)
{
LastResult = TaskResult.Exception;
_server.TaskOutput(CurrentTask, "Failed:", TaskOutputType.STDERR);
_server.TaskOutput(CurrentTask, exception.ToString(), TaskOutputType.STDERR);
_server.TaskFinished(CurrentTask, exception.ToString(), TaskResult.Exception);
}
开发者ID:davidmfoley,项目名称:bickle,代码行数:7,代码来源:ReSharperListener.cs
示例5: TaskContext
/// <summary>
/// Initializes the <see cref="TaskContext"/>
/// </summary>
/// <param name="associatedData"></param>
public TaskContext(ITask task, object associatedData)
{
Task = task;
Result = new TaskResult();
AssociatedData = associatedData;
_progress = 0;
}
开发者ID:ProCoSys,项目名称:Bifrost,代码行数:12,代码来源:TaskContext.cs
示例6: AddDirectoyByNameToZip
internal static TaskResult AddDirectoyByNameToZip(Task task, TaskResult result)
{
var zip = (ZipFile)Get(task, 0, result);
foreach (var value in ((List<object>)Get(task, 1, result)))
{
zip.AddDirectoryByName(value.ToString());
}
return Next(task, result);
}
开发者ID:EliandroLA,项目名称:TaskManager,代码行数:9,代码来源:Command.cs
示例7: EndTarget
public void EndTarget(IObsoleteTask task, string name, IBounceCommand command, TaskResult result) {
if (logOptions.ReportTargetEnd) {
if (result == TaskResult.Success) {
StdOut.WriteLine("{0} target: {1}", command.PastTense, name);
} else {
StdErr.WriteLine("failed to {0} target: {1}", command.InfinitiveTense, name);
}
}
}
开发者ID:nbucket,项目名称:bounce,代码行数:9,代码来源:TaskLog.cs
示例8: EndTask
public void EndTask(IObsoleteTask task, IBounceCommand command, TaskResult result) {
if (logOptions.ReportTaskEnd && task.IsLogged && command.IsLogged) {
if (result == TaskResult.Success) {
StdOut.WriteLine("{0} task: {1}", command.PastTense, task);
} else {
StdErr.WriteLine("failed to {0} task: {1}", command.InfinitiveTense, task);
}
}
}
开发者ID:nbucket,项目名称:bounce,代码行数:9,代码来源:TaskLog.cs
示例9: StorEvilTaskRunner
public StorEvilTaskRunner(IRemoteTaskServer server)
: base(server)
{
Logger.Log("StorEvilTaskRunner constructed");
server.ClientMessage("TaskRunner starting");
//_isDebug = server.GetConfiguration().IsInInternalDebug;
_result = TaskResult.Success;
}
开发者ID:pawelpabich,项目名称:storevil,代码行数:9,代码来源:StorEvilTaskRunner.cs
示例10: TaskCompleted
public void TaskCompleted()
{
TaskResult result = new TaskResult();
result.gridPosition = gridPosition;
result.completionTime = Time.time - creationTime;
result.TimeoutTime = LifeTime;
result.completionPercentage = repetitionNr / TotalReps;
GameManager.Instance.TaskCompleted(result);
}
开发者ID:sulkaharo,项目名称:morning,代码行数:9,代码来源:TaskManagerBase.cs
示例11: ScenarioFailed
public void ScenarioFailed(Scenario scenario, string successPart, string failedPart, string message)
{
Output(successPart + " [" + failedPart + "] -- failed");
Output("----------");
Output(message);
_server.TaskException(_remoteTask, new[] {new TaskException("StorEvil failure", message, ""),});
Result = TaskResult.Exception;
}
开发者ID:codereflection,项目名称:storevil,代码行数:9,代码来源:ResharperResultListener.cs
示例12: CouldNotInterpret
public void CouldNotInterpret(Scenario scenario, string line)
{
Output("Could not interpret:\r\n" + line);
var suggestion = new ImplementationHelper().Suggest(line);
Output("You could try the following:");
Output(suggestion);
Result = TaskResult.Skipped;
}
开发者ID:codereflection,项目名称:storevil,代码行数:10,代码来源:ResharperResultListener.cs
示例13: TaskFinished
public void TaskFinished(RemoteTask remoteTask, string message, TaskResult result, TimeSpan duration)
{
Debug.Assert(result != TaskResult.Inconclusive);
clientController.TaskFinished(remoteTask);
if (result == TaskResult.Skipped)
server.TaskExplain(remoteTask, message);
if (duration >= TimeSpan.Zero)
server.TaskDuration(remoteTask, duration);
server.TaskFinished(remoteTask, message, result);
}
开发者ID:bleedow,项目名称:resharper-xunit,代码行数:11,代码来源:RemoteTaskServer.cs
示例14: SetMethodTasks
public void SetMethodTasks(ICollection<XunitTestMethodTask> value)
{
if (value == null || value.Count == 0)
{
classResult = TaskResult.Inconclusive;
methodTasks = new Dictionary<string, XunitTestMethodTask>();
}
else
{
methodTasks = value.ToDictionary(x => x.ShortName);
}
}
开发者ID:hazzik,项目名称:ReSharper.XUnitTestRunner,代码行数:12,代码来源:ReSharperRunnerLogger.cs
示例15: Execute
public override TaskResult Execute(TaskExecutionNode node)
{
if (node.RemoteTask is RunScenarioTask)
{
var result = ExecuteScenario(node);
if (result.Status != TaskResult.Success)
_result = result.Status;
return result.Status;
}
return TaskResult.Success;
}
开发者ID:pawelpabich,项目名称:storevil,代码行数:12,代码来源:StorEvilTaskRunner.cs
示例16: ClassFailed
// Called when a class failure is encountered (i.e., when a fixture from IUseFixture throws an
// exception during construction or System.IDisposable.Dispose)
// Called after all tests within the class have been started and finished
public bool ClassFailed(string className, string exceptionType, string message, string stackTrace)
{
var methodMessage = string.Format("Class failed in {0}", className);
foreach (var methodTask in methodTasks.Values)
{
server.TaskException(methodTask, new[] { new TaskException(null, methodMessage, null) } );
server.TaskFinished(methodTask, methodMessage, TaskResult.Error);
}
server.TaskException(classTask, ExceptionConverter.ConvertExceptions(exceptionType, message, stackTrace, out classFinishMessage));
classResult = TaskResult.Exception;
// Let's carry on running tests - I guess if it were a catastrophic error, we could chose to abort
return true;
}
开发者ID:hazzik,项目名称:ReSharper.XUnitTestRunner,代码行数:18,代码来源:ReSharperRunnerLogger.cs
示例17: Failed
public void Failed(TaskException[] exceptions, string exceptionMessage, string childMessage = null)
{
if (childMessage != null)
{
Reset();
var childExceptions = new[] { new TaskException(null, childMessage, null) };
foreach (var child in children ?? EmptyList<RemoteTaskWrapper>.InstanceList)
child.Error(childExceptions, childMessage);
}
if (result == TaskResult.Inconclusive)
{
result = TaskResult.Exception;
message = exceptionMessage;
server.TaskException(RemoteTask, exceptions);
}
}
开发者ID:Booksbaum,项目名称:resharper-xunit,代码行数:18,代码来源:RemoteTaskWrapper.cs
示例18: Finished
public void Finished(decimal durationInSeconds = 0, bool childTestsFailed = false)
{
// Result is based on child tasks
if (result == TaskResult.Inconclusive)
{
result = childTestsFailed ? TaskResult.Exception : TaskResult.Success;
message = childTestsFailed ? "One or more child tests failed" : string.Empty;
}
// Only finish once - so a test can share a test case's task
if (!finished)
{
var duration = TimeSpan.FromSeconds((double) durationInSeconds);
if (duration >= TimeSpan.Zero)
server.TaskDuration(RemoteTask, duration);
server.TaskFinished(RemoteTask, message, result);
}
finished = true;
}
开发者ID:Booksbaum,项目名称:resharper-xunit,代码行数:19,代码来源:RemoteTaskWrapper.cs
示例19: MergeTaskResults
// Merge 2 TaskResults get the worst result.
// Succeeded -> SucceededWithIssues -> Failed/Canceled/Skipped/Abandoned
// SucceededWithIssues -> Failed/Canceled/Skipped/Abandoned
// Failed -> Failed
// Canceled -> Canceled
// Skipped -> Skipped
// Abandoned -> Abandoned
public static TaskResult MergeTaskResults(TaskResult? currentResult, TaskResult comingResult)
{
if (currentResult == null)
{
return comingResult;
}
// current result is Failed/Canceled/Skip/Abandoned
if (currentResult >= TaskResult.Failed)
{
return currentResult.Value;
}
// comming result is bad than current result
if (comingResult >= currentResult)
{
return comingResult;
}
return currentResult.Value;
}
开发者ID:codedebug,项目名称:vsts-agent,代码行数:28,代码来源:TaskResultExtension.cs
示例20: EndTarget
public void EndTarget(IObsoleteTask task, string name, IBounceCommand command, TaskResult result) {
output.WriteLine(TeamCityFormatter.FormatTeamCityMessageWithFields("buildStatus", "status", result == TaskResult.Success? "SUCCESS": "FAILURE"));
output.WriteLine(TeamCityFormatter.FormatTeamCityMessage("progressFinish", name));
}
开发者ID:nbucket,项目名称:bounce,代码行数:4,代码来源:TeamCityTaskLog.cs
注:本文中的TaskResult类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论