Skip to content

Commit be15474

Browse files
committed
code cleanup
1 parent ca1f939 commit be15474

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

src/ServiceStack.Client/ContentFormat.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ public static RequestAttributes GetEndpointAttributes(string contentType)
5656
return RequestAttributes.FormatOther;
5757
}
5858

59-
public static readonly Dictionary<string, string> ContentTypeAliases = new Dictionary<string, string> {
59+
public static readonly Dictionary<string, string> ContentTypeAliases = new()
60+
{
6061
{ MimeTypes.JsonText, MimeTypes.Json },
6162
{ MimeTypes.XmlText, MimeTypes.Xml },
6263
{ MimeTypes.JsvText, MimeTypes.Jsv },

src/ServiceStack.Kestrel/ServiceStack.Kestrel.csproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@
1212
</PackageDescription>
1313
<PackageTags>ServiceStack;SelfHost;Host;Kestrel;HTTP;Server</PackageTags>
1414
</PropertyGroup>
15+
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
16+
<DefineConstants>$(DefineConstants);NETCORE;NETSTANDARD2_0</DefineConstants>
17+
</PropertyGroup>
18+
<PropertyGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
19+
<DefineConstants>$(DefineConstants);NETCORE;NET6_0;NET6_0_OR_GREATER</DefineConstants>
20+
</PropertyGroup>
1521

1622
<ItemGroup>
1723
<ProjectReference Include="..\ServiceStack.Interfaces\ServiceStack.Interfaces.csproj"/>

tests/ServiceStack.WebHost.Endpoints.Tests/ZipTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ private static void DoesCompress(IStreamCompressor compressor, string text)
3131
[Test]
3232
public void Can_zip_and_unzip_bytes_using_BrotliStream()
3333
{
34-
DoesCompress(StreamCompressors.Assert("br"), "hello zip"); //CompressionTypes.Brotli
34+
DoesCompress(StreamCompressors.GetRequired(CompressionTypes.Brotli), "hello zip");
3535
}
3636
#endif
3737

0 commit comments

Comments
 (0)