Ejemplo n.º 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);
 }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
     }
 }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 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);
 }
Ejemplo n.º 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;
             }
         }
     }
 }