Ejemplo n.º 1
0
        public static ValidationResult CreateResult(ValidationLevels level, string messageFormat, params object[] args)
        {
            ValidationResult newResult = new ValidationResult()
            {
                Level   = level,
                Message = string.Format(messageFormat, args)
            };

            return(newResult);
        }
        public static TemplateValidationResult CreateResult(int?number, ValidationLevels level, string messageFormat, params object[] args)
        {
            TemplateValidationResult newResult = new TemplateValidationResult()
            {
                ConstraintNumber = number,
                Level            = level,
                Message          = string.Format(messageFormat, args)
            };

            return(newResult);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Validates the specified <see cref="StudyStorageLocation"/>.
        /// </summary>
        /// <param name="storageLocation">The study to be validated</param>
        /// <param name="validationLevels">Set to </param>
        public void Validate(StudyStorageLocation storageLocation, ValidationLevels validationLevels)
        {
            StudyXml        studyXml  = storageLocation.LoadStudyXml();
            Study           study     = storageLocation.Study;
            ServerPartition partition = storageLocation.ServerPartition;

            if ((validationLevels & ValidationLevels.Study) == ValidationLevels.Study)
            {
                DoStudyLevelValidation(storageLocation, studyXml, study, partition);
            }

            if ((validationLevels & ValidationLevels.Series) == ValidationLevels.Series)
            {
                DoSeriesLevelValidation(storageLocation, studyXml, study);
            }
        }
        /// <summary>
        /// Validates the specified <see cref="StudyStorageLocation"/>.
        /// </summary>
        /// <param name="storageLocation">The study to be validated</param>
        /// <param name="validationLevels">Set to </param>
        public void Validate(StudyStorageLocation storageLocation, ValidationLevels validationLevels)
        {
            StudyXml studyXml = storageLocation.LoadStudyXml();
            Study study = storageLocation.Study;
            ServerPartition partition = storageLocation.ServerPartition;

            if ((validationLevels & ValidationLevels.Study) == ValidationLevels.Study)
            {
                DoStudyLevelValidation(storageLocation, studyXml, study, partition);
            }

            if ( (validationLevels & ValidationLevels.Series) == ValidationLevels.Series)
            {
                DoSeriesLevelValidation(storageLocation, studyXml, study);
            }

        }
 public static TemplateValidationResult CreateResult(ValidationLevels level, string message)
 {
     return(CreateResult(null, level, message));
 }
Ejemplo n.º 6
0
        public static ValidationResult CreateResult(int templateId, string templateName, int number, ValidationLevels level, string messageFormat, params object[] args)
        {
            ValidationResult newResult = new ValidationResult()
            {
                TemplateId       = templateId,
                TemplateName     = templateName,
                ConstraintNumber = number,
                Level            = level,
                Message          = string.Format(messageFormat, args)
            };

            return(newResult);
        }