예제 #1
0
        /// <inheritdoc cref="IVerifiable.Verify"/>
        public bool Verify
        (
            bool throwOnError
        )
        {
            bool result = Statements.Count != 0;

            if (result)
            {
                result = Statements.All
                         (
                    item => item.Verify(throwOnError)
                         );
            }

            if (result &&
                Parameters.Count != 0)
            {
                result = Parameters.All
                         (
                    parameter => parameter.Verify(throwOnError)
                         );
            }

            if (!result)
            {
                Log.Error
                (
                    "GblFile::Verify: "
                    + "verification error"
                );

                if (throwOnError)
                {
                    throw new VerificationException();
                }
            }

            return(result);
        }