本文整理汇总了C#中TaskResult类的典型用法代码示例。如果您正苦于以下问题:C# TaskResult类的具体用法?C# TaskResult怎么用?C# TaskResult使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TaskResult类属于命名空间,在下文中一共展示了TaskResult类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例2: RemoteTaskWrapper
public RemoteTaskWrapper(RemoteTask remoteTask, IRemoteTaskServer server)
{
RemoteTask = remoteTask;
this.server = server;
result = TaskResult.Inconclusive;
}
示例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);
}
示例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);
}
示例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;
}
示例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);
}
示例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);
}
}
}
示例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);
}
}
}
示例9: StorEvilTaskRunner
public StorEvilTaskRunner(IRemoteTaskServer server)
: base(server)
{
Logger.Log("StorEvilTaskRunner constructed");
server.ClientMessage("TaskRunner starting");
//_isDebug = server.GetConfiguration().IsInInternalDebug;
_result = TaskResult.Success;
}
示例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);
}
示例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;
}
示例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;
}
示例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);
}
示例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);
}
}
示例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;
}