forked from nhibernate/nhibernate-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLockEvent.cs
48 lines (42 loc) · 938 Bytes
/
LockEvent.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
using System;
using System.Collections.Generic;
using System.Text;
namespace NHibernate.Event
{
/// <summary>
/// Defines an event class for the locking of an entity.
/// </summary>
[Serializable]
public class LockEvent : AbstractEvent
{
private string entityName;
private object entity;
private LockMode lockMode;
public LockEvent(object entity, LockMode lockMode, IEventSource source)
: base(source)
{
this.Entity = entity;
this.LockMode = lockMode;
}
public LockEvent(string entityName, object original, LockMode lockMode, IEventSource source)
: this(original, lockMode, source)
{
this.EntityName = entityName;
}
public string EntityName
{
get { return entityName; }
set { entityName = value; }
}
public object Entity
{
get { return entity; }
set { entity = value; }
}
public LockMode LockMode
{
get { return lockMode; }
set { lockMode = value; }
}
}
}