-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implementation of mslogger and sample projects
- Loading branch information
1 parent
f2902b6
commit a02ca90
Showing
20 changed files
with
484 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,14 @@ | ||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
indent_size = 2 | ||
|
||
[*.cs] | ||
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0290 | ||
csharp_style_prefer_primary_constructors = false | ||
dotnet_diagnostic.IDE0290.severity = none | ||
|
||
# https://www.jetbrains.com/help/rider/ConvertToPrimaryConstructor.html | ||
resharper_convert_to_primary_constructor_highlighting = none | ||
|
||
# Ensure if statements always use braces | ||
csharp_prefer_braces = true:error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
Mindscape.Raygun4Net.AspNetCore/Builders/RequestDataBuilder.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using System; | ||
using System.Threading.Tasks; | ||
using Microsoft.AspNetCore.Http; | ||
|
||
namespace Mindscape.Raygun4Net.AspNetCore.Builders; | ||
|
||
public class RequestDataBuilder : IMessageBuilder | ||
{ | ||
private readonly IHttpContextAccessor _httpContextAccessor; | ||
private readonly RaygunSettings _settings; | ||
|
||
public RequestDataBuilder(IHttpContextAccessor httpContextAccessor, RaygunSettings settings) | ||
{ | ||
_httpContextAccessor = httpContextAccessor; | ||
_settings = settings; | ||
} | ||
|
||
public async Task<RaygunMessage> Apply(RaygunMessage message, Exception exception) | ||
{ | ||
var ctx = _httpContextAccessor.HttpContext; | ||
|
||
message.Details.Request = await RaygunAspNetCoreRequestMessageBuilder.Build(ctx, _settings); | ||
message.Details.Response = await RaygunAspNetCoreResponseMessageBuilder.Build(ctx, _settings); | ||
|
||
return message; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.