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
| Improve this Doc View SourceHyperionSerializerSettings(Boolean, Boolean, Type)
Creates a new instance of a HyperionSerializerSettings.
Declaration
[Obsolete]
public HyperionSerializerSettings(bool preserveObjectReferences, bool versionTolerance, Type knownTypesProvider)
Parameters
Type | Name | Description |
---|---|---|
Boolean | preserveObjectReferences | Flag which determines if serializer should keep track of references in serialized object graph. |
Boolean | 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(Boolean, Boolean, 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 |
---|---|---|
Boolean | preserveObjectReferences | Flag which determines if serializer should keep track of references in serialized object graph. |
Boolean | 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(Boolean, Boolean, 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 |
---|---|---|
Boolean | preserveObjectReferences | Flag which determines if serializer should keep track of references in serialized object graph. |
Boolean | 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<Hyperion.Surrogate> | surrogates | A list of Surrogate instances that are used to de/serialize complex objects into a much simpler serialized objects. |
HyperionSerializerSettings(Boolean, Boolean, Type, IEnumerable<Func<String, String>>, IEnumerable<Surrogate>, Boolean)
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 |
---|---|---|
Boolean | preserveObjectReferences | Flag which determines if serializer should keep track of references in serialized object graph. |
Boolean | 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<Hyperion.Surrogate> | surrogates | A list of Surrogate instances that are used to de/serialize complex objects into a much simpler serialized objects. |
Boolean | disallowUnsafeType | Block unsafe types from being deserialized. |
HyperionSerializerSettings(Boolean, Boolean, Type, IEnumerable<Func<String, String>>, IEnumerable<Surrogate>, Boolean, 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 |
---|---|---|
Boolean | preserveObjectReferences | Flag which determines if serializer should keep track of references in serialized object graph. |
Boolean | 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<Hyperion.Surrogate> | surrogates | A list of Surrogate instances that are used to de/serialize complex objects into a much simpler serialized objects. |
Boolean | disallowUnsafeType | Block unsafe types from being deserialized. |
Hyperion.ITypeFilter | typeFilter | A ITypeFilter instance that will filter types from being deserialized. |
Fields
| Improve this Doc 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 |
---|---|
Boolean |
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 |
---|---|
Boolean |
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<Hyperion.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 |
---|---|
Hyperion.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 |
---|---|
Boolean |
Methods
| Improve this Doc 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 PreserveObjectReferencesversion-tolerance
(boolean) mapped to VersionToleranceknown-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(Boolean)
Declaration
public HyperionSerializerSettings WithDisallowUnsafeType(bool disallowUnsafeType)
Parameters
Type | Name | Description |
---|---|---|
Boolean | 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(Boolean)
Declaration
public HyperionSerializerSettings WithPreserveObjectReference(bool preserveObjectReferences)
Parameters
Type | Name | Description |
---|---|---|
Boolean | preserveObjectReferences |
Returns
Type | Description |
---|---|
HyperionSerializerSettings |
WithSurrogates(IEnumerable<Surrogate>)
Declaration
public HyperionSerializerSettings WithSurrogates(IEnumerable<Surrogate> surrogates)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<Hyperion.Surrogate> | surrogates |
Returns
Type | Description |
---|---|
HyperionSerializerSettings |
WithTypeFilter(ITypeFilter)
Declaration
public HyperionSerializerSettings WithTypeFilter(ITypeFilter typeFilter)
Parameters
Type | Name | Description |
---|---|---|
Hyperion.ITypeFilter | typeFilter |
Returns
Type | Description |
---|---|
HyperionSerializerSettings |
WithVersionTolerance(Boolean)
Declaration
public HyperionSerializerSettings WithVersionTolerance(bool versionTolerance)
Parameters
Type | Name | Description |
---|---|---|
Boolean | versionTolerance |
Returns
Type | Description |
---|---|
HyperionSerializerSettings |