-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Target newest Elmah.Io.Client prerelease and .NET 8
- Loading branch information
1 parent
446eac3
commit e8503a6
Showing
29 changed files
with
265 additions
and
228 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
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
45 changes: 0 additions & 45 deletions
45
samples/Elmah.Io.AspNetCore31.Example/Controllers/HomeController.cs
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
samples/Elmah.Io.AspNetCore31.Example/Models/ErrorViewModel.cs
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
samples/Elmah.Io.AspNetCore31.Example/Views/Home/Index.cshtml
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
samples/Elmah.Io.AspNetCore31.Example/Views/_ViewImports.cshtml
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
samples/Elmah.Io.AspNetCore31.Example/appsettings.Development.json
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -35,7 +35,7 @@ | |
//{ | ||
// o.OnMessage = msg => | ||
// { | ||
// msg.Version = "6.0.0"; | ||
// msg.Version = "7.0.0"; | ||
// }; | ||
//}); | ||
|
||
|
4 changes: 3 additions & 1 deletion
4
...mple/Elmah.Io.AspNetCore31.Example.csproj → ...mple/Elmah.Io.AspNetCore80.Example.csproj
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
28 changes: 28 additions & 0 deletions
28
samples/Elmah.Io.AspNetCore80.Example/Pages/Error.cshtml.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,28 @@ | ||
using Microsoft.AspNetCore.Mvc; | ||
using Microsoft.AspNetCore.Mvc.RazorPages; | ||
using System.Diagnostics; | ||
|
||
namespace Elmah.Io.AspNetCore80.Example.Pages | ||
{ | ||
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] | ||
[IgnoreAntiforgeryToken] | ||
public class ErrorModel : PageModel | ||
{ | ||
public string? RequestId { get; set; } | ||
|
||
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); | ||
|
||
private readonly ILogger<ErrorModel> _logger; | ||
|
||
public ErrorModel(ILogger<ErrorModel> logger) | ||
{ | ||
_logger = logger; | ||
} | ||
|
||
public void OnGet() | ||
{ | ||
RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; | ||
} | ||
} | ||
|
||
} |
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,10 @@ | ||
@page | ||
@model IndexModel | ||
@{ | ||
ViewData["Title"] = "Home page"; | ||
} | ||
|
||
<div class="text-center"> | ||
<h1 class="display-4">Welcome</h1> | ||
<p>Learn about <a href="https://learn.microsoft.com/aspnet/core">building Web apps with ASP.NET Core</a>.</p> | ||
</div> |
26 changes: 26 additions & 0 deletions
26
samples/Elmah.Io.AspNetCore80.Example/Pages/Index.cshtml.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,26 @@ | ||
using Elmah.Io.AspNetCore; | ||
using Microsoft.AspNetCore.Mvc.RazorPages; | ||
|
||
namespace Elmah.Io.AspNetCore80.Example.Pages | ||
{ | ||
public class IndexModel : PageModel | ||
{ | ||
private readonly ILogger<IndexModel> _logger; | ||
|
||
public IndexModel(ILogger<IndexModel> logger) | ||
{ | ||
_logger = logger; | ||
} | ||
|
||
public void OnGet() | ||
{ | ||
// Logging can be used for breadcrumbs | ||
_logger.LogInformation("Requesting the frontpage"); | ||
|
||
// Breadcrumbs can also be added manually | ||
//ElmahIoApi.AddBreadcrumb(new Client.Breadcrumb(action: "Navigation", message: "Requesting the frontpage"), HttpContext); | ||
|
||
throw new Exception("Do you know what happened to the neanderthals, Bernard? We ate them."); | ||
} | ||
} | ||
} |
4 changes: 3 additions & 1 deletion
4
...tCore31.Example/Views/Home/Privacy.cshtml → ...AspNetCore80.Example/Pages/Privacy.cshtml
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,4 +1,6 @@ | ||
@{ | ||
@page | ||
@model PrivacyModel | ||
@{ | ||
ViewData["Title"] = "Privacy Policy"; | ||
} | ||
<h1>@ViewData["Title"]</h1> | ||
|
Oops, something went wrong.