public async Task RemoveAsync(RemoveInstance command, CancellationToken cancellationToken) { _currentState = await _currentState.RemoveAsync(this, command, cancellationToken); await repository.SetInstanceStateAsync(_currentState.State, cancellationToken); }
public InstanceStateProvider(InstanceState idle, InstanceState vacant, InstanceState occupied) { _states[InstanceStates.Idle] = idle; _states[InstanceStates.Vacant] = vacant; _states[InstanceStates.Occupied] = occupied; }