CsvHelpers Class

Summary

The CsvHelpers class for working with CSV Helper.
Assembly
Cake.CsvHelper.dll
Namespace
Cake.CsvHelper
Base Types
  • Object
graph BT Type-->Base0["Object"] Type["CsvHelpers"] class Type type-node

Syntax

public sealed class CsvHelpers

Constructors

Name Summary
CsvHelpers(IFileSystem, ICakeEnvironment) Initializes new instance of the CsvHelpers class.

Methods

Name Value Summary
ReadRecords<T>(FilePath, ClassMap, CsvHelperSettings) IEnumerable<T>
Reads records from a CSV returning a list of the object type passed. Automapping is used if a Map is configured in settings.
WriteRecords<T>(FilePath, List<T>, ClassMap, CsvHelperSettings) void
Writes the records to the speficed file using the specified class mapp and settings.
WriteRecords<T>(FilePath, List<T>, CsvHelperSettings) void
Writes the records to the speficed file using automap and settings.
WriteRecords<T>(FilePath, List<T>, Dictionary<string, string>, CsvHelperSettings) void
Writes the records to the speficed file using the specified mapping and settings.

Extension Methods

Name Value Summary
Dump<CsvHelpers>() string
Get a basic string representation of specified object.
Requires the Cake.Incubator addin
IsIn<CsvHelpers>(CsvHelpers[]) bool
Checks if the source is contained in a list
Requires the Cake.Incubator addin
NotNull<CsvHelpers>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Ftp addin
NotNull<CsvHelpers>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Issues addin
ThrowIfNull<CsvHelpers>(string, string) T
Throws a System.ArgumentNullException with a specific message if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ThrowIfNull<CsvHelpers>(string) T
Throws a System.ArgumentNullException if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ToDictionary() IDictionary<string, object>
Requires the Cake.DeployParams addin