Class IEnumerableExtensions
Inheritance
IEnumerableExtensions
Namespace: NineDigiteKasa
Assembly: NineDigit.eKasa.dll
Syntax
public static class IEnumerableExtensions
Methods
ContainsVoucherApplicationResultingToZeroAmount(IEnumerable<ReceiptItem>)
Declaration
public static bool ContainsVoucherApplicationResultingToZeroAmount(this IEnumerable<ReceiptItem> items)
Parameters
Returns
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 |
| IEnumerable |
source |
Source sequence
|
| Func |
keySelector |
Projection for determining "distinctness"
|
Returns
| Type |
Description |
| IEnumerable |
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 |
| IEnumerable |
source |
Source sequence
|
| Func |
keySelector |
Projection for determining "distinctness"
|
| IEqualityComparer |
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 |
| IEnumerable |
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
Filter<TRecord>(IEnumerable<TRecord>, DateTimeOffsetRange)
Declaration
public static IEnumerable<TRecord> Filter<TRecord>(this IEnumerable<TRecord> source, DateTimeOffsetRange dateTimeRange) where TRecord : Record
Parameters
Returns
Type Parameters
ForEach<T>(IEnumerable<T>, Action<T, int>)
Declaration
public static IEnumerable<T> ForEach<T>(this IEnumerable<T> self, Action<T, int> handler)
Parameters
Returns
Type Parameters
ForEach<T>(IEnumerable<T>, Action<T>)
Declaration
public static IEnumerable<T> ForEach<T>(this IEnumerable<T> self, Action<T> handler)
Parameters
Returns
Type Parameters
GetTotalAmount(IEnumerable<ReceiptItem>)
Declaration
public static Amount GetTotalAmount(this IEnumerable<ReceiptItem> self)
Parameters
Returns
GetTotalAmount(IEnumerable<ReceiptPayment>)
Declaration
public static Amount GetTotalAmount(this IEnumerable<ReceiptPayment> self)
Parameters
Returns
IsNullOrEmpty<T>(IEnumerable<T>)
Declaration
public static bool IsNullOrEmpty<T>(this IEnumerable<T> self)
Parameters
Returns
Type Parameters
Join(IEnumerable<string>, string)
Declaration
public static string Join(this IEnumerable<string> self, string separator)
Parameters
| Type |
Name |
Description |
| IEnumerablestring |
self |
Zoznam reťazcov
|
| string |
separator |
Separátor, oddeľujúci jednotlivé reťazce
|
Returns
| Type |
Description |
| string |
Výsledný reťazec
|
Exceptions
Declaration
public static IEnumerable<T> Paginate<T>(this IEnumerable<T> self, Pagination pagination)
Parameters
Returns
Type Parameters
ToReadOnlyCollection<TSource>(IEnumerable<TSource>)
Declaration
public static ReadOnlyCollection<TSource> ToReadOnlyCollection<TSource>(this IEnumerable<TSource> source)
Parameters
Returns
Type Parameters
ToReadOnlyCollection<TSource>(IList<TSource>)
Declaration
public static ReadOnlyCollection<TSource> ToReadOnlyCollection<TSource>(this IList<TSource> source)
Parameters
| Type |
Name |
Description |
| IList |
source |
|
Returns
Type Parameters
ToVatRatesTaxSummary(IEnumerable<ReceiptItem>)
Declaration
public static VatRatesTaxSummary ToVatRatesTaxSummary(this IEnumerable<ReceiptItem> items)
Parameters
Returns