Browse Source

Rename method

pull/2301/head
James Jackson-South 3 years ago
parent
commit
47f1cdab65
  1. 8
      src/ImageSharp/Formats/ImageDecoder.cs
  2. 4
      src/ImageSharp/Formats/SpecializedImageDecoder{T}.cs

8
src/ImageSharp/Formats/ImageDecoder.cs

@ -31,7 +31,7 @@ public abstract class ImageDecoder : IImageDecoder
/// <inheritdoc/>
public Task<Image<TPixel>> DecodeAsync<TPixel>(DecoderOptions options, Stream stream, CancellationToken cancellationToken = default)
where TPixel : unmanaged, IPixel<TPixel>
=> WithSeekableStreamAsync(
=> WithSeekableMemoryStreamAsync(
options,
stream,
(s, ct) => this.Decode<TPixel>(options, s, ct),
@ -39,7 +39,7 @@ public abstract class ImageDecoder : IImageDecoder
/// <inheritdoc/>
public Task<Image> 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
/// <inheritdoc/>
public Task<IImageInfo> 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<T> WithSeekableStreamAsync<T>(
internal static async Task<T> WithSeekableMemoryStreamAsync<T>(
DecoderOptions options,
Stream stream,
Func<Stream, CancellationToken, T> action,

4
src/ImageSharp/Formats/SpecializedImageDecoder{T}.cs

@ -32,7 +32,7 @@ public abstract class SpecializedImageDecoder<T> : ImageDecoder, ISpecializedIma
/// <inheritdoc/>
public Task<Image<TPixel>> DecodeAsync<TPixel>(T options, Stream stream, CancellationToken cancellationToken)
where TPixel : unmanaged, IPixel<TPixel>
=> WithSeekableStreamAsync(
=> WithSeekableMemoryStreamAsync(
options.GeneralOptions,
stream,
(s, ct) => this.Decode<TPixel>(options, s, ct),
@ -40,7 +40,7 @@ public abstract class SpecializedImageDecoder<T> : ImageDecoder, ISpecializedIma
/// <inheritdoc/>
public Task<Image> DecodeAsync(T options, Stream stream, CancellationToken cancellationToken)
=> WithSeekableStreamAsync(
=> WithSeekableMemoryStreamAsync(
options.GeneralOptions,
stream,
(s, ct) => this.Decode(options, s, ct),

Loading…
Cancel
Save