/// <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());
        }
示例#2
0
        /// <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());
        }