PageRenderTime 59ms CodeModel.GetById 19ms RepoModel.GetById 1ms app.codeStats 0ms

/V4/PrismLibrary/Desktop/Prism/Events/IEventSubscription.cs

#
C# | 39 lines | 10 code | 2 blank | 27 comment | 0 complexity | 0eac71c4a7b7b0b8fcfdb8aa047a3bd7 MD5 | raw file
  1. //===================================================================================
  2. // Microsoft patterns & practices
  3. // Composite Application Guidance for Windows Presentation Foundation and Silverlight
  4. //===================================================================================
  5. // Copyright (c) Microsoft Corporation. All rights reserved.
  6. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
  7. // OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
  8. // LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  9. // FITNESS FOR A PARTICULAR PURPOSE.
  10. //===================================================================================
  11. // The example companies, organizations, products, domain names,
  12. // e-mail addresses, logos, people, places, and events depicted
  13. // herein are fictitious. No association with any real company,
  14. // organization, product, domain name, email address, logo, person,
  15. // places, or events is intended or should be inferred.
  16. //===================================================================================
  17. using System;
  18. namespace Microsoft.Practices.Prism.Events
  19. {
  20. ///<summary>
  21. /// Defines a contract for an event subscription to be used by <see cref="EventBase"/>.
  22. ///</summary>
  23. public interface IEventSubscription
  24. {
  25. /// <summary>
  26. /// Gets or sets a <see cref="Events.SubscriptionToken"/> that identifies this <see cref="IEventSubscription"/>.
  27. /// </summary>
  28. /// <value>A token that identifies this <see cref="IEventSubscription"/>.</value>
  29. SubscriptionToken SubscriptionToken { get; set; }
  30. /// <summary>
  31. /// Gets the execution strategy to publish this event.
  32. /// </summary>
  33. /// <returns>An <see cref="Action{T}"/> with the execution strategy, or <see langword="null" /> if the <see cref="IEventSubscription"/> is no longer valid.</returns>
  34. [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
  35. Action<object[]> GetExecutionStrategy();
  36. }
  37. }