Use PredicateContext (under development in SDK) instead of a custom Context class
Support Windows too (use InputStream instead of CString)