EventPattern<TEventArgs> Class

Encapsulates sender and event arguments for a .NET event.

Inheritance Hierarchy

System.Object
  System.Reactive.EventPattern<TEventArgs>

Namespace:  System.Reactive
Assembly:  System.Reactive (in System.Reactive.dll)

Syntax

'Declaration
Public Class EventPattern(Of TEventArgs As EventArgs) _
    Implements IEquatable(Of EventPattern(Of TEventArgs))
'Usage
Dim instance As EventPattern(Of TEventArgs)
public class EventPattern<TEventArgs> : IEquatable<EventPattern<TEventArgs>>
where TEventArgs : EventArgs
generic<typename TEventArgs>
where TEventArgs : EventArgs
public ref class EventPattern : IEquatable<EventPattern<TEventArgs>^>
type EventPattern<'TEventArgs when 'TEventArgs : EventArgs> =  
    class
        interface IEquatable<EventPattern<'TEventArgs>>
    end
JScript does not support generic types and methods.

Type Parameters

  • TEventArgs

The EventPattern<TEventArgs> type exposes the following members.

Constructors

  Name Description
Public method EventPattern<TEventArgs> Initialize a new instance of the EventPattern<TEventArgs> type.

Top

Properties

  Name Description
Public property EventArgs Represents event arguments for a .NET event.
Public property Sender Represents event sender information for a .NET event.

Top

Methods

  Name Description
Public method Equals(Object) Compares this type with the specified object. (Overrides Object.Equals(Object).)
Public method Equals(EventPattern<TEventArgs>) Compares this type with the specified object.
Protected method Finalize (Inherited from Object.)
Public method GetHashCode (Overrides Object.GetHashCode().)
Public method GetType (Inherited from Object.)
Protected method MemberwiseClone (Inherited from Object.)
Public method ToString (Inherited from Object.)

Top

Operators

  Name Description
Public operatorStatic member Equality Compare two objects to see if they are identical.
Public operatorStatic member Inequality Compare two objects to see if they are identical.

Top

Remarks

The FromEventPattern operator works with events that take an object sender and some EventArgs, and uses reflection to find add/remove methods. It then converts the given event into an observable sequence with an EventPattern type that captures both the sender and the event arguments.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

System.Reactive Namespace