Skip to content

Commit

Permalink
fix: Added missing polyfill.
Browse files Browse the repository at this point in the history
  • Loading branch information
HavenDV committed Jul 14, 2024
1 parent e8ced08 commit 5dc37a1
Show file tree
Hide file tree
Showing 24 changed files with 302 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</ItemGroup>

<PropertyGroup Label="Versioning">
<Version>0.13.5</Version>
<Version>0.13.6</Version>
<MinVerMinimumMajorMinor>0.1</MinVerMinimumMajorMinor>
<MinVerTagPrefix>v</MinVerTagPrefix>
<MinVerDefaultPreReleaseIdentifiers>dev</MinVerDefaultPreReleaseIdentifiers>
Expand Down
15 changes: 15 additions & 0 deletions src/libs/OpenApiGenerator.Core/Generation/Sources.Polyfills.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,21 @@ public static partial class OpenApiGeneratorPolyfills
return content.ReadAsStreamAsync();
}}
/// <summary>
///
/// </summary>
/// <param name=""content""></param>
/// <param name=""cancellationToken""></param>
/// <returns></returns>
public static global::System.Threading.Tasks.Task<byte[]> 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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,19 @@ public static partial class OpenApiGeneratorPolyfills
content = content ?? throw new global::System.ArgumentNullException(nameof(content));
return content.ReadAsStreamAsync();
}
/// <summary>
///
/// </summary>
/// <param name="content"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static global::System.Threading.Tasks.Task<byte[]> 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
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,19 @@ public static partial class OpenApiGeneratorPolyfills
content = content ?? throw new global::System.ArgumentNullException(nameof(content));
return content.ReadAsStreamAsync();
}
/// <summary>
///
/// </summary>
/// <param name="content"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static global::System.Threading.Tasks.Task<byte[]> 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
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,19 @@ public static partial class OpenApiGeneratorPolyfills
content = content ?? throw new global::System.ArgumentNullException(nameof(content));
return content.ReadAsStreamAsync();
}
/// <summary>
///
/// </summary>
/// <param name="content"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static global::System.Threading.Tasks.Task<byte[]> 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
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,19 @@ public static partial class OpenApiGeneratorPolyfills
content = content ?? throw new global::System.ArgumentNullException(nameof(content));
return content.ReadAsStreamAsync();
}
/// <summary>
///
/// </summary>
/// <param name="content"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static global::System.Threading.Tasks.Task<byte[]> 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
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,19 @@ public static partial class OpenApiGeneratorPolyfills
content = content ?? throw new global::System.ArgumentNullException(nameof(content));
return content.ReadAsStreamAsync();
}
/// <summary>
///
/// </summary>
/// <param name="content"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static global::System.Threading.Tasks.Task<byte[]> 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
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,19 @@ public static partial class OpenApiGeneratorPolyfills
content = content ?? throw new global::System.ArgumentNullException(nameof(content));
return content.ReadAsStreamAsync();
}
/// <summary>
///
/// </summary>
/// <param name="content"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static global::System.Threading.Tasks.Task<byte[]> 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
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,19 @@ public static partial class OpenApiGeneratorPolyfills
content = content ?? throw new global::System.ArgumentNullException(nameof(content));
return content.ReadAsStreamAsync();
}
/// <summary>
///
/// </summary>
/// <param name="content"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static global::System.Threading.Tasks.Task<byte[]> 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
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,19 @@ public static partial class OpenApiGeneratorPolyfills
content = content ?? throw new global::System.ArgumentNullException(nameof(content));
return content.ReadAsStreamAsync();
}
/// <summary>
///
/// </summary>
/// <param name="content"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static global::System.Threading.Tasks.Task<byte[]> 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
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,19 @@ public static partial class OpenApiGeneratorPolyfills
content = content ?? throw new global::System.ArgumentNullException(nameof(content));
return content.ReadAsStreamAsync();
}
/// <summary>
///
/// </summary>
/// <param name="content"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static global::System.Threading.Tasks.Task<byte[]> 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
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,19 @@ public static partial class OpenApiGeneratorPolyfills
content = content ?? throw new global::System.ArgumentNullException(nameof(content));
return content.ReadAsStreamAsync();
}
/// <summary>
///
/// </summary>
/// <param name="content"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static global::System.Threading.Tasks.Task<byte[]> 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
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,19 @@ public static partial class OpenApiGeneratorPolyfills
content = content ?? throw new global::System.ArgumentNullException(nameof(content));
return content.ReadAsStreamAsync();
}
/// <summary>
///
/// </summary>
/// <param name="content"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static global::System.Threading.Tasks.Task<byte[]> 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
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,19 @@ public static partial class OpenApiGeneratorPolyfills
content = content ?? throw new global::System.ArgumentNullException(nameof(content));
return content.ReadAsStreamAsync();
}
/// <summary>
///
/// </summary>
/// <param name="content"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static global::System.Threading.Tasks.Task<byte[]> 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
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,19 @@ public static partial class OpenApiGeneratorPolyfills
content = content ?? throw new global::System.ArgumentNullException(nameof(content));
return content.ReadAsStreamAsync();
}
/// <summary>
///
/// </summary>
/// <param name="content"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static global::System.Threading.Tasks.Task<byte[]> 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
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,19 @@ public static partial class OpenApiGeneratorPolyfills
content = content ?? throw new global::System.ArgumentNullException(nameof(content));
return content.ReadAsStreamAsync();
}
/// <summary>
///
/// </summary>
/// <param name="content"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static global::System.Threading.Tasks.Task<byte[]> 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
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,19 @@ public static partial class OpenApiGeneratorPolyfills
content = content ?? throw new global::System.ArgumentNullException(nameof(content));
return content.ReadAsStreamAsync();
}
/// <summary>
///
/// </summary>
/// <param name="content"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static global::System.Threading.Tasks.Task<byte[]> 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
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,19 @@ public static partial class OpenApiGeneratorPolyfills
content = content ?? throw new global::System.ArgumentNullException(nameof(content));
return content.ReadAsStreamAsync();
}
/// <summary>
///
/// </summary>
/// <param name="content"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static global::System.Threading.Tasks.Task<byte[]> 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
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,19 @@ public static partial class OpenApiGeneratorPolyfills
content = content ?? throw new global::System.ArgumentNullException(nameof(content));
return content.ReadAsStreamAsync();
}
/// <summary>
///
/// </summary>
/// <param name="content"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static global::System.Threading.Tasks.Task<byte[]> 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
Loading

0 comments on commit 5dc37a1

Please sign in to comment.