Esempio n. 1
0
        private object ToRectangle(string s)
        {
            var expression = (Expression)ToExpression(s);

            var rectangle = EvaluationHelper.AsRectangle(null, expression, null);

            if (rectangle == null)
            {
                return(Failure);
            }

            return(rectangle.Value);
        }
Esempio n. 2
0
        Object ToRectangle(String s)
        {
            Evaluation.Expression expression = (Evaluation.Expression)ToExpression(s);

            Rectangle?rectangle = EvaluationHelper.AsRectangle(null, expression, null);

            if (rectangle == null)
            {
                return(Failure);
            }

            return(rectangle.Value);
        }
Esempio n. 3
0
        private object ToVector3(string s)
        {
            if (TryConvert(s, out Expression expression) == false)
            {
                return(Failure);
            }

            var vector = EvaluationHelper.AsVector3(null, expression, null);

            if (vector == null)
            {
                return(Failure);
            }

            return(vector.Value);
        }
Esempio n. 4
0
        private object ToPoint(string s)
        {
            if (TryConvert(s, out Expression expression) == false)
            {
                return(Failure);
            }

            var point = EvaluationHelper.AsPoint(null, expression, null);

            if (point == null)
            {
                return(Failure);
            }

            return(point.Value);
        }
Esempio n. 5
0
        Object ToVector2(String s)
        {
            Evaluation.Expression expression;
            if (TryConvert <Evaluation.Expression>(s, out expression) == false)
            {
                return(Failure);
            }

            Vector2?vector = EvaluationHelper.AsVector2(null, expression, null);

            if (vector == null)
            {
                return(Failure);
            }

            return(vector.Value);
        }
Esempio n. 6
0
        Object ToPoint(String s)
        {
            Evaluation.Expression expression;
            if (TryConvert <Evaluation.Expression>(s, out expression) == false)
            {
                return(Failure);
            }

            Point?point = EvaluationHelper.AsPoint(null, expression, null);

            if (point == null)
            {
                return(Failure);
            }

            return(point.Value);
        }