Binboo.Core.Tests.Tests.CustomFilters.CustomFilterPredicateTestCase.CompileAndRunCustomFilter C# (CSharp) Method

CompileAndRunCustomFilter() private method

private CompileAndRunCustomFilter ( FileSystemWatcher watcher, string trickCode ) : bool
watcher System.IO.FileSystemWatcher
trickCode string
return bool
        private bool CompileAndRunCustomFilter(FileSystemWatcher watcher, string trickCode)
        {
            watcher.EnableRaisingEvents = true;
            bool included;
            using (var pred = PredicateServices.Compile<Subject>("item", trickCode))
            {
                included = pred.Include(new Subject("adriano carlos verona"));
                watcher.EnableRaisingEvents = false;
            }
            return included;
        }