using System;
namespace ProcessHacker.Common.Objects
{
public interface IRefCounted : IDisposable
{
///
/// Decrements the reference count of the object.
///
/// The new reference count.
long Dereference();
///
/// Decrements the reference count of the object.
///
/// Whether to dispose managed resources.
/// The new reference count.
long Dereference(bool managed);
///
/// Decreases the reference count of the object.
///
/// The number of times to dereference the object.
/// The new reference count.
long Dereference(long count);
///
/// Decreases the reference count of the object.
///
/// The number of times to dereference the object.
/// Whether to dispose managed resources.
/// The new reference count.
long Dereference(long count, bool managed);
///
/// Ensures that the reference counting system has exclusive control
/// over the lifetime of the object.
///
/// Whether to dispose managed resources.
void Dispose(bool managed);
///
/// Increments the reference count of the object.
///
/// The new reference count.
long Reference();
///
/// Increases the reference count of the object.
///
/// The number of times to reference the object.
/// The new reference count.
long Reference(long count);
}
}