private SendRequest ( HttpMethod method, object>.ICollection |
||
method | HttpMethod | |
body | object>.ICollection | |
return | Task |
void AppVeyorAddTest(string testName, string testFramework, string fileName, string outcome, long?durationMilliseconds, string errorMessage, string errorStackTrace, string stdOut, string stdErr) { var body = new AddUpdateTestRequest { TestName = testName, TestFramework = testFramework, FileName = fileName, Outcome = outcome, DurationMilliseconds = durationMilliseconds, ErrorMessage = errorMessage, ErrorStackTrace = errorStackTrace, StdOut = TrimStdOut(stdOut), StdErr = TrimStdOut(stdErr) }; try { AppVeyorClient.SendRequest(Logger, $"{baseUri}/api/tests", "POST", body); } catch (Exception ex) { Logger.LogError("Error communicating AppVeyor Build Worker API: " + ex.Message); } }
static void AppVeyorAddTest(string testName, string testFramework, string fileName, string outcome, long?durationMilliseconds, string errorMessage, string errorStackTrace, string stdOut, string stdErr) { if (!AppVeyorClient.IsRunningInAppVeyor) { return; } var body = new AddUpdateTestRequest { TestName = testName, TestFramework = testFramework, FileName = fileName, Outcome = outcome, DurationMilliseconds = durationMilliseconds, ErrorMessage = errorMessage, ErrorStackTrace = errorStackTrace, StdOut = TrimStdOut(stdOut), StdErr = TrimStdOut(stdErr) }; try { AppVeyorClient.SendRequest("api/tests", "POST", body); } catch (Exception ex) { Console.Error.WriteLine("Error communicating AppVeyor Build Worker API: " + ex.Message); } }
void AppVeyorAddTest(string testName, string testFramework, string fileName, string outcome, long?durationMilliseconds, string errorMessage, string errorStackTrace, string stdOut) { var body = new AddUpdateTestRequest { TestName = testName, TestFramework = testFramework, FileName = fileName, Outcome = outcome, DurationMilliseconds = durationMilliseconds, ErrorMessage = errorMessage, ErrorStackTrace = errorStackTrace, StdOut = TrimStdOut(stdOut), }; AppVeyorClient.SendRequest(Logger, $"{baseUri}/api/tests", HttpMethod.Post, body); }