DiffFieldEventArgs
Namespace: Wisej.Web
Assembly: Wisej.Framework (4.2.0.0)
Contains the field and raw values captured for a rendered comparison.
- C#
- VB.NET
public class DiffFieldEventArgs : EventArgs
Public Class DiffFieldEventArgs
Inherits EventArgs
Missing fields are distinguished from null values by HasOldValue and HasNewValue. Values are references, not deep clones. RevertClick never changes either record.
Example:
viewer.RevertClick += (sender, e) => Console.WriteLine($"Requested revert of {e.Field.Name}");
Constructors
DiffFieldEventArgs(field, oldValue, newValue, hasOldValue, hasNewValue)
Captures one comparison result.
| Name | Type | Description |
|---|---|---|
| field | DiffField | Field descriptor. |
| oldValue | Object | Raw old value. |
| newValue | Object | Raw new value. |
| hasOldValue | Boolean | Whether the old record contains the field. |
| hasNewValue | Boolean | Whether the new record contains the field. |
Properties
Field
DiffField: Gets the explicit or automatically generated field descriptor.
HasNewValue
Boolean: Gets whether the new record contains this field.
HasOldValue
Boolean: Gets whether the old record contains this field.
IsChanged
Boolean: Gets whether presence differs or object.Equals reports unequal values.
NewValue
Object: Gets the raw new value, or null when missing.
OldValue
Object: Gets the raw old value, or null when missing.