| Artur Mustaifn's profile.NET Tips and TricksBlogListsNetwork | Help |
|
December 15 Working HistoryHello, geeks! Problem with ProxyGen: ProxyGen.exe Error: 0 : Error: Generics are not supported. Type IParent`1 contains generic parameters and will be excluded. Its occurrences will be replaced by This is a real-world sample:
Solution: if someone have generics interfaces, and even classes, it is possible to create an addditional assembly (non-generics to generics layer), strong named it and add a reference to original assembly in proxy configuration. I my case it simply adds an an additional surface. Bisimilla! Shown below:
So my VSTA proxy uses Data Proxy Layer, not a Data Layer due to the generics and therefore ProxyGen.exe generates a TypeInfrastructureManager class in a ordinal way. All we need to do is to cast back each time we are using a ...Proxy version of an interface or impement GetInterface() in each of interfaces for safely typecasting of this references ;) Now I'm thinking about desighn for beautify my code. But it really works, in cost of additional casting. Most of them must be eliminated by the comiler if classes and interface will be properly desighned. This is not a lot of work to do, in fact. Bye! TrackbacksThe trackback URL for this entry is: http://hack2root.spaces.live.com/blog/cns!1C2A9F9C1727376F!141.trak Weblogs that reference this entry
|
|
|