From 073aaedf4b6eea2a2c6ce3dfbf477d13e4cd9c71 Mon Sep 17 00:00:00 2001 From: Shiwei Zhang Date: Fri, 12 Jan 2024 17:06:37 +0800 Subject: [PATCH] feat: make ReadAllAsync public Signed-off-by: Shiwei Zhang --- src/OrasProject.Oras/Content/Extensions.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/OrasProject.Oras/Content/Extensions.cs b/src/OrasProject.Oras/Content/Extensions.cs index d29241b..0d33393 100644 --- a/src/OrasProject.Oras/Content/Extensions.cs +++ b/src/OrasProject.Oras/Content/Extensions.cs @@ -30,7 +30,7 @@ public static class Extensions /// /// /// - public static async Task> GetSuccessorsAsync(this IFetchable fetcher, Descriptor node, CancellationToken cancellationToken) + public static async Task> GetSuccessorsAsync(this IFetchable fetcher, Descriptor node, CancellationToken cancellationToken = default) { switch (node.MediaType) { @@ -71,7 +71,7 @@ public static async Task> GetSuccessorsAsync(this IFetch /// /// /// - public static async Task FetchAllAsync(this IFetchable fetcher, Descriptor desc, CancellationToken cancellationToken) + public static async Task FetchAllAsync(this IFetchable fetcher, Descriptor desc, CancellationToken cancellationToken = default) { var stream = await fetcher.FetchAsync(desc, cancellationToken).ConfigureAwait(false); return await stream.ReadAllAsync(desc, cancellationToken).ConfigureAwait(false); @@ -86,7 +86,7 @@ public static async Task FetchAllAsync(this IFetchable fetcher, Descript /// /// /// - internal static async Task ReadAllAsync(this Stream stream, Descriptor descriptor, CancellationToken cancellationToken) + public static async Task ReadAllAsync(this Stream stream, Descriptor descriptor, CancellationToken cancellationToken = default) { if (descriptor.Size < 0) {