PageRenderTime 60ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/V4/PrismLibrary/Desktop/Prism.Interactivity/InteractionRequest/InteractionRequestedEventArgs.cs

#
C# | 47 lines | 14 code | 3 blank | 30 comment | 0 complexity | 695982689c6683339328fc2b711b9230 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.Interactivity.InteractionRequest
  19. {
  20. /// <summary>
  21. /// Event args for the <see cref="IInteractionRequest.Raised"/> event.
  22. /// </summary>
  23. public class InteractionRequestedEventArgs : EventArgs
  24. {
  25. /// <summary>
  26. /// Constructs a new instance of <see cref="InteractionRequestedEventArgs"/>
  27. /// </summary>
  28. /// <param name="context"></param>
  29. /// <param name="callback"></param>
  30. public InteractionRequestedEventArgs(Notification context, Action callback)
  31. {
  32. this.Context = context;
  33. this.Callback = callback;
  34. }
  35. /// <summary>
  36. /// Gets the context for a requested interaction.
  37. /// </summary>
  38. public Notification Context { get; private set; }
  39. /// <summary>
  40. /// Gets the callback to execute when an interaction is completed.
  41. /// </summary>
  42. public Action Callback { get; private set; }
  43. }
  44. }