|
|
|
@ -80,12 +80,11 @@ namespace GBase.DataHandling |
|
|
|
|
|
|
|
|
|
|
|
public async Task<bool> AddEntry<T>(T entry, IGBaseTable table, FileStream entryFile, CancellationToken cancellationToken) |
|
|
|
public async Task<bool> AddEntry<T>(T entry, IGBaseTable table, FileStream entryFile, CancellationToken cancellationToken) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (!await _xmlDataWriter.InitFile(entryFile, table.Type.Name, cancellationToken)) |
|
|
|
await _xmlDataWriter.InitFile(entryFile, table.Type.Name, cancellationToken); |
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
foreach (var column in table.Columns) |
|
|
|
foreach (var column in table.Columns) |
|
|
|
{ |
|
|
|
{ |
|
|
|
//TODO: Set value for each column |
|
|
|
//set value for each column |
|
|
|
PropertyInfo property = entry.GetType().GetProperty(column.Name); |
|
|
|
PropertyInfo property = entry.GetType().GetProperty(column.Name); |
|
|
|
if (property == null) |
|
|
|
if (property == null) |
|
|
|
continue; //TODO: What to do in this case? (Shouldn't really happen...) |
|
|
|
continue; //TODO: What to do in this case? (Shouldn't really happen...) |
|
|
|
|