예제 #1
0
 public BulkServiceExecutorManager(TIService service, IEnumerable <TRequest> requests)
 {
     _bulkServices = new List <BulkService <TIService, TRequest> >(requests.Count());
     requests.xForEach(request =>
     {
         var serviceExecutorManager = new ServiceExecutorManager <TIService>(service);
         _bulkServices.Add(new BulkService <TIService, TRequest>
         {
             SvcExecManager = serviceExecutorManager,
             Reqeust        = request
         });
     });
 }
예제 #2
0
 public BulkServiceExecutorManager(IEnumerable <TRequest> requestItems)
 {
     this._bulkServices = new List <BulkService <TIService, TRequest> >(requestItems.Count());
     requestItems.forEach(request => {
         var instance = ServiceLocator.Current.GetInstance <TIService>();
         var serviceExecutorManager = new ServiceExecutorManager <TIService>(instance);
         this._bulkServices.Add(new BulkService <TIService, TRequest>()
         {
             SvcExecManager = serviceExecutorManager,
             Reqeust        = request
         });
         return(true);
     });
 }