Beispiel #1
0
 public static async Task EnsureFeatureAsync(this IFeatureGate gate, string name)
 {
     if (!await gate.IsFeatureEnabledAsync(name))
     {
         throw new AccessDeniedException($"Feature {name} is disabled");
     }
 }
Beispiel #2
0
 public static async Task <bool> IsChaosAsync(this IFeatureGate gate, string route)
 {
     return(await gate.IsChaosAsync(route));
 }
Beispiel #3
0
 public static async Task <bool> IsFeatureEnabledAsync(this IFeatureGate gate, string name)
 {
     return(await gate.IsFeatureEnabledAsync(name));
 }