Skip to content

Commit 376a7e6

Browse files
committed
Remove System.Collections.Immutable dependency
1 parent 762ecb7 commit 376a7e6

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

http/GZipCompressingHandler.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using System;
2-
using System.Collections.Immutable;
2+
using System.Collections.Generic;
33
using System.IO;
44
using System.IO.Compression;
55
using System.Net;
@@ -14,7 +14,7 @@ namespace Archon.Http
1414
/// </summary>
1515
public sealed class GZipCompressingHandler : DelegatingHandler
1616
{
17-
private readonly ImmutableHashSet<HttpMethod> verbs;
17+
private readonly HashSet<HttpMethod> verbs;
1818

1919
/// <inheritdoc cref="DelegatingHandler"/>
2020
/// <param name="verbsToCompress">A list of HTTP verbs to compress. Generally, only <see cref="HttpMethod.Post"/> and <see cref="HttpMethod.Put"/> are particularly useful.</param>
@@ -24,7 +24,7 @@ public GZipCompressingHandler(HttpMessageHandler innerHandler, params HttpMethod
2424
if (verbsToCompress.Length == 0)
2525
throw new ArgumentException("Must specify at least one HTTP verb to compress", nameof(verbsToCompress));
2626

27-
verbs = verbsToCompress.ToImmutableHashSet();
27+
verbs = new HashSet<HttpMethod>(verbsToCompress);
2828
}
2929

3030
protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request,

http/http.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,5 @@
2323

2424
<ItemGroup>
2525
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
26-
<PackageReference Include="System.Collections.Immutable" Version="1.5.0" />
2726
</ItemGroup>
2827
</Project>

0 commit comments

Comments
 (0)