public OnFlushDirty ( object entity, object id, object currentState, object previousState, string propertyNames, IType types ) : bool | ||
entity | object | |
id | object | |
currentState | object | |
previousState | object | |
propertyNames | string | |
types | IType | |
리턴 | bool |
public override bool OnFlushDirty(
object entity,
object id,
object[] currentState,
object[] previousState,
string[] propertyNames,
IType[] types)
{
var changed = false;
if (entity is IAuditable)
{
var dateIndex = Array.FindIndex(
propertyNames, n => ModifiedDatePropertyName.Equals(n, StringComparison.Ordinal));
Contract.Assert(dateIndex > -1);
currentState[dateIndex] = DateTime.Now;
changed = true;
}
return changed;
}