This commit is contained in:
MarcinZiabek
2023-05-14 23:50:18 +02:00
parent 4fcd955238
commit 4c679978be
4 changed files with 7 additions and 6 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ namespace QuestPDF.ReportSample
[Test]
public void GenerateAndShowPdf()
{
Report.ShowInPreviewer(5000);
Report.ShowInPreviewer();
//ImagePlaceholder.Solid = true;
//
+1 -1
View File
@@ -11,7 +11,7 @@ internal sealed class IncompatibleVersionApiRequest
internal sealed class NotifyPresenceApiRequest
{
public string Id { get; set; }
public string ClientId { get; set; }
public string LibraryVersion { get; set; }
public bool IsDotnet6OrBeyond { get; set; }
public bool IsDotnet3OrBeyond { get; set; }
+4 -3
View File
@@ -128,11 +128,12 @@ namespace QuestPDF.Previewer
#endregion
#region Checking compatibility
private async Task<Version> GetPreviewerVersion()
{
using var result = await HttpClient.GetAsync("/version");
return await result.Content.ReadFromJsonAsync<Version>();
var response = await result.Content.ReadFromJsonAsync<string>();
return Version.Parse(response);
}
private async Task CheckVersionCompatibility(Version version)
@@ -173,7 +174,7 @@ namespace QuestPDF.Previewer
{
var payload = new NotifyPresenceApiRequest
{
Id = ClientId,
ClientId = ClientId,
LibraryVersion = LibraryVersion,
IsDotnet6OrBeyond = RuntimeDetector.IsNet6OrGreater,
IsDotnet3OrBeyond = RuntimeDetector.IsNet3OrGreater,
+1 -1
View File
@@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>10</LangVersion>