|
|
|
@ -76,7 +76,7 @@ namespace GBase |
|
|
|
|
|
|
|
|
|
|
|
return lastEntry.Key; |
|
|
|
return lastEntry.Key; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
@ -87,7 +87,7 @@ namespace GBase |
|
|
|
/// <param name="folderName"></param> |
|
|
|
/// <param name="folderName"></param> |
|
|
|
/// <param name="cancellationToken">A <see cref="CancellationToken"/> to cancel the asynchronous operation</param> |
|
|
|
/// <param name="cancellationToken">A <see cref="CancellationToken"/> to cancel the asynchronous operation</param> |
|
|
|
/// <returns>True if successful, false if not</returns> |
|
|
|
/// <returns>True if successful, false if not</returns> |
|
|
|
public async Task<bool> Init(Type type, string databasePath, string folderName, CancellationToken cancellationToken) //TODO: Remove bool return value? |
|
|
|
public async Task Init(Type type, string databasePath, string folderName, CancellationToken cancellationToken) |
|
|
|
{ |
|
|
|
{ |
|
|
|
Type = type; |
|
|
|
Type = type; |
|
|
|
FolderName = folderName; |
|
|
|
FolderName = folderName; |
|
|
|
@ -107,7 +107,7 @@ namespace GBase |
|
|
|
|
|
|
|
|
|
|
|
List<IGBaseFile> files = _fileHandler.Init(databasePath, FolderName, cancellationToken); |
|
|
|
List<IGBaseFile> files = _fileHandler.Init(databasePath, FolderName, cancellationToken); |
|
|
|
if (files == null) |
|
|
|
if (files == null) |
|
|
|
return true; |
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
foreach (var file in files) //create entries for existing files |
|
|
|
foreach (var file in files) //create entries for existing files |
|
|
|
{ |
|
|
|
{ |
|
|
|
@ -143,8 +143,6 @@ namespace GBase |
|
|
|
Entries.Add(entry); |
|
|
|
Entries.Add(entry); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
|