Skip to content

Commit 9597b20

Browse files
committed
Fix CA1062: Validate arguments of public methods
1 parent fd5bc84 commit 9597b20

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/JsonApiDotNetCore.OpenApi.Client.Kiota/SetQueryStringHttpMessageHandler.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,15 @@ public sealed class SetQueryStringHttpMessageHandler : DelegatingHandler
1313

1414
public IDisposable CreateScope(IDictionary<string, string?> queryString)
1515
{
16+
ArgumentNullException.ThrowIfNull(queryString);
17+
1618
return new QueryStringScope(this, queryString);
1719
}
1820

1921
protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
2022
{
23+
ArgumentNullException.ThrowIfNull(request);
24+
2125
if (_queryString is { Count: > 0 } && request.RequestUri != null)
2226
{
2327
request.RequestUri = new Uri(QueryHelpers.AddQueryString(request.RequestUri.ToString(), _queryString));

src/JsonApiDotNetCore.OpenApi.Client.NSwag/JsonApiClient.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public IDisposable WithPartialAttributeSerialization<TRequestDocument, TAttribut
2828
where TRequestDocument : class
2929
{
3030
ArgumentGuard.NotNull(requestDocument);
31+
ArgumentGuard.NotNull(alwaysIncludedAttributeSelectors);
3132

3233
HashSet<string> attributeNames = [];
3334

0 commit comments

Comments
 (0)