/// <summary> /// Enumerates through the <see cref="UsedSnippets" /> but will first throw an exception if there are any <see cref="MissingSnippets" />. /// </summary> public virtual IEnumerator <Snippet> GetEnumerator() { if (MissingSnippets.Any()) { throw new MissingSnippetsException(MissingSnippets); } return(UsedSnippets.GetEnumerator()); }
/// <summary> /// Enumerates through the <see cref="UsedSnippets" /> but will first throw an exception if there are any <see cref="MissingSnippets" />. /// </summary> public virtual IEnumerator <Snippet> GetEnumerator() { if (MissingSnippets.Any()) { throw new MissingSnippetsException(MissingSnippets); } if (MissingIncludes.Any()) { throw new MissingIncludesException(MissingIncludes); } if (ValidationErrors.Any()) { throw new ContentValidationException(ValidationErrors); } return(UsedSnippets.GetEnumerator()); }