chore(git-provider): Code style
This commit is contained in:
parent
cf336da271
commit
164df4ecf4
1 changed files with 12 additions and 12 deletions
|
|
@ -10,9 +10,9 @@ namespace ModuleCore.Git;
|
|||
public class GitManager
|
||||
{
|
||||
private static readonly Lazy<GitManager> GitManagerInstance = new(() => new GitManager());
|
||||
private readonly ConcurrentDictionary<string, InternalGitRegistration> _registrations;
|
||||
private readonly DatabaseManager _db;
|
||||
private static Action<string>? _debugWriterDelegate;
|
||||
private readonly DatabaseManager _db;
|
||||
private readonly ConcurrentDictionary<string, InternalGitRegistration> _registrations;
|
||||
|
||||
private GitManager()
|
||||
{
|
||||
|
|
@ -22,6 +22,13 @@ public class GitManager
|
|||
InitialiseRegistrations();
|
||||
}
|
||||
|
||||
public static GitManager Instance => GitManagerInstance.Value;
|
||||
|
||||
/// <summary>
|
||||
/// Always returns a new clean instance of GitManager
|
||||
/// </summary>
|
||||
internal static GitManager InternalFreshInstance => new();
|
||||
|
||||
/// <summary>
|
||||
/// Creates up any database tables and loads all previously saved git registrations.
|
||||
/// </summary>
|
||||
|
|
@ -56,13 +63,6 @@ public class GitManager
|
|||
}
|
||||
}
|
||||
|
||||
public static GitManager Instance => GitManagerInstance.Value;
|
||||
|
||||
/// <summary>
|
||||
/// Always returns a new clean instance of GitManager
|
||||
/// </summary>
|
||||
internal static GitManager InternalFreshInstance => new();
|
||||
|
||||
/// <summary>
|
||||
/// Registers a git repository based on an absolute location. If <paramref name="registrationName" /> is null or empty,
|
||||
/// the registration will use the folder name for the git repo at the top level.
|
||||
|
|
@ -146,7 +146,7 @@ public class GitManager
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Registers an output for debug output. <see cref="ClearDebugWriter"/> should be called as soon as the need for output
|
||||
/// Registers an output for debug output. <see cref="ClearDebugWriter" /> should be called as soon as the need for output
|
||||
/// is no longer needed.
|
||||
/// </summary>
|
||||
/// <param name="commandRuntime"></param>
|
||||
|
|
@ -156,7 +156,7 @@ public class GitManager
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clears any output previously registered with <see cref="SetDebugWriter"/>
|
||||
/// Clears any output previously registered with <see cref="SetDebugWriter" />
|
||||
/// </summary>
|
||||
public static void ClearDebugWriter()
|
||||
{
|
||||
|
|
@ -169,9 +169,9 @@ public class GitManager
|
|||
[Table(TableName)]
|
||||
private class InternalGitRegistration
|
||||
{
|
||||
internal const string TableName = "GitRegistration";
|
||||
private string _currentBranch = string.Empty;
|
||||
private long _nextCheckTime;
|
||||
internal const string TableName = "GitRegistration";
|
||||
|
||||
[PrimaryKey]
|
||||
public Guid Id { get; set; }
|
||||
|
|
|
|||
Loading…
Reference in a new issue