< Summary

Information
Class: Trailblazer.Support.ITransientExtensions
Assembly: Trailblazer
File(s): /home/runner/work/Trailblazer/Trailblazer/src/Trailblazer/Support/TransientState/ITransient.Extensions.cs
Line coverage
100%
Covered lines: 2
Uncovered lines: 0
Coverable lines: 2
Total lines: 23
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
SyncTransientState(...)100%11100%
ClearTransientState(...)100%11100%

File(s)

/home/runner/work/Trailblazer/Trailblazer/src/Trailblazer/Support/TransientState/ITransient.Extensions.cs

#LineLine coverage
 1//=======================================================================
 2// ITransient.Extensions.cs
 3//=======================================================================
 4// MIT License, Copyright (c) 2024-present David Oravsky (mrdav30)
 5// See LICENSE file in the project root for full license information.
 6//=======================================================================
 7
 8namespace Trailblazer.Support;
 9
 10/// <summary>
 11/// Extension methods for ITransient to allow calling without casting to the interface.
 12/// This is purely for convenience and does not change the underlying behavior.
 13/// </summary>
 14public static class ITransientExtensions
 15{
 16    /// <inheritdoc cref="ITransient.SyncTransientState"/>
 17    public static void SyncTransientState(this ITransient instance, ITransient other)
 318        => TransientStateUtility.Sync(instance, other);
 19
 20    /// <inheritdoc cref="ITransient.ClearTransientState"/>
 21    public static void ClearTransientState(this ITransient instance)
 4422        => TransientStateUtility.Clear(instance);
 23}