/// <summary> /// Enumerates through the <see cref="Snippets" /> but will first throw an exception if there are any <see cref="SnippetsInError" />. /// </summary> public virtual IEnumerator <Snippet> GetEnumerator() { if (SnippetsInError.Any()) { throw new SnippetReadingException($"SnippetsInError: {string.Join(", ", SnippetsInError.Select(x => x.Key))}"); } return(Snippets.GetEnumerator()); }
/// <summary> /// Enumerates over <see cref="Snippets"/>. /// </summary> public IEnumerator <Snippet> GetEnumerator() { return(Snippets.GetEnumerator()); }
public IEnumerator <ContentTypeSnippetModel> GetEnumerator() => Snippets.GetEnumerator();