Skip to content

Commit 7971f76

Browse files
committed
Reintroduced MoveEventArgs class as [Obsolete]
This was renamed to `MoveDeleteEventArgs`. This provides instructions to callers of the original class name.
1 parent 5c260cc commit 7971f76

1 file changed

Lines changed: 68 additions & 0 deletions

File tree

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
/*==============================================================================================================================
2+
| Author Ignia, LLC
3+
| Client Ignia
4+
| Project Topics Library
5+
\=============================================================================================================================*/
6+
using System;
7+
using OnTopic.Internal.Diagnostics;
8+
9+
namespace OnTopic.Repositories {
10+
11+
/*============================================================================================================================
12+
| CLASS: MOVE EVENT ARGS
13+
\---------------------------------------------------------------------------------------------------------------------------*/
14+
/// <summary>
15+
/// The MoveEventArgs object defines an event argument type specific to move events.
16+
/// </summary>
17+
/// <remarks>
18+
/// Allows tracking of the source and destination topics.
19+
/// </remarks>
20+
[Obsolete("The MoveEventArgs have been renamed to TopicMoveEventArgs.", true)]
21+
public class MoveEventArgs : EventArgs {
22+
23+
/*==========================================================================================================================
24+
| CONSTRUCTOR: MOVE EVENT ARGS
25+
\-------------------------------------------------------------------------------------------------------------------------*/
26+
/// <summary>
27+
/// Initializes a new instance of the <see cref="MoveEventArgs"/> class and sets the <see cref="Topic"/> and
28+
/// <see cref="Target"/> properties based on the specified objects.
29+
/// </summary>
30+
/// <param name="topic">The topic object associated with the move event.</param>
31+
/// <param name="target">The parent topic object targeted by the move event.</param>
32+
/// <requires description="The topic to move must be provided." exception="T:System.ArgumentNullException">
33+
/// topic is not null
34+
/// </requires>
35+
/// <requires
36+
/// description="The target topic under which to move the topic must be provided."
37+
/// exception="T:System.ArgumentNullException">
38+
/// target is not null
39+
/// </requires>
40+
/// <requires description="The topic cannot be its own parent." exception="T:System.ArgumentException">
41+
/// topic != target
42+
/// </requires>
43+
public MoveEventArgs(Topic topic, Topic target) {
44+
Contract.Requires(topic, "topic");
45+
Contract.Requires(target, "target");
46+
Contract.Requires<ArgumentException>(topic != target, "The topic cannot be its own parent.");
47+
Topic = topic;
48+
Target = target;
49+
}
50+
51+
/*==========================================================================================================================
52+
| PROPERTY: EVENT TOPIC
53+
\-------------------------------------------------------------------------------------------------------------------------*/
54+
/// <summary>
55+
/// Gets or sets the Topic object associated with the event.
56+
/// </summary>
57+
public Topic Topic { get; set; }
58+
59+
/*==========================================================================================================================
60+
| PROPERTY: TARGET
61+
\-------------------------------------------------------------------------------------------------------------------------*/
62+
/// <summary>
63+
/// Gets or sets the new parent that the topic will be moved to.
64+
/// </summary>
65+
public Topic Target { get; set; }
66+
67+
} //Class
68+
} //Namespace

0 commit comments

Comments
 (0)