Class ContentTableCsv
- Namespace
- SurvivorsMaker.Editor
- Assembly
- SurvivorsMaker.Editor.dll
CSV for the Content Table, made to round-trip through spreadsheets: header = field keys (titles are also accepted on import), invariant numbers, RFC 4180 quoting, CRLF rows. Import matches rows by Id and previews the changes; nothing is written until Apply(ContentTableImport).
public static class ContentTableCsv
- Inheritance
-
ContentTableCsv
- Inherited Members
Methods
Apply(ContentTableImport)
Applies the previewed changes as one Undo step. Returns cells changed.
public static int Apply(ContentTableImport import)
Parameters
importContentTableImport
Returns
Diff(ContentTableKind, IEnumerable<ContentAssetBase>, string)
Compares CSV rows with the assets by Id. Only editable, known columns are compared.
public static ContentTableImport Diff(ContentTableKind kind, IEnumerable<ContentAssetBase> assets, string csv)
Parameters
kindContentTableKindassetsIEnumerable<ContentAssetBase>csvstring
Returns
Export(ContentTableKind, IEnumerable<ContentAssetBase>)
public static string Export(ContentTableKind kind, IEnumerable<ContentAssetBase> assets)
Parameters
kindContentTableKindassetsIEnumerable<ContentAssetBase>
Returns
Parse(string)
Parses CSV text (comma or, when the header has none, semicolon/tab separated) into rows of cells.
public static List<string[]> Parse(string text)
Parameters
textstring
Returns
Quote(string)
public static string Quote(string value)
Parameters
valuestring