From 47f1cdab652b4cf956ab6c229f12f8e4cf4cfce2 Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Sun, 27 Nov 2022 14:38:36 +1000 Subject: [PATCH] Rename method --- src/ImageSharp/Formats/ImageDecoder.cs | 8 ++++---- src/ImageSharp/Formats/SpecializedImageDecoder{T}.cs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ImageSharp/Formats/ImageDecoder.cs b/src/ImageSharp/Formats/ImageDecoder.cs index 91d875b69..43388cfcb 100644 --- a/src/ImageSharp/Formats/ImageDecoder.cs +++ b/src/ImageSharp/Formats/ImageDecoder.cs @@ -31,7 +31,7 @@ public abstract class ImageDecoder : IImageDecoder /// public Task> DecodeAsync(DecoderOptions options, Stream stream, CancellationToken cancellationToken = default) where TPixel : unmanaged, IPixel - => WithSeekableStreamAsync( + => WithSeekableMemoryStreamAsync( options, stream, (s, ct) => this.Decode(options, s, ct), @@ -39,7 +39,7 @@ public abstract class ImageDecoder : IImageDecoder /// public Task DecodeAsync(DecoderOptions options, Stream stream, CancellationToken cancellationToken = default) - => WithSeekableStreamAsync( + => WithSeekableMemoryStreamAsync( options, stream, (s, ct) => this.Decode(options, s, ct), @@ -54,7 +54,7 @@ public abstract class ImageDecoder : IImageDecoder /// public Task IdentifyAsync(DecoderOptions options, Stream stream, CancellationToken cancellationToken = default) - => WithSeekableStreamAsync( + => WithSeekableMemoryStreamAsync( options, stream, (s, ct) => this.Identify(options, s, ct), @@ -181,7 +181,7 @@ public abstract class ImageDecoder : IImageDecoder return action(memoryStream); } - internal static async Task WithSeekableStreamAsync( + internal static async Task WithSeekableMemoryStreamAsync( DecoderOptions options, Stream stream, Func action, diff --git a/src/ImageSharp/Formats/SpecializedImageDecoder{T}.cs b/src/ImageSharp/Formats/SpecializedImageDecoder{T}.cs index 54a3c4291..f3e9c9917 100644 --- a/src/ImageSharp/Formats/SpecializedImageDecoder{T}.cs +++ b/src/ImageSharp/Formats/SpecializedImageDecoder{T}.cs @@ -32,7 +32,7 @@ public abstract class SpecializedImageDecoder : ImageDecoder, ISpecializedIma /// public Task> DecodeAsync(T options, Stream stream, CancellationToken cancellationToken) where TPixel : unmanaged, IPixel - => WithSeekableStreamAsync( + => WithSeekableMemoryStreamAsync( options.GeneralOptions, stream, (s, ct) => this.Decode(options, s, ct), @@ -40,7 +40,7 @@ public abstract class SpecializedImageDecoder : ImageDecoder, ISpecializedIma /// public Task DecodeAsync(T options, Stream stream, CancellationToken cancellationToken) - => WithSeekableStreamAsync( + => WithSeekableMemoryStreamAsync( options.GeneralOptions, stream, (s, ct) => this.Decode(options, s, ct),