Add guid parsing in filters

This commit is contained in:
Zoe Roux 2023-12-05 22:34:32 +01:00
parent f4442fad0c
commit a218271001

View File

@ -172,6 +172,13 @@ public abstract record Filter<T> : Filter
select float.Parse($"{a}.{b}") as object;
}
if (type == typeof(Guid))
{
return
from guid in Parse.Regex(@"[({]?[a-fA-F0-9]{8}[-]?([a-fA-F0-9]{4}[-]?){3}[a-fA-F0-9]{12}[})]?", "Guid")
select Guid.Parse(guid) as object;
}
if (type == typeof(string))
{
return (