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
|
public class GitManager
|
||||||
{
|
{
|
||||||
private static readonly Lazy<GitManager> GitManagerInstance = new(() => new 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 static Action<string>? _debugWriterDelegate;
|
||||||
|
private readonly DatabaseManager _db;
|
||||||
|
private readonly ConcurrentDictionary<string, InternalGitRegistration> _registrations;
|
||||||
|
|
||||||
private GitManager()
|
private GitManager()
|
||||||
{
|
{
|
||||||
|
|
@ -22,6 +22,13 @@ public class GitManager
|
||||||
InitialiseRegistrations();
|
InitialiseRegistrations();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static GitManager Instance => GitManagerInstance.Value;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Always returns a new clean instance of GitManager
|
||||||
|
/// </summary>
|
||||||
|
internal static GitManager InternalFreshInstance => new();
|
||||||
|
|
||||||
/// <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.
|
||||||
/// </summary>
|
/// </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>
|
/// <summary>
|
||||||
/// Registers a git repository based on an absolute location. If <paramref name="registrationName" /> is null or empty,
|
/// 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.
|
/// the registration will use the folder name for the git repo at the top level.
|
||||||
|
|
@ -146,7 +146,7 @@ public class GitManager
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <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.
|
/// is no longer needed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="commandRuntime"></param>
|
/// <param name="commandRuntime"></param>
|
||||||
|
|
@ -156,7 +156,7 @@ public class GitManager
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Clears any output previously registered with <see cref="SetDebugWriter"/>
|
/// Clears any output previously registered with <see cref="SetDebugWriter" />
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static void ClearDebugWriter()
|
public static void ClearDebugWriter()
|
||||||
{
|
{
|
||||||
|
|
@ -169,9 +169,9 @@ public class GitManager
|
||||||
[Table(TableName)]
|
[Table(TableName)]
|
||||||
private class InternalGitRegistration
|
private class InternalGitRegistration
|
||||||
{
|
{
|
||||||
|
internal const string TableName = "GitRegistration";
|
||||||
private string _currentBranch = string.Empty;
|
private string _currentBranch = string.Empty;
|
||||||
private long _nextCheckTime;
|
private long _nextCheckTime;
|
||||||
internal const string TableName = "GitRegistration";
|
|
||||||
|
|
||||||
[PrimaryKey]
|
[PrimaryKey]
|
||||||
public Guid Id { get; set; }
|
public Guid Id { get; set; }
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue