@net.sf.jni4net.attributes.ClrMethod("([[LSystem/EventHandler`1;)V")
public native void addConnectionStateChanged(system.MulticastDelegate value);
I'm trying to add a MulticastDelegate and having difficulty.
I looked at an example from your a previous posting and tried to use:
new system.EventHandler(){
Invoke(...) {do something}
}
and also
new system.AsyncCallback() {
Invoke(...) { do something }
}
In both cases we get this:
Exception in thread "main" System.ArgumentNullException: Value cannot be null.
Parameter name: method
at System.Delegate.CreateDelegate(Type type, Object firstArgument, MethodInfo method, Boolean throwOnBindFailure)
at System.Delegate.CreateDelegate(Type type, Object firstArgument, MethodInfo method)
at net.sf.jni4net.utils.Convertor.StrongJ2CpDelegate[TRes](JNIEnv env, JniLocalHandle obj)
...
I saw in a previous posting that you recommended creating a C# wrapper.
We are trying to use jni4net because our companies only does development in Java.
We don't wish to have separate skill-sets, tooling, pipelines, etc for C# so making this work without a C# wrapper would be highly preferable.
Shawn