예제 #1
0
        public static VerifiedStateManager RegisterProtobufStateSerializer <T>(this StatefulService service)
            where T : class, IMessage <T>, new()
        {
            VerifySerializerCreatedOnStartup(service);
            var verifiedStateManager = new VerifiedStateManager(service.StateManager);

            return(verifiedStateManager.RegisterProtobufStateSerializer <T>());
        }
예제 #2
0
 public static VerifiedStateManager RegisterProtobufStateSerializer <T>(this VerifiedStateManager verifiedStateManager)
     where T : class, IMessage <T>, new()
 {
     verifiedStateManager.StateManager.TryAddStateSerializer(new ProtobufStateSerializer <T>());
     return(verifiedStateManager);
 }