Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion src/ImageSharp.Web/ImageCacheMetadata.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public async Task WriteAsync(Stream stream)
{
Dictionary<string, string> dictionary = this.ToDictionary();

using StreamWriter writer = new(stream, Encoding.UTF8);
await using StreamWriter writer = new(stream, Encoding.UTF8);
foreach (KeyValuePair<string, string> keyValuePair in dictionary)
{
// TODO: string.Create
Expand Down
4 changes: 2 additions & 2 deletions src/ImageSharp.Web/ImageSharp.Web.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<AssemblyTitle>SixLabors.ImageSharp.Web</AssemblyTitle>
Expand Down Expand Up @@ -46,7 +46,7 @@
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="3.0.1" />
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.7" />
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.8" />
</ItemGroup>

<Import Project="..\..\shared-infrastructure\src\SharedInfrastructure\SharedInfrastructure.projitems" Label="Shared" />
Expand Down
4 changes: 2 additions & 2 deletions src/ImageSharp.Web/Middleware/ImageSharpMiddleware.cs
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ private async Task ProcessRequestAsync(
maxAge = sourceImageMetadata.CacheControlMaxAge;
}

using (Stream inStream = await sourceImageResolver.OpenReadAsync())
await using (Stream inStream = await sourceImageResolver.OpenReadAsync())
{
// TODO: Do we need some way to set options based upon processors?
DecoderOptions decoderOptions = await this.options.OnBeforeLoadAsync.Invoke(imageCommandContext, this.options.Configuration)
Expand Down Expand Up @@ -524,7 +524,7 @@ private async Task SendResponseAsync(
{
Guard.NotNull(cacheResolver);

using Stream cacheStream = await cacheResolver.OpenReadAsync();
await using Stream cacheStream = await cacheResolver.OpenReadAsync();
await imageContext.SendAsync(cacheStream, metadata);
}
catch (Exception ex)
Expand Down
Loading