public void Process(Interaction interaction) { if (interaction.HasResource()) { IndexResource(interaction.Resource, interaction.Key); } else { if (interaction.IsDeleted()) { _indexStore.Delete(interaction); } else { throw new Exception("Entry is neither resource nor deleted"); } } }
public void Process(Entry entry) { if (entry.HasResource()) { IndexResource(entry.Resource, entry.Key); } else { if (entry.IsDeleted()) { _indexStore.Delete(entry); } else { throw new Exception("Entry is neither resource nor deleted"); } } }
public async Task Process(Entry entry) { if (entry.HasResource()) { await IndexResource(entry.Resource, entry.Key).ConfigureAwait(false); } else { if (entry.IsDeleted()) { await _indexStore.Delete(entry).ConfigureAwait(false); } else { throw new Exception("Entry is neither resource nor deleted"); } } }