public ActorsStateService(StatelessServiceContext statelessServiceContext) { _statelessServiceContext = statelessServiceContext; string applicationName = _statelessServiceContext.CodePackageActivationContext.ApplicationName; _zioPaperone = ActorProxy.Create <IZioPaperone>(new ActorId("ZioPaperone"), applicationName); _bandaBassotti = ActorProxy.Create <IBandaBassotti>(new ActorId("BandaBassotti"), applicationName); _qui = ActorProxy.Create <IQui>(new ActorId("Qui"), applicationName); _quo = ActorProxy.Create <IQuo>(new ActorId("Quo"), applicationName); _qua = ActorProxy.Create <IQua>(new ActorId("Qua"), applicationName); }
private async Task UpdateQuiQuoQuaAsync(decimal moneyToQuiQuoQua) { IQui qui = ActorProxy.Create <IQui>(QuiActorId, $"{ActorService.Context.CodePackageActivationContext.ApplicationName}"); IQuo quo = ActorProxy.Create <IQuo>(QuoActorId, $"{ActorService.Context.CodePackageActivationContext.ApplicationName}"); IQua qua = ActorProxy.Create <IQua>(QuaActorId, $"{ActorService.Context.CodePackageActivationContext.ApplicationName}"); CancellationToken c = CancellationToken.None; await qui.UpdateMoneyAsync(moneyToQuiQuoQua, c); await quo.UpdateMoneyAsync(moneyToQuiQuoQua, c); await qua.UpdateMoneyAsync(moneyToQuiQuoQua, c); }