Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
RowUpdatingEventArgs.cs
Go to the documentation of this file.
1namespace System.Data.Common;
2
4{
6
7 private readonly StatementType _statementType;
8
10
12
13 private readonly DataRow _dataRow;
14
16
17 protected virtual IDbCommand? BaseCommand
18 {
19 get
20 {
21 return _command;
22 }
23 set
24 {
26 }
27 }
28
30 {
31 get
32 {
33 return BaseCommand;
34 }
35 set
36 {
38 }
39 }
40
42 {
43 get
44 {
45 return _errors;
46 }
47 set
48 {
49 _errors = value;
50 }
51 }
52
53 public DataRow Row => _dataRow;
54
56
58 {
59 get
60 {
61 return _status;
62 }
63 set
64 {
65 if ((uint)value <= 3u)
66 {
67 _status = value;
68 return;
69 }
71 }
72 }
73
75
76 public RowUpdatingEventArgs(DataRow dataRow, IDbCommand? command, StatementType statementType, DataTableMapping tableMapping)
77 {
78 ADP.CheckArgumentNull(dataRow, "dataRow");
79 ADP.CheckArgumentNull(tableMapping, "tableMapping");
80 switch (statementType)
81 {
82 case StatementType.Batch:
83 throw ADP.NotSupportedStatementType(statementType, "RowUpdatingEventArgs");
84 default:
85 throw ADP.InvalidStatementType(statementType);
86 case StatementType.Select:
87 case StatementType.Insert:
88 case StatementType.Update:
89 case StatementType.Delete:
90 _dataRow = dataRow;
91 _command = command;
92 _statementType = statementType;
93 _tableMapping = tableMapping;
94 break;
95 }
96 }
97}
static ArgumentOutOfRangeException NotSupportedStatementType(StatementType value, string method)
Definition ADP.cs:159
static ArgumentOutOfRangeException InvalidStatementType(StatementType value)
Definition ADP.cs:149
static ArgumentOutOfRangeException InvalidUpdateStatus(UpdateStatus value)
Definition ADP.cs:154
static void CheckArgumentNull([NotNull] object value, string parameterName)
Definition ADP.cs:782
RowUpdatingEventArgs(DataRow dataRow, IDbCommand? command, StatementType statementType, DataTableMapping tableMapping)