| | | 1 | | //======================================================================= |
| | | 2 | | // RecordNullableDeep.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 optional nested recordable structs during a chronicler pass. |
| | | 12 | | /// </summary> |
| | | 13 | | public static class RecordNullableDeep |
| | | 14 | | { |
| | | 15 | | /// <inheritdoc cref="IChronicler.LookNullableDeep{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 missing or null entry clears it on load. A present record is s |
| | | 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 | | { |
| | 36916 | 21 | | chronicler.LookNullableDeep(ref value, name); |
| | 36904 | 22 | | } |
| | | 23 | | } |