/// <summary> /// Creates the binary selectorElement. /// </summary> public BinarySelectorElement CreateBinarySelector(SelectorElementBase left, SelectorElementBase right, CombinatorElementBase selectorOperator) { return(new BinarySelectorElement(left, right, selectorOperator)); }
/// <summary> /// Creates the binary selectorElement. /// </summary> public BinarySelectorElement CreateBinarySelector(SelectorElementBase left, SelectorElementBase right, CombinatorElementBase selectorOperator) { return new BinarySelectorElement(left, right, selectorOperator); }
/// <summary> /// Resolves the CombinatorElement. /// </summary> private BinaryCombinator resolveCombinator(CombinatorElementBase combinatorElement, CombinatorBase left, CombinatorBase right) { var combinators = DescriptorRepository.GetCombinatorDescriptors() .Where(combinator => NameMatcher.Match(combinator.Value, combinatorElement.Value)) .ToArray(); if (combinators.Count() > 1) throw new Exception($"Ambiguity of combinator element: {combinatorElement.Value}"); if (!combinators.Any()) throw new Exception($"Combinator is not found: {combinatorElement.Value}"); return SelectorFactory.CreateCombinator(combinators[0].CombinatorType, left, right); }