private object ValidateAndGetValue(FieldValueProvider valueProvider) { if (valueProvider == null) { throw new ArgumentNullException(nameof(valueProvider)); } return(valueProvider.Invoke()); }
public string CheckFieldToErrors(FieldValueProvider <T> valueProvider) { if (valueProvider == null) { throw new InvalidOperationException("Null provider", new ArgumentNullException(nameof(valueProvider))); } return(CheckFieldToErrors(valueProvider.Invoke())); }