public static void Write<TSource>(
IEnumerable<TSource> data,
CsvWriter writer,
CsvMapping mapping,
Action<TSource, Object> conversion
)
Public Shared Sub Write(Of TSource) (
data As IEnumerable(Of TSource),
writer As CsvWriter,
mapping As CsvMapping,
conversion As Action(Of TSource, Object)
)
public:
generic<typename TSource>
static void Write(
IEnumerable<TSource>^ data,
CsvWriter^ writer,
CsvMapping^ mapping,
Action<TSource, Object^>^ conversion
)
static member Write :
data : IEnumerable<'TSource> *
writer : CsvWriter *
mapping : CsvMapping *
conversion : Action<'TSource, Object> -> unit
A method that fills the content of a TSource instance into the properties of mapping.
conversion is called with each CSV row to be written and it gets the TSource instance and mapping as arguments. mapping is passed to the method as dynamic argument: Inside the conversion method the registered DynamicProperty instances can be used like regular .NET properties, but without IntelliSense ("late binding").
With each call of conversion all DynamicProperty instances in mapping are reset to their DefaultValue.
ArgumentNullException | data, or writer, or mapping, or conversion is null. |
IOException | I/O error. |
ObjectDisposedException | The file was already closed. |