PageRenderTime 13ms CodeModel.GetById 11ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/V1/trunk/Source/CAL/Composite/Events/IEventSubscription.cs

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