Struct BinaryDeserializationContext<TValue>
The BinaryDeserializationContext<TValue> is available from adapters. It provides access to the current adapter enumerator and allows for control of deserialization for a given type.
Inherited Members
Namespace: Unity.Serialization.Binary
Syntax
public readonly struct BinaryDeserializationContext<TValue> : IBinaryDeserializationContext
Type Parameters
Name | Description |
---|---|
TValue | The value type being deserialized. |
Properties
Reader
The in-memory representation of the value being deserialized.
Declaration
public readonly UnsafeAppendBuffer.Reader*Reader { get; }
Property Value
Type | Description |
---|---|
UnsafeAppendBuffer.Reader* |
Implements
Methods
ContinueVisitation()
Continues visitation for the current type. This will run the next adapter in the sequence, or the default behaviour and return the deserialized value.
Declaration
public readonly TValue ContinueVisitation()
Returns
Type | Description |
---|---|
TValue | The deserialized value. |
ContinueVisitation(ref TValue)
Continues visitation for the current type. This will run the next adapter in the sequence, or the default behaviour and return the deserialized value.
Declaration
public readonly void ContinueVisitation(ref TValue value)
Parameters
Type | Name | Description |
---|---|---|
TValue | value | The value being deserialized. |
ContinueVisitationWithoutAdapters()
Continues visitation for the current type. This will run the next adapter in the sequence, or the default behaviour and return the deserialized value.
Declaration
public readonly TValue ContinueVisitationWithoutAdapters()
Returns
Type | Description |
---|---|
TValue | The deserialized value. |
ContinueVisitationWithoutAdapters(ref TValue)
Continues visitation for the current type. This will invoke the default behaviour and return the deserialized value.
Declaration
public readonly void ContinueVisitationWithoutAdapters(ref TValue value)
Parameters
Type | Name | Description |
---|---|---|
TValue | value | The value being deserialized. |
DeserializeValue<T>()
Reads the next value in the stream as T
and returns it. This will run all adapters.
Declaration
public readonly T DeserializeValue<T>()
Returns
Type | Description |
---|---|
T | The instance of type |
Type Parameters
Name | Description |
---|---|
T | The type of the value being deserialized. |
Implements
Explicit Interface Implementations
IBinaryDeserializationContext.ContinueVisitation()
Continues de-serialization for the current value. This will run the next adapter in the sequence, or the default behaviour.
Declaration
readonly object IBinaryDeserializationContext.ContinueVisitation()
Returns
Type | Description |
---|---|
Object | The deserialized value. |
Implements
IBinaryDeserializationContext.ContinueVisitationWithoutAdapters()
Continues de-serialization for the current type without running any more adapters. This will perform the default behaviour.
Declaration
readonly object IBinaryDeserializationContext.ContinueVisitationWithoutAdapters()
Returns
Type | Description |
---|---|
Object | The deserialized value. |