예제 #1
0
        public override void OnSaved(object sender, EntityAfterEventArgs e)
        {
            base.OnSaved(sender, e);
            Entity entity        = (Entity)sender;
            var    operationArgs = new EntityOwnerEventAsyncOperationArgs(entity, e);

            if (entity.UserConnection.GetIsFeatureEnabled("ChangeEntityActivitiesAndProcessOwner") &&
                IsOwnerChanged(operationArgs))
            {
                operationArgs.OwnerColumnName = OwnerColumnName;
                var asyncExecutor = ClassFactory
                                    .Get <IEntityEventAsyncExecutor>(new ConstructorArgument("userConnection", entity.UserConnection));
                RunExecutor <EntityActivityOwnerAsyncExecutor>(asyncExecutor, operationArgs);
                RunExecutor <EntityProcessElementDataOwnerAsyncExecutor>(asyncExecutor, operationArgs);
            }
        }
예제 #2
0
 protected virtual void RunExecutor <T>(IEntityEventAsyncExecutor asyncExecutor, EntityOwnerEventAsyncOperationArgs operationArgs)
     where T : IAsyncOperation
 {
     asyncExecutor.ExecuteAsync <T>(operationArgs);
 }