PageRenderTime 29ms CodeModel.GetById 20ms app.highlight 3ms RepoModel.GetById 2ms 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//===============================================================================
17using System;
18
19namespace Microsoft.Practices.Composite.Events
20{
21    /// <summary>
22    /// Generic arguments class to pass to event handlers that need to receive data.
23    /// </summary>
24    /// <typeparam name="TData">The type of data to pass.</typeparam>
25    public class DataEventArgs<TData> : EventArgs
26    {
27        private readonly TData _value;
28
29        /// <summary>
30        /// Initializes the DataEventArgs class.
31        /// </summary>
32        /// <param name="value">Information related to the event.</param>
33        public DataEventArgs(TData value)
34        {
35            _value = value;
36        }
37
38        /// <summary>
39        /// Gets the information related to the event.
40        /// </summary>
41        /// <value>Information related to the event.</value>
42        public TData Value
43        {
44            get { return _value; }
45        }
46    }
47}