Class EventPattern<TSender, TEventArgs>
Represents a .NET event invocation consisting of the strongly typed object that raised the event and the data that was generated by the event.
Inherited Members
Namespace: System.Reactive
Assembly: System.Reactive.Linq.dll
Syntax
public class EventPattern<TSender, TEventArgs> : IEquatable<EventPattern<TSender, TEventArgs>>, IEventPattern<TSender, TEventArgs> where TEventArgs : EventArgs
Type Parameters
Name | Description |
---|---|
TSender | The type of the sender that raised the event. |
TEventArgs | The type of the event data generated by the event. |
Constructors
| Improve this Doc View SourceEventPattern(TSender, TEventArgs)
Creates a new data representation instance of a .NET event invocation with the given sender and event data.
Declaration
public EventPattern(TSender sender, TEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
TSender | sender | The sender object that raised the event. |
TEventArgs | e | The event data that was generated by the event. |
Properties
| Improve this Doc View SourceEventArgs
Gets the event data that was generated by the event.
Declaration
public TEventArgs EventArgs { get; }
Property Value
Type | Description |
---|---|
TEventArgs |
Sender
Gets the sender object that raised the event.
Declaration
public TSender Sender { get; }
Property Value
Type | Description |
---|---|
TSender |
Methods
| Improve this Doc View SourceEquals(Object)
Determines whether the specified System.Object is equal to the current EventPattern<TSender, TEventArgs>.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | The System.Object to compare with the current EventPattern<TSender, TEventArgs>. |
Returns
Type | Description |
---|---|
Boolean | true if the specified System.Object is equal to the current EventPattern<TSender, TEventArgs>; otherwise, false. |
Overrides
| Improve this Doc View SourceEquals(EventPattern<TSender, TEventArgs>)
Determines whether the current EventPattern<TSender, TEventArgs> object represents the same event as a specified EventPattern<TSender, TEventArgs> object.
Declaration
public bool Equals(EventPattern<TSender, TEventArgs> other)
Parameters
Type | Name | Description |
---|---|---|
EventPattern<TSender, TEventArgs> | other | An object to compare to the current EventPattern<TSender, TEventArgs> object. |
Returns
Type | Description |
---|---|
Boolean | true if both EventPattern<TSender, TEventArgs> objects represent the same event; otherwise, false. |
GetHashCode()
Returns the hash code for the current EventPattern<TSender, TEventArgs> instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | A hash code for the current EventPattern<TSender, TEventArgs> instance. |
Overrides
Operators
| Improve this Doc View SourceEquality(EventPattern<TSender, TEventArgs>, EventPattern<TSender, TEventArgs>)
Determines whether two specified EventPattern<TSender, TEventArgs> objects represent the same event.
Declaration
public static bool operator ==(EventPattern<TSender, TEventArgs> first, EventPattern<TSender, TEventArgs> second)
Parameters
Type | Name | Description |
---|---|---|
EventPattern<TSender, TEventArgs> | first | The first EventPattern<TSender, TEventArgs> to compare, or null. |
EventPattern<TSender, TEventArgs> | second | The second EventPattern<TSender, TEventArgs> to compare, or null. |
Returns
Type | Description |
---|---|
Boolean | true if both EventPattern<TSender, TEventArgs> objects represent the same event; otherwise, false. |
Inequality(EventPattern<TSender, TEventArgs>, EventPattern<TSender, TEventArgs>)
Determines whether two specified EventPattern<TSender, TEventArgs> objects represent a different event.
Declaration
public static bool operator !=(EventPattern<TSender, TEventArgs> first, EventPattern<TSender, TEventArgs> second)
Parameters
Type | Name | Description |
---|---|---|
EventPattern<TSender, TEventArgs> | first | The first EventPattern<TSender, TEventArgs> to compare, or null. |
EventPattern<TSender, TEventArgs> | second | The second EventPattern<TSender, TEventArgs> to compare, or null. |
Returns
Type | Description |
---|---|
Boolean | true if both EventPattern<TSender, TEventArgs> objects don't represent the same event; otherwise, false. |