public void Print() { Id accountId = cardReader.Authenticate(); List <HistoryLine> historyOfAccount = history.Get(accountId); string formattedHistory = stringFormatter.Format(historyOfAccount); printer.Print(formattedHistory); }
/// <param name="formatter"><see cref="IStringFormatter"/> instance.</param> /// <inheritdoc cref="IStringFormatter.Format(string, IDataRecord, IFormatProvider)"/> public static string Format(this IStringFormatter formatter, string format, IDataRecord record) { _ = formatter ?? throw new ArgumentNullException(nameof(formatter)); _ = format ?? throw new ArgumentNullException(nameof(format)); _ = record ?? throw new ArgumentNullException(nameof(record)); return(formatter.Format(format, record, CultureInfo.InvariantCulture)); }
public string GetAssetString(string id, object values) { string result; if (_assetStrings.TryGetValue(id, out result)) { if (values != null) { result = _stringFormatter.Format(result, values); } } else { result = $"Asset string {id} not found."; } return(result); }
public string Handle(string input) { return(_formatter.Format(input)); }
protected override byte[] Encode(string text) { return(base.Encode(_stringFormatter.Format(text))); }
public IHttpActionResult Get() { return(Ok(_formatter.Format("Hello"))); }