Class HyperionSerializerSettings
A typed settings class for a HyperionSerializer.
Inherited Members
Namespace: Akka.Serialization
Assembly: Akka.Serialization.Hyperion.dll
Syntax
public sealed class HyperionSerializerSettings
Constructors
| Edit this page View SourceHyperionSerializerSettings(bool, bool, Type)
Creates a new instance of a HyperionSerializerSettings.
Declaration
[Obsolete]
public HyperionSerializerSettings(bool preserveObjectReferences, bool versionTolerance, Type knownTypesProvider)
Parameters
Type | Name | Description |
---|---|---|
bool | preserveObjectReferences | Flag which determines if serializer should keep track of references in serialized object graph. |
bool | versionTolerance | Flag which determines if field data should be serialized as part of type manifest. |
Type | knownTypesProvider | Type implementing IKnownTypesProvider to be used to determine a list of types implicitly known by all cooperating serializer. |
HyperionSerializerSettings(bool, bool, Type, IEnumerable<Func<string, string>>)
Creates a new instance of a HyperionSerializerSettings.
Declaration
[Obsolete]
public HyperionSerializerSettings(bool preserveObjectReferences, bool versionTolerance, Type knownTypesProvider, IEnumerable<Func<string, string>> packageNameOverrides)
Parameters
Type | Name | Description |
---|---|---|
bool | preserveObjectReferences | Flag which determines if serializer should keep track of references in serialized object graph. |
bool | versionTolerance | Flag which determines if field data should be serialized as part of type manifest. |
Type | knownTypesProvider | Type implementing IKnownTypesProvider to be used to determine a list of types implicitly known by all cooperating serializer. |
IEnumerable<Func<string, string>> | packageNameOverrides | An array of package name overrides for cross platform compatibility |
HyperionSerializerSettings(bool, bool, Type, IEnumerable<Func<string, string>>, IEnumerable<Surrogate>)
Creates a new instance of a HyperionSerializerSettings.
Declaration
public HyperionSerializerSettings(bool preserveObjectReferences, bool versionTolerance, Type knownTypesProvider, IEnumerable<Func<string, string>> packageNameOverrides, IEnumerable<Surrogate> surrogates)
Parameters
Type | Name | Description |
---|---|---|
bool | preserveObjectReferences | Flag which determines if serializer should keep track of references in serialized object graph. |
bool | versionTolerance | Flag which determines if field data should be serialized as part of type manifest. |
Type | knownTypesProvider | Type implementing IKnownTypesProvider to be used to determine a list of types implicitly known by all cooperating serializer. |
IEnumerable<Func<string, string>> | packageNameOverrides | An array of package name overrides for cross platform compatibility |
IEnumerable<Surrogate> | surrogates | A list of Surrogate instances that are used to de/serialize complex objects into a much simpler serialized objects. |
HyperionSerializerSettings(bool, bool, Type, IEnumerable<Func<string, string>>, IEnumerable<Surrogate>, bool)
Creates a new instance of a HyperionSerializerSettings.
Declaration
public HyperionSerializerSettings(bool preserveObjectReferences, bool versionTolerance, Type knownTypesProvider, IEnumerable<Func<string, string>> packageNameOverrides, IEnumerable<Surrogate> surrogates, bool disallowUnsafeType)
Parameters
Type | Name | Description |
---|---|---|
bool | preserveObjectReferences | Flag which determines if serializer should keep track of references in serialized object graph. |
bool | versionTolerance | Flag which determines if field data should be serialized as part of type manifest. |
Type | knownTypesProvider | Type implementing IKnownTypesProvider to be used to determine a list of types implicitly known by all cooperating serializer. |
IEnumerable<Func<string, string>> | packageNameOverrides | An array of package name overrides for cross platform compatibility |
IEnumerable<Surrogate> | surrogates | A list of Surrogate instances that are used to de/serialize complex objects into a much simpler serialized objects. |
bool | disallowUnsafeType | Block unsafe types from being deserialized. |
HyperionSerializerSettings(bool, bool, Type, IEnumerable<Func<string, string>>, IEnumerable<Surrogate>, bool, ITypeFilter)
Creates a new instance of a HyperionSerializerSettings.
Declaration
public HyperionSerializerSettings(bool preserveObjectReferences, bool versionTolerance, Type knownTypesProvider, IEnumerable<Func<string, string>> packageNameOverrides, IEnumerable<Surrogate> surrogates, bool disallowUnsafeType, ITypeFilter typeFilter)
Parameters
Type | Name | Description |
---|---|---|
bool | preserveObjectReferences | Flag which determines if serializer should keep track of references in serialized object graph. |
bool | versionTolerance | Flag which determines if field data should be serialized as part of type manifest. |
Type | knownTypesProvider | Type implementing IKnownTypesProvider to be used to determine a list of types implicitly known by all cooperating serializer. |
IEnumerable<Func<string, string>> | packageNameOverrides | An array of package name overrides for cross platform compatibility |
IEnumerable<Surrogate> | surrogates | A list of Surrogate instances that are used to de/serialize complex objects into a much simpler serialized objects. |
bool | disallowUnsafeType | Block unsafe types from being deserialized. |
ITypeFilter | typeFilter | A ITypeFilter instance that will filter types from being deserialized. |
Fields
| Edit this page View SourceDefault
Default settings used by HyperionSerializer when no config has been specified.
Declaration
public static readonly HyperionSerializerSettings Default
Field Value
Type | Description |
---|---|
HyperionSerializerSettings |
DisallowUnsafeType
If set, will cause the Hyperion serializer to block potentially dangerous and unsafe types from being deserialized during run-time
Declaration
public readonly bool DisallowUnsafeType
Field Value
Type | Description |
---|---|
bool |
KnownTypesProvider
A type implementing IKnownTypesProvider, that will be used when HyperionSerializer is being constructed to provide a list of message types that are supposed to be known implicitly by all communicating parties. Implementing class must provide either a default constructor or a constructor taking ExtendedActorSystem as its only parameter.
Declaration
public readonly Type KnownTypesProvider
Field Value
Type | Description |
---|---|
Type |
PackageNameOverrides
A list of lambda functions, used to transform incoming deserialized package names before they are instantiated
Declaration
public readonly IEnumerable<Func<string, string>> PackageNameOverrides
Field Value
Type | Description |
---|---|
IEnumerable<Func<string, string>> |
PreserveObjectReferences
When true, it tells HyperionSerializer to keep track of references in serialized/deserialized object graph.
Declaration
public readonly bool PreserveObjectReferences
Field Value
Type | Description |
---|---|
bool |
Surrogates
A list of serialization surrogates for types that can not be serialized by Hyperion directly.
Declaration
public readonly IEnumerable<Surrogate> Surrogates
Field Value
Type | Description |
---|---|
IEnumerable<Surrogate> |
TypeFilter
If set, Hyperion serializer will use the to filter the types that are being deserialized during run-time
Declaration
public readonly ITypeFilter TypeFilter
Field Value
Type | Description |
---|---|
ITypeFilter |
VersionTolerance
When true, it tells HyperionSerializer to encode a list of currently serialized fields into type manifest.
Declaration
public readonly bool VersionTolerance
Field Value
Type | Description |
---|---|
bool |
Methods
| Edit this page View SourceCreate(Config)
Creates a new instance of HyperionSerializerSettings using provided HOCON config. Config can contain several key-values, that are mapped to a class fields:
- `preserve-object-references` (boolean) mapped to PreserveObjectReferences
- `version-tolerance` (boolean) mapped to VersionTolerance
- `known-types-provider` (fully qualified type name) mapped to KnownTypesProvider
Declaration
public static HyperionSerializerSettings Create(Config config)
Parameters
Type | Name | Description |
---|---|---|
Config | config |
Returns
Type | Description |
---|---|
HyperionSerializerSettings |
WithDisallowUnsafeType(bool)
Declaration
public HyperionSerializerSettings WithDisallowUnsafeType(bool disallowUnsafeType)
Parameters
Type | Name | Description |
---|---|---|
bool | disallowUnsafeType |
Returns
Type | Description |
---|---|
HyperionSerializerSettings |
WithKnownTypesProvider(Type)
Declaration
public HyperionSerializerSettings WithKnownTypesProvider(Type knownTypesProvider)
Parameters
Type | Name | Description |
---|---|---|
Type | knownTypesProvider |
Returns
Type | Description |
---|---|
HyperionSerializerSettings |
WithPackageNameOverrides(IEnumerable<Func<string, string>>)
Declaration
public HyperionSerializerSettings WithPackageNameOverrides(IEnumerable<Func<string, string>> packageNameOverrides)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<Func<string, string>> | packageNameOverrides |
Returns
Type | Description |
---|---|
HyperionSerializerSettings |
WithPreserveObjectReference(bool)
Declaration
public HyperionSerializerSettings WithPreserveObjectReference(bool preserveObjectReferences)
Parameters
Type | Name | Description |
---|---|---|
bool | preserveObjectReferences |
Returns
Type | Description |
---|---|
HyperionSerializerSettings |
WithSurrogates(IEnumerable<Surrogate>)
Declaration
public HyperionSerializerSettings WithSurrogates(IEnumerable<Surrogate> surrogates)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<Surrogate> | surrogates |
Returns
Type | Description |
---|---|
HyperionSerializerSettings |
WithTypeFilter(ITypeFilter)
Declaration
public HyperionSerializerSettings WithTypeFilter(ITypeFilter typeFilter)
Parameters
Type | Name | Description |
---|---|---|
ITypeFilter | typeFilter |
Returns
Type | Description |
---|---|
HyperionSerializerSettings |
WithVersionTolerance(bool)
Declaration
public HyperionSerializerSettings WithVersionTolerance(bool versionTolerance)
Parameters
Type | Name | Description |
---|---|---|
bool | versionTolerance |
Returns
Type | Description |
---|---|
HyperionSerializerSettings |