mirror of https://github.com/ppy/osu
Add null hinting on UserLookupCache query method
This commit is contained in:
parent
5ca9a6a980
commit
545dcac4ec
|
@ -5,6 +5,7 @@
|
|||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using JetBrains.Annotations;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Game.Online.API;
|
||||
using osu.Game.Online.API.Requests;
|
||||
|
@ -23,6 +24,7 @@ public class UserLookupCache : MemoryCachingComponent<int, User>
|
|||
/// <param name="userId">The user to lookup.</param>
|
||||
/// <param name="token">An optional cancellation token.</param>
|
||||
/// <returns>The populated user, or null if the user does not exist or the request could not be satisfied.</returns>
|
||||
[ItemCanBeNull]
|
||||
public Task<User> GetUserAsync(int userId, CancellationToken token = default) => GetAsync(userId, token);
|
||||
|
||||
protected override async Task<User> ComputeValueAsync(int lookup, CancellationToken token = default)
|
||||
|
|
Loading…
Reference in New Issue