/// <summary> /// Remove a counter /// </summary> public async Task RemoveCounter(Guid id) { var counter = await CounterStore.GetById(id).ConfigureAwait(false); if (counter != null) { await CounterStore.StoreEvent(counter.Remove()).ConfigureAwait(false); } }
/// <summary> /// Change the name of a counter /// </summary> public async Task ChangeName(Guid id, string newName, string originalName) { var counter = await CounterStore.GetById(id).ConfigureAwait(false); await CounterStore.StoreEvent(counter.ChangeName(newName, originalName)).ConfigureAwait(false); }
/// <summary> /// Decrement a counter /// </summary> public async Task Decrement(Guid id) { var counter = await CounterStore.GetById(id).ConfigureAwait(false); await CounterStore.StoreEvent(counter.Decrement()).ConfigureAwait(false); }