Пример #1
0
 /// <summary>
 /// 参数校验
 /// </summary>
 /// <param name="message"></param>
 /// <returns></returns>
 public override bool Validate(out string message)
 {
     if (_argument == null)
     {
         message = "参数不能为空";
         return(false);
     }
     return(_argument.Validate(out message));
 }
Пример #2
0
        /// <summary>
        ///     参数校验
        /// </summary>
        /// <param name="message"></param>
        /// <returns></returns>
        public override bool Validate(out string message)
        {
            if (_argument != null)
            {
                return(_argument.Validate(out message));
            }
            if (Access.HasFlag(ApiAccessOption.ArgumentCanNil))
            {
                message = null;
                return(true);
            }

            message = "参数不能为空";
            return(false);
        }