Exemplo n.º 1
0
        public Task Handle(ClientProfileSettingsChangedEvent @event)
        {
            switch (@event.ChangeType)
            {
            case ChangeType.Creation:
                _clientProfileSettingsCache.AddOrUpdate(@event.NewValue);
                break;

            case ChangeType.Edition:
                _clientProfileSettingsCache.AddOrUpdate(@event.NewValue);
                break;

            case ChangeType.Deletion:
                _clientProfileSettingsCache.Remove(@event.OldValue);
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }

            return(Task.CompletedTask);
        }