Show / Hide Table of Contents

# Class SyncDict<TKey, TValue>

##### Inheritance

object
InternalBaseClass
SyncableField
SyncDict<TKey, TValue>

##### Implements

IEnumerable<KeyValuePair<TKey, TValue>>
IEnumerable

##### Inherited Members

SyncableField.IsClient
SyncableField.IsServer
InternalBaseClass.ExecuteRPC(in RemoteCall)
InternalBaseClass.ExecuteRPC<T>(in RemoteCall<T>, T)
InternalBaseClass.ExecuteRPC<T>(in RemoteCallSpan<T>, ReadOnlySpan<T>)
InternalBaseClass.ExecuteRPC<T>(in RemoteCallSerializable<T>, T)

###### Namespace: LiteEntitySystem.Extensions

###### Assembly: LiteEntitySystem.dll

##### Syntax

    public class SyncDict<TKey, TValue> : SyncableField, IEnumerable<KeyValuePair<TKey, TValue>>, IEnumerable where TKey : unmanaged where TValue : unmanaged

##### Type Parameters

Name | Description
--- | ---
TKey |
TValue |

### Properties

#### Count

##### Declaration

    public int Count { get; }

##### Property Value

Type | Description
--- | ---
int |

#### this[TKey]

##### Declaration

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

##### Parameters

Type | Name | Description
--- | --- | ---
TKey | index |

##### Property Value

Type | Description
--- | ---
TValue |

#### Keys

##### Declaration

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

##### Property Value

Type | Description
--- | ---
Dictionary<TKey, TValue>.KeyCollection |

#### Values

##### Declaration

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

##### Property Value

Type | Description
--- | ---
Dictionary<TKey, TValue>.ValueCollection |

### Methods

#### Add(TKey, TValue)

##### Declaration

    public void Add(TKey key, TValue value)

##### Parameters

Type | Name | Description
--- | --- | ---
TKey | key |
TValue | value |

#### AfterReadRPC()

##### Declaration

    protected override void AfterReadRPC()

##### Overrides

SyncableField.AfterReadRPC()

#### BeforeReadRPC()

##### Declaration

    protected override void BeforeReadRPC()

##### Overrides

SyncableField.BeforeReadRPC()

#### Clear()

##### Declaration

    public void Clear()

#### ContainsKey(TKey)

##### Declaration

    public bool ContainsKey(TKey key)

##### Parameters

Type | Name | Description
--- | --- | ---
TKey | key |

##### Returns

Type | Description
--- | ---
bool |

#### ContainsValue(TValue)

##### Declaration

    public bool ContainsValue(TValue value)

##### Parameters

Type | Name | Description
--- | --- | ---
TValue | value |

##### Returns

Type | Description
--- | ---
bool |

#### GetEnumerator()

##### Declaration

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

##### Returns

Type | Description
--- | ---
Dictionary<TKey, TValue>.Enumerator |

#### OnRollback()

##### Declaration

    protected override void OnRollback()

##### Overrides

SyncableField.OnRollback()

#### OnSyncRequested()

##### Declaration

    protected override void OnSyncRequested()

##### Overrides

InternalBaseClass.OnSyncRequested()

#### RegisterRPC(ref SyncableRPCRegistrator)

##### Declaration

    protected override void RegisterRPC(ref SyncableRPCRegistrator r)

##### Parameters

Type | Name | Description
--- | --- | ---
SyncableRPCRegistrator | r |

##### Overrides

SyncableField.RegisterRPC(ref SyncableRPCRegistrator)

#### Remove(TKey)

##### Declaration

    public bool Remove(TKey key)

##### Parameters

Type | Name | Description
--- | --- | ---
TKey | key |

##### Returns

Type | Description
--- | ---
bool |

#### TryGetValue(TKey, out TValue)

##### Declaration

    public bool TryGetValue(TKey key, out TValue value)

##### Parameters

Type | Name | Description
--- | --- | ---
TKey | key |
TValue | value |

##### Returns

Type | Description
--- | ---
bool |

### Implements

IEnumerable<T>
IEnumerable