Example #1
0
        /// <summary>
        /// Check if the scope is doable
        /// </summary>
        /// <param name="proposedScope"></param>
        /// <returns></returns>
        public override string ScopeCheck(string proposedScope)
        {
            if (proposedScope == SMFlowContainer.NOSCOPE || string.IsNullOrEmpty(ConditionID) || ConditionID[0] == '(')
            {
                return(proposedScope);
            }
            int lastPeriod = ConditionID.LastIndexOf('.');

            if (lastPeriod < 0)
            {
                U.LogPopup("Expected a period. {0}", ConditionID);
                return(proposedScope);
            }
            string propPath = ConditionID.Substring(0, lastPeriod);

            return(SMFlowContainer.DetermineScope(proposedScope, propPath));
        }
        /// <summary>
        /// Check if the scope is doable
        /// </summary>
        /// <param name="proposedScope"></param>
        /// <returns></returns>
        public string ScopeCheck(string proposedScope)
        {
            if (proposedScope == SMFlowContainer.NOSCOPE || string.IsNullOrEmpty(MethodID))
            {
                return(proposedScope);
            }
            string methodPath = string.Empty;

            if (MethodID.Contains('.'))
            {
                U.SplitMethodID(MethodID, out methodPath);
                int lastPeriod = methodPath.LastIndexOf('.');
                if (lastPeriod > 0)
                {
                    methodPath = methodPath.Substring(0, lastPeriod);
                }
                else
                {
                    methodPath = string.Empty;
                }
            }
            return(SMFlowContainer.DetermineScope(proposedScope, methodPath));
        }