PageRenderTime 33ms CodeModel.GetById 30ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/V4/PrismLibrary/Desktop/Prism/Events/IEventSubscription.cs

#
C# | 39 lines | 10 code | 2 blank | 27 comment | 0 complexity | 0eac71c4a7b7b0b8fcfdb8aa047a3bd7 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.Events
20{
21    ///<summary>
22    /// Defines a contract for an event subscription to be used by <see cref="EventBase"/>.
23    ///</summary>
24    public interface IEventSubscription
25    {
26        /// <summary>
27        /// Gets or sets a <see cref="Events.SubscriptionToken"/> that identifies this <see cref="IEventSubscription"/>.
28        /// </summary>
29        /// <value>A token that identifies this <see cref="IEventSubscription"/>.</value>
30        SubscriptionToken SubscriptionToken { get; set; }
31
32        /// <summary>
33        /// Gets the execution strategy to publish this event.
34        /// </summary>
35        /// <returns>An <see cref="Action{T}"/> with the execution strategy, or <see langword="null" /> if the <see cref="IEventSubscription"/> is no longer valid.</returns>
36        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
37        Action<object[]> GetExecutionStrategy();
38    }
39}