Class NetworkPropertiesTable
This class represents a properties table used for custom properties of network players and rooms.
Inherited Members
Namespace: Evergine.Networking
Assembly: Evergine.Networking.dll
Syntax
public class NetworkPropertiesTable
Properties
IsReadOnly
Gets a value indicating whether the properties of this table are read only.
Declaration
public bool IsReadOnly { get; }
Property Value
Type | Description |
---|---|
bool |
Keys
Gets a enumerable that contains the existing keys in the properties table.
Declaration
public IEnumerable<byte> Keys { get; }
Property Value
Type | Description |
---|---|
IEnumerable<byte> |
NeedSync
Gets a value indicating whether this properties table needs to be sync or not.
Declaration
public bool NeedSync { get; }
Property Value
Type | Description |
---|---|
bool |
Methods
Clear()
Clears all the existing properties in the table.
Declaration
public void Clear()
ContainsKey(byte)
Determines whether the properties table contains the specified key.
Declaration
public bool ContainsKey(byte key)
Parameters
Type | Name | Description |
---|---|---|
byte | key | The byte key to locate in the properties table. |
Returns
Type | Description |
---|---|
bool |
|
GetBoolean(byte)
Gets a boolean value from the specified key from the properties table.
Declaration
public bool GetBoolean(byte key)
Parameters
Type | Name | Description |
---|---|---|
byte | key | The byte key. |
Returns
Type | Description |
---|---|
bool | A boolean value. |
GetByte(byte)
Gets a byte value from the specified key from the properties table.
Declaration
public byte GetByte(byte key)
Parameters
Type | Name | Description |
---|---|---|
byte | key | The byte key. |
Returns
Type | Description |
---|---|
byte | A byte value. |
GetBytes(byte)
Gets a byte array from the specified key from the properties table.
Declaration
public byte[] GetBytes(byte key)
Parameters
Type | Name | Description |
---|---|---|
byte | key | The byte key. |
Returns
Type | Description |
---|---|
byte[] | A byte array. |
GetColor(byte)
Gets a Color value from the specified key from the properties table.
Declaration
public Color GetColor(byte key)
Parameters
Type | Name | Description |
---|---|---|
byte | key | The byte key. |
Returns
GetDateTime(byte)
Gets a Date
Declaration
public DateTime GetDateTime(byte key)
Parameters
Type | Name | Description |
---|---|---|
byte | key | The byte key. |
Returns
GetFloat(byte)
Gets a float value from the specified key from the properties table.
Declaration
public float GetFloat(byte key)
Parameters
Type | Name | Description |
---|---|---|
byte | key | The byte key. |
Returns
Type | Description |
---|---|
float | A float value. |
GetInt32(byte)
Gets a integer value from the specified key from the properties table.
Declaration
public int GetInt32(byte key)
Parameters
Type | Name | Description |
---|---|---|
byte | key | The byte key. |
Returns
Type | Description |
---|---|
int | A integer value. |
GetInt64(byte)
Gets a long value from the specified key from the properties table.
Declaration
public long GetInt64(byte key)
Parameters
Type | Name | Description |
---|---|---|
byte | key | The byte key. |
Returns
Type | Description |
---|---|
long | A long value. |
GetMatrix3x3(byte)
Gets a Matrix3x3 value from the specified key from the properties table.
Declaration
public Matrix3x3 GetMatrix3x3(byte key)
Parameters
Type | Name | Description |
---|---|---|
byte | key | The byte key. |
Returns
GetMatrix4x4(byte)
Gets a Matrix4x4 value from the specified key from the properties table.
Declaration
public Matrix4x4 GetMatrix4x4(byte key)
Parameters
Type | Name | Description |
---|---|---|
byte | key | The byte key. |
Returns
GetNetworkEndpoint(byte)
Gets a Network
Declaration
public NetworkEndpoint GetNetworkEndpoint(byte key)
Parameters
Type | Name | Description |
---|---|---|
byte | key | The byte key. |
Returns
Type | Description |
---|---|
Network |
A Network |
GetQuaternion(byte)
Gets a Quaternion value from the specified key from the properties table.
Declaration
public Quaternion GetQuaternion(byte key)
Parameters
Type | Name | Description |
---|---|---|
byte | key | The byte key. |
Returns
Type | Description |
---|---|
Quaternion | A Quaternion value. |
GetSerializable<T>(byte)
Gets a INetwork
Declaration
public T GetSerializable<T>(byte key) where T : INetworkSerializable, new()
Parameters
Type | Name | Description |
---|---|---|
byte | key | The byte key. |
Returns
Type | Description |
---|---|
T | A INetwork |
Type Parameters
Name | Description |
---|---|
T | An INetwork |
GetString(byte)
Gets a string value from the specified key from the properties table.
Declaration
public string GetString(byte key)
Parameters
Type | Name | Description |
---|---|---|
byte | key | The byte key. |
Returns
Type | Description |
---|---|
string | A string value. |
GetTimeSpan(byte, bool)
Gets a Time
Declaration
public TimeSpan GetTimeSpan(byte key, bool highPrecision)
Parameters
Type | Name | Description |
---|---|---|
byte | key | The byte key. |
bool | highPrecision | Indicates whether the Time |
Returns
Remarks
High precision allows full Time
GetVector2(byte)
Gets a Vector2 value from the specified key from the properties table.
Declaration
public Vector2 GetVector2(byte key)
Parameters
Type | Name | Description |
---|---|---|
byte | key | The byte key. |
Returns
GetVector3(byte)
Gets a Vector3 value from the specified key from the properties table.
Declaration
public Vector3 GetVector3(byte key)
Parameters
Type | Name | Description |
---|---|---|
byte | key | The byte key. |
Returns
GetVector4(byte)
Gets a Vector4 value from the specified key from the properties table.
Declaration
public Vector4 GetVector4(byte key)
Parameters
Type | Name | Description |
---|---|---|
byte | key | The byte key. |
Returns
Remove(byte)
Removes the value with the specified key from the properties table.
Declaration
public bool Remove(byte key)
Parameters
Type | Name | Description |
---|---|---|
byte | key | The byte key. |
Returns
Type | Description |
---|---|
bool |
|
Set(byte, Color)
Set a Color value for the specified key in the properties table.
Declaration
public void Set(byte key, Color value)
Parameters
Set(byte, Matrix3x3)
Set a Matrix3x3 value for the specified key in the properties table.
Declaration
public void Set(byte key, Matrix3x3 value)
Parameters
Set(byte, Matrix4x4)
Set a Matrix4x4 value for the specified key in the properties table.
Declaration
public void Set(byte key, Matrix4x4 value)
Parameters
Set(byte, Quaternion)
Set a Quaternion value for the specified key in the properties table.
Declaration
public void Set(byte key, Quaternion value)
Parameters
Type | Name | Description |
---|---|---|
byte | key | The byte key. |
Quaternion | value | The Quaternion value. |
Set(byte, Vector2)
Set a Vector2 value for the specified key in the properties table.
Declaration
public void Set(byte key, Vector2 value)
Parameters
Set(byte, Vector3)
Set a Vector3 value for the specified key in the properties table.
Declaration
public void Set(byte key, Vector3 value)
Parameters
Set(byte, Vector4)
Set a Vector4 value for the specified key in the properties table.
Declaration
public void Set(byte key, Vector4 value)
Parameters
Set(byte, NetworkEndpoint)
Set a Network
Declaration
public void Set(byte key, NetworkEndpoint value)
Parameters
Type | Name | Description |
---|---|---|
byte | key | The byte key. |
Network |
value | The Network |
Set(byte, bool)
Set a boolean value for the specified key in the properties table.
Declaration
public void Set(byte key, bool value)
Parameters
Set(byte, byte)
Set a byte value for the specified key in the properties table.
Declaration
public void Set(byte key, byte value)
Parameters
Set(byte, byte[])
Set a byte array for the specified key in the properties table.
Declaration
public void Set(byte key, byte[] value)
Parameters
Set(byte, DateTime)
Set a Date
Declaration
public void Set(byte key, DateTime value)
Parameters
Set(byte, int)
Set a integer value for the specified key in the properties table.
Declaration
public void Set(byte key, int value)
Parameters
Set(byte, long)
Set a long integer value for the specified key in the properties table.
Declaration
public void Set(byte key, long value)
Parameters
Set(byte, float)
Set a float value for the specified key in the properties table.
Declaration
public void Set(byte key, float value)
Parameters
Set(byte, string)
Set a string value for the specified key in the properties table.
Declaration
public void Set(byte key, string value)
Parameters
Set(byte, TimeSpan, bool)
Set a Time
Declaration
public void Set(byte key, TimeSpan value, bool highPrecision)
Parameters
Type | Name | Description |
---|---|---|
byte | key | The byte key. |
Time |
value | The Time |
bool | highPrecision | Indicates whether the Time |
Remarks
High precision allows full Time
Set<T>(byte, T)
Gets a INetwork
Declaration
public void Set<T>(byte key, T value) where T : INetworkSerializable, new()
Parameters
Type | Name | Description |
---|---|---|
byte | key | The byte key. |
T | value | The INetwork |
Type Parameters
Name | Description |
---|---|
T | An INetwork |
TryGetBoolean(byte, out bool)
Gets a boolean value from the specified key from the properties table.
Declaration
public bool TryGetBoolean(byte key, out bool value)
Parameters
Type | Name | Description |
---|---|---|
byte | key | The byte key. |
bool | value | The value associated with the specified key, if the key exists; otherwise, the predefined value for the parameter type. |
Returns
Type | Description |
---|---|
bool |
|
TryGetByte(byte, out byte)
Gets a byte value from the specified key from the properties table.
Declaration
public bool TryGetByte(byte key, out byte value)
Parameters
Type | Name | Description |
---|---|---|
byte | key | The byte key. |
byte | value | The value associated with the specified key, if the key exists; otherwise, the predefined value for the parameter type. |
Returns
Type | Description |
---|---|
bool |
|
TryGetBytes(byte, out byte[])
Gets a byte array from the specified key from the properties table.
Declaration
public bool TryGetBytes(byte key, out byte[] value)
Parameters
Type | Name | Description |
---|---|---|
byte | key | The byte key. |
byte[] | value | The byte array associated with the specified key, if the key exists; otherwise, the predefined value for the parameter type. |
Returns
Type | Description |
---|---|
bool |
|
TryGetColor(byte, out Color)
Gets a Color value from the specified key from the properties table.
Declaration
public bool TryGetColor(byte key, out Color value)
Parameters
Type | Name | Description |
---|---|---|
byte | key | The byte key. |
Color | value | The value associated with the specified key, if the key exists; otherwise, the predefined value for the parameter type. |
Returns
Type | Description |
---|---|
bool |
|
TryGetDateTime(byte, out DateTime)
Gets a Date
Declaration
public bool TryGetDateTime(byte key, out DateTime value)
Parameters
Type | Name | Description |
---|---|---|
byte | key | The byte key. |
Date |
value | The value associated with the specified key, if the key exists; otherwise, the predefined value for the parameter type. |
Returns
Type | Description |
---|---|
bool |
|
TryGetFloat(byte, out float)
Gets a float value from the specified key from the properties table.
Declaration
public bool TryGetFloat(byte key, out float value)
Parameters
Type | Name | Description |
---|---|---|
byte | key | The byte key. |
float | value | The value associated with the specified key, if the key exists; otherwise, the predefined value for the parameter type. |
Returns
Type | Description |
---|---|
bool |
|
TryGetInt32(byte, out int)
Gets a integer value from the specified key from the properties table.
Declaration
public bool TryGetInt32(byte key, out int value)
Parameters
Type | Name | Description |
---|---|---|
byte | key | The byte key. |
int | value | The value associated with the specified key, if the key exists; otherwise, the predefined value for the parameter type. |
Returns
Type | Description |
---|---|
bool |
|
TryGetInt64(byte, out long)
Gets a long value from the specified key from the properties table.
Declaration
public bool TryGetInt64(byte key, out long value)
Parameters
Type | Name | Description |
---|---|---|
byte | key | The byte key. |
long | value | The value associated with the specified key, if the key exists; otherwise, the predefined value for the parameter type. |
Returns
Type | Description |
---|---|
bool |
|
TryGetMatrix3x3(byte, out Matrix3x3)
Gets a Matrix3x3 value from the specified key from the properties table.
Declaration
public bool TryGetMatrix3x3(byte key, out Matrix3x3 value)
Parameters
Type | Name | Description |
---|---|---|
byte | key | The byte key. |
Matrix3x3 | value | The value associated with the specified key, if the key exists; otherwise, the predefined value for the parameter type. |
Returns
Type | Description |
---|---|
bool |
|
TryGetMatrix4x4(byte, out Matrix4x4)
Gets a Matrix4x4 value from the specified key from the properties table.
Declaration
public bool TryGetMatrix4x4(byte key, out Matrix4x4 value)
Parameters
Type | Name | Description |
---|---|---|
byte | key | The byte key. |
Matrix4x4 | value | The value associated with the specified key, if the key exists; otherwise, the predefined value for the parameter type. |
Returns
Type | Description |
---|---|
bool |
|
TryGetNetworkEndpoint(byte, out NetworkEndpoint)
Gets a Network
Declaration
public bool TryGetNetworkEndpoint(byte key, out NetworkEndpoint value)
Parameters
Type | Name | Description |
---|---|---|
byte | key | The byte key. |
Network |
value | The value associated with the specified key, if the key exists; otherwise, the predefined value for the parameter type. |
Returns
Type | Description |
---|---|
bool |
|
TryGetQuaternion(byte, out Quaternion)
Gets a Quaternion value from the specified key from the properties table.
Declaration
public bool TryGetQuaternion(byte key, out Quaternion value)
Parameters
Type | Name | Description |
---|---|---|
byte | key | The byte key. |
Quaternion | value | The value associated with the specified key, if the key exists; otherwise, the predefined value for the parameter type. |
Returns
Type | Description |
---|---|
bool |
|
TryGetSerializable<T>(byte, out T)
Gets a INetwork
Declaration
public bool TryGetSerializable<T>(byte key, out T value) where T : INetworkSerializable, new()
Parameters
Type | Name | Description |
---|---|---|
byte | key | The byte key. |
T | value | The value associated with the specified key, if the key exists; otherwise, the predefined value for the parameter type. |
Returns
Type | Description |
---|---|
bool |
|
Type Parameters
Name | Description |
---|---|
T | An INetwork |
TryGetString(byte, out string)
Gets a string value from the specified key from the properties table.
Declaration
public bool TryGetString(byte key, out string value)
Parameters
Type | Name | Description |
---|---|---|
byte | key | The byte key. |
string | value | The value associated with the specified key, if the key exists; otherwise, the predefined value for the parameter type. |
Returns
Type | Description |
---|---|
bool |
|
TryGetTimeSpan(byte, bool, out TimeSpan)
Gets a Time
Declaration
public bool TryGetTimeSpan(byte key, bool highPrecision, out TimeSpan value)
Parameters
Type | Name | Description |
---|---|---|
byte | key | The byte key. |
bool | highPrecision | Indicates whether the Time |
Time |
value | The value associated with the specified key, if the key exists; otherwise, the predefined value for the parameter type. |
Returns
Type | Description |
---|---|
bool |
|
Remarks
High precision allows full Time
TryGetVector2(byte, out Vector2)
Gets a Vector2 value from the specified key from the properties table.
Declaration
public bool TryGetVector2(byte key, out Vector2 value)
Parameters
Type | Name | Description |
---|---|---|
byte | key | The byte key. |
Vector2 | value | The value associated with the specified key, if the key exists; otherwise, the predefined value for the parameter type. |
Returns
Type | Description |
---|---|
bool |
|
TryGetVector3(byte, out Vector3)
Gets a Vector3 value from the specified key from the properties table.
Declaration
public bool TryGetVector3(byte key, out Vector3 value)
Parameters
Type | Name | Description |
---|---|---|
byte | key | The byte key. |
Vector3 | value | The value associated with the specified key, if the key exists; otherwise, the predefined value for the parameter type. |
Returns
Type | Description |
---|---|
bool |
|
TryGetVector4(byte, out Vector4)
Gets a Vector4 value from the specified key from the properties table.
Declaration
public bool TryGetVector4(byte key, out Vector4 value)
Parameters
Type | Name | Description |
---|---|---|
byte | key | The byte key. |
Vector4 | value | The value associated with the specified key, if the key exists; otherwise, the predefined value for the parameter type. |
Returns
Type | Description |
---|---|
bool |
|
Events
PropertyAdded
Occurs when a property in the properties table is added by a remote player.
Declaration
public event EventHandler<byte> PropertyAdded
Event Type
Type | Description |
---|---|
Event |
PropertyChanged
Occurs when a property in the properties table is changed by a remote player.
Declaration
public event EventHandler<byte> PropertyChanged
Event Type
Type | Description |
---|---|
Event |
PropertyRemoved
Occurs when a property in the properties table is removed by a remote player.
Declaration
public event EventHandler<byte> PropertyRemoved
Event Type
Type | Description |
---|---|
Event |