Exemple #1
0
        /// <summary>
        /// Appends given tokenizer to the end of the current chain.
        /// </summary>
        /// <param name="link">A tokenizer to append.</param>
        public void AppendLink(ChainTokenizer link)
        {
            if (link is null)
            {
                return;
            }
            var current = this;

            while (current.Next is ChainTokenizer next)
            {
                current = next;
            }
            link.Next    = current.Next;
            current.Next = link;
        }
Exemple #2
0
 public AssignedValueTokenizer(char[] separators, ChainTokenizer optionTokenizer, IArgumentTokenizer valueTokenizer)
 {
     this.separators      = separators ?? throw new ArgumentNullException(nameof(separators));
     this.optionTokenizer = optionTokenizer ?? throw new ArgumentNullException(nameof(optionTokenizer));
     this.valueTokenizer  = valueTokenizer ?? throw new ArgumentNullException(nameof(valueTokenizer));
 }