ValidateParam static method

void ValidateParam(
  1. Object? param,
  2. String paramName
)
Validates parameter (null value not allowed). The param. Name of the param.

Implementation

static void ValidateParam(Object? param, String paramName) {
  bool isValid;

  if (param is String) {
    isValid = !StringUtils.IsNullOrEmpty(param);
  } else {
    isValid = param != null;
  }

  if (!isValid) {
    throw new ArgumentNullException(paramName);
  }

  ValidateParamAllowNull(param, paramName);
}