Show / Hide Table of Contents

Class Constructor<D>

Provides constructor definition based on delegate signature.

Inheritance
Object
Constructor<D>
Implements
IConstructor<D>
IMethod<ConstructorInfo, D>
IMember<ConstructorInfo, D>
IMember<ConstructorInfo>
ICustomAttributeProvider
IEquatable<ConstructorInfo>
Namespace: DotNext.Reflection
Assembly: DotNext.Reflection.dll
Syntax
public sealed class Constructor<D> : ConstructorInfo, IConstructor<D>, IMethod<ConstructorInfo, D>, IMember<ConstructorInfo, D>, IMember<ConstructorInfo>, ICustomAttributeProvider, IEquatable<ConstructorInfo> where D : MulticastDelegate
Type Parameters
Name Description
D

Type of delegate representing constructor of type D.

Properties

| Improve this Doc View Source

Attributes

Gets the attributes associated with this constructor.

Declaration
public override MethodAttributes Attributes { get; }
Property Value
Type Description
MethodAttributes
| Improve this Doc View Source

CallingConvention

Gets a value indicating the calling conventions for this constructor.

Declaration
public override CallingConventions CallingConvention { get; }
Property Value
Type Description
CallingConventions
| Improve this Doc View Source

ContainsGenericParameters

Gets a value indicating whether the generic method contains unassigned generic type parameters.

Declaration
public override bool ContainsGenericParameters { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

CustomAttributes

Gets a collection that contains this member's custom attributes.

Declaration
public override IEnumerable<CustomAttributeData> CustomAttributes { get; }
Property Value
Type Description
IEnumerable<CustomAttributeData>
| Improve this Doc View Source

DeclaringType

Gets the class that declares this constructor.

Declaration
public override Type DeclaringType { get; }
Property Value
Type Description
DotNext.Reflection.Type
| Improve this Doc View Source

IsGenericMethod

Gets a value indicating whether the constructor is generic.

Declaration
public override bool IsGenericMethod { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

IsGenericMethodDefinition

Gets a value indicating whether the constructor is a generic method definition.

Declaration
public override bool IsGenericMethodDefinition { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

IsSecurityCritical

Gets a value that indicates whether the constructor is security-critical or security-safe-critical at the current trust level, and therefore can perform critical operations.

Declaration
public override bool IsSecurityCritical { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

IsSecuritySafeCritical

Gets a value that indicates whether the constructor is security-safe-critical at the current trust level; that is, whether it can perform critical operations and can be accessed by transparent code.

Declaration
public override bool IsSecuritySafeCritical { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

IsSecurityTransparent

Gets a value that indicates whether the current constructor is transparent at the current trust level, and therefore cannot perform critical operations.

Declaration
public override bool IsSecurityTransparent { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

MemberType

Always returns .

Declaration
public override MemberTypes MemberType { get; }
Property Value
Type Description
MemberTypes
| Improve this Doc View Source

MetadataToken

Gets a value that identifies a metadata element.

Declaration
public override int MetadataToken { get; }
Property Value
Type Description
Int32
| Improve this Doc View Source

MethodHandle

Gets a handle to the internal metadata representation of a constructor.

Declaration
public override RuntimeMethodHandle MethodHandle { get; }
Property Value
Type Description
RuntimeMethodHandle
| Improve this Doc View Source

MethodImplementationFlags

Gets constructor implementation attributes.

Declaration
public override MethodImplAttributes MethodImplementationFlags { get; }
Property Value
Type Description
MethodImplAttributes
| Improve this Doc View Source

Module

Gets the module in which the type that declares the constructor represented by the current instance is defined.

Declaration
public override Module Module { get; }
Property Value
Type Description
Module
| Improve this Doc View Source

Name

Gets name of the constructor.

Declaration
public override string Name { get; }
Property Value
Type Description
String
| Improve this Doc View Source

ReflectedType

Gets the class object that was used to obtain this instance.

Declaration
public override Type ReflectedType { get; }
Property Value
Type Description
DotNext.Reflection.Type

Methods

| Improve this Doc View Source

Equals(ConstructorInfo)

Determines whether this constructor is equal to the given constructor.

Declaration
public bool Equals(ConstructorInfo other)
Parameters
Type Name Description
ConstructorInfo other

Other constructor to compare.

Returns
Type Description
Boolean

true if this object reflects the same constructor as the specified object; otherwise, false.

| Improve this Doc View Source

Equals(Object)

Determines whether this constructor is equal to the given constructor.

Declaration
public override bool Equals(object other)
Parameters
Type Name Description
Object other

Other constructor to compare.

Returns
Type Description
Boolean

true if this object reflects the same constructor as the specified object; otherwise, false.

| Improve this Doc View Source

GetCustomAttributes(Type, Boolean)

Returns an array of all custom attributes applied to this constructor.

Declaration
public override object[] GetCustomAttributes(Type attributeType, bool inherit)
Parameters
Type Name Description
DotNext.Reflection.Type attributeType

The type of attribute to search for. Only attributes that are assignable to this type are returned.

Boolean inherit

true to search this member's inheritance chain to find the attributes; otherwise, false.

Returns
Type Description
Object[]

An array that contains all the custom attributes applied to this constructor.

| Improve this Doc View Source

GetCustomAttributes(Boolean)

Returns an array of all custom attributes applied to this constructor.

Declaration
public override object[] GetCustomAttributes(bool inherit)
Parameters
Type Name Description
Boolean inherit

true to search this member's inheritance chain to find the attributes; otherwise, false.

Returns
Type Description
Object[]

An array that contains all the custom attributes applied to this constructor.

| Improve this Doc View Source

GetCustomAttributesData()

Returns a list of custom attributes that have been applied to the target constructor.

Declaration
public override IList<CustomAttributeData> GetCustomAttributesData()
Returns
Type Description
IList<CustomAttributeData>

The data about the attributes that have been applied to the target constructor.

| Improve this Doc View Source

GetGenericArguments()

Returns the type arguments of a generic method or the type parameters of a generic method definition.

Declaration
public override Type[] GetGenericArguments()
Returns
Type Description
DotNext.Reflection.Type[]

The list of generic arguments.

| Improve this Doc View Source

GetHashCode()

Computes hash code uniquely identifies the reflected constructor.

Declaration
public override int GetHashCode()
Returns
Type Description
Int32

The hash code of the constructor.

| Improve this Doc View Source

GetMethodBody()

Provides access to the MSIL stream, local variables, and exceptions for the current constructor.

Declaration
public override MethodBody GetMethodBody()
Returns
Type Description
MethodBody

An object that provides access to the MSIL stream, local variables, and exceptions for the current constructor.

| Improve this Doc View Source

GetMethodImplementationFlags()

Gets constructor implementation attributes.

Declaration
public override MethodImplAttributes GetMethodImplementationFlags()
Returns
Type Description
MethodImplAttributes

Implementation attributes.

| Improve this Doc View Source

GetParameters()

Gets constructor parameters.

Declaration
public override ParameterInfo[] GetParameters()
Returns
Type Description
ParameterInfo[]

The array of constructor parameters.

| Improve this Doc View Source

Invoke(BindingFlags, Binder, Object[], CultureInfo)

Invokes this constructor.

Declaration
public override object Invoke(BindingFlags invokeAttr, Binder binder, object[] parameters, CultureInfo culture)
Parameters
Type Name Description
BindingFlags invokeAttr

Specifies the type of binding.

Binder binder

Defines a set of properties and enables the binding, coercion of argument types, and invocation of members using reflection.

Object[] parameters

A list of constructor arguments.

CultureInfo culture

Used to govern the coercion of types.

Returns
Type Description
Object

Instantiated object.

| Improve this Doc View Source

Invoke(Object, BindingFlags, Binder, Object[], CultureInfo)

Invokes this constructor.

Declaration
public override object Invoke(object obj, BindingFlags invokeAttr, Binder binder, object[] parameters, CultureInfo culture)
Parameters
Type Name Description
Object obj

The object on which to invoke the constructor.

BindingFlags invokeAttr

Specifies the type of binding.

Binder binder

Defines a set of properties and enables the binding, coercion of argument types, and invocation of members using reflection

Object[] parameters

A list of constructor arguments.

CultureInfo culture

Used to govern the coercion of types.

Returns
Type Description
Object

Instantiated object.

| Improve this Doc View Source

IsDefined(Type, Boolean)

Determines whether one or more attributes of the specified type or of its derived types is applied to this constructor.

Declaration
public override bool IsDefined(Type attributeType, bool inherit)
Parameters
Type Name Description
DotNext.Reflection.Type attributeType

The type of custom attribute to search for. The search includes derived types.

Boolean inherit

true to search this member's inheritance chain to find the attributes; otherwise, false.

Returns
Type Description
Boolean

true if one or more instances of attributeType or any of its derived types is applied to this constructor; otherwise, false.

| Improve this Doc View Source

ToString()

Returns textual representation of this constructor.

Declaration
public override string ToString()
Returns
Type Description
String

The textual representation of this constructor.

Operators

| Improve this Doc View Source

Implicit(Constructor<D> to D)

Extracts delegate which can be used to invoke this constructor.

Declaration
public static implicit operator D(Constructor<D> ctor)
Parameters
Type Name Description
Constructor<D> ctor

The reflected constructor.

Returns
Type Description
D

Explicit Interface Implementations

| Improve this Doc View Source

IMember<ConstructorInfo, D>.Invoker

Declaration
D IMember<ConstructorInfo, D>.Invoker { get; }
Returns
Type Description
D
| Improve this Doc View Source

IMember<ConstructorInfo>.RuntimeMember

Declaration
ConstructorInfo IMember<ConstructorInfo>.RuntimeMember { get; }
Returns
Type Description
ConstructorInfo

Implements

IConstructor<D>
IMethod<M, D>
IMember<M, D>
IMember<M>
ICustomAttributeProvider
IEquatable<>

Extension Methods

AsyncLockAcquisition.AcquireLockAsync<T>(T, TimeSpan)
AsyncLockAcquisition.AcquireLockAsync<T>(T, CancellationToken)
AsyncLockAcquisition.AcquireReadLockAsync<T>(T, TimeSpan)
AsyncLockAcquisition.AcquireReadLockAsync<T>(T, CancellationToken)
AsyncLockAcquisition.AcquireWriteLockAsync<T>(T, TimeSpan)
AsyncLockAcquisition.AcquireWriteLockAsync<T>(T, CancellationToken)
AsyncLockAcquisition.AcquireUpgradeableReadLockAsync<T>(T, TimeSpan)
AsyncLockAcquisition.AcquireUpgradeableReadLockAsync<T>(T, CancellationToken)
ExpressionBuilder.Const<T>(T)
ObjectExtensions.GetUserData<T>(T)
ObjectExtensions.IsOneOf<T>(T, IEnumerable<T>)
ObjectExtensions.IsOneOf<T>(T, T[])
ObjectExtensions.Decompose<T, R1, R2>(T, Func<T, R1>, Func<T, R2>, out R1, out R2)
ObjectExtensions.Decompose<T, R1, R2>(T, ValueFunc<T, R1>, ValueFunc<T, R2>, out R1, out R2)
ObjectExtensions.Decompose<T, R1, R2>(T, Func<T, R1>, Func<T, R2>)
ObjectExtensions.Decompose<T, R1, R2>(T, ValueFunc<T, R1>, ValueFunc<T, R2>)
LockAcquisition.AcquireReadLock<T>(T)
LockAcquisition.AcquireReadLock<T>(T, TimeSpan)
LockAcquisition.AcquireWriteLock<T>(T)
LockAcquisition.AcquireWriteLock<T>(T, TimeSpan)
LockAcquisition.AcquireUpgradeableReadLock<T>(T)
LockAcquisition.AcquireUpgradeableReadLock<T>(T, TimeSpan)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX