1
0

IEventPattern.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
  2. namespace System.Reactive
  3. {
  4. /// <summary>
  5. /// Represents a .NET event invocation consisting of the strongly typed object that raised the event and the data that was generated by the event.
  6. /// </summary>
  7. /// <typeparam name="TSender">
  8. /// The type of the sender that raised the event.
  9. /// This type parameter is covariant. That is, you can use either the type you specified or any type that is more derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics.
  10. /// </typeparam>
  11. /// <typeparam name="TEventArgs">
  12. /// The type of the event data generated by the event.
  13. /// This type parameter is covariant. That is, you can use either the type you specified or any type that is more derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics.
  14. /// </typeparam>
  15. public interface IEventPattern<
  16. #if !NO_VARIANCE
  17. out TSender, out TEventArgs
  18. #else
  19. TSender, TEventArgs
  20. #endif
  21. >
  22. #if !NO_EVENTARGS_CONSTRAINT
  23. where TEventArgs : EventArgs
  24. #endif
  25. {
  26. /// <summary>
  27. /// Gets the sender object that raised the event.
  28. /// </summary>
  29. TSender Sender { get; }
  30. /// <summary>
  31. /// Gets the event data that was generated by the event.
  32. /// </summary>
  33. TEventArgs EventArgs { get; }
  34. }
  35. }