< Summary

Information
Class: Chronicler.RecordValues
Assembly: Chronicler
File(s): /home/runner/work/Chronicler/Chronicler/src/Chronicler/Recording/RecordValues.cs
Line coverage
100%
Covered lines: 2
Uncovered lines: 0
Coverable lines: 2
Total lines: 24
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
Look(...)100%11100%

File(s)

/home/runner/work/Chronicler/Chronicler/src/Chronicler/Recording/RecordValues.cs

#LineLine coverage
 1//=======================================================================
 2// RecordValues.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 Chronicler;
 9
 10/// <summary>
 11/// Helper for reading and writing leaf values during a chronicler pass.
 12/// </summary>
 13public static class RecordValues
 14{
 15    /// <inheritdoc cref="IChronicler.LookValue{T}(ref T, string, T)" path="/*[not(self::param)]"/>
 16    /// <param name="chronicler">The active pass supplied to <see cref="IRecordable.RecordData"/>.</param>
 17    /// <param name="value">The value to write on save. On load, receives the decoded value or the declared default for 
 18    /// <param name="name">The stable field name shared by saving and loading.</param>
 19    /// <param name="defaultValue">The schema default. The built-in transports omit null values and values equal to this
 20    public static void Look<T>(IChronicler chronicler, ref T value, string name, T? defaultValue = default)
 21    {
 22445822        chronicler.LookValue(ref value, name, defaultValue);
 22445623    }
 24}