Example #1
0
        /// <summary>
        /// 属性筛选器
        /// </summary>
        /// <param name="parameterDescriptor"></param>
        /// <returns></returns>
        internal static Predicate <string> GetPropertyFilter(ParameterDescriptor parameterDescriptor)
        {
            ParameterBindingInfo bindingInfo = parameterDescriptor.BindingInfo;

            return((string propertyName) => BindAttribute.IsPropertyAllowed(propertyName, bindingInfo.Include.ToArray <string>(), bindingInfo.Exclude.ToArray <string>()));
        }
Example #2
0
 public bool IsPropertyAllowed(string propertyName)
 {
     return(BindAttribute.IsPropertyAllowed(propertyName, this._includeSplit, this._excludeSplit));
 }