Minor rename

This commit is contained in:
RogueException
2016-05-15 21:45:57 -03:00
parent 7898b74207
commit 300922d623
3 changed files with 5 additions and 6 deletions

View File

@@ -207,7 +207,7 @@
<Compile Include="Rest\Entities\Users\User.cs" />
<Compile Include="TokenType.cs" />
<Compile Include="WebSocket\MessageCache.cs" />
<Compile Include="WebSocket\ChannelPermissionsCache.cs" />
<Compile Include="WebSocket\PermissionsCache.cs" />
<Compile Include="WebSocket\DiscordClient.cs" />
<Compile Include="WebSocket\Entities\Channels\DMChannel.cs" />
<Compile Include="WebSocket\Entities\Channels\GuildChannel.cs" />

View File

@@ -11,7 +11,7 @@ namespace Discord.WebSocket
public abstract class GuildChannel : IGuildChannel
{
private ConcurrentDictionary<ulong, Overwrite> _overwrites;
internal ChannelPermissionsCache _permissions;
internal PermissionsCache _permissions;
/// <inheritdoc />
public ulong Id { get; }

View File

@@ -1,5 +1,4 @@
using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
@@ -17,14 +16,14 @@ namespace Discord.WebSocket
}
}
internal class ChannelPermissionsCache
internal class PermissionsCache
{
private readonly GuildChannel _channel;
private readonly ConcurrentDictionary<ulong, ChannelMember> _users;
public IEnumerable<ChannelMember> Members => _users.Select(x => x.Value);
public ChannelPermissionsCache(GuildChannel channel)
public PermissionsCache(GuildChannel channel)
{
_channel = channel;
_users = new ConcurrentDictionary<ulong, ChannelMember>(1, (int)(_channel.Guild.UserCount * 1.05));