the enums are not implemented yet. The java enum works just because
they are public static fields on the type.
To define the C# enum type as a proxy, you have to wrap it using
proxygen. Then the proxygen could use the proxy type in proxy
parameters.
And then possibly you could use system.Enum.Parse(Type enumType, String value)
As I said, it's not implemented or tested well, so there will be bumps
on the road.
Pavel
> --
> You received this message because you are subscribed to jni...@googlegroups.com
> http://groups.google.com/group/jni4net?hl=en-GB?hl=en-GB
> http://jni4net.sf.net/
>
Note, there are no values to be used from Java side. But you could
hold strongly typed proxy of it, if it was created on CLR side for
you.
For example via system.Enum.Parse(Type enumType, String value)
> Also Any idean what is the future plan / roadmap for jni4net?
See the other email on this group.
public static void main(String arsg[]) throws IOException {Bridge.init();Bridge.LoadAndRegisterAssemblyFrom(new java.io.File("E:/phillippe/wrapper/work/T4Definitions.40.dll"));Bridge.LoadAndRegisterAssemblyFrom(new java.io.File("E:/phillippe/wrapper/work/T4API.40.dll"));Enum e = (Enum) Enum.Parse(APIServerType.typeof(),"Simulator");Host.Login(e, "T4Example", "112A04B0-5AAF-42F4-994E-FA7CB959C60B");}}
Exception in thread "main" System.ArgumentNullException: La valeur ne peut pas être null.Nom du paramètre : enumTypeà System.Enum.TryParseEnum(Type enumType, String value, Boolean ignoreCase, EnumResult& parseResult)à System.Enum.Parse(Type enumType, String value, Boolean ignoreCase)à System.__Enum.Parse19(IntPtr __envp, JniLocalHandle __class, JniLocalHandle enumType, JniLocalHandle value)at system.Enum.Parse(Native Method)at Main.main(Main.java:39)