public void Dispose() { if (_disposed) { return; } Id?.Dispose(); Id = null; LowerId?.Dispose(); LowerId = null; Data?.Dispose(); Data = null; _disposed = true; }
public void Dispose() { if (_disposed) { return; } Id?.Dispose(); Id = null; LowerId?.Dispose(); LowerId = null; Doc?.Dispose(); Doc = null; Collection?.Dispose(); Collection = null; _disposed = true; }
public IEnumerable <string> GetCountersForDocument(DocumentsOperationContext context, string docId) { var table = new Table(CountersSchema, context.Transaction.InnerTransaction); using (GetCounterPartialKey(context, docId, out var key)) { LazyStringValue prev = null; foreach (var result in table.SeekByPrimaryKeyPrefix(key, Slices.Empty, 0)) { var current = ExtractCounterName(context, result.Value.Reader); if (prev?.Equals(current) == true) { // already seen this one, skip it continue; } yield return(current); prev?.Dispose(); prev = current; } } }
public void Dispose() { LowerId?.Dispose(); Collection?.Dispose(); }