Beispiel #1
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (InstructionIdentification == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "InstructionIdentification");
     }
     if (EndToEndIdentification == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "EndToEndIdentification");
     }
     if (InstructedAmount == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "InstructedAmount");
     }
     if (CreditorAccount == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "CreditorAccount");
     }
     if (InstructedAmount != null)
     {
         InstructedAmount.Validate();
     }
     if (DebtorAccount != null)
     {
         DebtorAccount.Validate();
     }
     if (CreditorAccount != null)
     {
         CreditorAccount.Validate();
     }
 }
Beispiel #2
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (InstructionIdentification == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "InstructionIdentification");
     }
     if (CurrencyOfTransfer == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "CurrencyOfTransfer");
     }
     if (InstructedAmount == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "InstructedAmount");
     }
     if (CreditorAccount == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "CreditorAccount");
     }
     if (InstructedAmount != null)
     {
         InstructedAmount.Validate();
     }
     if (ExchangeRateInformation != null)
     {
         ExchangeRateInformation.Validate();
     }
     if (DebtorAccount != null)
     {
         DebtorAccount.Validate();
     }
     if (CreditorAccount != null)
     {
         CreditorAccount.Validate();
     }
 }
Beispiel #3
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (Frequency == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Frequency");
     }
     if (CurrencyOfTransfer == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "CurrencyOfTransfer");
     }
     if (InstructedAmount == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "InstructedAmount");
     }
     if (CreditorAccount == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "CreditorAccount");
     }
     if (InstructedAmount != null)
     {
         InstructedAmount.Validate();
     }
     if (DebtorAccount != null)
     {
         DebtorAccount.Validate();
     }
     if (CreditorAccount != null)
     {
         CreditorAccount.Validate();
     }
 }