Class Utils
Assembly: Confluent.SchemaRegistry.dll
Syntax
public static class Utils
Methods
IEnumerableHashCode<T>(IEnumerable<T>)
Declaration
public static int IEnumerableHashCode<T>(IEnumerable<T> items)
Parameters
Returns
Type Parameters
ListEquals<T>(IList<T>, IList<T>)
Declaration
public static bool ListEquals<T>(IList<T> a, IList<T> b)
Parameters
Returns
Type Parameters
Asynchronously transforms each value of an IDictionary<K,V>,
by invoking the provided Func<object, object, Task<object>>
passing in the key and the original value
and returns a new Dictionary<K,V> whose values are the awaited results.
Declaration
public static Task<object> TransformDictionaryAsync(object sourceDictionary, Func<object, object, Task<object>> transformer)
Parameters
Type |
Name |
Description |
object |
sourceDictionary |
An object implementing IDictionary<K,V> for some K,V.
|
Func<object, object, Task<object>> |
transformer |
A function that takes (key as object, value as object) and returns a Task whose Result
is the new value (as object). The returned object must be castable to V.
|
Returns
Type |
Description |
Task<object> |
A Task whose Result is a Dictionary<K,V> containing all the transformed values.
Await and then cast back to IDictionary<K,V> to enumerate.
|
Asynchronously transforms each element of an IEnumerable<T>,
passing in its zero-based index and the element itself, using a
Func<int, object, Task<object>>, and returns a List<T> of the transformed elements.
Declaration
public static Task<object> TransformEnumerableAsync(object sourceEnumerable, Func<int, object, Task<object>> indexedTransformer)
Parameters
Type |
Name |
Description |
object |
sourceEnumerable |
An object implementing IEnumerable<T> for some T.
|
Func<int, object, Task<object>> |
indexedTransformer |
A function that takes (index, element as object) and returns a Task whose Result
is the new element (as object). The returned object must be castable to T.
|
Returns
Type |
Description |
Task<object> |
A Task whose Result is a List<T> (boxed as object) containing all transformed elements.
Await and then cast back to IEnumerable<T> to enumerate.
|