Skip to content

Instantly share code, notes, and snippets.

@dainis-j
Created April 18, 2023 15:13
Show Gist options
  • Save dainis-j/3150d5ebf7d2a45c8380ed69e4f845ee to your computer and use it in GitHub Desktop.
Save dainis-j/3150d5ebf7d2a45c8380ed69e4f845ee to your computer and use it in GitHub Desktop.
Demonstration of incorrect character escaping in Gridify.
using Gridify;
var query = new GridifyQuery
{
Filter = @"(name=*\\)",
PageSize = 10,
};
var games = new List<Game>
{
new (DateOnly.Parse("01.02.2023"), @"Adventures of Bob"),
new (DateOnly.Parse("12.07.2022"), @"Shaken"),
new (DateOnly.Parse("05.04.2021"), @"Hack \ Slash"),
new (DateOnly.Parse("23.11.2016"), @"Journey to the Depths"),
}.AsQueryable();
var result = games.ApplyFiltering(query);
foreach (var game in games)
{
Console.WriteLine($"{game} - {result.Any(r => r == game)}");
}
internal record Game(DateOnly ReleasedOn, string Name);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment