forked from nhibernate/nhibernate-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAbstractPostDatabaseOperationEvent.cs
36 lines (32 loc) · 1.26 KB
/
AbstractPostDatabaseOperationEvent.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
using System;
using NHibernate.Persister.Entity;
namespace NHibernate.Event
{
/// <summary>
/// Represents an operation we performed against the database.
/// </summary>
[Serializable]
public class AbstractPostDatabaseOperationEvent : AbstractEvent, IPostDatabaseOperationEventArgs
{
/// <summary> Constructs an event containing the pertinent information. </summary>
/// <param name="source">The session from which the event originated. </param>
/// <param name="entity">The entity to be involved in the database operation. </param>
/// <param name="id">The entity id to be involved in the database operation. </param>
/// <param name="persister">The entity's persister. </param>
protected AbstractPostDatabaseOperationEvent(IEventSource source, object entity, object id, IEntityPersister persister)
: base(source)
{
Entity = entity;
Id = id;
Persister = persister;
}
/// <summary> The entity involved in the database operation. </summary>
public object Entity { get; private set; }
/// <summary> The id to be used in the database operation. </summary>
public object Id { get; private set; }
/// <summary>
/// The persister for the <see cref="Entity"/>.
/// </summary>
public IEntityPersister Persister { get; private set; }
}
}