public static TransactionGetKey ( |
||
transaction | ||
selector | FdbKeySelector | |
snapshot | bool | |
return |
public Task <Slice[]> GetKeysAsync(KeySelector[] selectors, bool snapshot, CancellationToken ct) { Contract.Requires(selectors != null); if (selectors.Length == 0) { return(Task.FromResult(Array.Empty <Slice>())); } var futures = new FutureHandle[selectors.Length]; try { for (int i = 0; i < selectors.Length; i++) { futures[i] = FdbNative.TransactionGetKey(m_handle, selectors[i], snapshot); } } catch { for (int i = 0; i < selectors.Length; i++) { if (futures[i] == null) { break; } futures[i].Dispose(); } throw; } return(FdbFuture.CreateTaskFromHandleArray(futures, (h) => GetKeyResult(h), ct)); }
public Task <Slice> GetKeyAsync(KeySelector selector, bool snapshot, CancellationToken ct) { var future = FdbNative.TransactionGetKey(m_handle, selector, snapshot); return(FdbFuture.CreateTaskFromHandle( future, (h) => GetKeyResult(h), ct )); }