EventDescriptor Constructors

Definition

Initializes a new instance of the EventDescriptor class.

Overloads

EventDescriptor(MemberDescriptor)

Initializes a new instance of the EventDescriptor class with the name and attributes in the specified MemberDescriptor.

EventDescriptor(MemberDescriptor, Attribute[])

Initializes a new instance of the EventDescriptor class with the name in the specified MemberDescriptor and the attributes in both the MemberDescriptor and the Attribute array.

EventDescriptor(String, Attribute[])

Initializes a new instance of the EventDescriptor class with the specified name and attribute array.

EventDescriptor(MemberDescriptor)

Source:
EventDescriptor.cs
Source:
EventDescriptor.cs
Source:
EventDescriptor.cs

Initializes a new instance of the EventDescriptor class with the name and attributes in the specified MemberDescriptor.

C#
protected EventDescriptor(System.ComponentModel.MemberDescriptor descr);

Parameters

descr
MemberDescriptor

A MemberDescriptor that contains the name of the event and its attributes.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

EventDescriptor(MemberDescriptor, Attribute[])

Source:
EventDescriptor.cs
Source:
EventDescriptor.cs
Source:
EventDescriptor.cs

Initializes a new instance of the EventDescriptor class with the name in the specified MemberDescriptor and the attributes in both the MemberDescriptor and the Attribute array.

C#
protected EventDescriptor(System.ComponentModel.MemberDescriptor descr, Attribute[]? attrs);
C#
protected EventDescriptor(System.ComponentModel.MemberDescriptor descr, Attribute[] attrs);

Parameters

descr
MemberDescriptor

A MemberDescriptor that has the name of the member and its attributes.

attrs
Attribute[]

An Attribute array with the attributes you want to add to this event description.

Remarks

This constructor appends the attributes in the Attribute array to the attributes in the MemberDescriptor.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

EventDescriptor(String, Attribute[])

Source:
EventDescriptor.cs
Source:
EventDescriptor.cs
Source:
EventDescriptor.cs

Initializes a new instance of the EventDescriptor class with the specified name and attribute array.

C#
protected EventDescriptor(string name, Attribute[]? attrs);
C#
protected EventDescriptor(string name, Attribute[] attrs);

Parameters

name
String

The name of the event.

attrs
Attribute[]

An array of type Attribute that contains the event attributes.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1