Skip to content

Commit

Permalink
Update Headers.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
aritchie committed Feb 8, 2025
1 parent c673014 commit bdbf63e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Shiny.Mediator/Headers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ namespace Shiny.Mediator;
public static class Headers
{
public static readonly (string Key, bool Value) BypassMiddleware = (nameof(BypassMiddleware), true);
public static readonly (string Key, bool Value) BypassErrorTraps = (nameof(BypassErrorTraps), true);
public static readonly (string Key, bool Value) BypassExceptionHandling = (nameof(BypassExceptionHandling), true);

public static bool BypassMiddlewareEnabled(this IMediatorContext context)
=> context.Values.ContainsKey(BypassMiddleware.Key);

public static bool BypassErrorTrapsEnabled(this IMediatorContext context)
=> context.Values.ContainsKey(BypassErrorTraps.Key);
=> context.Values.ContainsKey(BypassExceptionHandling.Key);

const string TimerRefreshHeader = nameof(TimerRefreshHeader);
public static (string Key, int Value) TimerRefresh(int timerRefreshSeconds)
Expand Down

0 comments on commit bdbf63e

Please sign in to comment.