예제 #1
0
        /// <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);
            }
        }
예제 #2
0
 /// <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);
 }
예제 #3
0
 /// <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);
 }
예제 #4
0
 //
 // - 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);
 }
예제 #5
0
 /// <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);
 }
예제 #6
0
 /// <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);
 }
예제 #7
0
파일: DicomThread.cs 프로젝트: ewcasas/DVTK
 /// <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);
 }
예제 #8
0
        /// <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);
        }
예제 #9
0
 /// <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));
 }
예제 #10
0
파일: Validator.cs 프로젝트: ewcasas/DVTK
        /// <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.");
            }
        }
예제 #11
0
 /// <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));
 }
예제 #12
0
        //
        // - 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));
        }
예제 #13
0
 /// <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);
 }
예제 #14
0
 /// <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);
 }
예제 #15
0
 /// <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.");
     }
 }