Files
SabreTools.Serialization/SabreTools.Serialization.Readers/IStringReader.cs

22 lines
689 B
C#
Raw Normal View History

namespace SabreTools.Serialization.Readers
{
/// <summary>
/// Defines how to read from strings
/// </summary>
2025-09-26 15:28:53 -04:00
public interface IStringReader<TModel>
{
/// <summary>
/// Enable outputting debug information
/// </summary>
public bool Debug { get; set; }
/// <summary>
2025-09-26 15:28:53 -04:00
/// Deserialize a string into <typeparamref name="TModel"/>
/// </summary>
/// <typeparam name="T">Type of object to deserialize to</typeparam>
/// <param name="str">String to deserialize from</param>
/// <returns>Filled object on success, null on error</returns>
2026-01-25 16:15:05 -05:00
public TModel? Deserialize(string? str);
}
}