Ejemplo n.º 1
0
 public static void ExecuteIfNotSet(this IFlagStore self, string key, Action act)
 {
     if (!self.IsSet(key))
     {
         act();
     }
 }
Ejemplo n.º 2
0
 public static void ExecuteIfSetThenUnset(this IFlagStore self, string key, Action act)
 {
     if (self.IsSet(key))
     {
         act();
         self.Unset(key);
     }
 }
Ejemplo n.º 3
0
 public static void ExecuteIfSetOrNot(this IFlagStore self, string key, Action actIfYes, Action actIfNot)
 {
     if (self.IsSet(key))
     {
         actIfYes();
     }
     else
     {
         actIfNot();
     }
 }