Ejemplo n.º 1
0
 public void Distribute(BatchPayload batchPayload, string[] endpoints)
 {
     var result = batchPayload.Serialize();
     var content = Encoding.UTF8.GetBytes(result);
     endpoints.ForEach(e =>
         {
             try
             {
                 new WebClient().UploadData(e, content);
             }
             catch (Exception ex)
             {
                 if (DistributedProgress != null)
                     DistributedProgress(this, new DistributedLoadEventArgs { Load = batchPayload, Url = e, Message = ex.Message });
             }
         });
 }