/// <summary> /// Initializes CustomerOrderActor state. Because an order actor will only be activated /// once in this scenario and never used again, when we initiate the actor's state we /// change the order's status to "Confirmed," and do not need to check if the actor's /// state was already set to this. /// </summary> protected override Task OnActivateAsync() { if (this.State == null) { this.State = new CustomerOrderActorState(); this.State.Status = CustomerOrderStatus.New; } this.ServiceProxy = new ServiceProxyWrapper(); return(Task.FromResult(true)); }
public void SetUp() { // Create client wrapper this.proxy = ServiceProxyFactory.Create <IMockService>(); }
public CustomerOrderActor(IServiceProxyWrapper proxy) { this.proxy = proxy; this.tokenSource = new CancellationTokenSource(); }
public CustomerOrderActor(IServiceProxyWrapper proxy, IActorStateManager stateManager) { this.proxy = proxy; this.StateManager = stateManager; this.tokenSource = new CancellationTokenSource(); }
public void SetUp() { // Create client wrapper this.proxy = ServiceProxyFactory.Create<IMockService>(); }