DotNext by .NET Foundation and Contributors

<PackageReference Include="DotNext" Version="5.11.0" />

.NET API 513,480 bytes

 Converter

public static class Converter
Provides extension methods for delegate Converter<T, U> and predefined converters.
public static Func<TInput, TOutput> AsFunc<TInput, TOutput>(this Converter<TInput, TOutput> converter)

Converts Converter<T, U> into Func<T, U>.

public static Predicate<T> AsPredicate<T>(this Converter<T, bool> converter)

Converts Converter<T, U> into predicate.

public static Converter<TInput, TOutput> Identity<TInput, TOutput>() where TInput : TOutput

The converter which returns input argument without any modifications.

public static Converter<T, T> Identity<T>()

The converter which returns input argument without any modifications.

public static Result<TOutput> TryInvoke<TInput, TOutput>(this Converter<TInput, TOutput> converter, TInput input)

Converts the input value without throwing exception.