public FindProcessById() { ExpectedResult = new FindProcessByIdResult(); ExpectedResponse = new FindProcessByIdResponse(JToken.FromObject(1), ExpectedResult); MessagingClient.SendMessageAsync <FindProcessByIdRequest, FindProcessByIdResponse>(null) .ReturnsForAnyArgs(GetCompletedTask(ExpectedResponse)); }
public Task<FindProcessByIdResult> ExecuteAsync(FindProcessByIdParams p) { IProcess process; var processKey = processTracker.GetProcessById(p.id, out process); if (process == null) { return Task.FromResult(null as FindProcessByIdResult); } var result = new FindProcessByIdResult { id = process.Id, processKey = processKey, environment = process.Environment }; return Task.FromResult(result); }
public Task <FindProcessByIdResult> ExecuteAsync(FindProcessByIdParams p) { IProcess process; var processKey = processTracker.GetProcessById(p.id, out process); if (process == null) { return(Task.FromResult(null as FindProcessByIdResult)); } var result = new FindProcessByIdResult { id = process.Id, processKey = processKey, environment = process.Environment }; return(Task.FromResult(result)); }