Exemplo n.º 1
0
 private void CrossJoinData(TInput2 passingRow)
 {
     if (!WasInMemoryTableLoaded)
     {
         InMemoryTarget.Wait();
         WasInMemoryTableLoaded = true;
     }
     foreach (TInput1 inMemoryRow in InMemoryData)
     {
         try
         {
             if (inMemoryRow != null && passingRow != null)
             {
                 TOutput result = CrossJoinFunc.Invoke(inMemoryRow, passingRow);
                 if (result != null)
                 {
                     Buffer.SendAsync(result).Wait();
                     LogProgress();
                 }
             }
         }
         catch (Exception e)
         {
             if (!ErrorHandler.HasErrorBuffer)
             {
                 throw e;
             }
             ErrorHandler.Send(e, string.Concat(ErrorHandler.ConvertErrorData <TInput1>(inMemoryRow), "  |--| ",
                                                ErrorHandler.ConvertErrorData <TInput2>(passingRow)));
         }
     }
 }
Exemplo n.º 2
0
 private void CrossJoinData(TInput2 passingRow)
 {
     NLogStartOnce();
     if (!WasInMemoryTableLoaded)
     {
         InMemoryTarget.Completion.Wait();
         WasInMemoryTableLoaded = true;
     }
     foreach (TInput1 inMemoryRow in InMemoryData)
     {
         try
         {
             if (inMemoryRow != null && passingRow != null)
             {
                 TOutput result = CrossJoinFunc.Invoke(inMemoryRow, passingRow);
                 if (result != null)
                 {
                     if (!Buffer.SendAsync(result).Result)
                     {
                         throw new ETLBoxException("Buffer already completed or faulted!", this.Exception);
                     }
                     LogProgress();
                 }
             }
         }
         catch (ETLBoxException) { throw; }
         catch (Exception e)
         {
             ThrowOrRedirectError(e, string.Concat(ErrorSource.ConvertErrorData <TInput1>(inMemoryRow), "  |--| ",
                                                   ErrorSource.ConvertErrorData <TInput2>(passingRow)));
             LogProgress();
         }
     }
 }