예제 #1
0
파일: Condition.cs 프로젝트: Tkachov/sdf
        internal override bool Matches(SDF sdf, SDF parent, string attributeName)
        {
            // point of "attr_" and [@attr...] predicates is that we select a node,
            // which has an attribute with given name and this attribute meets a certain condition
            var node = sdf as Node;

            if (node == null)
            {
                return(false);
            }

            if (!node.Attributes.ContainsKey(AttributeName))
            {
                return(false);
            }

            var attr = node.Attributes[AttributeName];

            return(OperatorCondition.MeetsCondition(attr));
        }
예제 #2
0
파일: Condition.cs 프로젝트: Tkachov/sdf
 internal override bool Matches(SDF sdf, SDF parent, string attributeName)
 {
     return(_operatorCondition.MeetsCondition(sdf));
 }