/// <summary> /// Closes and releases all resources associated with a Couchbase bucket. /// </summary> /// <param name="bucket">The Bucket to close.</param> public void CloseBucket(IBucket bucket) { if (bucket == null) { throw new ArgumentNullException("bucket"); } _clusterManager.DestroyBucket(bucket); }
/// <summary> /// Closes this <see cref="MemcachedBucket"/> instance, shutting down and releasing all resources, /// removing it from it's <see cref="ClusterManager"/> instance. /// </summary> /// <param name="disposing">If true suppresses finalization.</param> void Dispose(bool disposing) { if (!_disposed) { _clusterManager.DestroyBucket(this); if (disposing) { GC.SuppressFinalize(this); } _disposed = true; } }