ReliableStateManager.IReliableStateManager.TryAddStateSerializer<T>(IStateSerializer<T>) Method

Definition

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

bool IReliableStateManager.TryAddStateSerializer<T> (Microsoft.ServiceFabric.Data.IStateSerializer<T> stateSerializer);
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

System.Boolean

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