Table of Contents

Class ParameterWrapper

Namespace
NUnit.Framework.Internal
Assembly
nunit.framework.dll

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 IMethodInfo
parameterInfo ParameterInfo

Properties

IsOptional

Gets a value indicating whether the parameter is optional

public bool IsOptional { get; }

Property Value

bool

Method

Gets an IMethodInfo representing the method for which this is a parameter.

public IMethodInfo Method { get; }

Property Value

IMethodInfo

ParameterInfo

Gets the underlying ParameterInfo

public ParameterInfo ParameterInfo { get; }

Property Value

ParameterInfo

ParameterType

Gets the Type of the parameter

public Type ParameterType { get; }

Property Value

Type

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

bool

Type Parameters

T