Esempio n. 1
0
 private void ExecuteCallbacks(CallbackType callbackType)
 {
     Callbacks.ExecuteCallbacks(callbackType, (T)this);
     foreach (IHasCallbacks embeddedDocument in EmbeddedDocumentUtility.GetEmbeddedDocuments(this))
     {
         embeddedDocument.ExecuteCallbacks(callbackType);
     }
 }
Esempio n. 2
0
 IEnumerable <ValidationResult> IValidatableDocument.Validate(SaveType saveType)
 {
     Errors.AddRange(ValidationUtility.Validate(PropertyValidators, DocumentValidationContext <T> .Create((T)this, saveType)));
     foreach (IValidatableDocument embeddedDocument in EmbeddedDocumentUtility.GetEmbeddedDocuments(this))
     {
         Errors.AddRange(embeddedDocument.Validate(saveType));
     }
     foreach (var objectValidator in ObjectValidators)
     {
         Errors.AddRange(objectValidator((T)this));
     }
     return(Errors);
 }