/// <summary> /// The validate. /// </summary> /// <returns> /// The <see cref="bool"/>. /// </returns> public bool Validate() { if (Validating.IsRaisedEventCancelled(new ValidationEventArgs <CustomerItemCacheBase>(this), this)) { return(true); } _validator.Value.EnableDataModifiers = this.EnableDataModifiers; var attempt = _validator.Value.Validate(this); Validated.RaiseEvent(new ValidationEventArgs <ValidationResult <CustomerItemCacheBase> >(attempt.Result), this); if (attempt.Success) { _itemCache = attempt.Result.Validated.ItemCache; } else { LogHelper.Debug <CustomerItemCacheBase>(attempt.Exception.Message); throw attempt.Exception; } return(attempt.Success); }