Example #1
0
        public virtual void AssociationReleasedEventHandler(DicomThread dicomThread)
        {
            DicomTransaction transaction = new DicomTransaction(TransactionNameEnum.RAD_10, TransactionDirectionEnum.TransactionReceived);

            foreach (DicomMessage dicomMessage in dicomThread.DataWarehouse.Messages(dicomThread).DicomMessages)
            {
                transaction.DicomMessages.Add(dicomMessage);
            }

            // publish the transaction event to any interested parties
            PublishEvent(ActorName, transaction);

            // get the next transaction number - needed to sort the
            // transactions correctly
            int transactionNumber = TransactionNumber.GetNextTransactionNumber();

            // save the transaction
            ActorsTransaction actorsTransaction = new ActorsTransaction(transactionNumber,
                                                                        ParentActor.ActorName,
                                                                        ActorName,
                                                                        transaction,
                                                                        dicomThread.ResultsFileName,
                                                                        dicomThread.NrOfErrors,
                                                                        dicomThread.NrOfWarnings);

            ParentActor.ActorsTransactionLog.Add(actorsTransaction);

            dicomThread.DataWarehouse.ClearMessages(dicomThread);
        }
Example #2
0
        public override void AfterProcessTrigger(Object trigger)
        {
            // save the transaction
            DicomTransaction transaction = new DicomTransaction(TransactionNameEnum.RAD_10, TransactionDirectionEnum.TransactionSent);

            foreach (DicomMessage dicomMessage in this.DataWarehouse.Messages(this).DicomMessages)
            {
                transaction.DicomMessages.Add(dicomMessage);
            }

            ActorsTransaction actorsTransaction = new ActorsTransaction(_transactionNumber,
                                                                        _dicomClient.ParentActor.ActorName,
                                                                        _dicomClient.ActorName,
                                                                        transaction,
                                                                        this.ResultsFileName,
                                                                        this.NrOfErrors,
                                                                        this.NrOfWarnings);

            _dicomClient.ParentActor.ActorsTransactionLog.Add(actorsTransaction);

            this.DataWarehouse.ClearMessages(this);
        }
Example #3
0
        public override void AfterProcessTrigger(Object trigger)
        {
            // save the transaction
            DicomTransaction transaction = new DicomTransaction(TransactionNameEnum.RAD_10, TransactionDirectionEnum.TransactionSent);
            foreach (DicomMessage dicomMessage in this.DataWarehouse.Messages(this).DicomMessages)
            {
                transaction.DicomMessages.Add(dicomMessage);
            }

            ActorsTransaction actorsTransaction = new ActorsTransaction(_transactionNumber,
                _dicomClient.ParentActor.ActorName,
                _dicomClient.ActorName,
                transaction,
                this.ResultsFileName,
                this.NrOfErrors,
                this.NrOfWarnings);
            _dicomClient.ParentActor.ActorsTransactionLog.Add(actorsTransaction);

            this.DataWarehouse.ClearMessages(this);
        }
Example #4
0
 /// <summary>
 /// Determines whether the <see cref="ActorsTransactionLog"/> contains a specific element.
 /// </summary>
 /// <param name="value">The <see cref="ActorsTransaction"/> to locate in the <see cref="ActorsTransactionLog"/>.</param>
 /// <returns>
 /// <c>true</c> if the <see cref="ActorsTransactionLog"/> contains the specified value;
 /// otherwise, <c>false</c>.
 /// </returns>
 public bool Contains(ActorsTransaction value)
 {
     // If value is not of type Code, this will return false.
     return(List.Contains(value));
 }
Example #5
0
 /// <summary>
 /// Removes the first occurrence of a specific <see cref="ActorsTransaction"/> from the <see cref="ActorsTransactionLog"/>.
 /// </summary>
 /// <param name="value">The <see cref="ActorsTransaction"/> to remove from the <see cref="ActorsTransactionLog"/>.</param>
 public void Remove(ActorsTransaction value)
 {
     List.Remove(value);
 }
Example #6
0
 /// <summary>
 /// Inserts an <see cref="ActorsTransaction"/> element into the <see cref="ActorsTransactionLog"/> at the specified index.
 /// </summary>
 /// <param name="index">The zero-based index at which value should be inserted.</param>
 /// <param name="value">The <see cref="ActorsTransaction"/> to insert.</param>
 public void Insert(int index, ActorsTransaction value)
 {
     List.Insert(index, value);
 }
Example #7
0
 /// <summary>
 /// Searches for the specified <see cref="ActorsTransaction"/> and
 /// returns the zero-based index of the first occurrence within the entire <see cref="ActorsTransactionLog"/>.
 /// </summary>
 /// <param name="value">The <see cref="ActorsTransaction"/> to locate in the <see cref="ActorsTransactionLog"/>.</param>
 /// <returns>
 /// The zero-based index of the first occurrence of value within the entire <see cref="ActorsTransactionLog"/>,
 /// if found; otherwise, -1.
 /// </returns>
 public int IndexOf(ActorsTransaction value)
 {
     return(List.IndexOf(value));
 }
Example #8
0
 /// <summary>
 /// Adds an object to the end of the <see cref="ActorsTransactionLog"/>.
 /// </summary>
 /// <param name="value">The <see cref="ActorsTransaction"/> to be added to the end of the <see cref="ActorsTransactionLog"/>.</param>
 /// <returns>The <see cref="ActorsTransactionLog"/> index at which the value has been added.</returns>
 public int Add(ActorsTransaction value)
 {
     return(List.Add(value));
 }
Example #9
0
 /// <summary>
 /// Determines whether the <see cref="ActorsTransactionLog"/> contains a specific element.
 /// </summary>
 /// <param name="value">The <see cref="ActorsTransaction"/> to locate in the <see cref="ActorsTransactionLog"/>.</param>
 /// <returns>
 /// <c>true</c> if the <see cref="ActorsTransactionLog"/> contains the specified value; 
 /// otherwise, <c>false</c>.
 /// </returns>
 public bool Contains(ActorsTransaction value)
 {
     // If value is not of type Code, this will return false.
     return (List.Contains(value));
 }
Example #10
0
 /// <summary>
 /// Adds an object to the end of the <see cref="ActorsTransactionLog"/>.
 /// </summary>
 /// <param name="value">The <see cref="ActorsTransaction"/> to be added to the end of the <see cref="ActorsTransactionLog"/>.</param>
 /// <returns>The <see cref="ActorsTransactionLog"/> index at which the value has been added.</returns>
 public int Add(ActorsTransaction value)
 {
     return (List.Add(value));
 }
Example #11
0
 /// <summary>
 /// Removes the first occurrence of a specific <see cref="ActorsTransaction"/> from the <see cref="ActorsTransactionLog"/>.
 /// </summary>
 /// <param name="value">The <see cref="ActorsTransaction"/> to remove from the <see cref="ActorsTransactionLog"/>.</param>
 public void Remove(ActorsTransaction value)
 {
     List.Remove(value);
 }
Example #12
0
 /// <summary>
 /// Inserts an <see cref="ActorsTransaction"/> element into the <see cref="ActorsTransactionLog"/> at the specified index.
 /// </summary>
 /// <param name="index">The zero-based index at which value should be inserted.</param>
 /// <param name="value">The <see cref="ActorsTransaction"/> to insert.</param>
 public void Insert(int index, ActorsTransaction value)
 {
     List.Insert(index, value);
 }
Example #13
0
 /// <summary>
 /// Searches for the specified <see cref="ActorsTransaction"/> and 
 /// returns the zero-based index of the first occurrence within the entire <see cref="ActorsTransactionLog"/>.
 /// </summary>
 /// <param name="value">The <see cref="ActorsTransaction"/> to locate in the <see cref="ActorsTransactionLog"/>.</param>
 /// <returns>
 /// The zero-based index of the first occurrence of value within the entire <see cref="ActorsTransactionLog"/>, 
 /// if found; otherwise, -1.
 /// </returns>
 public int IndexOf(ActorsTransaction value)
 {
     return (List.IndexOf(value));
 }
Example #14
0
 /// <summary>
 /// Copies the elements of the <see cref="ICollection"/> to a strong-typed <c>ActorsTransaction[]</c>, 
 /// starting at a particular <c>ActorsTransaction[]</c> index.
 /// </summary>
 /// <param name="array">
 /// The one-dimensional <c>ActorsTransaction[]</c> that is the destination of the elements 
 /// copied from <see cref="ICollection"/>.
 /// The <c>ActorsTransaction[]</c> must have zero-based indexing. 
 /// </param>
 /// <param name="index">
 /// The zero-based index in array at which copying begins.
 /// </param>
 /// <remarks>
 /// Provides the strongly typed member for <see cref="ICollection"/>.
 /// </remarks>
 public void CopyTo(ActorsTransaction[] array, int index)
 {
     ((ICollection)this).CopyTo(array, index);
 }
Example #15
0
        public virtual void AssociationReleasedEventHandler(DicomThread dicomThread)
        {
            DicomTransaction transaction = new DicomTransaction(TransactionNameEnum.RAD_10, TransactionDirectionEnum.TransactionReceived);

            foreach (DicomMessage dicomMessage in dicomThread.DataWarehouse.Messages(dicomThread).DicomMessages)
            {
                transaction.DicomMessages.Add(dicomMessage);
            }

            // publish the transaction event to any interested parties
            PublishEvent(ActorName, transaction);

            // get the next transaction number - needed to sort the
            // transactions correctly
            int transactionNumber = TransactionNumber.GetNextTransactionNumber();

            // save the transaction
            ActorsTransaction actorsTransaction = new ActorsTransaction(transactionNumber,
                                                                        ParentActor.ActorName,
                                                                        ActorName,
                                                                        transaction,
                                                                        dicomThread.ResultsFileName,
                                                                        dicomThread.NrOfErrors,
                                                                        dicomThread.NrOfWarnings);
            ParentActor.ActorsTransactionLog.Add(actorsTransaction);

            dicomThread.DataWarehouse.ClearMessages(dicomThread);
        }