Example #1
0
        public void MakeSubstitution(List <TokenCollection> previous, Request next)
        {
            // Get token from previous sequence and replace new value with old one.
            IToken?replacement = source.FindClosestEquivalent(previous[sourceResponse]);

            if (replacement == null)
            {
                throw new Exception($"Unable to find token '{source.Name}' '{source.ToString()}'.");
            }

            target.ReplaceValue(next, replacement.Value);
        }