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

/V1/spikes/AGCompositeApplicationLibrary/AGComposite/Events/DataEventArgs.cs

#
C# | 47 lines | 16 code | 3 blank | 28 comment | 0 complexity | c519a86139c47355b09fcda195de3151 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.Composite.Events
  19. {
  20. /// <summary>
  21. /// Generic arguments class to pass to event handlers that need to receive data.
  22. /// </summary>
  23. /// <typeparam name="TData">The type of data to pass.</typeparam>
  24. public class DataEventArgs<TData> : EventArgs
  25. {
  26. private readonly TData _value;
  27. /// <summary>
  28. /// Initializes the DataEventArgs class.
  29. /// </summary>
  30. /// <param name="value">Information related to the event.</param>
  31. public DataEventArgs(TData value)
  32. {
  33. _value = value;
  34. }
  35. /// <summary>
  36. /// Gets the information related to the event.
  37. /// </summary>
  38. /// <value>Information related to the event.</value>
  39. public TData Value
  40. {
  41. get { return _value; }
  42. }
  43. }
  44. }