示例#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
 /// <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.");
     }
 }