public static TResult NullCond <TArg, TResult>(this FluentApiUtilitiesHandle <TArg> hnd, Func <TArg, TResult> func) { if (func is null) { throw new ArgumentNullException(paramName: nameof(func)); } // if (hnd.Value == null) { return(default);
public static void NullCond <TArg>(this FluentApiUtilitiesHandle <TArg> hnd, Action <TArg> action) { if (action is null) { throw new ArgumentNullException(paramName: nameof(action)); } // if (hnd.Value != null) { action(obj: hnd.Value); } }
public static FluentApiUtilitiesHandle <TResult> Select <TSource, TResult>(this FluentApiUtilitiesHandle <TSource> hnd, Func <TSource, TResult> selector) { selector.EnsureNotNull(nameof(selector)); // return(new FluentApiUtilitiesHandle <TResult>(value: selector(arg: hnd.Value))); }