|
@@ -24,7 +24,7 @@ namespace Discord |
|
|
public TKey NewId { get; } |
|
|
public TKey NewId { get; } |
|
|
public CollectionItemRemappedEventArgs(TValue item, TKey oldId, TKey newId) { Item = item; OldId = oldId; NewId = newId; } |
|
|
public CollectionItemRemappedEventArgs(TValue item, TKey oldId, TKey newId) { Item = item; OldId = oldId; NewId = newId; } |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public EventHandler<CollectionItemEventArgs> ItemCreated; |
|
|
public EventHandler<CollectionItemEventArgs> ItemCreated; |
|
|
private void RaiseItemCreated(TValue item) |
|
|
private void RaiseItemCreated(TValue item) |
|
|
{ |
|
|
{ |
|
@@ -54,6 +54,8 @@ namespace Discord |
|
|
protected readonly DiscordClient _client; |
|
|
protected readonly DiscordClient _client; |
|
|
protected readonly ConcurrentDictionary<TKey, TValue> _dictionary; |
|
|
protected readonly ConcurrentDictionary<TKey, TValue> _dictionary; |
|
|
|
|
|
|
|
|
|
|
|
public int Count => _dictionary.Count; |
|
|
|
|
|
|
|
|
protected AsyncCollection(DiscordClient client, object writerLock) |
|
|
protected AsyncCollection(DiscordClient client, object writerLock) |
|
|
{ |
|
|
{ |
|
|
_client = client; |
|
|
_client = client; |
|
|