mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-02-04 05:36:12 +00:00
22 lines
692 B
C#
22 lines
692 B
C#
namespace SabreTools.Serialization.Interfaces
|
|
{
|
|
/// <summary>
|
|
/// Defines how to read from strings
|
|
/// </summary>
|
|
public interface IStringReader<TModel>
|
|
{
|
|
/// <summary>
|
|
/// Enable outputting debug information
|
|
/// </summary>
|
|
public bool Debug { get; set; }
|
|
|
|
/// <summary>
|
|
/// 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>
|
|
public TModel? Deserialize(string? str);
|
|
}
|
|
}
|