Memento.PropertyChangeEvent.PropertyChangeEvent C# (CSharp) Method

PropertyChangeEvent() public method

Creates the event.
public PropertyChangeEvent ( object target, string propertyName, object propertyValue = null ) : System
target object The target object whose property is changed.
propertyName string The name of the property being changed.
propertyValue object The value of the property. If not supplied, use the current value of in
return System
        public PropertyChangeEvent(object target, string propertyName, object propertyValue = null)
        {
            if (target == null) throw new ArgumentNullException("target");
            if (propertyName == null) throw new ArgumentNullException("propertyName");
            TargetObject = target;
            PropertyName = propertyName;
            PropertyValue = propertyValue ?? PropertyInfo().GetValue(target, null);
        }