diff --git a/src/libs/Directory.Build.props b/src/libs/Directory.Build.props index 15b6b05b49..4b3e613bc9 100644 --- a/src/libs/Directory.Build.props +++ b/src/libs/Directory.Build.props @@ -39,7 +39,7 @@ - 0.13.5 + 0.13.6 0.1 v dev diff --git a/src/libs/OpenApiGenerator.Core/Generation/Sources.Polyfills.cs b/src/libs/OpenApiGenerator.Core/Generation/Sources.Polyfills.cs index b1f077452a..471af0c62f 100644 --- a/src/libs/OpenApiGenerator.Core/Generation/Sources.Polyfills.cs +++ b/src/libs/OpenApiGenerator.Core/Generation/Sources.Polyfills.cs @@ -52,6 +52,21 @@ public static partial class OpenApiGeneratorPolyfills return content.ReadAsStreamAsync(); }} + + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsByteArrayAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + {{ + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + + return content.ReadAsByteArrayAsync(); + }} }} }} #endif".RemoveBlankLinesWhereOnlyWhitespaces(); diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Dedoose/NewtonsoftJson/_#G.Polyfills.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Dedoose/NewtonsoftJson/_#G.Polyfills.g.verified.cs index ed16772b9b..241c8bfd80 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Dedoose/NewtonsoftJson/_#G.Polyfills.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Dedoose/NewtonsoftJson/_#G.Polyfills.g.verified.cs @@ -36,6 +36,19 @@ public static partial class OpenApiGeneratorPolyfills content = content ?? throw new global::System.ArgumentNullException(nameof(content)); return content.ReadAsStreamAsync(); } + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsByteArrayAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + return content.ReadAsByteArrayAsync(); + } } } #endif \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Dedoose/SystemTextJson/_#G.Polyfills.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Dedoose/SystemTextJson/_#G.Polyfills.g.verified.cs index ed16772b9b..241c8bfd80 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Dedoose/SystemTextJson/_#G.Polyfills.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Dedoose/SystemTextJson/_#G.Polyfills.g.verified.cs @@ -36,6 +36,19 @@ public static partial class OpenApiGeneratorPolyfills content = content ?? throw new global::System.ArgumentNullException(nameof(content)); return content.ReadAsStreamAsync(); } + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsByteArrayAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + return content.ReadAsByteArrayAsync(); + } } } #endif \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Empty/NewtonsoftJson/_#G.Polyfills.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Empty/NewtonsoftJson/_#G.Polyfills.g.verified.cs index ed16772b9b..241c8bfd80 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Empty/NewtonsoftJson/_#G.Polyfills.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Empty/NewtonsoftJson/_#G.Polyfills.g.verified.cs @@ -36,6 +36,19 @@ public static partial class OpenApiGeneratorPolyfills content = content ?? throw new global::System.ArgumentNullException(nameof(content)); return content.ReadAsStreamAsync(); } + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsByteArrayAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + return content.ReadAsByteArrayAsync(); + } } } #endif \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Empty/SystemTextJson/_#G.Polyfills.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Empty/SystemTextJson/_#G.Polyfills.g.verified.cs index ed16772b9b..241c8bfd80 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Empty/SystemTextJson/_#G.Polyfills.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Empty/SystemTextJson/_#G.Polyfills.g.verified.cs @@ -36,6 +36,19 @@ public static partial class OpenApiGeneratorPolyfills content = content ?? throw new global::System.ArgumentNullException(nameof(content)); return content.ReadAsStreamAsync(); } + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsByteArrayAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + return content.ReadAsByteArrayAsync(); + } } } #endif \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Filtering/NewtonsoftJson/_#G.Polyfills.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Filtering/NewtonsoftJson/_#G.Polyfills.g.verified.cs index ed16772b9b..241c8bfd80 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Filtering/NewtonsoftJson/_#G.Polyfills.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Filtering/NewtonsoftJson/_#G.Polyfills.g.verified.cs @@ -36,6 +36,19 @@ public static partial class OpenApiGeneratorPolyfills content = content ?? throw new global::System.ArgumentNullException(nameof(content)); return content.ReadAsStreamAsync(); } + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsByteArrayAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + return content.ReadAsByteArrayAsync(); + } } } #endif \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Filtering/SystemTextJson/_#G.Polyfills.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Filtering/SystemTextJson/_#G.Polyfills.g.verified.cs index ed16772b9b..241c8bfd80 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Filtering/SystemTextJson/_#G.Polyfills.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Filtering/SystemTextJson/_#G.Polyfills.g.verified.cs @@ -36,6 +36,19 @@ public static partial class OpenApiGeneratorPolyfills content = content ?? throw new global::System.ArgumentNullException(nameof(content)); return content.ReadAsStreamAsync(); } + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsByteArrayAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + return content.ReadAsByteArrayAsync(); + } } } #endif \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/IpInfo/NewtonsoftJson/_#G.Polyfills.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/IpInfo/NewtonsoftJson/_#G.Polyfills.g.verified.cs index ed16772b9b..241c8bfd80 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/IpInfo/NewtonsoftJson/_#G.Polyfills.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/IpInfo/NewtonsoftJson/_#G.Polyfills.g.verified.cs @@ -36,6 +36,19 @@ public static partial class OpenApiGeneratorPolyfills content = content ?? throw new global::System.ArgumentNullException(nameof(content)); return content.ReadAsStreamAsync(); } + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsByteArrayAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + return content.ReadAsByteArrayAsync(); + } } } #endif \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/IpInfo/SystemTextJson/_#G.Polyfills.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/IpInfo/SystemTextJson/_#G.Polyfills.g.verified.cs index ed16772b9b..241c8bfd80 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/IpInfo/SystemTextJson/_#G.Polyfills.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/IpInfo/SystemTextJson/_#G.Polyfills.g.verified.cs @@ -36,6 +36,19 @@ public static partial class OpenApiGeneratorPolyfills content = content ?? throw new global::System.ArgumentNullException(nameof(content)); return content.ReadAsStreamAsync(); } + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsByteArrayAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + return content.ReadAsByteArrayAsync(); + } } } #endif \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/LangSmith/NewtonsoftJson/_#G.Polyfills.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/LangSmith/NewtonsoftJson/_#G.Polyfills.g.verified.cs index ed16772b9b..241c8bfd80 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/LangSmith/NewtonsoftJson/_#G.Polyfills.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/LangSmith/NewtonsoftJson/_#G.Polyfills.g.verified.cs @@ -36,6 +36,19 @@ public static partial class OpenApiGeneratorPolyfills content = content ?? throw new global::System.ArgumentNullException(nameof(content)); return content.ReadAsStreamAsync(); } + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsByteArrayAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + return content.ReadAsByteArrayAsync(); + } } } #endif \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/LangSmith/SystemTextJson/_#G.Polyfills.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/LangSmith/SystemTextJson/_#G.Polyfills.g.verified.cs index ed16772b9b..241c8bfd80 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/LangSmith/SystemTextJson/_#G.Polyfills.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/LangSmith/SystemTextJson/_#G.Polyfills.g.verified.cs @@ -36,6 +36,19 @@ public static partial class OpenApiGeneratorPolyfills content = content ?? throw new global::System.ArgumentNullException(nameof(content)); return content.ReadAsStreamAsync(); } + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsByteArrayAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + return content.ReadAsByteArrayAsync(); + } } } #endif \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Polyfills.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Polyfills.g.verified.cs index ed16772b9b..241c8bfd80 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Polyfills.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/NewtonsoftJson/_#G.Polyfills.g.verified.cs @@ -36,6 +36,19 @@ public static partial class OpenApiGeneratorPolyfills content = content ?? throw new global::System.ArgumentNullException(nameof(content)); return content.ReadAsStreamAsync(); } + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsByteArrayAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + return content.ReadAsByteArrayAsync(); + } } } #endif \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Polyfills.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Polyfills.g.verified.cs index ed16772b9b..241c8bfd80 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Polyfills.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Ollama/SystemTextJson/_#G.Polyfills.g.verified.cs @@ -36,6 +36,19 @@ public static partial class OpenApiGeneratorPolyfills content = content ?? throw new global::System.ArgumentNullException(nameof(content)); return content.ReadAsStreamAsync(); } + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsByteArrayAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + return content.ReadAsByteArrayAsync(); + } } } #endif \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Polyfills.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Polyfills.g.verified.cs index ed16772b9b..241c8bfd80 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Polyfills.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/NewtonsoftJson/_#G.Polyfills.g.verified.cs @@ -36,6 +36,19 @@ public static partial class OpenApiGeneratorPolyfills content = content ?? throw new global::System.ArgumentNullException(nameof(content)); return content.ReadAsStreamAsync(); } + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsByteArrayAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + return content.ReadAsByteArrayAsync(); + } } } #endif \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Polyfills.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Polyfills.g.verified.cs index ed16772b9b..241c8bfd80 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Polyfills.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenAi/SystemTextJson/_#G.Polyfills.g.verified.cs @@ -36,6 +36,19 @@ public static partial class OpenApiGeneratorPolyfills content = content ?? throw new global::System.ArgumentNullException(nameof(content)); return content.ReadAsStreamAsync(); } + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsByteArrayAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + return content.ReadAsByteArrayAsync(); + } } } #endif \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenApi3_0_Yaml/NewtonsoftJson/_#G.Polyfills.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenApi3_0_Yaml/NewtonsoftJson/_#G.Polyfills.g.verified.cs index ed16772b9b..241c8bfd80 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenApi3_0_Yaml/NewtonsoftJson/_#G.Polyfills.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenApi3_0_Yaml/NewtonsoftJson/_#G.Polyfills.g.verified.cs @@ -36,6 +36,19 @@ public static partial class OpenApiGeneratorPolyfills content = content ?? throw new global::System.ArgumentNullException(nameof(content)); return content.ReadAsStreamAsync(); } + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsByteArrayAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + return content.ReadAsByteArrayAsync(); + } } } #endif \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenApi3_0_Yaml/SystemTextJson/_#G.Polyfills.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenApi3_0_Yaml/SystemTextJson/_#G.Polyfills.g.verified.cs index ed16772b9b..241c8bfd80 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenApi3_0_Yaml/SystemTextJson/_#G.Polyfills.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/OpenApi3_0_Yaml/SystemTextJson/_#G.Polyfills.g.verified.cs @@ -36,6 +36,19 @@ public static partial class OpenApiGeneratorPolyfills content = content ?? throw new global::System.ArgumentNullException(nameof(content)); return content.ReadAsStreamAsync(); } + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsByteArrayAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + return content.ReadAsByteArrayAsync(); + } } } #endif \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Replicate/NewtonsoftJson/_#G.Polyfills.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Replicate/NewtonsoftJson/_#G.Polyfills.g.verified.cs index ed16772b9b..241c8bfd80 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Replicate/NewtonsoftJson/_#G.Polyfills.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Replicate/NewtonsoftJson/_#G.Polyfills.g.verified.cs @@ -36,6 +36,19 @@ public static partial class OpenApiGeneratorPolyfills content = content ?? throw new global::System.ArgumentNullException(nameof(content)); return content.ReadAsStreamAsync(); } + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsByteArrayAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + return content.ReadAsByteArrayAsync(); + } } } #endif \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Replicate/SystemTextJson/_#G.Polyfills.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Replicate/SystemTextJson/_#G.Polyfills.g.verified.cs index ed16772b9b..241c8bfd80 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Replicate/SystemTextJson/_#G.Polyfills.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Replicate/SystemTextJson/_#G.Polyfills.g.verified.cs @@ -36,6 +36,19 @@ public static partial class OpenApiGeneratorPolyfills content = content ?? throw new global::System.ArgumentNullException(nameof(content)); return content.ReadAsStreamAsync(); } + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsByteArrayAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + return content.ReadAsByteArrayAsync(); + } } } #endif \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/SpecialCases/NewtonsoftJson/_#G.Polyfills.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/SpecialCases/NewtonsoftJson/_#G.Polyfills.g.verified.cs index ed16772b9b..241c8bfd80 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/SpecialCases/NewtonsoftJson/_#G.Polyfills.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/SpecialCases/NewtonsoftJson/_#G.Polyfills.g.verified.cs @@ -36,6 +36,19 @@ public static partial class OpenApiGeneratorPolyfills content = content ?? throw new global::System.ArgumentNullException(nameof(content)); return content.ReadAsStreamAsync(); } + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsByteArrayAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + return content.ReadAsByteArrayAsync(); + } } } #endif \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/SpecialCases/SystemTextJson/_#G.Polyfills.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/SpecialCases/SystemTextJson/_#G.Polyfills.g.verified.cs index ed16772b9b..241c8bfd80 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/SpecialCases/SystemTextJson/_#G.Polyfills.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/SpecialCases/SystemTextJson/_#G.Polyfills.g.verified.cs @@ -36,6 +36,19 @@ public static partial class OpenApiGeneratorPolyfills content = content ?? throw new global::System.ArgumentNullException(nameof(content)); return content.ReadAsStreamAsync(); } + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsByteArrayAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + return content.ReadAsByteArrayAsync(); + } } } #endif \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Twitch/NewtonsoftJson/_#G.Polyfills.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Twitch/NewtonsoftJson/_#G.Polyfills.g.verified.cs index ed16772b9b..241c8bfd80 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Twitch/NewtonsoftJson/_#G.Polyfills.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Twitch/NewtonsoftJson/_#G.Polyfills.g.verified.cs @@ -36,6 +36,19 @@ public static partial class OpenApiGeneratorPolyfills content = content ?? throw new global::System.ArgumentNullException(nameof(content)); return content.ReadAsStreamAsync(); } + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsByteArrayAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + return content.ReadAsByteArrayAsync(); + } } } #endif \ No newline at end of file diff --git a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Twitch/SystemTextJson/_#G.Polyfills.g.verified.cs b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Twitch/SystemTextJson/_#G.Polyfills.g.verified.cs index ed16772b9b..241c8bfd80 100644 --- a/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Twitch/SystemTextJson/_#G.Polyfills.g.verified.cs +++ b/src/tests/OpenApiGenerator.SnapshotTests/Snapshots/Twitch/SystemTextJson/_#G.Polyfills.g.verified.cs @@ -36,6 +36,19 @@ public static partial class OpenApiGeneratorPolyfills content = content ?? throw new global::System.ArgumentNullException(nameof(content)); return content.ReadAsStreamAsync(); } + /// + /// + /// + /// + /// + /// + public static global::System.Threading.Tasks.Task ReadAsByteArrayAsync( + this global::System.Net.Http.HttpContent content, + global::System.Threading.CancellationToken cancellationToken) + { + content = content ?? throw new global::System.ArgumentNullException(nameof(content)); + return content.ReadAsByteArrayAsync(); + } } } #endif \ No newline at end of file