PageRenderTime 26ms CodeModel.GetById 17ms app.highlight 4ms RepoModel.GetById 1ms 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//===================================================================================
17using System;
18
19namespace Microsoft.Practices.Prism.Interactivity.InteractionRequest
20{
21    /// <summary>
22    /// Event args for the <see cref="IInteractionRequest.Raised"/> event.
23    /// </summary>
24    public class InteractionRequestedEventArgs : EventArgs
25    {
26        /// <summary>
27        /// Constructs a new instance of <see cref="InteractionRequestedEventArgs"/>
28        /// </summary>
29        /// <param name="context"></param>
30        /// <param name="callback"></param>
31        public InteractionRequestedEventArgs(Notification context, Action callback)
32        {
33            this.Context = context;
34            this.Callback = callback;
35        }
36
37        /// <summary>
38        /// Gets the context for a requested interaction.
39        /// </summary>
40        public Notification Context { get; private set; }
41
42        /// <summary>
43        /// Gets the callback to execute when an interaction is completed.
44        /// </summary>
45        public Action Callback { get; private set; }
46    }
47}