if (provider is ParameterInfo)
            {
                ParameterInfo p = (ParameterInfo)provider;
                return (attributeType != null) ? Attribute.GetCustomAttributes(p, attributeType, inherit) : Attribute.GetCustomAttributes(p, inherit);
            }