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
-
ObjectParameterSignature
Constructors
ParameterSignature(Type, String)
Initializes a new instance of the ParameterSignature class.
public ParameterSignature(Type parameterType, string parameterName)
Parameters
parameterType
TypeThe type of the parameter.
parameterName
StringThe name of the parameter.
Exceptions
- System.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 System.Type of the parameter.
public Type ParameterType { get; }
Property Value
- Type
The System.Type of the parameter.
Methods
Parse(IEnumerable<ParameterInfo>)
Converts the specified System.Reflection.ParameterInfo sequence to its System.Collections.Generic.IEnumerable<T> equivalent.
public static IEnumerable<ParameterSignature> Parse(IEnumerable<ParameterInfo> parameters)
Parameters
parameters
IEnumerable<ParameterInfo>A sequence of System.Reflection.ParameterInfo.
Returns
- IEnumerable<ParameterSignature>
An System.Collections.Generic.IEnumerable<T> that is equivalent to the System.Reflection.ParameterInfo sequence.
Exceptions
- System.ArgumentNullException
parameters
is null.
Parse(MethodBase)
Extracts and converts the System.Reflection.ParameterInfo sequence to its System.Collections.Generic.IEnumerable<T> equivalent from System.Reflection.MethodBase.GetParameters.
public static IEnumerable<ParameterSignature> Parse(MethodBase method)
Parameters
method
MethodBaseThe System.Reflection.MethodBase to extract parameter information from.
Returns
- IEnumerable<ParameterSignature>
An System.Collections.Generic.IEnumerable<T> that is equivalent to the System.Reflection.ParameterInfo sequence in System.Reflection.MethodBase.GetParameters.
Exceptions
- System.ArgumentNullException
method
is null.