Table of Contents

Class PlayerDictionary<TValue>

Namespace
Uncreated.Warfare.Util.List
Assembly
Uncreated.Warfare.dll

Dictionary of Steamworks.CSteamID to a generic value.

public class PlayerDictionary<TValue> : IDictionary<ulong, TValue>, ICollection<KeyValuePair<ulong, TValue>>, IReadOnlyDictionary<ulong, TValue>, IReadOnlyCollection<KeyValuePair<ulong, TValue>>, IEnumerable<KeyValuePair<ulong, TValue>>, IDictionary<CSteamID, TValue>, ICollection<KeyValuePair<CSteamID, TValue>>, IReadOnlyDictionary<CSteamID, TValue>, IReadOnlyCollection<KeyValuePair<CSteamID, TValue>>, IEnumerable<KeyValuePair<CSteamID, TValue>>, IDictionary<Player, TValue>, ICollection<KeyValuePair<Player, TValue>>, IReadOnlyDictionary<Player, TValue>, IReadOnlyCollection<KeyValuePair<Player, TValue>>, IEnumerable<KeyValuePair<Player, TValue>>, IDictionary<SteamPlayer, TValue>, ICollection<KeyValuePair<SteamPlayer, TValue>>, IReadOnlyDictionary<SteamPlayer, TValue>, IReadOnlyCollection<KeyValuePair<SteamPlayer, TValue>>, IEnumerable<KeyValuePair<SteamPlayer, TValue>>, IDictionary<IPlayer, TValue>, ICollection<KeyValuePair<IPlayer, TValue>>, IReadOnlyDictionary<IPlayer, TValue>, IReadOnlyCollection<KeyValuePair<IPlayer, TValue>>, IEnumerable<KeyValuePair<IPlayer, TValue>>, IDictionary<WarfarePlayer, TValue>, ICollection<KeyValuePair<WarfarePlayer, TValue>>, IReadOnlyDictionary<WarfarePlayer, TValue>, IReadOnlyCollection<KeyValuePair<WarfarePlayer, TValue>>, IEnumerable<KeyValuePair<WarfarePlayer, TValue>>, IEnumerable

Type Parameters

TValue
Inheritance
PlayerDictionary<TValue>
Implements
IDictionary<CSteamID, TValue>
ICollection<KeyValuePair<CSteamID, TValue>>
IReadOnlyDictionary<CSteamID, TValue>
IEnumerable<KeyValuePair<CSteamID, TValue>>
IDictionary<Player, TValue>
ICollection<KeyValuePair<Player, TValue>>
IReadOnlyDictionary<Player, TValue>
IEnumerable<KeyValuePair<Player, TValue>>
IDictionary<SteamPlayer, TValue>
ICollection<KeyValuePair<SteamPlayer, TValue>>
IReadOnlyDictionary<SteamPlayer, TValue>
IReadOnlyCollection<KeyValuePair<SteamPlayer, TValue>>
IEnumerable<KeyValuePair<SteamPlayer, TValue>>
Inherited Members

Constructors

PlayerDictionary()

public PlayerDictionary()

PlayerDictionary(IDictionary<ulong, TValue>)

public PlayerDictionary(IDictionary<ulong, TValue> dictionary)

Parameters

dictionary IDictionary<ulong, TValue>

PlayerDictionary(int)

public PlayerDictionary(int capacity)

Parameters

capacity int

Properties

Count

Represents a generic collection of key/value pairs.

public int Count { get; }

Property Value

int

this[Player]

Get the value associated with the given player.

public TValue this[Player player] { get; set; }

Parameters

player Player

Property Value

TValue

this[SteamPlayer]

Get the value associated with the given player.

public TValue this[SteamPlayer player] { get; set; }

Parameters

player SteamPlayer

Property Value

TValue

this[CSteamID]

Get the value associated with the given player.

public TValue this[CSteamID steam64] { get; set; }

Parameters

steam64 CSteamID

Property Value

TValue

this[ulong]

Get the value associated with the given player.

public TValue this[ulong steam64] { get; set; }

Parameters

steam64 ulong

Property Value

TValue

this[IPlayer]

Get the value associated with the given player.

public TValue this[IPlayer player] { get; set; }

Parameters

player IPlayer

Property Value

TValue

this[WarfarePlayer]

Get the value associated with the given player.

public TValue this[WarfarePlayer player] { get; set; }

Parameters

player WarfarePlayer

Property Value

TValue

Keys

Represents a generic collection of key/value pairs.

public Dictionary<ulong, TValue>.KeyCollection Keys { get; }

Property Value

Dictionary<ulong, TValue>.KeyCollection

Values

Represents a generic collection of key/value pairs.

public Dictionary<ulong, TValue>.ValueCollection Values { get; }

Property Value

Dictionary<ulong, TValue>.ValueCollection

Methods

Add(Player, TValue)

Add the value for the given player.

public void Add(Player player, TValue value)

Parameters

player Player
value TValue

Exceptions

ArgumentException

The key already exists in the dictionary.

Add(SteamPlayer, TValue)

Add the value for the given player.

public void Add(SteamPlayer player, TValue value)

Parameters

player SteamPlayer
value TValue

Exceptions

ArgumentException

The key already exists in the dictionary.

Add(CSteamID, TValue)

Add the value for the given player.

public void Add(CSteamID steam64, TValue value)

Parameters

steam64 CSteamID
value TValue

Exceptions

ArgumentException

The key already exists in the dictionary.

Add(ulong, TValue)

Add the value for the given player.

public void Add(ulong steam64, TValue value)

Parameters

steam64 ulong
value TValue

Exceptions

ArgumentException

The key already exists in the dictionary.

Add(IPlayer, TValue)

Add the value for the given player.

public void Add(IPlayer player, TValue value)

Parameters

player IPlayer
value TValue

Exceptions

ArgumentException

The key already exists in the dictionary.

Add(WarfarePlayer, TValue)

Add the value for the given player.

public void Add(WarfarePlayer player, TValue value)

Parameters

player WarfarePlayer
value TValue

Exceptions

ArgumentException

The key already exists in the dictionary.

AsReadOnly()

Returns a cached read-only dictionary referencing this dictionary.

public IReadOnlyDictionary<ulong, TValue> AsReadOnly()

Returns

IReadOnlyDictionary<ulong, TValue>

Clear()

Represents a generic collection of key/value pairs.

public void Clear()

ContainsPlayer(Player)

Check if this dictionary has a value for the given player.

public bool ContainsPlayer(Player player)

Parameters

player Player

Returns

bool

ContainsPlayer(SteamPlayer)

Check if this dictionary has a value for the given player.

public bool ContainsPlayer(SteamPlayer player)

Parameters

player SteamPlayer

Returns

bool

ContainsPlayer(CSteamID)

Check if this dictionary has a value for the given player.

public bool ContainsPlayer(CSteamID steam64)

Parameters

steam64 CSteamID

Returns

bool

ContainsPlayer(ulong)

Check if this dictionary has a value for the given player.

public bool ContainsPlayer(ulong steam64)

Parameters

steam64 ulong

Returns

bool

ContainsPlayer(IPlayer)

Check if this dictionary has a value for the given player.

public bool ContainsPlayer(IPlayer player)

Parameters

player IPlayer

Returns

bool

ContainsPlayer(WarfarePlayer)

Check if this dictionary has a value for the given player.

public bool ContainsPlayer(WarfarePlayer player)

Parameters

player WarfarePlayer

Returns

bool

GetEnumerator()

public Dictionary<ulong, TValue>.Enumerator GetEnumerator()

Returns

Dictionary<ulong, TValue>.Enumerator

Remove(Player)

Remove the value for the given player if it exists.

public bool Remove(Player player)

Parameters

player Player

Returns

bool

Remove(SteamPlayer)

Remove the value for the given player if it exists.

public bool Remove(SteamPlayer player)

Parameters

player SteamPlayer

Returns

bool

Remove(CSteamID)

Remove the value for the given player if it exists.

public bool Remove(CSteamID steam64)

Parameters

steam64 CSteamID

Returns

bool

Remove(ulong)

Remove the value for the given player if it exists.

public bool Remove(ulong steam64)

Parameters

steam64 ulong

Returns

bool

Remove(IPlayer)

Remove the value for the given player if it exists.

public bool Remove(IPlayer player)

Parameters

player IPlayer

Returns

bool

Remove(WarfarePlayer)

Remove the value for the given player if it exists.

public bool Remove(WarfarePlayer player)

Parameters

player WarfarePlayer

Returns

bool

TryGetValue(Player, out TValue)

Attempt to get the value for the given player if it exists.

public bool TryGetValue(Player player, out TValue value)

Parameters

player Player
value TValue

Returns

bool

TryGetValue(SteamPlayer, out TValue)

Attempt to get the value for the given player if it exists.

public bool TryGetValue(SteamPlayer player, out TValue value)

Parameters

player SteamPlayer
value TValue

Returns

bool

TryGetValue(CSteamID, out TValue)

Attempt to get the value for the given player if it exists.

public bool TryGetValue(CSteamID steam64, out TValue value)

Parameters

steam64 CSteamID
value TValue

Returns

bool

TryGetValue(ulong, out TValue)

Attempt to get the value for the given player if it exists.

public bool TryGetValue(ulong steam64, out TValue value)

Parameters

steam64 ulong
value TValue

Returns

bool

TryGetValue(IPlayer, out TValue)

Attempt to get the value for the given player if it exists.

public bool TryGetValue(IPlayer player, out TValue value)

Parameters

player IPlayer
value TValue

Returns

bool

TryGetValue(WarfarePlayer, out TValue)

Attempt to get the value for the given player if it exists.

public bool TryGetValue(WarfarePlayer player, out TValue value)

Parameters

player WarfarePlayer
value TValue

Returns

bool