ReliableStateManager.IReliableStateManager.TryAddStateSerializer<T> Method

Definition

Adds a state serializer. Adds it for all reliable collection instances.

bool IReliableStateManager.TryAddStateSerializer<T> (Microsoft.ServiceFabric.Data.IStateSerializer<T> stateSerializer);
abstract member Microsoft.ServiceFabric.Data.IReliableStateManager.TryAddStateSerializer : Microsoft.ServiceFabric.Data.IStateSerializer<'T> -> bool
override this.Microsoft.ServiceFabric.Data.IReliableStateManager.TryAddStateSerializer : Microsoft.ServiceFabric.Data.IStateSerializer<'T> -> bool
Function TryAddStateSerializer(Of T) (stateSerializer As IStateSerializer(Of T)) As Boolean Implements IReliableStateManager.TryAddStateSerializer

Type Parameters

T

Type that will be serialized and de-serialized.

Parameters

stateSerializer
IStateSerializer<T>

The state serializer to be added.

Returns

True if the serializer was added. False if a serailizer is already registered.

Implements

Remarks

This method can only be called in InitializeStateSerializers. Instance specific state serializers always take precedence.

Applies to