StringArrayToStringConverter.cs 488 B

1234567891011121314151617
  1. using System;
  2. namespace InABox.Mobile
  3. {
  4. public class StringArrayToStringConverter : AbstractConverter<string[], string>
  5. {
  6. protected override string Convert(string[] value, object? parameter = null)
  7. {
  8. return value != null ? String.Join("\n", value) : "";
  9. }
  10. protected override string[] Deconvert(string value, object? parameter = null)
  11. {
  12. return value != null ? value.Split('\n') : new String[] { };
  13. }
  14. }
  15. }