Skip to content

Commit 413c4ed

Browse files
committed
Upgraded to .NET6
1 parent 8acaf40 commit 413c4ed

36 files changed

+523
-663
lines changed

.editorconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[*.cs]
2+
csharp_style_namespace_declarations = file_scoped:warning

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ ehthumbs.db
7777
# Mac crap
7878
.DS_Store
7979

80-
src/.vs
80+
.vs
8181

8282
# Cake Build
8383
/tools

Cofoundry.Plugins.ErrorLogging.sln

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.26430.13
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cofoundry.Plugins.ErrorLogging", "src\Cofoundry.Plugins.ErrorLogging\Cofoundry.Plugins.ErrorLogging.csproj", "{770CBAB8-61A8-4B87-8A03-B142BB61599A}"
7+
EndProject
8+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cofoundry.Plugins.ErrorLogging.Admin", "src\Cofoundry.Plugins.ErrorLogging.Admin\Cofoundry.Plugins.ErrorLogging.Admin.csproj", "{6C9E6D5E-2591-4F1C-966D-31E2E3FF84CB}"
9+
EndProject
10+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{FA681052-563E-46F8-8346-48E1E6747041}"
11+
EndProject
12+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ErrorLoggingExample", "src\ErrorLoggingExample\ErrorLoggingExample.csproj", "{73C1E2F0-B848-4EEB-A1A6-36CD96F2CE62}"
13+
EndProject
14+
Global
15+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
16+
Debug|Any CPU = Debug|Any CPU
17+
Release|Any CPU = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
20+
{770CBAB8-61A8-4B87-8A03-B142BB61599A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21+
{770CBAB8-61A8-4B87-8A03-B142BB61599A}.Debug|Any CPU.Build.0 = Debug|Any CPU
22+
{770CBAB8-61A8-4B87-8A03-B142BB61599A}.Release|Any CPU.ActiveCfg = Release|Any CPU
23+
{770CBAB8-61A8-4B87-8A03-B142BB61599A}.Release|Any CPU.Build.0 = Release|Any CPU
24+
{6C9E6D5E-2591-4F1C-966D-31E2E3FF84CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
25+
{6C9E6D5E-2591-4F1C-966D-31E2E3FF84CB}.Debug|Any CPU.Build.0 = Debug|Any CPU
26+
{6C9E6D5E-2591-4F1C-966D-31E2E3FF84CB}.Release|Any CPU.ActiveCfg = Release|Any CPU
27+
{6C9E6D5E-2591-4F1C-966D-31E2E3FF84CB}.Release|Any CPU.Build.0 = Release|Any CPU
28+
{73C1E2F0-B848-4EEB-A1A6-36CD96F2CE62}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
29+
{73C1E2F0-B848-4EEB-A1A6-36CD96F2CE62}.Debug|Any CPU.Build.0 = Debug|Any CPU
30+
{73C1E2F0-B848-4EEB-A1A6-36CD96F2CE62}.Release|Any CPU.ActiveCfg = Release|Any CPU
31+
{73C1E2F0-B848-4EEB-A1A6-36CD96F2CE62}.Release|Any CPU.Build.0 = Release|Any CPU
32+
EndGlobalSection
33+
GlobalSection(SolutionProperties) = preSolution
34+
HideSolutionNode = FALSE
35+
EndGlobalSection
36+
GlobalSection(NestedProjects) = preSolution
37+
{73C1E2F0-B848-4EEB-A1A6-36CD96F2CE62} = {FA681052-563E-46F8-8346-48E1E6747041}
38+
EndGlobalSection
39+
GlobalSection(ExtensibilityGlobals) = postSolution
40+
SolutionGuid = {03096141-C2F9-4E8F-BCA8-3DDC89D62D1D}
41+
EndGlobalSection
42+
EndGlobal
File renamed without changes.

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
version: '{build}'
2-
image: Visual Studio 2019
2+
image: Visual Studio 2022
33
environment:
44
NUGET_API_KEY:
55
secure: ZipOsavSURgYiPIWD01xFd9ug5f8/qaNNsHRwuPsqlSFrr6adAwd4yG4qgDQ6jOC
Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
using Cofoundry.Core.ResourceFiles;
2-
using System;
3-
using System.Collections.Generic;
4-
using System.Linq;
52

6-
namespace Cofoundry.Plugins.ErrorLogging.Admin.Bootstrap
3+
namespace Cofoundry.Plugins.ErrorLogging.Admin.Bootstrap;
4+
5+
/// <summary>
6+
/// Registers this assembly so that embedded resources (e.g. views/css/js) can be picked up.
7+
/// </summary>
8+
public class AssemblyResourceRegistration : IAssemblyResourceRegistration
79
{
8-
/// <summary>
9-
/// Registers this assembly so that embedded resources (e.g. views/css/js) can be picked up.
10-
/// </summary>
11-
public class AssemblyResourceRegistration : IAssemblyResourceRegistration
12-
{
13-
}
1410
}

src/Cofoundry.Plugins.ErrorLogging.Admin/Cofoundry.Plugins.ErrorLogging.Admin.csproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
4+
<TargetFramework>net6.0</TargetFramework>
5+
<ImplicitUsings>enable</ImplicitUsings>
56

67
<PackageId>Cofoundry.Plugins.ErrorLogging.Admin</PackageId>
78
<Description>Adds simple database error logging to Cofoundry.</Description>
@@ -10,12 +11,12 @@
1011
</PropertyGroup>
1112

1213
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
13-
<DocumentationFile>bin\Release\netcoreapp3.1\Cofoundry.Plugins.ErrorLogging.Admin.xml</DocumentationFile>
14+
<DocumentationFile>bin\Release\net6.0\Cofoundry.Plugins.ErrorLogging.Admin.xml</DocumentationFile>
1415
<NoWarn>1701;1702;1705;1591</NoWarn>
1516
</PropertyGroup>
1617

1718
<ItemGroup>
18-
<PackageReference Include="Cofoundry.Web.Admin" Version="0.10.0" />
19+
<PackageReference Include="Cofoundry.Web.Admin" Version="0.10.4-ci0006" />
1920
</ItemGroup>
2021

2122
<ItemGroup>
Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,19 @@
11
using Cofoundry.Web;
2-
using Microsoft.AspNetCore.Routing;
3-
using System;
4-
using System.Collections.Generic;
5-
using System.Text;
62
using Cofoundry.Web.Admin;
3+
using Microsoft.AspNetCore.Routing;
4+
5+
namespace Cofoundry.Plugins.ErrorLogging.Admin;
76

8-
namespace Cofoundry.Plugins.ErrorLogging.Admin
7+
public class ErrorLoggingApiRouteRegistration : IOrderedRouteRegistration
98
{
10-
public class ErrorLoggingApiRouteRegistration : IOrderedRouteRegistration
11-
{
12-
public int Ordering => (int)RouteRegistrationOrdering.Early;
9+
public int Ordering => (int)RouteRegistrationOrdering.Early;
1310

14-
public void RegisterRoutes(IEndpointRouteBuilder routeBuilder)
15-
{
16-
routeBuilder
17-
.ForAdminApiController<ErrorsApiController>("plugins/errors")
18-
.MapGet()
19-
.MapGetById("{errorId:int}")
20-
;
21-
}
11+
public void RegisterRoutes(IEndpointRouteBuilder routeBuilder)
12+
{
13+
routeBuilder
14+
.ForAdminApiController<ErrorsApiController>("plugins/errors")
15+
.MapGet()
16+
.MapGetById("{errorId:int}")
17+
;
2218
}
2319
}
Lines changed: 27 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,38 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Threading.Tasks;
5-
using Cofoundry.Domain.CQS;
6-
using Cofoundry.Web.Admin;
1+
using Cofoundry.Domain.CQS;
72
using Cofoundry.Plugins.ErrorLogging.Domain;
8-
using Microsoft.AspNetCore.Mvc;
93
using Cofoundry.Web;
4+
using Cofoundry.Web.Admin;
5+
using Microsoft.AspNetCore.Mvc;
6+
7+
namespace Cofoundry.Plugins.ErrorLogging.Admin;
108

11-
namespace Cofoundry.Plugins.ErrorLogging.Admin
9+
public class ErrorsApiController : BaseAdminApiController
1210
{
13-
public class ErrorsApiController : BaseAdminApiController
14-
{
15-
private const string ID_ROUTE = "{errorId:int}";
11+
private readonly IQueryExecutor _queryExecutor;
12+
private readonly IApiResponseHelper _apiResponseHelper;
1613

17-
private readonly IQueryExecutor _queryExecutor;
18-
private readonly IApiResponseHelper _apiResponseHelper;
14+
public ErrorsApiController(
15+
IQueryExecutor queryExecutor,
16+
IApiResponseHelper apiResponseHelper
17+
)
18+
{
19+
_queryExecutor = queryExecutor;
20+
_apiResponseHelper = apiResponseHelper;
21+
}
1922

20-
public ErrorsApiController(
21-
IQueryExecutor queryExecutor,
22-
IApiResponseHelper apiResponseHelper
23-
)
24-
{
25-
_queryExecutor = queryExecutor;
26-
_apiResponseHelper = apiResponseHelper;
27-
}
23+
public async Task<IActionResult> Get([FromQuery] SearchErrorSummariesQuery query)
24+
{
25+
if (query == null) query = new SearchErrorSummariesQuery();
2826

29-
public async Task<IActionResult> Get([FromQuery] SearchErrorSummariesQuery query)
30-
{
31-
if (query == null) query = new SearchErrorSummariesQuery();
27+
var results = await _queryExecutor.ExecuteAsync(query);
28+
return _apiResponseHelper.SimpleQueryResponse(results);
29+
}
3230

33-
var results = await _queryExecutor.ExecuteAsync(query);
34-
return _apiResponseHelper.SimpleQueryResponse(results);
35-
}
36-
37-
public async Task<IActionResult> GetById(int errorId)
38-
{
39-
var query = new GetErrorDetailsByIdQuery(errorId);
40-
var result = await _queryExecutor.ExecuteAsync(query);
31+
public async Task<IActionResult> GetById(int errorId)
32+
{
33+
var query = new GetErrorDetailsByIdQuery(errorId);
34+
var result = await _queryExecutor.ExecuteAsync(query);
4135

42-
return _apiResponseHelper.SimpleQueryResponse(result);
43-
}
36+
return _apiResponseHelper.SimpleQueryResponse(result);
4437
}
4538
}

src/Cofoundry.Plugins.ErrorLogging.Admin/Plugins/Admin/Modules/Errors/Bootstrap/ErrorsModuleRegistration.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using Cofoundry.Domain;
5-
using Cofoundry.Web.Admin;
1+
using Cofoundry.Domain;
62
using Cofoundry.Plugins.ErrorLogging.Domain;
3+
using Cofoundry.Web.Admin;
74

85
namespace Cofoundry.Plugins.ErrorLogging.Admin
96
{

0 commit comments

Comments
 (0)