PageRenderTime 66ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/CBR/CBR.Core/Helpers/MVVM/Events/Messages/NotificationMessage.cs

#
C# | 76 lines | 25 code | 5 blank | 46 comment | 0 complexity | 74449756f586aa006c8c433793c0317b MD5 | raw file
  1. // ****************************************************************************
  2. // <copyright file="NotificationMessage.cs" company="GalaSoft Laurent Bugnion">
  3. // Copyright © GalaSoft Laurent Bugnion 2009-2011
  4. // </copyright>
  5. // ****************************************************************************
  6. // <author>Laurent Bugnion</author>
  7. // <email>laurent@galasoft.ch</email>
  8. // <date>21.4.2009</date>
  9. // <project>GalaSoft.MvvmLight.Messaging</project>
  10. // <web>http://www.galasoft.ch</web>
  11. // <license>
  12. // See license.txt in this project or http://www.galasoft.ch/license_MIT.txt
  13. // </license>
  14. // ****************************************************************************
  15. ////using GalaSoft.Utilities.Attributes;
  16. namespace CBR.Core.Helpers
  17. {
  18. /// <summary>
  19. /// Passes a string message (Notification) to a recipient.
  20. /// <para>Typically, notifications are defined as unique strings in a static class. To define
  21. /// a unique string, you can use Guid.NewGuid().ToString() or any other unique
  22. /// identifier.</para>
  23. /// </summary>
  24. ////[ClassInfo(typeof(Messenger))]
  25. public class NotificationMessage : MessageBase
  26. {
  27. /// <summary>
  28. /// Initializes a new instance of the NotificationMessage class.
  29. /// </summary>
  30. /// <param name="notification">A string containing any arbitrary message to be
  31. /// passed to recipient(s)</param>
  32. public NotificationMessage(string notification)
  33. {
  34. Notification = notification;
  35. }
  36. /// <summary>
  37. /// Initializes a new instance of the NotificationMessage class.
  38. /// </summary>
  39. /// <param name="sender">The message's sender.</param>
  40. /// <param name="notification">A string containing any arbitrary message to be
  41. /// passed to recipient(s)</param>
  42. public NotificationMessage(object sender, string notification)
  43. : base(sender)
  44. {
  45. Notification = notification;
  46. }
  47. /// <summary>
  48. /// Initializes a new instance of the NotificationMessage class.
  49. /// </summary>
  50. /// <param name="sender">The message's sender.</param>
  51. /// <param name="target">The message's intended target. This parameter can be used
  52. /// to give an indication as to whom the message was intended for. Of course
  53. /// this is only an indication, amd may be null.</param>
  54. /// <param name="notification">A string containing any arbitrary message to be
  55. /// passed to recipient(s)</param>
  56. public NotificationMessage(object sender, object target, string notification)
  57. : base(sender, target)
  58. {
  59. Notification = notification;
  60. }
  61. /// <summary>
  62. /// Gets a string containing any arbitrary message to be
  63. /// passed to recipient(s).
  64. /// </summary>
  65. public string Notification
  66. {
  67. get;
  68. private set;
  69. }
  70. }
  71. }