/// <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());
        }
Beispiel #2
0
 /// <summary>
 /// Enumerates over <see cref="Snippets"/>.
 /// </summary>
 public IEnumerator <Snippet> GetEnumerator()
 {
     return(Snippets.GetEnumerator());
 }
Beispiel #3
0
 public IEnumerator <ContentTypeSnippetModel> GetEnumerator() => Snippets.GetEnumerator();