public char Convert(TLink source) { if (!_unicodeSymbolCriterionMatcher.IsMatched(source)) { throw new ArgumentOutOfRangeException(nameof(source), source, "Specified link is not a unicode symbol."); } return(_addressToCharConverter.Convert(_numberToAddressConverter.Convert(_links.GetSource(source)))); }
public string Convert(TLink source) { if (!_unicodeSequenceCriterionMatcher.IsMatched(source)) { throw new ArgumentOutOfRangeException(nameof(source), source, "Specified link is not a unicode sequence."); } var sequence = _links.GetSource(source); var sb = new StringBuilder(); foreach (var character in _sequenceWalker.Walk(sequence)) { sb.Append(_unicodeSymbolToCharConverter.Convert(character)); } return(sb.ToString()); }