Example #1
0
        public static string GenerateCsv <T>(this Table <T> table, CsvOptions options = null)
        {
            if (table == null)
            {
                throw new ArgumentNullException("table");
            }
            CsvGenerator <T> generator = new CsvGenerator <T>(table);

            return(generator.Generate(options));
        }
Example #2
0
        public static void GenerateCsv <T>(this Table <T> table, TextWriter writer, CsvOptions options = null)
        {
            if (table == null)
            {
                throw new ArgumentNullException("table");
            }
            CsvGenerator <T> generator = new CsvGenerator <T>(table);

            generator.Generate(writer, options);
        }
Example #3
0
        public static void GenerateCsv <T>(this Table <T> table, string path, CsvOptions options = null)
        {
            if (table == null)
            {
                throw new ArgumentNullException("table");
            }
            CsvGenerator <T> generator = new CsvGenerator <T>(table);

            generator.Generate(path, options);
        }