/// <summary>
/// Called just before an object is initialized
/// </summary>
/// <param name="entity"></param>
/// <param name="id"></param>
/// <param name="propertyNames"></param>
/// <param name="state"></param>
/// <param name="types"></param>
/// <remarks>
/// The interceptor may change the <c>state</c>, which will be propagated to the persistent
/// object. Note that when this method is called, <c>entity</c> will be an empty
/// uninitialized instance of the class.</remarks>
/// <returns><c>true</c> if the user modified the <c>state</c> in any way</returns>
public override bool OnLoad(object entity, object id, object[] state, string[] propertyNames, IType[] types)
{
ActiveRecordHooksBase hookTarget = entity as ActiveRecordHooksBase;
if (hookTarget != null)
{
return(hookTarget.BeforeLoad(id, new DictionaryAdapter(propertyNames, state)));
}
return(false);
}