NotFoundResponseExtensions
Pennington.Infrastructure
Lets a content-resolving page signal that the requested route is missing. The marker is read by NotFoundStatusProcessor, which flips the status to 404 after the rendered 404 body (with its layout and chrome) has been produced — so pages set the marker instead of writing StatusCode directly.
Methods
IsMarkedNotFound
#public static bool IsMarkedNotFound(HttpContext context)
Returns true when MarkNotFound has been called for this request.
Parameters
contextHttpContext
Returns
boolMarkNotFound
#public static void MarkNotFound(HttpContext context)
Marks the current request as having resolved to a missing route.
Parameters
contextHttpContext
Pennington.Infrastructure.NotFoundResponseExtensions
namespace Pennington.Infrastructure;
/// Lets a content-resolving page signal that the requested route is missing. The marker is read by NotFoundStatusProcessor, which flips the status to 404 after the rendered 404 body (with its layout and chrome) has been produced — so pages set the marker instead of writing StatusCode directly.
public class NotFoundResponseExtensions
{
/// Returns true when MarkNotFound has been called for this request.
public static bool IsMarkedNotFound(HttpContext context)
;
/// Marks the current request as having resolved to a missing route.
public static void MarkNotFound(HttpContext context)
;
}