コード例 #1
0
        public void Save(string filesDirectory)
        {
            // initialize CSV reader/writer
            CSVTable table = new CSVTable(filesDirectory, this.TableName, this.columnDefinitions);

            // initialize list to save the serialized records into
            List <CSVTableRow> rows = new List <CSVTableRow>();

            foreach (KeyValuePair <string, T> pair in this.itemsByIDs)
            {
                CSVTableRow row = table.CreateNewRowObject();
                this.SaveItem(pair.Value, row);
                rows.Add(row);
            }

            table.Save(rows);
        }