/
DataColumnChangeEvent.cs
46 lines (39 loc) · 1.27 KB
/
DataColumnChangeEvent.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
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
namespace System.Data
{
public class DataColumnChangeEventArgs : EventArgs
{
private DataColumn? _column;
internal DataColumnChangeEventArgs(DataRow row)
{
Row = row;
}
/// <summary>
/// Initializes a new instance of the <see cref='System.Data.DataColumnChangeEventArgs'/> class.
/// </summary>
public DataColumnChangeEventArgs(DataRow row, DataColumn? column, object? value)
{
Row = row;
_column = column;
ProposedValue = value;
}
/// <summary>
/// Gets the column whose value is changing.
/// </summary>
public DataColumn? Column => _column;
/// <summary>
/// Gets the row whose value is changing.
/// </summary>
public DataRow Row { get; }
/// <summary>
/// Gets or sets the proposed value.
/// </summary>
public object? ProposedValue { get; set; }
internal void InitializeColumnChangeEvent(DataColumn column, object value)
{
_column = column;
ProposedValue = value;
}
}
}