/// <summary> /// Validate the object. /// </summary> /// <exception cref="ValidationException"> /// Thrown if validation fails /// </exception> public virtual void Validate() { if (TimeSeriesId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "TimeSeriesId"); } if (SearchSpan == null) { throw new ValidationException(ValidationRules.CannotBeNull, "SearchSpan"); } if (SearchSpan != null) { SearchSpan.Validate(); } if (Filter != null) { Filter.Validate(); } if (InlineVariables != null) { foreach (var valueElement in InlineVariables.Values) { if (valueElement != null) { valueElement.Validate(); } } } }
/// <summary> /// Validate the object. /// </summary> /// <exception cref="ValidationException"> /// Thrown if validation fails /// </exception> public virtual void Validate() { if (TimeSeriesId == null) { throw new ValidationException(ValidationRules.CannotBeNull, "TimeSeriesId"); } if (SearchSpan == null) { throw new ValidationException(ValidationRules.CannotBeNull, "SearchSpan"); } if (SearchSpan != null) { SearchSpan.Validate(); } if (Filter != null) { Filter.Validate(); } }