mirror of
https://github.com/ppy/osu
synced 2025-01-11 08:39:31 +00:00
Add xmldoc
This commit is contained in:
parent
5dd47bf393
commit
2cadab8d29
@ -157,6 +157,11 @@ namespace osu.Game.Tournament.IPC
|
||||
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 @@ namespace osu.Game.Tournament.IPC
|
||||
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"));
|
||||
|
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user