ValidateWithIndex method

  1. @override
void ValidateWithIndex(
  1. int attachmentIndex
)
override
Validates this instance. Index of this attachment.

Implementation

@override
void ValidateWithIndex(int attachmentIndex) {
  if (StringUtils.IsNullOrEmpty(_fileName) &&
      (_content == null) &&
      (_contentStream == null)) {
    throw ServiceValidationException(
      "FileAttachmentContentIsNotSet($attachmentIndex)",
    );
  }
}