/// <summary> /// 验证特征的有效性 /// </summary> /// <returns></returns> /// <exception cref="ArgumentException">参数异常</exception> public override bool IsValidate() { base.IsValidate(); //判断传参的名称和类型是否都存在 if (string.IsNullOrEmpty(this.Name) || this.ParaType == null) { throw new ArgumentNullException("parameter name or type is null"); } this.Value = base.CurHttpRequest.WebParameters[this.Name] == null ? "" : base.CurHttpRequest.WebParameters[this.Name]; CheckDataContext dataContext = new CheckDataContext(this); return(dataContext.CheckData()); }
/// <summary> /// 验证特征的有效性 /// </summary> /// <returns></returns> /// <exception cref="ArgumentException">参数异常</exception> public override bool IsValidate() { base.IsValidate(); //判断传参的名称和类型是否都存在 if (string.IsNullOrEmpty(this.Name) || this.ParaType==null) { throw new ArgumentNullException("parameter name or type is null"); } this.Value = base.CurHttpRequest.WebParameters[this.Name] == null ? "" : base.CurHttpRequest.WebParameters[this.Name]; CheckDataContext dataContext=new CheckDataContext(this); return dataContext.CheckData(); }