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).
Inherited Members
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 SourceAkkaSerializerFormatterAttribute(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 |
| Type | formatterType | A non-abstract, non-generic class implementing IAkkaMessagePackFormatter<T>
for |
Properties
| Edit this page View SourceFormatterType
The formatter type implementing IAkkaMessagePackFormatter<T> for SerializedType.
Declaration
public Type FormatterType { get; }
Property Value
| Type | Description |
|---|---|
| Type |
SerializedType
The foreign type handled by FormatterType.
Declaration
public Type SerializedType { get; }
Property Value
| Type | Description |
|---|---|
| Type |
Edit this page