Rename User to APIUser and move to correct namespace

This commit is contained in:
Dean Herbert
2021-11-04 18:02:44 +09:00
parent 69aa620ab7
commit 0ecf5f201c
195 changed files with 990 additions and 946 deletions

View File

@ -4,24 +4,24 @@
using System.Threading;
using System.Threading.Tasks;
using osu.Game.Database;
using osu.Game.Users;
using osu.Game.Online.API.Requests.Responses;
namespace osu.Game.Tests.Visual
{
public class TestUserLookupCache : UserLookupCache
{
/// <summary>
/// A special user ID which <see cref="ComputeValueAsync"/> would return a <see langword="null"/> <see cref="User"/> for.
/// A special user ID which <see cref="ComputeValueAsync"/> would return a <see langword="null"/> <see cref="APIUser"/> for.
/// As a simulation to what a regular <see cref="UserLookupCache"/> would return in the case of failing to fetch the user.
/// </summary>
public const int UNRESOLVED_USER_ID = -1;
protected override Task<User> ComputeValueAsync(int lookup, CancellationToken token = default)
protected override Task<APIUser> ComputeValueAsync(int lookup, CancellationToken token = default)
{
if (lookup == UNRESOLVED_USER_ID)
return Task.FromResult((User)null);
return Task.FromResult((APIUser)null);
return Task.FromResult(new User
return Task.FromResult(new APIUser
{
Id = lookup,
Username = $"User {lookup}"