< Summary

Information
Class: Trailblazer.Support.ITransient
Assembly: Trailblazer
File(s): /home/runner/work/Trailblazer/Trailblazer/src/Trailblazer/Support/TransientState/ITransient.cs
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
Total lines: 28
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.cs

#LineLine coverage
 1namespace Trailblazer.Support;
 2
 3/// <summary>
 4/// Defines support for runtime properties marked with <see cref="TransientAttribute"/>.
 5/// <para>
 6/// In Trailblazer, "transient" means frame-local state that can be synchronized from another
 7/// instance or cleared back to defaults. The attribute does not control serialization on its own.
 8/// </para>
 9/// </summary>
 10public interface ITransient
 11{
 12    /// <summary>
 13    /// Synchronizes transient properties with another instance.
 14    /// </summary>
 15    /// <param name="other">The other instance to sync with.</param>
 16    public void SyncTransientState(ITransient other)
 17    {
 418        TransientStateUtility.Sync(this, other);
 419    }
 20
 21    /// <summary>
 22    /// Clears all transient properties by resetting them to their default values.
 23    /// </summary>
 24    public void ClearTransientState()
 25    {
 56426        TransientStateUtility.Clear(this);
 56427    }
 28}