示例#1
0
        private static bool CheckFilter(CXmlDriverParamRawNodes param, string filterXPath)
        {
            // check whether or not the item is implemented,
            // don't use VirtualNode here to reduce total time for parsing the control file
            string implemented = CXmlDriverParam.GetTopLevelAttributeValue_Inline(param, "Implemented");

            if (implemented != null && !bool.Parse(implemented))
            {
                return(false);
            }

            if (filterXPath == null)
            {
                return(true);
            }

            // execute xpath
            XElement tmp = param.Virtual.Element(filterXPath);
            bool     res = tmp != null;

            return(res);
        }
示例#2
0
        // 'inline' implementation without using Virtual node for perf improvement (only for internal use)
        internal static string GetTopLevelAttributeValue_Inline(CXmlDriverParamRawNodes param, string attrName)
        {
            XAttribute attr = null;

            if (param.Variation != null)
            {
                attr = param.Variation.Attribute(attrName);
            }
            if (attr == null && param.TestCase != null)
            {
                attr = param.TestCase.Attribute(attrName);
            }
            if (attr == null && param.TestModule != null)
            {
                attr = param.TestModule.Attribute(attrName);
            }
            if (attr == null)
            {
                return(null);
            }
            return(attr.Value);
        }
示例#3
0
 internal CXmlDriverParam(CXmlDriverParamRawNodes rawNodes, string defaultSection)
 {
     _rawNodes = rawNodes;
     _defaultSection = defaultSection;
 }
示例#4
0
 internal CXmlDriverParamRawNodes_Variation(XElement variationNode, XElement virtualNode, CXmlDriverParamRawNodes parentParams) : base(variationNode, virtualNode, parentParams) { }
示例#5
0
 internal CXmlDriverParamRawNodes_TestCase(XElement testCaseNode, XElement virtualNode, CXmlDriverParamRawNodes parentParams) : base(testCaseNode, virtualNode, parentParams) { }
示例#6
0
 // 'inline' implementation without using Virtual node for perf improvement (only for internal use)
 internal static string GetTopLevelAttributeValue_Inline(CXmlDriverParamRawNodes param, string attrName)
 {
     XAttribute attr = null;
     if (param.Variation != null)
         attr = param.Variation.Attribute(attrName);
     if (attr == null && param.TestCase != null)
         attr = param.TestCase.Attribute(attrName);
     if (attr == null && param.TestModule != null)
         attr = param.TestModule.Attribute(attrName);
     if (attr == null)
         return null;
     return attr.Value;
 }
示例#7
0
 internal CXmlDriverParamRawNodes(XElement originalNode, XElement virtualNode, CXmlDriverParamRawNodes parentParams)
 {
     this.poriginalNode = originalNode;
     this.pvirtualNode = virtualNode;
     this.pparentParams = parentParams;
 }
示例#8
0
        private static bool CheckFilter(CXmlDriverParamRawNodes param, string filterXPath)
        {
            // check whether or not the item is implemented,
            // don't use VirtualNode here to reduce total time for parsing the control file
            string implemented = CXmlDriverParam.GetTopLevelAttributeValue_Inline(param, "Implemented");
            if (implemented != null && !bool.Parse(implemented))
                return false;

            if (filterXPath == null)
                return true;

            // execute xpath
            XElement tmp = param.Virtual.Element(filterXPath);
            bool res = tmp != null;
            return res;
        }
示例#9
0
 internal CXmlDriverParamRawNodes_Variation(XElement variationNode, XElement virtualNode, CXmlDriverParamRawNodes parentParams) : base(variationNode, virtualNode, parentParams)
 {
 }
示例#10
0
 internal CXmlDriverParamRawNodes_TestCase(XElement testCaseNode, XElement virtualNode, CXmlDriverParamRawNodes parentParams) : base(testCaseNode, virtualNode, parentParams)
 {
 }
示例#11
0
 internal CXmlDriverParamRawNodes(XElement originalNode, XElement virtualNode, CXmlDriverParamRawNodes parentParams)
 {
     this.poriginalNode = originalNode;
     this.pvirtualNode  = virtualNode;
     this.pparentParams = parentParams;
 }
示例#12
0
 internal CXmlDriverParam(CXmlDriverParamRawNodes rawNodes, string defaultSection)
 {
     _rawNodes       = rawNodes;
     _defaultSection = defaultSection;
 }