Table of Contents

Class FuncExtensions

Namespace
SunamoExtensions.Utf8Json
Assembly
SunamoExtensions.dll

Extension methods for Func type (hack to avoid closure allocation)

public static class FuncExtensions
Inheritance
FuncExtensions
Inherited Members

Methods

AsFuncFast<T>(T)

Converts a reference type value to a Func that returns that value (faster version for reference types)

public static Func<T> AsFuncFast<T>(this T value) where T : class

Parameters

value T

Value to wrap

Returns

Func<T>

Func that returns the value

Type Parameters

T

Reference type of the value

AsFunc<T>(T)

Converts a value to a Func that returns that value (hack to avoid closure allocation)

public static Func<T> AsFunc<T>(this T value)

Parameters

value T

Value to wrap

Returns

Func<T>

Func that returns the value

Type Parameters

T

Type of the value