コード例 #1
0
 protected void PostOutputData(TOutputDataType[] ReturningResults, DataItemAcknowledgementCallback AcknowledgementCallback, bool LogicallyGrouped)
 {
     lock (shutdownLock)
     {
         if (shutdown)
         {
             return;
         }
     }
     try
     {
         if (ReturningResults != null || ReturningResults.Length > 0)
         {
             if (AcknowledgementCallback == null)
             {
                 if (ReturningResults.Length == 1)
                 {
                     ModuleHost.PostOutputDataItem(ReturningResults[0]);
                 }
                 else
                 {
                     ModuleHost.PostOutputDataItems(ReturningResults, LogicallyGrouped);
                 }
             }
             else
             {
                 if (ReturningResults.Length == 1)
                 {
                     ModuleHost.PostOutputDataItem(ReturningResults[0], AcknowledgementCallback, null);
                 }
                 else
                 {
                     ModuleHost.PostOutputDataItems(ReturningResults, LogicallyGrouped, AcknowledgementCallback, null);
                 }
             }
         }
     }
     catch (Exception e)
     {
         ModuleHost.NotifyError(ModuleErrorSeverity.DataLoss, e);
     }
 }