public void PublishEvent(ActorNameEnum actorName, BaseTransaction transaction) { TransactionAvailableEventArgs transactionAvailableEvent = new TransactionAvailableEventArgs(actorName, transaction); if (OnTransactionAvailable != null) { OnTransactionAvailable(this, transactionAvailableEvent); } }
public void TransactionIsAvailable(object server, TransactionAvailableEventArgs transactionAvailableEvent) { // handle the new transaction if (transactionAvailableEvent.Transaction is Hl7Transaction) { HandleTransactionFrom(transactionAvailableEvent.ActorName, (Hl7Transaction)transactionAvailableEvent.Transaction); } else { HandleTransactionFrom(transactionAvailableEvent.ActorName, (DicomTransaction)transactionAvailableEvent.Transaction); } }