feat: Add GitRepoRegistration cmdlets #5
1 changed files with 3 additions and 3 deletions
feat(git-manager): Update InternalFreshInstance to take a database name
commit
cb01efd323
|
|
@ -14,10 +14,10 @@ public class GitManager
|
|||
private readonly DatabaseManager _db;
|
||||
private readonly ConcurrentDictionary<string, InternalGitRegistration> _registrations;
|
||||
|
||||
private GitManager()
|
||||
private GitManager(string? databaseName = null)
|
||||
{
|
||||
_registrations = new ConcurrentDictionary<string, InternalGitRegistration>();
|
||||
_db = new DatabaseManager("git.db");
|
||||
_db = new DatabaseManager(databaseName ?? "git.db");
|
||||
|
||||
InitialiseRegistrations();
|
||||
}
|
||||
|
|
@ -27,7 +27,7 @@ public class GitManager
|
|||
/// <summary>
|
||||
/// Always returns a new clean instance of GitManager
|
||||
/// </summary>
|
||||
internal static GitManager InternalFreshInstance => new();
|
||||
internal static GitManager InternalFreshInstance(string databaseName) => new(databaseName);
|
||||
|
||||
/// <summary>
|
||||
/// Creates up any database tables and loads all previously saved git registrations.
|
||||
|
|
|
|||
Loading…
Reference in a new issue