reformat
This commit is contained in:
parent
7ea945b427
commit
99c1587e7b
12 changed files with 35 additions and 35 deletions
|
|
@ -31,7 +31,8 @@ public class ChannelCacheService
|
|||
});
|
||||
}
|
||||
|
||||
public bool TryGet(Snowflake id, [NotNullWhen(true)] out IChannel? channel) => _channels.TryGetValue(id, out channel);
|
||||
public bool TryGet(Snowflake id, [NotNullWhen(true)] out IChannel? channel) =>
|
||||
_channels.TryGetValue(id, out channel);
|
||||
|
||||
public void Remove(Snowflake? guildId, Snowflake id, out IChannel? channel)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ public class GuildCacheService
|
|||
private readonly ConcurrentDictionary<Snowflake, IGuild> _guilds = new();
|
||||
|
||||
public int Size => _guilds.Count;
|
||||
|
||||
|
||||
public void Set(IGuild guild) => _guilds[guild.ID] = guild;
|
||||
public bool Remove(Snowflake id, [NotNullWhen(true)] out IGuild? guild) => _guilds.Remove(id, out guild);
|
||||
public bool TryGet(Snowflake id, [NotNullWhen(true)] out IGuild? guild) => _guilds.TryGetValue(id, out guild);
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ namespace Catalogger.Backend.Cache;
|
|||
public class UserCacheService(IDiscordRestUserAPI userApi)
|
||||
{
|
||||
private readonly ConcurrentDictionary<Snowflake, IUser> _cache = new();
|
||||
|
||||
|
||||
public int Size => _cache.Count;
|
||||
|
||||
public async Task<IUser?> GetUserAsync(Snowflake userId)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue