public AUObjectOperationActionCollection GetActions()
        {
            AUObjectOperationActionCollection actions = new AUObjectOperationActionCollection();

            foreach (SCObjectOperationActionConfigurationElement actionElem in Actions)
            {
                try
                {
                    actions.Add((IAUObjectOperationAction)actionElem.CreateInstance());
                }
                catch (Exception ex)
                {
                    WriteToLog(ex);
                }
            }

            return(actions);
        }
예제 #2
0
        private void ExecuteWithActions(AUOperationType operationType, Action action)
        {
            AUCommon.DoDbAction(() =>
            {
                MCS.Library.SOA.DataObjects.Security.Locks.SCDataOperationLockContext.Current.DoAddLockAction(this._AddLock, EnumItemDescriptionAttribute.GetDescription(operationType), () =>
                {
                    if (this._NeedExecuteActions && action != null)
                    {
                        AUObjectOperationActionCollection actions = AUObjectOperationActionSettings.GetConfig().GetActions();

                        actions.BeforeExecute(operationType);

                        action();

                        actions.AfterExecute(operationType);
                    }
                    else
                    {
                        action();
                    }
                });
            });
        }