Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
300 lines (290 sloc) 15.8 KB
<Type Name="EventHandlerList" FullName="System.ComponentModel.EventHandlerList">
<TypeSignature Language="C#" Value="public sealed class EventHandlerList : IDisposable" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit EventHandlerList extends System.Object implements class System.IDisposable" />
<TypeSignature Language="DocId" Value="T:System.ComponentModel.EventHandlerList" />
<TypeSignature Language="VB.NET" Value="Public NotInheritable Class EventHandlerList&#xA;Implements IDisposable" />
<TypeSignature Language="C++ CLI" Value="public ref class EventHandlerList sealed : IDisposable" />
<TypeSignature Language="F#" Value="type EventHandlerList = class&#xA; interface IDisposable" />
<AssemblyInfo>
<AssemblyName>System.ComponentModel.Primitives</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.IDisposable</InterfaceName>
</Interface>
</Interfaces>
<Docs>
<summary>Provides a simple list of delegates. This class cannot be inherited.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This class uses a linear search algorithm to find entries in the list of delegates. A linear search algorithm is inefficient when working with a large number of entries. Therefore, when you have a large list, finding entries is slow.
## Examples
For an example of using an <xref:System.ComponentModel.EventHandlerList>, see [How to: Handle Multiple Events Using Event Properties](~/docs/standard/events/how-to-handle-multiple-events-using-event-properties.md).
]]></format>
</remarks>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public EventHandlerList ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.ComponentModel.EventHandlerList.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; EventHandlerList();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.Primitives</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.ComponentModel.EventHandlerList" /> class.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="AddHandler">
<MemberSignature Language="C#" Value="public void AddHandler (object key, Delegate value);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void AddHandler(object key, class System.Delegate value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.ComponentModel.EventHandlerList.AddHandler(System.Object,System.Delegate)" />
<MemberSignature Language="VB.NET" Value="Public Sub AddHandler (key As Object, value As Delegate)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void AddHandler(System::Object ^ key, Delegate ^ value);" />
<MemberSignature Language="F#" Value="member this.AddHandler : obj * Delegate -&gt; unit" Usage="eventHandlerList.AddHandler (key, value)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.Primitives</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="key" Type="System.Object" />
<Parameter Name="value" Type="System.Delegate" />
</Parameters>
<Docs>
<param name="key">The object that owns the event.</param>
<param name="value">The delegate to add to the list.</param>
<summary>Adds a delegate to the list.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="AddHandlers">
<MemberSignature Language="C#" Value="public void AddHandlers (System.ComponentModel.EventHandlerList listToAddFrom);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void AddHandlers(class System.ComponentModel.EventHandlerList listToAddFrom) cil managed" />
<MemberSignature Language="DocId" Value="M:System.ComponentModel.EventHandlerList.AddHandlers(System.ComponentModel.EventHandlerList)" />
<MemberSignature Language="VB.NET" Value="Public Sub AddHandlers (listToAddFrom As EventHandlerList)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void AddHandlers(System::ComponentModel::EventHandlerList ^ listToAddFrom);" />
<MemberSignature Language="F#" Value="member this.AddHandlers : System.ComponentModel.EventHandlerList -&gt; unit" Usage="eventHandlerList.AddHandlers listToAddFrom" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.Primitives</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="listToAddFrom" Type="System.ComponentModel.EventHandlerList" Index="0" FrameworkAlternate="netcore-1.0;netcore-1.1;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
</Parameters>
<Docs>
<param name="listToAddFrom">The list to add.</param>
<summary>Adds a list of delegates to the current list.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Dispose">
<MemberSignature Language="C#" Value="public void Dispose ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Dispose() cil managed" />
<MemberSignature Language="DocId" Value="M:System.ComponentModel.EventHandlerList.Dispose" />
<MemberSignature Language="VB.NET" Value="Public Sub Dispose ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void Dispose();" />
<MemberSignature Language="F#" Value="abstract member Dispose : unit -&gt; unit&#xA;override this.Dispose : unit -&gt; unit" Usage="eventHandlerList.Dispose " />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.IDisposable.Dispose</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.Primitives</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Disposes the delegate list.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Call <xref:System.ComponentModel.EventHandlerList.Dispose%2A> when you are finished using the <xref:System.ComponentModel.EventHandlerList>. The <xref:System.ComponentModel.EventHandlerList.Dispose%2A> method leaves the <xref:System.ComponentModel.EventHandlerList> in an unusable state. After calling <xref:System.ComponentModel.EventHandlerList.Dispose%2A>, you must release all references to the <xref:System.ComponentModel.EventHandlerList> so the memory it was occupying can be reclaimed by garbage collection.
> [!NOTE]
> Always call <xref:System.ComponentModel.EventHandlerList.Dispose%2A> before you release your last reference to the <xref:System.ComponentModel.EventHandlerList>. Otherwise, the resources the <xref:System.ComponentModel.EventHandlerList> is using will not be freed until garbage collection calls the <xref:System.ComponentModel.EventHandlerList> object's destructor.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Item">
<MemberSignature Language="C#" Value="public Delegate this[object key] { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Delegate Item(object)" />
<MemberSignature Language="DocId" Value="P:System.ComponentModel.EventHandlerList.Item(System.Object)" />
<MemberSignature Language="VB.NET" Value="Default Public Property Item(key As Object) As Delegate" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property Delegate ^ default[System::Object ^] { Delegate ^ get(System::Object ^ key); void set(System::Object ^ key, Delegate ^ value); };" />
<MemberSignature Language="F#" Value="member this.Item(obj) : Delegate with get, set" Usage="System.ComponentModel.EventHandlerList.Item" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.Primitives</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Delegate</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="key" Type="System.Object" />
</Parameters>
<Docs>
<param name="key">An object to find in the list.</param>
<summary>Gets or sets the delegate for the specified object.</summary>
<value>The delegate for the specified key, or <see langword="null" /> if a delegate does not exist.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When the key is not found in the list and you provide a delegate to set the value of the key, then the key is added to the top of the list and assigned to the delegate as its value.
]]></format>
</remarks>
<altmember cref="T:System.ComponentModel.EventHandlerList" />
</Docs>
</Member>
<Member MemberName="RemoveHandler">
<MemberSignature Language="C#" Value="public void RemoveHandler (object key, Delegate value);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void RemoveHandler(object key, class System.Delegate value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.ComponentModel.EventHandlerList.RemoveHandler(System.Object,System.Delegate)" />
<MemberSignature Language="VB.NET" Value="Public Sub RemoveHandler (key As Object, value As Delegate)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void RemoveHandler(System::Object ^ key, Delegate ^ value);" />
<MemberSignature Language="F#" Value="member this.RemoveHandler : obj * Delegate -&gt; unit" Usage="eventHandlerList.RemoveHandler (key, value)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.Primitives</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="key" Type="System.Object" />
<Parameter Name="value" Type="System.Delegate" />
</Parameters>
<Docs>
<param name="key">The object that owns the event.</param>
<param name="value">The delegate to remove from the list.</param>
<summary>Removes a delegate from the list.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.