public static IValidateValue <T> ToHaveValue <T>(this IValidateValue <T> param, string reason = null, params object[] reasonArgs) { if (object.Equals(param.Value, default(T))) { param.HandleMissingValue("be specified", null, reason, reasonArgs); } return(param); }
public static IValidateValue <T> NotToBeNull <T>(this IValidateValue <T> param, string reason = null, params object[] reasonArgs) where T : class { if (object.ReferenceEquals(param.Value, null)) { param.HandleMissingValue("be specified", null, reason, reasonArgs); } return(param); }