/// <summary> /// Handles entity Saved event. /// </summary> /// <param name="sender">Event sender.</param> /// <param name="e">The <see cref="T:Terrasoft.Core.Entities.EntityAfterEventArgs" /> instance containing the /// event data.</param> public override void OnSaved(object sender, EntityAfterEventArgs e) { base.OnSaved(sender, e); UserConnection userConnection = ((Entity)sender).UserConnection; IEntityEventAsyncExecutor asyncExecutor = ClassFactory.Get <IEntityEventAsyncExecutor>(new ConstructorArgument("userConnection", userConnection)); var operationArgs = new EntityEventAsyncOperationArgs((Entity)sender, e); asyncExecutor.ExecuteAsync <OpportunityRightsAsyncRegulator>(operationArgs); }
protected virtual void RunExecutor <T>(IEntityEventAsyncExecutor asyncExecutor, EntityOwnerEventAsyncOperationArgs operationArgs) where T : IAsyncOperation { asyncExecutor.ExecuteAsync <T>(operationArgs); }