System.Data in Mono
Has System.Data in Mono been expanded to include extra functionality? I'm attempting to make use of the SQL Parser written for Mono in Mono.Data.SqlExpressions but when all the classes in the SqlExpressions namespace have been included the project still fails to compile because the classes in System.Data do not match.
Example, System.Data.DataColumn does not define the PropertyChanged event. Will I need to use the Mono System.Data libraries instead? When the Mono DataColumn class is included in the project this compilation error does not occur (it references classes such as DataCategory, which aren't found in the .Net framework).
Alternatively, any help on how to port the Sql Parser in Mono to Microsoft's .Net framework would be appreciated. I have attempted to download the source and add the missing libraries to the project but this approach appears flawed. The number of missing dependencies seems to increase instead of resolving the issue.
Mono tried to be binary and API compatible with MS's implementation. That means that except for a few internal support methods and classes, all the APIs exposed by Mono should match 101 with MS .Net's. This is to avoid complication like people assuming a method exists because it compiles in Mono and then it doesn't work on MS.Net after all.
When new code and features are implemented by Mono contributors it's usually incorporated in a separate assembly and project. Mono.Data as the name suggests is such an "extension" so it makes sense you need to include all the dependent assemblies to be able to build it. If Mono.Data.dll and its deps will run on MS.Net or not its a matter or checking the docs and testing it.
As for you second question, I can't tell you specifics but unless the code has specific intructions to be run on Windows it will most likely require a lot of work to port. As with any API a lot of code isn't exposed to the public interfaces and internal features of the implementation need to be worked around when porting the code. I would suggest you take sometime analysing how the code works and then try to make it run on MS.Net by removing as much deps on Mono code as it makes sense. In the end if the code is compatible enough you should consider patching Mono's source with compilation intructions and #if !MONO pragmas to save the trouble to future users.
链接地址: http://www.djcxy.com/p/52212.html上一篇: Mono的VB.Net支持是否准备好用于制作网站?
下一篇: Mono中的System.Data