namespace Common.Documents; public interface IDocumentLocker : IDisposable where TDocument : IDocument where TPrimaryKey : notnull { event EventHandler? Expired; Guid Key { get; } TimeSpan LockTimeout { get; set; } TimeSpan Timeout { get; set; } TimeSpan Lifetime { get; set; } Task Lock(TDocument document); Task Unlock(); }