Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
EventArgs.cs
Go to the documentation of this file.
1 using System;
2 
3 namespace SiliconStudio.ActionStack
4 {
6  {
7  /// <summary>
8  /// Item discarded because the stack is full.
9  /// </summary>
10  Swallowed,
11  /// <summary>
12  /// Item discarded because it has been undone and new action have been done since.
13  /// </summary>
15  /// <summary>
16  /// Item discarded by the application either because they are not relevant or not actually cancellable.
17  /// </summary>
19  }
20 
21  public class DiscardedActionItemsEventArgs<T> : ActionItemsEventArgs<T> where T : IActionItem
22  {
23  public ActionItemDiscardType Type { get; private set; }
24 
26  : base(actionItems)
27  {
28  Type = type;
29  }
30 
32  : base(actionItems)
33  {
34  Type = type;
35  }
36  }
37 
38  public class ActionItemsEventArgs<T> : EventArgs where T : IActionItem
39  {
40  public T[] ActionItems { get; private set; }
41 
42  public ActionItemsEventArgs(T actionItems)
43  : this(new[] { actionItems })
44  {
45  }
46 
47  public ActionItemsEventArgs(T[] actionItems)
48  {
49  if (actionItems == null)
50  throw new ArgumentNullException("actionItems");
51 
52  ActionItems = actionItems;
53  }
54  }
55 
56  public class ActionItemEventArgs<T> : EventArgs where T : class, IActionItem
57  {
58  public T ActionItem { get; private set; }
59 
60  public ActionItemEventArgs(T actionItem)
61  {
62  if (actionItem == null)
63  throw new ArgumentNullException("actionItem");
64 
65  ActionItem = actionItem;
66  }
67  }
68 }
ActionItemDiscardType
This enum describes how an action item is being discarded when the ActionStack.ActionItemsDiscarded e...
Item discarded because the stack is full.
Item discarded by the application either because they are not relevant or not actually cancellable...
Base class for action items.
Definition: ActionItem.cs:13
Item discarded because it has been undone and new action have been done since.
DiscardedActionItemsEventArgs(ActionItemDiscardType type, T[] actionItems)
Definition: EventArgs.cs:31
Base interface for action items.
Definition: IActionItem.cs:10
DiscardedActionItemsEventArgs(ActionItemDiscardType type, T actionItems)
Definition: EventArgs.cs:25