Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to system.text.json #2713

Merged
merged 93 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
7164166
Some progress
kblok Jun 3, 2024
6976636
Merge branch 'master' into migrate-to-system.text.json
kblok Jul 23, 2024
8bb62ca
More progress
kblok Jul 24, 2024
115bffb
more progress
kblok Jul 24, 2024
7f48edc
More progress
kblok Jul 24, 2024
f926b9e
Docs changes
actions-user Jul 24, 2024
d428622
Library builds
kblok Jul 24, 2024
c7bc834
More progress
kblok Jul 24, 2024
4b40e5a
Solution builds
kblok Jul 24, 2024
9a54fdb
Merge branch 'migrate-to-system.text.json' of https://github.com/hard…
kblok Jul 24, 2024
2dcb752
Docs changes
actions-user Jul 24, 2024
7962731
format
kblok Jul 24, 2024
4fe37e7
It seems that the demo runs
kblok Jul 24, 2024
6a378d4
Fix expectation loading
kblok Jul 24, 2024
d73a998
Fix accessibility tests
kblok Jul 25, 2024
7a2e4b8
Fix tests using json
kblok Jul 25, 2024
45e689b
Docs changes
actions-user Jul 25, 2024
a2b1e36
Fix aria tests and RemoteObject type checks
kblok Jul 25, 2024
4e17a45
Merge branch 'migrate-to-system.text.json' of https://github.com/hard…
kblok Jul 25, 2024
011a164
Fix more accessibility steps and chrome version checker
kblok Jul 25, 2024
e036455
more json fixes
kblok Jul 25, 2024
4be124a
Fix enum parser
kblok Jul 25, 2024
a51a60a
Fix page event test
kblok Jul 25, 2024
eb719d6
fix bounding box
kblok Jul 25, 2024
a00bbfa
Fix CSS Coverage Test
kblok Jul 25, 2024
6ba4aca
Fix console tests
kblok Jul 26, 2024
1eaa99f
Docs changes
actions-user Jul 26, 2024
52e9cd8
Add enum member to MouseButton
kblok Jul 26, 2024
d8093e7
Merge branch 'migrate-to-system.text.json' of https://github.com/hard…
kblok Jul 26, 2024
9c44c84
Improve enums
kblok Jul 26, 2024
4411ed3
Fix tracing tests
kblok Jul 26, 2024
8b414c9
Fix JS coverage tests
kblok Jul 26, 2024
6e47663
Fix json tests
kblok Jul 26, 2024
36ca237
Fix SetUserAgentTests
kblok Jul 26, 2024
1848dff
Fix QueryAllTests
kblok Jul 26, 2024
89da6bb
Fix security details
kblok Jul 28, 2024
ed51ac8
Fix keyboard tests
kblok Jul 28, 2024
abfe4c4
Fix ResponseJsonTests
kblok Jul 28, 2024
f41e7ae
Fix ElementHandleScreenshotTests
kblok Jul 28, 2024
ba1187a
Some early review
kblok Jul 29, 2024
7aaadad
Internal sealed converters
kblok Jul 30, 2024
52634bb
fix condition
kblok Jul 30, 2024
7213fa0
Make visible to the Nunit project
kblok Jul 30, 2024
b70ae25
Fix touch tests
kblok Jul 30, 2024
0173028
Fix JS Coverage tests
kblok Jul 30, 2024
866fce7
Fix screenshot rounding
kblok Jul 30, 2024
8c9b807
Fix evaluate with nulls
kblok Jul 30, 2024
36e0333
Fix evaluation exceptions
kblok Jul 30, 2024
aafe340
Fix complex objects test
kblok Jul 30, 2024
ba689fd
Fix JS Handle validation
kblok Jul 31, 2024
93f23ae
Fix complex object tests
kblok Jul 31, 2024
b06b83f
Remove Mock verbosity
kblok Jul 31, 2024
4f38819
Fix wait for frame
kblok Jul 31, 2024
8b51b63
Fix console logs
kblok Jul 31, 2024
6b8d6e1
Fix PageWorkerTests
kblok Jul 31, 2024
fc1cffd
Convert context id in Firefox
kblok Jul 31, 2024
9d42986
Flag beta version
kblok Jul 31, 2024
9e84aef
Restore some json config
kblok Aug 1, 2024
16fc6f2
undo a change
kblok Aug 1, 2024
68bb704
We don't need this
kblok Aug 1, 2024
4c6b0d7
AOT Support!
kblok Aug 1, 2024
77e39db
Remove extra types
kblok Aug 1, 2024
f7803f7
Small .NET framework test
kblok Aug 1, 2024
247063d
Test AOT
kblok Aug 1, 2024
aef54b3
AOT only on net8.0
kblok Aug 1, 2024
ff5bc1e
.NET Framework does not like generic attributes
kblok Aug 1, 2024
c4a9dc8
remove remaining newtonsoft
kblok Aug 1, 2024
8ba4523
remove unused imports
kblok Aug 1, 2024
5cf6258
Docs changes
actions-user Aug 1, 2024
551d5dc
some styles
kblok Aug 1, 2024
f83fba1
Merge branch 'migrate-to-system.text.json' of https://github.com/hard…
kblok Aug 1, 2024
b81ca22
internal sealed
kblok Aug 1, 2024
2fb6280
Include System.Text.Json only for net standard
kblok Aug 1, 2024
f38e5ea
remove extra constructor
kblok Aug 1, 2024
763de7d
Merge remote-tracking branch 'origin/master' into migrate-to-system.t…
kblok Aug 5, 2024
b8f777a
Update lib/PuppeteerSharp/Helpers/Json/AnyTypeToStringConverter.cs
kblok Aug 5, 2024
79512f4
cr
kblok Aug 5, 2024
8cddf3d
cr
kblok Aug 5, 2024
d843362
Merge branch 'migrate-to-system.text.json' of https://github.com/hard…
kblok Aug 5, 2024
3d013ac
Way too generic serializing attribute
kblok Aug 5, 2024
1d4ec92
Update lib/PuppeteerSharp.Nunit/PuppeteerTestAttribute.cs
kblok Aug 5, 2024
28c19b9
Improve serialization
kblok Aug 6, 2024
93a390c
Merge branch 'migrate-to-system.text.json' of https://github.com/hard…
kblok Aug 6, 2024
df49cba
Add more types
kblok Aug 6, 2024
c739f74
rollback AOT by default
kblok Aug 6, 2024
0d94b1b
AOT tests
kblok Aug 7, 2024
94d49de
Docs changes
actions-user Aug 7, 2024
97d8700
beta2
kblok Aug 7, 2024
98d2cfd
Revert "AOT tests"
kblok Aug 7, 2024
0e2e642
You can't AOT a test
kblok Aug 7, 2024
356bfd3
Docs changes
actions-user Aug 7, 2024
147b62d
Add AOT demo
kblok Aug 7, 2024
320b3ef
Merge branch 'migrate-to-system.text.json' of https://github.com/hard…
kblok Aug 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions .github/workflows/demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,17 @@ jobs:
working-directory: ./demos/PuppeteerSharpPdfDemo
run: |
dotnet restore PuppeteerSharpPdfDemo-Local.csproj
- name: Run Project
- name: Run on .NET
working-directory: ./demos/PuppeteerSharpPdfDemo
run: |
dotnet run --project PuppeteerSharpPdfDemo-Local.csproj auto-exit
dotnet run --project PuppeteerSharpPdfDemo-Local.csproj auto-exit -f net8.0
- name: Run with AOT
if: matrix.os == 'macos-latest'
working-directory: ./demos/PuppeteerSharpPdfDemo
run: |
dotnet run --project PuppeteerSharpPdfDemo-Local.csproj -r osx-arm64 -c Release -f net8.0 auto-exit
- name: Run on .NET Framework
if: matrix.os == 'windows-2022'
working-directory: ./demos/PuppeteerSharpPdfDemo
run: |
dotnet run --project PuppeteerSharpPdfDemo-Local.csproj auto-exit -f net471
2 changes: 1 addition & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
Get-ChildItem -Path cert:\CurrentUSer\my | where { $_.friendlyname -eq "Puppeteer" } | Export-Certificate -FilePath $env:GITHUB_WORKSPACE\lib\PuppeteerSharp.TestServer\testCert.cer
- name: Check formatting
if: ${{ matrix.os == 'ubuntu-latest' && matrix.browser == 'CHROME' && matrix.mode == 'headless' }}
run: dotnet format ./lib/PuppeteerSharp.sln --verify-no-changes
run: dotnet format ./lib/PuppeteerSharp.sln --verify-no-changes --exclude-diagnostics CA1865
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to exclude CA1865 because if generates invalid code on netstandard2.0

- name: Build
working-directory: lib
run: dotnet build PuppeteerSharp.sln
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ var result = await page.GetContentAsync();
```cs
await using var page = await browser.NewPageAsync();
var seven = await page.EvaluateExpressionAsync<int>("4 + 3");
var someObject = await page.EvaluateFunctionAsync<dynamic>("(value) => ({a: value})", 5);
Console.WriteLine(someObject.a);
var someObject = await page.EvaluateFunctionAsync<JsonElement>("(value) => ({a: value})", 5);
Console.WriteLine(someObject.GetProperty("a").GetString());
```
<sup><a href='https://github.com/hardkoded/puppeteer-sharp/blob/master/lib/PuppeteerSharp.Tests/QuerySelectorTests/ElementHandleQuerySelectorEvalTests.cs#L16-L21' title='Snippet source file'>snippet source</a> | <a href='#snippet-Evaluate' title='Start of snippet'>anchor</a></sup>
<sup><a href='https://github.com/hardkoded/puppeteer-sharp/blob/master/lib/PuppeteerSharp.Tests/QuerySelectorTests/ElementHandleQuerySelectorEvalTests.cs#L17-L22' title='Snippet source file'>snippet source</a> | <a href='#snippet-Evaluate' title='Start of snippet'>anchor</a></sup>
<!-- endSnippet -->

### Wait For Selector
Expand Down
22 changes: 22 additions & 0 deletions demos/PuppeteerSharpPdfDemo/Program.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
using System;
using System.Linq;
using System.IO;
using System.Text.Json.Serialization;
using System.Text.Json.Serialization.Metadata;
using System.Threading.Tasks;
using PuppeteerSharp;

Expand All @@ -10,6 +12,10 @@ class MainClass
{
public static async Task Main(string[] args)
{
#if NET8_0_OR_GREATER
Puppeteer.ExtraJsonSerializerContext = DemoJsonSerializationContext.Default;
#endif

var options = new LaunchOptions { Headless = true };

Console.WriteLine("Downloading chromium");
Expand All @@ -28,10 +34,26 @@ public static async Task Main(string[] args)

Console.WriteLine("Export completed");

#if NET8_0_OR_GREATER
// AOT Test
var result = await page.EvaluateFunctionAsync<TestClass>("test => test", new TestClass { Name = "Dario"});
Console.WriteLine($"Name evaluated to {result.Name}");
#endif
if (!args.Any(arg => arg == "auto-exit"))
{
Console.ReadLine();
}
}
}

#if NET8_0_OR_GREATER
public class TestClass
{
public string Name { get; set; }
}

[JsonSerializable(typeof(TestClass))]
public partial class DemoJsonSerializationContext : JsonSerializerContext
{}
#endif
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<LangVersion>8.0</LangVersion>
<TargetFrameworks>net8.0;net471</TargetFrameworks>
<LangVersion>12</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PublishAot>true</PublishAot>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\lib\PuppeteerSharp\PuppeteerSharp.csproj" />
Expand Down
16 changes: 15 additions & 1 deletion lib/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,18 @@ dotnet_diagnostic.CA1054.severity = none
dotnet_diagnostic.CA1056.severity = none
# Avoid empty interfaces
dotnet_diagnostic.CA1040.severity = none
# Use 'ArgumentNullException.ThrowIfNull' instead of explicitly throwing a new exception instance
# This is not netstandard compatible
dotnet_diagnostic.CA1510.severity = none
# Use 'string.StartsWith(char)' instead of 'string.StartsWith(string)' when you have a string with a single char
# This is not .NET 8 compatible
dotnet_diagnostic.CA1865.severity = none
# Use 'ObjectDisposedException.ThrowIf' instead of explicitly throwing a new exception instance
# This is not netstandard compatible
dotnet_diagnostic.CA1513.severity = none
# Use Change the 'WriteAsync' method call to use the 'Stream.WriteAsync(ReadOnlyMemory<byte>, CancellationToken)' overload
# This is not netstandard compatible
dotnet_diagnostic.CA1835.severity = none
# Use ConfigureAwait
dotnet_diagnostic.CA2007.severity = error
# CA1711: Identifiers should not have incorrect suffix
Expand All @@ -264,6 +276,8 @@ dotnet_diagnostic.CA1815.severity = suggestion
# CA1848: Use the LoggerMessage delegates
# TODO: REMOVE
dotnet_diagnostic.CA1848.severity = none
# internal sealed
dotnet_diagnostic.CA1852.severity = error
# CA1859: Use concrete types when possible for improved performance
# It collides with https://www.jetbrains.com/help/rider/ReturnTypeCanBeEnumerable.Local.html
dotnet_diagnostic.CA1859.severity = none
Expand Down Expand Up @@ -303,7 +317,7 @@ dotnet_diagnostic.CA1001.severity = error
dotnet_diagnostic.CA1304.severity = error
# CA1305: String.Format with culture
dotnet_diagnostic.CA1305.severity = error
# CA1304: CA1308: Normalize strings to uppercase
# CA1308: Normalize strings to uppercase
dotnet_diagnostic.CA1308.severity = none
# CA1721: The property name 'DefaultArgs' is confusing given the existence of method 'GetDefaultArgs'. Rename or remove one of these members.
dotnet_diagnostic.CA1721.severity = error
Expand Down
2 changes: 1 addition & 1 deletion lib/Common/CommonProps.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
</None>
</ItemGroup>
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
<Exec Command="dotnet format $(ProjectPath)" />
<Exec Command="dotnet format $(ProjectPath) --exclude-diagnostics CA1865" />
</Target>
</Project>
8 changes: 4 additions & 4 deletions lib/PuppeteerSharp.DevicesFetcher/Device.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
using Newtonsoft.Json;
using System.Text.Json.Serialization;

namespace PuppeteerSharp.DevicesFetcher
{
public class Device
{
[JsonProperty("userAgent")]
[JsonPropertyName("userAgent")]
public string UserAgent { get; set; }
[JsonProperty("name")]
[JsonPropertyName("name")]
public string Name { get; set; }
[JsonProperty("viewport")]
[JsonPropertyName("viewport")]
public ViewPort Viewport { get; set; }
}
}
5 changes: 3 additions & 2 deletions lib/PuppeteerSharp.DevicesFetcher/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
using Newtonsoft.Json;

namespace PuppeteerSharp.DevicesFetcher
{
static class Program
Expand Down Expand Up @@ -34,7 +35,7 @@ static async Task Main(string[] args)
Device[] devices;
try
{
devices = JsonConvert.DeserializeObject<Device[]>(text);
devices = JsonSerializer.Deserialize<Device[]>(text);
}
catch (Exception ex)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
<TargetFramework>net8.0</TargetFramework>
<LangVersion>12</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\PuppeteerSharp\PuppeteerSharp.csproj" />
</ItemGroup>
Expand Down
14 changes: 7 additions & 7 deletions lib/PuppeteerSharp.DevicesFetcher/ViewPort.cs
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
using Newtonsoft.Json;
using System.Text.Json.Serialization;

namespace PuppeteerSharp.DevicesFetcher
{
public class ViewPort
{
[JsonProperty("width")]
[JsonPropertyName("width")]
public int Width { get; set; }
[JsonProperty("height")]
[JsonPropertyName("height")]
public int Height { get; set; }

[JsonProperty("deviceScaleFactor")]
[JsonPropertyName("deviceScaleFactor")]
public double DeviceScaleFactor { get; set; }

[JsonProperty("isMobile")]
[JsonPropertyName("isMobile")]
public bool IsMobile { get; set; }
[JsonProperty("hasTouch")]
[JsonPropertyName("hasTouch")]
public bool HasTouch { get; set; }
[JsonProperty("isLandscape")]
[JsonPropertyName("isLandscape")]
public bool IsLandscape { get; set; }
}
}
1 change: 0 additions & 1 deletion lib/PuppeteerSharp.Nunit/PuppeteerSharp.Nunit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<LangVersion>12</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="NUnit" Version="3.13.3" />
</ItemGroup>
<ItemGroup>
Expand Down
15 changes: 13 additions & 2 deletions lib/PuppeteerSharp.Nunit/PuppeteerTestAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using Newtonsoft.Json;
using System.Text.Json;
using NUnit.Framework;
using NUnit.Framework.Interfaces;
using NUnit.Framework.Internal;
using PuppeteerSharp.Helpers.Json;
using PuppeteerSharp.Nunit.TestExpectations;

namespace PuppeteerSharp.Nunit
Expand Down Expand Up @@ -170,14 +171,24 @@ private static TestExpectation[] GetLocalExpectations() =>
private static TestExpectation[] GetUpstreamExpectations() =>
_upstreamExpectations ??= LoadExpectationsFromResource("PuppeteerSharp.Nunit.TestExpectations.TestExpectations.upstream.json");

private static readonly JsonSerializerOptions DefaultJsonSerializerOptions =
new JsonSerializerOptions()
{
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
Converters =
{
new JsonStringEnumMemberConverter(),
},
};

private static TestExpectation[] LoadExpectationsFromResource(string resourceName)
{
var assembly = Assembly.GetExecutingAssembly();

using var stream = assembly.GetManifestResourceStream(resourceName);
using var reader = new StreamReader(stream);
var fileContent = reader.ReadToEnd();
return JsonConvert.DeserializeObject<TestExpectation[]>(fileContent);
return JsonSerializer.Deserialize<TestExpectation[]>(fileContent, DefaultJsonSerializerOptions);
}
}
}
14 changes: 9 additions & 5 deletions lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@

using System.Runtime.Serialization;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;

namespace PuppeteerSharp.Nunit.TestExpectations;

Expand Down Expand Up @@ -56,7 +54,6 @@ public Regex TestIdRegex

public TestExpectationResult[] Expectations { get; set; }

[JsonConverter(typeof(StringEnumConverter))]
public enum TestExpectationResult
{
[EnumMember(Value = "FAIL")] Fail,
Expand All @@ -65,24 +62,31 @@ public enum TestExpectationResult
[EnumMember(Value = "TIMEOUT")] Timeout,
}

[JsonConverter(typeof(StringEnumConverter))]
public enum TestExpectationsParameter
{
[EnumMember(Value = "firefox")]
Firefox,
[EnumMember(Value = "chrome")]
Chrome,
[EnumMember(Value = "webDriverBiDi")]
WebDriverBiDi,
[EnumMember(Value = "cdp")]
Cdp,
[EnumMember(Value = "chrome-headless-shell")]
ChromeHeadlessShell,
[EnumMember(Value = "headless")]
Headless,
[EnumMember(Value = "headful")]
Headful,
}

[JsonConverter(typeof(StringEnumConverter))]
public enum TestExpectationPlatform
{
[EnumMember(Value = "darwin")]
Darwin,
[EnumMember(Value = "linux")]
Linux,
[EnumMember(Value = "win32")]
Win32,
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,42 +10,42 @@
"comment": "Remove when https://github.com/hardkoded/puppeteer-sharp/issues/2450 is implemented",
"testIdPattern": "[elementhandle.spec] ElementHandle specs ElementHandle.boundingBox *",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["FIREFOX"],
"parameters": ["firefox"],
"expectations": ["FAIL"]
},
{
"comment": "Remove when https://github.com/hardkoded/puppeteer-sharp/issues/2450 is implemented",
"testIdPattern": "[elementhandle.spec] ElementHandle specs ElementHandle.boxModel *",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["FIREFOX"],
"parameters": ["firefox"],
"expectations": ["FAIL"]
},
{
"comment": "TODO It's failing on CI/CD",
"testIdPattern": "[fixtures.spec] Fixtures should dump browser process stderr",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["FIREFOX"],
"parameters": ["firefox"],
"expectations": ["FAIL"]
},
{
"comment": "TODO Review why is failing on Ci/CD",
"testIdPattern": "[launcher.spec] Launcher specs Puppeteer Puppeteer.connect should be able to reconnect",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["FIREFOX"],
"parameters": ["firefox"],
"expectations": ["FAIL"]
},
{
"comment": "TODO Review why is failing on Ci/CD",
"testIdPattern": "[headful.spec] headful tests HEADFUL headless should be able to read cookies written by headful",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["FIREFOX"],
"parameters": ["firefox"],
"expectations": ["FAIL"]
},
{
"comment": "TODO Review why is failing on Ci/CD",
"testIdPattern": "[headful.spec] headful tests HEADFUL headless should be able to read cookies written by headful",
"platforms": ["darwin", "linux", "win32"],
"parameters": ["CHROME"],
"parameters": ["chrome"],
"expectations": ["FAIL"]
},
{
Expand Down
3 changes: 1 addition & 2 deletions lib/PuppeteerSharp.TestServer/SimpleCompressionMiddleware.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
using System;
using System.IO;
using System.IO.Compression;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;

namespace PuppeteerSharp.TestServer
{
internal class SimpleCompressionMiddleware
internal sealed class SimpleCompressionMiddleware
{
private readonly RequestDelegate _next;
private readonly SimpleServer _server;
Expand Down
Loading
Loading