public static Cloud AfterDelete(this Cloud cloud, string className, EngineObjectWithUserHookDelegateSynchronous hookDelegate) { return(cloud.UseHook(className, EngineHookType.AfterDelete, hookDelegate)); }
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)); })); }