async Task <OperationResult> Process(TestStateful msg, IOperationContext arg2) { using (var trans = _stateManager.CreateTransaction()) { _state = await _stateManager.GetOrAddAsync <IReliableDictionary <string, DateTime> >(ActorRef.Key.Id); await _state.AddOrUpdateAsync(trans, ActorRef.Key.Id, (x) => DateTime.UtcNow, (x, _) => DateTime.UtcNow); await trans.CommitAsync(); } return(OperationResult.Success); }
async public Task <OperationResult> TestStateful(TestStateful msg) { await StateManager.AddOrUpdateStateAsync("count", 1, (key, value) => value + 1); return(OperationResult.Success); }
async public Task <OperationResult> TestStateful(TestStateful msg) { throw new NotImplementedException(); }
async Task <OperationResult> OnTestStateful(TestStateful msg, IOperationContext context) { using (BackendCallsTimer.NewContext()) return(await _actor.TestStateful(msg)); }
async Task <OperationResult> Process(TestStateful msg, IOperationContext context) { using (BackendCallsTimer.NewContext()) return(await _actor.SendAsync <OperationResult>(msg, context)); }