c# create list from list of async tasks code example
Example: listaddtoleftasync example c#
public async Task<long> ListAddToLeftAsync<T>(string key, T item) where T : class
{
if (string.IsNullOrEmpty(key))
{
throw new ArgumentException("key cannot be empty.", nameof(key));
}
if (item == null)
{
throw new ArgumentNullException(nameof(item), "item cannot be null.");
}
var serializedItem = await Serializer.SerializeAsync(item);
return await Database.ListLeftPushAsync(key, serializedItem);
}