コード例 #1
0
 public static XmlLog getOrCreateXmlLog(String varName)
 {
     if (LogProcessor.variables.ContainsKey(varName))
     {
         LogProcessor.variables.TryGetValue(varName, out LogVar logVar);
         if (logVar.GetType().IsInstanceOfType(new XmlLog()))
         {
             XmlLog xmlLog = ((XmlLog)logVar);
             xmlLog.varName = varName;
             return((XmlLog)logVar);
         }
         else
         {
             XmlLog xmlLog = new XmlLog();
             xmlLog.varName = varName;
             LogProcessor.variables.Add(varName, xmlLog);
         }
         return(null);
     }
     else
     {
         XmlLog xmlLog = new XmlLog();
         xmlLog.varName = varName;
         LogProcessor.variables.Add(varName, xmlLog);
         return(xmlLog);
     }
 }
コード例 #2
0
        public static XmlLog getOrCreateXmlLog(string varName, XmlDocument doc)
        {
            XmlLog xmlLog = getOrCreateXmlLog(varName);

            xmlLog.xmlDocument = doc;
            return(xmlLog);
        }
コード例 #3
0
        //TODO add min length check?

        public override string calculate(string input)
        {
            String rtrn   = "";
            XmlLog xmlLog = getOrCreateXmlLog(varName);

            rtrn = xmlLog.xmlDocument.FirstChild.Name;

            return(rtrn);
        }