Beispiel #1
0
        internal static WfActionCollection GetActions(string actionNames)
        {
            WfActionCollection actions = new WfActionCollection();

            if (actionNames.IsNotEmpty())
            {
                string[] actionStrArray = actionNames.Split(new char[] { ',', ';' }, StringSplitOptions.RemoveEmptyEntries);

                WfActionSettings actionSettings = WfActionSettings.GetConfig();

                foreach (string actionName in actionStrArray)
                {
                    try
                    {
                        actions.Add(actionSettings.GetAction(actionName));
                    }
                    catch (Exception ex)
                    {
                        WriteToLog(ex);
                    }
                }
            }

            return(actions);
        }
        private static object CallUserFunctionsPlugIns(string funcName, ParamObjectCollection paramObjects, object callerContext)
        {
            object result = null;

            foreach (IWfCalculateUserFunction uf in WfActionSettings.GetConfig().Functions)
            {
                result = uf.CalculateUserFunction(funcName, paramObjects, callerContext);

                if (result != null)
                {
                    break;
                }
            }

            return(result);
        }