Table of Contents

Class ImmutableVoiceClientCache

Namespace
NetCord.Gateway.Voice
Assembly
NetCord.dll
public sealed class ImmutableVoiceClientCache : IVoiceClientCache, IDictionaryProvider, IDisposable
Inheritance
ImmutableVoiceClientCache
Implements
Inherited Members

Properties

Ssrc

public uint Ssrc { get; }

Property Value

uint

SsrcUsers

public IReadOnlyDictionary<uint, ulong> SsrcUsers { get; }

Property Value

IReadOnlyDictionary<uint, ulong>

UserSsrcs

public IReadOnlyDictionary<ulong, uint> UserSsrcs { get; }

Property Value

IReadOnlyDictionary<ulong, uint>

Users

public IReadOnlySet<ulong> Users { get; }

Property Value

IReadOnlySet<ulong>

Methods

CacheCurrentSsrc(uint)

public IVoiceClientCache CacheCurrentSsrc(uint ssrc)

Parameters

ssrc uint

Returns

IVoiceClientCache

CacheUserSsrc(ulong, uint)

public IVoiceClientCache CacheUserSsrc(ulong userId, uint ssrc)

Parameters

userId ulong
ssrc uint

Returns

IVoiceClientCache

CacheUsers(IReadOnlyList<ulong>)

public IVoiceClientCache CacheUsers(IReadOnlyList<ulong> userIds)

Parameters

userIds IReadOnlyList<ulong>

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()

public void Dispose()

RemoveUser(ulong)

public IVoiceClientCache RemoveUser(ulong userId)

Parameters

userId ulong

Returns

IVoiceClientCache

ToJsonModel()

public JsonVoiceClientCache ToJsonModel()

Returns

JsonVoiceClientCache