Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
RowUpdatedEventArgs.cs
Go to the documentation of this file.
1namespace System.Data.Common;
2
4{
5 private readonly IDbCommand _command;
6
8
10
12
14
15 private DataRow[] _dataRows;
16
18
19 private int _recordsAffected;
20
22
24 {
25 get
26 {
27 return _errors;
28 }
29 set
30 {
31 _errors = value;
32 }
33 }
34
36
37 public DataRow Row => _dataRow;
38
39 internal DataRow[]? Rows => _dataRows;
40
41 public int RowCount
42 {
43 get
44 {
45 DataRow[] dataRows = _dataRows;
46 if (dataRows == null)
47 {
48 if (_dataRow == null)
49 {
50 return 0;
51 }
52 return 1;
53 }
54 return dataRows.Length;
55 }
56 }
57
59
61 {
62 get
63 {
64 return _status;
65 }
66 set
67 {
68 if ((uint)value <= 3u)
69 {
70 _status = value;
71 return;
72 }
74 }
75 }
76
78
79 public RowUpdatedEventArgs(DataRow dataRow, IDbCommand? command, StatementType statementType, DataTableMapping tableMapping)
80 {
81 if ((uint)statementType > 4u)
82 {
83 throw ADP.InvalidStatementType(statementType);
84 }
85 _dataRow = dataRow;
86 _command = command;
87 _statementType = statementType;
88 _tableMapping = tableMapping;
89 }
90
91 internal void AdapterInit(DataRow[] dataRows)
92 {
94 _dataRows = dataRows;
95 if (dataRows != null && 1 == dataRows.Length)
96 {
97 _dataRow = dataRows[0];
98 }
99 }
100
101 internal void AdapterInit(int recordsAffected)
102 {
103 _recordsAffected = recordsAffected;
104 }
105
106 public void CopyToRows(DataRow[] array)
107 {
108 CopyToRows(array, 0);
109 }
110
111 public void CopyToRows(DataRow[] array, int arrayIndex)
112 {
113 DataRow[] dataRows = _dataRows;
114 if (dataRows != null)
115 {
116 dataRows.CopyTo(array, arrayIndex);
117 return;
118 }
119 if (array == null)
120 {
121 throw ADP.ArgumentNull("array");
122 }
124 }
125}
static ArgumentNullException ArgumentNull(string parameter)
Definition ADP.cs:699
static ArgumentOutOfRangeException InvalidStatementType(StatementType value)
Definition ADP.cs:149
static ArgumentOutOfRangeException InvalidUpdateStatus(UpdateStatus value)
Definition ADP.cs:154
RowUpdatedEventArgs(DataRow dataRow, IDbCommand? command, StatementType statementType, DataTableMapping tableMapping)
void CopyToRows(DataRow[] array, int arrayIndex)