# Serialization::RealtimeDictionary

Properties

int Count

int Normal.Realtime.Serialization.RealtimeDictionary< TValue >.Count

The total number of items in the RealtimeSet, including the items that have been added locally and have yet to be confirmed by the server.

TValue this[uint key]

TValue Normal.Realtime.Serialization.RealtimeDictionary< TValue >.this[uint key]

Used to retrieve the model for a specific key.

Methods

void Add (uint key, TValue value)

void Normal.Realtime.Serialization.RealtimeDictionary< TValue >.Add

Adds a model to the RealtimeSet. This method will immediately fire a modelAdded event. If the add operation is rejected by the server (due to this client not having permissions to edit this model), a modelRemoved event will fire when the server’s response is received.

uint GetCollectionTypeID ()

uint Normal.Realtime.Serialization.RealtimeDictionary< TValue >.GetCollectionTypeID

IEnumerator<KeyValuePair<uint, TValue>> GetEnumerator ()

IEnumerator<KeyValuePair<uint, TValue> > Normal.Realtime.Serialization.RealtimeDictionary< TValue >.GetEnumerator

delegate void ModelAdded (RealtimeDictionary< TValue > dictionary, uint key, TValue model, bool remote)

delegate void Normal.Realtime.Serialization.RealtimeDictionary< TValue >.ModelAdded

delegate void ModelRemoved (RealtimeDictionary< TValue > dictionary, uint key, TValue model, bool remote)

delegate void Normal.Realtime.Serialization.RealtimeDictionary< TValue >.ModelRemoved

delegate void ModelReplaced (RealtimeDictionary< TValue > dictionary, uint key, TValue oldModel, TValue newModel, bool remote)

delegate void Normal.Realtime.Serialization.RealtimeDictionary< TValue >.ModelReplaced

void Read (ReadStream stream, StreamContext context)

void Normal.Realtime.Serialization.RealtimeDictionary< TValue >.Read

RealtimeDictionary ()

Normal.Realtime.Serialization.RealtimeDictionary< TValue >.RealtimeDictionary

bool Remove (uint key)

bool Normal.Realtime.Serialization.RealtimeDictionary< TValue >.Remove

Removes a model from the RealtimeSet. This method will immediately fire a modelRemoved event. If the remove operation is rejected by the server (due to this client not having permissions to edit this model), a modelAdded event will fire when the server’s response is received.

void Write (WriteStream stream, StreamContext context)

void Normal.Realtime.Serialization.RealtimeDictionary< TValue >.Write

int WriteLength (StreamContext context)

int Normal.Realtime.Serialization.RealtimeDictionary< TValue >.WriteLength

Events

ModelAdded modelAdded

ModelAdded Normal.Realtime.Serialization.RealtimeDictionary< TValue >.modelAdded

An event that fires whenever an item is added. This event includes a boolean to signal whether the model was added by the local client or a remote client.

ModelRemoved modelRemoved

ModelRemoved Normal.Realtime.Serialization.RealtimeDictionary< TValue >.modelRemoved

An event that fires whenever an item is removed. This event includes a boolean to signal whether the model was added by the local client or a remote client.

ModelReplaced modelReplaced

ModelReplaced Normal.Realtime.Serialization.RealtimeDictionary< TValue >.modelReplaced

An event that fires whenever an item is replaced with a new model. This event includes a boolean to signal whether the model was replaced by the local client or a remote client.