Class ParameterWrapper
The ParameterWrapper class wraps a ParameterInfo so that it may be used in a platform-independent manner.
public class ParameterWrapper : IParameterInfo, IReflectionInfo
- Inheritance
-
ParameterWrapper
- Implements
- Inherited Members
Constructors
ParameterWrapper(IMethodInfo, ParameterInfo)
Construct a ParameterWrapper for a given method and parameter
public ParameterWrapper(IMethodInfo method, ParameterInfo parameterInfo)
Parameters
method
IMethodInfoparameterInfo
ParameterInfo
Properties
IsOptional
Gets a value indicating whether the parameter is optional
public bool IsOptional { get; }
Property Value
Method
Gets an IMethodInfo representing the method for which this is a parameter.
public IMethodInfo Method { get; }
Property Value
ParameterInfo
Gets the underlying ParameterInfo
public ParameterInfo ParameterInfo { get; }
Property Value
ParameterType
Gets the Type of the parameter
public Type ParameterType { get; }
Property Value
Methods
GetCustomAttributes<T>(bool)
Returns an array of custom attributes of the specified type applied to this method
public T[] GetCustomAttributes<T>(bool inherit) where T : class
Parameters
inherit
bool
Returns
- T[]
Type Parameters
T
IsDefined<T>(bool)
Gets a value indicating whether one or more attributes of the specified type are defined on the parameter.
public bool IsDefined<T>(bool inherit) where T : class
Parameters
inherit
bool
Returns
Type Parameters
T