Example #1
0
 /// <summary>
 /// retruns result of link condition according to the level
 /// </summary>
 /// <param name="level"></param>
 /// <returns></returns>
 internal bool GetLinkconditionValue(LnkEval_Cond level)
 {
     if (LinkEvaluationConditionLevel == level)
     {
         return(LinkHeader.EvaluateLinkCondition());
     }
     return(true);
 }
Example #2
0
        /// <summary>
        ///   parse the link XML tag
        /// </summary>
        /// <param name = "tokensVector">the vector of attributes and their values</param>
        protected virtual void setAttribute(string attribute, string valueStr)
        {
            switch (attribute)
            {
            case XMLConstants.MG_ATTR_ID:
                _id = XmlParser.getInt(valueStr);
                break;

            case ConstInterface.MG_ATTR_KEY:
                _keyIdx = XmlParser.getInt(valueStr);
                break;

            case ConstInterface.MG_ATTR_KEY_EXP:
                KeyExpression = XmlParser.getInt(valueStr);
                break;

            case ConstInterface.MG_ATTR_DIR:
                _dir = valueStr[0];
                break;

            case ConstInterface.MG_ATTR_COND:
            case ConstInterface.MG_ATTR_COND_RES:
                _cond.setVal(_task, valueStr);
                break;

            case ConstInterface.MG_ATTR_RET_VAL:
                _retVal = valueStr;

                break;

            case ConstInterface.MG_ATTR_LINK_EVAL_CONDITION:
                _linkEvalCondition = (LnkEval_Cond)valueStr[0];
                break;

            case ConstInterface.MG_ATTR_LINK_MODE:
                Mode = (LnkMode)valueStr[0];
                break;

            case ConstInterface.MG_ATTR_LINK_START:
                LinkStartAfterField = XmlParser.getInt(valueStr);
                break;

            default:
                Logger.Instance.WriteExceptionToLog(string.Format("Unrecognized attribute: '{0}'", attribute));
                break;
            }
        }