示例#1
0
 public static IEnumerable <TableBatchInformation <T> > ToBatchInformations <T>(this IEnumerable <IEnumerable <T> > batches, EntitiesBatchInformationConverter <T> converter)
     where T : ITableEntity
 {
     return(converter(batches));
 }
示例#2
0
      public static async Task<IEnumerable<T>> ExecuteBatchAsync<T>(this CloudTable table, IEnumerable<T> entities, EntitiesBatchInformationConverter<T> converter, EventHub eventHub)
         where T : class, ITableEntity
      {
         var executions = await entities
            .ToPessimisticConcurrency()
            .ToBatches()
            .ToBatchInformations(converter)
            .ExecuteAsync<T>(table, eventHub);

         var results = executions
            .Where(e => e != null)
            .ToList();

         return results;
      }