Struct Builder
Helper struct that helps pack data into LogMemoryManager Will be extended by Source Generator (that's why it is partial)
Inherited Members
Namespace: Unity.Logging
Syntax
public struct Builder
Methods
BuildContext<T>(in T, ref LogMemoryManager)
Helper function to pack a struct
Declaration
public static PayloadHandle BuildContext<T>(in T structure, ref LogMemoryManager memAllocator)
where T : struct
Parameters
Type | Name | Description |
---|---|---|
T | structure | Struct to pack |
LogMemoryManager | memAllocator | Memory manager |
Returns
Type | Description |
---|---|
PayloadHandle | Handle for the created data |
Type Parameters
Name | Description |
---|---|
T | Structure type |
BuildContextSpecialType(Boolean, ref LogMemoryManager)
Helper function to pack a special type of bool
Declaration
public static PayloadHandle BuildContextSpecialType(bool special_bool, ref LogMemoryManager memAllocator)
Parameters
Type | Name | Description |
---|---|---|
Boolean | special_bool | bool to pack |
LogMemoryManager | memAllocator | Memory manager |
Returns
Type | Description |
---|---|
PayloadHandle | Handle for the created data |
BuildContextSpecialType(Char, ref LogMemoryManager)
Helper function to pack a special type of char
Declaration
public static PayloadHandle BuildContextSpecialType(char special_char, ref LogMemoryManager memAllocator)
Parameters
Type | Name | Description |
---|---|---|
Char | special_char | Char to pack |
LogMemoryManager | memAllocator | Memory manager |
Returns
Type | Description |
---|---|
PayloadHandle | Handle for the created data |
BuildContextSpecialType(Decimal, ref LogMemoryManager)
Helper function to pack a special type of decimal
Declaration
public static PayloadHandle BuildContextSpecialType(decimal special_decimal, ref LogMemoryManager memAllocator)
Parameters
Type | Name | Description |
---|---|---|
Decimal | special_decimal | Decimal to pack |
LogMemoryManager | memAllocator | Memory manager |
Returns
Type | Description |
---|---|
PayloadHandle | Handle for the created data |
BuildContextSpecialType(Double, ref LogMemoryManager)
Helper function to pack a special type of double
Declaration
public static PayloadHandle BuildContextSpecialType(double special_double, ref LogMemoryManager memAllocator)
Parameters
Type | Name | Description |
---|---|---|
Double | special_double | Double to pack |
LogMemoryManager | memAllocator | Memory manager |
Returns
Type | Description |
---|---|
PayloadHandle | Handle for the created data |
BuildContextSpecialType(Int32, ref LogMemoryManager)
Helper function to pack a special type of int
Declaration
public static PayloadHandle BuildContextSpecialType(int special_int, ref LogMemoryManager memAllocator)
Parameters
Type | Name | Description |
---|---|---|
Int32 | special_int | Integer to pack |
LogMemoryManager | memAllocator | Memory manager |
Returns
Type | Description |
---|---|
PayloadHandle | Handle for the created data |
BuildContextSpecialType(Int64, ref LogMemoryManager)
Helper function to pack a special type of long
Declaration
public static PayloadHandle BuildContextSpecialType(long special_long, ref LogMemoryManager memAllocator)
Parameters
Type | Name | Description |
---|---|---|
Int64 | special_long | Long to pack |
LogMemoryManager | memAllocator | Memory manager |
Returns
Type | Description |
---|---|
PayloadHandle | Handle for the created data |
BuildContextSpecialType(Single, ref LogMemoryManager)
Helper function to pack a special type of float
Declaration
public static PayloadHandle BuildContextSpecialType(float special_float, ref LogMemoryManager memAllocator)
Parameters
Type | Name | Description |
---|---|---|
Single | special_float | Float to pack |
LogMemoryManager | memAllocator | Memory manager |
Returns
Type | Description |
---|---|
PayloadHandle | Handle for the created data |
BuildContextSpecialType(UInt32, ref LogMemoryManager)
Helper function to pack a special type of uint
Declaration
public static PayloadHandle BuildContextSpecialType(uint special_uint, ref LogMemoryManager memAllocator)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | special_uint | UInt to pack |
LogMemoryManager | memAllocator | Memory manager |
Returns
Type | Description |
---|---|
PayloadHandle | Handle for the created data |
BuildContextSpecialType(UInt64, ref LogMemoryManager)
Helper function to pack a special type of ulong
Declaration
public static PayloadHandle BuildContextSpecialType(ulong special_ulong, ref LogMemoryManager memAllocator)
Parameters
Type | Name | Description |
---|---|---|
UInt64 | special_ulong | ULong to pack |
LogMemoryManager | memAllocator | Memory manager |
Returns
Type | Description |
---|---|
PayloadHandle | Handle for the created data |
BuildContextSpecialType(FixedString128Bytes, ref LogMemoryManager)
Helper function to pack a FixedString
Declaration
public static PayloadHandle BuildContextSpecialType(FixedString128Bytes fixedString, ref LogMemoryManager memAllocator)
Parameters
Type | Name | Description |
---|---|---|
FixedString128Bytes | fixedString | FixedString to pack |
LogMemoryManager | memAllocator | Memory manager |
Returns
Type | Description |
---|---|
PayloadHandle | Handle for the created data |
BuildContextSpecialType(FixedString32Bytes, ref LogMemoryManager)
Helper function to pack a FixedString
Declaration
public static PayloadHandle BuildContextSpecialType(FixedString32Bytes fixedString, ref LogMemoryManager memAllocator)
Parameters
Type | Name | Description |
---|---|---|
FixedString32Bytes | fixedString | FixedString to pack |
LogMemoryManager | memAllocator | Memory manager |
Returns
Type | Description |
---|---|
PayloadHandle | Handle for the created data |
BuildContextSpecialType(FixedString4096Bytes, ref LogMemoryManager)
Helper function to pack a FixedString
Declaration
public static PayloadHandle BuildContextSpecialType(FixedString4096Bytes fixedString, ref LogMemoryManager memAllocator)
Parameters
Type | Name | Description |
---|---|---|
FixedString4096Bytes | fixedString | FixedString to pack |
LogMemoryManager | memAllocator | Memory manager |
Returns
Type | Description |
---|---|
PayloadHandle | Handle for the created data |
BuildContextSpecialType(FixedString512Bytes, ref LogMemoryManager)
Helper function to pack a FixedString
Declaration
public static PayloadHandle BuildContextSpecialType(FixedString512Bytes fixedString, ref LogMemoryManager memAllocator)
Parameters
Type | Name | Description |
---|---|---|
FixedString512Bytes | fixedString | FixedString to pack |
LogMemoryManager | memAllocator | Memory manager |
Returns
Type | Description |
---|---|
PayloadHandle | Handle for the created data |
BuildContextSpecialType(FixedString64Bytes, ref LogMemoryManager)
Helper function to pack a FixedString
Declaration
public static PayloadHandle BuildContextSpecialType(FixedString64Bytes fixedString, ref LogMemoryManager memAllocator)
Parameters
Type | Name | Description |
---|---|---|
FixedString64Bytes | fixedString | FixedString to pack |
LogMemoryManager | memAllocator | Memory manager |
Returns
Type | Description |
---|---|
PayloadHandle | Handle for the created data |
BuildDecorators(ref LogController, LogControllerScopedLock, ref FixedList4096Bytes<PayloadHandle>)
Declaration
public static void BuildDecorators(ref LogController logController, LogControllerScopedLock lock, ref FixedList4096Bytes<PayloadHandle> handles)
Parameters
Type | Name | Description |
---|---|---|
LogController | logController | |
LogControllerScopedLock | lock | |
FixedList4096Bytes<PayloadHandle> | handles |
BuildDecorators(ref LogController, LogControllerScopedLock, ref FixedList512Bytes<PayloadHandle>)
Declaration
public static void BuildDecorators(ref LogController logController, LogControllerScopedLock lock, ref FixedList512Bytes<PayloadHandle> handles)
Parameters
Type | Name | Description |
---|---|---|
LogController | logController | |
LogControllerScopedLock | lock | |
FixedList512Bytes<PayloadHandle> | handles |
BuildDecorators(ref LogController, LogControllerScopedLock, ref LogContextWithDecorator)
Declaration
public static void BuildDecorators(ref LogController logController, LogControllerScopedLock lock, ref LogContextWithDecorator payload)
Parameters
Type | Name | Description |
---|---|---|
LogController | logController | |
LogControllerScopedLock | lock | |
LogContextWithDecorator | payload |
BuildMessage(String, ref LogMemoryManager)
Helper function to pack String into LogMemoryManager
Declaration
public static PayloadHandle BuildMessage(string message, ref LogMemoryManager memAllocator)
Parameters
Type | Name | Description |
---|---|---|
String | message | Input message |
LogMemoryManager | memAllocator | Memory manager |
Returns
Type | Description |
---|---|
PayloadHandle | Handle for the created data |
BuildMessage<T>(in T, ref LogMemoryManager)
Helper function to pack generic T into LogMemoryManager
Declaration
public static PayloadHandle BuildMessage<T>(in T message, ref LogMemoryManager memAllocator)
where T : IUTF8Bytes, INativeList<byte>
Parameters
Type | Name | Description |
---|---|---|
T | message | Input message |
LogMemoryManager | memAllocator | Memory manager |
Returns
Type | Description |
---|---|
PayloadHandle | Handle for the created data |
Type Parameters
Name | Description |
---|---|
T | IUTF8Bytes, INativeList of byte |
ForceReleasePayloads<T>(in T, ref LogMemoryManager)
Force release memory for payloads
Declaration
public static void ForceReleasePayloads<T>(in T payloadList, ref LogMemoryManager memAllocator)
where T : INativeList<PayloadHandle>
Parameters
Type | Name | Description |
---|---|---|
T | payloadList | List of payloads |
LogMemoryManager | memAllocator | Memory manager |
Type Parameters
Name | Description |
---|---|
T | INativeList of PayloadHandle |