Skip to content

Commit

Permalink
Loops
Browse files Browse the repository at this point in the history
  • Loading branch information
artemiusgreat committed Aug 14, 2024
1 parent 620f9f1 commit ced14a0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Distribution.Stream/Distribution.Stream.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<PropertyGroup>
<IsPackable>true</IsPackable>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Version>1.2.0</Version>
<Version>1.2.2</Version>
<Description>HTTP service with streaming and parallel execution.</Description>
<Authors>artemiusgreat</Authors>
<Copyright>indemos.com</Copyright>
Expand Down
8 changes: 3 additions & 5 deletions Distribution.Stream/Service.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public Service(HttpClient client)
{
WriteIndented = true,
PropertyNameCaseInsensitive = true,
ReferenceHandler = ReferenceHandler.IgnoreCycles,
ReadCommentHandling = JsonCommentHandling.Skip,
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull,
NumberHandling =
Expand Down Expand Up @@ -99,10 +100,7 @@ public Service(HttpClient client)
/// <param name="options"></param>
/// <param name="cts"></param>
/// <returns></returns>
public virtual async Task<System.IO.Stream> Stream(
HttpRequestMessage message,
JsonSerializerOptions options = null,
CancellationTokenSource cts = null)
public virtual async Task<System.IO.Stream> Stream(HttpRequestMessage message, CancellationTokenSource cts = null)
{
cts ??= new CancellationTokenSource(Timeout);

Expand Down Expand Up @@ -143,7 +141,7 @@ public virtual async Task<ResponseModel<T>> Send<T>(
return response;
}

response.Data = await JsonSerializer.DeserializeAsync<T>(content, Options).ConfigureAwait(false);
response.Data = await JsonSerializer.DeserializeAsync<T>(content, options).ConfigureAwait(false);
}
}
catch (Exception e)
Expand Down

0 comments on commit ced14a0

Please sign in to comment.