Class ParameterExtensions
- Namespace
- Cratis.Reflection
- Assembly
- Cratis.Fundamentals.dll
Provides a set of methods for working with ParameterInfo.
public static class ParameterExtensions
- Inheritance
-
ParameterExtensions
- Inherited Members
Methods
HasAttribute<T>(ParameterInfo)
Check if a parameter has an attribute associated with it.
public static bool HasAttribute<T>(this ParameterInfo parameter) where T : Attribute
Parameters
parameterParameterInfoParameterInfo to check.
Returns
- bool
True if there is an attribute, false if not.
Type Parameters
TAttribute type to check for.
IsNullable(ParameterInfo)
Check if a parameter is nullable.
public static bool IsNullable(this ParameterInfo parameter)
Parameters
parameterParameterInfoParameterInfo to check.
Returns
- bool
True if the parameter is nullable, false if not.