mirror of
https://github.com/Tyrrrz/CliFx.git
synced 2025-10-25 15:19:17 +00:00
14 lines
403 B
C#
14 lines
403 B
C#
using System;
|
|
|
|
namespace CliFx.Extensibility;
|
|
|
|
/// <summary>
|
|
/// Converter for binding command inputs to properties of type <see cref="TimeSpan" />.
|
|
/// </summary>
|
|
public class TimeSpanBindingConverter : BindingConverter<TimeSpan>
|
|
{
|
|
/// <inheritdoc />
|
|
public override TimeSpan Convert(string? rawValue, IFormatProvider? formatProvider) =>
|
|
TimeSpan.Parse(rawValue!, formatProvider);
|
|
}
|