Table of Contents

Class SerializableDictionaryBase<TKey, TValue, TValueStorage>

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll
[Serializable]
public abstract class SerializableDictionaryBase<TKey, TValue, TValueStorage> : SerializableDictionaryBase, IDictionary<TKey, TValue>, ICollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>, IDictionary, ICollection, IEnumerable, ISerializationCallbackReceiver, IDeserializationCallback, ISerializable

Type Parameters

TKey
TValue
TValueStorage
Inheritance
SerializableDictionaryBase<TKey, TValue, TValueStorage>
Implements
IDictionary<TKey, TValue>
ICollection<KeyValuePair<TKey, TValue>>
IEnumerable<KeyValuePair<TKey, TValue>>
ISerializationCallbackReceiver
Derived
Inherited Members

Constructors

SerializableDictionaryBase()

SerializableDictionaryBase method.

public SerializableDictionaryBase()

SerializableDictionaryBase(IDictionary<TKey, TValue>)

SerializableDictionaryBase method.

public SerializableDictionaryBase(IDictionary<TKey, TValue> dict)

Parameters

dict IDictionary<TKey, TValue>

The dict parameter.

SerializableDictionaryBase(SerializationInfo, StreamingContext)

SerializableDictionaryBase method.

protected SerializableDictionaryBase(SerializationInfo info, StreamingContext context)

Parameters

info SerializationInfo

The info parameter.

context StreamingContext

The context parameter.

Properties

Count

Gets or sets the Count value.

public int Count { get; }

Property Value

int

IsFixedSize

Gets a value indicating whether the fixedsize condition is met.

public bool IsFixedSize { get; }

Property Value

bool

IsReadOnly

Gets a value indicating whether the readonly condition is met.

public bool IsReadOnly { get; }

Property Value

bool

IsSynchronized

Gets a value indicating whether the synchronized condition is met.

public bool IsSynchronized { get; }

Property Value

bool

this[object]

Gets or sets the value associated with the specified key.

public object this[object key] { get; set; }

Parameters

key object

The key of the value to get or set.

Property Value

object

The value associated with the specified key.

this[TKey]

Gets or sets the value associated with the specified key.

public TValue this[TKey key] { get; set; }

Parameters

key TKey

The key of the value to get or set.

Property Value

TValue

The value associated with the specified key.

Keys

Gets the collection of keys.

public ICollection<TKey> Keys { get; }

Property Value

ICollection<TKey>

SyncRoot

Gets or sets the SyncRoot value.

public object SyncRoot { get; }

Property Value

object

Values

Gets the collection of values.

public ICollection<TValue> Values { get; }

Property Value

ICollection<TValue>

Methods

Add(KeyValuePair<TKey, TValue>)

Adds an item to the collection.

public void Add(KeyValuePair<TKey, TValue> item)

Parameters

item KeyValuePair<TKey, TValue>

The item parameter.

Add(object, object)

Adds an item to the collection.

public void Add(object key, object value)

Parameters

key object

The key parameter.

value object

The value parameter.

Add(TKey, TValue)

Adds an item to the collection.

public void Add(TKey key, TValue value)

Parameters

key TKey

The key parameter.

value TValue

The value parameter.

Clear()

Clears all items from the collection.

public void Clear()

Contains(KeyValuePair<TKey, TValue>)

Checks whether the ntains condition is met.

public bool Contains(KeyValuePair<TKey, TValue> item)

Parameters

item KeyValuePair<TKey, TValue>

The item parameter.

Returns

bool

True if the condition is met; otherwise, false.

Contains(object)

Checks whether the ntains condition is met.

public bool Contains(object key)

Parameters

key object

The key parameter.

Returns

bool

True if the condition is met; otherwise, false.

ContainsKey(TKey)

Checks whether the ntainskey condition is met.

public bool ContainsKey(TKey key)

Parameters

key TKey

The key parameter.

Returns

bool

True if the condition is met; otherwise, false.

CopyFrom(IDictionary<TKey, TValue>)

Copies data from another collection into this one.

public void CopyFrom(IDictionary<TKey, TValue> dict)

Parameters

dict IDictionary<TKey, TValue>

The dict parameter.

CopyTo(Array, int)

Copies the collection elements to an array.

public void CopyTo(Array array, int index)

Parameters

array Array

The array parameter.

index int

The index parameter.

CopyTo(KeyValuePair<TKey, TValue>[], int)

Copies the collection elements to an array.

public void CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)

Parameters

array KeyValuePair<TKey, TValue>[]

The array parameter.

arrayIndex int

The arrayIndex parameter.

GetEnumerator()

Gets the enumerator value.

public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()

Returns

IEnumerator<KeyValuePair<TKey, TValue>>

An enumerator for iterating through the collection.

GetObjectData(SerializationInfo, StreamingContext)

Gets the objectdata value.

public void GetObjectData(SerializationInfo info, StreamingContext context)

Parameters

info SerializationInfo

The info parameter.

context StreamingContext

The context parameter.

GetValue(TValueStorage[], int)

Gets the value value.

protected abstract TValue GetValue(TValueStorage[] storage, int i)

Parameters

storage TValueStorage[]

The storage parameter.

i int

The i parameter.

Returns

TValue

An integer result.

OnAfterDeserialize()

Called after deserialization to reconstruct internal state.

public void OnAfterDeserialize()

OnBeforeSerialize()

Called before serialization to prepare data for storage.

public void OnBeforeSerialize()

OnDeserialization(object)

Called when deserialization is complete.

public void OnDeserialization(object sender)

Parameters

sender object

The sender parameter.

Remove(KeyValuePair<TKey, TValue>)

Removes an item from the collection.

public bool Remove(KeyValuePair<TKey, TValue> item)

Parameters

item KeyValuePair<TKey, TValue>

The item parameter.

Returns

bool

True if successful; otherwise, false.

Remove(object)

Removes an item from the collection.

public void Remove(object key)

Parameters

key object

The key parameter.

Remove(TKey)

Removes an item from the collection.

public bool Remove(TKey key)

Parameters

key TKey

The key parameter.

Returns

bool

True if successful; otherwise, false.

SetValue(TValueStorage[], int, TValue)

Sets the value value.

protected abstract void SetValue(TValueStorage[] storage, int i, TValue value)

Parameters

storage TValueStorage[]

The storage parameter.

i int

The i parameter.

value TValue

The value parameter.

TryGetValue(TKey, out TValue)

Attempts to perform the getvalue operation.

public bool TryGetValue(TKey key, out TValue value)

Parameters

key TKey

The key parameter.

value TValue

Returns

bool

True if successful, false otherwise.