From 7c6765dba6b9105cde7bc95528a29b24def4c5f0 Mon Sep 17 00:00:00 2001 From: Mark Clearwater Date: Sat, 14 Feb 2015 10:53:31 +1300 Subject: [PATCH] Updated readme for new Func/Action Extensions --- README.md | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3225ded..208684f 100644 --- a/README.md +++ b/README.md @@ -159,7 +159,6 @@ IntExtensions * InclusiveInteger Inclusive(this int value) * ExclusiveInteger Exclusive(this int value) - Example : 5.IsBetween(2.Exclusive(), 5.Inclusive()) @@ -174,7 +173,6 @@ LongExtensions * InclusiveLongInteger Inclusive(this long value) * ExclusiveLongInteger Exclusive(this long value) - Example: 5.IsBetween(2.Exclusive(), 5.Inclusive()) @@ -189,10 +187,31 @@ DecimalExtensions * InclusiveDecimal Inclusive(this decimal value) * ExclusiveDecimal Exclusive(this decimal value) - Example: (5m).IsBetween((2m).Exclusive(), (5m).Inclusive()) +Func Extensions +---------------------- +* Action AsActionUsing<T1, T2, T3, TResult>(this Func<T1, T2, T3, TResult> action, T1 parameter1, T2 parameter2, T3 parameter3) +* Action AsActionUsing<T1, T2, T3, T4, TResult>(this Func<T1, T2, T3, T4, TResult> action, T1 parameter1, T2 parameter2, T3 parameter3, T4 parameter4) +* Action AsActionUsing<T1, T2, T3, T4, T5, TResult>(this Func<T1, T2, T3, T4, T5, TResult> action, T1 parameter1, T2 parameter2, T3 parameter3, T4 parameter4, T5 parameter5) +* Action AsActionUsing<T1, T2, T3, T4, T5, T6, TResult>(this Func<T1, T2, T3, T4, T5, T6, TResult> action, T1 parameter1, T2 parameter2, T3 parameter3, T4 parameter4, T5 parameter5, T6 parameter6) +* Action AsActionUsing<T1, T2, T3, T4, T5, T6, T7, TResult>(this Func<T1, T2, T3, T4, T5, T6, T7, TResult> action, T1 parameter1, T2 parameter2, T3 parameter3, T4 parameter4, T5 parameter5, T6 parameter6, T7 parameter7) +* Action AsActionUsing<T1, T2, T3, T4, T5, T6, T7, T8, TResult>(this Func<T1, T2, T3, T4, T5, T6, T7, T8, TResult> action, T1 parameter1, T2 parameter2, T3 parameter3, T4 parameter4, T5 parameter5, T6 parameter6, T7 parameter7, T8 parameter8) + + +Action Extensions +---------------------- +* Action AsActionUsing<T1>(this Action<T1> action, T1 parameter1) +* Action AsActionUsing<T1, T2>(this Action<T1, T2> action, T1 parameter1, T2 parameter2) +* Action AsActionUsing<T1, T2, T3>(this Action<T1, T2, T3> action, T1 parameter1, T2 parameter2, T3 parameter3) +* Action AsActionUsing<T1, T2, T3, T4>(this Action<T1, T2, T3, T4> action, T1 parameter1, T2 parameter2, T3 parameter3, T4 parameter4) +* Action AsActionUsing<T1, T2, T3, T4, T5>(this Action<T1, T2, T3, T4, T5> action, T1 parameter1, T2 parameter2, T3 parameter3, T4 parameter4, T5 parameter5) +* Action AsActionUsing<T1, T2, T3, T4, T5, T6>(this Action<T1, T2, T3, T4, T5, T6> action, T1 parameter1, T2 parameter2, T3 parameter3, T4 parameter4, T5 parameter5, T6 parameter6) +* Action AsActionUsing<T1, T2, T3, T4, T5, T6, T7>(this Action<T1, T2, T3, T4, T5, T6, T7> action, T1 parameter1, T2 parameter2, T3 parameter3, T4 parameter4, T5 parameter5, T6 parameter6, T7 parameter7) +* Action AsActionUsing<T1, T2, T3, T4, T5, T6, T7, T8>(this Action<T1, T2, T3, T4, T5, T6, T7, T8> action, T1 parameter1, T2 parameter2, T3 parameter3, T4 parameter4, T5 parameter5, T6 parameter6, T7 parameter7, T8 parameter8) + + ExpressionExtensions -------------------- * string GetMemberName<TExpressionBody>(this Expression<TExpressionBody> expression) @@ -250,4 +269,11 @@ Array Extensions ---------------------- * void Clear<T>(this T[] items) * T[] OrNullIfEmpty<T>(this T[] items) -* T[] OrEmptyIfNull<T>(this T[] items) +* T[] OrEmptyIfNull<T>(this T[] items) + + +Func Extensions +---------------------- +* Action AsAction<T>(this Func<T> function) +* Action AsActionUsing<TOutput, TParameter>(this Func<TParameter, TOutput> function, TParameter parameter) +* Action AsActionUsing<TOutput, TParameter1, TParameter2>(this Func<TParameter1, TParameter2, TOutput> function, TParameter1 parameter1, TParameter2 parameter2)