using System; namespace ProcessHacker.Common.Objects { public interface IRefCounted : IDisposable { /// /// Decrements the reference count of the object. /// /// The new reference count. int Dereference(); /// /// Decrements the reference count of the object. /// /// Whether to dispose managed resources. /// The new reference count. int Dereference(bool managed); /// /// Decreases the reference count of the object. /// /// The number of times to dereference the object. /// The new reference count. int Dereference(int 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. int Dereference(int 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. int Reference(); /// /// Increases the reference count of the object. /// /// The number of times to reference the object. /// The new reference count. int Reference(int count); } }