Skip to content

Commit 526b0c6

Browse files
committed
fix: merge II
1 parent 60b9640 commit 526b0c6

File tree

7 files changed

+11
-26
lines changed

7 files changed

+11
-26
lines changed

src/JsonApiDotNetCore/Configuration/JsonApiApplicationBuilder.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ internal sealed class JsonApiApplicationBuilder : IJsonApiApplicationBuilder
4040

4141
public JsonApiApplicationBuilder(IServiceCollection services, IMvcCoreBuilder mvcBuilder)
4242
{
43-
_services = services;
44-
_mvcBuilder = mvcBuilder;
43+
_services = services ?? throw new ArgumentNullException(nameof(services));
44+
_mvcBuilder = mvcBuilder ?? throw new ArgumentNullException(nameof(mvcBuilder));
4545
_intermediateProvider = services.BuildServiceProvider();
4646
var loggerFactory = _intermediateProvider.GetService<ILoggerFactory>();
4747
_resourceGraphBuilder = new ResourceGraphBuilder(_options, loggerFactory);

src/JsonApiDotNetCore/Configuration/ResourceGraphBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public class ResourceGraphBuilder
1717

1818
public ResourceGraphBuilder(IJsonApiOptions options, ILoggerFactory loggerFactory)
1919
{
20-
_options = options;
20+
_options = options ?? throw new ArgumentNullException(nameof(options));
2121
_logger = loggerFactory?.CreateLogger<ResourceGraphBuilder>();
2222
}
2323

src/JsonApiDotNetCore/Configuration/ServiceDiscoveryFacade.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ public class ServiceDiscoveryFacade
5454

5555
public ServiceDiscoveryFacade(IServiceCollection services, ResourceGraphBuilder resourceGraphBuilder, ILoggerFactory loggerFactory)
5656
{
57-
_services = services;
58-
_resourceGraphBuilder = resourceGraphBuilder;
57+
_services = services ?? throw new ArgumentNullException(nameof(services));
58+
_resourceGraphBuilder = resourceGraphBuilder ?? throw new ArgumentNullException(nameof(resourceGraphBuilder));
5959
_logger = loggerFactory?.CreateLogger<ResourceGraphBuilder>();
6060
}
6161

src/JsonApiDotNetCore/Middleware/IQueryStringActionFilter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace JsonApiDotNetCore.Middleware
44
{
55
/// <summary>
6-
/// Entry point for processing all query string parameters.
6+
/// Extensibility point for processing request query strings.
77
/// </summary>
88
public interface IQueryStringActionFilter : IActionFilter { }
99
}

src/JsonApiDotNetCore/Middleware/JsonApiExceptionFilter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public void OnException(ExceptionContext context)
2323
throw new ArgumentNullException(nameof(context));
2424
}
2525

26-
if (context.HttpContext.IsJsonApiRequest())
26+
if (!context.HttpContext.IsJsonApiRequest())
2727
{
2828
return;
2929
}

src/JsonApiDotNetCore/Middleware/JsonApiRoutingConvention.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ public class JsonApiRoutingConvention : IJsonApiRoutingConvention
3939

4040
public JsonApiRoutingConvention(IJsonApiOptions options, IResourceGraph resourceGraph)
4141
{
42-
_options = options;
43-
_resourceGraph = resourceGraph;
42+
_options = options ?? throw new ArgumentNullException(nameof(options));
43+
_resourceGraph = resourceGraph ?? throw new ArgumentNullException(nameof(resourceGraph));
4444
}
4545

4646
/// <inheritdoc />
@@ -73,7 +73,7 @@ public void Apply(ApplicationModel application)
7373
}
7474
}
7575

76-
if (RoutingConventionDisabled(controller) == false)
76+
if (!RoutingConventionDisabled(controller))
7777
{
7878
continue;
7979
}
@@ -85,7 +85,7 @@ public void Apply(ApplicationModel application)
8585
$"Controllers with overlapping route templates detected: {controller.ControllerType.FullName}");
8686
}
8787

88-
controller.Selectors[0].AttributeRouteModel = new AttributeRouteModel {Template = template};
88+
controller.Selectors[0].AttributeRouteModel = new AttributeRouteModel { Template = template };
8989
}
9090
}
9191

src/JsonApiDotNetCore/Models/Annotation/ResourceAttribute.cs

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)