Struct BinaryParser
Ref struct to hide unsafe pointer logic
Inherited Members
Namespace: Unity.Logging
Assembly: solution.dll
Syntax
public readonly ref struct BinaryParser
Constructors
Name | Description |
---|---|
Binary |
Creates the ref struct |
Fields
Name | Description |
---|---|
Length |
Length of the data in bytes |
Properties
Name | Description |
---|---|
Is |
True if Pointer is not null and length is bigger than 0 |
Pointer | Safe IntPtr wrapper for the internal pointer |
Methods
Name | Description |
---|---|
Append |
Reads the pointer as T that implements ILoggableMirrorStruct, and appends it to the Unsafe |
Append |
Reads the pointer as a UTF8 string and appends it to the Unsafe |
Peek<T>() | Reads the pointer as T. Checks out of bound read if debug checks are present |
Skip(int) | Creates new BinaryParser that is a slice of the current one, but 'bytes' are skipped |
Skip<T>() | Creates new BinaryParser that is a slice of the current one, but SizeOf{T} are skipped |