forked from nhibernate/nhibernate-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNode.cs
43 lines (35 loc) · 858 Bytes
/
Node.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
using System;
using System.Collections.Generic;
namespace NHibernate.Test.Operations
{
public class Node
{
private ISet<Node> cascadingChildren = new HashSet<Node>();
private ISet<Node> children = new HashSet<Node>();
private DateTime created = DateTime.Now;
public virtual string Name { get; set; }
public virtual string Description { get; set; }
public virtual DateTime Created
{
get { return created; }
set { created = value; }
}
public virtual Node Parent { get; set; }
public virtual ISet<Node> Children
{
get { return children; }
set { children = value; }
}
public virtual ISet<Node> CascadingChildren
{
get { return cascadingChildren; }
set { cascadingChildren = value; }
}
public virtual Node AddChild(Node child)
{
children.Add(child);
child.Parent = this;
return this;
}
}
}