Browse Source

Minor rename

tags/1.0-rc
RogueException 9 years ago
parent
commit
300922d623
3 changed files with 5 additions and 6 deletions
  1. +1
    -1
      src/Discord.Net/Discord.Net.csproj
  2. +1
    -1
      src/Discord.Net/WebSocket/Entities/Channels/GuildChannel.cs
  3. +3
    -4
      src/Discord.Net/WebSocket/PermissionsCache.cs

+ 1
- 1
src/Discord.Net/Discord.Net.csproj 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" />


+ 1
- 1
src/Discord.Net/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; }


src/Discord.Net/WebSocket/ChannelPermissionsCache.cs → src/Discord.Net/WebSocket/PermissionsCache.cs 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));

Loading…
Cancel
Save