Class ParameterSignature
- Namespace
- Cuemon.Reflection
- Assembly
- Cuemon.Core.dll
Represent the signature of a parameter to a method, property or similar.
public sealed class ParameterSignature
- Inheritance
-
ParameterSignature
Constructors
ParameterSignature(Type, String)
Initializes a new instance of the ParameterSignature class.
public ParameterSignature(Type parameterType, string parameterName)
Parameters
Exceptions
- ArgumentNullException
parameterType
is null or
parameterName
is null.
Properties
ParameterName
Gets the name of the parameter.
public string ParameterName { get; }
Property Value
- String
The name of the parameter.
ParameterType
Gets the Type of the parameter.
public Type ParameterType { get; }
Property Value
Methods
Parse(IEnumerable<ParameterInfo>)
Converts the specified ParameterInfo sequence to its IEnumerable<T> equivalent.
public static IEnumerable<ParameterSignature> Parse(IEnumerable<ParameterInfo> parameters)
Parameters
parameters
IEnumerable<ParameterInfo>A sequence of ParameterInfo.
Returns
- IEnumerable<ParameterSignature>
An IEnumerable<T> that is equivalent to the ParameterInfo sequence.
Exceptions
- ArgumentNullException
parameters
is null.
Parse(MethodBase)
Extracts and converts the ParameterInfo sequence to its IEnumerable<T> equivalent from GetParameters().
public static IEnumerable<ParameterSignature> Parse(MethodBase method)
Parameters
method
MethodBaseThe MethodBase to extract parameter information from.
Returns
- IEnumerable<ParameterSignature>
An IEnumerable<T> that is equivalent to the ParameterInfo sequence in GetParameters().
Exceptions
- ArgumentNullException
method
is null.