/// <summary> /// /// </summary> /// <param name="xmlNode"></param> /// <param name="mainForm"></param> /// <param name="valueFields"></param> /// <returns></returns> private static XmlDocument Invoke(XmlNode xmlNode, MainForm mainForm, IDictionary <String, String> valueFields) { XmlDocument result; XmlDocument configFileDocument = new XmlDocument(); configFileDocument.Load(xmlNode.Attributes["configfilepath"].Value); XmlNodeList parameterNodeList = xmlNode.SelectNodes("parameters/parameter"); XmlNodeList setvaluefieldNodeList = xmlNode.SelectNodes("setvaluefields/setvaluefield"); XmlNodeList assertNodeList = xmlNode.SelectNodes("asserts/assert"); XmlNodeList logList = xmlNode.SelectNodes("logs/log"); HandleParmeter(configFileDocument, parameterNodeList, valueFields); result = OuterRunHelper.InvokeMethod(xmlNode.Attributes["method"].Value, configFileDocument, mainForm); HandleAssert(assertNodeList, result); HandleSetvaluefield(result, setvaluefieldNodeList, valueFields); HandleLog(result, logList, valueFields); return(result); }
public static MainForm CreateMainFrom(string asmPath) { lock (locker) { if (asmPath != null) { if (asmPath != String.Empty) { if (!mainFromList.ContainsKey(asmPath)) { MainForm newMainFrom = OuterRunHelper.CreateMainForm(asmPath); mainFromList.Add(asmPath, newMainFrom); } } } return(mainFromList[asmPath]); } }