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

import ContentTableImport

Returns

int

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

kind ContentTableKind
assets IEnumerable<ContentAssetBase>
csv string

Returns

ContentTableImport

Export(ContentTableKind, IEnumerable<ContentAssetBase>)

public static string Export(ContentTableKind kind, IEnumerable<ContentAssetBase> assets)

Parameters

kind ContentTableKind
assets IEnumerable<ContentAssetBase>

Returns

string

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

text string

Returns

List<string[]>

Quote(string)

public static string Quote(string value)

Parameters

value string

Returns

string