Open GoogleCodeExporter opened 9 years ago
Do you have a complete repro I can look at?
Original comment by marc.gravell
on 6 Dec 2012 at 6:20
The attach file is my test project in Visual C# 2012. My idea also include in
this project.
Thanks for looking my issue!
Original comment by congdong...@gmail.com
on 7 Dec 2012 at 2:36
Attachments:
That refers to the `T` in `TestClass<int>.GenericMethod<T>`, which is an open
generic type (meaning: it has not been specified); quite simply, protobuf-net
is not expecting to handle that, and I'm not sure it would be useful to add it.
If you really really need to support open generic types, feel free to hook the
RuntimeTypeModel.Default.DynamicTypeFormatting event which will allow you to
customise this logic in both directions (just fill in whichever property is
`null`).
More likely, however, is that you need to support the *closed* generic method,
i.e. `TestClass<int>.GenericMethod<string>`. That works *currently*: you simply
haven't told it what `T` to use. For example:
System.Reflection.MethodInfo method = typeof(TestClass<int>).GetMethod("GenericMethod").MakeGenericMethod(typeof(string));
Original comment by marc.gravell
on 7 Dec 2012 at 7:41
I know that 'T' is an open generic type, but I want to build a RMI library use
in client server application (support method overloading), so I have to
serialize the method with method name, parameter types and some others!
I think, this very useful!
Original comment by congdong...@gmail.com
on 7 Dec 2012 at 12:06
Original issue reported on code.google.com by
congdong...@gmail.com
on 6 Dec 2012 at 11:16