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