public static IEnumerable<IValuePair> Get(Func<object> oldValue, Func<object> newValue, string propertyName, EntityState state, ISerializationManager serializer) { var pair = new ValuePair(oldValue, newValue, propertyName, state, serializer); if (pair.Type.IsA(typeof(System.Data.IDataRecord))) { // Is it a complex type? If so, retrieve the value pairs for each sub-property. return new DataRecordValuePair(pair, serializer).SubValuePairs; } else { // Otherwise just return the change return new List<ValuePair>() { pair }; } }
public static IEnumerable <IValuePair> Get(Func <object> oldValue, Func <object> newValue, string propertyName, EntityState state) { var pair = new ValuePair(oldValue, newValue, propertyName, state); if (pair.Type.IsA(typeof(System.Data.IDataRecord))) { // Is it a complex type? If so, retrieve the value pairs for each sub-property. return(new DataRecordValuePair(pair).SubValuePairs); } else { // Otherwise just return the change return(new List <ValuePair>() { pair }); } }