Ejemplo n.º 1
0
        public static ConstantBaseFilterSubExpression Create(NullExpressionToken token)
        {
            if (token is null)
            {
                throw new ArgumentNullException(nameof(token));
            }

            return(new NullConstantFilterSubExpression());
        }
        private static List <FilterExpressionToken> ReplaceNullTokens(List <FilterExpressionToken> tokens)
        {
            List <FilterExpressionToken> retList = tokens.AsEnumerable().ToList();

            for (int i = 0; i < retList.Count; i++)
            {
                if (retList[i] is PrimitiveExpressionToken pet && pet.Token is PropertyToken pt &&
                    pt.StringValue == "null")
                {
                    retList[i] = new NullExpressionToken(tokens[i].StartIndex);
                }
            }

            return(retList);
        }