-
Notifications
You must be signed in to change notification settings - Fork 934
/
Copy pathTooManyRowsAffectedException.cs
46 lines (40 loc) · 1.14 KB
/
TooManyRowsAffectedException.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
using System;
using System.Runtime.Serialization;
using System.Security;
using System.Security.Permissions;
namespace NHibernate.AdoNet
{
[Serializable]
public class TooManyRowsAffectedException : HibernateException
{
private readonly int expectedRowCount;
private readonly int actualRowCount;
public TooManyRowsAffectedException(String message, int expectedRowCount, int actualRowCount)
: base(message)
{
this.expectedRowCount = expectedRowCount;
this.actualRowCount = actualRowCount;
}
protected TooManyRowsAffectedException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
this.expectedRowCount = info.GetInt32("expectedRowCount");
this.actualRowCount = info.GetInt32("actualRowCount");
}
[SecurityCritical]
public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
base.GetObjectData(info, context);
info.AddValue("expectedRowCount", expectedRowCount);
info.AddValue("actualRowCount", actualRowCount);
}
public int ExpectedRowCount
{
get { return expectedRowCount; }
}
public int ActualRowCount
{
get { return actualRowCount; }
}
}
}