/// <summary>
/// Called before an object is deleted
/// </summary>
/// <param name="entity"></param>
/// <param name="id"></param>
/// <param name="propertyNames"></param>
/// <param name="state"></param>
/// <param name="types"></param>
/// <remarks>
/// It is not recommended that the interceptor modify the <c>state</c>.
/// </remarks>
public override void OnDelete(object entity, object id, object[] state, string[] propertyNames, IType[] types)
{
ActiveRecordHooksBase hookTarget = entity as ActiveRecordHooksBase;
if (hookTarget != null)
{
hookTarget.BeforeDelete(new DictionaryAdapter(propertyNames, state));
}
}