forked from nhibernate/nhibernate-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStuff.cs
56 lines (46 loc) · 1.11 KB
/
Stuff.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
44
45
46
47
48
49
50
51
52
53
54
55
56
using System;
namespace NHibernate.DomainModel
{
/// <summary>
/// Summary description for Stuff.
/// </summary>
[Serializable]
public class Stuff
{
private long _id;
private FooProxy _foo;
private MoreStuff _moreStuff;
//private TimeZone property; TODO - does this exists in .net???
// yes, but it does not have a ctor (or static method) to get anything but the current TimeZone
// so I'm not sure how if we persist something diff than the current TimeZone we could retreive
// it...
public long Id
{
get { return _id; }
set { _id = value; }
}
public FooProxy Foo
{
get { return _foo; }
set { _foo = value; }
}
public MoreStuff MoreStuff
{
get { return _moreStuff; }
set { _moreStuff = value; }
}
#region System.Object Members
public override bool Equals(object obj)
{
if (this == obj) return true;
Stuff rhs = obj as Stuff;
if (rhs == null) return false;
return rhs.Id.Equals(this.Id) && rhs.Foo.Key.Equals(_foo.Key) && rhs.MoreStuff.Equals(_moreStuff);
}
public override int GetHashCode()
{
return _id.GetHashCode();
}
#endregion
}
}