docs.unity.cn
    Show / Hide Table of Contents

    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
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    ValueType.ToString()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    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
    IBinaryDeserializationContext.Reader

    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 deserialized.

    Type Parameters
    Name Description
    T

    The type of the value being deserialized.

    Implements
    IBinaryDeserializationContext.DeserializeValue<T>()

    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.ContinueVisitation()

    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.

    Implements
    IBinaryDeserializationContext.ContinueVisitationWithoutAdapters()
    Back to top Copyright © 2023 Unity Technologies
    Generated by DocFX
    on Monday, February 13, 2023
    Terms of use