VPet/VPet.Solution/SimpleObservable/ObservableClass/PropertyChangingXEventArgs.cs
2023-12-18 22:53:56 +08:00

36 lines
837 B
C#

using System.ComponentModel;
namespace HKW.HKWUtils.Observable;
/// <summary>
/// 属性改变前事件参数
/// </summary>
public class PropertyChangingXEventArgs : CancelEventArgs
{
/// <summary>
/// 属性名
/// </summary>
public string PropertyName { get; }
/// <summary>
/// 旧值
/// </summary>
public object? OldValue { get; }
/// <summary>
/// 新值
/// </summary>
public object? NewValue { get; }
/// <inheritdoc/>
/// <param name="propertyName">属性名</param>
/// <param name="oldValue">旧值</param>
/// <param name="newValue">新值</param>
public PropertyChangingXEventArgs(string propertyName, object? oldValue, object? newValue)
{
PropertyName = propertyName;
OldValue = oldValue;
NewValue = newValue;
}
}