chore: Add comments to public methods

- rename GetRepo to GetDirectoryForRegisteredRepo so it's actually doing what it says
This commit is contained in:
Scott 2026-09-05 13:27:16 +10:00
commit fc3fe217e4
7 changed files with 57 additions and 5 deletions

View file

@ -24,6 +24,10 @@ public class GitManager
InitialiseRegistrations();
}
/// <summary>
/// Returns the current <see cref="GitManager"/> instance. If no instance has been created, returns a new instance
/// and then the same instance every call after.
/// </summary>
public static GitManager Instance => GitManagerInstance.Value;
/// <summary>
@ -128,6 +132,11 @@ public class GitManager
});
}
/// <summary>
/// Unregisters a git repo registration by name. If no registration exists an exception will be thrown.
/// </summary>
/// <param name="registrationName"></param>
/// <exception cref="Exception"></exception>
public void UnregisterRepo(string registrationName)
{
_db.InConnection(conn =>
@ -195,7 +204,13 @@ public class GitManager
.ToList();
}
public string GetRepo(string? registeredName)
/// <summary>
/// Returns the file location for a git repo registration by name.
/// </summary>
/// <param name="registeredName"></param>
/// <returns></returns>
/// <exception cref="Exception"></exception>
public string GetDirectoryForRegisteredRepo(string? registeredName)
{
if (string.IsNullOrEmpty(registeredName))
{