Пример #1
0
 private void DisplayTransactionDetails(TransactionAvailableEventArgs transactionAvailableEvent)
 {
     System.Console.WriteLine("Transaction {0} Actor: {1} - ResultsPathname: \"{2}\" - Errors: {3} - Warnings: {4}",
                              transactionAvailableEvent.Transaction.TransactionNumber,
                              transactionAvailableEvent.ActorName.TypeId,
                              transactionAvailableEvent.Transaction.ResultsPathname,
                              transactionAvailableEvent.Transaction.NrErrors,
                              transactionAvailableEvent.Transaction.NrWarnings);
 }
Пример #2
0
        /// <summary>
        /// Publish the Transaction Available Event.
        /// </summary>
        /// <param name="actorName">Name of Actor from which the Transaction was received.</param>
        /// <param name="transaction">Transaction.</param>
        public void PublishTransactionAvailableEvent(ActorName actorName, ActorsTransaction transaction)
        {
            TransactionAvailableEventArgs transactionAvailableEvent = new TransactionAvailableEventArgs(actorName, transaction);

            if (OnTransactionAvailable != null)
            {
                OnTransactionAvailable(this, transactionAvailableEvent);
            }
        }
Пример #3
0
        /// <summary>
        /// Publish the Transaction Available Event.
        /// </summary>
        /// <param name="transactionAvailableEvent">Available transaction.</param>
        private void PublishTransactionAvailableEvent(TransactionAvailableEventArgs transactionAvailableEvent)
        {
//            DisplayTransactionDetails(transactionAvailableEvent);

            if (OnTransactionAvailable != null)
            {
                OnTransactionAvailable(this, transactionAvailableEvent);
            }
        }
Пример #4
0
        /// <summary>
        /// Transaction is available.
        /// </summary>
        /// <param name="server">Event source.</param>
        /// <param name="transactionAvailableEvent">Transaction Available Event Details.</param>
        private void TransactionIsAvailable(object server, TransactionAvailableEventArgs transactionAvailableEvent)
        {
            // handle the new transaction
            if (transactionAvailableEvent.Transaction.Transaction is Hl7Transaction)
            {
                // handle the HL7 transaction in any derived Actor class
                HandleTransactionFrom(transactionAvailableEvent.ActorName, (Hl7Transaction)transactionAvailableEvent.Transaction.Transaction);
            }
            else
            {
                // handle the DICOM transaction in any derived Actor class
                HandleTransactionFrom(transactionAvailableEvent.ActorName, (DicomTransaction)transactionAvailableEvent.Transaction.Transaction);
            }

            // Publish the event to any interested parties.
            PublishTransactionAvailableEvent(transactionAvailableEvent);
        }
Пример #5
0
 /// <summary>
 /// Transaction is available.
 /// </summary>
 /// <param name="server">Event source.</param>
 /// <param name="transactionAvailableEvent">Transaction Available Event Details.</param>
 private void TransactionIsAvailable(object server, TransactionAvailableEventArgs transactionAvailableEvent)
 {
     // Publish the event to any interested parties.
     PublishTransactionAvailableEvent(transactionAvailableEvent);
 }
Пример #6
0
 /// <summary>
 /// Publish the Transaction Available Event.
 /// </summary>
 /// <param name="transactionAvailable">Available transaction.</param>
 private void PublishTransactionAvailableEvent(TransactionAvailableEventArgs transactionAvailableEvent)
 {
     if (OnTransactionAvailable != null)
     {
         OnTransactionAvailable(this, transactionAvailableEvent);
     }
 }
Пример #7
0
        /// <summary>
        /// Publish the Transaction Available Event.
        /// </summary>
        /// <param name="actorName">Name of Actor from which the Transaction was received.</param>
        /// <param name="transaction">Transaction.</param>
        public void PublishTransactionAvailableEvent(ActorName actorName, ActorsTransaction transaction)
        {
            TransactionAvailableEventArgs transactionAvailableEvent = new TransactionAvailableEventArgs(actorName, transaction);

            if (OnTransactionAvailable != null)
            {
                OnTransactionAvailable(this, transactionAvailableEvent);
            }
        }
Пример #8
0
        /// <summary>
        /// Transaction is available.
        /// </summary>
        /// <param name="server">Event source.</param>
        /// <param name="transactionAvailableEvent">Transaction Available Event Details.</param>
        private void TransactionIsAvailable(object server, TransactionAvailableEventArgs transactionAvailableEvent)
        {
            // handle the new transaction
            if (transactionAvailableEvent.Transaction.Transaction is Hl7Transaction)
            {
                // handle the HL7 transaction in any derived Actor class
                HandleTransactionFrom(transactionAvailableEvent.ActorName, (Hl7Transaction)transactionAvailableEvent.Transaction.Transaction);
            }
            else
            {
                // handle the DICOM transaction in any derived Actor class
                HandleTransactionFrom(transactionAvailableEvent.ActorName, (DicomTransaction)transactionAvailableEvent.Transaction.Transaction);
            }

            // Publish the event to any interested parties.
            PublishTransactionAvailableEvent(transactionAvailableEvent);
        }
Пример #9
0
        /// <summary>
        /// Publish the Transaction Available Event.
        /// </summary>
        /// <param name="transactionAvailableEvent">Available transaction.</param>
        private void PublishTransactionAvailableEvent(TransactionAvailableEventArgs transactionAvailableEvent)
        {
            //            DisplayTransactionDetails(transactionAvailableEvent);

            if (OnTransactionAvailable != null)
            {
                OnTransactionAvailable(this, transactionAvailableEvent);
            }
        }
Пример #10
0
 private void DisplayTransactionDetails(TransactionAvailableEventArgs transactionAvailableEvent)
 {
     System.Console.WriteLine("Transaction {0} Actor: {1} - ResultsPathname: \"{2}\" - Errors: {3} - Warnings: {4}",
                         transactionAvailableEvent.Transaction.TransactionNumber,
                         transactionAvailableEvent.ActorName.TypeId,
                         transactionAvailableEvent.Transaction.ResultsPathname,
                         transactionAvailableEvent.Transaction.NrErrors,
                         transactionAvailableEvent.Transaction.NrWarnings);
 }
Пример #11
0
 void wrapper_OnTransactionAvailable(object server, TransactionAvailableEventArgs transactionAvailableEvent)
 {
     if (transactionAvailableEvent.Transaction.Transaction is DicomTransaction)
     {
         DicomTransaction dicomTransaction = (DicomTransaction)transactionAvailableEvent.Transaction.Transaction;
         for (int i = 0; i < dicomTransaction.DicomMessages.Count; i++)
         {
             DicomMessage dicomMessage = (DicomMessage)dicomTransaction.DicomMessages[i];
             if (dicomMessage.CommandSet.DimseCommand == DvtkData.Dimse.DimseCommand.CECHORSP)
             {
                 echoResultFile = transactionAvailableEvent.Transaction.ResultsFilename;
             }
         }
     }
 }