예제 #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;
 }