API ReferenceSandbox
public sealed class Sandbox.NetDictionary<TKey,TValue>
A networkable dictionary for use with the `Sandbox.SyncAttribute` and `Sandbox.HostSyncAttribute`. Only changes will be networked instead of sending the whole dictionary every time, so it's more efficient. Example usage: public class MyComponent : Component { [Sync] public NetDictionary MyBoolTable { get; set; } = new(); public void SetBoolState( string key, bool state ) { if ( IsProxy ) return; MyBoolTable[key] = state; } }
Constructors
Showing 1 constructors
public NetDictionary<TKey,TValue>()
No results match this filter.
Methods
Showing 11 methods
public virtual sealed void Clear()
public virtual sealed bool Contains(System.Collections.Generic.KeyValuePair`2<TKey,TValue> item)
public virtual sealed bool ContainsKey(TKey key)
public virtual sealed void CopyTo(System.Collections.Generic.KeyValuePair`2<TKey,TValue>[] array, int arrayIndex)
public virtual sealed void Dispose()
public virtual sealed System.Collections.Generic.IEnumerator`1<System.Collections.Generic.KeyValuePair`2<TKey,TValue>> GetEnumerator()
public virtual sealed bool TryGetValue(TKey key, TValue value)
No results match this filter.
Properties
Showing 4 properties
public virtual sealed int Sandbox.NetDictionary<TKey,TValue>.Count { get; set; }
public virtual sealed TValue Sandbox.NetDictionary<TKey,TValue>.Item { get; set; }
public virtual sealed System.Collections.Generic.ICollection`1<TKey> Sandbox.NetDictionary<TKey,TValue>.Keys { get; set; }
public virtual sealed System.Collections.Generic.ICollection`1<TValue> Sandbox.NetDictionary<TKey,TValue>.Values { get; set; }
No results match this filter.
Metadata
| Field | Value |
|---|---|
| Namespace | Sandbox |
| Type | class |
| Assembly | Sandbox.Engine |
| Doc ID | T:Sandbox.NetDictionary`2 |