Exemplo n.º 1
0
 /// <summary>
 /// Actually disposes the current object.
 /// </summary>
 /// <param name="disposing">
 /// Indicates whether the method was invoked from the <see cref="IDisposable.Dispose"/>
 /// implementation or from the finalizer
 /// </param>
 private void Dispose(bool disposing)
 {
     if (disposing && _writer != null)
     {
         _writer.Dispose();
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Actually disposes the current object.
 /// </summary>
 /// <param name="disposing">
 /// Indicates whether the method was invoked from the <see cref="IDisposable.Dispose"/>
 /// implementation or from the finalizer
 /// </param>
 protected virtual void Dispose(bool disposing)
 {
     if (disposing && _writer != null)
     {
         if (_buffer.Count > 0)
         {
             WriteRecord(_sum.Sum(_buffer));
         }
         _writer.Dispose();
     }
 }
Exemplo n.º 3
0
        public void Dispose()
        {
            if (_disposed)
            {
                return;
            }

            _recordReader?.Dispose();
            _recordWriter?.Dispose();

            _disposed = true;
        }