Add null hinting on UserLookupCache query method

This commit is contained in:
Dean Herbert 2020-12-28 20:13:24 +09:00
parent 5ca9a6a980
commit 545dcac4ec
1 changed files with 2 additions and 0 deletions

View File

@ -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)