コード例 #1
0
 public static TBase WithValidation <TBase, TParam>(this IWithConfigurableValidation <TBase, TParam> withConfigurableValidation, Func <TParam, bool> validation, Func <TParam, string?> errorMessageGenerator)
 {
     return(withConfigurableValidation.WithValidation(new SimpleValidation <TParam>(validation, errorMessageGenerator)));
 }
コード例 #2
0
 public static TBase WithValidation <TBase, TParam>(this IWithConfigurableValidation <TBase, TParam> withConfigurableValidation, Func <TParam, bool> validation, string?errorMessage = null)
 {
     return(withConfigurableValidation.WithValidation(validation, _ => errorMessage));
 }