예제 #1
0
        /// <summary>
        /// Validates the attached singular action data for creation.
        /// </summary>
        /// <returns>
        /// Boolean false if validation failed, true if validation succeeded.
        /// </returns>
        public bool Validate()
        {
            if (ActionData == null)
            {
                SetRules(new List <ValidationRule> {
                    new ValidationRule("Data", "Data_Null")
                });
                ActionStatus.Status = ActionStatusEnum.ValidationError;
                return(false);
            }

            return(SetRules(ActionData.GetBrokenRules()));
        }