16 lines
465 B
C#
16 lines
465 B
C#
namespace AdventOfCode2024.Input;
|
|
|
|
/// <summary>
|
|
/// Represents a text parser that outputs a specific type
|
|
/// given a text stream
|
|
/// </summary>
|
|
/// <typeparam name="T">The type that will be parsed</typeparam>
|
|
public interface IParser<T> where T : notnull
|
|
{
|
|
/// <summary>
|
|
/// Parses the stream and returns an object
|
|
/// </summary>
|
|
/// <param name="input"></param>
|
|
/// <returns>The object</returns>
|
|
public Task<T> ParseAsync(Stream input);
|
|
} |