Example #1
0
 public static bool TryParseFromCsv(string[] input, out INameToIsin result)
 {
     try
     {
         result = new NameToIsin(input[0], input[1]);
         return(true);
     }
     catch (Exception ex)
     {
         _logger.Warn(ex, $"Line cannot be converted into name-to-isin entity ({string.Join(",", input)})");
         result = new NameToIsin(string.Empty, string.Empty);
         return(false);
     }
 }
Example #2
0
 public static string FormatForCSV(INameToIsin entity, string separator) =>
 string.Join(separator,
             entity.Name.WrapWithQuotes(),
             entity.Isin);