Search Results for

    Show / Hide Table of Contents

    Class SerializerV2

    A serializer that writes directly into caller-owned buffers and reads from sequence-backed input.

    Inheritance
    object
    Serializer
    SerializerV2
    ByteArraySerializer
    SerializerV1Adapter
    MessagePackSerializer<TProtocol>
    Inherited Members
    Serializer.system
    Serializer.Identifier
    Serializer.ToBinaryWithAddress(Address, object)
    Serializer.FromBinary<T>(byte[])
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Akka.Serialization
    Assembly: Akka.dll
    Syntax
    public abstract class SerializerV2 : Serializer

    Constructors

    | Edit this page View Source

    SerializerV2(ExtendedActorSystem)

    Initializes a new instance of the SerializerV2 class.

    Declaration
    protected SerializerV2(ExtendedActorSystem system)
    Parameters
    Type Name Description
    ExtendedActorSystem system

    The actor system to associate with this serializer.

    Fields

    | Edit this page View Source

    UnknownSize

    Returned by SizeHint(object) when the serialized size cannot be cheaply predicted.

    Declaration
    public const int UnknownSize = -1
    Field Value
    Type Description
    int

    Properties

    | Edit this page View Source

    IncludeManifest

    V2 serializers use manifest-aware dispatch. New V2 serializers should emit non-empty manifests; legacy serializer-id ports may preserve empty manifests.

    Declaration
    public override sealed bool IncludeManifest { get; }
    Property Value
    Type Description
    bool
    Overrides
    Serializer.IncludeManifest

    Methods

    | Edit this page View Source

    Deserialize(ReadOnlySequence<byte>, string)

    Deserializes bytes using a serializer manifest.

    Declaration
    public abstract object Deserialize(ReadOnlySequence<byte> bytes, string manifest)
    Parameters
    Type Name Description
    ReadOnlySequence<byte> bytes
    string manifest
    Returns
    Type Description
    object
    | Edit this page View Source

    FromBinary(byte[], string)

    Deserializes a byte array using a serializer manifest.

    Declaration
    public override object FromBinary(byte[] bytes, string manifest)
    Parameters
    Type Name Description
    byte[] bytes
    string manifest
    Returns
    Type Description
    object
    Overrides
    Serializer.FromBinary(byte[], string)
    | Edit this page View Source

    FromBinary(byte[], Type)

    Deserializes a byte array using a type manifest.

    Declaration
    public override object FromBinary(byte[] bytes, Type type)
    Parameters
    Type Name Description
    byte[] bytes
    Type type
    Returns
    Type Description
    object
    Overrides
    Serializer.FromBinary(byte[], Type)
    | Edit this page View Source

    Manifest(object)

    Returns the manifest used by this serializer for obj.

    Declaration
    public override abstract string Manifest(object obj)
    Parameters
    Type Name Description
    object obj
    Returns
    Type Description
    string
    Overrides
    Serializer.Manifest(object)
    | Edit this page View Source

    Serialize(object, IBufferWriter<byte>)

    Serializes obj into writer.

    Declaration
    public abstract int Serialize(object obj, IBufferWriter<byte> writer)
    Parameters
    Type Name Description
    object obj
    IBufferWriter<byte> writer
    Returns
    Type Description
    int

    The number of payload bytes written.

    | Edit this page View Source

    SizeHint(object)

    Returns the exact serialized size in bytes, or UnknownSize when the exact size cannot be cheaply computed.

    Declaration
    public virtual int SizeHint(object obj)
    Parameters
    Type Name Description
    object obj
    Returns
    Type Description
    int
    | Edit this page View Source

    ToBinary(object)

    Serializes the given object into a byte array for compatibility boundaries.

    Declaration
    public override byte[] ToBinary(object obj)
    Parameters
    Type Name Description
    object obj
    Returns
    Type Description
    byte[]
    Overrides
    Serializer.ToBinary(object)

    Extension Methods

    ObjectExtensions.IsDefaultForType<T>(T)
    ObjectExtensions.AsOption<T>(T)
    Extensions.AsInstanceOf<T>(object)
    In this article
    • githubEdit this page
    • View Source
    Back to top
    Contribute
    • Project Chat
    • Discussion Forum
    • Source Code
    Support
    • Akka.NET Support Plans
    • Akka.NET Observability Tools
    • Akka.NET Training & Consulting
    Maintained By
    • Petabridge - The Akka.NET Company
    • Learn Akka.NET