FeatureKey<Class> mechanism in C# doesn't work
SaxonCS had adopted the same scheme of defining FeatureKey as a generic class parameterised by the type of the property. In Java this means you can do
and you get a type error if you try to supply a string rather than a boolean.
On C# this doesn't work.
Firstly, you have to specify the type explicitly:
which tends to outweigh any convenience factor.
More seriously, it's not possible to do
processor.setProperty(FeatureKey<URIResolver>.URI_RESOLVER, new MyResolver())
MyResolver is a subclass of
I'm therefore proposing to degenerify Feature and FeatureKey, with a loss of type-safety by an improvement in usability.
This is an incompatible change.
Please register to edit this issue