smarter canvas updates, only update when a change is detected

This commit is contained in:
2023-07-31 14:06:40 -06:00
parent e987df30d3
commit 70db40867c
13 changed files with 465 additions and 204 deletions

View File

@@ -46,7 +46,26 @@ public class WebRequestor : IWebRequestor
return (Deserialize<T>(response), response);
}
public T? Deserialize<T>(RestResponse response)
public async Task<RestResponse> PutAsync(RestRequest request)
{
var response = await client.ExecutePutAsync(request);
if (!response.IsSuccessful)
{
System.Console.WriteLine(response.Content);
System.Console.WriteLine(response.ResponseUri);
System.Console.WriteLine("error with response");
throw new Exception("error with response");
}
return response;
}
public async Task<(T?, RestResponse)> PutAsync<T>(RestRequest request)
{
var response = await client.ExecutePutAsync(request);
return (Deserialize<T>(response), response);
}
private T? Deserialize<T>(RestResponse response)
{
if (!response.IsSuccessful)
{