Class EvergineExtensions
Extension methods to read and write Evergine types in or from a Lidgren.
Inherited Members
Namespace: Evergine.Networking.Connection.Messages
Assembly: Evergine.Networking.dll
Syntax
public static class EvergineExtensions
Methods
ReadColor(NetBuffer)
Reads a Color value from the Lidgren.
Declaration
public static Color ReadColor(this NetBuffer message)
Parameters
Type | Name | Description |
---|---|---|
Net |
message | The buffer to write to. |
Returns
ReadDateTime(NetBuffer)
Reads a Date
Declaration
public static DateTime ReadDateTime(this NetBuffer message)
Parameters
Type | Name | Description |
---|---|---|
Net |
message | The buffer to write to. |
Returns
ReadMatrix3x3(NetBuffer)
Reads a Matrix3x3 value from the Lidgren.
Declaration
public static Matrix3x3 ReadMatrix3x3(this NetBuffer message)
Parameters
Type | Name | Description |
---|---|---|
Net |
message | The buffer to write to. |
Returns
ReadMatrix4x4(NetBuffer)
Reads a Matrix4x4 value from the Lidgren.
Declaration
public static Matrix4x4 ReadMatrix4x4(this NetBuffer message)
Parameters
Type | Name | Description |
---|---|---|
Net |
message | The buffer to write to. |
Returns
ReadNetworkEndpoint(NetBuffer)
Reads a Network
Declaration
public static NetworkEndpoint ReadNetworkEndpoint(this NetBuffer message)
Parameters
Type | Name | Description |
---|---|---|
Net |
message | The buffer to write to. |
Returns
Type | Description |
---|---|
Network |
A Network |
ReadQuaternion(NetBuffer)
Reads a Quaternion value from the Lidgren.
Declaration
public static Quaternion ReadQuaternion(this NetBuffer message)
Parameters
Type | Name | Description |
---|---|---|
Net |
message | The buffer to write to. |
Returns
Type | Description |
---|---|
Quaternion | A Quaternion value. |
ReadTimeSpan(NetBuffer, bool)
Reads a Time
Declaration
public static TimeSpan ReadTimeSpan(this NetBuffer message, bool highPrecision)
Parameters
Type | Name | Description |
---|---|---|
Net |
message | The buffer to write to. |
bool | highPrecision | Indicates whether the Time |
Returns
Remarks
High precision allows full Time
ReadVector2(NetBuffer)
Reads a Vector2 value from the Lidgren.
Declaration
public static Vector2 ReadVector2(this NetBuffer message)
Parameters
Type | Name | Description |
---|---|---|
Net |
message | The buffer to read from. |
Returns
ReadVector3(NetBuffer)
Reads a Vector3 value from the Lidgren.
Declaration
public static Vector3 ReadVector3(this NetBuffer message)
Parameters
Type | Name | Description |
---|---|---|
Net |
message | The buffer to read from. |
Returns
ReadVector4(NetBuffer)
Reads a Vector4 value from the Lidgren.
Declaration
public static Vector4 ReadVector4(this NetBuffer message)
Parameters
Type | Name | Description |
---|---|---|
Net |
message | The buffer to read from. |
Returns
Write(NetBuffer, Color)
Write a Color to the specified Lidgren.
Declaration
public static void Write(this NetBuffer message, Color value)
Parameters
Write(NetBuffer, Matrix3x3)
Write a Matrix3x3 to the specified Lidgren.
Declaration
public static void Write(this NetBuffer message, Matrix3x3 value)
Parameters
Type | Name | Description |
---|---|---|
Net |
message | The buffer to write to. |
Matrix3x3 | value | The Matrix3x3 value. |
Write(NetBuffer, Matrix4x4)
Write a Matrix4x4 to the specified Lidgren.
Declaration
public static void Write(this NetBuffer message, Matrix4x4 value)
Parameters
Type | Name | Description |
---|---|---|
Net |
message | The buffer to write to. |
Matrix4x4 | value | The Matrix4x4 value. |
Write(NetBuffer, Quaternion)
Write a Quaternion to the specified Lidgren.
Declaration
public static void Write(this NetBuffer message, Quaternion value)
Parameters
Type | Name | Description |
---|---|---|
Net |
message | The buffer to write to. |
Quaternion | value | The Quaternion value. |
Write(NetBuffer, Vector2)
Write a Vector2 to the specified Lidgren.
Declaration
public static void Write(this NetBuffer message, Vector2 value)
Parameters
Write(NetBuffer, Vector3)
Write a Vector3 to the specified Lidgren.
Declaration
public static void Write(this NetBuffer message, Vector3 value)
Parameters
Write(NetBuffer, Vector4)
Write a Vector4 to the specified Lidgren.
Declaration
public static void Write(this NetBuffer message, Vector4 value)
Parameters
Write(NetBuffer, NetworkEndpoint)
Write a Network
Declaration
public static void Write(this NetBuffer message, NetworkEndpoint value)
Parameters
Type | Name | Description |
---|---|---|
Net |
message | The buffer to write to. |
Network |
value | The Network |
Write(NetBuffer, DateTime)
Write a Date
Declaration
public static void Write(this NetBuffer message, DateTime value)
Parameters
Write(NetBuffer, TimeSpan, bool)
Write a Time
Declaration
public static void Write(this NetBuffer message, TimeSpan value, bool highPrecision)
Parameters
Type | Name | Description |
---|---|---|
Net |
message | The buffer to write to. |
Time |
value | The Time |
bool | highPrecision | Indicates whether the Time |
Remarks
High precision allows full Time