Dot net 8
Some checks failed
Build App / Build (push) Failing after 43s

This commit is contained in:
2025-02-09 22:30:00 +01:00
parent 91664406c4
commit 73407e5867
16 changed files with 64 additions and 54 deletions

View File

@@ -1,13 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Platforms>AnyCPU;x64</Platforms>
<LangVersion>12</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="RestSharp" Version="110.2.0" />
<PackageReference Include="RestSharp" Version="112.1.0" />
</ItemGroup>
<ItemGroup>

View File

@@ -29,13 +29,19 @@ namespace LaDOSE.REST
{
}
public void Connect(Uri url, string user, string password)
public RestService(Uri url, string user, string password)
{
Client = new RestClient(url);
this.username = user;
this.password = password;
}
public void Connect(Uri url, string user, string password)
{
// Client = new RestClient(url);
// this.username = user;
// this.password = password;
string token;
try
{
@@ -79,7 +85,7 @@ namespace LaDOSE.REST
private void CheckToken()
{
if (this.Auth == null || this.Auth.Expire <= DateTime.Now)
if (this.Auth == null || this.Auth.Expire.ToUniversalTime() <= DateTime.Now.ToUniversalTime())
{
GetToken(this.username,this.password);
}