From b7aa71c9759dc7d69249948591ebb60de34e2750 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 5 Feb 2025 18:24:07 +0900 Subject: [PATCH] Adjust xmldoc slightly to convey the disposal pattern --- osu.Game/Online/Metadata/MetadataClient.cs | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/osu.Game/Online/Metadata/MetadataClient.cs b/osu.Game/Online/Metadata/MetadataClient.cs index 1da245e80d..9885419b65 100644 --- a/osu.Game/Online/Metadata/MetadataClient.cs +++ b/osu.Game/Online/Metadata/MetadataClient.cs @@ -73,10 +73,8 @@ namespace osu.Game.Online.Metadata return null; } - /// public abstract Task UpdateActivity(UserActivity? activity); - /// public abstract Task UpdateStatus(UserStatus? status); private int userPresenceWatchCount; @@ -84,11 +82,12 @@ namespace osu.Game.Online.Metadata protected bool IsWatchingUserPresence => Interlocked.CompareExchange(ref userPresenceWatchCount, userPresenceWatchCount, userPresenceWatchCount) > 0; - /// - public IDisposable BeginWatchingUserPresence() - => new UserPresenceWatchToken(this); + /// + /// Signals to the server that we want to begin receiving status updates for all users. + /// + /// An which will end the session when disposed. + public IDisposable BeginWatchingUserPresence() => new UserPresenceWatchToken(this); - /// Task IMetadataServer.BeginWatchingUserPresence() { if (Interlocked.Increment(ref userPresenceWatchCount) == 1) @@ -97,7 +96,6 @@ namespace osu.Game.Online.Metadata return Task.CompletedTask; } - /// Task IMetadataServer.EndWatchingUserPresence() { if (Interlocked.Decrement(ref userPresenceWatchCount) == 0) @@ -110,10 +108,8 @@ namespace osu.Game.Online.Metadata protected abstract Task EndWatchingUserPresenceInternal(); - /// public abstract Task UserPresenceUpdated(int userId, UserPresence? presence); - /// public abstract Task FriendPresenceUpdated(int userId, UserPresence? presence); private class UserPresenceWatchToken : IDisposable @@ -143,7 +139,6 @@ namespace osu.Game.Online.Metadata public abstract IBindable DailyChallengeInfo { get; } - /// public abstract Task DailyChallengeUpdated(DailyChallengeInfo? info); #endregion