コード例 #1
0
 private bool _disposedValue; // To detect redundant calls
 /// <summary>
 /// Releases unmanaged and - optionally - managed resources.
 /// </summary>
 /// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
 protected virtual void Dispose(bool disposing)
 {
     if (!_disposedValue)
     {
         if (disposing)
         {
             _handler.Dispose();
         }
         _disposedValue = true;
     }
 }
コード例 #2
0
        /// <summary>
        /// Releases unmanaged and - optionally - managed resources.
        /// </summary>
        /// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
        protected virtual void Dispose(bool disposing)
        {
            if (!disposing)
            {
                return;
            }

            if (Interlocked.Increment(ref _disposeCount) != 1)
            {
                return;
            }
            _linqCompiler.Dispose();
        }
コード例 #3
0
        /// <summary>
        /// Releases unmanaged and - optionally - managed resources.
        /// </summary>
        /// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
        protected virtual void Dispose(bool disposing)
        {
            if (!disposing)
            {
                return;
            }

            if (Interlocked.Increment(ref _disposeCount) != 1)
            {
                return;
            }

            foreach (var queue in _rpcQueues.Values)
            {
                queue.Dispose();
            }
            _rpcQueues.Clear();
            _linqCompiler.Dispose();
        }
コード例 #4
0
 /// <summary>
 /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
 /// </summary>
 public void Dispose()
 {
     _handler.Dispose();
 }