forked from nhibernate/nhibernate-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDbCommandWrapper.cs
109 lines (93 loc) · 2.16 KB
/
DbCommandWrapper.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
using System.Data;
using System.Data.Common;
namespace NHibernate.AdoNet
{
/// <summary>
/// A <see cref="DbCommand"/> wrapper that implements the required members.
/// </summary>
internal partial class DbCommandWrapper : DbCommand
{
public DbCommandWrapper(DbCommand command)
{
Command = command;
}
/// <summary>
/// The wrapped command.
/// </summary>
public DbCommand Command { get; }
/// <inheritdoc />
public override void Cancel()
{
Command.Cancel();
}
/// <inheritdoc />
public override int ExecuteNonQuery()
{
return Command.ExecuteNonQuery();
}
/// <inheritdoc />
public override object ExecuteScalar()
{
return Command.ExecuteScalar();
}
/// <inheritdoc />
public override void Prepare()
{
Command.Prepare();
}
/// <inheritdoc />
public override string CommandText
{
get => Command.CommandText;
set => Command.CommandText = value;
}
/// <inheritdoc />
public override int CommandTimeout
{
get => Command.CommandTimeout;
set => Command.CommandTimeout = value;
}
/// <inheritdoc />
public override CommandType CommandType
{
get => Command.CommandType;
set => Command.CommandType = value;
}
/// <inheritdoc />
public override UpdateRowSource UpdatedRowSource
{
get => Command.UpdatedRowSource;
set => Command.UpdatedRowSource = value;
}
/// <inheritdoc />
protected override DbConnection DbConnection
{
get => Command.Connection;
set => Command.Connection = value;
}
/// <inheritdoc />
protected override DbParameterCollection DbParameterCollection => Command.Parameters;
/// <inheritdoc />
protected override DbTransaction DbTransaction
{
get => Command.Transaction;
set => Command.Transaction = value;
}
/// <inheritdoc />
public override bool DesignTimeVisible
{
get => Command.DesignTimeVisible;
set => Command.DesignTimeVisible = value;
}
/// <inheritdoc />
protected override DbParameter CreateDbParameter()
{
return Command.CreateParameter();
}
/// <inheritdoc />
protected override DbDataReader ExecuteDbDataReader(CommandBehavior behavior)
{
return Command.ExecuteReader(behavior);
}
}
}