Search Results for

    Show / Hide Table of Contents

    Class AkkaSerializerFormatterAttribute

    Registers a hand-written IAkkaMessagePackFormatter<T> for a foreign type that cannot be annotated with AkkaSerializableAttribute (for example, a core Akka type that cannot reference Akka.Serialization.V2).

    Inheritance
    object
    Attribute
    AkkaSerializerFormatterAttribute
    Inherited Members
    Attribute.Equals(object)
    Attribute.GetCustomAttribute(Assembly, Type)
    Attribute.GetCustomAttribute(Assembly, Type, bool)
    Attribute.GetCustomAttribute(MemberInfo, Type)
    Attribute.GetCustomAttribute(MemberInfo, Type, bool)
    Attribute.GetCustomAttribute(Module, Type)
    Attribute.GetCustomAttribute(Module, Type, bool)
    Attribute.GetCustomAttribute(ParameterInfo, Type)
    Attribute.GetCustomAttribute(ParameterInfo, Type, bool)
    Attribute.GetCustomAttributes(Assembly)
    Attribute.GetCustomAttributes(Assembly, bool)
    Attribute.GetCustomAttributes(Assembly, Type)
    Attribute.GetCustomAttributes(Assembly, Type, bool)
    Attribute.GetCustomAttributes(MemberInfo)
    Attribute.GetCustomAttributes(MemberInfo, bool)
    Attribute.GetCustomAttributes(MemberInfo, Type)
    Attribute.GetCustomAttributes(MemberInfo, Type, bool)
    Attribute.GetCustomAttributes(Module)
    Attribute.GetCustomAttributes(Module, bool)
    Attribute.GetCustomAttributes(Module, Type)
    Attribute.GetCustomAttributes(Module, Type, bool)
    Attribute.GetCustomAttributes(ParameterInfo)
    Attribute.GetCustomAttributes(ParameterInfo, bool)
    Attribute.GetCustomAttributes(ParameterInfo, Type)
    Attribute.GetCustomAttributes(ParameterInfo, Type, bool)
    Attribute.GetHashCode()
    Attribute.IsDefaultAttribute()
    Attribute.IsDefined(Assembly, Type)
    Attribute.IsDefined(Assembly, Type, bool)
    Attribute.IsDefined(MemberInfo, Type)
    Attribute.IsDefined(MemberInfo, Type, bool)
    Attribute.IsDefined(Module, Type)
    Attribute.IsDefined(Module, Type, bool)
    Attribute.IsDefined(ParameterInfo, Type)
    Attribute.IsDefined(ParameterInfo, Type, bool)
    Attribute.Match(object)
    Attribute.TypeId
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Akka.Serialization.V2
    Assembly: Akka.Serialization.V2.dll
    Syntax
    [AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = false)]
    public sealed class AkkaSerializerFormatterAttribute : Attribute
    Remarks

    Apply to the [AkkaSerializer] partial class. The registration is serializer-scoped: the same foreign type may be handled by different formatters (or not at all) in different serializers. A formatter registration overrides every field-kind resolution the generator would otherwise infer for SerializedType (including Nullable<T> of a value type), except an AkkaEnvelopePayloadAttribute-marked field, which always wins.

    Constructors

    | Edit this page View Source

    AkkaSerializerFormatterAttribute(Type, Type)

    Initializes a new instance of the AkkaSerializerFormatterAttribute class.

    Declaration
    public AkkaSerializerFormatterAttribute(Type serializedType, Type formatterType)
    Parameters
    Type Name Description
    Type serializedType

    The foreign type handled by formatterType.

    Type formatterType

    A non-abstract, non-generic class implementing IAkkaMessagePackFormatter<T> for serializedType, with either a public parameterless constructor or a public constructor taking an ExtendedActorSystem. When both constructors are present, the generated serializer prefers the ExtendedActorSystem constructor: the serializer always has the system in hand, and system context is why a formatter declares that constructor.

    Properties

    | Edit this page View Source

    FormatterType

    The formatter type implementing IAkkaMessagePackFormatter<T> for SerializedType.

    Declaration
    public Type FormatterType { get; }
    Property Value
    Type Description
    Type
    | Edit this page View Source

    SerializedType

    The foreign type handled by FormatterType.

    Declaration
    public Type SerializedType { get; }
    Property Value
    Type Description
    Type

    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