Net |
public class NetDataReader
The NetDataReader type exposes the following members.
| Name | Description | |
|---|---|---|
| NetDataReader | Initializes a new instance of the NetDataReader class | |
| NetDataReader(Byte) | Initializes a new instance of the NetDataReader class | |
| NetDataReader(NetDataWriter) | Initializes a new instance of the NetDataReader class | |
| NetDataReader(Byte, Int32, Int32) | Initializes a new instance of the NetDataReader class |
| Name | Description | |
|---|---|---|
| AvailableBytes | Gets the number of Bytes remaining to be read. | |
| EndOfData | Gets a value indicating whether the Position has reached the end of the data. | |
| IsNull | Gets a value indicating whether the internal data buffer is . | |
| Position | Gets the current read position within the buffer. | |
| RawData | Gets the internal Byte array containing the raw network data. | |
| RawDataSize | Gets the total size of the RawData buffer. | |
| UserDataOffset | Gets the starting offset of the user payload within the RawData. | |
| UserDataSize | Gets the size of the user payload excluding the initial UserDataOffset. |
| Name | Description | |
|---|---|---|
| Clear | Clears the reader state and releases the reference to the internal buffer. | |
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) | |
| Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) | |
| Get(Boolean) | Reads a Boolean and assigns it to result. | |
| Get(Byte) | Reads a Byte and assigns it to result. | |
| Get(Char) | Reads a Char and assigns it to result. | |
| Get(Double) | Reads a Double and assigns it to result. | |
| Get(Guid) | Reads a Guid and assigns it to result. | |
| Get(Int16) | Reads a Int16 and assigns it to result. | |
| Get(Int32) | Reads an Int32 and assigns it to result. | |
| Get(Int64) | Reads a Int64 and assigns it to result. | |
| Get(IPEndPoint) | Deserializes an IPEndPoint and assigns it to the result parameter. | |
| Get(SByte) | Reads an SByte and assigns it to result. | |
| Get(Single) | Reads a Single and assigns it to result. | |
| Get(String) | Reads a String and assigns it to result. | |
| Get(UInt16) | Reads a UInt16 and assigns it to result. | |
| Get(UInt32) | Reads a UInt32 and assigns it to result. | |
| Get(UInt64) | Reads a UInt64 and assigns it to result. | |
| Get(String, Int32) | Reads a String with a length limit and assigns it to result. | |
| GetT | Deserializes a struct that implements INetSerializable. | |
| GetT(FuncT) | Deserializes a class that implements INetSerializable using a provided constructor. | |
| GetT(T) | Deserializes a struct that implements INetSerializable. | |
| GetT(T, FuncT) | Deserializes a class that implements INetSerializable using a provided constructor. | |
| GetArrayT | Reads an array of objects implementing INetSerializable. | |
| GetArrayT(FuncT) | Reads an array of objects implementing INetSerializable using a specific constructor. | |
| GetArrayT(UInt16) | Reads an array of values by performing a direct memory copy. | |
| GetBool | Reads a Boolean value from the current position. | |
| GetBoolArray | Reads an array of Boolean values. | |
| GetByte | Reads the next Byte from the buffer. | |
| GetBytes(Byte, Int32) | Copies a specified number of Bytes into a destination array starting at index 0. | |
| GetBytes(Byte, Int32, Int32) | Copies a specified number of Bytes into a destination array at a specific offset. | |
| GetBytesSegment | Gets an ArraySegmentT of Bytes from the current position. | |
| GetBytesWithLength | Reads a Byte array prefixed with its UInt16 length. | |
| GetChar | Reads a Char value as a 2-byte UInt16. | |
| GetDouble | Reads a Double value using unmanaged memory access. | |
| GetDoubleArray | Reads an array of Double values. | |
| GetEnumT |
Reads an enum value of type T from the internal data buffer at the current position. Advances the position by the size of T. | |
| GetFloat | Reads a Single value using unmanaged memory access. | |
| GetFloatArray | Reads an array of Single values. | |
| GetGuid | Reads a 16-byte Guid. | |
| GetHashCode | Serves as the default hash function. (Inherited from Object) | |
| GetInt | Reads an Int32 value using unmanaged memory access. | |
| GetIntArray | Reads an array of Int32 values. | |
| GetIPEndPoint | Reads an IPEndPoint from the current Position. | |
| GetLargeString | Reads a String prefixed with a 4-byte Int32 length header. | |
| GetLong | Reads a Int64 value using unmanaged memory access. | |
| GetLongArray | Reads an array of Int64 values. | |
| GetNullableUnmanagedT |
Reads a nullable value of type T from the internal byte buffer at the current position,
first reading a Boolean indicating whether the value is present,
and then reading the value itself if it exists. Advances the position by 1 byte for the presence flag plus the size of T if the value is present. | |
| GetRemainingBytes | Reads all remaining Bytes and returns them as a new array. | |
| GetRemainingBytesMemory | Returns a ReadOnlyMemoryT of Bytes containing all remaining data. | |
| GetRemainingBytesSegment | Gets an ArraySegmentT containing all remaining Bytes. | |
| GetRemainingBytesSpan | Returns a ReadOnlySpanT of Bytes containing all remaining data. | |
| GetSByte | Reads the next SByte from the buffer. | |
| GetSBytesWithLength | Reads an SByte array prefixed with its UInt16 length. | |
| GetShort | Reads a Int16 value using unmanaged memory access. | |
| GetShortArray | Reads an array of Int16 values. | |
| GetString | Reads a String from the current position. | |
| GetString(Int32) | Reads a String with a maximum character limit. | |
| GetStringArray | Reads an array of String values. | |
| GetStringArray(Int32) | Reads an array of String values with a maximum character limit per element. | |
| GetType | Gets the Type of the current instance. (Inherited from Object) | |
| GetUInt | Reads a UInt32 value using unmanaged memory access. | |
| GetUIntArray | Reads an array of UInt32 values. | |
| GetULong | Reads a UInt64 value using unmanaged memory access. | |
| GetULongArray | Reads an array of UInt64 values. | |
| GetUnmanagedT | Reads a value of type T from the internal byte buffer at the current position, advancing the position by the size of T. | |
| GetUnmanagedArrayT | Reads an array of unmanaged values prefixed by a UInt16 length. | |
| GetUShort | Reads a UInt16 value using unmanaged memory access. | |
| GetUShortArray | Reads an array of UInt16 values. | |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) | |
| PeekBool | Reads the Boolean at the current position without advancing the Position. | |
| PeekByte | Reads the Byte at the current position without advancing the Position. | |
| PeekChar | Reads the Char at the current position without advancing the Position. | |
| PeekDouble | Reads the Double at the current position without advancing the Position. | |
| PeekFloat | Reads the Single at the current position without advancing the Position. | |
| PeekInt | Reads the Int32 at the current position without advancing the Position. | |
| PeekLong | Reads the Int64 at the current position without advancing the Position. | |
| PeekRemainingBytes | Reads all remaining Bytes and returns them as a new array without advancing the reader _position. | |
| PeekRemainingBytesMemory | Returns a ReadOnlyMemoryT of Bytes containing all remaining data without advancing the reader _position. | |
| PeekRemainingBytesSpan | Returns a ReadOnlySpanT of Bytes containing all remaining data without advancing the reader _position. | |
| PeekSByte | Reads the SByte at the current position without advancing the Position. | |
| PeekShort | Reads the Int16 at the current position without advancing the Position. | |
| PeekString | Reads a String without advancing the Position. | |
| PeekString(Int32) | Reads a String with a character limit without advancing the Position. | |
| PeekUInt | Reads the UInt32 at the current position without advancing the Position. | |
| PeekULong | Reads the UInt64 at the current position without advancing the Position. | |
| PeekUnmanagedT | Reads an unmanaged value of type T at the current position without advancing the Position. | |
| PeekUShort | Reads the UInt16 at the current position without advancing the Position. | |
| SetPosition | Sets the current read Position to a specific index. | |
| SetSource(Byte) | Reinitializes the reader using a Byte array. | |
| SetSource(NetDataWriter) | Reinitializes the reader using data from a NetDataWriter. | |
| SetSource(Byte, Int32, Int32) | Reinitializes the reader using a segment of a Byte array. | |
| SkipBytes | Advances the Position by the specified count. | |
| ToString | Returns a string that represents the current object. (Inherited from Object) | |
| TryGetBool | Attempts to read a Boolean without throwing an exception. | |
| TryGetByte | Attempts to read a Byte without throwing an exception. | |
| TryGetBytesWithLength | Attempts to read a Byte array with a length header without throwing an exception. | |
| TryGetChar | Attempts to read a Char without throwing an exception. | |
| TryGetDouble | Attempts to read a Double without throwing an exception. | |
| TryGetFloat | Attempts to read a Single without throwing an exception. | |
| TryGetInt | Attempts to read an Int32 without throwing an exception. | |
| TryGetLong | Attempts to read a Int64 without throwing an exception. | |
| TryGetSByte | Attempts to read an SByte without throwing an exception. | |
| TryGetShort | Attempts to read a Int16 without throwing an exception. | |
| TryGetString | Attempts to read a String without throwing an exception. | |
| TryGetStringArray | Attempts to read a String array without throwing an exception. | |
| TryGetUInt | Attempts to read a UInt32 without throwing an exception. | |
| TryGetULong | Attempts to read a UInt64 without throwing an exception. | |
| TryGetUnmanagedT | Attempts to read a value of type T from the internal byte buffer at the current position, advancing the position by the size of T if successful. | |
| TryGetUShort | Attempts to read a UInt16 without throwing an exception. |
| Name | Description | |
|---|---|---|
| MethodInvoke |
Calls the object method by name.
(Defined by ObjectEx) | |
| PropertyGet |
Gets the value of the object property by name.
(Defined by ObjectEx) | |
| PropertyGetT |
Gets the value of the object property by name.
(Defined by ObjectEx) | |
| PropertySet |
Sets the value of the object property by name.
(Defined by ObjectEx) |