Add xmldoc

This commit is contained in:
Bartłomiej Dach 2020-06-13 16:20:59 +02:00
parent 5dd47bf393
commit 2cadab8d29
2 changed files with 16 additions and 0 deletions

View File

@ -157,6 +157,11 @@ private Storage initialiseIPCStorage(string path)
return IPCStorage;
}
/// <summary>
/// Manually sets the path to the directory used for inter-process communication with a cutting-edge install.
/// </summary>
/// <param name="path">Path to the IPC directory</param>
/// <returns>Whether the supplied path was a valid IPC directory.</returns>
public bool SetIPCLocation(string path)
{
if (path == null || !ipcFileExistsInDirectory(path))
@ -170,6 +175,11 @@ public bool SetIPCLocation(string path)
return true;
}
/// <summary>
/// Tries to automatically detect the path to the directory used for inter-process communication
/// with a cutting-edge install.
/// </summary>
/// <returns>Whether an IPC directory was successfully auto-detected.</returns>
public bool AutoDetectIPCLocation() => SetIPCLocation(findStablePath());
private static bool ipcFileExistsInDirectory(string p) => File.Exists(Path.Combine(p, "ipc.txt"));

View File

@ -14,8 +14,14 @@ namespace osu.Game.Tournament.Models
[Serializable]
public class StableInfo
{
/// <summary>
/// Path to the IPC directory used by the stable (cutting-edge) install.
/// </summary>
public string StablePath { get; set; }
/// <summary>
/// Fired whenever stable info is successfully saved to file.
/// </summary>
public event Action OnStableInfoSaved;
private const string config_path = "tournament/stable.json";