ClearCanvas.ImageViewer.StudyManagement.Sop.Validate C# (CSharp) Method

Validate() public method

The Sop class (and derived classes) should not validate tag values from within its properties, but instead clients should call this method at an appropriate time to determine whether or not the Sop should be used or discarded as invalid.
Thrown when validation fails.
public Validate ( ) : void
return void
		public void Validate()
		{
			try
			{
				ValidateInternal();
			}
			catch (SopValidationException)
			{
				throw;
			}
			catch (Exception e)
			{
				throw new SopValidationException("Sop validation failed.", e);
			}
		}

Usage Example

Ejemplo n.º 1
0
        /// <summary>
        /// Adds a <see cref="Sop"/> to the <see cref="StudyTree"/>.
        /// </summary>
        public bool AddSop(Sop sop)
        {
            Platform.CheckForNullReference(sop, "sop");

            if (!this.SopValidationDisabled)
            {
                sop.Validate();
            }

            if (_sops.ContainsKey(sop.SopInstanceUid))
            {
                sop.Dispose();
                return(false);
            }

            AddPatient(sop);
            AddStudy(sop);
            AddSeries(sop);
            _sops[sop.SopInstanceUid] = sop;

            return(true);
        }
All Usage Examples Of ClearCanvas.ImageViewer.StudyManagement.Sop::Validate