docs.unity3d.com
    Show / Hide Table of Contents

    Struct BinarySerializationContext<TValue>

    The BinarySerializationContext<TValue> is available from adapters. It provides access to the current adapter enumerator and allows for control of serialization 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 BinarySerializationContext<TValue> : IBinarySerializationContext
    Type Parameters
    Name Description
    TValue

    The value type being serialized.

    Properties

    Writer

    Gets the underlying UnsafeAppendBuffer which can be used to output data.

    Declaration
    public readonly UnsafeAppendBuffer*Writer { get; }
    Property Value
    Type Description
    UnsafeAppendBuffer*
    Implements
    IBinarySerializationContext.Writer

    Methods

    ContinueVisitation()

    Continues visitation for the current type. This will run the next adapter in the sequence, or the default behaviour.

    Declaration
    public readonly void ContinueVisitation()
    Implements
    IBinarySerializationContext.ContinueVisitation()

    ContinueVisitationWithoutAdapters()

    Continues visitation for the current type without running any more adapters. This will perform the default behaviour.

    Declaration
    public readonly void ContinueVisitationWithoutAdapters()
    Implements
    IBinarySerializationContext.ContinueVisitationWithoutAdapters()

    SerializeValue<T>(T)

    Writes the given value to the stream. This will run all adapters.

    Declaration
    public readonly void SerializeValue<T>(T value)
    Parameters
    Type Name Description
    T value

    The value to write.

    Type Parameters
    Name Description
    T

    The value type to write.

    Implements
    IBinarySerializationContext.SerializeValue<T>(T)
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023