GetFieldValueOrThrowIfNull<T> method

T GetFieldValueOrThrowIfNull<T>(
  1. T value,
  2. String name
)
Gets a property value or throw if null. The value. The property name.

Implementation

T GetFieldValueOrThrowIfNull<T>(T value, String name) {
  if (value != null) {
    return value;
  } else {
    throw new ServiceValidationException(
        "PropertyValueMustBeSpecifiedForRecurrencePattern($name)");
  }
}