Files
FSI.BT.IR.Tools/Config.Net/ITypeParser.cs
Stephan Maier 647f938eee v1.2
2024-08-27 08:10:27 +02:00

33 lines
855 B
C#

using System;
using System.Collections.Generic;
namespace Config.Net
{
/// <summary>
/// Type parser interface
/// </summary>
public interface ITypeParser
{
/// <summary>
/// Returns the list of supported types this type parser handles
/// </summary>
IEnumerable<Type> SupportedTypes { get; }
/// <summary>
/// Tries to parse a value from string
/// </summary>
/// <param name="value"></param>
/// <param name="t"></param>
/// <param name="result"></param>
/// <returns></returns>
bool TryParse(string? value, Type t, out object? result);
/// <summary>
/// Converts value to a string to store in a backed store
/// </summary>
/// <param name="value"></param>
/// <returns></returns>
string? ToRawString(object? value);
}
}