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 |
|---|---|
| BinaryParser(void*, int) | Creates the ref struct |
Fields
| Name | Description |
|---|---|
| LengthInBytes | Length of the data in bytes |
Properties
| Name | Description |
|---|---|
| IsValid | True if Pointer is not null and length is bigger than 0 |
| Pointer | Safe IntPtr wrapper for the internal pointer |
Methods
| Name | Description |
|---|---|
| AppendToUnsafeText<T>(ref UnsafeText, ref FormatterStruct, ref LogMemoryManager, ref ArgumentInfo) | Reads the pointer as T that implements ILoggableMirrorStruct, and appends it to the UnsafeText. Checks out of bound read if debug checks are present |
| AppendUTF8StringToUnsafeText(ref UnsafeText, ref FormatterStruct, int, ref ArgumentInfo) | Reads the pointer as a UTF8 string and appends it to the UnsafeText. Checks out of bound read if debug checks are present |
| 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 |