skiasharp/samples/Basic/Web/SkiaSharpSample/Pages/Error.cshtml.cs
Matthew Leibowitz bc5020b9ee
Modernize the repository and prepare SkiaSharp 3.0 (#2505)
* Merge and modernize the binding projects
* Remove UWP and watchOS
* Add the native assets projects
* Rename bootstrapper.ps1 to build.ps1
* Add new device tests
* Rework the test skipping feature

---------

Co-authored-by: Jerome Laban <jerome.laban@nventive.com>
2023-07-30 23:49:57 +08:00

27 lines
No EOL
625 B
C#

using System.Diagnostics;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace SkiaSharpSample.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;
}
}
}