/// <summary> /// Constructor with initialization. Shallow copy. /// </summary> /// <param name="arrayOfValues">values to copy.</param> public DulMessageCollection(DulMessage[] arrayOfValues) { if (arrayOfValues == null) { throw new ArgumentNullException(); } foreach (DulMessage value in arrayOfValues) { this.Add(value); } }
/// <summary> /// Determines the index of a specific item in the <see cref="System.Collections.IList"/>. /// </summary> /// <param name="value">The item to locate in the <see cref="System.Collections.IList"/>.</param> /// <returns>The index of <c>value</c> if found in the list; otherwise, -1.</returns> public int IndexOf(DulMessage value) { return base.IndexOf(value); }
/// <summary> /// Determines whether the <see cref="System.Collections.IList"/> contains a specific item. /// </summary> /// <param name="value">The item to locate in the <see cref="System.Collections.IList"/>.</param> /// <returns><see langword="true"/> if the item is found in the <see cref="System.Collections.IList"/>; otherwise, <see langword="false"/>.</returns> public bool Contains(DulMessage value) { return base.Contains(value); }
// // - Methods - // /// <summary> /// Adds an item to the <see cref="System.Collections.IList"/>. /// </summary> /// <param name="value">The item to add to the <see cref="System.Collections.IList"/>. </param> /// <returns>The position into which the new element was inserted.</returns> public int Add(DulMessage value) { return base.Add(value); }
/// <summary> /// Inserts an item to the IList at the specified position. /// </summary> /// <param name="index">The zero-based index at which <c>value</c> should be inserted. </param> /// <param name="value">The item to insert into the <see cref="System.Collections.IList"/>.</param> public void Insert(int index, DulMessage value) { base.Insert(index, value); }
/// <summary> /// Removes the first occurrence of a specific item from the IList. /// </summary> /// <param name="value">The item to remove from the <see cref="System.Collections.IList"/>.</param> public void Remove(DulMessage value) { base.Remove(value); }
/// <summary> /// Validate the Dul Message by inspecting the VR's and the definition. /// </summary> /// <param name="dulMessage">The Dul Message.</param> public void Validate(DulMessage dulMessage) { this.validator.Validate(this, dulMessage); }
/// <summary> /// This method is indirectly called by a MessageIterator to let this object try /// to handle the received DulMessage. /// </summary> /// <param name="dulMessage">The received DulMessage.</param> /// <returns>Returns true if this object has handled the DulMessage, otherwise false.</returns> private bool HandleDulMessage(DulMessage dulMessage) { bool handled = false; if (dulMessage is Abort) { handled = HandleAbort(dulMessage as Abort); } else if (dulMessage is AssociateAc) { handled = HandleAssociateAccept(dulMessage as AssociateAc); } else if (dulMessage is AssociateRj) { handled = HandleAssociateReject(dulMessage as AssociateRj); } else if (dulMessage is AssociateRq) { handled = HandleAssociateRequest(dulMessage as AssociateRq); } else if (dulMessage is ReleaseRp) { handled = HandleReleaseResponse(dulMessage as ReleaseRp); } else if (dulMessage is ReleaseRq) { handled = HandleReleaseRequest(dulMessage as ReleaseRq); } else { Debug.Assert(true, "Not implemented yet."); } return(handled); }
/// <summary> /// Determines the index of a specific item in the <see cref="System.Collections.IList"/>. /// </summary> /// <param name="value">The item to locate in the <see cref="System.Collections.IList"/>.</param> /// <returns>The index of <c>value</c> if found in the list; otherwise, -1.</returns> public int IndexOf(DulMessage value) { return(base.IndexOf(value)); }
/// <summary> /// Validate the Dul Message by inspecting the VR's and the definition. /// </summary> /// <param name="dulMessage">The Dul Message.</param> public void Validate(DicomThread dicomThread, DulMessage dulMessage) { this.thread.WriteInformationInternal("Validate Dul message..."); if (!dulMessage.AreValueRepresentationsValidated) { dicomThread.DvtkScriptSession.Validate(dulMessage.DvtkDataDulMessage, null, Dvtk.Sessions.ValidationControlFlags.UseValueRepresentations); dulMessage.AreValueRepresentationsValidated = true; } else { dicomThread.WriteInformationInternal("VR's of DulMessage will not be validated again.\r\nNo validation performed."); } }
/// <summary> /// Determines whether the <see cref="System.Collections.IList"/> contains a specific item. /// </summary> /// <param name="value">The item to locate in the <see cref="System.Collections.IList"/>.</param> /// <returns><see langword="true"/> if the item is found in the <see cref="System.Collections.IList"/>; otherwise, <see langword="false"/>.</returns> public bool Contains(DulMessage value) { return(base.Contains(value)); }
// // - Methods - // /// <summary> /// Adds an item to the <see cref="System.Collections.IList"/>. /// </summary> /// <param name="value">The item to add to the <see cref="System.Collections.IList"/>. </param> /// <returns>The position into which the new element was inserted.</returns> public int Add(DulMessage value) { return(base.Add(value)); }
/// <summary> /// This method is called after a DulMessage has been received but before it /// (possibly) will be handled by the (zero or more) MessageHandler objects that /// are attached to this object. /// </summary> /// <param name="dulMessage">The received DulMessage.</param> private void BeforeHandlingDulMessage(DulMessage dulMessage) { if (dulMessage is Abort) { BeforeHandlingAbort(dulMessage as Abort); } else if (dulMessage is AssociateAc) { BeforeHandlingAssociateAccept(dulMessage as AssociateAc); } else if (dulMessage is AssociateRj) { BeforeHandlingAssociateReject(dulMessage as AssociateRj); } else if (dulMessage is AssociateRq) { BeforeHandlingAssociateRequest(dulMessage as AssociateRq); } else if (dulMessage is ReleaseRq) { BeforeHandlingReleaseRequest(dulMessage as ReleaseRq); } else if (dulMessage is ReleaseRp) { BeforeHandlingReleaseResponse(dulMessage as ReleaseRp); } else { Debug.Assert(true, "Not implemented yet."); } }