/// <summary> /// If true... /// </summary> /// <param name="this"></param> /// <param name="action"></param> /// <param name="context"></param> public static void IfTrue <T>(this BooleanVal2 @this, Action <T> action, T context) { if (@this is not null && @this.IsT0()) { action?.Invoke(context); } }
/// <summary> /// If true... /// </summary> /// <param name="this"></param> /// <param name="action"></param> public static void IfTrue(this BooleanVal2 @this, Action action) { if (@this is not null && @this.IsT0()) { action?.Invoke(); } }