Class ImmutableVoiceClientCache
- Namespace
- NetCord.Gateway.Voice
- Assembly
- NetCord.dll
public sealed class ImmutableVoiceClientCache : IVoiceClientCache, IDictionaryProvider, IDisposable
- Inheritance
-
ImmutableVoiceClientCache
- Implements
-
- Inherited Members
-
Constructors
ImmutableVoiceClientCache(JsonVoiceClientCache)
public ImmutableVoiceClientCache(JsonVoiceClientCache jsonModel)
Parameters
jsonModel
JsonVoiceClientCache
Properties
Empty
public static ImmutableVoiceClientCache Empty { get; }
Property Value
- ImmutableVoiceClientCache
Ssrc
public uint Ssrc { get; }
Property Value
- uint
Ssrcs
public IReadOnlyDictionary<ulong, uint> Ssrcs { get; }
Property Value
- IReadOnlyDictionary<ulong, uint>
Users
public IReadOnlyDictionary<uint, ulong> Users { get; }
Property Value
- IReadOnlyDictionary<uint, ulong>
Methods
CacheCurrentSsrc(uint)
public IVoiceClientCache CacheCurrentSsrc(uint ssrc)
Parameters
ssrc
uint
Returns
- IVoiceClientCache
CacheUser(ulong, uint)
public IVoiceClientCache CacheUser(ulong userId, uint ssrc)
Parameters
userId
ulong
ssrc
uint
Returns
- IVoiceClientCache
CreateDictionary<TSource, TKey, TValue>(IEnumerable<TSource>, Func<TSource, TKey>, Func<TSource, TValue>)
public IReadOnlyDictionary<TKey, TValue> CreateDictionary<TSource, TKey, TValue>(IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TValue> elementSelector) where TKey : notnull where TValue : class
Parameters
source
IEnumerable<TSource>
keySelector
Func<TSource, TKey>
elementSelector
Func<TSource, TValue>
Returns
- IReadOnlyDictionary<TKey, TValue>
Type Parameters
TSource
TKey
TValue
Dispose()
RemoveUser(ulong)
public IVoiceClientCache RemoveUser(ulong userId)
Parameters
userId
ulong
Returns
- IVoiceClientCache
ToJsonModel()
public JsonVoiceClientCache ToJsonModel()
Returns
- JsonVoiceClientCache