Ejemplo n.º 1
0
        internal static List <TableRelationFilterLine> GetTableRelationFilters(ref string propertyValue)
        {
            var result = new List <TableRelationFilterLine>();

            if (!Parsing.TryMatch(ref propertyValue, @"^\s?WHERE\s?\("))
            {
                return(result);
            }

            do
            {
                var fieldName = Parsing.MustMatch(ref propertyValue, @"^([^=]+)=").Groups[1].Value;
                var type      = Parsing.MustMatch(ref propertyValue, @"(CONST|FILTER|FIELD)").Groups[1].Value;
                Parsing.MustMatch(ref propertyValue, @"^\(");
                var value = Parsing.MatchUntilUnnested(ref propertyValue, ')', '(');
                // var value = Parsing.MustMatch(ref propertyValue, @"\(([^\)]*)\)").Groups[1].Value;
                result.Add(new TableRelationFilterLine(fieldName, type, value, false, false));
            }while (Parsing.TryMatch(ref propertyValue, @"^,\s?"));

            Parsing.MustMatch(ref propertyValue, @"^\)");

            return(result);
        }
Ejemplo n.º 2
0
        internal static void SetSIFTLevelsProperty(this SIFTLevelsProperty property, string propertyValue)
        {
            propertyValue = RemoveSurroundingSquareBrackets(propertyValue);

            while (!string.IsNullOrEmpty(propertyValue))
            {
                var siftLevelLine = Parsing.MustMatch(ref propertyValue, @"^\{(.*?)\}").Groups[1].Value;
                var fields        = siftLevelLine.Split(",".ToCharArray());
                var siftLevel     = property.Value.Add(new SIFTLevel());

                foreach (var field in fields)
                {
                    var field2    = field;
                    var match     = Parsing.MustMatch(ref field2, @"^([^:]+)(:(.*))?");
                    var fieldName = match.Groups[1].Value;
                    var aspect    = match.Groups[3].Value;

                    siftLevel.Components.Add(new SIFTLevelComponent(fieldName, aspect));
                }

                Parsing.TryMatch(ref propertyValue, @"^,\s?");
            }
        }
Ejemplo n.º 3
0
 internal static bool GetCalcFormulaFilterOnlyMaxLimit(ref string value)
 {
     return(Parsing.TryMatch(ref value, @"^\(UPPERLIMIT"));
 }
Ejemplo n.º 4
0
 internal static bool GetCalcFormulaFilterValueIsFilter(ref string value)
 {
     return(Parsing.TryMatch(ref value, @"^\(FILTER"));
 }
Ejemplo n.º 5
0
 internal static string GetCalcFormulaMethodText(ref string propertyValue)
 {
     return(Parsing.MustMatch(ref propertyValue, @"^([^\(]+)\(").Groups[1].Value);
 }
Ejemplo n.º 6
0
 internal static bool GetCalcFormulaReverseSign(ref string propertyValue)
 {
     return(Parsing.TryMatch(ref propertyValue, @"^-"));
 }