Class FunctionalExtensions
Functional method extensions
Inherited Members
Namespace: Syncfusion.Maui.DataSource.Extensions
Assembly: Syncfusion.Maui.DataSource.dll
Syntax
public static class FunctionalExtensions
Methods
And<T>(Expression<Func<T, bool>>, Expression<Func<T, bool>>)
Ands the specified expression1.
Declaration
public static Expression<Func<T, bool>> And<T>(this Expression<Func<T, bool>> expression1, Expression<Func<T, bool>> expression2)
Parameters
| Type | Name | Description |
|---|---|---|
| Expression<Func<T, bool>> | expression1 | The expression1. |
| Expression<Func<T, bool>> | expression2 | The expression2. |
Returns
| Type | Description |
|---|---|
| Expression<Func<T, bool>> | Returns the expression. |
Type Parameters
| Name | Description |
|---|---|
| T | Generic type parameter. |
CreateNew(Type)
Creates the new instance constructor.
Declaration
[RequiresUnreferencedCode("The CreateNew is not trim compatible")]
[RequiresDynamicCode("This method relies on dynamic code generation.")]
public static object CreateNew(this Type type)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | type | Represents the type. |
Returns
| Type | Description |
|---|---|
| object | Returns the created instance. |
CreateNew<T>(Type)
Creates the new instance constructor.
Declaration
[UnconditionalSuppressMessage("Trimming", "IL2026:Members annotated with 'RequiresUnreferencedCodeAttribute' require dynamic access otherwise can break functionality when trimming application code", Justification = "<Pending>")]
[UnconditionalSuppressMessage("AOT", "IL3050:Calling members annotated with 'RequiresDynamicCodeAttribute' may break functionality when AOT compiling.", Justification = "<Pending>")]
public static T CreateNew<T>(this Type type)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | type | The type. |
Returns
| Type | Description |
|---|---|
| T | Returns the created instance. |
Type Parameters
| Name | Description |
|---|---|
| T | Represents the generic type. |
False<T>()
False this instance.
Declaration
public static Expression<Func<T, bool>> False<T>()
Returns
| Type | Description |
|---|---|
| Expression<Func<T, bool>> | Returns generic boolean value. |
Type Parameters
| Name | Description |
|---|---|
| T | Generic type parameter. |
FoldLeft<T, U>(IEnumerable<U>, Func<T, U, T>, T)
Folds the left.
Declaration
public static T FoldLeft<T, U>(this IEnumerable<U> list, Func<T, U, T> function, T type)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<U> | list | The list. |
| Func<T, U, T> | function | The function. |
| T | type | The type of the parameter. |
Returns
| Type | Description |
|---|---|
| T | Returns the function. |
Type Parameters
| Name | Description |
|---|---|
| T | The first generic type parameter. |
| U | The second generic type parameter. |
FoldRight<T, U>(IEnumerable<U>, Func<T, U, T>, T)
Folds the right.
Declaration
public static T FoldRight<T, U>(this IEnumerable<U> list, Func<T, U, T> func, T type)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<U> | list | The list. |
| Func<T, U, T> | func | The function. |
| T | type | The type of the parameter. |
Returns
| Type | Description |
|---|---|
| T | Returns the type of the parameter. |
Type Parameters
| Name | Description |
|---|---|
| T | The first generic type parameter. |
| U | The second generic type parameter. |
Fold<T, U>(IEnumerable<U>, Func<T, U, T>, T)
Folds the specified list.
Declaration
public static T Fold<T, U>(this IEnumerable<U> list, Func<T, U, T> function, T type)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<U> | list | The list. |
| Func<T, U, T> | function | The function. |
| T | type | The type of the parameter. |
Returns
| Type | Description |
|---|---|
| T | Returns the specified type. |
Type Parameters
| Name | Description |
|---|---|
| T | The first generic type parameter. |
| U | The second generic type parameter. |
ForEach<T>(IEnumerable<T>, Action<T>)
Iterates over a generic IEnumerable instance to a delegated function
Declaration
public static void ForEach<T>(this IEnumerable<T> items, Action<T> action)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<T> | items | The items. |
| Action<T> | action | The action. |
Type Parameters
| Name | Description |
|---|---|
| T | Generic type parameter. |
ForEach<T>(IEnumerable, Action<T>)
Iterates over an IEnumerable instance to a delegated function
Declaration
public static void ForEach<T>(this IEnumerable items, Action<T> action)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable | items | The items. |
| Action<T> | action | The action. |
Type Parameters
| Name | Description |
|---|---|
| T | Generic type parameter. |
IterateIndex<T>(IEnumerable<T>, Action<int, T>)
Iterates the index.
Declaration
public static void IterateIndex<T>(this IEnumerable<T> items, Action<int, T> action)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<T> | items | The items. |
| Action<int, T> | action | The action. |
Type Parameters
| Name | Description |
|---|---|
| T | Generic type parameter. |
IterateIndex<T>(IEnumerable<T>, Action<int, T>, int)
Iterates the index.
Declaration
public static void IterateIndex<T>(this IEnumerable<T> items, Action<int, T> action, int index)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<T> | items | Represents the items. |
| Action<int, T> | action | Represents the action. |
| int | index | Represents the item index. |
Type Parameters
| Name | Description |
|---|---|
| T | Represents the generic type parameter. |
IterateIndex<T>(T[], Action<int, T>)
Iterates the index.
Declaration
public static void IterateIndex<T>(this T[] items, Action<int, T> action)
Parameters
| Type | Name | Description |
|---|---|---|
| T[] | items | The items. |
| Action<int, T> | action | The action. |
Type Parameters
| Name | Description |
|---|---|
| T | Generic type parameter. |
MoveTo(IList, int, int)
Moves to.
Declaration
public static void MoveTo(this IList list, int source, int destination)
Parameters
| Type | Name | Description |
|---|---|---|
| IList | list | The list. |
| int | source | The source. |
| int | destination | The destination. |
Or<T>(Expression<Func<T, bool>>, Expression<Func<T, bool>>)
Or the specified expression1.
Declaration
public static Expression<Func<T, bool>> Or<T>(this Expression<Func<T, bool>> expression1, Expression<Func<T, bool>> expression2)
Parameters
| Type | Name | Description |
|---|---|---|
| Expression<Func<T, bool>> | expression1 | The expression1. |
| Expression<Func<T, bool>> | expression2 | The expression2. |
Returns
| Type | Description |
|---|---|
| Expression<Func<T, bool>> | Returns the expression. |
Type Parameters
| Name | Description |
|---|---|
| T | Generic type parameter. |
ToList<T>(IEnumerable)
Represents the enumerable collection to a list.
Declaration
public static IEnumerable<T> ToList<T>(this IEnumerable items)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable | items | Represents the enumerable items. |
Returns
| Type | Description |
|---|---|
| IEnumerable<T> | Returns the enumerable collection. |
Type Parameters
| Name | Description |
|---|---|
| T | Represents the generic type parameter. |
ToObservableCollection<T>(IEnumerable<T>)
Converts into ObservableCollection.
Declaration
public static ObservableCollection<T> ToObservableCollection<T>(this IEnumerable<T> items)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<T> | items | Represents the enumerable items. |
Returns
| Type | Description |
|---|---|
| ObservableCollection<T> | Returns the collection. |
Type Parameters
| Name | Description |
|---|---|
| T | Represents the generic type parameter. |
True<T>()
Trues this instance.
Declaration
public static Expression<Func<T, bool>> True<T>()
Returns
| Type | Description |
|---|---|
| Expression<Func<T, bool>> | Returns the boolean value of the instance. |
Type Parameters
| Name | Description |
|---|---|
| T | Generic type parameter. |
Zip<TFirst, TSecond, TResult>(IEnumerable<TFirst>, IEnumerable<TSecond>, Func<TFirst, TSecond, TResult>)
Zips the parameters.
Declaration
public static IEnumerable<TResult> Zip<TFirst, TSecond, TResult>(this IEnumerable<TFirst> first, IEnumerable<TSecond> second, Func<TFirst, TSecond, TResult> resultSelector)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<TFirst> | first | Represents the first parameter. |
| IEnumerable<TSecond> | second | Represents the second parameter. |
| Func<TFirst, TSecond, TResult> | resultSelector | Represents the resultant function. |
Returns
| Type | Description |
|---|---|
| IEnumerable<TResult> | Returns the iterated value. |
Type Parameters
| Name | Description |
|---|---|
| TFirst | Represents the first generic type parameter. |
| TSecond | Represents the second generic type parameter. |
| TResult | Represents the resultant generic type parameter. |