private void Process(IEnumerable <KeyStringDictionary> sheet, FileInfo destination) { if (destination.Exists) { throw new InvalidOperationException("{0} already exists.".FormatWith(destination.FullName)); } switch (Output.ToUpperInvariant()) { case "CSV": Csv.Save(sheet, destination); break; case "TSV": Tsv.Save(sheet, destination); break; default: throw new FormatException("{0} is not a supported output data format.".FormatWith(Output)); } }
public static byte[] GetTsv(this PredictorEntity predictor) { return(Tsv.ToTsvBytes(predictor.RetrieveData())); }