v3.0 Upgrade to .net9.0
This commit is contained in:
@ -59,7 +59,7 @@ public abstract class Api : IDisposable
|
||||
while (_workOnQueue)
|
||||
if (_queue.Count > 0 && _queue.Dequeue() is { } action)
|
||||
{
|
||||
this.Logger?.Log(LogLevel.Information, $"Executing: {Enum.GetName(action.Item1)} Intensity: {action.Item3} Duration: {action.Item4}\nShocker:\n{action.Item2.ToString()}");
|
||||
this.Logger?.Log(LogLevel.Information, $"Executing: {Enum.GetName(action.Item1)} Intensity: {action.Item3} Duration: {action.Item4}\nShocker:\n{action.Item2}");
|
||||
ControlInternal(action.Item1, action.Item2, action.Item3, action.Item4);
|
||||
Thread.Sleep(action.Item4 + CommandDelay);
|
||||
}
|
||||
|
@ -38,10 +38,10 @@ public static class ApiHttpClient
|
||||
HttpClient httpClient = new();
|
||||
HttpResponseMessage response = httpClient.Send(request);
|
||||
logger?.Log(!response.IsSuccessStatusCode ? LogLevel.Error : LogLevel.Debug, string.Join("\n\t",
|
||||
"Request:",
|
||||
"Response:",
|
||||
$"\u251c\u2500\u2500 URI: {request.RequestUri}",
|
||||
$"\u251c\u2500\u2510 Headers: {string.Concat(response.Headers.Select(h => $"\n\t\u2502 {(response.Headers.Last().Key.Equals(h.Key) ? "\u2514" : "\u251c")} {h.Key}: {string.Join(", ", h.Value)}"))}",
|
||||
$"\u2514\u2500\u2500 Content: {response.Content?.ReadAsStringAsync().Result}"));
|
||||
$"\u2514\u2500\u2500 Content: {response.Content.ReadAsStringAsync().Result}"));
|
||||
httpClient.Dispose();
|
||||
return response;
|
||||
}
|
||||
|
Reference in New Issue
Block a user