< 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: 35
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
 1//=======================================================================
 2// ITransient.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/// Defines support for runtime properties marked with <see cref="TransientAttribute"/>.
 12/// <para>
 13/// In Trailblazer, "transient" means frame-local state that can be synchronized from another
 14/// instance or cleared back to defaults. The attribute does not control serialization on its own.
 15/// </para>
 16/// </summary>
 17public interface ITransient
 18{
 19    /// <summary>
 20    /// Synchronizes transient properties with another instance.
 21    /// </summary>
 22    /// <param name="other">The other instance to sync with.</param>
 23    public void SyncTransientState(ITransient other)
 24    {
 425        TransientStateUtility.Sync(this, other);
 426    }
 27
 28    /// <summary>
 29    /// Clears all transient properties by resetting them to their default values.
 30    /// </summary>
 31    public void ClearTransientState()
 32    {
 79333        TransientStateUtility.Clear(this);
 79334    }
 35}