DotNext by .NET Foundation and Contributors

<PackageReference Include="DotNext" Version="4.0.0-beta.8" />

.NET API 413,656 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.