Пример #1
0
        public override Boolean GetResult()
        {
            Base.Vertex left  = ChildList[0];
            Base.Vertex right = ChildList[1];

            //throw new NotImplementedException();
            return(left.GetResult() == right.GetResult());
        }
Пример #2
0
        public override Boolean GetResult()
        {
            Base.Vertex left  = ChildList[0];
            Base.Vertex right = ChildList[1];

            if (right is VariableVertex)
            {
                VariableVertex variableVertex = right as VariableVertex;
                VariablesStorage.Instance.Variables.Add(variableVertex.Name, left.GetResult());
                return(left.GetResult());
            }

            if (left is VariableVertex)
            {
                VariableVertex variableVertex = left as VariableVertex;
                VariablesStorage.Instance.Variables.Add(variableVertex.Name, right.GetResult());
                return(left.GetResult());
            }

            return(false);
        }