Skip to main content
Version: 4.2

DiffFieldEventArgs

Namespace: Wisej.Web

Assembly: Wisej.Framework (4.2.0.0)

Contains the field and raw values captured for a rendered comparison.

public class DiffFieldEventArgs : 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​

Instance member DiffFieldEventArgs(field, oldValue, newValue, hasOldValue, hasNewValue)​

Captures one comparison result.

NameTypeDescription
fieldDiffFieldField descriptor.
oldValueObjectRaw old value.
newValueObjectRaw new value.
hasOldValueBooleanWhether the old record contains the field.
hasNewValueBooleanWhether the new record contains the field.

Properties​

Instance member Field​

DiffField: Gets the explicit or automatically generated field descriptor.

Instance member HasNewValue​

Boolean: Gets whether the new record contains this field.

Instance member HasOldValue​

Boolean: Gets whether the old record contains this field.

Instance member IsChanged​

Boolean: Gets whether presence differs or object.Equals reports unequal values.

Instance member NewValue​

Object: Gets the raw new value, or null when missing.

Instance member OldValue​

Object: Gets the raw old value, or null when missing.