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); }
/// <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); } }
/// <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); } }
/// <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); }
/// <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); }
/// <summary> /// Publish the Transaction Available Event. /// </summary> /// <param name="transactionAvailable">Available transaction.</param> private void PublishTransactionAvailableEvent(TransactionAvailableEventArgs transactionAvailableEvent) { if (OnTransactionAvailable != null) { OnTransactionAvailable(this, transactionAvailableEvent); } }
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; } } } }