Exemple #1
0
        public void Dispose()
        {
            if (_disposed)
            {
                return;
            }

            Id?.Dispose();
            Id = null;

            LowerId?.Dispose();
            LowerId = null;

            Data?.Dispose();
            Data = null;

            _disposed = true;
        }
Exemple #2
0
        public void Dispose()
        {
            if (_disposed)
            {
                return;
            }

            Id?.Dispose();
            Id = null;

            LowerId?.Dispose();
            LowerId = null;

            Doc?.Dispose();
            Doc = null;

            Collection?.Dispose();
            Collection = null;

            _disposed = true;
        }
Exemple #3
0
        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;
                }
            }
        }
Exemple #4
0
 public void Dispose()
 {
     LowerId?.Dispose();
     Collection?.Dispose();
 }