Beispiel #1
0
        private LanguageExpressionTuple CheckRegular(int languageNumber, Action <LanguagePostReport> onIterate, params LanguageExpressionTuple[] dependencies)
        {
            LanguageExpressionTuple languageExpression = new LanguageExpressionTuple(this, languageNumber);

            if (onIterate != null)
            {
                onIterate(new LanguagePostReport(languageExpression, dependencies));
            }

            return(languageExpression);
        }
Beispiel #2
0
        public void CheckRegular(Action <LanguagePostReport> onIterate = null)
        {
            IReadOnlyList <DependencyCollection> dependencyMap = DependencyMap;

            LanguageExpressionTuple[] languages = new LanguageExpressionTuple[dependencyMap.Count];

            for (int i = 0; i < dependencyMap.Count; i++)
            {
                Expression expression = dependencyMap[i].Expression;
                IEnumerable <LanguageExpressionTuple> dependencies = dependencyMap[i].OrderBy(item => item).Select(item => languages[item]);
                languages[i] = expression.CheckRegular(_StartIndex + i, onIterate, dependencies.ToArray());
            }
        }
Beispiel #3
0
        public LanguagePostReport(LanguageExpressionTuple @new, IEnumerable <LanguageExpressionTuple> dependencies)
        {
            if (@new == null)
            {
                throw new ArgumentNullException(nameof(@new));
            }

            if (dependencies == null)
            {
                throw new ArgumentNullException(nameof(dependencies));
            }

            New          = @new;
            Dependencies = dependencies.ToList().AsReadOnly();

            if (Dependencies.AnyNull())
            {
                throw new ArgumentException("At least one element is null.", nameof(dependencies));
            }
        }