コード例 #1
0
        /// <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);
        }
コード例 #2
0
 protected virtual void RunExecutor <T>(IEntityEventAsyncExecutor asyncExecutor, EntityOwnerEventAsyncOperationArgs operationArgs)
     where T : IAsyncOperation
 {
     asyncExecutor.ExecuteAsync <T>(operationArgs);
 }