Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
RoutedEvent.cs
Go to the documentation of this file.
1 // Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2 // This file is distributed under GPL v3. See LICENSE.md for details.
3 using System;
4 
5 namespace SiliconStudio.Paradox.UI.Events
6 {
7  /// <summary>
8  /// Represents and identifies a routed event and declares its characteristics.
9  /// </summary>
10  public abstract class RoutedEvent
11  {
12  /// <summary>
13  /// Gets the identifying name of the routed event.
14  /// </summary>
15  public string Name { get; internal set; }
16 
17  /// <summary>
18  /// Gets the registered owner type of the routed event.
19  /// </summary>
20  public Type OwnerType { get; internal set; }
21 
22  /// <summary>
23  /// Gets the routing strategy of the routed event.
24  /// </summary>
25  public RoutingStrategy RoutingStrategy { get; internal set; }
26 
27  internal abstract Type HandlerSecondArgumentType { get; }
28 
29  internal RoutedEvent()
30  {
31  }
32  }
33 
34  /// <summary>
35  /// A routed event typed with the <see cref="RoutedEventArgs"/> it triggers.
36  /// </summary>
37  /// <typeparam name="T">The type of <see cref="RoutedEventArgs"/> the routed event triggers</typeparam>
38  public sealed class RoutedEvent<T> : RoutedEvent where T : RoutedEventArgs
39  {
40  internal override Type HandlerSecondArgumentType
41  {
42  get { return typeof(T); }
43  }
44  }
45 }
Contains state information and event data associated with a routed event.
Represents and identifies a routed event and declares its characteristics.
Definition: RoutedEvent.cs:10
RoutingStrategy
Indicates the routing strategy of a routed event.