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); }
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); }
/// <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)); }
/// <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); }
/// <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); }
/// <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)); }
/// <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)); }
/// <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)); }
/// <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)); }
/// <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)); }
/// <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); }