public async Task DeferTableActionAsync(TableAction action) { IEnumerable <string> tableNames; if (action.RelatedTables == null) // no related table { tableNames = new[] { action.Table.TableName }; } else if (action.RelatedTables.Any()) // some related tables { tableNames = new[] { action.Table.TableName }.Concat(action.RelatedTables); } else // all tables are related { tableNames = Enumerable.Empty <string>(); } try { await this.PushAsync(action.CancellationToken, action.TableKind, tableNames.ToArray()); } finally { Task discard = this.syncQueue.Post(action.ExecuteAsync, action.CancellationToken); } }
public async Task DeferTableActionAsync(TableAction action) { IEnumerable<string> tableNames; if (action.RelatedTables == null) // no related table { tableNames = new[] { action.Table.TableName }; } else if (action.RelatedTables.Any()) // some related tables { tableNames = new[] { action.Table.TableName }.Concat(action.RelatedTables); } else // all tables are related { tableNames = Enumerable.Empty<string>(); } try { await this.PushAsync(action.CancellationToken, action.TableKind, tableNames.ToArray()); } finally { Task discard = this.syncQueue.Post(action.ExecuteAsync, action.CancellationToken); } }