Пример #1
0
        public override XElement Serialize()
        {
            XElement el = new XElement("ConditionPreviousRank");

            el.Add(new XAttribute("val", Rank.GetFullName()));
            el.Add(new XAttribute("op", Comparison.ToString()));
            return(el);
        }
Пример #2
0
        private string GetComparisonExpressionFormat(ComparisonOperation operation)
        {
            switch (operation)
            {
            case ComparisonOperation.Between:
                return("{0} <= {1} and {1} <= {2}");

            case ComparisonOperation.NotBetween:
                return("{0} > {1} or {1} > {2}");

            default:
                throw new ArgumentOutOfRangeException(operation.ToString() + " is not a supported linear operation.");
            }
        }
Пример #3
0
        private string GetOperationSymbol(ComparisonOperation operation)
        {
            switch (operation)
            {
            case ComparisonOperation.LessOrEqual:
                return("<=");

            case ComparisonOperation.Less:
                return("<");

            case ComparisonOperation.Equal:
                return("==");

            case ComparisonOperation.LargerOrEqual:
                return(">=");

            case ComparisonOperation.Larger:
                return(">");

            default:
                throw new ArgumentOutOfRangeException(operation.ToString() + " is not a supported linear operation.");
            }
        }