public void Add <TEntity, TProp>(PropertyInfo propertyInfo, Func <TEntity, string> displayName, Func <TEntity, TProp, string> formatter, IEqualityComparer <TProp> comparer) where TEntity : class { if (displayName == null) { displayName = e => propertyInfo.Name; } if (formatter == null) { formatter = (e, p) => p == null ? null : p.ToString(); } if (comparer == null) { comparer = EqualityComparer <TProp> .Default; } var property = new PropertyConfiguration <TProp>( propertyInfo, o => displayName(o as TEntity), (o, p) => formatter(o as TEntity, p), comparer); properties[propertyInfo] = property; }
public PropertyChange(PropertyConfiguration <TProp> configuration, SnapshotValue original, SnapshotValue updated) { this.configuration = configuration; this.original = original; this.updated = updated; }