private bool CompareInt()

in Scripts/Runtime/CallbackHandlers/WitResponseMatcher.cs [176:203]


        private bool CompareInt(string value, ValuePathMatcher matcher)
        {

            // This one is freeform based on the input so we will retrun false if it is not parsable
            if (!int.TryParse(value, out int dValue)) return false;

            // We will throw an exception if match value is not a numeric value. This is a developer
            // error.
            int dMatchValue = int.Parse(matcher.matchValue);

            switch (matcher.comparisonMethod)
            {
                case ComparisonMethod.Equals:
                    return dValue == dMatchValue;
                case ComparisonMethod.NotEquals:
                    return dValue != dMatchValue;
                case ComparisonMethod.Greater:
                    return dValue > dMatchValue;
                case ComparisonMethod.Less:
                    return dValue < dMatchValue;
                case ComparisonMethod.GreaterThanOrEqualTo:
                    return dValue >= dMatchValue;
                case ComparisonMethod.LessThanOrEqualTo:
                    return dValue <= dMatchValue;
            }

            return false;
        }