public static Cloud AfterDelete <TAVObject>(this Cloud cloud, EngineObjectWithUserHookDelegate <TAVObject> hookDelegate) where TAVObject : AVObject { cloud.UseHook(EngineHookType.AfterDelete, hookDelegate); return(cloud); }
public static Cloud UseHook <TAVObject>(this Cloud cloud, EngineHookType hookType, EngineObjectWithUserHookDelegate <TAVObject> hookDelegate) where TAVObject : AVObject { var className = AVObject.GetSubClassName <TAVObject>(); cloud.UseHook(className, hookType, (EngineObjectHookContext context) => { return(hookDelegate(context.TheObject as TAVObject, context.By)); }); return(cloud); }
public static Cloud BeforeSave(this Cloud cloud, string className, EngineObjectWithUserHookDelegate hookDelegate) { return(cloud.UseHook(className, EngineHookType.BeforeSave, hookDelegate)); }
public static Cloud AfterDelete(this Cloud cloud, string className, EngineObjectWithUserHookDelegate hookDelegate) { return(cloud.UseHook(className, EngineHookType.AfterDelete, hookDelegate)); }
public static Cloud UseHook(this Cloud cloud, string className, EngineHookType hookType, EngineObjectWithUserHookDelegate hookDelegate) { return(cloud.UseHook(className, hookType, (EngineObjectHookContext context) => { return hookDelegate(context.TheObject, context.By); })); }