| | | 1 | | //======================================================================= |
| | | 2 | | // RecordDeepStruct.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 | | |
| | | 8 | | namespace Chronicler; |
| | | 9 | | |
| | | 10 | | /// <summary> |
| | | 11 | | /// Helper for reading and writing nested recordable structs during a chronicler pass. |
| | | 12 | | /// </summary> |
| | | 13 | | public static class RecordDeepStruct |
| | | 14 | | { |
| | | 15 | | /// <inheritdoc cref="IChronicler.LookDeepStruct{T}(ref T, string)" 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. A present record loads into a fresh value. For missing or null i |
| | | 18 | | /// <param name="name">The stable field name shared by saving and loading.</param> |
| | | 19 | | public static void Look<T>(IChronicler chronicler, ref T value, string name) where T : struct, IRecordable |
| | | 20 | | { |
| | 37720 | 21 | | chronicler.LookDeepStruct(ref value, name); |
| | 37706 | 22 | | } |
| | | 23 | | } |