public static Cloud UseHook(this Cloud cloud, string className, EngineHookType hookType, EngineObjectWithUserHookDelegateSynchronous hookDelegate) { return(cloud.UseHook(className, hookType, (EngineObjectHookContext context) => { return Task.Factory.StartNew(() => hookDelegate(context.TheObject, context.By)); })); }
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); })); }
public static Cloud UseHook(this Cloud cloud, string className, EngineHookType hookType, EngineHookDelegateSynchronous hookDelegate) { EngineHookDelegate del = (context) => { return(Task.Factory.StartNew(() => hookDelegate(context))); }; return(cloud.UseHook(className, hookType, del)); }
public static Cloud UseHook <TAVObject>(this Cloud cloud, EngineHookType hookType, EngineObjectHookDelegate <TAVObject> hookDelegate) where TAVObject : AVObject { var className = AVObject.GetSubClassName <TAVObject>(); return(cloud.UseHook(className, hookType, (EngineObjectHookContext context) => { return hookDelegate(context.TheObject as TAVObject); })); }
public static Cloud UseHookClass <THookClass>(this Cloud cloud, THookClass hook = null) where THookClass : class { var tupple = ReflectHooks <THookClass>(hook); tupple.ForEach(t => { cloud.UseHook(t.Item1, t.Item2, t.Item3); }); return(cloud); }
public static Cloud BeforeDelete(this Cloud cloud, string className, EngineHookDelegate hookDelegate) { return(cloud.UseHook(className, EngineHookType.BeforeDelete, hookDelegate)); }
public static Cloud AfterUpdate(this Cloud cloud, string className, EngineHookDelegateSynchronous hookDelegate) { return(cloud.UseHook(className, EngineHookType.AfterUpdate, hookDelegate)); }
public static Cloud AfterSave(this Cloud cloud, string className, EngineHookDelegate hookDelegate) { return(cloud.UseHook(className, EngineHookType.AfterSave, hookDelegate)); }
public static Cloud BeforeSave(this Cloud cloud, string className, EngineHookDelegateSynchronous hookDelegate) { return(cloud.UseHook(className, EngineHookType.BeforeSave, hookDelegate)); }
public static Cloud AfterDelete <TAVObject>(this Cloud cloud, EngineObjectWithUserHookDelegate <TAVObject> hookDelegate) where TAVObject : AVObject { cloud.UseHook(EngineHookType.AfterDelete, hookDelegate); return(cloud); }
public static Cloud BeforeDelete <TAVObject>(this Cloud cloud, EngineObjectHookDelegate <TAVObject> hookDelegate) where TAVObject : AVObject { cloud.UseHook(EngineHookType.BeforeDelete, hookDelegate); return(cloud); }
public static Cloud AfterDelete(this Cloud cloud, string className, EngineObjectWithUserHookDelegate hookDelegate) { return(cloud.UseHook(className, EngineHookType.AfterDelete, hookDelegate)); }
public static Cloud BeforeUpdate(this Cloud cloud, string className, EngineObjectWithUserHookDelegateSynchronous hookDelegate) { return(cloud.UseHook(className, EngineHookType.BeforeUpdate, hookDelegate)); }
public static Cloud BeforeSave(this Cloud cloud, string className, EngineObjectWithUserHookDelegate hookDelegate) { return(cloud.UseHook(className, EngineHookType.BeforeSave, hookDelegate)); }