Skip to content

Commit

Permalink
Ignore Warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianJSClark committed Apr 20, 2024
1 parent ac2b37d commit c476296
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Aydsko.iRacingData.UnitTests/MockedHttpRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ public MockedHttpRequest(HttpRequestMessage request)
if (request.Content != null)
{
var contentStream = new MemoryStream();
#pragma warning disable VSTHRD002 // Avoid problematic synchronous waits - Low risk, used in testing only.
request.Content.CopyToAsync(contentStream).GetAwaiter().GetResult();
#pragma warning restore VSTHRD002 // Avoid problematic synchronous waits
contentStream.Position = 0;
ContentStream = contentStream;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,12 @@ public override void Write(Utf8JsonWriter writer, TimeSpan[] value, JsonSerializ
}

writer.WriteStartArray();
#pragma warning disable CA1062 // Validate arguments of public methods - It is validated above. Not sure why you're complaining, C# compiler.
foreach (var item in value)
{
writer.WriteNumberValue(item.TotalMinutes);
}
#pragma warning restore CA1062 // Validate arguments of public methods
writer.WriteEndArray();
}
}

0 comments on commit c476296

Please sign in to comment.