-
-
Notifications
You must be signed in to change notification settings - Fork 158
.NET Core 2.2 -> 3.0 #597
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.NET Core 2.2 -> 3.0 #597
Changes from 29 commits
24a2ef3
adf845b
4124aa9
fb6aa66
17f0c8c
10ea6cb
0a4e322
9697449
931c97c
dd37d8e
aaa7655
13bfdeb
5b10565
487728e
80ea141
754e2e3
19349ae
7617445
bc5c1df
70dd35d
9f11631
67dd3eb
15a9402
153f9cb
9e6c36b
bf72324
07840c4
9ee71f5
9000421
2843111
d6f763f
98b1119
cd7e19c
90ebfca
5f7d330
f149bc9
f8e9523
9ff0709
9b2ecdf
57c5da1
7faa500
73f43e9
fe67998
82005ec
4a3296e
e83abfd
a81b6ac
518e4d0
7845250
6e8ddf4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,23 @@ | ||
<Project> | ||
|
||
<PropertyGroup> | ||
<NetCoreAppVersion>netcoreapp2.2</NetCoreAppVersion> | ||
<NetStandardVersion>netstandard2.0</NetStandardVersion> | ||
<AspNetCoreVersion>2.2.*</AspNetCoreVersion> | ||
<MicrosoftLoggingVersion>2.2.*</MicrosoftLoggingVersion> | ||
<MicrosoftConfigurationVersion>2.2.*</MicrosoftConfigurationVersion> | ||
<MicrosoftOptionsVersion>2.2.*</MicrosoftOptionsVersion> | ||
<EFCoreVersion>2.2.*</EFCoreVersion> | ||
<EFCoreToolsVersion>2.2.*</EFCoreToolsVersion> | ||
<NpgsqlVersion>4.0.0</NpgsqlVersion> | ||
<NpgsqlPostgreSQLVersion>2.1.0</NpgsqlPostgreSQLVersion> | ||
<NetCoreAppVersion>netcoreapp3.0</NetCoreAppVersion> | ||
<NetStandardVersion>netstandard2.1</NetStandardVersion> | ||
<AspNetCoreVersion>3.*</AspNetCoreVersion> | ||
<MicrosoftLoggingVersion>3.*</MicrosoftLoggingVersion> | ||
<MicrosoftConfigurationVersion>3.*</MicrosoftConfigurationVersion> | ||
<MicrosoftOptionsVersion>3.*</MicrosoftOptionsVersion> | ||
<EFCoreVersion>3.*</EFCoreVersion> | ||
<EFCoreToolsVersion>3.*</EFCoreToolsVersion> | ||
<NpgsqlVersion>4.1.1</NpgsqlVersion> | ||
<NpgsqlPostgreSQLVersion>3.0.1</NpgsqlPostgreSQLVersion> | ||
<TuplesVersion>4.5.0</TuplesVersion> | ||
</PropertyGroup> | ||
|
||
<!-- Test Project Dependencies --> | ||
<PropertyGroup> | ||
<TestSdkVersion>15.7.2</TestSdkVersion> | ||
<XUnitVersion>2.3.1</XUnitVersion> | ||
<BogusVersion>22.1.2</BogusVersion> | ||
<MoqVersion>4.8.3</MoqVersion> | ||
<TestSdkVersion>16.3.0</TestSdkVersion> | ||
<XUnitVersion>2.4.1</XUnitVersion> | ||
<BogusVersion>28.4.1</BogusVersion> | ||
<MoqVersion>4.13.1</MoqVersion> | ||
</PropertyGroup> | ||
</Project> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,11 @@ public JsonApiApplicationBuilder(IServiceCollection services, IMvcCoreBuilder mv | |
_mvcBuilder = mvcBuilder; | ||
} | ||
|
||
internal void ConfigureLogging() | ||
{ | ||
_services.AddLogging(); | ||
} | ||
|
||
/// <summary> | ||
/// Executes the action provided by the user to configure <see cref="JsonApiOptions"/> | ||
/// </summary> | ||
|
@@ -62,17 +67,17 @@ public void ConfigureMvc() | |
_serviceDiscoveryFacade = intermediateProvider.GetRequiredService<IServiceDiscoveryFacade>(); | ||
var exceptionFilterProvider = intermediateProvider.GetRequiredService<IJsonApiExceptionFilterProvider>(); | ||
var typeMatchFilterProvider = intermediateProvider.GetRequiredService<IJsonApiTypeMatchFilterProvider>(); | ||
var routingConvention = intermediateProvider.GetRequiredService<IJsonApiRoutingConvention>(); | ||
|
||
_mvcBuilder.AddMvcOptions(mvcOptions => | ||
_mvcBuilder.AddMvcOptions(options => | ||
{ | ||
mvcOptions.Filters.Add(exceptionFilterProvider.Get()); | ||
mvcOptions.Filters.Add(typeMatchFilterProvider.Get()); | ||
mvcOptions.InputFormatters.Insert(0, new JsonApiInputFormatter()); | ||
mvcOptions.OutputFormatters.Insert(0, new JsonApiOutputFormatter()); | ||
options.EnableEndpointRouting = true; | ||
options.Filters.Add(exceptionFilterProvider.Get()); | ||
options.Filters.Add(typeMatchFilterProvider.Get()); | ||
options.InputFormatters.Insert(0, new JsonApiInputFormatter()); | ||
options.OutputFormatters.Insert(0, new JsonApiOutputFormatter()); | ||
options.Conventions.Insert(0, routingConvention); | ||
}); | ||
|
||
var routingConvention = intermediateProvider.GetRequiredService<IJsonApiRoutingConvention>(); | ||
_mvcBuilder.AddMvcOptions(opt => opt.Conventions.Insert(0, routingConvention)); | ||
_services.AddSingleton<IControllerResourceMapping>(routingConvention); | ||
} | ||
|
||
|
@@ -148,7 +153,7 @@ public void ConfigureServices() | |
_services.AddSingleton<ILinksConfiguration>(JsonApiOptions); | ||
_services.AddSingleton(resourceGraph); | ||
_services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>(); | ||
_services.AddSingleton<IResourceGraph>(resourceGraph); | ||
_services.AddSingleton(resourceGraph); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this a duplicate of line 154? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On line 118 you have:
This builds the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ohhh, good catch. I will remove that tomorrow. The double singleton is not needed :) |
||
_services.AddSingleton<IResourceContextProvider>(resourceGraph); | ||
_services.AddScoped<ICurrentRequest, CurrentRequest>(); | ||
_services.AddScoped<IScopedServiceProvider, RequestScopedServiceProvider>(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because why not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We really appreciate your work. Thank you all.