Search Results for

    Show / Hide Table of Contents

    Class NetworkPropertiesTable

    This class represents a properties table used for custom properties of network players and rooms.

    Inheritance
    object
    NetworkPropertiesTable
    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 an 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 synchronized or not.

    Declaration
    public bool NeedSync { get; }
    Property Value
    Type Description
    bool

    Methods

    Clear()

    Clears all 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

    true if the properties table contains an element with the specified key; otherwise, false.

    GetBoolean(byte)

    Gets a Boolean value from the specified key in 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 in 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 for 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 in the properties table.

    Declaration
    public Color GetColor(byte key)
    Parameters
    Type Name Description
    byte key

    The byte key.

    Returns
    Type Description
    Color

    A Color value.

    GetDateTime(byte)

    Gets a DateTime value from the specified key in the properties table.

    Declaration
    public DateTime GetDateTime(byte key)
    Parameters
    Type Name Description
    byte key

    The byte key.

    Returns
    Type Description
    DateTime

    A DateTime value.

    GetFloat(byte)

    Gets a float value from the specified key in 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 an integer value from the specified key in the properties table.

    Declaration
    public int GetInt32(byte key)
    Parameters
    Type Name Description
    byte key

    The byte key.

    Returns
    Type Description
    int

    An integer value.

    GetInt64(byte)

    Gets a long value for 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 in the properties table.

    Declaration
    public Matrix3x3 GetMatrix3x3(byte key)
    Parameters
    Type Name Description
    byte key

    The byte key.

    Returns
    Type Description
    Matrix3x3

    A Matrix3x3 value.

    GetMatrix4x4(byte)

    Gets a Matrix4x4 value from the specified key in the properties table.

    Declaration
    public Matrix4x4 GetMatrix4x4(byte key)
    Parameters
    Type Name Description
    byte key

    The byte key.

    Returns
    Type Description
    Matrix4x4

    A Matrix4x4 value.

    GetNetworkEndpoint(byte)

    Gets a NetworkEndpoint value from the specified key in the properties table.

    Declaration
    public NetworkEndpoint GetNetworkEndpoint(byte key)
    Parameters
    Type Name Description
    byte key

    The byte key.

    Returns
    Type Description
    NetworkEndpoint

    A NetworkEndpoint value.

    GetQuaternion(byte)

    Gets a Quaternion value from the specified key in 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 INetworkSerializable value from the specified key in the properties table.

    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 INetworkSerializable value.

    Type Parameters
    Name Description
    T

    The INetworkSerializable type.

    GetString(byte)

    Gets a string value for 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 TimeSpan value from the specified key in the properties table.

    Declaration
    public TimeSpan GetTimeSpan(byte key, bool highPrecision)
    Parameters
    Type Name Description
    byte key

    The byte key.

    bool highPrecision

    Indicates whether the TimeSpan will be read using high precision (ticks) or not (milliseconds).

    Returns
    Type Description
    TimeSpan

    A TimeSpan value.

    Remarks

    High precision allows the full TimeSpan range; otherwise, it will be limited to "+-24.20:31:23.647" (+-24 days, 20 hours, 31 minutes, 23 seconds, and 647 milliseconds).

    GetVector2(byte)

    Gets a Vector2 value from the specified key in the properties table.

    Declaration
    public Vector2 GetVector2(byte key)
    Parameters
    Type Name Description
    byte key

    The byte key.

    Returns
    Type Description
    Vector2

    A Vector2 value.

    GetVector3(byte)

    Gets a Vector3 value from the specified key in the properties table.

    Declaration
    public Vector3 GetVector3(byte key)
    Parameters
    Type Name Description
    byte key

    The byte key.

    Returns
    Type Description
    Vector3

    A Vector3 value.

    GetVector4(byte)

    Gets a Vector4 value from the properties table using the specified key.

    Declaration
    public Vector4 GetVector4(byte key)
    Parameters
    Type Name Description
    byte key

    The byte key.

    Returns
    Type Description
    Vector4

    A Vector4 value.

    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

    true if the element is successfully found and removed; otherwise, false. This method returns false if the key is not found in the properties table.

    Set(byte, Color)

    Sets a Color value for the specified key in the properties table.

    Declaration
    public void Set(byte key, Color value)
    Parameters
    Type Name Description
    byte key

    The byte key.

    Color value

    The Color value.

    Set(byte, Matrix3x3)

    Sets a Matrix3x3 value for the specified key in the properties table.

    Declaration
    public void Set(byte key, Matrix3x3 value)
    Parameters
    Type Name Description
    byte key

    The byte key.

    Matrix3x3 value

    The Matrix3x3 value.

    Set(byte, Matrix4x4)

    Sets a Matrix4x4 value for the specified key in the properties table.

    Declaration
    public void Set(byte key, Matrix4x4 value)
    Parameters
    Type Name Description
    byte key

    The byte key.

    Matrix4x4 value

    The Matrix4x4 value.

    Set(byte, Quaternion)

    Sets 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)

    Sets a Vector2 value for the specified key in the properties table.

    Declaration
    public void Set(byte key, Vector2 value)
    Parameters
    Type Name Description
    byte key

    The byte key.

    Vector2 value

    The Vector2 value.

    Set(byte, Vector3)

    Sets a Vector3 value for the specified key in the properties table.

    Declaration
    public void Set(byte key, Vector3 value)
    Parameters
    Type Name Description
    byte key

    The byte key.

    Vector3 value

    The Vector3 value.

    Set(byte, Vector4)

    Sets a Vector4 value for the specified key in the properties table.

    Declaration
    public void Set(byte key, Vector4 value)
    Parameters
    Type Name Description
    byte key

    The byte key.

    Vector4 value

    The Vector4 value.

    Set(byte, NetworkEndpoint)

    Sets a NetworkEndpoint value for the specified key in the properties table.

    Declaration
    public void Set(byte key, NetworkEndpoint value)
    Parameters
    Type Name Description
    byte key

    The byte key.

    NetworkEndpoint value

    The NetworkEndpoint value.

    Set(byte, bool)

    Sets a boolean value for the specified key in the properties table.

    Declaration
    public void Set(byte key, bool value)
    Parameters
    Type Name Description
    byte key

    The byte key.

    bool value

    The boolean value.

    Set(byte, byte)

    Sets a byte value for the specified key in the properties table.

    Declaration
    public void Set(byte key, byte value)
    Parameters
    Type Name Description
    byte key

    The byte key.

    byte value

    The byte value.

    Set(byte, byte[])

    Sets a byte array for the specified key in the properties table.

    Declaration
    public void Set(byte key, byte[] value)
    Parameters
    Type Name Description
    byte key

    The byte key.

    byte[] value

    The byte array.

    Set(byte, DateTime)

    Sets a DateTime value for the specified key in the properties table.

    Declaration
    public void Set(byte key, DateTime value)
    Parameters
    Type Name Description
    byte key

    The byte key.

    DateTime value

    The DateTime value.

    Set(byte, int)

    Sets an integer value for the specified key in the properties table.

    Declaration
    public void Set(byte key, int value)
    Parameters
    Type Name Description
    byte key

    The byte key.

    int value

    The integer value.

    Set(byte, long)

    Sets a long integer value for the specified key in the properties table.

    Declaration
    public void Set(byte key, long value)
    Parameters
    Type Name Description
    byte key

    The byte key.

    long value

    The long integer value.

    Set(byte, float)

    Sets a float value for the specified key in the properties table.

    Declaration
    public void Set(byte key, float value)
    Parameters
    Type Name Description
    byte key

    The byte key.

    float value

    The float value.

    Set(byte, string)

    Sets a string value for the specified key in the properties table.

    Declaration
    public void Set(byte key, string value)
    Parameters
    Type Name Description
    byte key

    The byte key.

    string value

    The string value.

    Set(byte, TimeSpan, bool)

    Sets a TimeSpan value for the specified key in the properties table.

    Declaration
    public void Set(byte key, TimeSpan value, bool highPrecision)
    Parameters
    Type Name Description
    byte key

    The byte key.

    TimeSpan value

    The TimeSpan value.

    bool highPrecision

    Indicates whether the TimeSpan will be written using high precision (ticks) or not (milliseconds).

    Remarks

    High precision allows full TimeSpan range; otherwise, it will be limited to "+-24.20:31:23.647" (+-24 days, 20 hours, 31 minutes, 23 seconds and 647 milliseconds).

    Set<T>(byte, T)

    Gets a INetworkSerializable value from the specified key in the properties table.

    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 INetworkSerializable value.

    Type Parameters
    Name Description
    T

    An INetworkSerializable type.

    TryGetBoolean(byte, out bool)

    Gets a boolean value from the specified key in 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

    true if the table contains a property for the specified key; otherwise, false.

    TryGetByte(byte, out byte)

    Gets a byte value from the specified key in 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 it exists; otherwise, the predefined value for the parameter type.

    Returns
    Type Description
    bool

    true if the table contains a property for the specified key; otherwise, false.

    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

    true if the table contains a property for the specified key; otherwise, false.

    TryGetColor(byte, out Color)

    Gets a Color value from the specified key in 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

    true if the table contains a property for the specified key; otherwise, false.

    TryGetDateTime(byte, out DateTime)

    Gets a DateTime value from the specified key in the properties table.

    Declaration
    public bool TryGetDateTime(byte key, out DateTime value)
    Parameters
    Type Name Description
    byte key

    The byte key.

    DateTime value

    The value associated with the specified key if the key exists; otherwise, the predefined value for the parameter type.

    Returns
    Type Description
    bool

    true if the table contains a property for the specified key; otherwise, false.

    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

    true if the table contains a property for the specified key; otherwise, false.

    TryGetInt32(byte, out int)

    Gets an 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

    true if the table contains a property for the specified key; otherwise, false.

    TryGetInt64(byte, out long)

    Gets a long value from the specified key in 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

    true if the table contains a property for the specified key; otherwise, false.

    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

    true if the table contains a property for the specified key; otherwise, false.

    TryGetMatrix4x4(byte, out Matrix4x4)

    Gets a Matrix4x4 value from the specified key in 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

    true if the table contains a property for the specified key; otherwise, false.

    TryGetNetworkEndpoint(byte, out NetworkEndpoint)

    Gets a NetworkEndpoint value from the specified key in the properties table.

    Declaration
    public bool TryGetNetworkEndpoint(byte key, out NetworkEndpoint value)
    Parameters
    Type Name Description
    byte key

    The byte key.

    NetworkEndpoint value

    The value associated with the specified key, if the key exists; otherwise, the predefined value for the parameter type.

    Returns
    Type Description
    bool

    true if the table contains a property for the specified key; otherwise, false.

    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

    true if the table contains a property for the specified key; otherwise, false.

    TryGetSerializable<T>(byte, out T)

    Gets a INetworkSerializable value from the specified key in the properties table.

    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

    true if the table contains a property for the specified key; otherwise, false.

    Type Parameters
    Name Description
    T

    An INetworkSerializable type.

    TryGetString(byte, out string)

    Gets a string value from the specified key in 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

    true if the table contains a property for the specified key; otherwise, false.

    TryGetTimeSpan(byte, bool, out TimeSpan)

    Gets a TimeSpan value from the specified key from the properties table.

    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 TimeSpan will be read using high precision (ticks) or not (milliseconds).

    TimeSpan value

    The value associated with the specified key, if the key exists; otherwise, the predefined value for the parameter type.

    Returns
    Type Description
    bool

    true if the table contains a property for the specified key; otherwise, false.

    Remarks

    High precision allows the full TimeSpan range; otherwise, it will be limited to "+-24.20:31:23.647" (+-24 days, 20 hours, 31 minutes, 23 seconds, and 647 milliseconds).

    TryGetVector2(byte, out Vector2)

    Gets a Vector2 value from the specified key in 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

    true if the table contains a property for the specified key; otherwise, false.

    TryGetVector3(byte, out Vector3)

    Gets a Vector3 value from the specified key in 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

    true if the table contains a property for the specified key; otherwise, false.

    TryGetVector4(byte, out Vector4)

    Gets a Vector4 value from the specified key in 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

    true if the table contains a property for the specified key; otherwise, false.

    Events

    PropertyAdded

    Occurs when a property is added to the properties table by a remote player.

    Declaration
    public event EventHandler<byte> PropertyAdded
    Event Type
    Type Description
    EventHandler<byte>

    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
    EventHandler<byte>

    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
    EventHandler<byte>

    Extension Methods

    ReflectionHelper.GetMemberAssembly(object)
    ReflectionHelper.GetTypeName(object)
    In this article
    Back to top
    Generated by DocFX