Exemple #1
0
        public override bool IsValid(object o, ref ReasonList reasons, params object[] additionalArgs)
        {
            base.IsValid(o, ref reasons, additionalArgs);

            if (!(o is string))
            {
                throw new ArgumentException("CERootPathValidationRule was called without using a string.");
            }



            ResetRequiredFolders();

            m_sPathToCheck = o as string;

            var pathValidationRule = new CEPathValidationRule(true, true);

            pathValidationRule.IsValid(m_sPathToCheck, ref m_reasons);


            // If the path itself is faulty we cannot check the contents
            if (!m_reasons.ContainsError)
            {
                CheckFolders();
            }

            reasons = m_reasons;
            return(!m_reasons.ContainsError);
        }
 public CEGameValidationRule()
 {
     m_rootPathValidationRule = new CERootPathValidationRule();
     m_pathValidationRule     = new CEPathValidationRule(false);
 }