StringCombiner.cs 457 B

12345678910111213141516
  1. namespace InABox.Mobile
  2. {
  3. public class StringCombiner : AbstractCombiner<string, StringCombinerFunction>
  4. {
  5. public string Separator { get; set; }
  6. protected override string Combine(string current, string next)
  7. {
  8. return Function switch
  9. {
  10. StringCombinerFunction.Append => string.Join(Separator, new [] { current, next } ),
  11. _ => current
  12. };
  13. }
  14. }
  15. }