public static void RecordComplexOriginalValues(String parentPropertyName, TripPayment complexObject, ObjectChangeTracker changeTracker) { if (String.IsNullOrEmpty(parentPropertyName)) { throw new ArgumentException("String parameter cannot be null or empty.", "parentPropertyName"); } if (changeTracker == null) { throw new ArgumentNullException("changeTracker"); } changeTracker.RecordOriginalValue(String.Format(CultureInfo.InvariantCulture, "{0}.PaymentDate", parentPropertyName), complexObject == null ? null : (object)complexObject.PaymentDate); changeTracker.RecordOriginalValue(String.Format(CultureInfo.InvariantCulture, "{0}.Amount", parentPropertyName), complexObject == null ? null : (object)complexObject.Amount); changeTracker.RecordOriginalValue(String.Format(CultureInfo.InvariantCulture, "{0}.ReservationDate", parentPropertyName), complexObject == null ? null : (object)complexObject.ReservationDate); changeTracker.RecordOriginalValue(String.Format(CultureInfo.InvariantCulture, "{0}.FirstName", parentPropertyName), complexObject == null ? null : (object)complexObject.FirstName); changeTracker.RecordOriginalValue(String.Format(CultureInfo.InvariantCulture, "{0}.LastName", parentPropertyName), complexObject == null ? null : (object)complexObject.LastName); changeTracker.RecordOriginalValue(String.Format(CultureInfo.InvariantCulture, "{0}.StartDate", parentPropertyName), complexObject == null ? null : (object)complexObject.StartDate); changeTracker.RecordOriginalValue(String.Format(CultureInfo.InvariantCulture, "{0}.EndDate", parentPropertyName), complexObject == null ? null : (object)complexObject.EndDate); changeTracker.RecordOriginalValue(String.Format(CultureInfo.InvariantCulture, "{0}.LocationName", parentPropertyName), complexObject == null ? null : (object)complexObject.LocationName); }
public static void RecordComplexOriginalValues(String parentPropertyName, Mail complexObject, ObjectChangeTracker changeTracker) { if (String.IsNullOrEmpty(parentPropertyName)) { throw new ArgumentException("String parameter cannot be null or empty.", "parentPropertyName"); } if (changeTracker == null) { throw new ArgumentNullException("changeTracker"); } changeTracker.RecordOriginalValue(String.Format(CultureInfo.InvariantCulture, "{0}.Street1", parentPropertyName), complexObject == null ? null : (object)complexObject.Street1); changeTracker.RecordOriginalValue(String.Format(CultureInfo.InvariantCulture, "{0}.Street2", parentPropertyName), complexObject == null ? null : (object)complexObject.Street2); changeTracker.RecordOriginalValue(String.Format(CultureInfo.InvariantCulture, "{0}.City", parentPropertyName), complexObject == null ? null : (object)complexObject.City); changeTracker.RecordOriginalValue(String.Format(CultureInfo.InvariantCulture, "{0}.StateProvince", parentPropertyName), complexObject == null ? null : (object)complexObject.StateProvince); }