@@ -155,22 +155,30 @@ public bool TryParseExpression(string? expression, out string error, bool ignore
155155
156156 private static string GetComparisonString ( FilterCategory type , FilterEvaluator evaluator ) => evaluator switch
157157 {
158- FilterEvaluator . Equals => type is FilterCategory . KeywordsDisplayNames ?
159- $ "{ type } .Any(e => string.Equals(e, " :
160- $ "{ type } == ",
158+ FilterEvaluator . Equals => type switch
159+ {
160+ FilterCategory . KeywordsDisplayNames => $ "{ type } .Any(e => string.Equals(e, ",
161+ FilterCategory . UserId => $ "{ type } != null && { type } .Value == ",
162+ _ => $ "{ type } == "
163+ } ,
161164 FilterEvaluator . Contains => type switch
162165 {
163166 FilterCategory . Id or FilterCategory . ActivityId => $ "{ type } .ToString().Contains",
164167 FilterCategory . KeywordsDisplayNames => $ "{ type } .Any(e => e.Contains",
168+ FilterCategory . UserId => $ "{ type } != null && { type } .Value.Contains",
165169 _ => $ "{ type } .Contains"
166170 } ,
167- FilterEvaluator . NotEqual => type is FilterCategory . KeywordsDisplayNames ?
168- $ "!{ type } .Any(e => string.Equals(e, " :
169- $ "{ type } != ",
171+ FilterEvaluator . NotEqual => type switch
172+ {
173+ FilterCategory . KeywordsDisplayNames => $ "!{ type } .Any(e => string.Equals(e, ",
174+ FilterCategory . UserId => $ "{ type } != null && { type } .Value != ",
175+ _ => $ "{ type } != ",
176+ } ,
170177 FilterEvaluator . NotContains => type switch
171178 {
172179 FilterCategory . Id or FilterCategory . ActivityId => $ "!{ type } .ToString().Contains",
173180 FilterCategory . KeywordsDisplayNames => $ "!{ type } .Any(e => e.Contains",
181+ FilterCategory . UserId => $ "{ type } != null && !{ type } .Value.Contains",
174182 _ => $ "!{ type } .Contains"
175183 } ,
176184 FilterEvaluator . MultiSelect => type switch
0 commit comments