Class IEnumerableExtensions
Inheritance
System.Object
IEnumerableExtensions
Assembly: NineDigit.eKasa.dll
Syntax
public static class IEnumerableExtensions : Object
Methods
ContainsVoucherApplicationResultingToZeroAmount(IEnumerable<ReceiptItem>)
Declaration
public static bool ContainsVoucherApplicationResultingToZeroAmount(this IEnumerable<ReceiptItem> items)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<ReceiptItem> |
items |
|
Returns
Type |
Description |
System.Boolean |
|
DistinctBy<TSource, TKey>(IEnumerable<TSource>, Func<TSource, TKey>)
Returns all distinct elements of the given source, where "distinctness"
is determined via a projection and the default equality comparer for the projected type.
Declaration
public static IEnumerable<TSource> DistinctBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<TSource> |
source |
Source sequence
|
System.Func<TSource, TKey> |
keySelector |
Projection for determining "distinctness"
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<TSource> |
A sequence consisting of distinct elements from the source sequence,
comparing them by the specified key projection.
|
Type Parameters
Name |
Description |
TSource |
Type of the source sequence
|
TKey |
Type of the projected element
|
DistinctBy<TSource, TKey>(IEnumerable<TSource>, Func<TSource, TKey>, IEqualityComparer<TKey>)
Returns all distinct elements of the given source, where "distinctness"
is determined via a projection and the specified comparer for the projected type.
Declaration
public static IEnumerable<TSource> DistinctBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey> comparer)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<TSource> |
source |
Source sequence
|
System.Func<TSource, TKey> |
keySelector |
Projection for determining "distinctness"
|
System.Collections.Generic.IEqualityComparer<TKey> |
comparer |
The equality comparer to use to determine whether or not keys are equal.
If null, the default equality comparer for TSource is used.
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<TSource> |
A sequence consisting of distinct elements from the source sequence,
comparing them by the specified key projection.
|
Type Parameters
Name |
Description |
TSource |
Type of the source sequence
|
TKey |
Type of the projected element
|
Filter(IEnumerable<IRegisterToken>, RegisterTokenQuery)
Declaration
public static QueryResult<IRegisterToken> Filter(this IEnumerable<IRegisterToken> self, RegisterTokenQuery query)
Parameters
Returns
Exceptions
Type |
Condition |
System.ArgumentNullException |
self je null .
|
System.ArgumentNullException |
query je null .
|
Filter<TRecord>(IEnumerable<TRecord>, DateTimeOffsetRange)
Declaration
public static IEnumerable<TRecord> Filter<TRecord>(this IEnumerable<TRecord> source, DateTimeOffsetRange dateTimeRange)
where TRecord : Record
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<TRecord> |
source |
|
DateTimeOffsetRange |
dateTimeRange |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<TRecord> |
|
Type Parameters
ForEach<T>(IEnumerable<T>, Action<T, Int32>)
Declaration
public static IEnumerable<T> ForEach<T>(this IEnumerable<T> self, Action<T, int> handler)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<T> |
self |
|
System.Action<T, System.Int32> |
handler |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<T> |
|
Type Parameters
ForEach<T>(IEnumerable<T>, Action<T>)
Declaration
public static IEnumerable<T> ForEach<T>(this IEnumerable<T> self, Action<T> handler)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<T> |
self |
|
System.Action<T> |
handler |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<T> |
|
Type Parameters
GetTotalAmount(IEnumerable<ReceiptItem>)
Declaration
public static Amount GetTotalAmount(this IEnumerable<ReceiptItem> self)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<ReceiptItem> |
self |
|
Returns
GetTotalAmount(IEnumerable<ReceiptPayment>)
Declaration
public static Amount GetTotalAmount(this IEnumerable<ReceiptPayment> self)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<ReceiptPayment> |
self |
|
Returns
IsNullOrEmpty<T>(IEnumerable<T>)
Declaration
public static bool IsNullOrEmpty<T>(this IEnumerable<T> self)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<T> |
self |
|
Returns
Type |
Description |
System.Boolean |
|
Type Parameters
Join(IEnumerable<String>, String)
Declaration
public static string Join(this IEnumerable<string> self, string separator)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<System.String> |
self |
Zoznam reťazcov
|
System.String |
separator |
Separátor, oddeľujúci jednotlivé reťazce
|
Returns
Type |
Description |
System.String |
Výsledný reťazec
|
Exceptions
Type |
Condition |
System.ArgumentNullException |
Ak self je null.
|
Declaration
public static IEnumerable<T> Paginate<T>(this IEnumerable<T> self, Pagination pagination)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<T> |
self |
|
Pagination |
pagination |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<T> |
|
Type Parameters
ToReadOnlyCollection<TSource>(IEnumerable<TSource>)
Declaration
public static ReadOnlyCollection<TSource> ToReadOnlyCollection<TSource>(this IEnumerable<TSource> source)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<TSource> |
source |
|
Returns
Type |
Description |
System.Collections.ObjectModel.ReadOnlyCollection<TSource> |
|
Type Parameters
ToReadOnlyCollection<TSource>(IList<TSource>)
Declaration
public static ReadOnlyCollection<TSource> ToReadOnlyCollection<TSource>(this IList<TSource> source)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IList<TSource> |
source |
|
Returns
Type |
Description |
System.Collections.ObjectModel.ReadOnlyCollection<TSource> |
|
Type Parameters
ToVatRatesTaxSummary(IEnumerable<ReceiptItem>)
Declaration
public static VatRatesTaxSummary ToVatRatesTaxSummary(this IEnumerable<ReceiptItem> items)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<ReceiptItem> |
items |
|
Returns