public TypedTextElement(string word, string type, IElementFormatter elementFormatter) { if (elementFormatter == null) { throw new ArgumentException($"{nameof(elementFormatter)} can't be null"); } if (string.IsNullOrEmpty(word)) { throw new ArgumentException("Element can't be null or empty"); } Word = elementFormatter.ConvertToUsedForm(word) ?? throw new ArgumentException("Element after formatting can't be null"); Type = type ?? throw new ArgumentException("Element type can't be null"); }
public YandexElementParser(IEnumerable <IElementValidator> elementValidators, IElementFormatter elementFormatter, YandexToolUser toolUser) : base(elementValidators, elementFormatter) { this.toolUser = toolUser; }
protected BaseElementParser(IElementFormatter elementFormatter) { ElementFormatter = elementFormatter; }
protected ElementParserWithRules(IEnumerable <IElementValidator> elementValidators, IElementFormatter elementFormatter) : base(elementFormatter) { ElementValidators = elementValidators; }