Fix audit findings for coverage, architecture checks, and XML docs
All checks were successful
NuGet Publish / build-and-pack (push) Successful in 45s
NuGet Publish / publish-to-gitea (push) Successful in 52s

This commit is contained in:
Joseph Doherty
2026-02-20 15:43:25 -05:00
parent 5528806518
commit 3ffd468c79
99 changed files with 23746 additions and 9548 deletions

View File

@@ -10,11 +10,19 @@ internal sealed class BenchmarkTransactionHolder : ITransactionHolder, IDisposab
private readonly object _sync = new();
private ITransaction? _currentTransaction;
/// <summary>
/// Initializes a new instance of the <see cref="BenchmarkTransactionHolder"/> class.
/// </summary>
/// <param name="storage">The storage engine used to create transactions.</param>
public BenchmarkTransactionHolder(StorageEngine storage)
{
_storage = storage ?? throw new ArgumentNullException(nameof(storage));
}
/// <summary>
/// Gets the current active transaction or starts a new one.
/// </summary>
/// <returns>The current active transaction.</returns>
public ITransaction GetCurrentTransactionOrStart()
{
lock (_sync)
@@ -28,11 +36,18 @@ internal sealed class BenchmarkTransactionHolder : ITransactionHolder, IDisposab
}
}
/// <summary>
/// Gets the current active transaction or starts a new one asynchronously.
/// </summary>
/// <returns>A task that returns the current active transaction.</returns>
public Task<ITransaction> GetCurrentTransactionOrStartAsync()
{
return Task.FromResult(GetCurrentTransactionOrStart());
}
/// <summary>
/// Commits the current transaction when active and clears the holder.
/// </summary>
public void CommitAndReset()
{
lock (_sync)
@@ -53,6 +68,9 @@ internal sealed class BenchmarkTransactionHolder : ITransactionHolder, IDisposab
}
}
/// <summary>
/// Rolls back the current transaction when active and clears the holder.
/// </summary>
public void RollbackAndReset()
{
lock (_sync)
@@ -73,6 +91,9 @@ internal sealed class BenchmarkTransactionHolder : ITransactionHolder, IDisposab
}
}
/// <summary>
/// Disposes this holder and rolls back any outstanding transaction.
/// </summary>
public void Dispose()
{
RollbackAndReset();