mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-17 19:10:23 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f64163bfd7 |
No files matched your search
@@ -1,179 +1,3 @@
|
||||
2003-02-17 Daniel Morgan <[email protected]>
|
||||
|
||||
* doc/provider-factory: add new web page
|
||||
about Mono.Data's ProviderFactory
|
||||
|
||||
* doc/web/commands
|
||||
* doc/web/makefile: add provider-factory web page to build
|
||||
|
||||
* doc/ado-net
|
||||
* doc/ibmdb2
|
||||
* doc/postgresql
|
||||
* doc/sqlclient
|
||||
* doc/tdsclient
|
||||
* doc/sybase
|
||||
* doc/mysql
|
||||
* doc/firebird
|
||||
* doc/oracle
|
||||
* doc/oledb
|
||||
* doc/odbc
|
||||
* doc/sqlite: updated web pages
|
||||
|
||||
2003-02-16 Martin Baulig <[email protected]>
|
||||
|
||||
* doc/jit-debug-sample
|
||||
* doc/jit-debug-sample2: Removed.
|
||||
|
||||
* doc/jit-debug: Updated.
|
||||
|
||||
2003-02-13 Daniel Morgan <[email protected]>
|
||||
|
||||
* doc/screenshots
|
||||
* doc/ado-net
|
||||
* doc/oracle
|
||||
* doc/gtk-sharp: update web pages
|
||||
|
||||
2003-02-13 Gonzalo Paniagua Javier <[email protected]>
|
||||
|
||||
* data/machine.config: added sample globalization section.
|
||||
|
||||
2003-02-12 Gonzalo Paniagua Javier <[email protected]>
|
||||
|
||||
* data/machine.config: added UrlAuthorizationModule and
|
||||
AuthenticationConfigHandler.
|
||||
|
||||
2003-02-11 Tim Coleman <[email protected]>
|
||||
* data/config.in: Add mapping for Oracle call interface
|
||||
(OCI) native libraries.
|
||||
|
||||
2003-02-04 Gonzalo Paniagua Javier <[email protected]>
|
||||
|
||||
* configure.in: added check for sys/un.h.
|
||||
|
||||
2003-01-29 Daniel Morgan <[email protected]>
|
||||
|
||||
* doc/postgresql
|
||||
* doc/mysql
|
||||
* doc/ado-net: updates to web pages
|
||||
|
||||
* man/sqlsharp.1: update to man page
|
||||
|
||||
2003-01-28 Gonzalo Paniagua Javier <[email protected]>
|
||||
|
||||
* configure.in: added WIN32_THREADS flag when building under windows.
|
||||
It seems that the header files of the gc do not always define it when
|
||||
GC_WIN32_THREADS is defined.
|
||||
|
||||
2003-01-26 Daniel Morgan <[email protected]>
|
||||
|
||||
* doc/index
|
||||
* doc/ado-net
|
||||
* doc/firebird
|
||||
* doc/ibmdb2
|
||||
* doc/mysql
|
||||
* doc/odbc
|
||||
* doc/oledb
|
||||
* doc/oracle
|
||||
* doc/postgresql
|
||||
* doc/sqlclient
|
||||
* doc/sqlite
|
||||
* doc/sybase
|
||||
* doc/tdsclient: corrections
|
||||
|
||||
2003-01-26 Duncan Mak <[email protected]>
|
||||
|
||||
* doc/jit-debug: Update the links. Thanks for Andy Oliver for the report.
|
||||
|
||||
2003-01-22 Martin Baulig <[email protected]>
|
||||
|
||||
* configure.in: Set version number to 0.19.1.
|
||||
|
||||
Heads up: I'm going to commit some changes to the debugger
|
||||
which'll require you to use this new runtime, so if you update the
|
||||
debugger from CVS, you also need this new runtime.
|
||||
|
||||
2003-01-20 Duncan Mak <[email protected]>
|
||||
|
||||
* configure.in: Bump the release number to 0.19.
|
||||
|
||||
2003-01-19 Daniel Morgan <[email protected]>
|
||||
|
||||
* doc/ibmdb2: added file which is new web page
|
||||
about IBM DB2 data provider at Mono.Data.DB2Client
|
||||
|
||||
* makefile
|
||||
* commands: added ibmdb2 web page to go-mono web site
|
||||
|
||||
* doc/ado-net: added a couple more developers email, plus made the
|
||||
email spam resistant, added Mono's DB2 data provider to list,
|
||||
added more info about the ProviderFactory and retrieving data using
|
||||
ADO.NET from ASP.NET, add notes about testing, misc cleanup
|
||||
|
||||
* doc/mysql
|
||||
* doc/postgresql
|
||||
* doc/sqlclient
|
||||
* doc/oracle
|
||||
* doc/tdsclient
|
||||
* doc/firebird
|
||||
* doc/oledb
|
||||
* doc/odbc
|
||||
* doc/sybase
|
||||
* doc/sqlite: added testing notes and C# examples
|
||||
|
||||
* doc/gtk-sharp: added links for GTK# for Windows
|
||||
|
||||
* man/sqlsharp.1: added providers Npgsql and MySQLNet
|
||||
|
||||
2003-01-17 Duncan Mak <[email protected]>
|
||||
|
||||
* runtime/Makefile.am: Add the new Mono.Data.DB2Client.dll.
|
||||
|
||||
2003-01-16 Martin Baulig <[email protected]>
|
||||
|
||||
* configure.in (GTHREAD_LIBS, GTHREAD_CFLAGS): Removed the gthread
|
||||
check again, we're now using the mono/io-layer for this.
|
||||
|
||||
Wed Jan 15 16:20:54 CET 2003 Paolo Molaro <[email protected]>
|
||||
|
||||
* configure.in: allow MacOSX (from various people).
|
||||
|
||||
2003-01-14 Martin Baulig <[email protected]>
|
||||
|
||||
* configure.in (GTHREAD_LIBS, GTHREAD_CFLAGS): Added check for gthread.
|
||||
|
||||
2002-12-27 Jeroen Janssen <[email protected]>
|
||||
* fixed url for System.Windows.Forms in the class status
|
||||
|
||||
2002-12-18 Gonzalo Paniagua Javier <[email protected]>
|
||||
|
||||
* configure.in: moved struct tm field tm_gmtoff check before the check
|
||||
for timezone global variable. This makes Timezone work for me (debian
|
||||
sid, linux, x86, which has both the field and the global variables).
|
||||
|
||||
2002-12-10 Daniel Morgan <[email protected]>
|
||||
|
||||
* doc/oracle: added file which is
|
||||
a new web page oracle.html
|
||||
|
||||
* doc/ado-net: clean up and add link
|
||||
to oracle.html
|
||||
|
||||
* doc/web/commands
|
||||
* doc/web/makefile: added oracle.html
|
||||
|
||||
2002-12-10 Daniel Morgan <[email protected]>
|
||||
|
||||
* man/Makefile.am: changed sqlsharpcli.1 to sqlsharp.1
|
||||
|
||||
* man/sqlsharpcli.1: renamed to sqlsharp.1
|
||||
|
||||
2002-12-09 Tim Haynes <[email protected]>
|
||||
|
||||
* mono/jit/jit.c
|
||||
* mono/metadata/icall.c: added mono_install_get_config_dir() to
|
||||
utilize the MONO_CFG_DIR environment variable for specifying
|
||||
different machine.configs.
|
||||
|
||||
2002-12-06 Duncan Mak <[email protected]>
|
||||
|
||||
* data/Makefile.am (EXTRA_DIST): Add machine.config
|
||||
|
||||
@@ -1,355 +1,3 @@
|
||||
Hello everyone!
|
||||
|
||||
We have made a new release of Mono available. Despite the fact
|
||||
that we just did Mono 0.18, this release is packed with new features.
|
||||
|
||||
* Availability.
|
||||
|
||||
Mono 0.19 is available in package format from:
|
||||
|
||||
http://www.go-mono.com/download.html
|
||||
|
||||
We released packages for SuSE 8.0, Mandrake 8.2, Debian and various
|
||||
Red Hat releases. It is also available from Red Carpet on the Mono
|
||||
channel.
|
||||
|
||||
Source code for Mono, MCS, the Mono Debugger, XSP is available as
|
||||
well from that web page.
|
||||
|
||||
* New in this release
|
||||
|
||||
* Remoting news:
|
||||
|
||||
Lluis has implemented and documented the Binary formatter
|
||||
Woohoo! He has done a lot of work as well to support
|
||||
remoting.
|
||||
|
||||
Patrik has also been working heavily on fixing a
|
||||
number of remoting related bugs and missing features.
|
||||
|
||||
Ajay also implemented 1-d array serialization in System.Xml
|
||||
|
||||
* New database provider: IBM DB2
|
||||
|
||||
Christopher Bockner has contributed a DB2 data
|
||||
provider for System.Data. We have a very complete
|
||||
range of data providers.
|
||||
|
||||
* System.Web.Mobile
|
||||
|
||||
Gaurav has started work on this assembly, this will
|
||||
allow us to run the unmodified reference ASP.NET
|
||||
applications that were designed to support Mobile
|
||||
browsing.
|
||||
|
||||
* System.Data and System.XML:
|
||||
|
||||
More implementation work on XmlDataDocument from Ville
|
||||
and plenty of fixes from Atsushi.
|
||||
|
||||
* MacOS patches:
|
||||
|
||||
Paolo integrated John Duncan's and Benjamin Reed
|
||||
patches to make Mono run on MacOS X out of the box.
|
||||
|
||||
* IsolatedStorage
|
||||
|
||||
The initial implementation of it was done by Jonathan
|
||||
Pryor and included in this release.
|
||||
|
||||
* Compilers:
|
||||
|
||||
More work on the Mono Visual Basic compiler (it is now
|
||||
included in the packages).
|
||||
|
||||
Plenty of bug fixes from Jackson, Miguel to the C#
|
||||
compiler.
|
||||
|
||||
Patches from Francesco and Daniel to the VB.NET
|
||||
support runtime.
|
||||
|
||||
* Debugger support
|
||||
|
||||
Plenty of updates to run the new Mono Debugger from Martin.
|
||||
|
||||
* Main missing bits:
|
||||
|
||||
Some of everyone's favorite patches or code chunks have not yet
|
||||
been integrated, hopefully Mono 0.20 will have them:
|
||||
|
||||
* Zoltan's patch to run IKVM is not yet on this release
|
||||
|
||||
* Some parts of Patrik's remoting code did not make it to the
|
||||
release either.
|
||||
|
||||
* Reggie's MySQL native provider is also missing.
|
||||
|
||||
Enjoy!
|
||||
Miguel.
|
||||
------------------------------------------------------------------------------
|
||||
Happy new year!
|
||||
|
||||
The Mono team is proud to release Mono 0.18, with plenty of bug
|
||||
fixes and improvements. If you are a happy 0.17 user, this
|
||||
release is a happiness extension release. Many bugs in the
|
||||
runtime, class libraries and C# compiler have been fixed.
|
||||
|
||||
Also, our special envoy in Japan has reported that there is
|
||||
some naming confussion about the naming of Mono, as can be
|
||||
seen in the following documentary material:
|
||||
|
||||
Atsushi Enomoto shows the source of confussion:
|
||||
|
||||
http://primates.ximian.com/~duncan/gallery/Duncan-in-Tokyo/DSCN0702
|
||||
|
||||
Nick and Duncan echo it:
|
||||
|
||||
http://primates.ximian.com/~duncan/gallery/Duncan-in-Tokyo/DSCN0703
|
||||
|
||||
* Availability
|
||||
|
||||
Mono 0.18 packages and source code is available for download from:
|
||||
|
||||
http://www.go-mono.com/download.html
|
||||
|
||||
Those using Red Carpet on Linux can install Mono 0.18 from
|
||||
the Mono channel. The packages have already been pushed for
|
||||
you.
|
||||
|
||||
At release time we have packages for Red Hat 8.0, 7.3,
|
||||
7.2 and 7.1 and Mandrake 8.2.
|
||||
|
||||
* Contributors to this release
|
||||
|
||||
This release is brought to you by:
|
||||
|
||||
Alejandro Sanchez, Alp Toker, Atsushi Enomoto, Cesar Octavio
|
||||
Lopez Netaren, Daniel Lopez (mod_mono), Daniel Morgan, Dennis
|
||||
Hayes, Dick Porter, Dietmar Maurer, Duncan Mak, Eduardo
|
||||
Garcia, Gaurav Vaish, Gonzalo Paniagua, Jackson Harper, Jaime
|
||||
Anguiano, Jeroen Janssen, Johannes Roith, Jonathan Pryor, Juli
|
||||
Mallett, Lluis Sanchez, Marco Ridoni, Martin Baulig, Miguel de
|
||||
Icaza, Nick Drochak, Paolo Molaro, Patrik Torstensson, Piers
|
||||
Haken, Rachel Hestilow, Rafael Teixeira, Ravi Pratap,
|
||||
Sebastian Pouliot, Tim Coleman, Tim Hayes, Ville Palo, Zoltan
|
||||
Varga.
|
||||
|
||||
* New in this release
|
||||
|
||||
VB.NET compiler:
|
||||
|
||||
Many improvements to the Mono VB.NET compiler.
|
||||
|
||||
ASP.NET:
|
||||
|
||||
Plenty of bug fixes in ASP.NET. Larger applications
|
||||
can now be run with it. The authentication system has
|
||||
been deployed, most changes are from Gonzalo.
|
||||
|
||||
We have a modified IBuySpy running (without Xslt)
|
||||
|
||||
If you want to run ASP.NET you can run it with either
|
||||
our XSP proof-of-concept server, or with Daniel's
|
||||
Apache module that can be fetched from CVS (module
|
||||
name: mod_apache)
|
||||
|
||||
Type Reflector:
|
||||
|
||||
A Console, Gtk# and Windows.Forms tool to browse
|
||||
compiled assemblies and examine the types on it, from
|
||||
Jonathan Pryor.
|
||||
|
||||
Moving to NUnit 2.0
|
||||
|
||||
Nick continues the work on moving our test suite to NUnit 2.0
|
||||
|
||||
Mobile.Controls:
|
||||
|
||||
Gaurav has started work on the Mobile controls, which
|
||||
are required to run some of the reference applications
|
||||
in full-mode like IBuySpy.
|
||||
|
||||
Remoting:
|
||||
|
||||
The remoting infrastructure has got a big boost from
|
||||
Lluis in this release.
|
||||
|
||||
System.Data/XML
|
||||
|
||||
Ville has been working on improving our System.Data
|
||||
classes in the XML assembly.
|
||||
|
||||
Crypto:
|
||||
|
||||
Plenty of new crypto from Sebastien as well. A new
|
||||
web page in our site can be used to track this.
|
||||
|
||||
http://www.go-mono.com/crypto.html
|
||||
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Hello!
|
||||
|
||||
Version 0.17 of Mono has been released.
|
||||
|
||||
There are plenty of new features, bug fixes, new classes,
|
||||
performance improvements, optimizations and much more
|
||||
available in this release.
|
||||
|
||||
* Stats
|
||||
|
||||
2605 cvs commits to the Mono repository since October 1st, an
|
||||
average of 37 commits per day including weekends.
|
||||
|
||||
212 commits to the Mono module.
|
||||
1438 commits to the MCS module.
|
||||
|
||||
* Mono Improvements:
|
||||
|
||||
Work has begun to make the runtime run a finalizer thread and
|
||||
invoke all the finalizers from this thread. This is the same
|
||||
behavior as Java and the Microsoft runtime, but it is disabled
|
||||
on this build.
|
||||
|
||||
Integrated the s390 work from Neale Ferguson.
|
||||
|
||||
Beginning of the work for pre-compiling code (Ahead of time
|
||||
compilation) for Mono (based on the early work of Zoltan).
|
||||
|
||||
New option `--noboundscheck' for benchmark purposes, it
|
||||
disables array bound checks.
|
||||
|
||||
Uses mmap instead of SysV shared memory for the Windows API
|
||||
emulation layer.
|
||||
|
||||
Plenty of bug fixes, improvements and integration with the
|
||||
upper layer class libraries.
|
||||
|
||||
New exception handling code uses the GCC native support for
|
||||
stack-walking if available and gives big performance boost
|
||||
(15% on mcs bootstrap).
|
||||
|
||||
A lot of the work in the new release of Mono is required for
|
||||
the Mono Debugger (which will be released separately). The
|
||||
Mono debugger is interesting, because it can debug both
|
||||
managed and unmanaged applications, but it only supports the
|
||||
JITer for debugging.
|
||||
|
||||
Dick, Dietmar, Gonzalo, Martin and Paolo were in charge of
|
||||
most of these changes.
|
||||
|
||||
* Compiler improvements:
|
||||
|
||||
Many bug fixes as usual, better C# compliancy.
|
||||
|
||||
Performance improvements. The new release of the Mono C#
|
||||
compiler is 37% faster than the previous version (self-compile
|
||||
is down to 8 seconds). On my P4 1.8Ghz machine, the Mono C#
|
||||
compiler compiles (342,000 lines per minute).
|
||||
|
||||
Thanks to go Ravi and Martin for helping out with the bug
|
||||
fixing hunt.
|
||||
|
||||
* Cryptography and Security classes
|
||||
|
||||
Sebastien Pouliot and Andrew Birkett were extremely busy
|
||||
during the past two months working on the cryptography
|
||||
classes, many of the crypto providers are now working
|
||||
|
||||
Jackson on the other hand helped us with the security
|
||||
classes, he said about those:
|
||||
|
||||
`Writing security classes is the most exciting thing I have
|
||||
ever done, I can not wait to write more of them'.
|
||||
|
||||
* ASP.NET:
|
||||
|
||||
We have now moved the code from the XSP server (which was our
|
||||
test bed for ASP.NET) into the right classes inside
|
||||
System.Web, and now any web server that was built by using the
|
||||
System.Web hosting interfaces can be used with Mono.
|
||||
|
||||
The sample XSP server still exists, but it is now just a
|
||||
simple implementation of the WorkerRequest and ApplicationHost
|
||||
classes and can be used to test drive ASP.NET. A big thanks
|
||||
goes to Gonzalo who worked on this night and day (mostly
|
||||
night).
|
||||
|
||||
Gaurav keeps helping us with the Web.Design classes, and
|
||||
improving the existing web controls.
|
||||
|
||||
* ADO.NET:
|
||||
|
||||
New providers are available in this release. The relentless
|
||||
System.Data team (Brian, Dan, Rodrigo, Tim and Ville) are
|
||||
hacking non-stop on the databse code. Improving existing
|
||||
providers, and new providers.
|
||||
|
||||
The new providers on this release:
|
||||
|
||||
* Oracle
|
||||
* MS SQL
|
||||
* ODBC
|
||||
* Sybase
|
||||
* Sqlite (for embedded use).
|
||||
|
||||
Many regression tests have been added as well (Ville has been
|
||||
doing a great job here).
|
||||
|
||||
Brian also created a DB provider multiplexor (The ProviderFactory)
|
||||
|
||||
Stuart Caborn contributed Writing XML from a DataSet.
|
||||
Luis Fernandez contributed constraint handling code.
|
||||
|
||||
Also there is new a Gtk# GUI tool from Dan that can be used to
|
||||
try out various providers.
|
||||
|
||||
* System.XML:
|
||||
|
||||
Atsushi has taken the lead in fixing and plugging the missing
|
||||
parts of the System.XML namespace, many fixes, many
|
||||
improvements.
|
||||
|
||||
* CodeDom and the C# provider.
|
||||
|
||||
Jackson Harper has been helping us with the various interface
|
||||
classes from the CodeDOM to the C# compiler, in this release
|
||||
a new assembly joins us: Cscompmgd. It is a simple assembly,
|
||||
and hence Microsoft decided not to waste an entire "System"
|
||||
"dot" on it.
|
||||
|
||||
* Testing
|
||||
|
||||
Nick Drochak has integrated the new NUnit 2.0 system.
|
||||
|
||||
* Monograph:
|
||||
|
||||
Monograph now has a --stats option to get statistics on
|
||||
assembly code.
|
||||
|
||||
|
||||
CVS Contributors to this release:
|
||||
|
||||
Alejandro Sanchez, Alp Toker, Andrew Birkett, Atsushi Enomoto,
|
||||
Brian Ritchie, Cesar Octavio Lopez Nataren, Chris Toshok,
|
||||
Daniel Morgan, Daniel Stodden, Dennis Hayes, Dick Porter,
|
||||
Diego Sevilla, Dietmar Maurer, Duncan Mak, Eduardo Garcia,
|
||||
Ettore Perazzoli, Gaurav Vaish, Gonzalo Paniagua, Jackson
|
||||
Harper, Jaime Anguiano, Johannes Roith, John Sohn, Jonathan
|
||||
Pryor, Kristian Rietveld, Mads Pultz, Mark Crichton, Martin
|
||||
Baulig, Martin Willemoes Hansen, Miguel de Icaza, Mike
|
||||
Kestner, Nick Drochak, Nick Zigarovich, Paolo Molaro, Patrik
|
||||
Torstensson, Phillip Pearson, Piers Haken, Rachel Hestilow,
|
||||
Radek Doulik, Rafael Teixeira, Ravi Pratap, Rodrigo Moya,
|
||||
Sebastien Pouliot, Tim Coleman, Tim Haynes, Ville Palo,
|
||||
Vladimir Vukicevic, and Zoltan Varga.
|
||||
|
||||
(Am sorry, I could not track everyone from the ChangeLog
|
||||
messages, I apologize in advance for the missing
|
||||
contributors).
|
||||
|
||||
------------------------------------------------------------------------
|
||||
|
||||
Hello!
|
||||
|
||||
Version 0.16 of Mono has been released! This is mostly a bug
|
||||
|
||||
@@ -19,3 +19,4 @@
|
||||
#undef MONO_SIZEOF_SUNPATH
|
||||
#undef NEED_LINK_UNLINK
|
||||
#undef PTHREAD_POINTER_ID
|
||||
#undef MONO_USE_EXC_TABLES
|
||||
-51
@@ -1,51 +0,0 @@
|
||||
/* config.h.in. Generated automatically from configure.in by autoheader 2.13. */
|
||||
|
||||
/* Define if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
#undef HAVE_INET_PTON
|
||||
#undef HAVE_INET_ATON
|
||||
#undef HAVE_SOL_IP
|
||||
#undef HAVE_SOL_TCP
|
||||
#undef HAVE_IP_PKTINFO
|
||||
#undef HAVE_STRUCT_IP_MREQN
|
||||
#undef HAVE_PTHREAD
|
||||
#undef HAVE_PTHREAD_MUTEX_TIMEDLOCK
|
||||
#undef USE_MONO_MUTEX
|
||||
#undef HAVE_LARGE_FILE_SUPPORT
|
||||
#undef PLATFORM_WIN32
|
||||
#undef HAVE_NEW_ICONV
|
||||
#undef NAME_DEV_RANDOM
|
||||
#undef HAVE_CRYPT_RNG
|
||||
#undef HAVE_BOEHM_GC
|
||||
|
||||
/* The number of bytes in a void *. */
|
||||
#undef SIZEOF_VOID_P
|
||||
|
||||
/* Define if you have the inet_aton function. */
|
||||
#undef HAVE_INET_ATON
|
||||
|
||||
/* Define if you have the inet_pton function. */
|
||||
#undef HAVE_INET_PTON
|
||||
|
||||
/* Define if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define if you have the <netdb.h> header file. */
|
||||
#undef HAVE_NETDB_H
|
||||
|
||||
/* Define if you have the <sys/filio.h> header file. */
|
||||
#undef HAVE_SYS_FILIO_H
|
||||
|
||||
/* Define if you have the <sys/sockio.h> header file. */
|
||||
#undef HAVE_SYS_SOCKIO_H
|
||||
|
||||
/* Define if you have the <utime.h> header file. */
|
||||
#undef HAVE_UTIME_H
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
+19
-44
@@ -1,18 +1,9 @@
|
||||
AC_INIT(README)
|
||||
AC_CANONICAL_SYSTEM
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AM_INIT_AUTOMAKE(mono, 0.20)
|
||||
AM_INIT_AUTOMAKE(mono, 0.17)
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
#
|
||||
# These are the flags that need to be stored in the mono.pc file for
|
||||
# compiling code that will embed Mono
|
||||
#
|
||||
libmono_cflags=""
|
||||
libmono_ldflags=""
|
||||
AC_SUBST(libmono_cflags)
|
||||
AC_SUBST(libmono_ldflags)
|
||||
|
||||
# Thread configuration inspired by sleepycat's db
|
||||
AC_MSG_CHECKING([host platform characteristics])
|
||||
case "$host" in
|
||||
@@ -21,41 +12,27 @@ case "$host" in
|
||||
AC_DEFINE(PLATFORM_WIN32)
|
||||
CC="gcc -mno-cygwin"
|
||||
HOST_CC="gcc"
|
||||
CPPFLAGS="$CPPFLAGS -DGC_WIN32_THREADS -DWIN32_THREADS"
|
||||
CPPFLAGS="$CPPFLAGS -DGC_WIN32_THREADS"
|
||||
libdl=
|
||||
;;
|
||||
*-*-*bsd*)
|
||||
platform_win32=no
|
||||
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
|
||||
libmono_cflags="-D_THREAD_SAFE"
|
||||
LDFLAGS="$LDFLAGS -pthread"
|
||||
libmono_ldflags="-pthread"
|
||||
AC_DEFINE(NEED_LINK_UNLINK)
|
||||
AC_DEFINE(PTHREAD_POINTER_ID)
|
||||
libdl=
|
||||
;;
|
||||
*-*-linux*)
|
||||
platform_win32=no
|
||||
CPPFLAGS="$CPPFLAGS -DGC_LINUX_THREADS -DMONO_USE_EXC_TABLES -D_GNU_SOURCE -D_REENTRANT -fexceptions"
|
||||
libmono_cflags="-DMONO_USE_EXC_TABLES -fexceptions -D_REENTRANT"
|
||||
libmono_ldflags="-lpthread"
|
||||
AC_DEFINE(MONO_USE_EXC_TABLES)
|
||||
CPPFLAGS="$CPPFLAGS -DGC_LINUX_THREADS -D_GNU_SOURCE -D_REENTRANT -fexceptions"
|
||||
libdl="-ldl"
|
||||
;;
|
||||
*-*-solaris*)
|
||||
platform_win32=no
|
||||
CPPFLAGS="$CPPFLAGS -DGC_SOLARIS_THREADS -DGC_SOLARIS_PTHREADS -D_REENTRANT"
|
||||
AC_DEFINE(NEED_LINK_UNLINK)
|
||||
libmono_cflags="-D_REENTRANT"
|
||||
;;
|
||||
*-*-darwin*)
|
||||
platform_win32=no
|
||||
CPPFLAGS="$CPPFLAGS -no-cpp-precomp -D_THREAD_SAFE"
|
||||
libmono_cflags="-D_THREAD_SAFE"
|
||||
LDFLAGS="$LDFLAGS -pthread"
|
||||
libmono_ldflags="-pthread"
|
||||
AC_DEFINE(NEED_LINK_UNLINK)
|
||||
AC_DEFINE(PTHREAD_POINTER_ID)
|
||||
libdl=
|
||||
;;
|
||||
*)
|
||||
AC_MSG_WARN([*** Please add $host to configure.in checks!])
|
||||
@@ -95,7 +72,7 @@ AC_HEADER_STDC
|
||||
AC_LIBTOOL_WIN32_DLL
|
||||
AM_PROG_LIBTOOL
|
||||
|
||||
AC_CHECK_HEADERS(sys/filio.h sys/sockio.h netdb.h utime.h semaphore.h sys/un.h)
|
||||
AC_CHECK_HEADERS(sys/filio.h sys/sockio.h netdb.h utime.h semaphore.h)
|
||||
|
||||
# for mono/metadata/debug-symfile.c
|
||||
AC_CHECK_HEADERS(elf.h)
|
||||
@@ -392,24 +369,24 @@ if test x$platform_win32 = xno; then
|
||||
dnl ********************************
|
||||
dnl *** Checks for timezone stuff **
|
||||
dnl ********************************
|
||||
AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff,
|
||||
AC_CACHE_CHECK(for timezone variable, ac_cv_var_timezone,
|
||||
AC_TRY_COMPILE([
|
||||
#include <time.h>
|
||||
], [
|
||||
struct tm tm;
|
||||
tm.tm_gmtoff = 1;
|
||||
], ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no))
|
||||
if test $ac_cv_struct_tm_gmtoff = yes; then
|
||||
AC_DEFINE(HAVE_TM_GMTOFF)
|
||||
], [
|
||||
timezone = 1;
|
||||
], ac_cv_var_timezone=yes, ac_cv_var_timezone=no))
|
||||
if test $ac_cv_var_timezone = yes; then
|
||||
AC_DEFINE(HAVE_TIMEZONE)
|
||||
else
|
||||
AC_CACHE_CHECK(for timezone variable, ac_cv_var_timezone,
|
||||
AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff,
|
||||
AC_TRY_COMPILE([
|
||||
#include <time.h>
|
||||
], [
|
||||
timezone = 1;
|
||||
], ac_cv_var_timezone=yes, ac_cv_var_timezone=no))
|
||||
if test $ac_cv_var_timezone = yes; then
|
||||
AC_DEFINE(HAVE_TIMEZONE)
|
||||
], [
|
||||
struct tm tm;
|
||||
tm.tm_gmtoff = 1;
|
||||
], ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no))
|
||||
if test $ac_cv_struct_tm_gmtoff = yes; then
|
||||
AC_DEFINE(HAVE_TM_GMTOFF)
|
||||
else
|
||||
AC_ERROR(unable to find a way to determine timezone)
|
||||
fi
|
||||
@@ -501,7 +478,7 @@ i*86-*-*) TARGET=X86; arch_target=x86;;
|
||||
sparc*-*-*) TARGET=SPARC; arch_target=sparc; ACCESS_UNALIGNED="no";;
|
||||
#alpha*-*-linux* | alpha*-*-osf*) TARGET=ALPHA; ACCESS_UNALIGNED="no";;
|
||||
#m68k-*-linux*) TARGET=M68K;;
|
||||
macppc-*-openbsd* | powerpc-*-linux* | powerpc-*-openbsd* | powerpc-*-sysv* | powerpc-*-darwin*) TARGET=POWERPC; arch_target=ppc;;
|
||||
macppc-*-openbsd* | powerpc-*-linux* | powerpc-*-openbsd* | powerpc-*-sysv*) TARGET=POWERPC; arch_target=ppc;;
|
||||
arm-*-linux-* | armv4l-*-linux-*) TARGET=ARM; arch_target=arm; ACCESS_UNALIGNED="no";;
|
||||
s390-*-linux*) TARGET=S390; arch_target=s390; ACCESS_UNALIGNED="no";;
|
||||
esac
|
||||
@@ -531,7 +508,6 @@ AC_SUBST(LIBC)
|
||||
AC_SUBST(arch_target)
|
||||
AC_SUBST(CFLAGS)
|
||||
AC_SUBST(CPPFLAGS)
|
||||
AC_SUBST(LDFLAGS)
|
||||
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
@@ -550,7 +526,6 @@ mono/arch/ppc/Makefile
|
||||
mono/arch/sparc/Makefile
|
||||
mono/arch/s390/Makefile
|
||||
mono/arch/arm/Makefile
|
||||
mono/arch/alpha/Makefile
|
||||
mono/interpreter/Makefile
|
||||
mono/tests/Makefile
|
||||
mono/benchmark/Makefile
|
||||
|
||||
+1
-3
@@ -9,8 +9,6 @@
|
||||
<dllmap dll="libpango-1.0-0.dll" target="libpango-1.0.so" />
|
||||
<dllmap dll="libatk-1.0-0.dll" target="libatk-1.0.so" />
|
||||
<dllmap dll="libgdk-win32-2.0-0.dll" target="libgdk-x11-2.0.so" />
|
||||
<dllmap dll="libgdk_pixbuf-2.0-0.dll" target="libgdk_pixbuf-2.0.so" />
|
||||
<dllmap dll="libgdk_pixbuf-2.0-0.dll" target="libgdk-pixbuf-2.0.so" />
|
||||
<dllmap dll="libgtk-win32-2.0-0.dll" target="libgtk-x11-2.0.so" />
|
||||
<dllmap dll="libgtk-win32-2.0-0.dll" target="libgtk-x11-2.0.so" />
|
||||
<dllmap dll="oci" target="clntsh" />
|
||||
</configuration>
|
||||
+8
-39
@@ -5,50 +5,22 @@
|
||||
<configSections>
|
||||
<section name="appSettings" type="System.Configuration.NameValueFileSectionHandler, System" />
|
||||
|
||||
<section name="system.diagnostics" type="System.Diagnostics.DiagnosticsConfigurationHandler, System" />
|
||||
<sectionGroup name="system.web">
|
||||
<section name="httpHandlers"
|
||||
type="System.Web.Configuration.HttpHandlersSectionHandler, System.Web" />
|
||||
<section name="httpModules"
|
||||
type="System.Web.Configuration.HttpModulesConfigurationHandler, System.Web" />
|
||||
<section name="machineKey"
|
||||
type="System.Web.Configuration.MachineKeyConfigHandler, System.Web" />
|
||||
<section name="authentication"
|
||||
type="System.Web.Configuration.AuthenticationConfigHandler, System.Web" />
|
||||
<section name="authorization"
|
||||
type="System.Web.Configuration.AuthorizationConfigHandler, System.Web" />
|
||||
<section name="globalization"
|
||||
type="System.Web.Configuration.GlobalizationConfigurationHandler, System.Web" />
|
||||
<section name="httpHandlers" type="System.Web.Configuration.HttpHandlersSectionHandler, System.Web" />
|
||||
<section name="httpModules" type="System.Web.Configuration.HttpModulesConfigurationHandler, System.Web" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<system.web>
|
||||
<httpHandlers>
|
||||
<add verb="*" path="*.aspx" type="System.Web.UI.PageHandlerFactory, System.Web" />
|
||||
<add verb="*" path="*.asax" type="System.Web.HttpForbiddenHandler, System.Web" />
|
||||
<add verb="*" path="*.ascx" type="System.Web.HttpForbiddenHandler, System.Web" />
|
||||
<add verb="*" path="*.config" type="System.Web.HttpForbiddenHandler, System.Web" />
|
||||
<add verb="GET,HEAD" path="*" type="System.Web.StaticFileHandler, System.Web" />
|
||||
<add verb="*" path="*" type="System.Web.HttpMethodNotAllowedHandler, System.Web" />
|
||||
<add verb="*" path="*.aspx" type="System.Web.UI.PageHandlerFactory" />
|
||||
<add verb="*" path="*.asax" type="System.Web.HttpForbiddenHandler" />
|
||||
<add verb="*" path="*.ascx" type="System.Web.HttpForbiddenHandler" />
|
||||
<add verb="*" path="*.config" type="System.Web.HttpForbiddenHandler" />
|
||||
<add verb="GET,HEAD" path="*" type="System.Web.StaticFileHandler" />
|
||||
<add verb="*" path="*" type="System.Web.HttpMethodNotAllowedHandler" />
|
||||
</httpHandlers>
|
||||
<httpModules>
|
||||
<add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule, System.Web" />
|
||||
<add name="UrlAuthorization" type="System.Web.Security.UrlAuthorizationModule, System.Web" />
|
||||
</httpModules>
|
||||
<authentication mode="Forms">
|
||||
<forms name=".MONOAUTH" loginUrl="login.aspx" protection="All" timeout="30" path="/">
|
||||
<credentials passwordFormat="Clear">
|
||||
<!--<user name="gonzalo" password="gonz"/>-->
|
||||
</credentials>
|
||||
</forms>
|
||||
</authentication>
|
||||
<machineKey validationKey="AutoGenerate" decryptionKey="AutoGenerate" validation="SHA1" />
|
||||
<!-- Sample globalization settings
|
||||
<globalization requestEncoding="iso-8859-1"
|
||||
responseEncoding="iso-8859-1"
|
||||
fileEncoding="iso-8859-1"
|
||||
culture="en-US"
|
||||
uiculture="en-US" />
|
||||
-->
|
||||
</system.web>
|
||||
|
||||
<appSettings>
|
||||
@@ -56,8 +28,5 @@
|
||||
<!--<remove key="a key defined higher in the hierarchy" /> -->
|
||||
<!--<clear/> Removes all defined settings -->
|
||||
</appSettings>
|
||||
<system.diagnostics>
|
||||
<trace autoflush="false" indentsize="4" />
|
||||
</system.diagnostics>
|
||||
</configuration>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 448 B |
-30
@@ -15,33 +15,3 @@ To publish changes:
|
||||
|
||||
cd web
|
||||
make push
|
||||
|
||||
############## Samples
|
||||
|
||||
|
||||
If you want to add a new item in the left menu
|
||||
you have to edit mono/doc/web/commands and add
|
||||
the entry there.
|
||||
|
||||
For new files you can add something as:
|
||||
level,entry,path_to_the_file,file.src
|
||||
|
||||
ex: 1,COBOL#,cobol.html,cobol.src
|
||||
|
||||
If you just want to add a link to the menu:
|
||||
1,MyEntry,URL
|
||||
|
||||
ex: 1,About Linux,http://www.linux.org
|
||||
|
||||
To test the results under Linux:
|
||||
1. Edit mono/doc/web/makefile
|
||||
|
||||
Delete all the references to class status
|
||||
and the deploy/index.rss as well as the
|
||||
mono.exe commands.
|
||||
|
||||
2. make
|
||||
3. Open your browser and point to the
|
||||
file:///(YOUR PATH HERE)mono/doc/web/deploy/index.html
|
||||
|
||||
|
||||
+197
-365
@@ -1,323 +1,106 @@
|
||||
* ADO.NET
|
||||
|
||||
<p>Mono's ADO.NET Developers:
|
||||
|
||||
<table border=1>
|
||||
|
||||
<tr>
|
||||
<td><b>Developer</b></td>
|
||||
<td><b>Email</b></td>
|
||||
<td><b>Contribution</b></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Rodrigo Moya</td>
|
||||
<td>rodrigo -AT-<br> ximian.comNOSPAM</td>
|
||||
<td>ADO.NET coordinator,<br> OLE DB provider,<br> and tests</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Daniel Morgan</td>
|
||||
<td>danmorg -AT-<br> sc.rr.comNOSPAM</td>
|
||||
<td>MySQL, PostgreSQL, <br>Oracle providers,<br> and tests</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Tim Coleman</td>
|
||||
<td>tim -AT- <br>timcoleman.comNOSPAM</td>
|
||||
<td>Microsoft SQL Server, <br>Sybase, <br>TDS providers,<br> Oracle,
|
||||
<br>and tests.<br>
|
||||
He has
|
||||
contributed <br>to other parts <br>of Mono too, <br>such as,
|
||||
<br>EnterpriseServices,
|
||||
XML, <br>and WebServices.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Brian Ritchie</td>
|
||||
<td>brianlritchie -AT-<br> hotmail.comNOSPAM</td>
|
||||
<td>ODBC provider <br>and the ProviderFactory <br>in Mono.Data</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Vladimir Vukicevic</td>
|
||||
<td>vladimir -AT-<br> pobox.comNOSPAM</td>
|
||||
<td>SQL Lite provider. <br> He has contributed to GTK# <br>and mPhoto too.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Christopher Bockner</td>
|
||||
<td>cleared -AT-<br> rogers.comNOSPAM</td>
|
||||
<td>IBM DB2 Universal <br>Database provider</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Ville Palo</td>
|
||||
<td>vi64pa -AT-<br> koti.soon.fiNOSPAM</td>
|
||||
<td>XML stuff <br>in System.Data <br>including DataSet <br>
|
||||
and XmlDataDocument, <br>and tests</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Gonzalo Paniagua Javier</td>
|
||||
<td>gonzalo -AT-<br> ximian.comNOSPAM</td>
|
||||
<td>Integration between <br>System.Web and <br>System.Data</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Gaurav Vaish</td>
|
||||
<td>gvaish -AT-<br> iitk.ac.inNOSPAM</td>
|
||||
<td>Web controls</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Phillip Jerkins</td>
|
||||
<td>Phillip.Jerkins -AT-<br> morgankeegan.comNOSPAM</td>
|
||||
<td>Named Instance support <br>in System.Data.SqlClient</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
** Bugs and Feature Requests
|
||||
|
||||
<ul>
|
||||
|
||||
<li>Bugs with Mono or any data provider in Mono should be reported
|
||||
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
|
||||
do not have a Bugzilla user account, it is free
|
||||
and easy to create
|
||||
one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
|
||||
The coordinator for the ADO.NET implementation is
|
||||
<a href="mailto:[email protected]">Rodrigo Moya</a>,
|
||||
with the collaboration of:
|
||||
<a href="mailto:[email protected]">Daniel Morgan</a>,
|
||||
<a href="mailto:[email protected]">Tim Coleman</a>,
|
||||
<a href="mailto:[email protected]">Brian Ritchie</a>, and
|
||||
<a href="mailto:[email protected]">Vladimir Vukicevic</a>.
|
||||
|
||||
<li>Any RFE (Request For Enhancement) for features missing or new functionality
|
||||
should be entered as a bug in Bugzilla too</li>
|
||||
|
||||
</ul>
|
||||
|
||||
** ADO.NET Data Providers
|
||||
|
||||
<p>List of ADO.NET Data Providers working in Mono:
|
||||
|
||||
<ul>
|
||||
<li><a href="http://www.go-mono.com/ibmdb2.html">IBM DB2 Universal Database</a></li>
|
||||
<li><a href="http://www.go-mono.com/mysql.html">MySQL</a></li>
|
||||
<li><a href="http://www.go-mono.com/odbc.html">ODBC</a></li>
|
||||
<li><a href="http://www.go-mono.com/oracle.html">Oracle</a></li>
|
||||
<li><a href="http://www.go-mono.com/oledb.html">OLE DB</a></li>
|
||||
<li><a href="http://www.go-mono.com/postgresql.html">PostgreSQL</a></li>
|
||||
<li><a href="http://www.go-mono.com/sqlclient.html">Microsoft SQL Server</a></li>
|
||||
<li><a href="http://www.go-mono.com/sqlite.html">SQL Lite</a></li>
|
||||
<li><a href="http://www.go-mono.com/sybase.html">Sybase</a></li>
|
||||
<li><a href="http://www.go-mono.com/tdsclient.html">TDS Generic</a></li>
|
||||
</ul>
|
||||
* Action plan
|
||||
|
||||
<p>Providers which we do not have, but we would like to have. Currently,
|
||||
some of these databases are supported via the ODBC or OLE DB providers.
|
||||
<p>The current plan to implement ADO.NET is as follows:
|
||||
|
||||
<ul>
|
||||
<li><a href="http://msdn.microsoft.com/library/en-us/dnsql2k/html/sqlxml_intromanagedclasses.asp?frame=true">Managed Classes for SqlXml</a> which is
|
||||
a .NET data provider for retrieving XML data from a Microsoft SQL Server 2000 database. The System.Data.SqlClient provider
|
||||
in Mono can be used as a starting point at mcs/class/System.Data/System.Data.SqlClient.</li>
|
||||
<li><a href="http://www.hughes.com.au/">miniSQL</a></li>
|
||||
<li><a href="http://www.sleepycat.com/">BerkeleyDB (Sleepycat)</a></li>
|
||||
<li><a href="http://www.sapdb.org/">SapDB</a></li>
|
||||
<li><a href="http://www-3.ibm.com/software/data/informix/">Informix</a></li>
|
||||
<li><a href="http://msdn.microsoft.com/vfoxpro/">Foxpro</a></li>
|
||||
<li>Microsoft Access - could be done by creating C# bindings to <a href="http://mdbtools.sourceforge.net">MDB Tools</a></li>
|
||||
<li>dbase or xbase type database files</li>
|
||||
<li>Others are welcome</li>
|
||||
</ul>
|
||||
|
||||
<p>External Projects that have created ADO.NET Providers that work on Mono:
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="http://www.go-mono.com/firebird.html">Firebird Interbase</a></li> is a
|
||||
Firebird SQL Managed data provider. It can be used with Interbase databases too. It
|
||||
is written in 100%C# and does not require a client library. Works on .NET and Mono.</a>
|
||||
<li><a href="http://gborg.postgresql.org/project/npgsql/projdisplay.php">Npgsql</a> is a
|
||||
PostgreSQL Managed data provider written
|
||||
in 100% C#, does not require a client library, and works on .NET and Mono</li>
|
||||
<li><a href="http://sourceforge.net/projects/mysqlnet/">MySQLNet</a> is a
|
||||
MySQL Managed data provider written in 100% C#, does not
|
||||
require a client library, and works on .NET and Mono</li>
|
||||
</ul>
|
||||
|
||||
** Tools
|
||||
|
||||
<p>Some tools that can be used for ADO.NET and other technologies (ASP.NET, XML, etc).
|
||||
|
||||
<ul>
|
||||
<li><b>SQL# CLI</b> - a SQL query tool with a command-line interface.
|
||||
It can be used to enter and execute SQL statements or
|
||||
execute a batch of SQL commands from a file. It can
|
||||
be used to test connection strings, connect to various ADO.NET
|
||||
providers, save output to text, html, or xml. It is a work-in-progress.
|
||||
The SQL# CLI is distributed with the
|
||||
Mono runtime and class libraries as an executable assembly sqlsharp.exe.
|
||||
The source to SQL# CLI can be found in the mcs source at
|
||||
mcs/tools/SqlSharp/SqlSharpCli.cs
|
||||
</li>
|
||||
|
||||
<li><p><b>SQL# GUI - a graphical SQL query tool</b> allows a user
|
||||
to enter SQL commands in a top panel which is a text editor. It
|
||||
has a toolbar and menu for various tasks, such as, executing
|
||||
SQL commands one-at-a-time or in a batch. The results would appear
|
||||
in a bottom panel in a grid or could be saved to a file (xml, html, csv).
|
||||
Also, the bottom panel would allow logging of SQL command executed.
|
||||
Currently, there is a <a href="http://go-mono.com/images/sqlsharp.png">SQL# For GTK#</a> which
|
||||
provides a GUI interface using the <a href="http://gtk-sharp.sourceforge.net">Gtk#</a> toolkit. SQL# For GTK#
|
||||
is a work-in-progress and can be found in the mcs source at
|
||||
mcs/tools/SqlSharp/gui/gtk-sharp</li>
|
||||
</ul>
|
||||
|
||||
<p>Tools we would like to have, but they have not been created yet:
|
||||
|
||||
<ul>
|
||||
<li><b>XML Schema Definition tool</b> <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cptools/html/cpconxmlschemadefinitiontoolxsdexe.asp">xsd.exe</a> needs
|
||||
to be created. Maybe this TODO item should be at the System.XML web page instead.
|
||||
<ul>
|
||||
<li>Either create ADO.NET providers or modify pre-exiting ADO.NET providers to
|
||||
work with Mono
|
||||
|
||||
<ul>
|
||||
<li>Create ADO.NET Providers
|
||||
|
||||
<ul>
|
||||
<li>This tool
|
||||
would work like the xsd.exe tool included with
|
||||
the .NET Framework. The Xsd.exe tools has the
|
||||
following uses:
|
||||
<ul>
|
||||
<li><b>XDR to XSD</b> - used to generate an XML schema from an XDR (XML Data Reduced schema) file.
|
||||
XDR was used by Microsoft prior to XSD becoming a W3C recommendation. So, this needs
|
||||
to be supported for legacy reasons</li>
|
||||
<li><b>XML to XSD</b> - used to generate an XML schema from an XML file</li>
|
||||
<li><b>XSD to DataSet</b> - used to generate DataSet classes from an XSD schema file. The
|
||||
DataSet classes created can then be used with XML data</li>
|
||||
<li><b>XSD to Classes</b> - used to generate classes from an XSD schema file. The
|
||||
classes created can be used with System.XML.Serialization.XMLSerializer
|
||||
to read and write XML code that follows the schema</li>
|
||||
<li><b>Classes to XSD</b> - used to generate an XML schema
|
||||
from type(s) in a assembly file. The
|
||||
XML schema created by the tool defines the XML format used
|
||||
by System.XML.Serialization.XMLSerializer</li>
|
||||
</ul>
|
||||
<li>Xsd.exe is used to manipulate XML schemas that
|
||||
follow the http://www.w3.org/XML/Schema">XML Schema Definition (XSD)</a> language
|
||||
recommended by the <a href="http://w3.org/">World Wide Web Consortium (W3C)</a></li>
|
||||
|
||||
<li>How this tool could be created:
|
||||
<ul>
|
||||
<li>Write xsd.exe in C# and run on Mono</li>
|
||||
<li>Make sure we have XML Schema support in System.Xml.Schema. Currently,
|
||||
it is wrapped around libxlst</li>
|
||||
<li>XML serialization support in System.Data classes</li>
|
||||
<li>Create the TypedDataSetGenerator class in System.Data</li>
|
||||
<li>Using CodeDOM or Reflection.Emit to create code</li>
|
||||
<li>Make sure DataSet, XmlDataDocument, and related classes
|
||||
are implemented fully</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li><b>Application XML Configuration File Editor</b> - a tool
|
||||
to create and edit an application configuration file, such as,
|
||||
we have a .net application named Accouting.exe, the tool could edit
|
||||
the application configuration file Accounting.exe.config so a user could
|
||||
connect to the database used by the program. This tool has not
|
||||
been created.</li>
|
||||
|
||||
<li><a href="http://www.go-mono.com/mysql.html">MySQL</a>
|
||||
<li><a href="http://www.go-mono.com/odbc.html">ODBC</a>
|
||||
<li><a href="http://www.go-mono.com/oledb.html">OLE DB</a>
|
||||
<li><a href="http://www.go-mono.com/postgresql.html">PostgreSQL</a>
|
||||
<li><a href="http://www.go-mono.com/sqlclient.html">Microsoft SQL Server</a>
|
||||
<li><a href="http://www.go-mono.com/sqlite.html">SQL Lite</a>
|
||||
<li><a href="http://www.go-mono.com/sybase.html">Sybase</a>
|
||||
<li><a href="http://www.go-mono.com/tdsclient.html">TDS Generic</a>
|
||||
<li>Providers which we do not have, but we would like to have. Currently,
|
||||
some of these databases are supported via the ODBC or OLEDB providers.
|
||||
<ul>
|
||||
<li><a href="http://www-3.ibm.com/software/data/db2/">IBM DB2 Universal Database</a>
|
||||
<li>miniSQL
|
||||
<li><a href="http://www.oracle.com/">Oracle</a> - could be done by creating C# bindings to OCI (Oracle C Call Level Interface)
|
||||
<li>BerkeleyDB (Sleepycat)
|
||||
<li><a href="http://www.sapdb.org/">SapDB</a>
|
||||
<li>Microsoft Access - could be done by creating C# bindings to <a href="http://mdbtools.sourceforge.net">MDB Tools</a>
|
||||
<li>dbase or xbase type database files
|
||||
<li>Others, of course, are welcomed...
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
<br>
|
||||
<li>Modify Pre-existing ADO.NET Providers to work with Mono. This may
|
||||
require fixing or implementing areas of Mono too.
|
||||
<ul>
|
||||
<li><a href="http://www.go-mono.com/firebird.html">Firebird Interbase</a>
|
||||
<li><a href="http://gborg.postgresql.org/project/npgsql/projdisplay.php">Npgsql</a> a PostgreSQL provider
|
||||
written in 100% C#
|
||||
<li><a href="http://sourceforge.net/projects/mysqldrivercs/">MySQLDriverCS</a> is a MySQL provider written in C#
|
||||
<li><a href="http://sourceforge.net/projects/mysqlnet/">MySQLNet</a> is a MySQL Manager provider written in C#
|
||||
</ul>
|
||||
</ul>
|
||||
<br>
|
||||
<li>Create Tools for Configuration, Testing, and Entering SQL Queries
|
||||
<ul>
|
||||
<li><b>SQL# CLI - a command-line tool</b> to execute SQL commands,
|
||||
test connection strings, and connect to various ADO.NET
|
||||
providers in Mono. The SQL# CLI can be found in
|
||||
mcs/tools/SqlSharp/SqlSharpCli.cs
|
||||
It is written in C# and runs on Mono and .NET
|
||||
|
||||
<li><p><b>SQL# GUI - a GUI tool</b> to execute SQL commands.
|
||||
Currently, there is SQL# For GTK# which
|
||||
can be found at
|
||||
mcs/tools/SqlSharp/gui/gtk-sharp. It has a SQL editor with
|
||||
syntax hi lighting of SQL keywords
|
||||
|
||||
<li><b>Configuration Command-Line and GUI Tools for ADO.NET</b>.
|
||||
These tools have not been started. The tools would be written in
|
||||
C# and run on Mono. The
|
||||
configuration tool can be used to do the following:
|
||||
<ul>
|
||||
<li>bebased on the Application XML Configuration File Editor</li>
|
||||
<li>setup DSNs for the ODBC and OLE-DB
|
||||
providers and configurations for
|
||||
their underlying libraries (unixODBC and libgda)</li>
|
||||
their underlying libraries (unixODBC and libgda)
|
||||
<li>setup configurations for the Mono.Data.ProviderFactory
|
||||
that Brian Ritchie created</li>
|
||||
that Brian Ritchie created
|
||||
<li>setup native database client library configurations too, such as,
|
||||
freetds.conf for Microsoft SQL Server and Sybase</li>
|
||||
freetds.conf for Microsoft SQL Server and Sybase
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
* Current Status
|
||||
|
||||
** Extra Classes in Mono ADO.NET
|
||||
|
||||
<p>An ADO.NET <a href="http://www.go-mono.com/provider-factory.html">Provider Factory</a>
|
||||
was created by Brian Ritchie. The
|
||||
Provider Factory is a way to dynamically create
|
||||
connections, commands, parameters, and data adapters based on configuration
|
||||
information.
|
||||
|
||||
** Current Status
|
||||
|
||||
<p>Various ADO.NET Providers have been created at various stages of
|
||||
development including:
|
||||
Firebird/Interbase, IBM DB2 Universal Database, MySQL, ODBC, OLE DB, Oracle,
|
||||
PostgreSQL, SQL Lite, Sybase, Microsoft SQL Server, and TDS Generic.
|
||||
See their respective web page for more information.
|
||||
|
||||
<p><b>Data Relations</b> via DataRelation, DataRelationCollection, and
|
||||
other classes have not been implemented
|
||||
|
||||
<p><b>Constraints</b> need lots of work
|
||||
|
||||
<p><b>XML Schema Definition tool</b> xsd.exe that is included
|
||||
in the .NET Framework has not been created for Mono
|
||||
|
||||
<p><b>TypeDataSetGenerator</b> needs to be stubbed and implemented.
|
||||
<p>Variouls ADO.NET Providers have been created: PostgreSQL, MySQL, Sybase, SQL Lite,
|
||||
Microsoft SQL Server, OLE DB, ODBC, and TDS Generic. See their respective web page for
|
||||
more information.
|
||||
|
||||
<p><b>DataSet, DataAdaptor, DataTable, DataRelation, DataRow, DataColumn,
|
||||
DataColumnCollection, DataRowCollection, and others</b> need more work. There are
|
||||
many classes that are just stubs and need to be implemented. Ville Palo has been
|
||||
doing much testing here.
|
||||
|
||||
<p><b>XML support in System.Data</b> needs work. This involves working on
|
||||
the classes: DataSet, XmlDataDocument, and the method ExecuteXmlReader() that
|
||||
exists in a provider's class that implements IDbCommand, and others.
|
||||
Stuart Caborn has started the XML support in a DataSet. Tim Coleman started
|
||||
XML support in the ExecuteXmlReader() in a SqlCommand. Ville Palo has been
|
||||
heavily modifying DataSet, XmlDataDocument, and other classes for reading
|
||||
and writing XML. XML Serialization support in DataSet needs to be implemented.
|
||||
many classes that are just stubs and need to be implemented.
|
||||
|
||||
<p><b>Integration with ASP.NET</b> has been created. Data binding of
|
||||
a DataTable in a DataSet to a System.Web.UI.WebControls.DataGrid works. Data binding
|
||||
of other types works too.
|
||||
|
||||
<p><b>Database Access from ASP.NET</b>:
|
||||
<ul>
|
||||
<li>Take a look at xsp in cvs and look at the examples in test: dbpage1.aspx
|
||||
and dbpage2.aspx:
|
||||
<ul>
|
||||
<li>Notice that the namespace System.Data is imported via <b>import</b></li>
|
||||
<li>A NameValueCollection is gotten using ConfigurationSettings.AppSetings. These
|
||||
settings are gotten from the file server.exe.config which is a XML file. The XML
|
||||
file has a section appSettings. In the appSettings section, you have keys
|
||||
for DBProviderAssembly, DBConnectionType, and DBConnectionString.
|
||||
<ul>
|
||||
<li><b>DBProviderAssembly</b> is the assembly of the ADO.NET provider.
|
||||
For example:
|
||||
"Mono.Data.PostgreSqlClient"</li>
|
||||
<li><b>DBConnectionType</b> is the System.Type of the class that
|
||||
implements System.Data.IDbConnection that is found
|
||||
in the DBProviderAssembly.
|
||||
For example:
|
||||
"Mono.Data.PostgreSqlClient.PgConnection"</li>
|
||||
<li><b>DBConnectionString</b> is the ConnectionString to set to the
|
||||
IDbConnection object to use in opening a connection to a data source.
|
||||
For Example:
|
||||
"hostaddr=127.0.0.1;user=monotest;password=monotest;dbname=monotest"</li>
|
||||
</ul>
|
||||
<li>The function GetConnectionData() gets the database provider assembly, connection type,
|
||||
and connection string parameters if they exist; otherwise, it uses default values. This is
|
||||
done during the loading of the web page.</li>
|
||||
<li>With the connection parameters, the assembly is loaded, the connection type is verified that
|
||||
it implements IDbConnection and an instance of the class can be created, creates a instance
|
||||
of the class, sets the connection string, and opens the connection.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<p><b>Integration with ASP.NET</b> has not been started, such as, data binding
|
||||
to a System.Web.UI.WebControls.DataGrid. This may involve implementing many classes
|
||||
in System.Web and System.Data. Gonzalo, Gaurav, Leen, Patrik, Duncan, and others are
|
||||
working very hard on the ASP.NET support. If you want to help,
|
||||
contact <a href="mailto:[email protected]">Gonzalo Paniagua Javier</a>
|
||||
|
||||
<p><b>Integration with Windows.Forms</b> has not been started, such as, data binding
|
||||
to a System.Windows.Forms.DataGrid. This may involve implementing many classes
|
||||
@@ -327,12 +110,129 @@
|
||||
has not been started, such as, data binding
|
||||
to a GtkTreeView. This may involve creating new classes
|
||||
to go between the glist data model and the ADO.NET data model.
|
||||
Mike Kestner or Rachel Hestilov would be the best people to ask for help on GTK#.
|
||||
Mike Kestner would be the best person to ask for help on GTK#.
|
||||
|
||||
<p><b>Integration with QT#</b> has not been started. Any information on
|
||||
how this can be done is appreciated. Adam Treat would be the best
|
||||
person to ask about QT#.
|
||||
|
||||
<p><b>Integration with GDA#</b> has not been started. It is
|
||||
included in the GTK# project, GDA#
|
||||
does not require GTK+ nor GNOME. GDA# is C# bindings
|
||||
to <a href="http://www.gnome-db.org/">GDA</a> which
|
||||
is an ADO/OLE-DB like layer for Linux provided as a C library. Classes
|
||||
that would bind data between the ADO.NET data model and the GDA data model will
|
||||
need to be created. Rodrigo Moya is the best person to contact about this.
|
||||
|
||||
<p><b>Integration with GnomeDb#</b> has not been started. It is
|
||||
included in the GTK# project and uses GDA# for its data access model.
|
||||
Creating classes to bind data between the data model in ADO.NET
|
||||
and the data model that exists in GDA# and GnomeDb# will
|
||||
need to be started. GnomeDb# is C# bindings to
|
||||
<a href="http://www.gnome-db.org/">GnomeDb</a> which uses
|
||||
<a href="http://www.gnome-db.org/">GDA</a> as its data access layer. GnomeDb
|
||||
is a C API in a library that contains
|
||||
gtk+ widgets (GUI controls) for data access. There are some nifty widgets
|
||||
(GUI controls) that can be used, such as, GnomeDbGrid, GnomeDbBrowswer,
|
||||
GnomeDbSqlEditor, GnomeDbList, GnomeDbLogin, GnomeDbReportEditor, GnomeDbTableEditor,
|
||||
GnomeDbCombo, and GnomeDbForm. Rodrigo Moya is the best person to contact.
|
||||
|
||||
<p><b>XML support in System.Data</b> needs work. This involves working on
|
||||
the classes: DataSet, XmlDataDocument, and the method ExecuteXmlReader() that
|
||||
exists in a provider's class that implements IDbCommand, and others.
|
||||
Stuart Caborn has started the XML support in a DataSet. Tim Coleman started
|
||||
XML support in the ExecuteXmlReader() in a SqlCommand.
|
||||
|
||||
<p><b>ADO.NET Provider Factory</b> has been started by Brian Ritchie. The
|
||||
Provider Factory is used to dynamically create data provider
|
||||
connections and data adapters based on configuration information. This
|
||||
provider factory can also provide utility functions needed by a lot of
|
||||
providers but are not exposed via the provider.
|
||||
|
||||
<p><b>ADO.NET Multiplexor Provider</b> needs to be created. It can use the
|
||||
ADO.NET Provider Factory to create its connections and adapters, but the
|
||||
Multiplexor Provider is a Generic Provider that internally uses an existing
|
||||
provider based on configuration options. This is not
|
||||
part of Microsoft .NET, but it needs to be able to run on Microsoft .NET
|
||||
and Mono. This provider can be a generic provider, much like the ODBC.NET and
|
||||
OLEDB.NET providers are, but be written in 100% C# and be configurable via
|
||||
a configuration file. This provider will multiplex to other providers
|
||||
that exist. If one does not exist for a given DBMS,
|
||||
default to the ODBC or OLEDB .NET provider.
|
||||
|
||||
<p>According to Gonzalo, this is how the configuration could be implemented for
|
||||
the Provider Factory and Multiplexor Provider.
|
||||
|
||||
<p>After some work done in System.Configuration, you can now do something
|
||||
like:
|
||||
|
||||
<p>
|
||||
<pre>
|
||||
// Get an instance of the multiplexor from machine.config file
|
||||
// Can be overriden in the application config file
|
||||
object o = ConnectionSettings.GetConfig
|
||||
("mono.data/multiplexor");
|
||||
if (o == null)
|
||||
--- error
|
||||
|
||||
Multiplexor mp = (Multiplexor) o;
|
||||
|
||||
// may be a string [] argument can help passing arguments
|
||||
IDbConnection cnc = mp.CreateConnection (providerName);
|
||||
</pre>
|
||||
|
||||
<p>and in the machine.config file:
|
||||
|
||||
<pre>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<section name="mono.data"
|
||||
type="Mono.Data.MultiplexorSectionHandler,Mono.Data"/>
|
||||
....
|
||||
</configSections>
|
||||
...
|
||||
<sectionGroup name="mono.data">
|
||||
<multiplexor>
|
||||
<add provider="PostgreSQL"
|
||||
type="Mono.Data.PostgreSQLClient,Mono.Data"
|
||||
validate="false"
|
||||
parameters="USER=xxx;HOST=127.0.0.1;DBNAME=xxx"/>
|
||||
</multiplexor>
|
||||
</sectionGroup>
|
||||
</configuration>
|
||||
</pre>
|
||||
|
||||
<p>validate="false" tells MultiplexorSectionHandler not to load the Type
|
||||
until an instance is required. You can add more attributes or whatever
|
||||
inside <multiplexor> as long as MultiplexorSectionHandler parses it.
|
||||
|
||||
<pre>
|
||||
public class MultiplexorSectionHandler :
|
||||
IConfigurationSectionHandler
|
||||
{
|
||||
public object Create (object parent,
|
||||
object configContext,
|
||||
XmlNode section)
|
||||
{
|
||||
Multiplexor mp;
|
||||
// Here you get the ChildNodes and
|
||||
// set up a Multiplexor
|
||||
// instance that will hold the information
|
||||
// needed to create
|
||||
// instances of each provider. Only one
|
||||
// instance will be
|
||||
// created by the config system.
|
||||
return mp;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
<p>This way, if our providers works with MS, the user can test them in both
|
||||
MS and mono by just adding a few lines to machine.config (i still have
|
||||
to upload a default machine.config file for mono). And this is the .NET
|
||||
way of doing it (of course, if you prefer, you can use the other config
|
||||
file. I just wanted to make people aware of this feature that now works
|
||||
on mono).
|
||||
|
||||
<p><b>Building System.Data</b>
|
||||
|
||||
<p>The System.Data.dll gets built with the rest of the class library.
|
||||
@@ -376,71 +276,3 @@
|
||||
</pre>
|
||||
</ul>
|
||||
|
||||
** Testing
|
||||
|
||||
<ul>
|
||||
<li>Testing connection-oriented classes are done
|
||||
via the provider specific tests
|
||||
found in the mcs source at mcs/class</br>
|
||||
<table border=1>
|
||||
<tr>
|
||||
<td><b>Name</b></td>
|
||||
<td><b>Assembly /</br> Namespace</b></td>
|
||||
<td><b>Test</b></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Microsoft</br> SQL</br> Server</br></td>
|
||||
<td>System.Data /</br> System.Data.SqlClient</td>
|
||||
<td>SqlTest.cs at</br> System.Data/Test</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>PostgreSQL</br> (Mono)</td>
|
||||
<td>Mono.Data.PostgreSqlClient /</br> Mono.Data.PostgreSqlClient</td>
|
||||
<td>PostgresTest.cs at</br> System.Data/Test</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>MySQL</br> (Mono)</td>
|
||||
<td>Mono.Data.MySql /</br> Mono.Data.MySql</td>
|
||||
<td>MySqlTest.cs at</br> Mono.Data.MySql/Test</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Oracle</br> (Mono)</td>
|
||||
<td>System.Data.OracleClient /</br> System.Data.OracleClient</td>
|
||||
<td>TestOracleClient.cs at</br> System.Data.OracleClient</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>ODBC</br> (Mono)</td>
|
||||
<td>System.Data.OracleClient /</br> System.Data.OracleClient</td>
|
||||
<td>TestOracleClient.cs at</br> System.Data.OracleClient</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
<li><a href="http://www.go-mono.com/testing.html">Testing non-connection classes</a> are
|
||||
done via mono's modified version of NUnit.
|
||||
<ul>
|
||||
<li>To run all the NUnit tests for Mono, you need the mcs source. cd to the root
|
||||
of the mcs source. To run it:
|
||||
<ul>
|
||||
<li>On Linux: make -f makefile test</li>
|
||||
<li>On Windows: make test</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>If you just want to run the NUnit tests for System.Data, you would cd into
|
||||
the mcs source at class/System.Data/Test and run it:
|
||||
<ul>
|
||||
<li>On Linux: make -f makefile test</li>
|
||||
<li>On Windows: make test</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
+56
-33
@@ -9,8 +9,8 @@
|
||||
|
||||
There is work underway for both systems. The Web Forms
|
||||
support is more advanced at this point, and various ".aspx"
|
||||
programs can be run using the Mono runtime (embedded into
|
||||
either the XSP server or the mod_mono Apache module).
|
||||
programs can be run using the Mono runtime and the XSP page
|
||||
parser.
|
||||
|
||||
We are now working bug fixing and adding missing features
|
||||
after making the whole pipeline compatible with MS.
|
||||
@@ -21,6 +21,41 @@
|
||||
Web Services support. Work for the supporting class libraries
|
||||
just started recently.
|
||||
|
||||
* Web Forms: The pieces
|
||||
|
||||
There are a couple of components to the puzzle:
|
||||
|
||||
<ul>
|
||||
* .aspx page parser (converts .aspx to C# code).
|
||||
|
||||
* System.Web.HttpRuntime support.
|
||||
|
||||
* Web controls (System.Web.UI.HtmlControls and
|
||||
System.Web.UI.WebControls).
|
||||
|
||||
* Underlying infrastructure for the controls (System.Web.UI).
|
||||
|
||||
* HttpRuntime.ProcessRequest is the core of the ASP.NET
|
||||
implementation.
|
||||
</ul>
|
||||
|
||||
|
||||
Gonzalo has been working on an ASP.NET parser that takes .aspx
|
||||
files and generated the code required to run them (the code lives in
|
||||
module `xsp' along with a little web server for testing).
|
||||
|
||||
Most of the runtime support was written by Patrik Torstensson
|
||||
(now at Intel). This was interesting, because in order to implement
|
||||
some of its features, Patrik had to go into the runtime/JIT engine and
|
||||
he spent a few weeks doing work there.
|
||||
|
||||
The classes for running ASP.NET are being actively written.
|
||||
Gaurav, Leen and Patrik worked in the core of the classes
|
||||
required to run ASP.NET web application as well as a small
|
||||
embeddable web server.
|
||||
|
||||
Duncan got our System.Web assembly to compile.
|
||||
|
||||
** HttpRuntime
|
||||
|
||||
Patrik has authored most of the HttpRuntime support (both on
|
||||
@@ -69,41 +104,29 @@
|
||||
over the web probably do not want to use direct ASP.NET but a
|
||||
wrapper around it.
|
||||
|
||||
* Web Forms: The pieces (historical)
|
||||
** Roadmap
|
||||
|
||||
There are a couple of components to the puzzle:
|
||||
1. The Parser.
|
||||
|
||||
<ul>
|
||||
* .aspx page parser (converts .aspx to C# code).
|
||||
2. Get the parser to generate output compatible with ASP.NET.
|
||||
|
||||
3. Run the sample output with the real Microsoft runtime
|
||||
but using our generated page.
|
||||
|
||||
4. Run the sample with our classes with the .NET runtime.
|
||||
|
||||
5. Run the samples with our classes with the our runtime (without
|
||||
using HttpRuntime).
|
||||
|
||||
6. Finish HttpRuntime.
|
||||
|
||||
* System.Web.HttpRuntime support.
|
||||
7. Running our sample code with our classes with our runtime.
|
||||
|
||||
8. Debug and add missing features.
|
||||
|
||||
We are in step 8. Among the missing features: server side includes,
|
||||
better caching, some configuration stuff, more validators...
|
||||
|
||||
* Web controls (System.Web.UI.HtmlControls and
|
||||
System.Web.UI.WebControls).
|
||||
|
||||
* Underlying infrastructure for the controls (System.Web.UI).
|
||||
|
||||
* HttpRuntime.ProcessRequest is the core of the ASP.NET
|
||||
implementation.
|
||||
</ul>
|
||||
|
||||
|
||||
Gonzalo has been working on an ASP.NET parser that takes .aspx
|
||||
files and generated the code required to run them (the code lives in
|
||||
module `xsp' along with a little web server for testing).
|
||||
|
||||
Most of the runtime support was written by Patrik Torstensson
|
||||
(now at Intel). This was interesting, because in order to implement
|
||||
some of its features, Patrik had to go into the runtime/JIT engine and
|
||||
he spent a few weeks doing work there.
|
||||
|
||||
The classes for running ASP.NET are being actively written.
|
||||
Gaurav, Leen and Patrik worked in the core of the classes
|
||||
required to run ASP.NET web application as well as a small
|
||||
embeddable web server.
|
||||
|
||||
Duncan got our System.Web assembly to compile.
|
||||
|
||||
** How to Help
|
||||
|
||||
Testing and fixing HtmlControls, WebControls and validators is an
|
||||
|
||||
@@ -19,10 +19,6 @@
|
||||
A Retargetable C Compiler - Design and Implementation: C. Fraser, David
|
||||
Hanson
|
||||
|
||||
* Threading
|
||||
|
||||
.NET Multithreading: Alan L. Dennis (ISBN 1-930110-54-5)
|
||||
|
||||
* Reference Manuals
|
||||
|
||||
<a
|
||||
@@ -38,4 +34,4 @@
|
||||
MIPS Processor supplement</a>
|
||||
|
||||
<a href="http://www.sparc.org/standards/V8.pdf">The SPARC Architecture
|
||||
Manual Version 8</a>
|
||||
Manual Version 8</a>
|
||||
+1
-4
@@ -25,7 +25,7 @@
|
||||
Support runtime for Visual Basic applications
|
||||
|
||||
<li><a
|
||||
href="http://www.go-mono.com/class-status-System.Windows.Forms.html">Windows.Forms</a>:
|
||||
href="http://www.go-mono.com/class-status-Windows.Forms.html">Windows.Forms</a>:
|
||||
there is also a <a
|
||||
href="http://lists.ximian.com/mailman/listinfo/mono-winforms-list">mailing
|
||||
list available</a>
|
||||
@@ -35,9 +35,6 @@
|
||||
<li><a
|
||||
href="http://www.go-mono.com/class-status-System.Runtime.Serialization.Formatters.Soap.html">System.Runtime.Serialization.Formatters.Soap</a>.
|
||||
|
||||
<li><a
|
||||
href="http://www.go-mono.com/class-status-System.Security.html">System.Security</a>:
|
||||
Xml Signature Security classes, also check the <a href="crypto.html">Cryptography status pages</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
+33
-11
@@ -8,31 +8,53 @@
|
||||
multilingual documentation makes for significant additional text.
|
||||
|
||||
With these considerations in mind, Mono will use external XML files
|
||||
for type documentation, rather than documenting the source
|
||||
inline. The XML file format used is inspired by the XML format used
|
||||
to document the ECMA APIs.
|
||||
|
||||
for type documentation, rather than documenting the source inline.
|
||||
|
||||
Several tools will be created for managing, verifying, generating,
|
||||
and updating class library documentation, including:
|
||||
|
||||
<ul>
|
||||
<li><a href="#monodoc">monodoc - A graphical documentation viewer.</a></li>
|
||||
<li>xmllint: a tool used to validate a proper XML document.
|
||||
<li><a href="#monodoc">MonoDoc - A graphical documentation editor and viewer.</a></li>
|
||||
<li><a href="#mkmaster">MkMaster - A command line tool to feed stub information to MonoDoc.</a></li>
|
||||
<li><a href="#aspnet">An ASP.NET documentation editor.</a></li>
|
||||
<li><a href="#xsltool">An xsl tool to convert monodoc xml to html documentation.</a></li>
|
||||
</ul>
|
||||
|
||||
You can download the tools to document Mono from the CVS
|
||||
repository from module `monodoc'.
|
||||
** XML Documentation Files and Formats
|
||||
|
||||
|
||||
*** Monodoc XML
|
||||
This XML is Mono's documentation format. Documentation and a DTD/Schema
|
||||
for Monodoc XML is located in cvs and can be found <a href="http://go-mono.org/monodoc.dtd">here</a>.
|
||||
|
||||
This XML could be generated by MonoDoc or the ASP.NET client.
|
||||
|
||||
More about the XML format <a href="http://go-mono.org/monodoc-xml.html">here</a>.
|
||||
** Documentation Tools
|
||||
|
||||
*** <a name="monodoc">MonoDoc</a>
|
||||
A graphical documentation editor and viewer. Currently, MonoDoc
|
||||
consists of a Qt# application and is in heavy development.
|
||||
|
||||
A graphical documentation viewer written in Gtk#. In the
|
||||
future we will have an ASP.NET front-end to present the
|
||||
documentation on the web as well.
|
||||
*** <a name="mkmaster">MkMaster</a>
|
||||
This tool creates the Master.xml file that MonoDoc uses as a reference
|
||||
for documentation generation. This is a reflection engine that is used
|
||||
to gather metadata from assemblies and create an xml representation.
|
||||
|
||||
*** <a name="aspnet">ASP.NET</a>
|
||||
This tool is planned.
|
||||
|
||||
*** <a name="xsltool">An XSL converter</a>
|
||||
This tool is planned. If someone wants to step forward and adopt this
|
||||
project, it would be very helpful ;)
|
||||
|
||||
** Status and Roadmap
|
||||
|
||||
*** 16, September 2002
|
||||
|
||||
A preliminary version of MonoDoc is in Mono's cvs. It is under heavy development.
|
||||
Once this is complete we will start documenting the API!
|
||||
|
||||
** Get Involved
|
||||
|
||||
Help us develop Mono's documentation tools! Subscribe to
|
||||
|
||||
-290
@@ -1,290 +0,0 @@
|
||||
* Cryptography
|
||||
|
||||
In the .NET framework cryptography can be found under a number of
|
||||
namespaces in several assemblies.
|
||||
|
||||
** Assembly: corlib
|
||||
|
||||
*** Namespace: <b>System.Security.Cryptography</b>
|
||||
|
||||
Thanks to the work of many people this namespace is almost complete.
|
||||
|
||||
**** Status
|
||||
<ul>
|
||||
* Every classes are present.
|
||||
|
||||
* Most classes have their unit tests. Some tests like <code>
|
||||
SymmetricAlgorithmTest</code> are generated by an external
|
||||
tool.
|
||||
</ul>
|
||||
|
||||
**** TODO
|
||||
<ul>
|
||||
* Support for adding/modifying OID using the
|
||||
<code>machine.config</code> configuration file (algorithms
|
||||
are done).
|
||||
|
||||
* RNGCryptoServiceProvider is currently only working on Linux.
|
||||
The current implementation reside in Mono's runtime and use
|
||||
the <code>/dev/[u]random</code> device (which do not exists
|
||||
under Windows). A Windows alternative is in the work (see
|
||||
Mono.Security.Win32 assembly section).
|
||||
|
||||
* Keypair persistance for RSA and DSA. This persistance must
|
||||
somehow be linked with X509 certificate stores (in planning).
|
||||
|
||||
* <code>PasswordDeriveBytes.CryptDeriveKey</code> is included
|
||||
in the BCL to provide compatibility with existing Windows
|
||||
applications. The main problem is that the key derivation
|
||||
algorithm can be different for every CSP (Crypto Service
|
||||
Provider). However for compatibility we should provide an
|
||||
implementation compatible with the MS CSP (most likely used).
|
||||
|
||||
* Analyse the current coverage of the unit tests on the
|
||||
cryptographic classes and complete the unit tests.
|
||||
|
||||
* Optimizations (performance) on most class are possible. Some
|
||||
have been done using the Community Edition of BoundChecker
|
||||
(a free VisualStudio addon) - recommanded!
|
||||
</ul>
|
||||
|
||||
**** Notes
|
||||
<ul>
|
||||
* All cryptographic algorithms are entirely managed, including
|
||||
classes named <code>*CryptoServiceProvider</code>, with the
|
||||
exception of <code>RNGCryptoServiceProvider</code> (which
|
||||
resides in the runtime).
|
||||
</ul>
|
||||
|
||||
|
||||
*** Namespace: <b>System.Security.Cryptography.X509Certificates</b>
|
||||
|
||||
**** Status
|
||||
<ul>
|
||||
* X.509 certificates are parsed using 100% managed code
|
||||
(using an internal ASN.1 class).
|
||||
|
||||
* Software Publisher Certificates (SPC) used by Authenticode
|
||||
(tm) to sign assemblies are supported (extraction from PE
|
||||
files) but <b>not</b> validated.
|
||||
|
||||
* Tests are generated from a set of existing certificates
|
||||
(about a dozen) each having different properties. Another
|
||||
set of certificates (more than 300) are used for a more
|
||||
complete test (but isn't part of the test suite for size
|
||||
and time consideration).
|
||||
</ul>
|
||||
|
||||
**** TODO
|
||||
<ul>
|
||||
* Authenticode(tm) support is incomplete. We can extract the
|
||||
certificates from PE files but cannot validate the signature
|
||||
nor the certificate chain (and we're still missing some trust
|
||||
anchors). See Tools section for more information.
|
||||
|
||||
* Integration with CryptoAPI (on Windows) isn't possible as
|
||||
long as the <code>X509Certificate(IntPtr)</code> constructor
|
||||
isn't completed.
|
||||
</ul>
|
||||
|
||||
**** Notes
|
||||
<ul>
|
||||
* <b>There's no validation of the certificates</b> done in this
|
||||
class (this isn't a restriction of Mono!). This means that
|
||||
certificate signatures and validity dates are <b>never</b>
|
||||
checked (except when used for Authenticode, i.e.
|
||||
<code>CreateFromSignedFile</code>).
|
||||
|
||||
* The newer X509Certificate class included in Microsoft's Web
|
||||
Service Enhancement (WSE) is a little better (as it includes
|
||||
CryptoAPI's validation) when <code>IsCurrent</code> is called.
|
||||
|
||||
* Microsoft implementation of <code>X509Certificate</code> is
|
||||
done by using CryptoAPI (unmanaged). From the exceptions
|
||||
thrown Authenticode(tm) support is done via COM.
|
||||
</ul>
|
||||
|
||||
<hr>
|
||||
** Assembly: System.Security
|
||||
|
||||
*** Namespace: <b>System.Security.Cryptography.Xml</b>
|
||||
|
||||
This namespace implements the <a href="http://www.w3.org/TR/xmldsig-core/">
|
||||
XML Digital Signature</a> specification from
|
||||
<a href="http://www.w3.org/">W3C</a>.
|
||||
|
||||
**** Status
|
||||
<ul>
|
||||
* All classes are present but some (Transforms) are only
|
||||
stubbed.
|
||||
|
||||
* Most classes have their unit tests.
|
||||
|
||||
* This assembly is present in CVS but only available when
|
||||
building using NAnt (i.e. makefile are missing).
|
||||
</ul>
|
||||
|
||||
**** TODO
|
||||
<ul>
|
||||
* All the transforms needs to be done. But this requires far
|
||||
more XML knowledge than crypto. Note: Most tests runs because
|
||||
the feeded XML is pre-c14n (by hand in the code) before
|
||||
signing (not because the transforms works). In the short
|
||||
term <code>libxml2</code> could be used to provide C14N, but
|
||||
in the long term a fully managed class would be much better.
|
||||
|
||||
* Makefile for building under non-Windows operating systems.
|
||||
</ul>
|
||||
|
||||
<hr>
|
||||
** Assembly: Mono.Security.Win32
|
||||
|
||||
This assembly goal is to provide maximum compatibility with CryptoAPI
|
||||
to application running with Mono's runtime on the Windows operating
|
||||
system.
|
||||
|
||||
<b>This assembly should NEVER be used directly by any application</b>.
|
||||
The classes should only be used by modifying the <code>machine.config
|
||||
</code> configuration file (and then only if this increased
|
||||
compatibility is required by an application).
|
||||
|
||||
*** Namespace: Mono.Security.Cryptography
|
||||
|
||||
**** Status
|
||||
<ul>
|
||||
* A RNGCryptoServiceProvider built on top of CryptoAPI.
|
||||
|
||||
* Wrapper classes for unmanaged versions of hash algorithms:
|
||||
MD2, MD4, MD5 and SHA1 are supported. <b>note</b>: some
|
||||
algorithms shouldn't be used in new design (MD4 is broken and
|
||||
MD2 isn't considered safe). They are included to preserve
|
||||
interoperability with older applications (e.g. some old, but
|
||||
still valid, X.509 certificates use MD2).
|
||||
</ul>
|
||||
|
||||
**** TODO
|
||||
<ul>
|
||||
* Wrapper classes for unmanaged versions of symmetric
|
||||
encryption algorithms (like DES, TripleDES, RC2 and others
|
||||
present in default CSP).
|
||||
* Wrapper classes for unmanaged versions of asymmetric
|
||||
algorithms (like DSA and RSA) which persist their keypair
|
||||
into the specified CSP.
|
||||
</ul>
|
||||
|
||||
<hr>
|
||||
** Assembly: Microsoft.Web.Services
|
||||
|
||||
Microsoft Web Service Enhancement (WSE), known as Web Service
|
||||
Development Kit (WSDK) in it's beta days, is an add-on the .NET
|
||||
framework that implements WS-Security (and other WS-* specifications).
|
||||
It also includes improved support for XML Signature (replacing and/or
|
||||
extending <code>System.Security.Cryptography.Xml</code>) and X509
|
||||
certificates.
|
||||
|
||||
Note: WSE is distributed as an add-on because the WS-Security
|
||||
specification isn't yet completed by
|
||||
<a href="http://www.oasis-open.org/committees/wss/">OASIS</a>.
|
||||
|
||||
<b>There are some licensing issues to consider before stating to
|
||||
implement WS-Security. All contributors must sign an agreement with
|
||||
Microsoft before commiting anything related to WS-Security into CVS.
|
||||
</b>
|
||||
|
||||
*** Namespace: Microsoft.Web.Services.Security
|
||||
|
||||
**** Status
|
||||
<ul>
|
||||
* Nothing (yet) commited in CVS.
|
||||
</ul>
|
||||
|
||||
*** Namespace: Microsoft.Web.Services.Security.X509
|
||||
|
||||
**** Status
|
||||
<ul>
|
||||
* Nothing (yet) commited in CVS.
|
||||
</ul>
|
||||
|
||||
**** TODO
|
||||
<ul>
|
||||
* We need to define certificate stores (for both users and
|
||||
machines). These sames stores must be linked with asymmetric
|
||||
keypairs. This could also be used to store the SPC roots.
|
||||
</ul>
|
||||
|
||||
<hr>
|
||||
** Other stuff
|
||||
|
||||
There are other, not so visible, uses of cryptography both inside and
|
||||
outside the class library - such as:
|
||||
|
||||
<ul>
|
||||
* SSL/TLS for secure communication (investigation under way).
|
||||
|
||||
* Assembly signing (and verification) using StrongNames.
|
||||
|
||||
* Assembly signing (and verification) using Authenticode(tm).
|
||||
</ul>
|
||||
|
||||
|
||||
*** Tools
|
||||
|
||||
There are many tools in the .NET framework that indirectly interacts
|
||||
with some cryptographic classes. Mono will eventually need these tools.
|
||||
Unless noted the tools should work on any CLR (tested with both Mono
|
||||
and Microsoft).
|
||||
|
||||
**** Status
|
||||
|
||||
The following tools are complete:
|
||||
<ul>
|
||||
* <code>secutil</code> is a tool to extract certificates and
|
||||
strongnames from assemblies in a format that can be easily
|
||||
re-used in source code (C# or VB.NET syntax).
|
||||
|
||||
* <code>cert2spc</code> is a tool to transform multiple X.509
|
||||
certificates and CRLs into a Software Publisher Certificate
|
||||
(SPC) file - which is a long name for a simple PKCS#7 file.
|
||||
</ul>
|
||||
|
||||
**** TODO
|
||||
The following tools are still missing or incomplete:
|
||||
<ul>
|
||||
* <code>monosn</code> is a clone of the <code>sn</code> to manage
|
||||
strongnames. This tools is part of the runtime (not the class
|
||||
library) and as such is written in C and won't run without Mono.
|
||||
|
||||
* <code>signcode</code> and <code>chktrust</code> (in progress)
|
||||
for signing and validating Authenticode(tm) signatures on
|
||||
assemblies (or any PE file).
|
||||
|
||||
* <code>makecert</code> to create X.509 test certificates that
|
||||
can be used (once transformed in SPC) to sign assemblies.
|
||||
|
||||
* Other tools like a, GUI-based, certificate manager...
|
||||
</ul>
|
||||
|
||||
Note that many of the tools requires the class library and/or the
|
||||
runtime to be ready for them.
|
||||
|
||||
<hr>
|
||||
** How to Help
|
||||
|
||||
Complete any of the TODO (and feel good about it ;-).
|
||||
|
||||
Add missing unit tests to classes or methods.
|
||||
|
||||
Write some documentation on the cryptographic classes for MonkeyGuide
|
||||
(as I'm not a good writer, at least in English, but you must be a good
|
||||
reader if you got to this part).
|
||||
|
||||
Optimization can also be done on algorithms as crypto is never fast
|
||||
enough. Just be sure to test every optimization (using the unit test)
|
||||
carefully - it's so fast to break an algorithm ;-).
|
||||
|
||||
Contact Sebastien Pouliot (<a href="mailto:[email protected]">home</a>
|
||||
, <a href="mailto:[email protected]">work</a>) if you need additional
|
||||
informations about the status of the cryptographic classes.
|
||||
|
||||
<hr>
|
||||
Last reviewed: February 5, 2003 (post mono 0.19)
|
||||
+3
-192
@@ -14,16 +14,13 @@
|
||||
<ul>
|
||||
|
||||
* The development tools (compilers, assembler tools,
|
||||
language reference, design time features): these
|
||||
live in the `monodoc' CVS module.
|
||||
language reference, design time features).
|
||||
|
||||
* Frequently Asked Question compilations.
|
||||
|
||||
* HOWTO documents.
|
||||
|
||||
* The Class Libraries (Both the original .NET class
|
||||
libraries as well as the class libraries produced by
|
||||
the project).
|
||||
* The Class Libraries
|
||||
|
||||
* Tutorials on Mono and the specifics of running it.
|
||||
|
||||
@@ -32,197 +29,11 @@
|
||||
|
||||
</ul>
|
||||
|
||||
* Class Library documentation
|
||||
** Class Library documentation
|
||||
|
||||
We are moving to a new setup for documenting the class libraries,
|
||||
and you can read about it <a href="classlib-doc.html">here</a>.
|
||||
|
||||
There are two classes of documentation: free documentation for
|
||||
existing .NET classes and documentation for the classes that
|
||||
we have developed on top of .NET.
|
||||
|
||||
There is a large body of documentation that came from the ECMA
|
||||
standarization effort that has been checked into CVS. It does
|
||||
not contain everything Mono and .NET have, so they need to be
|
||||
updated and augmented.
|
||||
|
||||
** Gtk# documentation
|
||||
|
||||
We also have a large body of class libraries that are specific
|
||||
to Mono, for example the documentation for Gtk#.
|
||||
|
||||
We have checked in stub documentation for Gtk# into the CVS
|
||||
repository (on gtk-sharp/doc) and we need volunteers to help
|
||||
populate the documentation for it. Since Gtk# is a wrapper
|
||||
for Gtk, plenty of documentation exists in the <a
|
||||
href="http://developer.gnome.org/doc/API">Gnome developer
|
||||
site</a>.
|
||||
|
||||
To get started:
|
||||
|
||||
You need to download Gtk# from the CVS repository. The module
|
||||
name is `gtk-sharp'. You can obtain a copy from both the CVS
|
||||
repository or the anonymous CVS repository.
|
||||
|
||||
To pull your copy type:
|
||||
|
||||
<pre>
|
||||
cvs co gtk-sharp
|
||||
</pre>
|
||||
Documentation lives in gtk-sharp/doc/en. The "en" indicates the
|
||||
English language, the first one we are targeting. We can later
|
||||
do translations, but for now we are focusing on a single
|
||||
language.
|
||||
|
||||
In that directory you will find the documentation organized by
|
||||
namespaces. One directory per namespace. In the directories
|
||||
you will find one XML file per class that needs to be
|
||||
documented. The mission is to fill in the data with useful
|
||||
information. Feel free to grab liberally information from the
|
||||
Gtk documentation from:
|
||||
|
||||
<a href="http://developer.gnome.org/doc/API/">http://developer.gnome.org/doc/API/</a>
|
||||
|
||||
Of course, the API does not apply directly. It only applies at
|
||||
a foundational level, so you can not really just copy and
|
||||
paste. Summaries, and remarks sections can probably be lifted
|
||||
with little or no effort.
|
||||
|
||||
Gtk# uses properties to represent get/set operations in the C
|
||||
API, so you can also use some bits from there.
|
||||
|
||||
Most of the documentation contains already place holders for
|
||||
text, we use the internationally approved phrase for this
|
||||
purpose, `To be added'. So the quest is to remove all of the
|
||||
"To be added" strings with information with resembles as closely
|
||||
as possible the toolkit reality.
|
||||
|
||||
*** The pieces to be filled.
|
||||
|
||||
Summaries are one or two line descriptions of the element
|
||||
(class, struct, interface, method, field, event, delegate), and
|
||||
its used to render summary pages. So it has to be short.
|
||||
|
||||
The "remarks" section is used to describe in detail the element.
|
||||
|
||||
**** Tags.
|
||||
|
||||
As you document Gtk# you will have a number of tags that you can
|
||||
use inside the summary and remarks sections, these are:
|
||||
|
||||
<pre>
|
||||
<para> </para>
|
||||
</pre>
|
||||
Used to separate paragraphs.
|
||||
|
||||
<pre>
|
||||
<paramref name="param_name"/>
|
||||
</pre>
|
||||
Used to reference a formal parameter to a function.
|
||||
|
||||
<pre>
|
||||
<see cref="T:SomeTypeName"/>
|
||||
</pre>
|
||||
Use this to reference a type, this will include an hyper
|
||||
link to the page for type SomeTypeName.
|
||||
|
||||
For example, to reference "System.Enum", do:
|
||||
|
||||
<pre>
|
||||
<see cref="T:System.Enum"/>
|
||||
</pre>
|
||||
|
||||
<pre>
|
||||
<see cref="P:SomeTypeName.Property"/>
|
||||
</pre>
|
||||
Use this to reference a property, this will include an hyper
|
||||
link to the page for the property `Property' of type `SomeTypeName'.
|
||||
|
||||
For example, to reference the BaseType property in System.Type, do:
|
||||
|
||||
<pre>
|
||||
<see cref="P:System.Type.BaseType"/>
|
||||
</pre>
|
||||
|
||||
<pre>
|
||||
<see cref="M:SomeTypeName.Method(type,type)"/>
|
||||
</pre>
|
||||
Use this to reference a method, this will include an hyper
|
||||
link to the page for the method `Method' of type `SomeTypeName'.
|
||||
|
||||
For example, to reference the ToString method in System.Object, do:
|
||||
|
||||
<pre>
|
||||
<see cref="M:System.Object.ToString()"/>
|
||||
</pre>
|
||||
|
||||
<pre>
|
||||
<see langword="keyword"/>
|
||||
</pre>
|
||||
Use this to link to a keyword in the C# language, for
|
||||
example to link to `true', do:
|
||||
|
||||
<pre>
|
||||
<see langword="true"/>
|
||||
</pre>
|
||||
|
||||
<pre>
|
||||
<example> ... </example>
|
||||
</pre>
|
||||
Use example to insert an example. The example can
|
||||
contain explanatory text and code.
|
||||
|
||||
<pre>
|
||||
<code lang="C#">.. </code>
|
||||
</pre>
|
||||
|
||||
Use this to provide a sample C# program, typically used
|
||||
within the <example> tags.
|
||||
|
||||
When providing examples, try to provide a full example,
|
||||
we would like to be able to have a button to compile and
|
||||
run samples embedded into the documentation, or pop up
|
||||
an editor to let the user play with the sample.
|
||||
|
||||
You can link to an example like this:
|
||||
|
||||
<pre>
|
||||
<code lang="C#" source="file.cs"> </code>
|
||||
</pre>
|
||||
|
||||
<pre>
|
||||
<item>
|
||||
</pre>
|
||||
|
||||
<pre>
|
||||
<list type="bullet"> </list>
|
||||
</pre>
|
||||
|
||||
Use this to create lists. Lists contains <item>
|
||||
elements
|
||||
|
||||
<pre>
|
||||
<list type="table"> </lits>
|
||||
<listheader>
|
||||
<term>YOUR FIRST COLUMN</term>
|
||||
<description>YOUR DESCRIPTION</description>
|
||||
</listheader>
|
||||
</pre>
|
||||
For two-column tables. Inside use:
|
||||
|
||||
<pre>
|
||||
<item>
|
||||
<term>First</term>
|
||||
<description>First descritpion</description>
|
||||
</item>
|
||||
<item>
|
||||
<term>Second</term>
|
||||
<description>Second descirption</description>
|
||||
</item>
|
||||
</pre>
|
||||
|
||||
** Words of warning.
|
||||
|
||||
A few words of warning and advice for class documentors:
|
||||
|
||||
A well-documented API can ease hours of frustration; as Mono
|
||||
|
||||
+82
-291
@@ -6,247 +6,12 @@
|
||||
href="runtime.html">Runtime</a> description for more details
|
||||
on this part of the project.
|
||||
|
||||
The software is also available on the `Mono' channel in <a href="http://www.ximian.com/products/redcarpet/">Red Carpet</a>.
|
||||
|
||||
Some useful links: <a
|
||||
href="http://www.go-mono.org/mono-beginning.html">Resources/Beginning
|
||||
section</a>, the <a
|
||||
href="http://www.go-mono.org/faq.html">FAQ</a>.
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
<tr bgcolor="#DDDDDD">
|
||||
<td>
|
||||
<b>Release 0.19</b><br>
|
||||
<a href="archive/mono-0.19">Release notes</a><br>
|
||||
Jan 20th, 2003
|
||||
</td>
|
||||
<td>
|
||||
<table cellspacing="1" cellpadding="3">
|
||||
<tr bgcolor="#BBBBBB">
|
||||
<td>
|
||||
<b>Source Code</b>
|
||||
</td>
|
||||
<td>
|
||||
<ul>
|
||||
<li><a href="archive/mcs-0.19.tar.gz">Mono Class Libraries and C# Compiler.</a>
|
||||
<li><a href="archive/mono-0.19.tar.gz">Mono Runtime</a>
|
||||
<li><a href="archive/gc6.1.tar.gz">Boehm GC 6.1</a>
|
||||
<li><a href="archive/xsp-0.2.tar.gz">XSP web server</a> <b><font color="#dd0000">New!</font></b>
|
||||
<li><a href="archive/mono-debugger-0.2.0.tar.gz">Mono Debugger 0.2.0</a> <b><font color="#dd0000">New!</font></b>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#BBBBBB">
|
||||
<td>
|
||||
<b>Source RPMs</b><br>
|
||||
(No RPMS for XSP).
|
||||
</td>
|
||||
<td>
|
||||
<ul>
|
||||
<li><a href="archive/libgc-6.1-1.src.rpm">libgc-6.1-1.src.rpm</a>
|
||||
<li><a href="archive/mono-0.19-1.src.rpm">mono-0.19-1.src.rpm</a>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#999999">
|
||||
<b>Red Hat 7.3/x86</b>
|
||||
<ul>
|
||||
<li><a href="archive/redhat-73-i386/libgc-6.1-1.i386.rpm">libgc-6.1-1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-73-i386/libgc-devel-6.1-1.i386.rpm">libgc-devel-6.1-1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-73-i386/mono-0.19-1.i386.rpm">mono-0.19-1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-73-i386/mono-devel-0.19-1.i386.rpm">mono-devel-0.19-1.i386.rpm</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td bgcolor="#999999">
|
||||
<b>Red Hat 7.2/x86</b>
|
||||
<ul>
|
||||
<li><a href="archive/redhat-72-i386/libgc-6.1-1.i386.rpm">libgc-6.1-1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-72-i386/libgc-devel-6.1-1.i386.rpm">libgc-devel-6.1-1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-72-i386/mono-0.19-1.i386.rpm">mono-0.19-1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-72-i386/mono-devel-0.19-1.i386.rpm">mono-devel-0.19-1.i386.rpm</a>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#999999">
|
||||
<b>Red Hat 7.1/x86</b>
|
||||
<ul>
|
||||
<li><a href="archive/redhat-71-i386/libgc-6.1-1.i386.rpm">libgc-6.1-1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-71-i386/libgc-devel-6.1-1.i386.rpm">libgc-devel-6.1-1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-71-i386/mono-0.19-1.i386.rpm">mono-0.19-1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-71-i386/mono-devel-0.19-1.i386.rpm">mono-devel-0.19-1.i386.rpm</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td bgcolor="#999999">
|
||||
<b>Mandrake 8.2/x86</b>
|
||||
<ul>
|
||||
<li><a href="archive/mandrake-82-i386/libgc-6.1-1.i586.rpm">libgc-6.1-1.i586.rpm</a>
|
||||
<li><a href="archive/mandrake-82-i386/libgc-devel-6.1-1.i586.rpm">libgc-devel-6.1-1.i586.rpm</a>
|
||||
<li><a href="archive/mandrake-82-i386/mono-0.19-1.i586.rpm">mono-0.19-1.i586.rpm</a>
|
||||
<li><a href="archive/mandrake-82-i386/mono-devel-0.19-1.i586.rpm">mono-devel-0.19-1.i586.rpm</a>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#999999">
|
||||
<b>SuSE 8.0/x86</b>
|
||||
<ul>
|
||||
<li><a href="archive/suse-80-i386/libgc-6.1-1.i386.rpm">libgc-6.1-1.i386.rpm</a>
|
||||
<li><a href="archive/suse-80-i386/libgc-devel-6.1-1.i386.rpm">libgc-devel-6.1-1.i386.rpm</a>
|
||||
<li><a href="archive/suse-80-i386/mono-0.19-1.i386.rpm">mono-0.19-1.i386.rpm</a>
|
||||
<li><a href="archive/suse-80-i386/mono-devel-0.19-1.i386.rpm">mono-devel-0.19-1.i386.rpm</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td bgcolor="#999999">
|
||||
<b>Red Hat 8.0/x86</b>
|
||||
<ul>
|
||||
<li><a href="archive/redhat-80-i386/libgc-6.1-1.i386.rpm">libgc-6.1-1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-80-i386/libgc-devel-6.1-1.i386.rpm">libgc-devel-6.1-1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-80-i386/mono-0.19-1.i386.rpm">mono-0.19-1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-80-i386/mono-devel-0.19-1.i386.rpm">mono-devel-0.19-1.i386.rpm</a>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#999999">
|
||||
<!-- <b>Windows Setup Wizard (NT/2000/XP)</b>␍ -->
|
||||
<!-- <ul>␍ -->
|
||||
<!-- <li><a href="archive/mono-0.19-stable.exe">Mono-Setup</a>␍ -->
|
||||
<!-- </ul>␍ -->
|
||||
<!-- </td>␍ -->
|
||||
<td bgcolor="#999999">
|
||||
<b>Debian packages</b>
|
||||
<ul>
|
||||
<li><a href="http://www.atoker.com/mono/">Alp's web site</a>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr bgcolor="#CCCCC">
|
||||
<td>
|
||||
<b>Regression Tests</b><br>
|
||||
</td>
|
||||
<td>
|
||||
You can get binaries for the Mono Regression Test
|
||||
Suite <a href="archive/mono-tests.tar.gz">here</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
<br>
|
||||
* Older Releases:
|
||||
|
||||
We provide binaries for older releases until we have packages for the new release.
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
<tr bgcolor="#DDDDDD">
|
||||
<td>
|
||||
<b>Release 0.18</b><br>
|
||||
<a href="archive/mono-0.18">Release notes</a><br>
|
||||
Jan 12th, 2003
|
||||
</td>
|
||||
<td>
|
||||
<table cellspacing="1" cellpadding="3">
|
||||
<tr bgcolor="#BBBBBB">
|
||||
<td>
|
||||
<b>Source Code</b>
|
||||
</td>
|
||||
<td>
|
||||
<ul>
|
||||
<li><a href="archive/mcs-0.18.tar.gz">Mono Class Libraries and C# Compiler.</a>
|
||||
<li><a href="archive/mono-0.18.tar.gz">Mono Runtime</a>
|
||||
<li><a href="archive/gc6.1.tar.gz">Boehm GC 6.1</a>
|
||||
<li><a href="archive/xsp-0.2.tar.gz">XSP web server</a> <b><font color="#dd0000">New!</font></b>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#BBBBBB">
|
||||
<td>
|
||||
<b>Source RPMs</b><br>
|
||||
(No RPMS for XSP).
|
||||
</td>
|
||||
<td>
|
||||
<ul>
|
||||
<li><a href="archive/libgc-6.1-1.src.rpm">libgc-6.1-1.src.rpm</a>
|
||||
<li><a href="archive/mono-0.18-1.src.rpm">mono-0.18-1.src.rpm</a>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
<tr bgcolor="#DDDDDD">
|
||||
<td>
|
||||
<b>Release 0.17</b><br>
|
||||
<a href="archive/mono-0.17">Release notes</a><br>
|
||||
Dec 9th, 2002.
|
||||
</td>
|
||||
<td>
|
||||
<table cellspacing="1" cellpadding="3">
|
||||
<tr bgcolor="#BBBBBB">
|
||||
<td>
|
||||
<b>Source Code</b>
|
||||
</td>
|
||||
<td>
|
||||
<ul>
|
||||
<li><a href="archive/mcs-0.17.tar.gz">Mono Class Libraries and C# Compiler.</a>
|
||||
<li><a href="archive/mono-0.17.tar.gz">Mono Runtime</a>
|
||||
<li><a href="archive/gc6.1.tar.gz">Boehm GC 6.1</a>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr bgcolor="#BBBBBB">
|
||||
<td>
|
||||
<b>Source RPMs</b><br>
|
||||
(No RPMS for XSP).
|
||||
</td>
|
||||
<td>
|
||||
<ul>
|
||||
<li><a href="archive/libgc-6.1-1.src.rpm">libgc-6.1-1.src.rpm</a>
|
||||
<li><a href="archive/mono-0.17-2.src.rpm">mono-0.17-2.src.rpm</a>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#999999">
|
||||
<b>Windows Setup Wizard (NT/2000/XP)</b>
|
||||
<ul>
|
||||
<li><a href="archive/mono-0.17-stable.exe">Mono-Setup</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td bgcolor="#999999">
|
||||
<b>Debian packages</b>
|
||||
<ul>
|
||||
<li><a href="http://www.atoker.com/mono/">Alp's web site</a>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
href="http://www.go-mono.org/faq.html">FAQ</a> and the <a
|
||||
href="http://geneura.ugr.es/~jaime/deploy/mono-common-problems.html">
|
||||
Mono Common Problems</a>.
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
@@ -284,6 +49,66 @@
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#999999">
|
||||
<b>Red Hat 7.3/x86</b>
|
||||
<ul>
|
||||
<li><a href="archive/redhat-73-i386/libgc-6.1-1.i386.rpm">libgc-6.1-1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-73-i386/libgc-devel-6.1-1.i386.rpm">libgc-devel-6.1-1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-73-i386/mono-0.16-1.i386.rpm">mono-0.16-1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-73-i386/mono-devel-0.16-1.i386.rpm">mono-devel-0.16-1.i386.rpm</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td bgcolor="#999999">
|
||||
<b>Red Hat 7.2/x86</b>
|
||||
<ul>
|
||||
<li><a href="archive/redhat-72-i386/libgc-6.1-1.i386.rpm">libgc-6.1-1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-72-i386/libgc-devel-6.1-1.i386.rpm">libgc-devel-6.1-1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-72-i386/mono-0.16-1.i386.rpm">mono-0.16-1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-72-i386/mono-devel-0.16-1.i386.rpm">mono-devel-0.16-1.i386.rpm</a>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#999999">
|
||||
<b>Red Hat 7.1/x86</b>
|
||||
<ul>
|
||||
<li><a href="archive/redhat-71-i386/libgc-6.1-1.i386.rpm">libgc-6.1-1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-71-i386/libgc-devel-6.1-1.i386.rpm">libgc-devel-6.1-1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-71-i386/mono-0.16-1.i386.rpm">mono-0.16-1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-71-i386/mono-devel-0.16-1.i386.rpm">mono-devel-0.16-1.i386.rpm</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td bgcolor="#999999">
|
||||
<b>Mandrake 8.2/x86</b>
|
||||
<ul>
|
||||
<li><a href="archive/mandrake-82-i386/libgc-6.1-1.i586.rpm">libgc-6.1-1.i586.rpm</a>
|
||||
<li><a href="archive/mandrake-82-i386/libgc-devel-6.1-1.i586.rpm">libgc-devel-6.1-1.i586.rpm</a>
|
||||
<li><a href="archive/mandrake-82-i386/mono-0.16-1.i586.rpm">mono-0.16-1.i586.rpm</a>
|
||||
<li><a href="archive/mandrake-82-i386/mono-devel-0.16-1.i586.rpm">mono-devel-0.16-1.i586.rpm</a>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#999999">
|
||||
<b>SuSE 8.0/x86</b>
|
||||
<ul>
|
||||
<li><a href="archive/suse-80-i386/libgc-6.1-1.i386.rpm">libgc-6.1-1.i386.rpm</a>
|
||||
<li><a href="archive/suse-80-i386/libgc-devel-6.1-1.i386.rpm">libgc-devel-6.1-1.i386.rpm</a>
|
||||
<li><a href="archive/suse-80-i386/mono-0.16-1.i386.rpm">mono-0.16-1.i386.rpm</a>
|
||||
<li><a href="archive/suse-80-i386/mono-devel-0.16-1.i386.rpm">mono-devel-0.16-1.i386.rpm</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td bgcolor="#999999">
|
||||
<b>Red Hat 8.0/x86</b>
|
||||
<ul>
|
||||
<li><a href="archive/redhat-80-i386/libgc-6.1-1.i386.rpm">libgc-6.1-1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-80-i386/libgc-devel-6.1-1.i386.rpm">libgc-devel-6.1-1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-80-i386/mono-0.16-1.i386.rpm">mono-0.16-1.i386.rpm</a>
|
||||
<li><a href="archive/redhat-80-i386/mono-devel-0.16-1.i386.rpm">mono-devel-0.16-1.i386.rpm</a>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td bgcolor="#999999">
|
||||
<b>Linux s390</b>
|
||||
@@ -296,15 +121,34 @@
|
||||
<li><a href="archive/s390/mono-devel-0.16-1.s390.rpm">mono-devel-0.16-1.s390.rpm</a>
|
||||
</ul>
|
||||
</td>
|
||||
<td bgcolor="#999999">
|
||||
<b>Windows Setup Wizard (NT/2000/XP)</b>
|
||||
<ul>
|
||||
<li><a href="archive/mono-0.16-stable.exe">Mono-Setup</a>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr bgcolor="#CCCCC">
|
||||
<td>
|
||||
<b>Regression Tests</b><br>
|
||||
</td>
|
||||
<td>
|
||||
You can get binaries for the Mono Regression Test
|
||||
Suite <a href="archive/mono-tests.tar.gz">here</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
* Older Releases:
|
||||
|
||||
We provide binaries for older releases until we have packages for the new release.
|
||||
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
@@ -387,21 +231,6 @@
|
||||
The <a href="anoncvs.html">anoncvs</a> mirrors provided by
|
||||
Hispalinux are updated every six hours.
|
||||
|
||||
* Compiling the code
|
||||
|
||||
There are a number of ways of compiling Mono
|
||||
|
||||
<ul>
|
||||
<li>From the <a href="#scripts">scripts</A>
|
||||
|
||||
<LI><a href="#install">Manually</a> for the first time.
|
||||
|
||||
<li>Manually, <a href="#upgrade">while upgrading</a> to CVS
|
||||
</ul>
|
||||
|
||||
(which is an easy way to get the latest CVS information)
|
||||
|
||||
<a name="scripts">
|
||||
* Compiling with scripts
|
||||
|
||||
There are scripts to help build mono for both Unix and Windows. Get
|
||||
@@ -480,7 +309,6 @@
|
||||
|
||||
You can change /usr/local to something else if you want.
|
||||
</ul>
|
||||
|
||||
|
||||
*** On Windows, to install and work on the compiler and the class libraries:
|
||||
|
||||
@@ -603,40 +431,3 @@ make install
|
||||
|
||||
</ul>
|
||||
|
||||
<a name="upgrading">
|
||||
** Upgrading
|
||||
|
||||
To upgrade your Mono installation from CVS, it is very
|
||||
important that you update your Mono and MCS modules from CVS
|
||||
at the same time. Failure to do so might result in a
|
||||
problematic installation as the runtime and the class
|
||||
libraries will be out of sync.
|
||||
|
||||
Run the following commands to update your CVS tree (more
|
||||
details in <a href="ccvs.html">Cvs and Mono</a> and the <A
|
||||
href="anoncvs.html">AnonCVS and Mono</a> pages).
|
||||
|
||||
<pre>
|
||||
(cd mono; cvs update -dP .)
|
||||
(cd mcs; cvs update -dP .)
|
||||
</pre>
|
||||
|
||||
Once you have updated your sources, remove any cached
|
||||
assemblies or old binaries from the Mono "runtime" directory,
|
||||
and then compile each component:
|
||||
|
||||
<pre>
|
||||
(cd mono/runtime; rm *exe *dll)
|
||||
(cd mono; make)
|
||||
(cd mcs; make)
|
||||
</pre>
|
||||
|
||||
Now you can install the result:
|
||||
|
||||
<pre>
|
||||
(cd mono; make install)
|
||||
</pre>
|
||||
|
||||
Notice that following the above procedure does not require you
|
||||
to manually install the software in the `mcs' directory, as
|
||||
the relevant files will be copied by the `mono' makefiles.
|
||||
@@ -3,7 +3,6 @@
|
||||
<a href="#gnome">Mono and GNOME</a><br>
|
||||
<a href="#gui">Building GUI applications with Mono</a><br>
|
||||
<a href="#msft">Mono and Microsoft</a><br>
|
||||
<a href="#platforms">Mono platforms</a><br>
|
||||
<a href="#pnpproject">Mono and the Portable.NET Project</a><br>
|
||||
<a href="#webservices">Web Services</a><br>
|
||||
<a href="#asp">Mono and ASP.NET</a><br>
|
||||
@@ -315,16 +314,14 @@ A: We do not know, volunteers are working on this, but there is no set
|
||||
|
||||
Q: Is Microsoft helping Ximian with this project?
|
||||
|
||||
A: There is no high level communication between Ximian and Microsoft
|
||||
at this point, but engineers who work on .NET or the ECMA groups
|
||||
have been very friendly, and very nice to answer our questions, or
|
||||
clarify part of the specification for us.
|
||||
A: No. Ximian CTO Miguel de Icaza had a friendly conversation with
|
||||
Microsoft software architect David Stutz, but that's about the
|
||||
extent of the contact. Microsoft is interested in other
|
||||
implementations of .NET and are willing to help make the ECMA spec
|
||||
more accurate for this purpose.
|
||||
|
||||
Microsoft is interested in other implementations of .NET and are
|
||||
willing to help make the ECMA spec more accurate for this purpose.
|
||||
|
||||
Ximian was also invited to participate in the ECMA committee
|
||||
meetings for C# and the CLI.
|
||||
Ximian representatives have also spoken with Sam Ruby at the ECMA
|
||||
TG3 committee to discuss the same issues.
|
||||
|
||||
Q: Is Microsoft or Corel paying Ximian to do this?
|
||||
|
||||
@@ -428,44 +425,6 @@ A: Not yet, but the client side API for authentication is not the problem.
|
||||
Alliance APIs. The problem is people on the web provider end that might use
|
||||
this for authentication.
|
||||
|
||||
<a name="platforms"></a>
|
||||
** Mono Platforms
|
||||
|
||||
Q: What operating systems does Mono run on?
|
||||
|
||||
A: Mono is known to run on Linux, Unix and Windows systems.
|
||||
|
||||
Q: What architectures does Mono support?
|
||||
|
||||
A: Mono today ships with a Just-in-Time compiler for x86-based
|
||||
systems. It is tested regularly on Linux, FreeBSD and Windows
|
||||
(with the XP/NT core).
|
||||
|
||||
There is also an interpreter, which is slower that runs on the
|
||||
s390, SPARC and PowerPC architectures.
|
||||
|
||||
Q: Can Mono run on Windows 9x, or ME editions?
|
||||
|
||||
A: Mono requires Unicode versions of Win32 APIs to run,
|
||||
and only a handful of *W functions is supported under Win9x.
|
||||
|
||||
There is Microsoft Layer for Unicode that provides implementation
|
||||
of these APIs on 9x systems.
|
||||
|
||||
Unfortunately it uses linker trick for delayed load that is not
|
||||
supported by ld, so some sort of adapter is necessary.
|
||||
|
||||
You will need MSLU and one of the following libs to link Mono to
|
||||
unicows.dll <a
|
||||
href="http://mono.eurosoft.od.ua/files/unimono.zip">http://mono.eurosoft.od.ua/files/unimono.zip</a>
|
||||
or alternatively search the net for "libunicows".
|
||||
|
||||
No changes to Mono source code required, the only thing is to make
|
||||
sure that linker will resolve imports to adapter library instead of
|
||||
Win32 libs. This is achieved by inserting -lunimono before
|
||||
-lkerner32/user32 in the linker's specs file.
|
||||
|
||||
|
||||
<a name="pnpproject"></a>
|
||||
** Mono and Portable.NET
|
||||
|
||||
@@ -477,20 +436,13 @@ A: Most of Mono is being written using C#, with only
|
||||
|
||||
It is easier to describe what is unique about Mono:
|
||||
<ul>
|
||||
<li> A Just-in-Time compiler engine. This is important for
|
||||
making your applications fast.
|
||||
|
||||
<li> A self-hosting C# compiler written in C#, which is clean, easy
|
||||
to maintain.
|
||||
|
||||
<li> Focus on the .NET Framework: we are tracking down the .NET
|
||||
Framework API definition, as we believe it is the API people
|
||||
will be most familiar with.
|
||||
|
||||
<li> A multi-platform runtime engine: both a JIT engine and an
|
||||
interpreter exist. The JIT engine runs currently on x86
|
||||
systems, while the interpreter works on SPARC, StrongARM,
|
||||
s390 and PowerPC systems.
|
||||
systems, while the interpreter works on SPARC, StrongARM and
|
||||
PowerPC systems.
|
||||
|
||||
<li> Supports Linux, Windows and Solaris at this point.
|
||||
|
||||
@@ -519,9 +471,8 @@ A: Most of Mono is being written using C#, with only
|
||||
<li> We have a great community of developers, without which Mono
|
||||
would not be possible.
|
||||
|
||||
<li> We are working on an ahead of time compilation mode to
|
||||
pre-compile code for the target architecture (this is part
|
||||
of our new code generation effort).
|
||||
<li> We will provide an ahead of time compilation mode in the
|
||||
future.
|
||||
</ul>
|
||||
|
||||
<a name="webservices"></a>
|
||||
@@ -708,16 +659,6 @@ Q: I'm wondering if there are any plans to start using nant to build the
|
||||
A: Maybe well be doing some sort of automated build process + testing when
|
||||
the summer finish.
|
||||
|
||||
Q: My C code uses the __stdcall which is not availble on Linux, how can I
|
||||
make the code portable Windows/Unix across platforms?
|
||||
|
||||
A: Replace the __stdcall attribute with the STDCALL macro, and include this
|
||||
in your C code for newer gcc versions:
|
||||
|
||||
#ifndef STDCALL
|
||||
#define STDCALL __attribute__((stdcall))
|
||||
#endif
|
||||
|
||||
<a name="asp">
|
||||
** Mono and ASP.NET
|
||||
|
||||
@@ -763,12 +704,6 @@ A: We are implementing all the classes in Microsoft .NET's System.Data, so
|
||||
you can be sure that things will work the same in Mono as with the Microsoft
|
||||
implementation.
|
||||
|
||||
Q: Does Mono can to connect to Sybase by using Mono.Data.*?
|
||||
|
||||
A: Yes. use Mono.Data.SybaseClient. First of all you have to create a
|
||||
SybaseConnection, and then, from it, use it as any other
|
||||
IDbConnection-based class.
|
||||
|
||||
<a name="java">
|
||||
** Mono and Java
|
||||
|
||||
@@ -838,17 +773,6 @@ A: Yes. Eto Demerzal has started a Rhino port to C#.
|
||||
After this is completed, we will begin developing
|
||||
the JavaScript compiler.
|
||||
|
||||
Q: Can Mono or .NET share system classes (loaded from mscore.dll and other
|
||||
libs) or will it behave like Sun's Java VM?
|
||||
|
||||
A: What you can do with mono is to load different applications in their own
|
||||
application domain: this is a feature of the CLR that allows sandboxing
|
||||
applications inside a single process space. This is usualy exploited to
|
||||
compartmentalize different parts of the same app, but it can also be
|
||||
effectively used to reduce the startup and memory overhead.
|
||||
Using different appdomains the runtime representation of types and
|
||||
methods is shared across applications.
|
||||
|
||||
<a name="extending"></a>
|
||||
** Extending Mono
|
||||
|
||||
@@ -1106,6 +1030,9 @@ A: We will have to evaluate the licenses for compatibility first,
|
||||
but as a general rule, we will accept the code under the same
|
||||
terms of the "container" module.
|
||||
|
||||
Q: Is the Mono
|
||||
|
||||
|
||||
<a name="patents"></a>
|
||||
** Patents
|
||||
|
||||
@@ -1213,15 +1140,6 @@ A: GtkHTML is just a lightweight HTML rendering engine that does not
|
||||
Linux when disconnected from the Web (and that has better
|
||||
interactions than a web page).
|
||||
|
||||
Q: Is there a command-line tool that allows me to access .NET interactively?
|
||||
|
||||
A: There are several but one that is free software and uses MCS is the one
|
||||
Dennis Lu from Rice University is working on; a REPL C# interpreter.
|
||||
|
||||
Q: Is it possible to use Visual C++ with Mono?.
|
||||
|
||||
A: Well, It's possible to run VC++ generated apps under Mono though.
|
||||
|
||||
<a name="problems"></a>
|
||||
** Mono Common Problems
|
||||
|
||||
|
||||
+7
-103
@@ -1,30 +1,22 @@
|
||||
* Firebird and Interbase Data Provider
|
||||
|
||||
<ul>
|
||||
<li>ADO.NET Data Provider for Firebird and Interbase databases</li>
|
||||
|
||||
<li>Does not exist in Mono, but is a separate project</li>
|
||||
|
||||
<li>The <a href="http://firebird.sourceforge.net/index.php">Firebird Relational Database</a> is
|
||||
is an independent project which uses source code based on the Interbase source code released
|
||||
<li><a href="http://firebird.sourceforge.net/index.php">Firebird Relational Database</a> is
|
||||
an independent project which uses source code based on the Interbase source code released
|
||||
by Borland under the Interbase Public License</li>
|
||||
|
||||
<li>Both the Firebird Relational Database and the Firebird .NET Data Provider can be
|
||||
downloaded from <a href="http://sourceforge.net/projects/firebird/">here</a></li>
|
||||
downloaded from <a href="http://sourceforge.net/projects/firebird/firebird">here</a></li>
|
||||
|
||||
<li>The Firebird .NET Data provider has been made
|
||||
available by Carlos Guzmán Álvarez (aka "Carlos G.A."), who has also made a
|
||||
number of contributions to the OdbcJdbc code</li>
|
||||
|
||||
<li>Bugs with Mono or the data provider should be reported
|
||||
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
|
||||
do not have Bugzilla user account, it is free
|
||||
and easy to
|
||||
create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
|
||||
available by Carlos Guzmán Álvarez (aka "Carlos G.A."), who has also made a
|
||||
number of contributions to the OdbcJdbc code</li>
|
||||
|
||||
</ul>
|
||||
|
||||
** Current Status
|
||||
* Current Status
|
||||
|
||||
<ul>
|
||||
<li>Currently, it is able to connect to Firebird and Interbase databases
|
||||
@@ -64,7 +56,7 @@
|
||||
|
||||
</ul>
|
||||
|
||||
** Action Plan
|
||||
* Action Plan
|
||||
|
||||
<ul>
|
||||
<li>Bug fixing</li>
|
||||
@@ -106,91 +98,3 @@
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
** Testing
|
||||
|
||||
<ul>
|
||||
|
||||
<li>Need a working mono and mcs</li>
|
||||
|
||||
<li>Need access to a Firebird Relational Database or you can download
|
||||
it from <a href="http://firebird.sourceforge.net">here</a></li>
|
||||
|
||||
<li>Get the Firebird .NET data provider from here as
|
||||
<a href="http://lists.sourceforge.net/lists/listinfo/firebird-net-provider">firebird-net-provider</a>. Make
|
||||
sure the Firebird .NET data provider binary assembly FirebirdSql.Data.Firebird.dll is
|
||||
installed in the same place as the mono class libraries.</li>
|
||||
|
||||
<li>Has a ConnectionString format:
|
||||
<pre>
|
||||
"Database=databasefile.gdb;User=user;Password=pass;Dialect=3;Server=hostname"
|
||||
</pre>
|
||||
|
||||
</li>
|
||||
|
||||
<li>C# Example:
|
||||
|
||||
<pre>
|
||||
using System;
|
||||
using System.Data;
|
||||
using FirebirdSql.Data.Firebird;
|
||||
|
||||
public class Test
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
string connectionString =
|
||||
"Database=C:\\PROGRAM FILES\\FIREBIRD\\EXAMPLES\\EMPLOYEE.GDB;" +
|
||||
"User=SYSDBA;" +
|
||||
"Password=masterkey;" +
|
||||
"Dialect=3;" +
|
||||
"Server=localhost";
|
||||
IDbConnection dbcon = new FbConnection(connectionString);
|
||||
dbcon.Open();
|
||||
IDbCommand dbcmd = dbcon.CreateCommand();
|
||||
string sql = "SELECT * FROM employee";
|
||||
dbcmd.CommandText = sql;
|
||||
IDataReader reader = dbcmd.ExecuteReader();
|
||||
while(reader.Read()) {
|
||||
object dataValue = myReader.GetValue(0);
|
||||
string sValue = dataValue.ToString();
|
||||
Console.WriteLine("Value: " + sValue);
|
||||
}
|
||||
// clean up
|
||||
reader.Close();
|
||||
reader = null;
|
||||
dbcmd.Dispose();
|
||||
dbcmd = null;
|
||||
dbcon.Close();
|
||||
dbcon = null;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</li>
|
||||
<li>Building C# Example:
|
||||
<ul>
|
||||
<li>Save the example to a file, such as, TestExample.cs</li>
|
||||
<li>Build on Linux:
|
||||
<pre>
|
||||
mcs TestExample.cs -r System.Data.dll \
|
||||
-r FirebirdSql.Data.Firebird.dll
|
||||
</pre>
|
||||
</li>
|
||||
<li>Build on Windows via Cygwin:
|
||||
<pre>
|
||||
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
|
||||
TestExample.cs \
|
||||
-lib:C:/cygwin/home/MyHome/mono/install/lib \
|
||||
-r System.Data.dll -r FirebirdSql.Data.Firebird.dll
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Running the Example:
|
||||
<pre>
|
||||
mono TestExample.exe
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
+6
-4
@@ -1,7 +1,9 @@
|
||||
* The GCC front-end
|
||||
|
||||
Jeremy Singer has developed a .NET backend for GCC, his
|
||||
research work is available <a
|
||||
href="http://www.cl.cam.ac.uk/~jds31/research/gccnet/">here</a>.
|
||||
The GCC front-end will accept input in a binary file with
|
||||
codes in the Common Intermediate Language (CIL), and generate
|
||||
native code.
|
||||
|
||||
This will allow pre-compilation and full optimization to take
|
||||
place before a program is executed.
|
||||
|
||||
|
||||
-154
@@ -1,154 +0,0 @@
|
||||
* Gtk#
|
||||
|
||||
<a href="http://gtk-sharp.sourceforge.net">Gtk#</a> (Gtk
|
||||
sharp) is a set of C# language bindings for the
|
||||
<a href="http://www.gtk.org">Gtk+</a> toolkit and other
|
||||
libraries that are part of the
|
||||
<a href="http://www.gnome.org">GNOME</a> platform .
|
||||
|
||||
** API of Gtk#
|
||||
|
||||
The API is browsable
|
||||
<a href="http://primates.ximian.com/~tvgm/gtk-sharp-docs/">here</a>
|
||||
|
||||
** Where to learn more.
|
||||
|
||||
Visit the official site for the <a href="http://gtk-sharp.sourceforge.net">Gtk# Project</a>.
|
||||
The <a href="http://www.go-mono.org/faq">Mono FAQ</a> has some useful
|
||||
information too.
|
||||
|
||||
** GTK# On Linux
|
||||
|
||||
<p>Where to get distributions of GTK# for Linux:
|
||||
<ul>
|
||||
<li><a href="http://gtk-sharp.sourceforge.net">RPMs</a></li>
|
||||
<li><a href="http://www.debianplanet.org/mono/">Debs</a></li>
|
||||
</ul>
|
||||
|
||||
<p>Buidling on Linux:
|
||||
|
||||
<ul>
|
||||
<li>Get GTK# source from <a href="http://gtk-sharp.sourceforge.net">Gtk# Project</a>.</li>
|
||||
<li>run ./autogen.sh --prefix=my_mono_installation_prefix</li>
|
||||
<li>make</li>
|
||||
<li>make install</li>
|
||||
</ul>
|
||||
|
||||
** GTK# On Windows
|
||||
|
||||
<p>There is a Windows Installer for GTK# <a href="http://www.sport-huettn.de/mono/gtk-sharp-0.6-stable-2.exe">here</a>.
|
||||
|
||||
<p>If you want to build GTK# yourself on Windows:
|
||||
|
||||
<p>To build gtk# under windows, you will need the following:
|
||||
|
||||
<ul>
|
||||
<li>cygwin from <a href="http://www.cygwin.com/">here</a> When installing Cygwin via setup.exe,
|
||||
by default binutils and other tools do not get installed; you have to make
|
||||
sure to select these items. Just make
|
||||
sure Base and Development are set to Install.</li>
|
||||
<li>Mono 0.17 or later from <a href="http://www.go-mono.com/download.html">here</a>
|
||||
You can use Windows Setup Wizard (NT/2000/XP).</li>
|
||||
<li>GTK+ 2.0 (and dependencies). You can obtain gtk+ 2.0 by either of the
|
||||
following:
|
||||
<ul>
|
||||
<li>You can get a Windows Installer at:
|
||||
<a href="http://www.dropline.net/jade/download.html">here</a> </li>
|
||||
<li>or get the separate binary and dev/lib packages at
|
||||
at <a href="http://www.gimp.org/~tml/gimp/win32/downloads.html">here</a> </li>
|
||||
<li>or binary package from Dev-C++ site <a href="http://www.bloodshed.net/dev/packages/gtk.html">here</a> </li>
|
||||
<li>or get Gtk4Win <a href="http://wingtk.sourceforge.net/index.html">here</a> </li>
|
||||
<li>or the source at <a href="http://www.gtk.org/">here</a> </li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>binary distriubtion of a current web browser
|
||||
like Internet Explorer 4.0, Mozilla 1.0, or Netscape 7.0 which
|
||||
includes things like msvcrt.dll.</li>
|
||||
<li>Microsoft .NET Framework at
|
||||
<a href="http://msdn.microsoft.com/downloads/default.asp?url=/downloads/sample.asp?url=/msdn-files/027/000/976/msdncompositedoc.xml&frame=true">here</a> </li>
|
||||
|
||||
<p>If you are running Windows 95/98/ME, then you will need Unicode support.
|
||||
Look in
|
||||
mono-list archives for information about how to get
|
||||
Mono to work on Windows 9x.
|
||||
<a href="http://lists.ximian.com/archives/public/mono-list/2002-December/004158.html">here</a>
|
||||
|
||||
<p>Environment Variables to set:
|
||||
<ul>
|
||||
<li>PATH - set to your mono installation bin and lib path.
|
||||
For example, my mono installation prefix is:
|
||||
<pre>
|
||||
F:/cygwin/home/DanielMorgan/mono/install
|
||||
</pre>
|
||||
<p>So, I would set my PATH in the Windows Control Panel as:
|
||||
<pre>
|
||||
F:/cygwin/home/DanielMorgan/mono/install/bin;F:/cygwin/home/DanielMorgan/mono/install/lib</li>
|
||||
</pre>
|
||||
</li>
|
||||
<li>LD_LIBRARY_PATH - set to your mono installation lib path</li>
|
||||
<li>PKG_CONFIG_PATH - set to your mono installation lib/pkgconfig path, such
|
||||
as,
|
||||
<pre>
|
||||
F:/cygwin/home/DanielMorgan/mono/install/lib/pkgconfig</li>
|
||||
</pre>
|
||||
|
||||
<p>If you got the gtk-sharp source, cd to the gtk-sharp directory, type:
|
||||
<pre>
|
||||
./autogen.sh --prefix=~/mono/install
|
||||
</pre>
|
||||
|
||||
<p>Set your --prefix= to whatever your mono installation prefix is located.
|
||||
This will take awhile to go through the ./autogen.sh and ./configure...
|
||||
|
||||
<p>After that it finishes succesfully, you run make with the makefile.win32
|
||||
like:
|
||||
<pre>
|
||||
make -f makefile.win32
|
||||
</pre>
|
||||
|
||||
<p>After that finishes succesfully, you can copy to your mono installation lib
|
||||
path like:
|
||||
<pre>
|
||||
cp */*.dll ~/mono/install/lib
|
||||
</pre>
|
||||
</ul>
|
||||
|
||||
<p>The pkg-config files for
|
||||
gtk+ 2.0 and dependencies will need to be set correctly if they haven't
|
||||
already been.
|
||||
|
||||
<p>Look in your mono installation/lib/pkgconfig, such as,
|
||||
<pre>
|
||||
F:/cygwin/home/DanielMorgan/mono/install/lib/pkgconfig
|
||||
</pre>
|
||||
|
||||
<p>You will find files like: gtk+-2.0.pc
|
||||
|
||||
<p>Edit the line that says
|
||||
|
||||
<pre>
|
||||
prefix=something
|
||||
</pre>
|
||||
|
||||
<p>And set it to your mono installation prefix, such as,
|
||||
|
||||
<pre>
|
||||
prefix=F:/cygwin/home/DanielMorgan/mono/install
|
||||
</pre>
|
||||
|
||||
<p>Do this for all the .pc files in that directory. If there are not any, then
|
||||
you will need to create them. Or get them from somewhere like the dev
|
||||
packages at
|
||||
<a href="http://www.gimp.org/~tml/gimp/win32/downloads.html">here</a>
|
||||
|
||||
** GTK# On FreeBSD
|
||||
|
||||
TODO. Any volunteers?
|
||||
|
||||
** GTK# On Solaris
|
||||
|
||||
TODO. Any volunteers?
|
||||
|
||||
** GTK# On AIX
|
||||
|
||||
TODO. Any volunteers?
|
||||
-157
@@ -1,157 +0,0 @@
|
||||
* IBM DB2 Data Provider
|
||||
<ul>
|
||||
<li>ADO.NET Data Provider for <a href="http://www-3.ibm.com/software/data/db2/">IBM DB2 Universal Database</a></li>
|
||||
|
||||
<li>Exists in namespace DB2ClientCS and assembly Mono.Data.DB2Client</li>
|
||||
|
||||
<li>The source code exists at mcs/class/Mono.Data.DB2Client</li>
|
||||
|
||||
<li>Requires the Call Level Interface to IBM DB2 shared library. This
|
||||
is db2cli.dll on Windows. The IBM DB2 CLI API is very similar to the ODBC API. If
|
||||
you take a look at Mono's <a href="http://www.go-mono.com/odbc.html">System.Data.Odbc</a> ODBC provider, you will see the
|
||||
DllImport's have similiar function names.</li>
|
||||
|
||||
<li>IBM DB2 Provider created by Christopher Bockner.</li>
|
||||
|
||||
<li>Bugs with Mono or the data provider should be reported
|
||||
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
|
||||
do not have Bugzilla user account, it is free
|
||||
and easy to
|
||||
create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
** Current Status
|
||||
|
||||
<ul>
|
||||
<li>Compiles on Windows and Linux. Works on Windows. Still needs to be tested on Linux.</li>
|
||||
|
||||
<li>Able to connect to IBM DB2</li>
|
||||
|
||||
<li>Able to execute DML, such as, CREATE TABLE via ExecuteNonQuery()</li>
|
||||
|
||||
<li>Christopher says it can retrieve data via the DB2ClientDataReader</li>
|
||||
|
||||
</ul>
|
||||
|
||||
** Action Plan
|
||||
|
||||
<ul>
|
||||
<li>Still needs work to get it to retrieve data via ExecuteReader() and
|
||||
use the data reader to read data.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
** Testing
|
||||
|
||||
In order to test.
|
||||
<ul>
|
||||
<li>Have working mono and mcs setup</li>
|
||||
|
||||
<li>Have access to an IBM DB2 database. If you do not have access, download the
|
||||
<a href="http://www-3.ibm.com/software/data/db2/">IBM DB2</a> software. There
|
||||
are versions for Windows, Linux, AIX, and Sun Solaris.</li>
|
||||
|
||||
<li>Make sure the assembly Mono.Data.DB2Client.dll was built and installed
|
||||
where the other class libraries are installed.</li>
|
||||
|
||||
<li>If you do not have the source to mcs, get the source from
|
||||
<a href="http://www.go-mono.com/download">here</a></li>
|
||||
|
||||
<li>Has a ConnectionString format like ODBC</li>
|
||||
|
||||
<li>Here is a ConnectionString format if you have a DSN setup:
|
||||
<pre>
|
||||
"DSN=dataSetName;UID=myuserid;PWD=mypassword"
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
<li>Here is a ConnectionString format if you do not have a DSN (have not
|
||||
gotten this to work though, so, I am open to suggestions):
|
||||
<pre>
|
||||
"DRIVER={DB2 Driver};SERVER=localhost;DATABASE=test;UID=myuserid;PASSWORD=mypassword"
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
<li>In mcs/class/Mono.Data.DB2Client/Test/DBConnTest, you will find
|
||||
a DBConnTest.cs.</li>
|
||||
|
||||
<li>To build DBConnTest:
|
||||
<ul>
|
||||
<li>On Unix:</li>
|
||||
<pre>
|
||||
mcs DBConnTest.cs -r System.Data.dll -r Mono.Data.DB2Client.dll
|
||||
</pre>
|
||||
</li>
|
||||
<li>On Windows via Cygwin:
|
||||
<pre>
|
||||
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe DBConnTest.cs \
|
||||
-lib:C:/cygwin/home/MyHome/mono/install/lib \
|
||||
-r System.Data.dll -r Mono.Data.DB2Client.dll
|
||||
</pre>
|
||||
</li>
|
||||
<li>To run it on mono:
|
||||
<pre>
|
||||
mono DBConnTest.exe database userid password
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>C# Example:
|
||||
<pre>
|
||||
using System;
|
||||
using System.Data;
|
||||
using Mono.Data.DB2Client;
|
||||
|
||||
public class Test
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
string connectionString =
|
||||
"DSN=sample;UID=db2admin;PWD=mypass";
|
||||
IDbConnection dbcon = new DB2ClientConnection(connectionString);
|
||||
dbcon.Open();
|
||||
IDbCommand dbcmd = dbcon.CreateCommand();
|
||||
string sql =
|
||||
"CREATE TABLE mono_db2_test1 ( " +
|
||||
" testid varchar(2), " +
|
||||
" testdesc varchar(16) " +
|
||||
")";
|
||||
dbcmd.CommandText = sql;
|
||||
dbcmd.ExecuteNonQuery();
|
||||
dbcmd.Dispose();
|
||||
dbcmd = null;
|
||||
dbcon.Close();
|
||||
dbcon = null;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</li>
|
||||
<li>Building C# Example:
|
||||
<ul>
|
||||
<li>Save the example to a file, such as, TestExample.cs</li>
|
||||
<li>Build on Linux:
|
||||
<pre>
|
||||
mcs TestExample.cs -r System.Data.dll \
|
||||
-r Mono.Data.DB2Client.dll
|
||||
</pre>
|
||||
</li>
|
||||
<li>Build on Windows via Cygwin:
|
||||
<pre>
|
||||
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
|
||||
TestExample.cs \
|
||||
-lib:C:/cygwin/home/MyHome/mono/install/lib \
|
||||
-r System.Data.dll -r Mono.Data.DB2Client.dll
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Running the Example:
|
||||
<pre>
|
||||
mono TestExample.exe
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
@@ -56,6 +56,11 @@ TODO=multimedia
|
||||
<a name="projects">
|
||||
** Projects
|
||||
|
||||
<ul>
|
||||
TODO=xmlStorage,
|
||||
* Implement an xmlStorageSystem for the CLI:
|
||||
<a href="http://www.soapware.org/xmlStorageSystem">
|
||||
http://www.soapware.org/xmlStorageSystem</a>
|
||||
|
||||
TODO=guavac,Java compiler for .NET
|
||||
* You could take one of the existing Java compilers
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
You might also want to <a href="download.html">Download the
|
||||
source</a> for our work so far. Grab a <a
|
||||
href="snapshots">snapshot</a> of our current work, or <a
|
||||
href="http://cvs.hispalinux.es/cgi-bin/cvsweb/?hidenonreadable=1&f=u&logsort=date&sortby=file&hideattic=1&cvsroot=mono">browse
|
||||
href="http://cvs.hispalinux.es/cgi-bin/cvsweb/?hidenonreadable=1&f=u&logsort=date&sortby=file&hideattic=1&cvsroot=Mono">browse
|
||||
the sources</a>
|
||||
|
||||
You might want to <a
|
||||
@@ -34,12 +34,6 @@
|
||||
|
||||
You can contact the team at: <a
|
||||
href="mailto:[email protected]">[email protected]</a>
|
||||
|
||||
In order to follow the process of the project and to learn more
|
||||
about the team members we have created the <a
|
||||
href="http://monoevo.sf.net/mwn/index.html">Mono Weekly News letter</a>.
|
||||
Which archives can be found <a
|
||||
href="http://monoevo.sf.net/mwn/archives.html">here</a>.
|
||||
</td>
|
||||
<td>
|
||||
<table border=1>
|
||||
@@ -92,235 +86,12 @@
|
||||
<a href="index.rss"><img src="images/xml.gif"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="screenshots.html">Screenshots</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<b>Upcoming presentations</b>
|
||||
|
||||
Paolo Molaro, core Mono architect and developer will be
|
||||
talking about Mono on Florence on Saturday 22nd, February at
|
||||
the the Italian <a
|
||||
href="http://http://www.it.gnome.org/GUADIC">Guadic</a> Conference.
|
||||
|
||||
Gonzalo Paniagua, core Mono developer (responsible for ASP.NET
|
||||
in Mono) is doing a talk on Thursday in Badajoz, Spain.
|
||||
Details are <a href="http://www.gulex.org/actividades.htm">here</a>
|
||||
|
||||
@item Feb 18th, 2003: Volunteers to document Gtk#
|
||||
|
||||
With the availability of a documentation browser, we are
|
||||
looking for volunteers to help us complete the documentation
|
||||
of the Gtk# binding for Mono.
|
||||
|
||||
Experience with Gtk is useful, but not mandatory. We have
|
||||
checked in stubs, and we have instructions, and resources to
|
||||
how to complete this process <a
|
||||
href="documentation.html">here</a>. Mail the <a
|
||||
href="mailto:[email protected]">[email protected]</a>
|
||||
for further discussion.
|
||||
|
||||
@item Feb 14th, 2003: OpenGL# bindings for Mono; Mono Basic updates.
|
||||
|
||||
Mark Crichton has completed his OpenGL/GLUT bindings for
|
||||
Gnome. A screenshot can be seen <a
|
||||
href="sshots/oglcs.png">here</a>. The bindings are available
|
||||
on the Mono CVS repository on the module `glgen'. This is a
|
||||
straight binding to the C API.
|
||||
|
||||
Marco has <a
|
||||
href="http://lists.ximian.com/archives/public/mono-list/2003-February/011752.html">posted
|
||||
an update</a> on the current state of the free VB.NET compiler
|
||||
for Mono.
|
||||
|
||||
We are looking for contributors and maintainers to the
|
||||
JavaScript compiler as well (Janet)
|
||||
|
||||
@item Feb 12th, 2003: New assemblies, Gtk# stub documentation, Authenticode, Polish site
|
||||
|
||||
Mono now distributes a few new assemblies: Mono.Security.Win32
|
||||
as a layer to use the crypto functionality on Win32. The
|
||||
Mono.Posix assembly which contains functionality for taking
|
||||
advantage of Unix facilities.
|
||||
|
||||
A <a href="http://www.go-mono.pl/">Mono site in Poland</a>.
|
||||
|
||||
Stubs for the Gtk# documentation have been checked into CVS.
|
||||
If you want to contribute please read <a
|
||||
href="http://lists.ximian.com/archives/public/mono-list/2003-February/012108.html">this
|
||||
message</a>
|
||||
|
||||
Mono development is moving quickly: Tim and Daniel have been
|
||||
improving the Oracle database provider and Sebastien Pouliot
|
||||
has got code signing to work using Authenticode with pure open
|
||||
source and managed code. Plenty of new VB.NET work from Marco
|
||||
(compiler) and Daniel (runtime). Also Jackson has resumed
|
||||
work on the IL assembler and the fully managed library to
|
||||
generate CIL images (Sergey wrote the first Mono.PEToolkit).
|
||||
|
||||
@item Feb 11th, 2003: Mono Weekly News, New assemblies.
|
||||
|
||||
<a href="http://monoevo.sourceforge.net/mwn/index.html">Mono
|
||||
Weekly News</a>: Includes a new interview, software
|
||||
announcements and the PHP/Mono integration.
|
||||
|
||||
@item Feb 5th, 2003: MonoDoc 0.1
|
||||
|
||||
A <a
|
||||
href="http://www.go-mono.com/archive/monodoc-0.1.tar.gz">preliminary
|
||||
release</a> of the Mono Documentation Browser is now availble.
|
||||
Release <a
|
||||
href="http://lists.ximian.com/archives/public/mono-list/2003-February/011935.html">notes</a>
|
||||
|
||||
@item Jan, 22th, 2003: Mono wins award, OpenLink releases Virtuoso.
|
||||
|
||||
Mono won the `Best Open Source Project' award at the Linux
|
||||
World Expo. A description is <a
|
||||
href="http://linuxtoday.com/news_story.php3?ltsn=2003-01-23-024-26-OP-EV">here</a>
|
||||
|
||||
Open Link has a <a
|
||||
href="http://biz.yahoo.com/prnews/030123/neth013_1.html">press
|
||||
release</a> about Virtuoso 3.0: the first commercial product
|
||||
shipping that uses Mono.
|
||||
|
||||
@item Jan, 20th, 2003: Mono 0.19 released; Screenshots page; Gtk# 0.7
|
||||
|
||||
Mono 0.19 has been released. Check out the <a
|
||||
href="archive/mono-0.19">release notes</a> for an overview of
|
||||
the changes. You can get it <a href="download.html">here</a>.
|
||||
There are no major features in this release, mostly bug fixes
|
||||
and performance improvements.
|
||||
|
||||
We have now a new section <a href="screenshots.html">with
|
||||
screenshots</a> of various Mono applications. You can see
|
||||
there the new released Debugger, as well as the work in
|
||||
progress on the documentation browser.
|
||||
|
||||
<a href="http://gtk-sharp.sf.net">Gtk# 0.7</a> has been <a
|
||||
href="http://lists.ximian.com/archives/public/mono-list/2003-January/005222.html">released</a>
|
||||
|
||||
@item Jan, 19th, 2003: Mono Debugger released.
|
||||
|
||||
After six month of extensive development, Martin Baulig has
|
||||
released the first version of the Mono debugger. The Mono
|
||||
debugger is written in C# and can debug both managed and
|
||||
unmanaged applications, support for multiple-threaded
|
||||
applications and should be relatively easy to port to new
|
||||
platforms.
|
||||
|
||||
Details of the release are available in <a
|
||||
href="http://lists.ximian.com/archives/public/mono-list/2003-January/005192.html">post</a>.
|
||||
|
||||
The debugger contains both Gtk# and command line interfaces.
|
||||
The debugging file format used in Dwarf (its already supported
|
||||
by our class libraries and the Mono C# compiler; To debug C
|
||||
applications, you need a recent GCC, or to pass the -gdwarf-2
|
||||
flag to gcc).
|
||||
|
||||
@item Jan, 17th, 2003: DB2 provider, MacOS X
|
||||
|
||||
Christopher Bockner has contributed a DB2 System.Data client.
|
||||
|
||||
MacOS X support on the runtime has been integrated into the
|
||||
distribution, and MCS works with it.
|
||||
|
||||
Zoltan has managed to get <a
|
||||
href="http://radio.weblogs.com/0109845/">IKVM</a> (a Java VM
|
||||
for .NET) to run with Mono. The HelloWorld.class runs with
|
||||
the Mono runtime.
|
||||
|
||||
@item Jan, 13th, 2003: Mono 0.18 released
|
||||
|
||||
Mono 0.18 has been released. Check out the <a
|
||||
href="archive/mono-0.18">release notes</a> for an overview of
|
||||
the changes. You can get it <a href="download.html">here</a>.
|
||||
|
||||
@item Jan 10th, 2003: Mono Weekly News.
|
||||
|
||||
A new issue of the <a
|
||||
href="http://lists.ximian.com/archives/public/mono-list/2003-January/004903.html">Mono
|
||||
Weekly News</a> has been published.
|
||||
|
||||
Check out the <a href="crypto.html">Crypto status</a> page
|
||||
that Sebastien has put together.
|
||||
|
||||
@item Jan 3rd, 2003: Glade#, Code Coverage, Apache, MBas, Debugger.
|
||||
|
||||
Rachel has made Glade# use attributes so binding C# widgets to
|
||||
the designed widgets is now easier than ever. Alp has
|
||||
improved this to use implicit names as well.
|
||||
|
||||
Martin's Mono debugger now has support for multi-thread
|
||||
debugging. Special feature: breakpoints can be defined in a
|
||||
per-thread basis now.
|
||||
|
||||
Daniel López has checked in his Apache module to integrate
|
||||
Mono and Mono's ASP.NET support as an Apache module. Gonzalo
|
||||
has folded his new Mono hosting classes into this module (they
|
||||
are now shared between XSP and mod_mono). You can get the
|
||||
mod_apache from CVS (module name: mod_mono).
|
||||
|
||||
Mono Basic improvements: Marco has added support for more
|
||||
statements on the grammar.
|
||||
|
||||
Zoltan has <a href="http://www.nexus.hu/vargaz2/">posted</a>
|
||||
his Code Coverage analysis tool for Mono.
|
||||
|
||||
@item Dec 17th, 2002: Mono: Commercial uses.
|
||||
|
||||
<a href="http://www.tipic.com">Tipic</a> today <a
|
||||
href="http://www.ximian.com/about_us/press_center/press_releases/index.html?pr=tipic_mono">announced</a>
|
||||
their work on porting their Instant Messaging Server platform
|
||||
to run on Mono.
|
||||
|
||||
<a href="http://www.winfessor.com">Winfessor</a> also <a
|
||||
href="http://www.winfessor.com/press.asp">announced</a> the
|
||||
availability of their Jabber SDK to run on Mono.
|
||||
|
||||
Also two weeks ago we mentioned <a
|
||||
href="http://www.openlinksw.com">OpenLink Software's</a> <a
|
||||
href="http://www.ximian.com/about_us/press_center/press_releases/index.html?pr=openlink_mono">announcement</a>
|
||||
of their product, also using Mono.
|
||||
|
||||
@item Dec 10th, 2002: Gtk# 0.6 released; Mono 0.17 packages for Windows and Debian.
|
||||
|
||||
Mike Kestner <a
|
||||
href="http://lists.ximian.com/archives/public/mono-list/2002-December/003961.html">announced
|
||||
Gtk# 0.6</a>. This new release includes many new features and
|
||||
bug fixes, and is the perfect companion to the <a
|
||||
href="archive/mono-0.17">Mono 0.17</a> release.
|
||||
|
||||
Johannes has contributed a Windows-ready package of Mono 0.17,
|
||||
and its available from our <a
|
||||
href="download.html">download</a> page.
|
||||
|
||||
Alp Toker has <a href="http://www.atoker.com/mono/">Debian packages</a>
|
||||
|
||||
@item Dec 9th, 2002: Mono 0.17 has been released
|
||||
|
||||
Mono 0.17 has been released. Check out the <a
|
||||
href="archive/mono-0.17">release notes</a> for a more detailed
|
||||
list. You can get it <a href="download.html">here</a>.
|
||||
|
||||
Many new features as well as plenty of bug fixes. Many new
|
||||
System.Data providers and a more mature System.Web (ASP.NET)
|
||||
which can now be hosted in any web server. A simple <a
|
||||
href="archive/xsp-0.2.tar.gz">test web server</a> to host
|
||||
asp.net has been released as well.
|
||||
|
||||
This version also integrates Neale's s390 port.
|
||||
|
||||
This release also includes a new exception handling system
|
||||
that uses the gcc exception information that vastly improves
|
||||
our internalcall speed (15% faster mcs compilation times).
|
||||
|
||||
@item Dec 8th, 2002: VB.NET, Oracle Provider.
|
||||
@item Dec 9th, 2002: VB.NET, Oracle Provider.
|
||||
|
||||
Marco has got the Mono Basic compiler up to speed (support for
|
||||
classes, modules, expressions, object creation, method
|
||||
@@ -722,8 +493,6 @@
|
||||
|
||||
@item Aug 20th, 2002: Remoting work, Resources, SPARC checkins, ADO.NET
|
||||
|
||||
<b>San Francisco</b>: August 14th. Linux World Expo.
|
||||
|
||||
Mark Crichton has checked in his patches to get the SPARC port
|
||||
on par with the PPC port.
|
||||
|
||||
|
||||
+5
-23
@@ -1,7 +1,7 @@
|
||||
* Debugging information
|
||||
|
||||
Compile your programs using the `-g' flag in MCS, that will all a special
|
||||
resource containing debugging information to your executable.
|
||||
Compile your programs using the `-g' flag in MCS, that will generate a file
|
||||
with the extension .dbg containing the dwarf symbols for your executable.
|
||||
|
||||
To get stack traces with line number information, you need to run your
|
||||
program like this:
|
||||
@@ -15,27 +15,9 @@
|
||||
|
||||
* Mono Debugger
|
||||
|
||||
The Mono debugger is written in C# and can debug both managed
|
||||
and unmanaged applications, support for multiple-threaded
|
||||
applications and should be relatively easy to port to new
|
||||
platforms.
|
||||
A new debugger has been created in C# and using Gtk# for its
|
||||
user interface, this will simplify the debugging of CLI applications.
|
||||
|
||||
Details of the release are available in <a
|
||||
href="http://lists.ximian.com/archives/public/mono-list/2003-January/011415.html">post</a>.
|
||||
|
||||
The debugger contains both Gtk# and command line interfaces.
|
||||
The debugging file format used in Dwarf (its already supported
|
||||
by our class libraries and the Mono C# compiler; To debug C
|
||||
applications, you need a recent GCC, or to pass the -gdwarf-2
|
||||
flag to gcc).
|
||||
|
||||
The debugger is available now, you can get it from <a
|
||||
href="http://primates.ximian.com/~martin/debugger/mono-debugger-0.2.0.tar.gz">here</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Stay turned for its first public release.
|
||||
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
* A debugging session using a dynamically generated symbol file.
|
||||
|
||||
Let's assume we have the following C# application which we want to debug:
|
||||
|
||||
<pre>
|
||||
using System;
|
||||
|
||||
public class Foo
|
||||
{
|
||||
public struct MyStruct {
|
||||
int a;
|
||||
long b;
|
||||
double c;
|
||||
}
|
||||
|
||||
public static void Main ()
|
||||
{
|
||||
Int32 value = 5;
|
||||
long test = 512;
|
||||
|
||||
MyStruct my_struct;
|
||||
my_struct.a = 5;
|
||||
my_struct.b = test;
|
||||
my_struct.c = 23323.5235;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
|
||||
First of all, we need to compile it and create the .il files:
|
||||
|
||||
<pre>
|
||||
$ mcs ./Foo.cs
|
||||
$ monodis /home/export/martin/MONO-LINUX/lib/corlib.dll > corlib.il
|
||||
$ monodis Foo.exe > Foo.il
|
||||
</pre>
|
||||
|
||||
Now we can start the JIT in the debugger:
|
||||
|
||||
<pre>
|
||||
$ gdb ~/monocvs/mono/mono/jit/mono
|
||||
(gdb) r --debug=dwarf --break Foo:Main ./Foo.exe
|
||||
Starting program: /home/martin/monocvs/mono/mono/jit/mono --debug=dwarf --break Foo:Main ./Foo.exe
|
||||
0x081e8911 in ?? ()
|
||||
(gdb) call mono_debug_make_symbols ()
|
||||
(gdb) add-symbol-file /tmp/Foo.o
|
||||
Reading symbols from /tmp/Foo.o...done.
|
||||
Current language: auto; currently c++
|
||||
(gdb) frame
|
||||
#0 Foo.Main () at Foo.il:26
|
||||
26 // method line 2
|
||||
(gdb) n
|
||||
Foo.Main () at Foo.il:38
|
||||
38 IL_0000: ldc.i4.5
|
||||
(gdb) list
|
||||
33 .maxstack 2
|
||||
34 .locals (
|
||||
35 int32 V_0,
|
||||
36 int64 V_1,
|
||||
37 valuetype MyStruct V_2)
|
||||
38 IL_0000: ldc.i4.5
|
||||
39 IL_0001: stloc.0
|
||||
40 IL_0002: ldc.i4 512
|
||||
41 IL_0007: conv.i8
|
||||
42 IL_0008: stloc.1
|
||||
43 IL_0009: ldloca.s 2
|
||||
44 IL_000b: ldc.i4.5
|
||||
45 IL_000c: stfld int32 .MyStruct::a
|
||||
46 IL_0011: ldloca.s 2
|
||||
47 IL_0013: ldloc.1
|
||||
48 IL_0014: stfld int64 .MyStruct::b
|
||||
49 IL_0019: ldloca.s 2
|
||||
50 IL_001b: ldc.r8 23323.5
|
||||
51 IL_0024: stfld float64 .MyStruct::c
|
||||
52 IL_0029: ret
|
||||
(gdb) until 52
|
||||
Foo.Main () at Foo.il:53
|
||||
53 }
|
||||
(gdb) info locals
|
||||
V_0 = 5
|
||||
V_1 = 512
|
||||
V_2 = {a = 5, b = 512, c = 23323.523499999999}
|
||||
</pre>
|
||||
|
||||
As you see in this example, you need to know IL code to use this debugging method - but
|
||||
it may be the only way to debug a library.
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
* A debugging session using a symbol file which has been created by MCS.
|
||||
|
||||
Let's assume we have the following C# application which we want to debug:
|
||||
|
||||
<pre>
|
||||
using System;
|
||||
|
||||
public class Foo
|
||||
{
|
||||
public struct MyStruct {
|
||||
int a;
|
||||
long b;
|
||||
double c;
|
||||
}
|
||||
|
||||
public static void Main ()
|
||||
{
|
||||
Int32 value = 5;
|
||||
long test = 512;
|
||||
|
||||
MyStruct my_struct;
|
||||
my_struct.a = 5;
|
||||
my_struct.b = test;
|
||||
my_struct.c = 23323.5235;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
|
||||
First of all, we need to compile it with MCS, assemble the generated .s file and
|
||||
create the .il files for all referenced assemblies which were not compiled with MCS:
|
||||
|
||||
<pre>
|
||||
$ mcs -g ./Foo.cs
|
||||
$ as -o Foo-debug.o Foo-debug.s
|
||||
$ monodis /home/export/martin/MONO-LINUX/lib/corlib.dll > corlib.il
|
||||
</pre>
|
||||
|
||||
Now we can start the JIT in the debugger:
|
||||
|
||||
<pre>
|
||||
$ gdb ~/monocvs/mono/mono/jit/mono
|
||||
(gdb) r --debug=dwarf-plus --break Foo:Main ./Foo.exe
|
||||
Starting program: /home/martin/monocvs/mono/mono/jit/mono --debug=dwarf-plus --break Foo:Main ./Foo.exe
|
||||
Program received signal SIGTRAP, Trace/breakpoint trap.
|
||||
0x081e8681 in ?? ()
|
||||
(gdb) call mono_debug_make_symbols ()
|
||||
(gdb) add-symbol-file Foo-debug.o
|
||||
(gdb) add-symbol-file /tmp/corlib.o
|
||||
` (gdb) frame
|
||||
#0 Main () at ./Foo.cs:11
|
||||
11 public static void Main ()
|
||||
(gdb) n
|
||||
Main () at ./Foo.cs:13
|
||||
13 Int32 value = 5;
|
||||
(gdb)
|
||||
14 long test = 512;
|
||||
(gdb)
|
||||
17 my_struct.a = 5;
|
||||
(gdb)
|
||||
18 my_struct.b = test;
|
||||
(gdb)
|
||||
19 my_struct.c = 23323.5235;
|
||||
(gdb)
|
||||
20 }
|
||||
(gdb) info locals
|
||||
value = 5
|
||||
test = 512
|
||||
my_struct = { a = 5, b = 512, c = 23323.5235 }
|
||||
</pre>
|
||||
|
||||
+1
-23
@@ -8,14 +8,6 @@
|
||||
* <a href="#MonoLogo">MonoLogo</a>
|
||||
* <a href="#Oberon">Oberon</a>
|
||||
* <a href="#Forth">Forth</a>
|
||||
* <a href="#mbas">Mono Basic</a> (Mono's VB.NET compiler)
|
||||
</ul>
|
||||
|
||||
Languages which are known to run, but we have not done a
|
||||
complete ran of all their regression tests to validate it:
|
||||
|
||||
<ul>
|
||||
* Kylix.NET.
|
||||
</ul>
|
||||
|
||||
Languages we would like to have supported, with links to resources:
|
||||
@@ -36,15 +28,8 @@
|
||||
** Java
|
||||
|
||||
There is a very interesting project to make a JavaVM for .NET
|
||||
<a href="http://radio.weblogs.com/0109845/">here</a>.
|
||||
<a href="http://radio.weblogs.com/0109845/">here</a>
|
||||
|
||||
Zoltan has got IKVM to work with Mono.
|
||||
|
||||
<a name="PHP">
|
||||
** PHP
|
||||
|
||||
Sterling has code to allow PHP developers to use Mono code, in
|
||||
his <a href="http://www.php.net/~sterling/mono/">site</a>
|
||||
|
||||
<a name="MonoLogo">
|
||||
** MonoLogo
|
||||
@@ -55,13 +40,6 @@
|
||||
hosted in the <a href="ccvs.html">Mono CVS</a> repository
|
||||
and also available on the <a href="anoncvs.html">AnonCVS</a> mirrors.
|
||||
|
||||
<a name="mbas">
|
||||
** Mono Basic (Mono's VB.NET compiler)
|
||||
|
||||
Work has resumed on the Mono Visual Basic compiler (currently
|
||||
called mbas). It is part of the standard Mono distribution,
|
||||
but its still an early compiler.
|
||||
|
||||
<a name="Oberon">
|
||||
** Oberon
|
||||
|
||||
|
||||
@@ -92,11 +92,6 @@
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
* Alternative archive site
|
||||
|
||||
An alternate site that archives Mono List is available <a
|
||||
href="http://archive.neotonic.com/archive/mono-list">http://archive.neotonic.com/archive/mono-list</a>
|
||||
|
||||
* Google search of the archives
|
||||
|
||||
<!-- Google Search with mods -->
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
* mbas: Mono's Basic.NET Compiler.
|
||||
|
||||
MBAS is a CIL compiler for the Visual Basic language, an extended
|
||||
version of VisualBasic.NET. It's based on the MCS compiler
|
||||
and still in heavy development, though many language features are
|
||||
already supported.
|
||||
|
||||
** What works
|
||||
|
||||
<ul>
|
||||
|
||||
* Classes, Fields and Methods. Properties are still
|
||||
being worked on.
|
||||
|
||||
* Module definition and Sub functionality (TODO: Function's)
|
||||
|
||||
* Namespace Import, so can you reference, instantiate
|
||||
and call external assemblies
|
||||
|
||||
* Parameter passing between Sub's. ByVal and ByRef
|
||||
parameters are being worked on.
|
||||
|
||||
* Delegates
|
||||
|
||||
* Object creation
|
||||
|
||||
* Events - to a limited extent. You can declare a
|
||||
Class-Field as 'WithEvents' and dynamic events (i.e
|
||||
AddHandler MyButton.Click, Button1_OnClick). Please
|
||||
beware: just after committing the code, I discovered
|
||||
that the handler field in the AddHandler call is
|
||||
case-sensitive, a remnant of mBas' mcs heritage)
|
||||
|
||||
* Statements supported are 'If..Then..Else' ,
|
||||
'While..End While' and assignment statements. Simple
|
||||
operators (+, -, *, /, >, <, =) should also
|
||||
work. Other statements (For..Next, etc.) should be
|
||||
quite trivial to implement.
|
||||
</ul>
|
||||
|
||||
A lot of this stuff is implemented rebuilding proper expressions and
|
||||
statements on top of the classes provided by mcs (look at the grammar -
|
||||
mb-parser.jay - and compare it with cs-parser.jay, if interested).
|
||||
|
||||
** TODO-list
|
||||
|
||||
At this stage almost every element of the language must be still checked for
|
||||
conformance to MS'implementation. Help is particularly needed for those areas
|
||||
I know little of (mcs internals are still quite obscure to me). I'd like to
|
||||
implement class properties, the missing statements, exception handling,
|
||||
structures and actual event support (not necessarily in this order). Once we
|
||||
have all this stuff set up and reasonably bug-free, more work could be done
|
||||
on helper functions and Object-vars handling.
|
||||
|
||||
+5
-2
@@ -11,19 +11,22 @@
|
||||
|
||||
For <a href="mono-beginning/t1.html">RPM Linux based systems</a>
|
||||
|
||||
For <a href="http://monoevo.sourceforge.net/mono-windows/mono-beginning-windows/t1.html">Microsoft Windows</a>
|
||||
For <a href="http://geneura.ugr.es/~jaime/mono-beginning-windows/t1.html">Microsoft Windows</a>
|
||||
|
||||
|
||||
PDF Format
|
||||
|
||||
For <a href="mono-beginning.pdf">RPM Linux based systems</a>
|
||||
|
||||
For <a href="http://geneura.ugr.es/~jaime/mono-beginning-windows/mono-beginning-windows.pdf">Microsoft Windows</a>
|
||||
|
||||
|
||||
|
||||
XML Source
|
||||
|
||||
For <a href="mono-beginning.xml">RPM Linux based systems</a>
|
||||
|
||||
For <a href="http://monoevo.sourceforge.net/mono-windows/mono-beginning-windows.xml">Microsoft Windows</a>
|
||||
For <a href="http://geneura.ugr.es/~jaime/mono-beginning-windows/mono-beginning-windows.xml">Microsoft Windows</a>
|
||||
|
||||
|
||||
Currently Hinne is working on a Mono Tools HOWTO. Which will be
|
||||
|
||||
+2
-14
@@ -155,20 +155,8 @@ export PKG_CONFIG_PATH
|
||||
# /usr/local/include and /usr/local/lib to CPPFLAGS and LDFLAGS. We could
|
||||
# skip this if it would add /usr/include and /usr/lib, but leaving it
|
||||
# shouldnt break anything.
|
||||
iconvdirs="/usr/include /usr/local/include"
|
||||
for i in $iconvdirs
|
||||
do
|
||||
if [ -f $i/iconv.h ]; then
|
||||
iconvh_dir=$i
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z "$iconvh_dir" ]; then
|
||||
echo "Can't find iconv headers (looked in $iconvdirs)"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
iconvh=`locate include/iconv.h`
|
||||
iconvh_dir=`dirname $iconvh`
|
||||
iconvlib_dir=`echo $iconvh_dir | sed -e 's/include/lib/'`
|
||||
|
||||
echo "Adding $iconvh_dir to CPPFLAGS"
|
||||
|
||||
@@ -1,329 +1,66 @@
|
||||
* MySQL Data Provider
|
||||
|
||||
<p>There are two ADO.NET providers in Mono
|
||||
for a <a href="http://www.mysql.com/">MySQL</a> database:
|
||||
|
||||
<ul>
|
||||
<li><a href="http://sourceforge.net/projects/mysqlnet/">ByteFX.Data.MySQLClient</a>
|
||||
<ul>
|
||||
<li>Written in 100% C#</li>
|
||||
<li>Does not require a client library</li>
|
||||
<li>Works on Mono and Microsoft .NET</li>
|
||||
<li>Requires at least Mono 0.18 and MySQLNet 0.65 for it to work on Mono</li>
|
||||
<li>Works in the SQL# command-line and GTK# GUI version</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>MySQL Data Provider for
|
||||
<a href="http://www.mysql.com/">MySQL</a> databases. It is written in C# and uses
|
||||
the MySQL C Client Library
|
||||
|
||||
<li>Mono.Data.MySql (deprecated)
|
||||
<ul>
|
||||
<li>Deprecated in favor of ByteFX.Data.MySQLClient
|
||||
|
||||
<li>Written in C# and uses
|
||||
the MySQL C Client Library</li>
|
||||
|
||||
<li>Exists in namespace Mono.Data.MySql and assembly Mono.Data.MySql</li>
|
||||
<li>Exists in namespace Mono.Data.MySql and assembly Mono.Data.MySql
|
||||
|
||||
<li>Works on Windows and Linux via the MySQL client shared library
|
||||
(libmySQL.dll on Windows and libmysqlclient.so on Linux).</li>
|
||||
<li>Works on Windows and Linux via the MySQL client shared library
|
||||
(libmySQL.dll on Windows and libmysqlclient.so on Linux).
|
||||
|
||||
<li>Started by Daniel Morgan using
|
||||
<a href="http://www.cybercom.net/~zbrad/DotNet/MySql/">C# Bindings to MySQL</a> from <a href="mailto:[email protected]">Brad Merill</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>Bugs with Mono or the data provider should be reported
|
||||
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
|
||||
do not have Bugzilla user account, it is free
|
||||
and easy to
|
||||
create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<p><a href="http://www.mysql.com/articles/dotnet/">Exploring MySQL
|
||||
in the Microsoft .NET Environment</a> is an article
|
||||
by Mr. Venu who is a MySQL AB developer.</li>
|
||||
|
||||
<p>Testing for Mono's Mono.Data.MySql and ByteFX's ByteFX.Data.MySQLClient is below.
|
||||
<li>Started by Daniel Morgan using C# Bindings to MySQL from Brad Meril.
|
||||
|
||||
** Current Status
|
||||
<li><a href="http://www.mysql.com/articles/dotnet/">Exploring MySQL in the Microsoft .NET Environment</a> is an article
|
||||
by Mr. Venu who is a MySQL AB developer.
|
||||
|
||||
<li>Other projects which have created a .NET Data provider for MySQL in C#
|
||||
<ul>
|
||||
<li><a href="http://sourceforge.net/projects/mysqldrivercs/">MySQLDriverCS</a> is a MySQL provider written in C#
|
||||
<li><a href="http://sourceforge.net/projects/mysqlnet/">MySQLNet</a> is a MySQL Manager provider written in C#
|
||||
|
||||
Current Status of the MySQL providers:
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
* Current Status
|
||||
|
||||
<ul>
|
||||
|
||||
<li>ByteFX.Data.MySQLClient
|
||||
<ul>
|
||||
<li>Build and Runs on Microsoft .NET and Mono</li>
|
||||
<li>Works with SQL# (command-line and GTK# GUI versions)</li>
|
||||
<li>MySQLCommandBuilder now implemented</li>
|
||||
<li>Transaction support now implemented (not all table types support this)</li>
|
||||
<li>GetSchemaTable fixed to not use xsd (for Mono)</li>
|
||||
<li>Driver is now Mono-compatible</li>
|
||||
<li>TIME data type now supported</li>
|
||||
<li>More work to improve Timestamp data type handling</li>
|
||||
<li>Changed signatures of all classes to match corresponding SqlClient classes</li>
|
||||
<li>Protocol compression using <a href="http://www.icsharpcode.net/OpenSource/SharpZipLib/default.asp">SharpZipLib</a></li>
|
||||
<li>Named pipes on Windows now working properly</li>
|
||||
<li>Work done to improve Timestamp data type handling</li>
|
||||
<li>Implemented IEnumerable on DataReader so DataGrid would work</li>
|
||||
<li>Speed increased dramatically by removing bugging network sync code</li>
|
||||
<li>Driver no longer buffers rows of data (more ADO.Net compliant)</li>
|
||||
<li>Conversion bugs related to TIMESTAMP and DATETIME fields fixed</li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
<li>can connect
|
||||
|
||||
<li>Mono.Data.MySql (deprecated)
|
||||
<ul>
|
||||
<li>Currently, only works with version 3.23.x of MySQL</li>
|
||||
<li>can execute non-queries via ExecuteNonQuery()
|
||||
|
||||
<li>can execute aggregates via ExecuteScalar() and retrieve the
|
||||
single row/single column result
|
||||
|
||||
<li>can execute queries and retrieve results using a data reader.
|
||||
|
||||
<li>a schema DataTable has been partially
|
||||
implemented which is returned from GetSchemaTable() in MySqlDataReader.
|
||||
|
||||
<li>a DataTable in a DataSet can be filled via a MySqlDataAdapter
|
||||
|
||||
<li>can connect</li>
|
||||
<li>The shared client libraries
|
||||
between windows version and linux are different: windows has libmySQL.dll
|
||||
while linux has libmysqlclient.so. This is handled by the
|
||||
file etc/mono/config which is mapped by the mono runtime in knowing
|
||||
which native shared library to load. In cvs, this file is mono/config.in and
|
||||
can be modified with a text editor.
|
||||
</ul>
|
||||
|
||||
* Action plan
|
||||
|
||||
The current plan to work on the MySQL data provider:
|
||||
|
||||
<li>can execute non-queries via ExecuteNonQuery()</li>
|
||||
|
||||
<li>can execute aggregates via ExecuteScalar() and retrieve the
|
||||
single row/single column result</li>
|
||||
|
||||
<li>can execute queries and retrieve results using a data reader.</li>
|
||||
|
||||
<li>a schema DataTable has been partially
|
||||
implemented which is returned from GetSchemaTable() in MySqlDataReader.</li>
|
||||
|
||||
<li>a DataTable in a DataSet can be filled via a MySqlDataAdapter</li>
|
||||
<ul>
|
||||
<li>Parameters support via MySqlParameter and MySqlParameterCollection
|
||||
|
||||
<li>The shared client libraries
|
||||
between windows version and linux are different: windows has libmySQL.dll
|
||||
while linux has libmysqlclient.so. This is handled by the
|
||||
file etc/mono/config which is mapped by the mono runtime in knowing
|
||||
which native shared library to load. In cvs, this file is mono/config.in and
|
||||
can be modified with a text editor.</li>
|
||||
|
||||
<li>Works in the SQL# command-line and GTK# GUI version</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
** Action plan
|
||||
|
||||
The current plan for the MySQL data providers:
|
||||
|
||||
<ul>
|
||||
<li>ByteFX.Data.MySQLClient
|
||||
<ul>
|
||||
<li>Testing and fixes</li>
|
||||
<li>Implement missing features</li>
|
||||
<li>Only fixes for bugs to build and run MySQLClient on Mono
|
||||
will be accepted in mono-cvs. Most bugs and any new features will
|
||||
go into sourceforge cvs. Anytime there is a release of MySQLClient,
|
||||
the source code will be copied from sourceforge cvs to mono-cvs</li>
|
||||
<li>Releases of MySQLClient are determined by Reggie Burnett and releases
|
||||
of Mono are determined by Miguel de Icaza</li>
|
||||
<li>Implement any missing features or fix any bugs in Mono to get new
|
||||
features all of MySQLClient to work on Mono</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Mono.Data.MySql (deprecated)
|
||||
<ul>
|
||||
<li>Testing and bug fixes</li>
|
||||
<li>Mono.Data.MySql is deprecated and therefore maybe removed
|
||||
at a later date. It will stay in Mono for now because other
|
||||
programs maybe using it now.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
** Testing for MySQLNet provider (ByteFX.Data.MySQLClient)
|
||||
|
||||
<ul>
|
||||
<li>Have access to a MySQL database or download it from
|
||||
<ul>
|
||||
<li><a href="http://www.mysql.com/downloads/index.html">MySQL AB</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>MySQLNet can be gotten from <a href="http://sourceforge.net/projects/mysqlnet/">here</a> and the
|
||||
binary assembly ByteFX.Data.dll needs to be installed
|
||||
in the same place as the mono class libraries.</li>
|
||||
|
||||
<li>MySQLNet requires <a href="http://www.icsharpcode.net/OpenSource/SharpZipLib/default.asp">SharpZipLib</a> which is
|
||||
a Zip Library written in 100% C#. This is used for compression/decompression of data
|
||||
sent/received over the network. The SharpZipLib binary assembly SharpZipLib.dll should
|
||||
be installed in the same place as the mono class libraries.</li>
|
||||
|
||||
<li>Has a ConnectionString format:
|
||||
<pre>
|
||||
"Server=hostname;" +
|
||||
"Database=database;" +
|
||||
"User ID=username;" +
|
||||
"Password=password"
|
||||
</pre>
|
||||
</li>
|
||||
<li>C# Example:
|
||||
<pre>
|
||||
using System;
|
||||
using System.Data;
|
||||
using ByteFX.Data.MySQLClient;
|
||||
|
||||
public class Test
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
string connectionString =
|
||||
"Server=localhost;" +
|
||||
"Database=test;" +
|
||||
"User ID=myuserid;" +
|
||||
"Password=mypassword;";
|
||||
IDbConnection dbcon;
|
||||
dbcon = new MySQLConnection(connectionString);
|
||||
dbcon.Open();
|
||||
IDbCommand dbcmd = dbcon.CreateCommand();
|
||||
// requires a table to be created named employee
|
||||
// with columns firstname and lastname
|
||||
// such as,
|
||||
// CREATE TABLE employee (
|
||||
// firstname varchar(32),
|
||||
// lastname varchar(32));
|
||||
string sql =
|
||||
"SELECT firstname, lastname " +
|
||||
"FROM employee";
|
||||
dbcmd.CommandText = sql;
|
||||
IDataReader reader = dbcmd.ExecuteReader();
|
||||
while(reader.Read()) {
|
||||
string FirstName = reader["firstname"];
|
||||
string LastName = reader["lastname"];
|
||||
Console.WriteLine("Name: " +
|
||||
FirstName + " " + LastName);
|
||||
}
|
||||
// clean up
|
||||
reader.Close();
|
||||
reader = null;
|
||||
dbcmd.Dispose();
|
||||
dbcmd = null;
|
||||
dbcon.Close();
|
||||
dbcon = null;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</li>
|
||||
<li>Building C# Example:
|
||||
<ul>
|
||||
<li>Save the example to a file, such as, TestExample.cs</li>
|
||||
<li>Build on Linux:
|
||||
<pre>
|
||||
mcs TestExample.cs -r System.Data.dll \
|
||||
-r ByteFX.Data.dll
|
||||
</pre>
|
||||
</li>
|
||||
<li>Build on Windows via Cygwin:
|
||||
<pre>
|
||||
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
|
||||
TestExample.cs \
|
||||
-lib:C:/cygwin/home/MyHome/mono/install/lib \
|
||||
-r System.Data.dll -r ByteFX.Data.dll
|
||||
</pre>
|
||||
</li>
|
||||
<li>Support LOBs (Large Object)
|
||||
|
||||
<li>Change the MySQL provider to not be dependent on a client library and
|
||||
be written in 100% C#
|
||||
|
||||
<li>Connection pooling
|
||||
|
||||
<li>Get the provider to work like other data providers
|
||||
</ul>
|
||||
</li>
|
||||
<li>Running the Example:
|
||||
<pre>
|
||||
mono TestExample.exe
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
** Testing for Mono's MySQL provider (Mono.Data.MySql)
|
||||
|
||||
<ul>
|
||||
<li>Have access to a MySQL database or download it from
|
||||
<ul>
|
||||
<li><a href="http://www.mysql.com/downloads/index.html">MySQL AB</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>Take a look at MySqlTest.cs in mcs/class/Mono.Data.MySql/Test</li>
|
||||
<li>On Linux, you may need to make a symbolic link from libmySQL.dll to libmysqlclient.dll</li>
|
||||
|
||||
<li>Has a ConnectionString format:
|
||||
<pre>
|
||||
"Server=hostname;Database=database;User ID=username;Password=password"
|
||||
(or)
|
||||
"Host=hostname;Dbname=database;User=username;Passwd=password"
|
||||
</pre>
|
||||
|
||||
<li>C# Example:
|
||||
<pre>
|
||||
using System;
|
||||
using System.Data;
|
||||
using Mono.Data.MySql;
|
||||
|
||||
public class Test
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
string connectionString =
|
||||
"Server=localhost;" +
|
||||
"Database=test;" +
|
||||
"User ID=myuserid;" +
|
||||
"Password=mypassword;";
|
||||
IDbConnection dbcon;
|
||||
dbcon = new MySqlConnection(connectionString);
|
||||
dbcon.Open();
|
||||
IDbCommand dbcmd = dbcon.CreateCommand();
|
||||
// requires a table to be created named employee
|
||||
// with columns firstname and lastname
|
||||
// such as,
|
||||
// CREATE TABLE employee (
|
||||
// firstname varchar(32),
|
||||
// lastname varchar(32));
|
||||
string sql =
|
||||
"SELECT firstname, lastname " +
|
||||
"FROM employee";
|
||||
dbcmd.CommandText = sql;
|
||||
IDataReader reader = dbcmd.ExecuteReader();
|
||||
while(reader.Read()) {
|
||||
string FirstName = reader["firstname"];
|
||||
string LastName = reader["lastname"];
|
||||
Console.WriteLine("Name: " +
|
||||
FirstName + " " + LastName);
|
||||
}
|
||||
// clean up
|
||||
reader.Close();
|
||||
reader = null;
|
||||
dbcmd.Dispose();
|
||||
dbcmd = null;
|
||||
dbcon.Close();
|
||||
dbcon = null;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</li>
|
||||
<li>Building C# Example:
|
||||
<ul>
|
||||
<li>Save the example to a file, such as, TestExample.cs</li>
|
||||
<li>Build on Linux:
|
||||
<pre>
|
||||
mcs TestExample.cs \
|
||||
-r System.Data.dll \
|
||||
-r Mono.Data.MySql.dll
|
||||
</pre>
|
||||
</li>
|
||||
<li>Build on Windows via Cygwin:
|
||||
<pre>
|
||||
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
|
||||
TestExample.cs \
|
||||
-lib:C:/cygwin/home/MyHome/mono/install/lib \
|
||||
-r System.Data.dll \
|
||||
-r Mono.Data.MySql.dll
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Running the Example:
|
||||
<pre>
|
||||
mono TestExample.exe
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
@@ -1,218 +1,52 @@
|
||||
* ODBC Data Provider
|
||||
|
||||
<ul>
|
||||
<li>Exists in namespace System.Data.Odbc and assembly System.Data
|
||||
|
||||
<li>Works on Windows and Linux
|
||||
|
||||
<li>Works on Windows via the native Windows odbc32.dll
|
||||
|
||||
<li>Works on Linux via <a href="http://www.unixodbc.org/">unixODBC</a>
|
||||
|
||||
<li>List of unixODBC <a href="http://www.unixodbc.org/drivers.html">drivers</a> and
|
||||
an alternative list
|
||||
|
||||
<li>An alternative to unixODBC, but not tested with this
|
||||
provider is <a href="http://www.iodbc.org">iODBC</a>
|
||||
|
||||
<li>ADO.NET Data Provider for Data Sources
|
||||
that have <a href="http://www.microsoft.com/data/odbc/">ODBC</a> support.</li>
|
||||
|
||||
<li>Exists in namespace System.Data.Odbc and assembly System.Data</li>
|
||||
|
||||
<li>Works on Windows and Linux. Should have no problems working on UNIX too.</li>
|
||||
|
||||
<li>Works on Windows via the native Windows odbc32.dll</li>
|
||||
|
||||
<li>Works on Linux via:
|
||||
|
||||
<ul>
|
||||
<li><a href="http://www.unixodbc.org/">unixODBC</a> which has
|
||||
commercial support
|
||||
from <a href="http://www.easysoft.com/">Easysoft</a></li>
|
||||
|
||||
<li><a href="http://www.iodbc.org/">iODBC</a> which has
|
||||
commercial support
|
||||
from <a href="http://oplweb.openlinksw.com:8080/download/">OpenLink Software</a></li>
|
||||
</ul>
|
||||
|
||||
<li>List of unixODBC <a href="http://www.unixodbc.org/drivers.html">drivers</a>
|
||||
<li>Another alternative to unixODBC, but not tested this provider is
|
||||
<a href="http://oplweb.openlinksw.com:8080/download/">OpenLink's</a>.
|
||||
|
||||
<li>List of <a href="http://ourworld.compuserve.com/homepages/Ken_North/odbcvend.htm">ODBC Vendors</a>
|
||||
|
||||
<li>ODBC can connect to various databases which has an ODBC driver installed:
|
||||
<ul>
|
||||
<li><a href="http://www.mysql.com/">MySQL</a></li>
|
||||
<li><a href="http://www.postgresql.org/">PostgreSQL</a></li>
|
||||
<li><a href="http://www.oracle.com/">Oracle</a></li>
|
||||
<li><a href="http://www.borland.com/products/downloads/download_interbase.html">Interbase</a></li>
|
||||
<li><a href="http://www.sybase.com/downloads">Sybase</a> (
|
||||
via <a href="http://www.freetds.org/">FreeTDS</a> on UNIX)</li>
|
||||
<li><a href="http://www.microsoft.com/sql/default.asp">Microsoft SQL Server</a> (
|
||||
via <a href="http://www.freetds.org/">FreeTDS</a> on UNIX)</li>
|
||||
<li><a href="http://www-3.ibm.com/software/data/db2/">IBM DB2 Universal Database</a></li>
|
||||
<li><a href="http://www.microsoft.com/office/access/default.asp">MS Access</a>
|
||||
(via <a href="http://mdbtools.sourceforge.net/">MDB Tools</a> on UNIX)</li>
|
||||
</ul>
|
||||
|
||||
<li>ODBC Provider created by Brian Ritchie.</li>
|
||||
|
||||
<li>Does not support trusted connections</li>
|
||||
|
||||
<li>ODBC Provider created by Brian Ritchie.
|
||||
</ul>
|
||||
|
||||
** Current Status
|
||||
* Current Status
|
||||
|
||||
<ul>
|
||||
<li>Can Connect on:
|
||||
<ul>
|
||||
<li>Windows via native Windows odbc32.dll</a></li>
|
||||
<li>Linux via:
|
||||
<ul>
|
||||
<li>unixODBC's libodbc.so</li>
|
||||
<li>iODBC's libiodbc.so</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Connect on Windows via native Windows odbc32.dll
|
||||
|
||||
<li>Connect on Linux via unixODBC's libodbc.so
|
||||
|
||||
<li>Various databases have been tested using their
|
||||
ODBC drivers: MySQL, PostgreSQL, Oracle, IBM DB2, and Microsoft SQL Server</li>
|
||||
ODBC drivers: MySQL, Oracle, IBM DB2, and Microsoft SQL Server
|
||||
|
||||
<li>Can execute non-query commands via ExecuteNonQuery of a OdbcCommand</li>
|
||||
<li>Can execute non-query commands via ExecuteNonQuery of a OdbcCommand
|
||||
|
||||
<li>Can execute aggreates and retrieve a single row single column result via
|
||||
ExecuteScalar of a OdbcCommand</li>
|
||||
ExecuteScalar of a OdbcCommand
|
||||
|
||||
<li>Can execute queries via ExecuteReader of a OdbcCommand and
|
||||
retrieve results using an OdbcDataReader</li>
|
||||
|
||||
<li>Can get a DataTable containing schema info via GetSchemaTable() in a OdbcDataReader</li>
|
||||
|
||||
<li>Can Fill a DataTable in a DataSet via an OdbcDataAdapter</li>
|
||||
|
||||
<li>Works in SQL#, but Column names don't show up correctly.</li>
|
||||
|
||||
<li>Bugs with Mono or the data provider should be reported
|
||||
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
|
||||
do not have Bugzilla user account, it is free
|
||||
and easy to
|
||||
create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
|
||||
|
||||
retrieve results using an OdbcDataReader.
|
||||
|
||||
<li>Can get a DataTable containing schema info via GetSchemaTable() in a OdbcDataReader
|
||||
</ul>
|
||||
|
||||
** Action Plan
|
||||
* Action Plan
|
||||
|
||||
<ul>
|
||||
<li>Create a Data Adapter to Fill data into a DataTable in a DataSet
|
||||
|
||||
<li>Fixing bugs
|
||||
|
||||
<li>Testing with other setups
|
||||
</ul>
|
||||
|
||||
** Testing ODBC provider with IBM DB2 Universal Database
|
||||
|
||||
<ul>
|
||||
<li>You need a working mono and mcs</li>
|
||||
|
||||
<li>For Unix, you will need unixODBC or iODBC installed</li>
|
||||
|
||||
<li>Have acess to a <a href="http://www-3.ibm.com/software/data/db2/">IBM DB2 Universal Database</a> or
|
||||
you can download from IBM</li>
|
||||
|
||||
<li>Read these web pages about Unix, ODBC, and IBM DB2
|
||||
|
||||
<ul>
|
||||
<li><a href="http://www.unixodbc.com/doc/db2.html">unixODBC web page about IBM DB2</a></li>
|
||||
<li><a href="http://www-3.ibm.com/software/data/db2/udb/ad/v8/cli/t0010406">IBM web page about unixODBC and DB2</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>The ODBC provider is similar to the <a href="http://www.go-mono.com/ibmdb2.html">IBM DB2</a> provider.</li>
|
||||
</ul>
|
||||
|
||||
** Testing ODBC provider with MySQL
|
||||
|
||||
<p>You can test Mono's ODBC provider System.Data.Odbc with the MySQL ODBC driver MyODBC
|
||||
|
||||
<p><ul>
|
||||
<li>Take a look at OdbcTest.cs in mcs/class/System.Data/Test</li>
|
||||
|
||||
<li>Here is a ConnectionString format if you have a DSN setup:
|
||||
<pre>
|
||||
"DSN=dataSetName;UID=myuserid;PWD=mypassword"
|
||||
</pre>
|
||||
</li>
|
||||
<li>Here is a ConnectionString format if you do not have a DSN (have not
|
||||
gotten this to work though):
|
||||
<pre>
|
||||
"DRIVER={MySQL ODBC 3.51 Driver};" +
|
||||
"SERVER=localhost;DATABASE=test;" +
|
||||
"UID=myuserid;PASSWORD=mypassword;" +
|
||||
"OPTION=3";
|
||||
|
||||
</pre>
|
||||
</li>
|
||||
<li>C# Example:
|
||||
<pre>
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.Odbc;
|
||||
|
||||
public class Test
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
// have an ODBC DSN setup named MYSQLDSN
|
||||
// that accesses a MySQL database via
|
||||
// MyODBC driver for ODBC with a
|
||||
// hostname of localhost and database test
|
||||
string connectionString =
|
||||
"DSN=MYSQLDSN;" +
|
||||
"UID=myuserid;" +
|
||||
"PWD=mypassword";
|
||||
IDbConnection dbcon;
|
||||
dbcon.Open();
|
||||
dbcon = new OdbcConnection(connectionString);
|
||||
IDbCommand dbcmd = dbcon.CreateCommand();
|
||||
// requires a table to be created named employee
|
||||
// with columns firstname and lastname
|
||||
// such as,
|
||||
// CREATE TABLE employee (
|
||||
// firstname varchar(32),
|
||||
// lastname varchar(32));
|
||||
string sql =
|
||||
"SELECT firstname, lastname " +
|
||||
"FROM employee";
|
||||
dbcmd.CommandText = sql;
|
||||
IDataReader reader = dbcmd.ExecuteReader();
|
||||
while(reader.Read()) {
|
||||
string FirstName = reader["firstname"];
|
||||
string LastName = reader["lastname"];
|
||||
Console.WriteLine("Name: " +
|
||||
FirstName + " " + LastName);
|
||||
}
|
||||
// clean up
|
||||
reader.Close();
|
||||
reader = null;
|
||||
dbcmd.Dispose();
|
||||
dbcmd = null;
|
||||
dbcon.Close();
|
||||
dbcon = null;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</li>
|
||||
<li>Building C# Example:
|
||||
<ul>
|
||||
<li>Save the example to a file, such as, TestExample.cs</li>
|
||||
<li>Build on Linux:
|
||||
<pre>
|
||||
mcs TestExample.cs -r System.Data.dll
|
||||
</pre>
|
||||
</li>
|
||||
<li>Build on Windows via Cygwin:
|
||||
<pre>
|
||||
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
|
||||
TestExample.cs \
|
||||
-lib:C:/cygwin/home/MyHome/mono/install/lib \
|
||||
-r System.Data.dll
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Running the Example:
|
||||
<pre>
|
||||
mono TestExample.exe
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
<li>TODO
|
||||
</ul>
|
||||
@@ -1,153 +1,53 @@
|
||||
* OLE DB Provider
|
||||
|
||||
<ul>
|
||||
<li> Provides a OleDb-like provider for Mono
|
||||
using <a href="http://www.gnome-db.org/">GDA</a> as the data access layer.</li>
|
||||
using <a href="http://www.gnome-db.org/">GDA</a> as the data access layer.
|
||||
|
||||
<li> Exists in namespace System.Data.OleDb and assembly System.Data</li>
|
||||
<li> Exists in namespace System.Data.OleDb and assembly System.Data
|
||||
|
||||
<li>Created by Rodrigo Moya</li>
|
||||
<li>Created by Rodrigo Moya
|
||||
|
||||
<li>LibGDA has providers for:</li>
|
||||
<li>LibGDA has providers for:
|
||||
<ul>
|
||||
<li><a href="http://www.mysql.com/">MySQL</a></li>
|
||||
<li><a href="http://www.postgresql.org/">PostgreSQL</a></li>
|
||||
<li>XML</li>
|
||||
<li>ODBC (via <a href="http://www.unixodbc.org/">unixODBC</a>)</li>
|
||||
<li><a href="http://www.oracle.com/">Oracle</a></li>
|
||||
<li><a href="http://www.borland.com/products/downloads/download_interbase.html">Interbase</a></li>
|
||||
<li><a href="http://www.mysql.com/">MySQL</a>
|
||||
<li><a href="http://www.postgresql.org/">PostgreSQL</a>
|
||||
<li>XML
|
||||
<li>ODBC (via <a href="http://www.unixodbc.org/">unixODBC</a>)
|
||||
<li><a href="http://www.oracle.com/">Oracle</a>
|
||||
<li><a href="http://www.borland.com/products/downloads/download_interbase.html">Interbase</a>
|
||||
<li><a href="http://www.sybase.com/downloads">Sybase</a> and
|
||||
<a href="http://www.microsoft.com/sql/default.asp">Microsoft SQL Server</a> (
|
||||
via <a href="http://www.freetds.org/">FreeTDS</a>)</li>
|
||||
<li><a href="http://www-3.ibm.com/software/data/db2/">IBM DB2 Universal Database</a></li>
|
||||
<li><a href="http://www.hwaci.com/sw/sqlite/download.html">SQL Lite</a></li>
|
||||
<li><a href="http://www.microsoft.com/office/access/default.asp">MS Access</a></li>
|
||||
(via <a href="http://mdbtools.sourceforge.net/">MDB Tools</a>)</li>
|
||||
via <a href="http://www.freetds.org/">FreeTDS</a>)
|
||||
<li><a href="http://www-3.ibm.com/software/data/db2/">IBM DB2 Universal Database</a>
|
||||
<li><a href="http://www.hwaci.com/sw/sqlite/download.html">SQL Lite</a>
|
||||
<li><a href="http://www.microsoft.com/office/access/default.asp">MS Access</a>
|
||||
(via <a href="http://mdbtools.sourceforge.net/">MDB Tools</a>)
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>Does not support trusted connections</li>
|
||||
|
||||
<li>Bugs with Mono or the data provider should be reported
|
||||
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
|
||||
do not have Bugzilla user account, it is free
|
||||
and easy to
|
||||
create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
** Current Status
|
||||
* Current Status
|
||||
<ul>
|
||||
<li>The OleDb provider is working with libgda (an OLE-DB/ADO data access for Unix).
|
||||
The C-Sharp bindings to libgda currently work - meaning they can compile, run,
|
||||
and you can connect to a
|
||||
PostgreSQL database via libgda via the C-Sharp bindings to libgda.</li>
|
||||
PostgreSQL database via libgda via the C-Sharp bindings to libgda.
|
||||
|
||||
<li>Basic
|
||||
functionality (execution of commands, data retrieval, transactions, etc) are
|
||||
now working.</li>
|
||||
now working.
|
||||
|
||||
<li>An inital implementation of GetSchemaTable() for
|
||||
the OleDbDataReader has been checked into cvs. GetSchemaTable() isn't correct for OleDb,
|
||||
but the foundation is there.</li>
|
||||
but the foundation is there.
|
||||
</ul>
|
||||
|
||||
** Action Plan
|
||||
* Action Plan
|
||||
<ul>
|
||||
<li>Current focus is on filling up the missing pieces (Data adapters
|
||||
mainly) and schema support.</li>
|
||||
mainly) and schema support.
|
||||
|
||||
<li>We need help building libgda on Windows though. libgda
|
||||
builds find on linux though.</li>
|
||||
builds find on linux though.
|
||||
|
||||
<li>Need to make the OleDb provider compatible with the OleDb provider in Microsoft .NET</li>
|
||||
<li>Need to make the OleDb provider compatible with the OleDb provider in Microsoft .NET
|
||||
</ul>
|
||||
|
||||
** Testing OleDb with libgda's PostgreSQL provider
|
||||
|
||||
<ul>
|
||||
<li>Requires a working mono and mcs</li>
|
||||
<li>Requires Linux because the OleDb provider uses libgda and libgda only
|
||||
works on Linux.</li>
|
||||
<li>Connection String format: "Provider=providerName;...". providerName is the
|
||||
name of the Provider you use, such as, PostgreSQL, MySQL, etc. The elipsis ...
|
||||
means that the connection parameters are dependent upon the provider being used and
|
||||
are passed to libgda for connecting. Such paramters, can be: Database, User ID, Password,
|
||||
Server, etc...</li>
|
||||
<li>See the test TestOleDb.cs found at mcs/class/System.Data/System.Data.OleDb</li>
|
||||
<li>C# Example for Mono's System.Data.OleDb:
|
||||
<pre>
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.OleDb;
|
||||
|
||||
public class Test
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
// there is a libgda PostgreSQL provider
|
||||
string connectionString =
|
||||
"Provider=PostgreSQL;" +
|
||||
"Addr=127.0.0.1;" +
|
||||
"Database=test;" +
|
||||
"User ID=postgres;" +
|
||||
"Password=fun2db";
|
||||
IDbConnection dbcon;
|
||||
dbcon = new OleDbConnection(connectionString);
|
||||
dbcon.Open();
|
||||
IDbCommand dbcmd = dbcon.CreateCommand();
|
||||
// requires a table to be created named employee
|
||||
// with columns firstname and lastname
|
||||
// such as,
|
||||
// CREATE TABLE employee (
|
||||
// firstname varchar(32),
|
||||
// lastname varchar(32));
|
||||
string sql =
|
||||
"SELECT firstname, lastname " +
|
||||
"FROM employee";
|
||||
dbcmd.CommandText = sql;
|
||||
IDataReader reader = dbcmd.ExecuteReader();
|
||||
while(reader.Read()) {
|
||||
string FirstName = reader["firstname"];
|
||||
string LastName = reader["lastname"];
|
||||
Console.WriteLine("Name: " +
|
||||
FirstName + " " + LastName);
|
||||
}
|
||||
// clean up
|
||||
reader.Close();
|
||||
reader = null;
|
||||
dbcmd.Dispose();
|
||||
dbcmd = null;
|
||||
dbcon.Close();
|
||||
dbcon = null;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</li>
|
||||
<li>Building C# Example:
|
||||
<ul>
|
||||
<li>Save the example to a file, such as, TestExample.cs</li>
|
||||
<li>Build on Linux:
|
||||
<pre>
|
||||
mcs TestExample.cs -r System.Data.dll
|
||||
</pre>
|
||||
</li>
|
||||
<li>Build on Windows via Cygwin:
|
||||
<pre>
|
||||
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
|
||||
TestExample.cs \
|
||||
-lib:C:/cygwin/home/MyHome/mono/install/lib \
|
||||
-r System.Data.dll
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Running the Example:
|
||||
<pre>
|
||||
mono TestExample.exe
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
-184
@@ -1,184 +0,0 @@
|
||||
* Oracle Data Provider
|
||||
|
||||
<ul>
|
||||
|
||||
<li>ADO.NET Data Provider for <a href="http://www.oracle.com/">Oracle</a> databases</li>
|
||||
|
||||
<li>Exists in namespace System.Data.OracleClient and assembly System.Data.OracleClient</li>
|
||||
|
||||
<li>Works on Windows and Linux</li>
|
||||
|
||||
<li>Works with Oracle 8i</li>
|
||||
|
||||
<li>Untested, but should work with Oracle 9i</li>
|
||||
|
||||
<li>Uses the Oracle CLI (Call Level Interface) which is a C library (API) for the Oracle Client
|
||||
software</li>
|
||||
|
||||
<li>Internally, the OracleClient provider has OCI abstracted to an object-oriented programming model</li>
|
||||
|
||||
<li>Created by Daniel Morgan and Tim Coleman</li>
|
||||
|
||||
<li>Does not support trusted connections</li>
|
||||
|
||||
<li>Bugs with Mono or the data provider should be reported
|
||||
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
|
||||
do not have Bugzilla user account, it is free
|
||||
and easy to
|
||||
create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
** Current Status
|
||||
|
||||
<ul>
|
||||
<li>OracleConnection can connect and disconnect to an Oracle 8i database on
|
||||
Windows and Linux via OCI (Oracle Call-level Interface)</li>
|
||||
|
||||
<li>No longer uses a glue library (a library between the System.Data.OracleClient.dll
|
||||
assembly and the oci library). In Current Mono cvs, System.Data.OracleClient
|
||||
directly platform invokes into the oci library thanks to Tim Coleman.</li>
|
||||
|
||||
<li>Can have multiple connections with different transactions where each transaction is
|
||||
separated from the others, so a rollback or commit in one transaction
|
||||
does not affect the other.</li>
|
||||
|
||||
<li>Can execute simple DML SQL statements, such as,
|
||||
INSERT a row into the EMP table via the OracleCommand's ExecuteNonQuery method</li>
|
||||
|
||||
<li>The System.Data.OracleClient.dll assembly can be built with mcs/mono via
|
||||
the makefile.gnu for System.Data.OracleClient or csc/.net via the
|
||||
System.Data.OracleClient.build nant build file.</li>
|
||||
|
||||
<li>Can retrieve data via ExecuteReader and OracleDataReader. Currently,
|
||||
supports character, numeric, some date data types. ExecuteScalar
|
||||
also works.</li>
|
||||
|
||||
<li>Simple input parameters (character and numeric data) can now
|
||||
be used in SQL queries. Output parameters do not yet work.</li>
|
||||
|
||||
<li>OracleException and Error handling exists now.</li>
|
||||
|
||||
<li>Message handling needs to be added for non-critical messages
|
||||
received from Oracle</li>
|
||||
|
||||
<li>Handling of various data types need to be added.</li>
|
||||
|
||||
<li>Data Adapter exists, and a DataSet can be filled using it. The
|
||||
Data Adapter is abstract enough that it should work as expected.</li>
|
||||
|
||||
<li>Lots of missing functionality and bugs.</li>
|
||||
|
||||
<li>Works with SQL# command-line and GTK# versions in cvs. Only works with
|
||||
simple character data though. SQL# For GTK# can only show the results to
|
||||
the TextView because the Data Adapter is not yet available</li>
|
||||
|
||||
</ul>
|
||||
|
||||
** Action Plan
|
||||
|
||||
<ul>
|
||||
<li>Be able to retrieve results via a data reader (WORKING)</li>
|
||||
<li>Parameters support (IN PROGRESS)</li>
|
||||
<li>transactions (WORKING)</li>
|
||||
<li>Stored Procedures, Functions, and Packages support</li>
|
||||
<li>Be able to fill a DataTable in a DataSet via a data adapter (IN PROGRESS)</li>
|
||||
<li>Support for Oracle 8i and 9i (UNKNOWN)</li>
|
||||
<li>Support LOBs</li>
|
||||
<li>Support all the data types</li>
|
||||
<li>Implement Connection pooling</li>
|
||||
<li>Security</li>
|
||||
|
||||
</ul>
|
||||
|
||||
** Testing System.Data.OracleClient
|
||||
|
||||
<ul>
|
||||
<li>Have a working mono and mcs</li>
|
||||
|
||||
<li>Have access to an Oracle 8i database or download it from
|
||||
<a href="http://www.oracle.com/">Oracle</a>. If you are connecting
|
||||
remotely to an Oracle database, you need the Oracle client software.
|
||||
Registration to the <a href="http://technet.oracle.com/">Oracle Technology Network</a> is free. If installing on Linux,
|
||||
I suggest you do a lot of searching to see how others installed Oracle on Linux.</li>
|
||||
|
||||
<li>Make sure System.Data.OracleClient.dll assembly is built, if not, go
|
||||
into System.Data.OracleClient and do a make -f makefile.gnu (on Linux) or
|
||||
../../nant/NAnt.exe (on Windows using Cygwin).</li>
|
||||
|
||||
<li>Take a look at TestOracleClient.cs found at mcs/class/System.Data.OracleClient/Test</li>
|
||||
|
||||
<li>The Data Source is an Oracle TNSNAME</li>
|
||||
|
||||
<li>Has a connection string format:
|
||||
<pre>
|
||||
"Data Source=tnsname;User ID=userid;Password=password"
|
||||
</pre>
|
||||
</li>
|
||||
<li>C# Example:
|
||||
<pre>
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.OracleClient;
|
||||
|
||||
public class Test
|
||||
{
|
||||
public static void Main (string[] args)
|
||||
{
|
||||
string connectionString =
|
||||
"Data Source=testdb;" +
|
||||
"User ID=scott;" +
|
||||
"Password=tiger;";
|
||||
IDbConnection dbcon;
|
||||
dbcon = new OracleConnection (connectionString);
|
||||
dbcon.Open ();
|
||||
IDbCommand dbcmd = dbcon.CreateCommand ();
|
||||
string sql = "SELECT ename, job FROM scott.emp";
|
||||
dbcmd.CommandText = sql;
|
||||
IDataReader reader = dbcmd.ExecuteReader ();
|
||||
while (reader.Read ()) {
|
||||
string employeeName = reader["ename"];
|
||||
string job = reader["job"];
|
||||
Console.WriteLine ("Employee Name: {0} Job: {1}",
|
||||
employeeName, job);
|
||||
}
|
||||
// clean up
|
||||
reader.Close ();
|
||||
reader = null;
|
||||
dbcmd.CommandText = sql;
|
||||
dbcmd.ExecuteNonQuery ();
|
||||
dbcmd.Dispose ();
|
||||
dbcmd = null;
|
||||
dbcon.Close ();
|
||||
dbcon = null;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</li>
|
||||
<li>Building C# Example:
|
||||
<ul>
|
||||
<li>Save the example to a file, such as, TestExample.cs</li>
|
||||
<li>Build on Linux:
|
||||
<pre>
|
||||
mcs TestExample.cs -r System.Data.dll \
|
||||
-r System.Data.OracleClient.dll
|
||||
</pre>
|
||||
</li>
|
||||
<li>Build on Windows via Cygwin:
|
||||
<pre>
|
||||
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
|
||||
TestExample.cs \
|
||||
-lib:C:/cygwin/home/MyHome/mono/install/lib \
|
||||
-r System.Data.dll -r System.Data.OracleClient.dll
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Running the Example:
|
||||
<pre>
|
||||
mono TestExample.exe
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
* International sites
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="http://mono.es.gnome.org">Mono
|
||||
Hispano</a>: The spanish-speaking community of Mono
|
||||
developers and users. They have quite a number of
|
||||
unique documents and tutorials.
|
||||
|
||||
<li><a href="http://www.go-mono.pl">Mono Poland</a>:
|
||||
Mono site for polish users.
|
||||
|
||||
</ul>
|
||||
|
||||
* User sites
|
||||
|
||||
<ul>
|
||||
|
||||
<li>Alp Toker's <a
|
||||
href="http://www.atoker.com/mono/">site</a>: He is an
|
||||
active Mono developer (gsirc, platano) and produces
|
||||
very nice Debian packages of Mono.
|
||||
|
||||
<li>Brian Ritchie's <a
|
||||
href="http://www12.brinkster.com/brianr/">site</a>:
|
||||
Brian is a contributor to Mono's class library (ODBC
|
||||
provider and the database multiplexing assembly), and
|
||||
has built an application server for .NET and Mono.
|
||||
His site contains news, software, as well as his
|
||||
weblog.
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
+231
-297
@@ -1,187 +1,81 @@
|
||||
* PostgreSQL Data Provider
|
||||
|
||||
There are two ADO.NET data providers for <a href="http://www.postgresql.org/">PostgreSQL</a> in Mono:
|
||||
|
||||
<ul>
|
||||
|
||||
<li><a href="http://gborg.postgresql.org/project/npgsql/projdisplay.php">Npgsql</a>
|
||||
<ul>
|
||||
<li>a .NET Managed Data Provider for PostgreSQL
|
||||
|
||||
<li>Written in 100% C#</li>
|
||||
|
||||
<li>does not require a client library</li>
|
||||
|
||||
<li>works on Mono and Microsoft .NET</li>
|
||||
|
||||
<li>created by Francisco Figueiredo jr. and has many developers working on it
|
||||
|
||||
<li>works in the SQL# (command-line and GTK# GUI versions)</li>
|
||||
|
||||
<li>in namespace Npgsql and assembly Npgsql and is found in mcs
|
||||
at mcs/class/Npgsql</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Exists in namespace Mono.Data.PostgreSql and assembly Mono.Data.PostgreSql
|
||||
|
||||
<li>Mono.Data.PostgreSQL (deprecated)
|
||||
<ul>
|
||||
<li>Deprecated in favor of Npgsql</li>
|
||||
|
||||
<li>Exists in namespace Mono.Data.PostgreSql and assembly Mono.Data.PostgreSql</li>
|
||||
<li>Is a Mono Data Provider for the <a href="http://www.postgresql.org/">PostgreSQL</a>
|
||||
client/server database management system.
|
||||
|
||||
<li>Is a Mono Data Provider for the <a href="http://www.postgresql.org/">PostgreSQL</a>
|
||||
client/server database management system.</li>
|
||||
|
||||
<li>Written in C# and has C# bindings to the PostgreSQL C Client library pq.dll on Windows
|
||||
and libpq.so on Linux.</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>Bugs with Mono or the data provider should be reported
|
||||
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
|
||||
do not have Bugzilla user account, it is free
|
||||
and easy to
|
||||
create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
|
||||
|
||||
|
||||
<li>Written in C# and has C# bindings to the PostgreSQL C Client library pq.dll on Windows
|
||||
and libpq.so on Linux.
|
||||
</ul>
|
||||
|
||||
Below, see separate Testing sections for Npgsql and Mono.Data.PostgreSqlClient.
|
||||
|
||||
** Current Status
|
||||
* Current Status
|
||||
|
||||
<ul>
|
||||
<li>Npgsql
|
||||
<ul>
|
||||
<li>Builds and Runs on both Microsoft .NET and Mono.</li>
|
||||
<li>Works using SQL# (command-line and GTK# versions)</li>
|
||||
<li>You can send insert, update, delete queries
|
||||
through NpgsqlCommand.ExecuteNonQuery() method.</li>
|
||||
<li>You can send queries like, select count(*) from table, select version()
|
||||
with NpgsqlCommand.ExecuteScalar() method.</li>
|
||||
<li>There is logging support. (Thanks Dave Page)
|
||||
To use it, place code like that in your program:</li>
|
||||
|
||||
<pre>
|
||||
// Enable logging.
|
||||
NpgsqlEventLog.Level = LogLevel.Debug; // LogLevel.
|
||||
NpgsqlEventLog.LogName = "NpgsqlTests.LogFile"; // LogFile.
|
||||
</pre>
|
||||
|
||||
<li>You can use Npgsql with Mono (Thanks Kristis Makris). It is not working perfectly.</li>
|
||||
<li>There is a winforms test suite (Thanks Dave Page).</li>
|
||||
<li>Clearer code in NpgsqlConnection removing *magic* numbers and constants. (Thanks Kristis Makris)</li>
|
||||
<li>Better support of ODBC-like ConnectionString in NpgsqlConnection (Thanks Dave Page)</li>
|
||||
<li>Thanks Ulrich Sprick for all discussion and ideas.</li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
<li>Mono.Data.PostgreSQL status
|
||||
<ul>
|
||||
|
||||
<li>Deprecated in favor of Npgsql</li>
|
||||
|
||||
<li>We are able to do simple CREATE TABLE, DROP TABLE, UPDATE, INSERT, and
|
||||
DELETE SQL commands using the ExecuteNonQuery method in PgSqlCommand.</li>
|
||||
DELETE SQL commands using the ExecuteNonQuery method in PgSqlCommand.
|
||||
|
||||
<li>We can execute multiple queries and do a NextResult() in PgSqlDataReader()
|
||||
to get the next result set.</li>
|
||||
to get the next result set.
|
||||
|
||||
<li>We are also able to do simple aggregate functions,
|
||||
ie, count(), sum(), min(), and max()
|
||||
in a simple SELECT SQL query using the ExecuteScalar() now.</li>
|
||||
in a simple SELECT SQL query using the ExecuteScalar() now.
|
||||
|
||||
<li>We are also able to retrieve data with a simple SELECT SQL query
|
||||
using ExecuteReader() which returns a PgSqlDataReader. We are able to
|
||||
use GetSchemaTable() to get the meta data about the table columns.
|
||||
We are able to Read() to get each row from the result set.</li>
|
||||
We are able to Read() to get each row from the result set.
|
||||
|
||||
<li>We are able to get
|
||||
String data (char, character, text, varchar), Int16 (smallint),
|
||||
Int32 (integer), Int64 (bigint), DateTime (time, date, timestamp),
|
||||
Boolean (boolean), Single (float), and Double (double).
|
||||
More data types will come later. Note, the types that do work still
|
||||
need thorough testing.</li>
|
||||
need thorough testing.
|
||||
|
||||
<li>Rows that are returned which contain columns that are NULL are handled now.
|
||||
The PgSqlDataReader method IsDBNull() needs to be called to determine
|
||||
if a field IS NULL before trying to read data from that field.</li>
|
||||
if a field IS NULL before trying to read data from that field.
|
||||
|
||||
<li>Calling PostgreSQL stored procedures works. It does not work perfectly.
|
||||
It may not
|
||||
even work to specification - yet. If you want to test it yourself, look at
|
||||
TestSqlDataReader.cs or PostgresTest.cs in
|
||||
mcs/class/System.Data/Test.</li>
|
||||
mcs/class/System.Data/Test.
|
||||
|
||||
<li>Below, I have some sample code you can
|
||||
use to call a PostgreSQL stored procedure named "version". This stored
|
||||
procedure returns a string containing the PostgreSQL server version. Notice
|
||||
the CommandType is StoredProcedure and the method ExecuteScalar() is called.</li>
|
||||
the CommandType is StoredProcedure and the method ExecuteScalar() is called.
|
||||
|
||||
<li>ExecuteScalar() is a lightweight method in class PgSqlCommand that only returns
|
||||
one row and one column as one object - even if there is more than row or column.</li>
|
||||
one row and one column as one object - even if there is more than row or column.
|
||||
|
||||
<li>We have the beginnings of Parameters support PostgreSQL. Only
|
||||
Input Parameters are currently supported. Output, Input/Output,
|
||||
and Return parameters still need to be done.</li>
|
||||
and Return parameters still need to be done.
|
||||
|
||||
<li>A lot of functionality in System.Data is missing, but the
|
||||
infrastructure is starting to come together.
|
||||
|
||||
<li>A lot of Exceptions need to be thrown for various exceptions. However,
|
||||
PgSqlException, PgSqlErrorCollection, and PgSqlError have been partially
|
||||
implemented.</li>
|
||||
implemented.
|
||||
|
||||
<li>Tim Coleman and Rodrigo Moya got the beginnings of the
|
||||
PgSqlDataAdapter/DataSet/DataTable/DataRow to work. Currently,
|
||||
the PgSqlDataAdapter can Fill() relational data into a DataTable in a DataSet.
|
||||
See the test mcs/class/System.Data/Test/TestSqlDataAdapter.cs to see it in action.</li>
|
||||
|
||||
<li>Works in the SQL# command-line version
|
||||
and the GTK# version on Linux. It only works in SQL# command-line version
|
||||
on Windows.</li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
See the test mcs/class/System.Data/Test/TestSqlDataAdapter.cs to see it in action.
|
||||
</ul>
|
||||
|
||||
** Action Plan
|
||||
<ul>
|
||||
<li>More testing and fixing bugs</li>
|
||||
|
||||
<li>Better error handling</li>
|
||||
|
||||
<li>More Data Types to use</li>
|
||||
|
||||
<li>Any features for Npgsql should be implemented in Npgsql's main cvs repository at
|
||||
gborg.postgresql.org. Most bugs should be fixed in gborg.postgresql.org's cvs.
|
||||
Only bugs neccessary for building and running of Npgsql on Mono can be done in Mono cvs,
|
||||
but once applied they should be sent to Npgsql's mailing list
|
||||
at gborg.postgresql.org for inclusion into cvs there. Whenever there is
|
||||
a release of Npgsql (determined by Francisco Figueiredo jr. or a release
|
||||
of Mono (determined by Miguel de Icaza), then the Npgsql source
|
||||
in gborg.postgresql.org's cvs will be used to update the Npgsql source in
|
||||
Mono's cvs.
|
||||
</li>
|
||||
|
||||
<li>Mono.Data.PostgreSqlClient even though deprecated can still
|
||||
accept bug fixes. This is because other areas, such as, ASP.NET examples
|
||||
may still use this provider.</li>
|
||||
|
||||
<li>Add any missing functionality to Npgsql. If this funtionality works on
|
||||
.NET but not on Mono, implement the missing features or fix the bugs in Mono</li>
|
||||
|
||||
<li>Npgsql has replaced Mono.Data.PostgreSqlClient as the provider of
|
||||
choice to use. However, Mono.Data.PostgreSqlClient will remain in a
|
||||
deprecated state until nobody uses it anymore - then it can be removed</li>
|
||||
|
||||
<li>Implement more of PostgreSQL 7.3 features in Npgsql</li>
|
||||
</ul>
|
||||
|
||||
** Testing Mono.Data.PostgreSqlClient
|
||||
* Testing the PostgreSQL Provider
|
||||
|
||||
<ul>
|
||||
* <p>In order to test Mono.Data.PostgreSqlClient, you will need to have
|
||||
access to a remote PostgreSQL DBMS, or you will have to install
|
||||
one locally. PostgreSQL was the first ADO.NET provider created in Mono.
|
||||
one locally. PostgreSQL was first ADO.NET provider created in Mono.
|
||||
|
||||
<p>Why use PostgreSQL? Because it is free software, has a client
|
||||
library that is easy to use, PostgreSQL is easy to install on
|
||||
@@ -200,9 +94,7 @@
|
||||
user "postgres".
|
||||
|
||||
<pre>
|
||||
"Server=localhost;Database=test;User ID=postgres;Password=fun2db"
|
||||
(or)
|
||||
"host=localhost;dbname=test;user=postgres;password=fun2db"
|
||||
"host=localhost;dbname=test;user=postgres"
|
||||
</pre>
|
||||
</ul>
|
||||
|
||||
@@ -287,15 +179,9 @@ create user postgres with password 'fun2db';
|
||||
* <p>Important notes from this file are:
|
||||
|
||||
<ul>
|
||||
<p><b>2.</b> - Install the latest <a href="http://www.neuro.gatech.edu/users/cwilson/cygutils/cygipc/index.html">CygIPC</a> package.
|
||||
Cygwin includes a utility bunzip2 which can be used to unzip it. Now, change to
|
||||
the root directory by
|
||||
typing "cd /" then
|
||||
you can use "tar xvf cygipc.xxx.tar" to untar it
|
||||
in the root directory in cygwin.
|
||||
<p><b>2.</b> - Install the latest <a href="http://www.neuro.gatech.edu/users/cwilson/cygutils/OBSOLETE/V1.1/cygipc/index.html">CygIPC</a> package.
|
||||
|
||||
<p>The cygipc package contains the support to run ipc-daemon
|
||||
that you will need
|
||||
<p>The cygipc package contains the ipc-daemon you will need
|
||||
to run before you can
|
||||
run the PostgreSQL DBMS Server daemon (postmaster) or run
|
||||
initdb which initializes the PostgreSQL database.
|
||||
@@ -381,9 +267,34 @@ create user postgres with password 'fun2db';
|
||||
</ul>
|
||||
|
||||
<p>In the path mcs/class/System.Data/Test
|
||||
there is a test for Mono.Data.PostgreSqlClient named
|
||||
there is a PostgreSQL test program named
|
||||
PostgreTest.cs. Thanks goes to Gonzalo for creating the original
|
||||
PostgreSQL test.
|
||||
|
||||
<p>To use it to test System.Data, you
|
||||
modify the file to your PostgreSQL database
|
||||
connection requirements:
|
||||
|
||||
<p>
|
||||
<ul>
|
||||
<li><b>dbname</b> database, ie., test</li>
|
||||
<li><b>host</b> hostname of the PostgreSQL DBMS Server, ie., localhost</li>
|
||||
<li><b>user</b> username, ie., someuser</li>
|
||||
<li><b>password</b> password, ie., mypass1234</li>
|
||||
</ul>
|
||||
|
||||
<p>The connection string is in OLE-DB connection string format. Internally,
|
||||
SqlConnection converts this to the PostgreSQL connection string format.
|
||||
|
||||
<p>
|
||||
<pre>
|
||||
OLE-DB: "host=localhost;dbname=test;user=joe;password=smoe"
|
||||
PostgreSQL: "host=localhost dbname=test user=joe password=smoe"
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
Note that OLE-DB includes the semicolons while PostgreSQL's connection
|
||||
string does not.
|
||||
|
||||
<p>
|
||||
To compile the PostgresTest.cs program, do:
|
||||
@@ -399,7 +310,7 @@ create user postgres with password 'fun2db';
|
||||
to PgSqlConnection, then you need to run mcs like:
|
||||
|
||||
<pre>
|
||||
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
|
||||
mono f:/cygwin/home/DanielMorgan/mono/install/bin/mcs.exe \
|
||||
PostgresTest.cs \
|
||||
-r System.Data.dll \
|
||||
-r Mono.Data.PostgreSqlClient.dll
|
||||
@@ -417,162 +328,185 @@ mint PostgresTest.exe
|
||||
To run using mono, do:
|
||||
<pre>
|
||||
mono PostgresTest.exe
|
||||
</pre>
|
||||
</pre>
|
||||
|
||||
<p>Below, I show how the output from PostgresTest. I have omitted a lot
|
||||
of the meta data for the columns except two columns. The classes
|
||||
used were from Mono.Data.PostgreSqlClient and were used to connect to a
|
||||
PostgreSQL database and retrieve data.
|
||||
|
||||
<p>C# Example for Mono.Data.PostgreSqlClient:
|
||||
<pre>
|
||||
using System;
|
||||
using System.Data;
|
||||
using Mono.Data.PostgreSqlClient;
|
||||
|
||||
public class Test
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
string connectionString =
|
||||
"Server=localhost;" +
|
||||
"Database=test;" +
|
||||
"User ID=postgres;" +
|
||||
"Password=fun2db;";
|
||||
IDbConnection dbcon;
|
||||
dbcon = new PgConnection(connectionString);
|
||||
dbcon.Open();
|
||||
IDbCommand dbcmd = dbcon.CreateCommand();
|
||||
// requires a table to be created named employee
|
||||
// with columns firstname and lastname
|
||||
// such as,
|
||||
// CREATE TABLE employee (
|
||||
// firstname varchar(32),
|
||||
// lastname varchar(32));
|
||||
string sql =
|
||||
"SELECT firstname, lastname" +
|
||||
"FROM employee";
|
||||
dbcmd.CommandText = sql;
|
||||
IDataReader reader = dbcmd.ExecuteReader();
|
||||
while(reader.Read()) {
|
||||
string FirstName = reader["firstname"];
|
||||
string LastName = reader["lastname"];
|
||||
Console.WriteLine("Name: " +
|
||||
FirstName + " " + LastName);
|
||||
}
|
||||
// clean up
|
||||
reader.Close();
|
||||
reader = null;
|
||||
dbcmd.Dispose();
|
||||
dbcmd = null;
|
||||
dbcon.Close();
|
||||
dbcon = null;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</li>
|
||||
<li>Building C# Example:
|
||||
<ul>
|
||||
<li>Save the example to a file, such as, TestExample.cs</li>
|
||||
<li>Build on Linux:
|
||||
<pre>
|
||||
mcs TestExample.cs -r System.Data.dll \
|
||||
-r Mono.Data.PostgreSqlClient.dll
|
||||
</pre>
|
||||
</li>
|
||||
<li>Build on Windows via Cygwin:
|
||||
<pre>
|
||||
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
|
||||
TestExample.cs \
|
||||
-lib:C:/cygwin/home/MyHome/mono/install/lib \
|
||||
-r System.Data.dll -r Mono.Data.PostgreSqlClient.dll
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Running the Example:
|
||||
<pre>
|
||||
mono TestExample.exe
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
<pre>
|
||||
|
||||
** Testing Npgsql
|
||||
danmorg@DANPC ~/mono/mcs/class/System.Data/Test
|
||||
$ mcs PostgresTest.cs -r System.Data.dll
|
||||
|
||||
danmorg@DANPC ~/mono/mcs/class/System.Data/Test
|
||||
$ mono PostgresTest.exe
|
||||
Postgres provider specific tests...
|
||||
|
||||
Drop table:
|
||||
Error (don't worry about this one)SqlError:PGRES_FATAL_ERROR ERROR:
|
||||
table "mono_postgres_test" does not exist
|
||||
<Stack Trace>
|
||||
|
||||
Create table with all supported types:
|
||||
OK
|
||||
Insert values for all known types:
|
||||
OK
|
||||
Update values:
|
||||
OK
|
||||
Insert values for all known types:
|
||||
OK
|
||||
Aggregate: count(*)
|
||||
Agg Result: 2
|
||||
Aggregate: min(text_value)
|
||||
Agg Result: This is a text
|
||||
Aggregate: max(int4_value)
|
||||
Agg Result: 1048000
|
||||
Aggregate: sum(int4_value)
|
||||
Agg Result: 1048003
|
||||
Select values from the database:
|
||||
Result is from a SELECT SQL Query. Records Affected: -1
|
||||
Result Set 1...
|
||||
Total Columns: 28
|
||||
ColumnName = boolean_value
|
||||
ColumnOrdinal = 1
|
||||
ColumnSize = 1
|
||||
NumericPrecision = 0
|
||||
NumericScale = 0
|
||||
IsUnique = False
|
||||
IsKey =
|
||||
BaseCatalogName =
|
||||
BaseColumnName = boolean_value
|
||||
BaseSchemaName =
|
||||
BaseTableName =
|
||||
DataType = System.Boolean
|
||||
AllowDBNull = False
|
||||
ProviderType = 16
|
||||
IsAliased = False
|
||||
IsExpression = False
|
||||
IsIdentity = False
|
||||
IsAutoIncrement = False
|
||||
IsRowVersion = False
|
||||
IsHidden = False
|
||||
IsLong = False
|
||||
IsReadOnly = False
|
||||
|
||||
...
|
||||
|
||||
ColumnName = null_timestamp_value
|
||||
ColumnOrdinal = 28
|
||||
ColumnSize = 8
|
||||
NumericPrecision = 0
|
||||
NumericScale = 0
|
||||
IsUnique = False
|
||||
IsKey =
|
||||
BaseCatalogName =
|
||||
BaseColumnName = null_timestamp_value
|
||||
BaseSchemaName =
|
||||
BaseTableName =
|
||||
DataType = System.DateTime
|
||||
AllowDBNull = False
|
||||
ProviderType = 1184
|
||||
IsAliased = False
|
||||
IsExpression = False
|
||||
IsIdentity = False
|
||||
IsAutoIncrement = False
|
||||
IsRowVersion = False
|
||||
IsHidden = False
|
||||
IsLong = False
|
||||
IsReadOnly = False
|
||||
|
||||
Gonna do a Read() now...
|
||||
Row 0:
|
||||
Col 0: boolean_value: False
|
||||
Col 1: int2_value: 5
|
||||
Col 2: int4_value: 3
|
||||
Col 3: bigint_value: 9
|
||||
Col 4: float_value: 3.141590
|
||||
Col 5: double_value: 3.14159
|
||||
Col 6: numeric_value: 123456789012.345
|
||||
Col 7: char_value: Mono.Data!
|
||||
Col 8: varchar_value: It was not me!
|
||||
Col 9: text_value: We got data!
|
||||
Col 10: point_value: (1,0)
|
||||
Col 11: time_value: 01/01/1 21:13:14
|
||||
Col 12: date_value: 02/29/2000 00:00:00
|
||||
Col 13: timestamp_value: 02/29/2004 14:00:11
|
||||
Col 14: null_boolean_value is NULL
|
||||
Col 15: null_int2_value is NULL
|
||||
Col 16: null_int4_value is NULL
|
||||
Col 17: null_bigint_value is NULL
|
||||
Col 18: null_float_value is NULL
|
||||
Col 19: null_double_value is NULL
|
||||
Col 20: null_numeric_value is NULL
|
||||
Col 21: null_char_value is NULL
|
||||
Col 22: null_varchar_value is NULL
|
||||
Col 23: null_text_value is NULL
|
||||
Col 24: null_point_value is NULL
|
||||
Col 25: null_time_value is NULL
|
||||
Col 26: null_date_value is NULL
|
||||
Col 27: null_timestamp_value is NULL
|
||||
Row 1:
|
||||
Col 0: boolean_value: True
|
||||
Col 1: int2_value: -22
|
||||
Col 2: int4_value: 1048000
|
||||
Col 3: bigint_value: 123456789012345
|
||||
Col 4: float_value: 3.141590
|
||||
Col 5: double_value: 3.14159
|
||||
Col 6: numeric_value: 123456789012.345
|
||||
Col 7: char_value: This is a char
|
||||
Col 8: varchar_value: This is a varchar
|
||||
Col 9: text_value: This is a text
|
||||
Col 10: point_value: (1,0)
|
||||
Col 11: time_value: 01/01/1 21:13:14
|
||||
Col 12: date_value: 02/29/2000 00:00:00
|
||||
Col 13: timestamp_value: 02/29/2004 14:00:11
|
||||
Col 14: null_boolean_value is NULL
|
||||
Col 15: null_int2_value is NULL
|
||||
Col 16: null_int4_value is NULL
|
||||
Col 17: null_bigint_value is NULL
|
||||
Col 18: null_float_value is NULL
|
||||
Col 19: null_double_value is NULL
|
||||
Col 20: null_numeric_value is NULL
|
||||
Col 21: null_char_value is NULL
|
||||
Col 22: null_varchar_value is NULL
|
||||
Col 23: null_text_value is NULL
|
||||
Col 24: null_point_value is NULL
|
||||
Col 25: null_time_value is NULL
|
||||
Col 26: null_date_value is NULL
|
||||
Col 27: null_timestamp_value is NULL
|
||||
Total Rows Retrieved: 2
|
||||
Total Result sets: 1
|
||||
Call ExecuteReader with a SQL Command.
|
||||
(Not INSERT,UPDATE,DELETE
|
||||
).
|
||||
Result is from a SQL Command not (INSERT,UPDATE,DELETE).
|
||||
Records Affected: -1
|
||||
Total Result sets: 0
|
||||
Call ExecuteReader with a SQL Command.
|
||||
(Is INSERT,UPDATE,DELETE)
|
||||
.
|
||||
Result is from a SQL Command (INSERT,UPDATE,DELETE). Records Affected: 1
|
||||
Total Result sets: 0
|
||||
Calling stored procedure version()
|
||||
Result: PostgreSQL 7.2.1 on i686-pc-cygwin, compiled by GCC 2.95.3-5
|
||||
Database Server Version: PostgreSQL 7.2.1 on i686-pc-cygwin,
|
||||
compiled by GCC 2.9
|
||||
5.3-5
|
||||
Clean up...
|
||||
Drop table...
|
||||
OK
|
||||
RESULT: 0
|
||||
|
||||
<ul>
|
||||
<li>Have a working mono and mcs</li>
|
||||
|
||||
<li>Get <a href="http://gborg.postgresql.org/project/npgsql/projdisplay.php">Npgsql</a>
|
||||
and make sure the binary assembly Npgsql.dll is installed in the same place that the
|
||||
mono class libraries are located.
|
||||
|
||||
<li>Read the Testing notes for Mono.Data.PostgreSqlClient too
|
||||
|
||||
<li>C# Example for Npgsql:
|
||||
<pre>
|
||||
using System;
|
||||
using System.Data;
|
||||
using Npgsql;
|
||||
|
||||
public class Test
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
string connectionString =
|
||||
"Server=localhost;" +
|
||||
"Database=test;" +
|
||||
"User ID=postgres;" +
|
||||
"Password=fun2db;";
|
||||
IDbConnection dbcon;
|
||||
dbcon.Open();
|
||||
dbcon = new NpgsqlConnection(connectionString);
|
||||
IDbCommand dbcmd = dbcon.CreateCommand();
|
||||
// requires a table to be created named employee
|
||||
// with columns firstname and lastname
|
||||
// such as,
|
||||
// CREATE TABLE employee (
|
||||
// firstname varchar(32),
|
||||
// lastname varchar(32));
|
||||
string sql =
|
||||
"SELECT firstname, lastname " +
|
||||
"FROM employee";
|
||||
dbcmd.CommandText = sql;
|
||||
IDataReader reader = dbcmd.ExecuteReader();
|
||||
while(reader.Read()) {
|
||||
string FirstName = reader["firstname"];
|
||||
string LastName = reader["lastname"];
|
||||
Console.WriteLine("Name: " +
|
||||
FirstName + " " + LastName);
|
||||
}
|
||||
// clean up
|
||||
reader.Close();
|
||||
reader = null;
|
||||
dbcmd.Dispose();
|
||||
dbcmd = null;
|
||||
dbcon.Close();
|
||||
dbcon = null;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</li>
|
||||
<li>Building C# Example:
|
||||
<ul>
|
||||
<li>Save the example to a file, such as, TestExample.cs</li>
|
||||
<li>Build on Linux:
|
||||
<pre>
|
||||
mcs TestExample.cs -r System.Data.dll \
|
||||
-r Npgsql.dll
|
||||
</pre>
|
||||
</li>
|
||||
<li>Build on Windows via Cygwin:
|
||||
<pre>
|
||||
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
|
||||
TestExample.cs \
|
||||
-lib:C:/cygwin/home/MyHome/mono/install/lib \
|
||||
-r System.Data.dll -r Npgsql.dll
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Running the Example:
|
||||
<pre>
|
||||
mono TestExample.exe
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
* Action Plan
|
||||
|
||||
<p>Eventually replace the PostgreSQL data provider in Mono
|
||||
with <a href="http://gborg.postgresql.org/project/npgsql/projdisplay.php">Npgsql</a>.
|
||||
Npgsql is a .Net Data Provider for PostgreSQL which implements
|
||||
the <a href="http://developer.postgresql.org/docs/postgres/protocol.html">PostgreSQL Frontend/Backend Protocol</a>.
|
||||
Npgsql is implemented in 100% C#. This provider was created by Francisco Figueiredo jr.
|
||||
and has many programmers developing the provider.
|
||||
@@ -1,156 +0,0 @@
|
||||
* Provider Factory
|
||||
|
||||
<p>Brian Ritchie contributed a Provider Factory and Data Tools for Mono ADO.NET<br>
|
||||
which gives us a foundation for abstract data provider access within Mono
|
||||
|
||||
** Here are the deails:
|
||||
|
||||
<ul>
|
||||
<li>The Provider information is seperate from the connection string information.<br>
|
||||
This allows the list of providers to be stored in the machine.config file.</li>
|
||||
<li>Provider and ProviderCollection objects are available to access <br>
|
||||
the list of providers and modify them at runtime.</li>
|
||||
<li>The ProviderFactory object is used to create new connections, commands,<br>
|
||||
dataadapters, parameters, etc.</li>
|
||||
</ul>
|
||||
|
||||
** Overview of the ProviderFactory object model:
|
||||
|
||||
<ul>
|
||||
<li><b>ProviderFactory</b>: used to create new Connections, Commands,<br>
|
||||
DataAdapters, or Commands. All objects are returned using <br>
|
||||
the provider interfaces such as IDbConnection, IDbCommand,<br>
|
||||
IDbDataAdapter, or IDataParamter</li>
|
||||
|
||||
<li><b>DataTools</b>: static methods for doing <br>
|
||||
common tasks like filling a DataSet <br>
|
||||
with the contents of a select statement.</li>
|
||||
|
||||
<li><b>ProviderCollection</b>: list of providers configured <br>
|
||||
in the system. Initially loaded from app.config, but can <br>
|
||||
be modified at run-time.</li>
|
||||
|
||||
<li><b>Provider</b>: represents a given provider (factory) <br>
|
||||
and holds information needed to <br>
|
||||
create the types.</li>
|
||||
|
||||
<li><b>ProviderSectionHandler</b>: works behind the <br>
|
||||
scenes to load the list of <br>
|
||||
providers from the app.config into a ProviderCollection.</li>
|
||||
</ul>
|
||||
|
||||
** C# source code samples for creating a connection:
|
||||
|
||||
<pre>
|
||||
// Create connection using enhanced connection string
|
||||
// The factory attribute specifies which provider
|
||||
// to use. The factory attribute is parsed out, the
|
||||
// object is created, and then the rest of the
|
||||
// connection string is passed into the provider. The
|
||||
// providers are defined in
|
||||
// the app.config (or machine.config).
|
||||
IDbConnection conn;
|
||||
string connectionString =
|
||||
"factory=System.Data.SqlClient;" +
|
||||
"server=speedy;database=pubs;uid=sa";
|
||||
conn = ProviderFactory.CreateConnection(connectionString);
|
||||
|
||||
// Create connection specifying provider
|
||||
// and standard connection string
|
||||
IDbConnection conn;
|
||||
string provider = "System.Data.SqlClient";
|
||||
string connectionString = "server=speedy;database=pubs;uid=sa";
|
||||
conn = ProviderFactory.CreateConnection(provider,connectionString);
|
||||
|
||||
// Create connection using connection string stored
|
||||
// in app.config under <appSettings>
|
||||
IDbConnection conn;
|
||||
string appSetting = "PubsConnStr";
|
||||
conn = ProviderFactory.CreateConnectionFromConfig(appSetting);
|
||||
</pre>
|
||||
|
||||
|
||||
<p>C# Sample for Creating a DataAdapter and filling a DataSet.
|
||||
|
||||
<pre>
|
||||
// Create Connection
|
||||
IDbConnection conn =
|
||||
ProviderFactory.CreateConnectionFromConfig("PubsConnStr");
|
||||
|
||||
// Select command
|
||||
IDbCommand cmd=conn.CreateCommand();
|
||||
cmd.Text="select * from author";
|
||||
|
||||
// Data Adapter
|
||||
DataSet ds=new DataSet();
|
||||
IDbDataAdapter adapter=ProviderFactory.CreateDataAdapter(cmd);
|
||||
adapter.Fill(ds, "Table1");
|
||||
</pre>
|
||||
|
||||
<p>Creating a DataAdapter and filling a DataSet. <br>
|
||||
The super lazy method for people like me.
|
||||
<pre>
|
||||
// Create Connection
|
||||
IDbConnection conn =
|
||||
ProviderFactory.CreateConnectionFromConfig("TdsPubsConnStr");
|
||||
|
||||
// Data Adapter
|
||||
DataSet ds=DataTools.FillDataSet(conn, "select * from author");
|
||||
</pre>
|
||||
|
||||
|
||||
<p>Here's some sample code on displaying a list <br>
|
||||
of configured ADO.NET providers:
|
||||
<pre>
|
||||
Console.WriteLine("Configured Providers:");
|
||||
foreach (Provider p in ProviderFactory.Providers)
|
||||
Console.WriteLine(p.Description);
|
||||
</pre>
|
||||
|
||||
<p>A Super lazy overload to the FillDataSet method (in <br>
|
||||
DataTools.cs) that will fill a dataset in one line of code.
|
||||
|
||||
<pre>
|
||||
DataSet ds=DataTools.FillDataSet("PubsConnStr", "select * from authors");
|
||||
</pre>
|
||||
|
||||
** About Configuration Files
|
||||
|
||||
<p>Information about <a href="http://msdn.microsoft.com/library/en-us/vbcon/html/vboriintroductiontoapplicationsettingstorage.asp?frame=true">app.config</a> files
|
||||
can be found at <a href="http://msdn.microsoft.com/">MSDN</a>.
|
||||
|
||||
<p>See the mcs/class/Mono.Data/app.config for sample configuration file in<br>
|
||||
mcs source. Basically, if your application is named blah.exe, <br>
|
||||
you would create an app.config file named blah.exe.config
|
||||
|
||||
<p>Here's a sample app.config file showing the provider <br>
|
||||
declarations along with sample connection strings:
|
||||
|
||||
<pre>
|
||||
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="mono.data">
|
||||
<section name="providers" type="Mono.Data.ProviderSectionHandler,Mono.Data" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<appSettings>
|
||||
<add key="PubsConnStr" value="factory=System.Data.SqlClient;server=speedy;database=pubs;uid=sa;pwd=" />
|
||||
</appSettings>
|
||||
<mono.data>
|
||||
<providers>
|
||||
<provider name="System.Data.SqlClient" connection="System.Data.SqlClient.SqlConnection" adapter="System.Data.SqlClient.SqlDataAdapter" assembly="System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
||||
<provider name="System.Data.OleDb" connection="System.Data.OleDb.OleDbConnection" adapter="System.Data.OleDb.OleDbDataAdapter" assembly="System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
||||
<provider name="System.Data.Odbc" connection="System.Data.Odbc.OdbcConnection" adapter="System.Data.OleDb.OdbcDataAdapter" assembly="System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
||||
<provider name="Mono.Data.TdsClient" connection="Mono.Data.TdsClient.TdsConnection" adapter="Mono.Data.TdsClient.TdsDataAdapter" assembly="Mono.Data.TdsClient" />
|
||||
<provider name="Mono.Data.MySql" connection="Mono.Data.MySql.MySqlConnection" adapter="Mono.Data.MySql.MySqlDataAdapter" assembly="Mono.Data.MySql" />
|
||||
<provider name="Mono.Data.PostgreSqlClient" connection="Mono.Data.PostgreSqlClient.PgSqlConnection" adapter="Mono.Data.PostgreSqlClient.PgSqlDataAdapter" assembly="Mono.Data.PostgreSqlClient" />
|
||||
<provider name="Mono.Data.SqliteClient" connection="Mono.Data.SqliteClient.SqliteConnection" adapter="Mono.Data.SqliteClient.SqliteDataAdapter" assembly="Mono.Data.SqliteClient" />
|
||||
<provider name="Mono.Data.SybaseClient" connection="Mono.Data.SybaseClient.SybaseConnection" adapter="Mono.Data.SybaseClient.SybaseDataAdapter" assembly="Mono.Data.SybaseClient" />
|
||||
</providers>
|
||||
</mono.data>
|
||||
</configuration>
|
||||
|
||||
</pre>
|
||||
|
||||
+23
-51
@@ -11,13 +11,9 @@
|
||||
|
||||
The <a href="http://msdn.microsoft.com/net">Microsoft.NET site.</a>
|
||||
|
||||
The Microsoft .NET Framework 1.0 can be downloaded <a
|
||||
href="http://msdn.microsoft.com/downloads/default.asp?url=/downloads/sample.asp?url=/msdn-files/027/000/976/msdncompositedoc.xml&frame=true">here</a>
|
||||
The Microsoft .NET Framework 1.0 can be downloaded <a href="http://msdn.microsoft.com/downloads/default.asp?url=/downloads/sample.asp?url=/msdn-files/027/000/976/msdncompositedoc.xml&frame=true">here</a>
|
||||
|
||||
New methods that are not documented in 1.0, are documented <a
|
||||
href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/framewrkaddend.asp">here</a>
|
||||
|
||||
The changes between .NET 1.0 and .NET 1.1 are available <a href="http://www.csharphelp.com/archives2/archive406.html">here</a>
|
||||
New methods that are not documented in 1.0, are documented <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/framewrkaddend.asp">here</a>
|
||||
|
||||
** IRC
|
||||
|
||||
@@ -28,7 +24,7 @@
|
||||
|
||||
The Mono Tutorial:
|
||||
|
||||
<a href="http://http://go-mono.com/gnometutorial/">GNOME.NET Tutorial</a>
|
||||
<a href="http://mwh.sysrq.dk/the_mono_tutorial/">Mono Tutorial</a>
|
||||
|
||||
and other useful tutorials (Gtk#, Glade#, Embeded, etc) (in Spanish) at
|
||||
|
||||
@@ -57,14 +53,6 @@
|
||||
href="http://www.foundstone.com/pdf/dotnet-security-framework.pdf">.NET
|
||||
security architecture</a>.
|
||||
|
||||
** Development Tools
|
||||
|
||||
A tool to compare two assemblies:
|
||||
|
||||
<ul>
|
||||
<li><a href="http://www.gotdotnet.com/userarea/keywordsrch.aspx?keyword=winchurn">http://www.gotdotnet.com/userarea/keywordsrch.aspx?keyword=winchurn</a>
|
||||
</ul>
|
||||
|
||||
** Presentations
|
||||
|
||||
Currently the <a href="Presentations/O-Reilly">O'Reilly</a>
|
||||
@@ -123,53 +111,31 @@
|
||||
|
||||
There are a number of related projects to Mono:
|
||||
|
||||
<li><b>Development tools</b></li>
|
||||
<ul>
|
||||
* <a
|
||||
href="http://www.icsharpcode.net/OpenSource/SD/default.asp">Sharp
|
||||
Develop:</a> an IDE for the C# language written in C#.
|
||||
|
||||
* <a href="http://nunit.sourceforge.net">NUnit:</a> A
|
||||
testing framework for .NET classes.
|
||||
|
||||
* <a
|
||||
href="http://xmarks.sourceforge.net/doc.html">XMarks DOC.NET:</a> For
|
||||
creating online documentation you can browse for your own classes.
|
||||
|
||||
</ul>
|
||||
|
||||
<li><b>Class Libraries</b></li>
|
||||
<ul>
|
||||
* <a href="http://9mm.com/~ogl/sdldotnet/">SDL for
|
||||
.NET:</a> Bindings for the popular SDL graphics library.
|
||||
|
||||
|
||||
* C# bindings for OpenGL and SDL are available here: <a
|
||||
href="http://csgl.sourceforge.net">http://csgl.sourceforge.net</a>
|
||||
|
||||
|
||||
* <a
|
||||
href="http://qtcsharp.sourceforge.net">Qt#:</a>
|
||||
C# bindings for the Qt toolkit.
|
||||
|
||||
* <a
|
||||
href="http://codigolivre.org.br/projects/monoqle">Project MonoQLE:</a> a C# Message Queue Server.
|
||||
Sorry only in portuguese, for now.
|
||||
href="http://www.icsharpcode.net/OpenSource/SD/default.asp">Sharp
|
||||
Develop:</a> an IDE for the C# language written in C#.
|
||||
|
||||
</ul>
|
||||
* <a
|
||||
href="http://www.improve-technologies.com/alpha/esharp/">Eclipse
|
||||
Plugin for C#</a>
|
||||
|
||||
<li><b>Programming languages:</b></li>
|
||||
<ul>
|
||||
* <a
|
||||
href="http://janet-js.sourceforge.net/">Janet:</a>
|
||||
an implemention of ECMAScript (the standarized
|
||||
version of JavaScript) in C#
|
||||
</ul>
|
||||
|
||||
<li><b>Other projects</b></li>
|
||||
<ul>
|
||||
* <a
|
||||
href="http://www.improve-technologies.com/alpha/esharp/">Eclipse
|
||||
Plugin for C#</a>
|
||||
href="http://xmarks.sourceforge.net/doc.html">XMarks DOC.NET:</a> For
|
||||
creating online documentation you can browse for your own classes.
|
||||
|
||||
* <a href="http://nunit.sourceforge.net">NUnit:</a> A
|
||||
testing framework for .NET classes.
|
||||
|
||||
* <a href="http://www.kaffe.org">Kaffe:</a> A popular
|
||||
Free Software JIT engine for Java.
|
||||
@@ -177,13 +143,19 @@
|
||||
* <a href="http://www.intel.com/research/mrl/orp">ORP:</a> A research
|
||||
JIT/VM/GC system from Intel.
|
||||
|
||||
* C# bindings for OpenGL and SDL are available here: <a
|
||||
href="http://csgl.sourceforge.net">http://csgl.sourceforge.net</a>
|
||||
|
||||
* <a
|
||||
href="http://www.southern-storm.com.au/portable_net.html">Portable.NET:</a>
|
||||
Another implementation of the CLI and C# compiler.
|
||||
|
||||
* A Free (GFDL) tutorial on C# in Spanish with
|
||||
examples, slides, and extras (under development). Get it <a
|
||||
href="http://geneura.ugr.es/~jaime/csharp/">here</a>.
|
||||
* A Free (GFDL) tutorial on C# in Spanish with examples, slides, and extras (under development). Get it <a href="http://geneura.ugr.es/~jaime/csharp/">here</a>.
|
||||
|
||||
* <a
|
||||
href="http://codigolivre.org.br/projects/monoqle">Project MonoQLE:</a> a C# Message Queue Server.
|
||||
Sorry only in portuguese, for now.
|
||||
|
||||
</ul>
|
||||
|
||||
** GNOME Documentation
|
||||
|
||||
-141
@@ -1,141 +0,0 @@
|
||||
* Screenshots
|
||||
|
||||
** Mono Debugger
|
||||
|
||||
Some shots of the <a href="jit-debug.html">Mono Debugger</a>
|
||||
|
||||
<table border=1>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="images/Screenshot-Debugger-1.png"><img src="images/Screenshot-Debugger-1-thumb.png"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
Debugger showing the source code view.
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="images/Screenshot-Debugger-2.png"><img src="images/Screenshot-Debugger-2-thumb.png"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
Debugger showing the CPU view.
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
** Mono Documentation Browser
|
||||
|
||||
The Mono Documentation Browser is available from <a
|
||||
href="anoncvs.html">CVS</a>, module `monodoc'.
|
||||
|
||||
<table border=1>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="images/Screenshot-B2.png"><img src="images/Screenshot-B2-thumb.png"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
Mono Documentation Browser rendering a method description.
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="images/Screenshot-MethodSummary.png"><img src="images/Screenshot-MethodSummary-thumb.png"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
Mono Documentation Browser rendering the class method summary
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
** Mono Basic
|
||||
|
||||
The Mono Basic compiler ships with the Mono distribution.
|
||||
|
||||
<table border=1>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="images/gtk-vb.png"><img src="images/gtk-vb-thumb.png"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
Mono Basic running a sample Gtk# application.
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
** Platano Media Player
|
||||
|
||||
Alp's <a href="http://www.atoker.com/platano/">Platano</a>
|
||||
Media Player is written with Gtk# (with GStreamer support):
|
||||
|
||||
<table border=1>
|
||||
<tr>
|
||||
<td>
|
||||
<img src="images/platano_s.png"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
Platano startup.
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<img src="images/platano-playing_s.png">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
Platano playing the <a
|
||||
href="http://developer.ximian.com/projects/third_party/codemonkey/index.html">Code
|
||||
Monkey At Work</a> video.
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
** GSIRC
|
||||
|
||||
Alp's <a href="http://www.atoker.com/gsirc/">GSIRC</a>
|
||||
Gtk-Sharp IRC written with Gtk#
|
||||
|
||||
<table border=1>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="http://go-mono.com/images/gsirc-0.2a_overview.jpg"><img src="images/gsirc-0.2a_overview-thumb.jpg"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
GSIRC is shown with the preferences dialog and chatting on some channels (rooms).
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
** SQL# For GTK#
|
||||
|
||||
Daniel Morgan's SQL query tool that runs on Mono on Linux and Windows. It is
|
||||
written in C# and allows you to connect to various Mono ADO.NET providers and
|
||||
enter SQL commands.
|
||||
|
||||
<table border=1>
|
||||
<tr>
|
||||
<td>
|
||||
<img src="http://go-mono.com/images/sqlsharp.png"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
SQL# For GTK# is shown retrieving data from a Microsoft SQL Server 2000 database.
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
** SkyNET
|
||||
|
||||
SkyNET is written in C# and uses GTK# for displaying a star chart.
|
||||
|
||||
<table border=1>
|
||||
<tr>
|
||||
<td>
|
||||
<img src="http://go-mono.com/images/skynet.png"></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
+24
-180
@@ -1,214 +1,58 @@
|
||||
* Microsoft SQL Server Provider
|
||||
|
||||
<ul>
|
||||
<li>ADO.NET Provider for Microsoft SQL Server 7/2000 databases</li>
|
||||
<li>ADO.NET Provider for Microsoft SQL Server 7/2000 databases
|
||||
|
||||
<li>Exists in namespace System.Data.SqlClient and assembly System.Data</li>
|
||||
<li>Exists in namespace System.Data.SqlClient and assembly System.Data
|
||||
|
||||
<li>Created by Tim Coleman</li>
|
||||
<li>Created by Tim Coleman
|
||||
|
||||
<li>Used the <a href="http://www.freetds.org/">FreeTDS</a> and
|
||||
<a href="http://jtds.sourceforge.net/">jTDS</a> projects as resources.</li>
|
||||
<a href="http://jtds.sourceforge.net/">jTDS</a> projects as resources.
|
||||
|
||||
<li>Implemented in 100% C#</li>
|
||||
|
||||
<li>Is similar to the Mono.Data.TdsClient and Mono.Data.SybaseClient providers.</li>
|
||||
|
||||
<li>Requires the assembly Mono.Data.Tds.dll which implements the TDS protocol in 100% C#.</li>
|
||||
|
||||
<li>Uses TDS Protocol Version 7.0</li>
|
||||
|
||||
<li>Bugs with Mono or the data provider should be reported
|
||||
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
|
||||
do not have Bugzilla user account, it is free
|
||||
and easy to
|
||||
create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
|
||||
<li>Implemented in 100% C#
|
||||
|
||||
<li>Is similar to the Mono.Data.TdsClient and Mono.Data.SybaseClient providers.
|
||||
</ul>
|
||||
|
||||
|
||||
** Current Status
|
||||
|
||||
|
||||
* Current Status
|
||||
|
||||
<ul>
|
||||
<li>Able to connect to Microsoft SQL Server 7/2000 databases</li>
|
||||
<li>Able to connect to Microsoft SQL Server 7/2000 databases
|
||||
|
||||
<li>Connection pooling works.</li>
|
||||
<li>Connection pooling works.
|
||||
|
||||
<li>Stored Procedures work</li>
|
||||
<li>Stored Procedures work
|
||||
|
||||
<li>Parameters work.</li>
|
||||
<li>Parameters work.
|
||||
|
||||
<li>Prepare works.</li>
|
||||
<li>Prepare works.
|
||||
|
||||
<li>SQL commands can be executed
|
||||
via ExecuteNonQuery() of a SqlCommand.</li>
|
||||
via ExecuteNonQuery() of a SqlCommand.
|
||||
|
||||
<li>SQL aggregates can be executed and a single row and single column
|
||||
result can be retrieved via ExecuteScalar() of a SqlCommand</li>
|
||||
result can be retrieved via ExecuteScalar() of a SqlCommand
|
||||
|
||||
<li>SQL queries can be executed via ExecuteReader() and results
|
||||
can be retrieved via SqlDataReader.</li>
|
||||
can be retrieved via SqlDataReader.
|
||||
|
||||
<li>a DataTable with schema info about a result can be gotten via GetSchemaTable()
|
||||
in a SqlDataReader</li>
|
||||
in a SqlDataReader
|
||||
|
||||
<li>XML can be read via ExecuteXmlReader in a SqlCommand.</li>
|
||||
<li>XML can be read via ExecuteXmlReader in a SqlCommand.
|
||||
|
||||
<li>Data can be filled in a DataTable in a DataSet via a SqlDataAdapter</li>
|
||||
<li>Data can be filled in a DataTable in a DataSet via a SqlDataAdapter
|
||||
|
||||
<li>Uses TDS Protocol Version 7.0</li>
|
||||
<li>Uses TDS Protocol Version 7.0
|
||||
|
||||
<li><a href="http://www.go-mono.com/tds-providers.html">Design of the Microsoft SQL Server, Sybase, and TDS Providers in Mono</a></li>
|
||||
|
||||
<li>Works in the SQL# command-line and GTK# GUI version</li>
|
||||
<li><a href="http://www.go-mono.com/tds-providers.html">Design of the Microsoft SQL Server, Sybase, and TDS Providers in Mono</a>
|
||||
</ul>
|
||||
|
||||
** Action plan
|
||||
* Action plan
|
||||
|
||||
<ul>
|
||||
<li>Connection timeouts is being developed now</li>
|
||||
|
||||
<li>Needs more testing</li>
|
||||
|
||||
<li>Would like to figure out how to connect via Trusted_Connection or Integrated Security</li>
|
||||
|
||||
<li>Start work on TDS Protocol Version 8.0 support</li>
|
||||
<li>Connection timeouts is being developed now.
|
||||
|
||||
<li>TODO
|
||||
</ul>
|
||||
|
||||
** Testing
|
||||
|
||||
<ul>
|
||||
<li>Have a working mono and mcs installed</li>
|
||||
|
||||
<li>Have access to a Microsoft SQL Server database
|
||||
or either download it:
|
||||
<ul>
|
||||
<li><a href="http://www.microsoft.com/sql/default.asp">Microsoft SQL Server</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>If using Microsoft SQL Server 2000, make sure
|
||||
you are using at least Service Pack 3 for Microsoft SQL Server 2000. If using
|
||||
MSDE 2000, make sure you have the special Service Pack 3 for MSDE 2000.</li>
|
||||
|
||||
<li>For those that only have MSDE installed. You can change the authentication mode
|
||||
from Windows Only Authentication to SQL Server and Windows Authentications (also knows as Mixed-mode authentication)
|
||||
via the <a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;Q322336&sd=tech#4">registry</a></li>. It is
|
||||
the LoginMode you need to change. By default,
|
||||
MSDE is installed with Windows Only Authentication. For SqlClient to work with MSDE, you will
|
||||
need to change the setting.</a>
|
||||
|
||||
<li>If using MSDE, you might need to create a new user with password. Give
|
||||
this user access to various databases in this MSDE instance. Also, for each
|
||||
database, give this new user at least SELECT access to the various tables you want
|
||||
to retrieve data from.</li>
|
||||
|
||||
<li>If you have Enterprise Manager, you can easily change the authentication mode
|
||||
for both MSDE and Microsoft SQL Server. To change the authentication mode in
|
||||
Enterprise Mananger, select the instance, right-click on it, and select properites.
|
||||
The SQL Server properties dialog for that instance will pop up. Choose the Security
|
||||
tab. Change the authentication from Windows Only to SQL Server and Windows. If
|
||||
the instance of your database does not show up in Enterprise Manager, Register first
|
||||
by selecting the Action menu and choosing New SQL Server Registration.</li>
|
||||
|
||||
<li>Located at mcs/class/System.Data/Test is a test for System.Data.SqlClient
|
||||
named SqlTest.cs and you could use this as a basis for your test.</li>
|
||||
|
||||
<li>Mono's SqlClient does not support trusted connections
|
||||
nor integrated security. You can not use this when connecting. You need
|
||||
to explicitly use a User ID and Password
|
||||
authenticated by SQL Server.</li>
|
||||
|
||||
<li>Has a connection string format:
|
||||
<pre>
|
||||
Server=hostname;Database=databaseName;User ID=userid;Password=password
|
||||
</pre>
|
||||
</li>
|
||||
<li>The Server part can be used three ways:
|
||||
|
||||
<table border=1>
|
||||
<tr>
|
||||
<td><b>Server Definition</b></td> <td><b>Example</b></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>hostname</td> <td>Server=MYHOST</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>hostname,port</td> <td>Server=MYHOST,1433</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>hostname\\instance</td> <td>Server=MYHOST\\NETSDK</td>
|
||||
</tr>
|
||||
</table>
|
||||
</li>
|
||||
|
||||
<li>C# Example:
|
||||
<pre>
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
|
||||
public class Test
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
string connectionString =
|
||||
"Server=localhost;" +
|
||||
"Database=pubs;" +
|
||||
"User ID=myuserid;" +
|
||||
"Password=mypassword;";
|
||||
IDbConnection dbcon;
|
||||
dbcon = new SqlConnection(connectionString);
|
||||
dbcon.Open();
|
||||
IDbCommand dbcmd = dbcon.CreateCommand();
|
||||
string sql =
|
||||
"SELECT fname, lname " +
|
||||
"FROM employee";
|
||||
dbcmd.CommandText = sql;
|
||||
IDataReader reader = dbcmd.ExecuteReader();
|
||||
while(reader.Read()) {
|
||||
string FirstName = reader["fname"];
|
||||
string LastName = reader["lname"];
|
||||
Console.WriteLine("Name: " +
|
||||
FirstName + " " + LastName);
|
||||
}
|
||||
// clean up
|
||||
reader.Close();
|
||||
reader = null;
|
||||
dbcmd.Dispose();
|
||||
dbcmd = null;
|
||||
dbcon.Close();
|
||||
dbcon = null;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</li>
|
||||
<li>Building C# Example:
|
||||
<ul>
|
||||
<li>Save the example to a file, such as, TestExample.cs</li>
|
||||
<li>Build on Linux:
|
||||
<pre>
|
||||
mcs TestExample.cs -r System.Data.dll
|
||||
</pre>
|
||||
</li>
|
||||
<li>Build on Windows via Cygwin:
|
||||
<pre>
|
||||
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
|
||||
TestExample.cs -r System.Data.dll
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Running the Example:
|
||||
<pre>
|
||||
mono TestExample.exe
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
+12
-127
@@ -1,143 +1,28 @@
|
||||
* SQL Lite Data Provider
|
||||
|
||||
<ul>
|
||||
<li>ADO.NET Data Provider for
|
||||
the <a href"http://www.hwaci.com/sw/sqlite/">SQL Lite</a> which
|
||||
is an embeddable SQL database engine</li>
|
||||
|
||||
<li>From the SQL Lite web page: SQLite is a C library that
|
||||
implements an embeddable SQL database engine. Programs that link with
|
||||
the SQLite library can have SQL database access without
|
||||
running a separate RDBMS process. The distribution
|
||||
comes with a standalone command-line access program (sqlite) that
|
||||
can be used to administer an SQLite database and which serves
|
||||
as an example of how to use the SQLite library. SQLite is not a client library
|
||||
used to connect to a big database server. SQLite is the server. The SQLite
|
||||
library reads and writes directly to and from the database files on disk.</li>
|
||||
|
||||
<li>SQL Lite can be downloaded
|
||||
from <a href"http://www.hwaci.com/sw/sqlite/download.html">here</a>.
|
||||
binaries exist for Linux and Windows. sqlite.dll on Windows
|
||||
and sqlite.so on Linux. The source code is available too.</li>
|
||||
|
||||
<li>Exists in namespace and assembly Mono.Data.SqliteClient</li>
|
||||
<li>Exists in namespace and assembly Mono.Data.SqliteClient
|
||||
|
||||
<li>Created by Vladimir Vukicevic so he could have a database of
|
||||
thumbnail images for mPhoto. mPhoto is GUI application
|
||||
for cataloging images. mPhoto runs on Mono
|
||||
and uses <a href="http:www.go-mono.com/gtk-sharp.html">GTK#</a> for its GUI.</li>
|
||||
|
||||
<li>Bugs with Mono or the data provider should be reported
|
||||
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
|
||||
do not have Bugzilla user account, it is free
|
||||
and easy to
|
||||
create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
|
||||
|
||||
<li>Created by Vladimir Vukicevic
|
||||
|
||||
<li><a href"http://www.hwaci.com/sw/sqlite/download.html">SQL Lite</a>
|
||||
binaries exist for Linux and Windows. sqlite.dll on Windows
|
||||
and sqlite.so on Linux.
|
||||
</ul>
|
||||
|
||||
** Current Status
|
||||
* Current Status
|
||||
|
||||
<ul>
|
||||
<li>Able to connect, execute commands, and retrieve data...</li>
|
||||
<li>Able to connect, execute commands, and retrieve data...
|
||||
|
||||
<li>Works in mPhoto by providing access to a SQL Lite database to store images.</li>
|
||||
<li>Works in mPhoto
|
||||
</ul>
|
||||
|
||||
** Action Plan
|
||||
* Action Plan
|
||||
|
||||
<ul>
|
||||
<li>Create a DataAdapter for SQL Lite named SqliteDataAdapter that can be used to
|
||||
Fill a DataTable in a DataSet</li>
|
||||
Fill a DataTable in a DataSet
|
||||
|
||||
<li>Get the method GetSchemaTable() in class SqliteDataReader to return a DataTable
|
||||
that works</li>
|
||||
<li>TODO
|
||||
</ul>
|
||||
|
||||
** Testing
|
||||
|
||||
<ul>
|
||||
<li>Have a working mcs and mono</li>
|
||||
|
||||
<li>Make sure Mono.Data.SqliteClient.dll was built and is installed
|
||||
in the same place as the mono class libraries.</li>
|
||||
|
||||
<li>If you do not have <a href"http://www.hwaci.com/sw/sqlite/download.html">SQL Lite</a>,
|
||||
download it. There are binaries for Windows and Linux.</li>
|
||||
|
||||
<li>There is a test named SqliteTest.cs found at mcs/class/Mono.Data.SqliteTest/Test</li>
|
||||
|
||||
<li>Has a connection string format of "URI=file:some/path". For example,
|
||||
the connection string "URI=file:SqliteTest.db" will use the database file
|
||||
named SqliteTest.db, if it does not exist, the file will be created.</li>
|
||||
|
||||
<li>C# Example:
|
||||
<pre>
|
||||
using System;
|
||||
using System.Data;
|
||||
using Mono.Data.SqliteClient;
|
||||
|
||||
public class Test
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
string connectionString = "URI=file:SqliteTest.db";
|
||||
IDbConnection dbcon;
|
||||
dbcon = new MySQLConnection(connectionString);
|
||||
dbcon.Open();
|
||||
IDbCommand dbcmd = dbcon.CreateCommand();
|
||||
// requires a table to be created named employee
|
||||
// with columns firstname and lastname
|
||||
// such as,
|
||||
// CREATE TABLE employee (
|
||||
// firstname varchar(32),
|
||||
// lastname varchar(32));
|
||||
string sql =
|
||||
"SELECT firstname, lastname " +
|
||||
"FROM employee";
|
||||
dbcmd.CommandText = sql;
|
||||
IDataReader reader = dbcmd.ExecuteReader();
|
||||
while(reader.Read()) {
|
||||
string FirstName = reader[0];
|
||||
string LastName = reader[1];
|
||||
Console.WriteLine("Name: " +
|
||||
FirstName + " " + LastName);
|
||||
}
|
||||
// clean up
|
||||
reader.Close();
|
||||
reader = null;
|
||||
dbcmd.Dispose();
|
||||
dbcmd = null;
|
||||
dbcon.Close();
|
||||
dbcon = null;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</li>
|
||||
<li>Building C# Example:
|
||||
<ul>
|
||||
<li>Save the example to a file, such as, TestExample.cs</li>
|
||||
<li>Build on Linux:
|
||||
<pre>
|
||||
mcs TestExample.cs -r System.Data.dll \
|
||||
-r Mono.Data.SqliteClient.dll
|
||||
</pre>
|
||||
</li>
|
||||
<li>Build on Windows via Cygwin:
|
||||
<pre>
|
||||
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
|
||||
TestExample.cs \
|
||||
-lib:C:/cygwin/home/MyHome/mono/install/lib \
|
||||
-r System.Data.dll \
|
||||
-r Mono.Data.SqliteClient.dll
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Running the Example:
|
||||
<pre>
|
||||
mono TestExample.exe
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
+17
-124
@@ -1,155 +1,48 @@
|
||||
* Sybase Data Provider
|
||||
|
||||
<ul>
|
||||
<li>ADO.NET Provider for Sybase SQL Server databases</li>
|
||||
<li>ADO.NET Provider for Sybase SQL Server databases
|
||||
|
||||
<li>Exists in namespace Mono.Data.SybaseClient and assembly Mono.Data.SybaseClient</li>
|
||||
<li>Exists in namespace Mono.Data.SybaseClient and assembly Mono.Data.SybaseClient
|
||||
|
||||
<li>Created by Tim Coleman</li>
|
||||
<li>Created by Tim Coleman
|
||||
|
||||
<li>Used the <a href="http://www.freetds.org/">FreeTDS</a> and
|
||||
<a href="http://jtds.sourceforge.net/">jTDS</a> projects as resources.</li>
|
||||
<a href="http://jtds.sourceforge.net/">jTDS</a> projects as resources.
|
||||
|
||||
<li>Implemented in 100% C#</li>
|
||||
<li>Implemented in 100% C#
|
||||
|
||||
<li>Is similar to the Mono.Data.TdsClient and System.Data.SqlClient providers.</li>
|
||||
<li>Is similar to the Mono.Data.TdsClient and System.Data.SqlClient providers.
|
||||
|
||||
<li>Requires the assembly Mono.Data.Tds.dll which implements the TDS protocol in 100% C#.</li>
|
||||
<li>Uses TDS Protocol Version 5.0
|
||||
|
||||
<li>Uses TDS Protocol Version 5.0</li>
|
||||
|
||||
<li>Does not support trusted connections</li>
|
||||
|
||||
<li>Bugs with Mono or the data provider should be reported
|
||||
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
|
||||
do not have Bugzilla user account, it is free
|
||||
and easy to
|
||||
create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
|
||||
|
||||
|
||||
<li><a href="http://www.go-mono.com/tds-providers.html">Design of the Microsoft SQL Server, Sybase, and TDS Providers in Mono</a>
|
||||
</ul>
|
||||
|
||||
** Current Status
|
||||
* Current Status
|
||||
|
||||
<ul>
|
||||
<li>Able to connect to Sybase databases</li>
|
||||
<li>Able to connect to Sybase databases
|
||||
|
||||
<li>SQL commands can be executed
|
||||
via ExecuteNonQuery() of a SybaseCommand.</li>
|
||||
via ExecuteNonQuery() of a SybaseCommand.
|
||||
|
||||
<li>SQL aggregates can be executed and a single row and single column
|
||||
result can be retrieved via ExecuteScalar() of a SybaseCommand</li>
|
||||
result can be retrieved via ExecuteScalar() of a SybaseCommand
|
||||
|
||||
<li>SQL queries can be executed via ExecuteReader() and results
|
||||
can be retrieved via SybaseDataReader.</li>
|
||||
can be retrieved via SybaseDataReader.
|
||||
|
||||
<li>a DataTable with schema info about a result can be gotten via GetSchemaTable()
|
||||
in a SybaseDataReader</li>
|
||||
in a SybaseDataReader
|
||||
|
||||
<li>Data can be filled in a DataTable in a DataSet via a SybaseDataAdapter</li>
|
||||
<li>Data can be filled in a DataTable in a DataSet via a SybaseDataAdapter
|
||||
</ul>
|
||||
|
||||
** Action plan
|
||||
* Action plan
|
||||
|
||||
<ul>
|
||||
<li>Connection timeouts is being developed now.
|
||||
|
||||
<li>Needs more testing...
|
||||
|
||||
<li>TODO
|
||||
</ul>
|
||||
|
||||
** Testing
|
||||
|
||||
<ul>
|
||||
<li>Have a working mono and mcs installed</li>
|
||||
|
||||
<li>Have access to a Sybase database
|
||||
or either download it:
|
||||
<ul>
|
||||
<li><a href="http://www.sybase.com/downloads">Sybase</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>Located at mcs/class/System.Data/Test is a test for System.Data.SqlClient
|
||||
named SqlTest.cs and you could use this as a basis for your test.</li>
|
||||
|
||||
<li>Has a connection string format:
|
||||
<pre>
|
||||
Server=hostname;Database=databaseName;User ID=userid;Password=password
|
||||
</pre>
|
||||
</li>
|
||||
<li>The Server part can be used two ways:
|
||||
<ul>
|
||||
<li>hostname - "Server=MYHOST"</li>
|
||||
<li>hostname,port - "Server=MYHOST,1533"</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>C# Example:
|
||||
<pre>
|
||||
using System;
|
||||
using System.Data;
|
||||
using Mono.Data.SybaseClient;
|
||||
|
||||
public class Test
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
string connectionString =
|
||||
"Server=localhost;" +
|
||||
"Database=pubs;" +
|
||||
"User ID=myuserid;" +
|
||||
"Password=mypassword;";
|
||||
IDbConnection dbcon;
|
||||
dbcon = new SybaseConnection(connectionString);
|
||||
dbcon.Open();
|
||||
IDbCommand dbcmd = dbcon.CreateCommand();
|
||||
string sql =
|
||||
"SELECT fname, lname " +
|
||||
"FROM employee";
|
||||
dbcmd.CommandText = sql;
|
||||
IDataReader reader = dbcmd.ExecuteReader();
|
||||
while(reader.Read()) {
|
||||
string FirstName = reader["fname"];
|
||||
string LastName = reader["lname"];
|
||||
Console.WriteLine("Name: " +
|
||||
FirstName + " " + LastName);
|
||||
}
|
||||
// clean up
|
||||
reader.Close();
|
||||
reader = null;
|
||||
dbcmd.Dispose();
|
||||
dbcmd = null;
|
||||
dbcon.Close();
|
||||
dbcon = null;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</li>
|
||||
<li>Building C# Example:
|
||||
<ul>
|
||||
<li>Save the example to a file, such as, TestExample.cs</li>
|
||||
<li>Build on Linux:
|
||||
<pre>
|
||||
mcs TestExample.cs -r System.Data.dll \
|
||||
-r Mono.Data.SybaseClient.dll
|
||||
</pre>
|
||||
</li>
|
||||
<li>Build on Windows via Cygwin:
|
||||
<pre>
|
||||
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
|
||||
TestExample.cs \
|
||||
-lib:C:/cygwin/home/MyHome/mono/install/lib \
|
||||
-r System.Data.dll -r Mono.Data.SybaseClient.dll
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Running the Example:
|
||||
<pre>
|
||||
mono TestExample.exe
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
+19
-127
@@ -1,159 +1,51 @@
|
||||
* TDS Generic Provider
|
||||
|
||||
<ul>
|
||||
<li>ADO.NET Provider for older Sybase and Microsoft SQL Server databases</li>
|
||||
<li>ADO.NET Provider for older Sybase and Microsoft SQL Server databases
|
||||
|
||||
<li>Exists in namespace Mono.Data.TdsClient and assembly Mono.Data.TdsClient</li>
|
||||
<li>Exists in namespace Mono.Data.TdsClient and assembly Mono.Data.TdsClient
|
||||
|
||||
<li>Created by Tim Coleman</li>
|
||||
<li>Created by Tim Coleman
|
||||
|
||||
<li>Used the <a href="http://www.freetds.org/">FreeTDS</a> and
|
||||
<a href="http://jtds.sourceforge.net/">jTDS</a> projects as resources.</li>
|
||||
<a href="http://jtds.sourceforge.net/">jTDS</a> projects as resources.
|
||||
|
||||
<li>Implemented in 100% C#</li>
|
||||
<li>Implemented in 100% C#
|
||||
|
||||
<li>Is similar to the Mono.Data.SybaseClient and System.Data.SqlClient providers.</li>
|
||||
<li>Is similar to the Mono.Data.SybaseClient and System.Data.SqlClient providers.
|
||||
|
||||
<li>Requires the assembly Mono.Data.Tds.dll which implements the TDS protocol in 100% C#.</li>
|
||||
<li>Uses TDS Protocol Version 4.2 by default
|
||||
|
||||
<li>Uses TDS Protocol Version 4.2 by default</li>
|
||||
|
||||
<li>Does not support trusted connections</li>
|
||||
|
||||
<li>Bugs with Mono or the data provider should be reported
|
||||
in Mono's Bugzilla <a href="http://bugzilla.ximian.com/">here</a>. If you
|
||||
do not have Bugzilla user account, it is free
|
||||
and easy to
|
||||
create one <a href="http://bugzilla.ximian.com/createaccount.cgi">here</a>.</li>
|
||||
|
||||
<li><a href="http://www.go-mono.com/tds-providers.html">Design of the Microsoft SQL Server, Sybase, and TDS Providers in Mono</a>
|
||||
</ul>
|
||||
|
||||
** Current Status
|
||||
|
||||
* Current Status
|
||||
|
||||
<ul>
|
||||
<li>Only builds on Windows currently due to mcs does not support modules and mcs
|
||||
has problems with code that is internal.</li>
|
||||
has problems with code that is internal.
|
||||
|
||||
<li>Able to connect to Microsoft SQL Server and Sybase databases</li>
|
||||
<li>Able to connect to Microsoft SQL Server and Sybase databases
|
||||
|
||||
<li>SQL commands can be executed
|
||||
via ExecuteNonQuery() of a TdsCommand.</li>
|
||||
via ExecuteNonQuery() of a TdsCommand.
|
||||
|
||||
<li>SQL aggregates can be executed and a single row and single column
|
||||
result can be retrieved via ExecuteScalar() of a TdsCommand</li>
|
||||
result can be retrieved via ExecuteScalar() of a TdsCommand
|
||||
|
||||
<li>SQL queries can be executed via ExecuteReader() and results
|
||||
can be retrieved via TdsDataReader.</li>
|
||||
can be retrieved via TdsDataReader.
|
||||
|
||||
<li>a DataTable with schema info about a result can be gotten via GetSchemaTable()
|
||||
in a TdsDataReader</li>
|
||||
in a TdsDataReader
|
||||
|
||||
<li>Data can be filled in a DataTable in a DataSet via a TdsDataAdapter</li>
|
||||
<li>Data can be filled in a DataTable in a DataSet via a TdsDataAdapter
|
||||
</ul>
|
||||
|
||||
** Action plan
|
||||
* Action plan
|
||||
|
||||
<ul>
|
||||
<li>Connection timeouts is being developed now.</li>
|
||||
<li>Connection timeouts is being developed now.
|
||||
|
||||
<li>TODO</li>
|
||||
<li>TODO
|
||||
</ul>
|
||||
|
||||
** Testing
|
||||
|
||||
<ul>
|
||||
<li>Have a working mono and mcs installed</li>
|
||||
|
||||
<li>Have access to a Sybase or Microsoft SQL Server database
|
||||
or either download it:
|
||||
<ul>
|
||||
<li><a href="http://www.microsoft.com/sql/default.asp">Microsoft SQL Server</a></li>
|
||||
<li><a href="http://www.sybase.com/downloads">Sybase</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>If using Microsoft SQL Server 2000, make sure
|
||||
you are using at least Service Pack 3 for Microsoft SQL Server 2000</li>
|
||||
|
||||
<li>Located at mcs/class/System.Data/Test is a test for System.Data.SqlClient
|
||||
named SqlTest.cs and you could use this as a basis for your test.</li>
|
||||
|
||||
<li>Has a connection string format:
|
||||
<pre>
|
||||
Server=hostname;Database=databaseName;User ID=userid;Password=password
|
||||
</pre>
|
||||
</li>
|
||||
<li>The Server part can be used two ways:
|
||||
<ul>
|
||||
<li>hostname - "Server=MYHOST"</li>
|
||||
<li>hostname,port - "Server=MYHOST,1533"</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>C# Example:
|
||||
<pre>
|
||||
using System;
|
||||
using System.Data;
|
||||
using Mono.Data.TdsClient;
|
||||
|
||||
public class Test
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
string connectionString =
|
||||
"Server=localhost;" +
|
||||
"Database=pubs;" +
|
||||
"User ID=myuserid;" +
|
||||
"Password=mypassword;";
|
||||
IDbConnection dbcon;
|
||||
dbcon = new TdsConnection(connectionString);
|
||||
dbcon.Open();
|
||||
IDbCommand dbcmd = dbcon.CreateCommand();
|
||||
string sql =
|
||||
"SELECT fname, lname " +
|
||||
"FROM employee";
|
||||
dbcmd.CommandText = sql;
|
||||
IDataReader reader = dbcmd.ExecuteReader();
|
||||
while(reader.Read()) {
|
||||
string FirstName = reader["fname"];
|
||||
string LastName = reader["lname"];
|
||||
Console.WriteLine("Name: " +
|
||||
FirstName + " " + LastName);
|
||||
}
|
||||
// clean up
|
||||
reader.Close();
|
||||
reader = null;
|
||||
dbcmd.Dispose();
|
||||
dbcmd = null;
|
||||
dbcon.Close();
|
||||
dbcon = null;
|
||||
}
|
||||
}
|
||||
</pre>
|
||||
</li>
|
||||
<li>Building C# Example:
|
||||
<ul>
|
||||
<li>Save the example to a file, such as, TestExample.cs</li>
|
||||
<li>Build on Linux:
|
||||
<pre>
|
||||
mcs TestExample.cs -r System.Data.dll \
|
||||
-r Mono.Data.TdsClient.dll
|
||||
</pre>
|
||||
</li>
|
||||
<li>Build on Windows via Cygwin:
|
||||
<pre>
|
||||
mono C:/cygwin/home/MyHome/mono/install/bin/mcs.exe \
|
||||
TestExample.cs \
|
||||
-lib:C:/cygwin/home/MyHome/mono/install/lib \
|
||||
-r System.Data.dll -r Mono.Data.TdsClient.dll
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Running the Example:
|
||||
<pre>
|
||||
mono TestExample.exe
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
+27
-36
@@ -1,17 +1,26 @@
|
||||
0,Home,index.html,index.src
|
||||
1,FAQ,faq.html,faq.src
|
||||
1,News archive,http://monoevo.sf.net/mwn/archives.html
|
||||
1,Screenshots,screenshots.html,screenshots.src
|
||||
1,Other sites,other.html,other.src
|
||||
0,Mono,rationale.html,rationale.src
|
||||
1,Runtime,runtime.html,runtime.src
|
||||
2,Embedding,embedded-api.html,embedded-api.src
|
||||
1,Classes,class-library.html,class-library.src
|
||||
1,Gtk#,gtk-sharp.html,gtk-sharp.src
|
||||
1,Gtk#,http://gtk-sharp.sourceforge.net
|
||||
1,ASP.NET,asp-net.html,asp-net.src
|
||||
1,ADO.NET,ado-net.html,ado-net.src
|
||||
1,Class Status,class-status.html,class-status.src,cm/cormissing.css,cm/cormissing.js
|
||||
2,corlib,class-status-corlib.html,class-status-corlib.src,cm/cormissing.css,cm/cormissing.js
|
||||
2,System,class-status-System.html,class-status-System.src,cm/cormissing.css,cm/cormissing.js
|
||||
2,Xml,class-status-System.Xml.html,class-status-System.Xml.src,cm/cormissing.css,cm/cormissing.js
|
||||
2,Data,class-status-System.Data.html,class-status-System.Data.src,cm/cormissing.css,cm/cormissing.js
|
||||
2,Drawing,class-status-System.Drawing.html,class-status-System.Drawing.src,cm/cormissing.css,cm/cormissing.js
|
||||
2,Web,class-status-System.Web.html,class-status-System.Web.src,cm/cormissing.css,cm/cormissing.js
|
||||
2,Web.Services,class-status-System.Web.Services.html,class-status-System.Web.Services.src,cm/cormissing.css,cm/cormissing.js
|
||||
2,Microsoft.VisualBasic,class-status-Microsoft.VisualBasic.html,class-status-Microsoft.VisualBasic.src,cm/cormissing.css,cm/cormissing.js
|
||||
2,Windows.Forms,class-status-System.Windows.Forms.html,class-status-System.Windows.Forms.src,cm/cormissing.css,cm/cormissing.js
|
||||
2,EnterpriseServices,class-status-System.EnterpriseServices.html,class-status-System.EnterpriseServices.src,cm/cormissing.css,cm/cormissing.js
|
||||
2,Formatters.Soap,class-status-System.Runtime.Serialization.Formatters.Soap.html,class-status-System.Runtime.Serialization.Formatters.Soap.src,cm/cormissing.css,cm/cormissing.js
|
||||
1,C# Compiler,c-sharp.html,c-sharp.src
|
||||
1,VB Compiler,mbas.html,mbas.src
|
||||
1,Status,status.html,status.src
|
||||
0,Download,download.html,download.src
|
||||
1,CVS access,ccvs.html,ccvs.src
|
||||
1,AnonCVS access,anoncvs.html,anoncvs.src
|
||||
@@ -25,6 +34,19 @@
|
||||
1,Porting,porting.html,porting.src
|
||||
2,PowerPC,ppc.html,ppc.src
|
||||
1,HOWTO,mono-contribution-howto.html,mono-contribution-howto.src
|
||||
0,Plans,plans.html,plans.src
|
||||
1,ADO.NET,ado-net.html,ado-net.src
|
||||
2,Firebird Interbase,firebird.html,firebird.src
|
||||
2,Microsft SQL Server,sqlclient.html,sqlclient.src
|
||||
2,MySQL,mysql.html,mysql.src
|
||||
2,ODBC,odbc.html,odbc.src
|
||||
2,OLE DB,oledb.html,oledb.src
|
||||
2,PostgreSQL,postgresql.html,postgresql.src
|
||||
2,SQL Lite,sqlite.html,sqlite.src
|
||||
2,Sybase,sybase.html,sybase.src
|
||||
2,TDS Generic,tdsclient.html,tdsclient.src
|
||||
1,Java,java.html,java.src
|
||||
1,Windows.Forms,winforms.html,winforms.src
|
||||
0,Resources,resources.html,resources.src
|
||||
1,Beginning,mono-beginning.html,mono-beginning.src
|
||||
1,Mailing Lists,mailing-lists.html,mailing-lists.src
|
||||
@@ -34,35 +56,4 @@
|
||||
1,Papers,papers.html,papers.src
|
||||
1,Languages,languages.html,languages.src
|
||||
1,Debugging,jit-debug.html,jit-debug.src
|
||||
0,Plans,plans.html,plans.src
|
||||
1,ADO.NET,ado-net.html,ado-net.src
|
||||
2,ProviderFactory,provider-factory.html,provider-factory.src
|
||||
2,Firebird Interbase,firebird.html,firebird.src
|
||||
2,IBM DB2,ibmdb2.html,ibmdb2.src
|
||||
2,Microsft SQL Server,sqlclient.html,sqlclient.src
|
||||
2,MySQL,mysql.html,mysql.src
|
||||
2,ODBC,odbc.html,odbc.src
|
||||
2,OLE DB,oledb.html,oledb.src
|
||||
2,Oracle,oracle.html,oracle.src
|
||||
2,PostgreSQL,postgresql.html,postgresql.src
|
||||
2,SQL Lite,sqlite.html,sqlite.src
|
||||
2,Sybase,sybase.html,sybase.src
|
||||
2,TDS Generic,tdsclient.html,tdsclient.src
|
||||
1,Crypto,crypto.html,crypto.src
|
||||
1,Java,java.html,java.src
|
||||
1,Windows.Forms,winforms.html,winforms.src
|
||||
0,Class Status,class-status.html,class-status.src,cm/cormissing.css,cm/cormissing.js
|
||||
1,corlib,class-status-corlib.html,class-status-corlib.src,cm/cormissing.css,cm/cormissing.js
|
||||
1,System,class-status-System.html,class-status-System.src,cm/cormissing.css,cm/cormissing.js
|
||||
1,Xml,class-status-System.Xml.html,class-status-System.Xml.src,cm/cormissing.css,cm/cormissing.js
|
||||
1,Data,class-status-System.Data.html,class-status-System.Data.src,cm/cormissing.css,cm/cormissing.js
|
||||
1,Drawing,class-status-System.Drawing.html,class-status-System.Drawing.src,cm/cormissing.css,cm/cormissing.js
|
||||
1,Web,class-status-System.Web.html,class-status-System.Web.src,cm/cormissing.css,cm/cormissing.js
|
||||
1,Web.Services,class-status-System.Web.Services.html,class-status-System.Web.Services.src,cm/cormissing.css,cm/cormissing.js
|
||||
1,Microsoft.VisualBasic,class-status-Microsoft.VisualBasic.html,class-status-Microsoft.VisualBasic.src,cm/cormissing.css,cm/cormissing.js
|
||||
1,Windows.Forms,class-status-System.Windows.Forms.html,class-status-System.Windows.Forms.src,cm/cormissing.css,cm/cormissing.js
|
||||
1,EnterpriseServices,class-status-System.EnterpriseServices.html,class-status-System.EnterpriseServices.src,cm/cormissing.css,cm/cormissing.js
|
||||
1,Formatters.Soap,class-status-System.Runtime.Serialization.Formatters.Soap.html,class-status-System.Runtime.Serialization.Formatters.Soap.src,cm/cormissing.css,cm/cormissing.js
|
||||
1,Cscompmgd,class-status-Cscompmgd.html,class-status-Cscompmgd.src,cm/cormissing.css,cm/cormissing.js
|
||||
1,System.Security,class-status-System.Security.html,class-status-System.Security.src,cm/cormissing.css,cm/cormissing.js
|
||||
0,Contact,contact.html,contact.src
|
||||
+35
-44
@@ -5,11 +5,10 @@ CORCOMPARE=../../../mcs/tools/corcompare
|
||||
|
||||
OBJECTS= \
|
||||
deploy/ado-net.html \
|
||||
deploy/provider-factory.html \
|
||||
deploy/firebird.html \
|
||||
deploy/mysql.html \
|
||||
deploy/odbc.html \
|
||||
deploy/oledb.html \
|
||||
deploy/oracle.html \
|
||||
deploy/postgresql.html \
|
||||
deploy/sqlclient.html \
|
||||
deploy/sqlite.html \
|
||||
@@ -19,44 +18,6 @@ OBJECTS= \
|
||||
deploy/asp-net.html \
|
||||
deploy/books.html \
|
||||
deploy/contributing.html \
|
||||
deploy/contact.html \
|
||||
deploy/c-sharp.html \
|
||||
deploy/ccvs.html \
|
||||
deploy/documentation.html \
|
||||
deploy/download.html \
|
||||
deploy/crypto.html \
|
||||
deploy/embedded-api.html \
|
||||
deploy/faq.html \
|
||||
deploy/firebird.html \
|
||||
deploy/gcc-frontend.html \
|
||||
deploy/gtk-sharp.html \
|
||||
deploy/hackers.html \
|
||||
deploy/ideas.html \
|
||||
deploy/ibmdb2.html \
|
||||
deploy/index.html \
|
||||
deploy/java.html \
|
||||
deploy/jit-debug.html \
|
||||
deploy/languages.html \
|
||||
deploy/mailing-lists.html \
|
||||
deploy/mbas.html \
|
||||
deploy/mono-beginning.html \
|
||||
deploy/mono-contribution-howto.html \
|
||||
deploy/monodoc-xml.html \
|
||||
deploy/other.html \
|
||||
deploy/papers.html \
|
||||
deploy/passport.html \
|
||||
deploy/plans.html \
|
||||
deploy/porting.html \
|
||||
deploy/ppc.html \
|
||||
deploy/rationale.html \
|
||||
deploy/resources.html \
|
||||
deploy/roadmap.html \
|
||||
deploy/runtime.html \
|
||||
deploy/screenshots.html \
|
||||
deploy/status.html \
|
||||
deploy/testing.html \
|
||||
deploy/tools.html \
|
||||
deploy/winforms.html \
|
||||
deploy/class-status.html \
|
||||
deploy/class-status-corlib.html \
|
||||
deploy/class-status-System.html \
|
||||
@@ -68,12 +29,42 @@ OBJECTS= \
|
||||
deploy/class-status-Microsoft.VisualBasic.html \
|
||||
deploy/class-status-System.EnterpriseServices.html \
|
||||
deploy/class-status-System.Runtime.Serialization.Formatters.Soap.html \
|
||||
deploy/class-status-System.Security.html \
|
||||
deploy/class-status-System.Windows.Forms.html \
|
||||
deploy/class-status-Cscompmgd.html \
|
||||
deploy/class-library.html \
|
||||
deploy/classlib-doc.html
|
||||
|
||||
deploy/classlib-doc.html \
|
||||
deploy/contact.html \
|
||||
deploy/c-sharp.html \
|
||||
deploy/ccvs.html \
|
||||
deploy/documentation.html \
|
||||
deploy/download.html \
|
||||
deploy/embedded-api.html \
|
||||
deploy/faq.html \
|
||||
deploy/gcc-frontend.html \
|
||||
deploy/hackers.html \
|
||||
deploy/index.html \
|
||||
deploy/ideas.html \
|
||||
deploy/java.html \
|
||||
deploy/jit-debug.html \
|
||||
deploy/jit-debug-sample.html \
|
||||
deploy/jit-debug-sample2.html \
|
||||
deploy/languages.html \
|
||||
deploy/mailing-lists.html \
|
||||
deploy/mono-beginning.html \
|
||||
deploy/mono-contribution-howto.html \
|
||||
deploy/monodoc-xml.html \
|
||||
deploy/papers.html \
|
||||
deploy/passport.html \
|
||||
deploy/plans.html \
|
||||
deploy/porting.html \
|
||||
deploy/ppc.html \
|
||||
deploy/rationale.html \
|
||||
deploy/resources.html \
|
||||
deploy/roadmap.html \
|
||||
deploy/runtime.html \
|
||||
deploy/status.html \
|
||||
deploy/testing.html \
|
||||
deploy/tools.html \
|
||||
deploy/winforms.html
|
||||
#2,Configuration.Install,class-status-System.Configuration.Install.html,class-status-System.Configuration.Install.src,cm/cormissing.css,cm/cormissing.js
|
||||
#2,Runtime.Remoting,class-status-System.Runtime.Remoting.html,class-status-System.Runtime.Remoting.src,cm/cormissing.css,cm/cormissing.js
|
||||
|
||||
|
||||
@@ -2,13 +2,12 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>#TITLE#</title>
|
||||
<link rel="icon" href="../MonoIcon.png" type="image/png">
|
||||
<!-- background-image: url("images/bgsquares.gif"); -->
|
||||
<style type="text/css">
|
||||
<!--
|
||||
body { font-family: "trebuchet ms", lucida, verdana, helvetica;
|
||||
|
||||
}
|
||||
background-attachment: fixed; }
|
||||
body, td, table { font-family: "trebuchet ms", lucida, verdana, helvetica;
|
||||
font-size: 14px; }
|
||||
|
||||
|
||||
@@ -225,15 +225,6 @@
|
||||
It may not be possible to manage exceptions in that case,
|
||||
though. I need to think more about it.
|
||||
|
||||
** Threading issues
|
||||
|
||||
If your application creates threads on its own, and you want them to
|
||||
be able to call code into the CIL universe with Mono, you have to
|
||||
register the thread with Mono before issuing the call.
|
||||
|
||||
To do so, call the mono_thread_attach() function before you execute
|
||||
any managed code from the thread
|
||||
|
||||
* Samples
|
||||
|
||||
See the sample programs inmono/sample/embed for examples of
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
man_MANS = mcs.1 mono.1 monostyle.1 mono-config.5 sqlsharp.1
|
||||
man_MANS = mcs.1 mono.1 monostyle.1 mono-config.5 sqlsharpcli.1
|
||||
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
.\"
|
||||
.\" cert2spc manual page.
|
||||
.\" Copyright 2002, 2003 Motus Technologies
|
||||
.\" Author:
|
||||
.\" Sebastien Pouliot ([email protected])
|
||||
.\"
|
||||
.TH Mono "cert2spc"
|
||||
.SH NAME
|
||||
cert2spc \- Transform multiple X.509 certificates to a Software
|
||||
Publisher Certificate
|
||||
.SH SYNOPSIS
|
||||
.PP
|
||||
.B cert2spc certificate|crl [certificate|crl ...] outputfile.spc
|
||||
.SH DESCRIPTION
|
||||
Combine a list of X.509 certificates or X.509 CRL (Certificate
|
||||
Revocation List) into a Software Publisher Certificate (PKCS#7
|
||||
file). The SPC file is required for signing a PE file (like an
|
||||
assembly) using signcode.
|
||||
.SH PARAMETERS
|
||||
.TP
|
||||
.I "certificate"
|
||||
One (or more) X.509 certificate to add (space separated).
|
||||
.TP
|
||||
.I "crl"
|
||||
One (or more) X.509 CRL to add (space separated).
|
||||
.TP
|
||||
.I "output.spc"
|
||||
Software Publisher Certificate to output. If the specified file
|
||||
exists it will be overwritten.
|
||||
.SH AUTHOR
|
||||
Written by Sebastien Pouliot
|
||||
.SH COPYRIGHT
|
||||
Copyright (C) 2002, 2003 Motus Technologies.
|
||||
Released under BSD license.
|
||||
.SH MAILING LISTS
|
||||
Visit http://mail.ximian.com/mailman/mono-list for details.
|
||||
.SH WEB SITE
|
||||
Visit: http://www.go-mono.com for details
|
||||
.SH SEE ALSO
|
||||
.BR makecert(1), signcode(1)
|
||||
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
.\"
|
||||
.\" secutil manual page.
|
||||
.\" Copyright 2002, 2003 Motus Technologies
|
||||
.\" Author:
|
||||
.\" Sebastien Pouliot ([email protected])
|
||||
.\"
|
||||
.TH Mono "secutil"
|
||||
.SH NAME
|
||||
secutil \- Extract X.509 certificates and strongnames from assemblies.
|
||||
.SH SYNOPSIS
|
||||
.PP
|
||||
.B secutil [options] filename
|
||||
.SH DESCRIPTION
|
||||
Extract X.509 certificates and strongnames from assemblies in a
|
||||
format that can be easily re-used in source code (C# or VB.NET syntax).
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.I "-s assembly", "-strongname assembly"
|
||||
Display strongname informations about the assembly.
|
||||
.TP
|
||||
.I "-x assembly", "-x509certificate assembly"
|
||||
Display the X509 Authenticode certificate for the assembly.
|
||||
.TP
|
||||
.I "-a", "-array"
|
||||
Display data in a decimal array (default).
|
||||
.TP
|
||||
.I "-v", "-vbmode"
|
||||
Display data in a VisualBasic friendly format.
|
||||
.TP
|
||||
.I "-c", "-cmode"
|
||||
Display data in a C/C++/C# friendly format (default).
|
||||
.TP
|
||||
.I "-help", "-h", "-?"
|
||||
Display help about this tool.
|
||||
.SH AUTHOR
|
||||
Written by Sebastien Pouliot
|
||||
.SH COPYRIGHT
|
||||
Copyright (C) 2002, 2003 Motus Technologies.
|
||||
Released under BSD license.
|
||||
.SH MAILING LISTS
|
||||
Visit http://mail.ximian.com/mailman/mono-list for details.
|
||||
.SH WEB SITE
|
||||
Visit: http://www.go-mono.com for details
|
||||
.SH SEE ALSO
|
||||
.BR sn(1), signcode(1)
|
||||
@@ -1,26 +1,13 @@
|
||||
.TH sqlsharp 1 "10 December 2002"
|
||||
.TH sqlsharpcli 1 "30 November 2002"
|
||||
.SH NAME
|
||||
sqlsharp \- Mono SQL# command-line SQL Query tool
|
||||
sqlsharpcli \- Mono SQL# Command Line SQL Query tool
|
||||
.SH SYNOPSIS
|
||||
.B sqlsharp
|
||||
[\-f filename] [\-o filename] [\-s]
|
||||
.B sqlsharpcli
|
||||
[option] [source-files]
|
||||
.SH DESCRIPTION
|
||||
sqlsharp is the Mono SQL# tool used for entering SQL queries
|
||||
sqlsharpcli is the Mono SQL# tool used for entering SQL queries
|
||||
to a database using Mono ADO.NET providers.
|
||||
.PP
|
||||
.SH OPTIONS
|
||||
The following options are supported:
|
||||
.TP
|
||||
.I "-f filename"
|
||||
Output file to load SQL# commands from.
|
||||
.TP
|
||||
.I "-o filename"
|
||||
Output file to send results.
|
||||
.TP
|
||||
.I "-s"
|
||||
Silent mode.
|
||||
.PP
|
||||
.SH HOW TO USE
|
||||
The SQL# tool accepts commands via its command line interface. Commands
|
||||
begin with a backslash followed by the command name.
|
||||
.PP
|
||||
@@ -59,6 +46,35 @@ To connect to a database, you need to do the following:
|
||||
|
||||
.fi
|
||||
.PP
|
||||
.SH COMMANDS
|
||||
The following commands are supported:
|
||||
.PP
|
||||
.TP
|
||||
.I "Open"
|
||||
Opens connection to database.
|
||||
.nf
|
||||
|
||||
Example:
|
||||
SQL# \\open
|
||||
|
||||
.fi
|
||||
.TP
|
||||
.I "ConnectionString"
|
||||
Sets the Connection String.
|
||||
.nf
|
||||
|
||||
Example:
|
||||
SQL# \\connectionstring Database=test
|
||||
.fi
|
||||
.TP
|
||||
.I "Provider"
|
||||
Sets the data provider.
|
||||
.nf
|
||||
|
||||
Example:
|
||||
SQL# \\provider mysql
|
||||
|
||||
.fi
|
||||
.SH CONNECTION AND PROVIDER COMMANDS
|
||||
These commands are used to setup the provider,
|
||||
connection string, and open/close the database connnection
|
||||
@@ -342,30 +358,16 @@ ption defaulting to true.
|
||||
.SH PROVIDERS
|
||||
.nf
|
||||
|
||||
PROVIDER NAME NAMESPACE ASSEMBLY
|
||||
PROVIDER NAME NAMESPACE ASSEMBLY
|
||||
|
||||
Internal
|
||||
--------
|
||||
|
||||
OleDb OLE DB System.Data.OleDb System.Data
|
||||
SqlClient MS SQL 7/2000 System.Data.SqlClient System.Data
|
||||
Odbc ODBC System.Data.Odbc System.Data
|
||||
|
||||
External to System.Data
|
||||
-----------------------
|
||||
MySql MySQL Mono.Data.MySql Mono.Data.MySql
|
||||
Sqlite SQL Lite Mono.Data.SqliteClient Mono.Data.SqliteClient
|
||||
Sybase Sybase Mono.Data.SybaseClient Mono.Data.SybaseClient
|
||||
Tds TDS Generic Mono.Data.TdsClient Mono.Data.TdsClient
|
||||
PostgreSql M PostgreSQL Mono.Data.PostgreSqlClient Mono.Data.PostgreSqlClient
|
||||
DB2 IBM DB2 Mono.Data.DB2Client Mono.Data.DB2Client
|
||||
Oracle Oracle 8i System.Data.OracleClient System.Data.OracleClient
|
||||
|
||||
External to Mono
|
||||
----------------
|
||||
|
||||
Npgsql NetPostgreSQL Npgsql Npgsql
|
||||
MySQLNet ByteFX MySQL ByteFX.Data.MySQL ByteFX.Data
|
||||
OleDb OLE DB System.Data.OleDb System.Data
|
||||
SqlClient MS SQL 7/2000 System.Data.SqlClient System.Data
|
||||
Odbc ODBC System.Data.Odbc System.Data
|
||||
MySql MySQL Mono.Data.MySql Mono.Data.MySql
|
||||
Sqlite SQL Lite Mono.Data.SqliteClient Mono.Data.SqliteClient
|
||||
Sybase Sybase Mono.Data.SybaseClient Mono.Data.SybaseClient
|
||||
Tds TDS Generic Mono.Data.TdsClient Mono.Data.TdsClient
|
||||
PostgreSql PostgreSQL Mono.Data.PostgreSqlClient Mono.Data.PostgreSqlClient
|
||||
|
||||
.fi
|
||||
.SH CONNECTION STRING SAMPLES
|
||||
@@ -421,60 +423,34 @@ which connects to a PostgreSQL database:
|
||||
|
||||
Provider=PostgreSQL;Addr=127.0.0.1;Database=rodrigo
|
||||
|
||||
|
||||
Oracle via System.Data.OracleClient
|
||||
|
||||
Data Source=testdb;User ID=scott;Password=tiger
|
||||
|
||||
|
||||
IBM DB2 Universal Database via Mono.Data.DB2Client
|
||||
|
||||
DSN=sample;User ID=db2admin;Password=mysecret
|
||||
|
||||
|
||||
Npgsql (.NET PostgreSQL) from
|
||||
http://gborg.postgresql.org/project/npgsql/projdisplay.php
|
||||
|
||||
Server=localhost;Database=test;User ID=postgres;Password=fun2db
|
||||
|
||||
|
||||
MySQLNet (ByteFX MySQL) from
|
||||
http://sourceforge.net/projects/mysqlnet/
|
||||
|
||||
Server=localhost;Database=test;User ID=mysql;Password=
|
||||
|
||||
|
||||
.fi
|
||||
.SH TRACING SUPPORT
|
||||
No support for tracing right now.
|
||||
.SH DEBUGGING SUPPORT
|
||||
No debugging support.
|
||||
.SH NOTES
|
||||
No notes.
|
||||
.SH AUTHORS
|
||||
The Mono SQL# Tool was written
|
||||
.nf
|
||||
by Daniel Morgan <[email protected]>
|
||||
.fi
|
||||
.PP
|
||||
.SH LICENSE
|
||||
The Mono SQL# Tool is released under the terms of the GNU GPL.
|
||||
Please read the accompanying `COPYING' file for details. Alternative
|
||||
licenses are available from Ximian or Daniel Morgan.
|
||||
.PP
|
||||
.SH SEE ALSO
|
||||
mono(1), mint(1), mcs(1)
|
||||
.PP
|
||||
.SH BUGS
|
||||
To report bugs in the compiler, you can use `bug-buddy', or you can
|
||||
file bug reports in our bug tracking system:
|
||||
.nf
|
||||
http://bugzilla.ximian.com.
|
||||
.fi
|
||||
.PP
|
||||
.SH MAILING LISTS
|
||||
For details, visit:
|
||||
.nf
|
||||
http://mail.ximian.com/mailman/mono-list
|
||||
.fi
|
||||
.SH WEB SITE
|
||||
For details, visit:
|
||||
.nf
|
||||
http://www.go-mono.com
|
||||
.fi
|
||||
.PP
|
||||
.SH SEE ALSO
|
||||
mono(1), mint(1)
|
||||
.SH MAILING LIST
|
||||
The Mono Mailing List is available at: [email protected]
|
||||
.SH MORE INFORMATION
|
||||
The Mono C# compiler is developed by Ximian, Inc
|
||||
(http://www.ximian.com) (http://www.ximian.com) and is based on the
|
||||
ECMA C# language standard available here:
|
||||
http://www.ecma.ch/ecma1/STAND/ecma-334.htm
|
||||
|
||||
|
||||
+1
-2
@@ -5,7 +5,7 @@ C# Compiler:
|
||||
|
||||
Class Libraries:
|
||||
Patrik Torstensson <[email protected]>
|
||||
Gaurav Vaish <gvaish[email protected]>
|
||||
Gaurav Vaish <gvaish@iitk.ac.in>
|
||||
Jeff Stedfast ([email protected])
|
||||
Joe Shaw ([email protected])
|
||||
Miguel de Icaza ([email protected])
|
||||
@@ -15,4 +15,3 @@ Class Libraries:
|
||||
Bob Smith ([email protected])
|
||||
John Barnette ([email protected])
|
||||
Daniel Morgan <[email protected]>
|
||||
Sebastien Pouliot <[email protected]>
|
||||
+16
-73
@@ -1,60 +1,3 @@
|
||||
2003-02-16 Martin Baulig <[email protected]>
|
||||
|
||||
* docs/compiler: Added a few works about the new `Location' code.
|
||||
|
||||
2003-02-15 Nick Drochak <[email protected]>
|
||||
|
||||
* makefile.gnu: Add testcorlib target to run just the corlib unit tests.
|
||||
|
||||
2003-02-10 Nick Drochak <[email protected]>
|
||||
|
||||
* makefile: Add testcorlib target to run just the corlib unit tests.
|
||||
|
||||
2003-01-16 Nick Drochak <[email protected]>
|
||||
|
||||
* makefile.gnu: Add corlib target to just build that.
|
||||
|
||||
2003-01-14 Duncan Mak <[email protected]>
|
||||
|
||||
* ilasm/parser/ScannerAdapter.cs: Remove the cleanup method now that
|
||||
it's no longer in the interface.
|
||||
|
||||
2003-01-13 Duncan Mak <[email protected]>
|
||||
|
||||
* ilasm/parser/ScannerAdapter.cs: Implement the new cleanup method
|
||||
in the tokenizer. This fixes the build.
|
||||
|
||||
2003-01-10 Gonzalo Paniagua Javier <[email protected]>
|
||||
|
||||
* README.building: New file.
|
||||
* makefile.gnu: install README.building file.
|
||||
|
||||
2003-01-09 Sebastien Pouliot <[email protected]>
|
||||
|
||||
* AUTHORS: add myself to class library list
|
||||
|
||||
2002-12-15 Alp Toker <[email protected]>
|
||||
|
||||
* makefile.gnu: make sure mcs is in PATH, otherwise tell user to read
|
||||
INSTALL.txt
|
||||
|
||||
2002-12-10 Daniel Morgan <[email protected]>
|
||||
|
||||
* makefile
|
||||
* tools/makefile
|
||||
* tools/makefile.gnu: change target
|
||||
from SqlSharpCli.exe
|
||||
to sqlsharp.exe
|
||||
|
||||
2002-12-10 Alp Toker <[email protected]>
|
||||
|
||||
* ilasm/makefile.gnu: Install ilasm executable with -m 755, not 644
|
||||
* ilasm/makefile: ditto
|
||||
|
||||
2002-12-10 Gaurav Vaish <[email protected]>
|
||||
|
||||
* AUTHORS: Corrected my email-ID.
|
||||
|
||||
2002-11-29 Daniel Morgan <[email protected]>
|
||||
|
||||
* INSTALL: renamed to INSTALL.txt because INSTALL
|
||||
@@ -222,20 +165,20 @@
|
||||
|
||||
* makefile (linux): Abandon the build if any of the subdir makes fail
|
||||
|
||||
2002-03-07 Nick Drochak <[email protected]>
|
||||
|
||||
* makefile: Change order of build so corlib is built before nunit since
|
||||
Nunit needs corlib now.
|
||||
|
||||
2002-02-14 Nick Drochak <[email protected]>
|
||||
|
||||
* makefile: Build mcs/doctools too when one does 'make'
|
||||
|
||||
2002-01-20 Nick Drochak <[email protected]>
|
||||
|
||||
* on the 'test' target, make sure NUnit is built first before building
|
||||
and running tests
|
||||
|
||||
2002-01-20 Nick Drochak <[email protected]>
|
||||
|
||||
2002-03-07 Nick Drochak <[email protected]>
|
||||
|
||||
* makefile: Change order of build so corlib is built before nunit since
|
||||
Nunit needs corlib now.
|
||||
|
||||
2002-02-14 Nick Drochak <[email protected]>
|
||||
|
||||
* makefile: Build mcs/doctools too when one does 'make'
|
||||
|
||||
2002-01-20 Nick Drochak <[email protected]>
|
||||
|
||||
* on the 'test' target, make sure NUnit is built first before building
|
||||
and running tests
|
||||
|
||||
2002-01-20 Nick Drochak <[email protected]>
|
||||
|
||||
* add nunit directory to the list of dirs to build in
|
||||
@@ -1,33 +0,0 @@
|
||||
|
||||
[1] Building mono + mcs from CVS on *NIX. The Easy Way (tm)
|
||||
-------------------------------------------------------------
|
||||
1. Get mono and mcs from CVS (http://www.go-mono.com/download.html)
|
||||
|
||||
2. Use the script to build mono (mono/doc/mono-build.sh).
|
||||
|
||||
3. Copy the dlls and mcs.exe from the latest monocharge tarball
|
||||
(http://www.gnome-db.org/~gonzalo/mono/) to /where/you/installed/mono/lib and
|
||||
..../bin respectively.
|
||||
|
||||
|
||||
|
||||
[2] Keeping the stuff up to date
|
||||
----------------------------------
|
||||
Once you have followed the above steps, do these ones to keep your installation
|
||||
up to date:
|
||||
|
||||
1. In mcs directory,
|
||||
|
||||
cvs -z3 update -Pd
|
||||
make -f makefile.gnu
|
||||
|
||||
2. Use the mono-build.sh script to update, rebuild and install mono from CVS.
|
||||
Doing a cvs update of mono/doc/mono-build.sh file is also a good idea.
|
||||
|
||||
3. In mcs directory:
|
||||
|
||||
make -f makefile.gnu install prefix=/prefix/of/your/installation/path
|
||||
|
||||
4. In case of troubles (ie, unable to compile mcs/* sources) go to [1].
|
||||
|
||||
-Gonzalo
|
||||
@@ -22,9 +22,7 @@
|
||||
</sources>
|
||||
</csc>
|
||||
<copy file="../lib/Accessibility.dll" tofile="Test/Accessibility.dll"/>
|
||||
<!-- TODO: missing tests & buildfile
|
||||
<nant basedir="Test" target="build"/>
|
||||
-->
|
||||
<nant basedir="Test" target="build"/>
|
||||
</target>
|
||||
|
||||
<target name="test" depends="build">
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
2002-12-10 Jeroen Janssen <[email protected]>
|
||||
|
||||
* updated .build file to correctly build with Nant
|
||||
@@ -1,60 +1,3 @@
|
||||
2003-02-22 Martin Baulig <[email protected]>
|
||||
|
||||
* library.make: Pass `MCS_FLAGS' to MCS.
|
||||
|
||||
2003-02-15 Zoltan Varga <[email protected]>
|
||||
|
||||
* makefile.gnu (test): do not install .dbg files since mcs no longer
|
||||
generates them.
|
||||
|
||||
2003-02-13 Tim Coleman <[email protected]>
|
||||
* makefile.gnu: Add System.Data.OracleClient to linux build.
|
||||
|
||||
2003-02-10 Nick Drochak <[email protected]>
|
||||
|
||||
* library.build:
|
||||
* makefile: add testcorlib target to run unit tests just for corlib.
|
||||
|
||||
2003-02-05 Sebastien Pouliot <[email protected]>
|
||||
|
||||
* library.build: added Mono.Security.Win32 to build, test and
|
||||
clean. There's no makefile.gnu for this assembly as it is
|
||||
specific to Win32.
|
||||
|
||||
2003-01-23 Nick Drochak <[email protected]>
|
||||
|
||||
* makefile: install the .dbg files too so the debugger can use them.
|
||||
|
||||
2003-01-17 Sebastien Pouliot <[email protected]>
|
||||
|
||||
* library.build: added System.Security to build, test and clean.
|
||||
There's no makefile.gnu yet for this assembly.
|
||||
|
||||
2003-01-16 Rodrigo Moya <[email protected]>
|
||||
|
||||
* makefile.gnu: added Mono.Data.DB2Client directory.
|
||||
|
||||
2003-01-08 Gaurav Vaish <gvaish_mono AT lycos.com>
|
||||
|
||||
* System.Web.Mobile : Added new directory
|
||||
|
||||
2002-12-11 Jeroen Janssen <[email protected]>
|
||||
|
||||
* enabled building Mono.Directory.LDAP and
|
||||
System.Design in .build file
|
||||
|
||||
2002-12-10 Jeroen Janssen <[email protected]>
|
||||
|
||||
* updated .build file(s) to correctly contain required buildfile
|
||||
attribute for nant
|
||||
|
||||
2002-12-09 Daniel Morgan <[email protected]>
|
||||
|
||||
* library.build: add Mono.GetOptions to windows build
|
||||
|
||||
* Mono.GetOptions/Mono.GetOptions.build: add file
|
||||
for windows build
|
||||
|
||||
2002-12-08 Radek Doulik <[email protected]>
|
||||
|
||||
* makefile.gnu (DIRS): place System.Data before Mono.GetOptions,
|
||||
|
||||
@@ -1,20 +1,8 @@
|
||||
2003-02-23 Jackson Harper <[email protected]>
|
||||
|
||||
* CompilerError.cs: Use fields not properties, and remove unneeded finalizer
|
||||
|
||||
2002-12-15 Jackson Harper <[email protected]>
|
||||
|
||||
* CompilerError.cs ErrorLevel.cs: Moved ErrorLevel enum into its own file
|
||||
|
||||
2002-12-12 Jackson Harper <[email protected]>
|
||||
|
||||
* Compiler.cs: Partially implemented bugreport option, also only allow valid options now
|
||||
|
||||
2002-12-07 Jackson Harper <[email protected]>
|
||||
2002-13-07 Jackson Harper <[email protected]>
|
||||
|
||||
* Compiler.cs: Moved StreamWriter creation into a try block
|
||||
|
||||
2002-12-07 Jackson Harper <[email protected]>
|
||||
2002-13-07 Jackson Harper <[email protected]>
|
||||
|
||||
* Compiler.cs: Source text is now implemented so you can pass strings of C# code to be compiled
|
||||
|
||||
|
||||
@@ -30,20 +30,11 @@ namespace Microsoft.CSharp {
|
||||
|
||||
string[] temp_cs_files;
|
||||
CompilerError[] errors;
|
||||
string bugreport_path = null;
|
||||
StreamWriter bug_report = null;
|
||||
|
||||
|
||||
temp_cs_files = CreateCsFiles (sourceTexts, sourceTextNames);
|
||||
|
||||
if (options != null)
|
||||
bugreport_path = (string)options["bugreport"];
|
||||
|
||||
if (bugreport_path != null) {
|
||||
bug_report = CreateBugReport (sourceTexts, sourceTextNames, bugreport_path);
|
||||
}
|
||||
|
||||
try {
|
||||
errors = CompileFiles (temp_cs_files, target, imports, options, bug_report);
|
||||
errors = CompileFiles (temp_cs_files, target, imports, options);
|
||||
} catch {
|
||||
throw;
|
||||
} finally {
|
||||
@@ -51,8 +42,6 @@ namespace Microsoft.CSharp {
|
||||
FileInfo file = new FileInfo (temp_file);
|
||||
file.Delete ();
|
||||
}
|
||||
if (bug_report != null)
|
||||
bug_report.Close ();
|
||||
}
|
||||
|
||||
return errors;
|
||||
@@ -63,7 +52,7 @@ namespace Microsoft.CSharp {
|
||||
//
|
||||
|
||||
private static CompilerError[] CompileFiles (string[] cs_files,
|
||||
string target, string[] imports, IDictionary options, StreamWriter bug_report)
|
||||
string target, string[] imports, IDictionary options)
|
||||
{
|
||||
ArrayList error_list = new ArrayList ();
|
||||
Process mcs = new Process ();
|
||||
@@ -93,11 +82,6 @@ namespace Microsoft.CSharp {
|
||||
error_list.Add (error);
|
||||
}
|
||||
|
||||
if (bug_report != null) {
|
||||
bug_report.WriteLine ("### Compiler Output");
|
||||
bug_report.Write (mcs_output);
|
||||
}
|
||||
|
||||
return (CompilerError[])error_list.ToArray (typeof(CompilerError));
|
||||
}
|
||||
|
||||
@@ -168,8 +152,6 @@ namespace Microsoft.CSharp {
|
||||
if (null != options) {
|
||||
foreach (object option in options.Keys) {
|
||||
object value = options[option];
|
||||
if (!ValidOption ((string)option))
|
||||
continue;
|
||||
args.AppendFormat ("{0} ", OptionString (option,value));
|
||||
}
|
||||
}
|
||||
@@ -202,64 +184,6 @@ namespace Microsoft.CSharp {
|
||||
throw new IndexOutOfRangeException ();
|
||||
}
|
||||
|
||||
private static StreamWriter CreateBugReport (string[] source_texts,
|
||||
string[] source_names, string path)
|
||||
{
|
||||
StreamWriter bug_report = null;
|
||||
|
||||
try {
|
||||
bug_report = new StreamWriter (path);
|
||||
bug_report.WriteLine ("### C# Compiler Defect Report," +
|
||||
" created {0}", DateTime.Now);
|
||||
// Compiler Version
|
||||
// Runtime
|
||||
// Operating System
|
||||
// Username
|
||||
for (int i=0; i<source_texts.Length; i++) {
|
||||
bug_report.WriteLine ("### Source file: '{0}'",
|
||||
source_names[i]);
|
||||
bug_report.Write (source_texts[i]);
|
||||
}
|
||||
} catch {
|
||||
if (bug_report != null)
|
||||
bug_report.Close ();
|
||||
throw;
|
||||
}
|
||||
|
||||
return bug_report;
|
||||
}
|
||||
|
||||
|
||||
private static bool ValidOption (string option)
|
||||
{
|
||||
switch (option) {
|
||||
case "addmodule":
|
||||
case "baseaddress":
|
||||
case "checked":
|
||||
case "d":
|
||||
case "debug":
|
||||
case "doc":
|
||||
case "filealign":
|
||||
case "incr":
|
||||
case "lib":
|
||||
case "linkres":
|
||||
case "m":
|
||||
case "nostdlib":
|
||||
case "nowarn":
|
||||
case "o":
|
||||
case "r":
|
||||
case "res":
|
||||
case "target":
|
||||
case "unsafe":
|
||||
case "w":
|
||||
case "warnaserror":
|
||||
case "win32icon":
|
||||
case "win32res":
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -11,25 +11,73 @@ using System.Text;
|
||||
|
||||
namespace Microsoft.CSharp {
|
||||
|
||||
public enum ErrorLevel {
|
||||
None,
|
||||
Warning,
|
||||
Error,
|
||||
FatalError,
|
||||
}
|
||||
|
||||
public class CompilerError {
|
||||
|
||||
public ErrorLevel ErrorLevel;
|
||||
public string ErrorMessage;
|
||||
public string SourceFile;
|
||||
public int ErrorNumber;
|
||||
public int SourceColumn;
|
||||
public int SourceLine;
|
||||
private ErrorLevel level = ErrorLevel.None;
|
||||
private string message = null;
|
||||
private string file = null;
|
||||
private int number = 0;
|
||||
private int column = 0;
|
||||
private int line = 0;
|
||||
|
||||
public CompilerError ()
|
||||
public CompilerError()
|
||||
{
|
||||
ErrorLevel = ErrorLevel.None;
|
||||
ErrorMessage = String.Empty;
|
||||
SourceFile = String.Empty;
|
||||
ErrorNumber = 0;
|
||||
SourceColumn = 0;
|
||||
SourceLine = 0;
|
||||
}
|
||||
|
||||
~CompilerError()
|
||||
{
|
||||
message = null;
|
||||
file = null;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Public Properties
|
||||
//
|
||||
|
||||
public ErrorLevel ErrorLevel {
|
||||
get { return level; }
|
||||
set { level = value; }
|
||||
}
|
||||
|
||||
public string ErrorMessage {
|
||||
get {
|
||||
return (null == message ? String.Empty : message);
|
||||
}
|
||||
set {
|
||||
message = value;
|
||||
}
|
||||
}
|
||||
|
||||
public int ErrorNumber {
|
||||
get { return number; }
|
||||
set { number = value; }
|
||||
}
|
||||
|
||||
public int SourceColumn {
|
||||
get { return column; }
|
||||
set { column = value; }
|
||||
}
|
||||
|
||||
public string SourceFile {
|
||||
get {
|
||||
return (null == file ? String.Empty : file);
|
||||
}
|
||||
set { file = value; }
|
||||
}
|
||||
|
||||
public int SourceLine {
|
||||
get { return line; }
|
||||
set { line = value; }
|
||||
}
|
||||
|
||||
//
|
||||
// Public Methods
|
||||
//
|
||||
@@ -51,7 +99,6 @@ namespace Microsoft.CSharp {
|
||||
return builder.ToString ();
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Private Properties
|
||||
//
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
// Microsoft.CSharp.ErrorLevel
|
||||
//
|
||||
// Author(s):
|
||||
// Jackson Harper ([email protected])
|
||||
//
|
||||
// (C) 2002 Jackson Harper, All rights reserved.
|
||||
//
|
||||
|
||||
namespace Microsoft.CSharp {
|
||||
|
||||
public enum ErrorLevel {
|
||||
None,
|
||||
Warning,
|
||||
Error,
|
||||
FatalError,
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
Microsoft.CSharp/Compiler.cs
|
||||
Microsoft.CSharp/CompilerError.cs
|
||||
Microsoft.CSharp/ErrorLevel.cs
|
||||
Microsoft.CSharp/TODOAttribute.cs
|
||||
@@ -3,10 +3,8 @@
|
||||
//
|
||||
// Author:
|
||||
// Chris J Breisch ([email protected])
|
||||
// Francesco Delfino ([email protected])
|
||||
//
|
||||
// (C) 2002 Chris J Breisch
|
||||
// 2002 [email protected]
|
||||
//
|
||||
|
||||
using System;
|
||||
@@ -15,107 +13,29 @@ namespace Microsoft.VisualBasic
|
||||
{
|
||||
sealed public class ErrObject {
|
||||
// Declarations
|
||||
int pHelpContext;
|
||||
int pLastDllError;
|
||||
int pNumber;
|
||||
int pErl;
|
||||
string pSource;
|
||||
string pHelpFile;
|
||||
string pDescription;
|
||||
System.Exception pException;
|
||||
// Constructors
|
||||
// Properties
|
||||
[MonoTODO]
|
||||
public System.Int32 HelpContext
|
||||
{
|
||||
get {
|
||||
return pHelpContext;
|
||||
}
|
||||
set {
|
||||
pHelpContext = value;
|
||||
}
|
||||
}
|
||||
public System.Int32 HelpContext { get { throw new NotImplementedException (); } set { throw new NotImplementedException (); } }
|
||||
[MonoTODO]
|
||||
public System.Int32 LastDllError {
|
||||
get {
|
||||
return pLastDllError;
|
||||
}
|
||||
}
|
||||
public System.Int32 LastDllError { get { throw new NotImplementedException (); } }
|
||||
[MonoTODO]
|
||||
public System.Int32 Number {
|
||||
get {
|
||||
return pNumber;
|
||||
}
|
||||
set {
|
||||
pNumber = value;
|
||||
}
|
||||
}
|
||||
public System.Int32 Number { get { throw new NotImplementedException (); } set { throw new NotImplementedException (); } }
|
||||
[MonoTODO]
|
||||
public System.Int32 Erl {
|
||||
get {
|
||||
return pErl;
|
||||
}
|
||||
}
|
||||
public System.Int32 Erl { get { throw new NotImplementedException (); } }
|
||||
[MonoTODO]
|
||||
public System.String Source {
|
||||
get {
|
||||
return pSource;
|
||||
}
|
||||
set {
|
||||
pSource = value;
|
||||
}
|
||||
}
|
||||
public System.String Source { get { throw new NotImplementedException (); } set { throw new NotImplementedException (); } }
|
||||
[MonoTODO]
|
||||
public System.String HelpFile {
|
||||
get {
|
||||
return pHelpFile;
|
||||
}
|
||||
set {
|
||||
pHelpFile = value;
|
||||
}
|
||||
}
|
||||
public System.String HelpFile { get { throw new NotImplementedException (); } set { throw new NotImplementedException (); } }
|
||||
[MonoTODO]
|
||||
public System.String Description {
|
||||
get {
|
||||
return pDescription;
|
||||
}
|
||||
set {
|
||||
pDescription = value;
|
||||
}
|
||||
}
|
||||
public System.String Description { get { throw new NotImplementedException (); } set { throw new NotImplementedException (); } }
|
||||
// Methods
|
||||
[MonoTODO("We should parse the exception object to obtain VB-like error code. Not a trivial task!")]
|
||||
internal void SetException (Exception ex)
|
||||
{
|
||||
if (pException != ex)
|
||||
{
|
||||
pNumber = 0xFFFF;
|
||||
pSource = ex.Source;
|
||||
pDescription = ex.Message + "\n" + ex.StackTrace;
|
||||
}
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public System.Exception GetException ()
|
||||
{
|
||||
return pException;
|
||||
}
|
||||
public System.Exception GetException () { throw new NotImplementedException (); }
|
||||
[MonoTODO]
|
||||
public void Clear () {
|
||||
pHelpContext=0;
|
||||
pLastDllError=0;
|
||||
pNumber=0;
|
||||
pErl=0;
|
||||
pSource="";
|
||||
pHelpFile="";
|
||||
pDescription="";
|
||||
pException= null;
|
||||
}
|
||||
public void Clear () { throw new NotImplementedException (); }
|
||||
[MonoTODO]
|
||||
public void Raise (System.Int32 Number, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(null)] System.Object Source, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(null)] System.Object Description, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(null)] System.Object HelpFile, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(null)] System.Object HelpContext)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
public void Raise (System.Int32 Number, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(null)] System.Object Source, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(null)] System.Object Description, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(null)] System.Object HelpFile, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(null)] System.Object HelpContext) { throw new NotImplementedException (); }
|
||||
// Events
|
||||
};
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -3,10 +3,8 @@
|
||||
//
|
||||
// Author:
|
||||
// Chris J Breisch ([email protected])
|
||||
// Francesco Delfino ([email protected]
|
||||
//
|
||||
// (C) 2002 Chris J Breisch
|
||||
// 2003 Tipic, Inc. (http://www.tipic.com)
|
||||
//
|
||||
|
||||
using System;
|
||||
@@ -20,9 +18,7 @@ namespace Microsoft.VisualBasic
|
||||
// Properties
|
||||
// Methods
|
||||
[MonoTODO]
|
||||
public static Microsoft.VisualBasic.ErrObject Err () {
|
||||
return Microsoft.VisualBasic.CompilerServices.ProjectData.Err;
|
||||
}
|
||||
public static Microsoft.VisualBasic.ErrObject Err () { throw new NotImplementedException (); }
|
||||
[MonoTODO]
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public static System.Int32 Erl () { throw new NotImplementedException (); }
|
||||
|
||||
+3
-9
@@ -3,15 +3,13 @@
|
||||
//
|
||||
// Author:
|
||||
// Chris J Breisch ([email protected])
|
||||
// Francesco Delfino ([email protected])
|
||||
//
|
||||
// (C) 2002 Chris J Breisch
|
||||
// 2002 Tipic, Inc (http://www.tipic.com)
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.VisualBasic.CompilerServices
|
||||
namespace Microsoft.VisualBasic.CompilerServices
|
||||
{
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute]
|
||||
@@ -21,12 +19,8 @@ namespace Microsoft.VisualBasic.CompilerServices
|
||||
// Properties
|
||||
// Methods
|
||||
public static System.Boolean FromString (System.String Value) { return System.Boolean.Parse(Value); }
|
||||
public static System.Boolean FromObject (System.Object Value)
|
||||
{
|
||||
if ((object)Value == null) return false;
|
||||
//if (Value.GetType() == typeof(string)) return FromString((string)Value);
|
||||
else return System.Convert.ToBoolean(Value);
|
||||
}
|
||||
[MonoTODO]
|
||||
public static System.Boolean FromObject (System.Object Value) { throw new NotImplementedException(); }
|
||||
// Events
|
||||
};
|
||||
}
|
||||
+3
-10
@@ -3,15 +3,13 @@
|
||||
//
|
||||
// Author:
|
||||
// Chris J Breisch ([email protected])
|
||||
// Francesco Delfino ([email protected])
|
||||
//
|
||||
// (C) 2002 Chris J Breisch
|
||||
// 2002 Tipic, Inc (http://www.tipic.com)
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.VisualBasic.CompilerServices
|
||||
namespace Microsoft.VisualBasic.CompilerServices
|
||||
{
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute]
|
||||
@@ -21,13 +19,8 @@ namespace Microsoft.VisualBasic.CompilerServices
|
||||
// Properties
|
||||
// Methods
|
||||
public static System.Byte FromString (System.String Value) { return System.Byte.Parse(Value); }
|
||||
|
||||
public static System.Byte FromObject (System.Object Value)
|
||||
{
|
||||
if ((object)Value == null) return 0;
|
||||
else return System.Convert.ToByte(Value);
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public static System.Byte FromObject (System.Object Value) { throw new NotImplementedException(); }
|
||||
// Events
|
||||
};
|
||||
}
|
||||
+5
-13
@@ -3,15 +3,13 @@
|
||||
//
|
||||
// Author:
|
||||
// Chris J Breisch ([email protected])
|
||||
// Francesco Delfino ([email protected])
|
||||
//
|
||||
// (C) 2002 Chris J Breisch
|
||||
// 2002 Tipic, Inc (http://www.tipic.com)
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.VisualBasic.CompilerServices
|
||||
namespace Microsoft.VisualBasic.CompilerServices
|
||||
{
|
||||
[Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute]
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
@@ -21,16 +19,10 @@ namespace Microsoft.VisualBasic.CompilerServices
|
||||
// Properties
|
||||
// Methods
|
||||
public static System.DateTime FromString (System.String Value) { return System.DateTime.Parse(Value); }
|
||||
public static System.DateTime FromString (System.String Value, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
return System.DateTime.Parse (Value,culture);
|
||||
}
|
||||
public static System.DateTime FromObject (System.Object Value) {
|
||||
if ((object)Value ==null)
|
||||
return new DateTime(1,1,1);
|
||||
//if (Value.GetType() == typeof(string)) return FromString((string)Value);
|
||||
else return System.Convert.ToDateTime(Value);
|
||||
}
|
||||
[MonoTODO]
|
||||
public static System.DateTime FromString (System.String Value, System.Globalization.CultureInfo culture) { throw new NotImplementedException (); }
|
||||
[MonoTODO]
|
||||
public static System.DateTime FromObject (System.Object Value) { throw new NotImplementedException (); }
|
||||
// Events
|
||||
};
|
||||
}
|
||||
+3
-10
@@ -3,15 +3,13 @@
|
||||
//
|
||||
// Author:
|
||||
// Chris J Breisch ([email protected])
|
||||
// Francesco Delfino ([email protected])
|
||||
//
|
||||
// (C) 2002 Chris J Breisch
|
||||
// 2002 Tipic, Inc (http://www.tipic.com)
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.VisualBasic.CompilerServices
|
||||
namespace Microsoft.VisualBasic.CompilerServices
|
||||
{
|
||||
[Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute]
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
@@ -21,13 +19,8 @@ namespace Microsoft.VisualBasic.CompilerServices
|
||||
// Properties
|
||||
// Methods
|
||||
public static System.Int32 FromString (System.String Value) { return System.Int32.Parse(Value); }
|
||||
|
||||
public static System.Int32 FromObject (System.Object Value)
|
||||
{
|
||||
if ((object)Value==null)
|
||||
return 0;
|
||||
else return System.Convert.ToInt32(Value);
|
||||
}
|
||||
[MonoTODO]
|
||||
public static System.Int32 FromObject (System.Object Value) { throw new NotImplementedException (); }
|
||||
// Events
|
||||
};
|
||||
}
|
||||
+1
-3
@@ -3,15 +3,13 @@
|
||||
//
|
||||
// Author:
|
||||
// Chris J Breisch ([email protected])
|
||||
// Francesco Delfino ([email protected])
|
||||
//
|
||||
// (C) 2002 Chris J Breisch
|
||||
// 2002 Tipic, Inc (http://www.tipic.com)
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.VisualBasic.CompilerServices
|
||||
namespace Microsoft.VisualBasic.CompilerServices
|
||||
{
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
sealed public class ObjectType {
|
||||
|
||||
+80
-98
@@ -1,98 +1,80 @@
|
||||
//
|
||||
// ProjectData.cs
|
||||
//
|
||||
// Authors:
|
||||
// Martin Adoue ([email protected])
|
||||
// Chris J Breisch ([email protected])
|
||||
// Francesco Delfino ([email protected])
|
||||
//
|
||||
// (C) 2002 Ximian Inc.
|
||||
// 2002 Tipic, Inc. (http://www.tipic.com)
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Microsoft.VisualBasic.CompilerServices
|
||||
{
|
||||
/// <summary>
|
||||
/// FIXME: Summary description for ProjectData.
|
||||
/// </summary>
|
||||
|
||||
[MonoTODO]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
[StructLayout(LayoutKind.Auto)]
|
||||
public class ProjectData{
|
||||
|
||||
internal static System.Exception projectError;
|
||||
internal static int erl;
|
||||
internal static Microsoft.VisualBasic.ErrObject pErr;
|
||||
|
||||
internal static Microsoft.VisualBasic.ErrObject Err
|
||||
{
|
||||
get
|
||||
{
|
||||
if (pErr==null)
|
||||
pErr=new ErrObject();
|
||||
|
||||
return pErr;
|
||||
}
|
||||
set
|
||||
{
|
||||
pErr = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// FIXME: Summary description for ClearProjectError
|
||||
/// </summary>
|
||||
public static void ClearProjectError()
|
||||
{
|
||||
projectError = null;
|
||||
erl = 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// FIXME: Summary description for SetProjectError
|
||||
/// </summary>
|
||||
/// <param name="ex">FIXME: Required. Summary description for ex</param>
|
||||
[MonoTODO]
|
||||
public static void SetProjectError(System.Exception ex)
|
||||
{
|
||||
SetProjectError(ex, 0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// FIXME: Summary description for SetProjectError
|
||||
/// </summary>
|
||||
/// <param name="ex">FIXME: Required. Summary description for ex</param>
|
||||
/// <param name="lErl">FIXME: Required. Summary description for lErl</param>
|
||||
[MonoTODO]
|
||||
public static void SetProjectError(System.Exception ex, int lErl)
|
||||
{
|
||||
projectError = ex;
|
||||
erl = lErl;
|
||||
Err.SetException (ex);
|
||||
}
|
||||
|
||||
/*
|
||||
[MonoTODO]
|
||||
public static void EndApp()
|
||||
{
|
||||
//FIXME
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
[MonoTODO]
|
||||
protected static void Finalize()
|
||||
{
|
||||
//FIXME
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
//
|
||||
// ProjectData.cs
|
||||
//
|
||||
// Authors:
|
||||
// Martin Adoue ([email protected])
|
||||
// Chris J Breisch ([email protected])
|
||||
//
|
||||
// (C) 2002 Ximian Inc.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Microsoft.VisualBasic.CompilerServices
|
||||
{
|
||||
/// <summary>
|
||||
/// FIXME: Summary description for ProjectData.
|
||||
/// </summary>
|
||||
|
||||
[MonoTODO]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
[StructLayout(LayoutKind.Auto)]
|
||||
public class ProjectData{
|
||||
|
||||
private static System.Exception projectError;
|
||||
private static int erl;
|
||||
|
||||
/// <summary>
|
||||
/// FIXME: Summary description for ClearProjectError
|
||||
/// </summary>
|
||||
public static void ClearProjectError()
|
||||
{
|
||||
projectError = null;
|
||||
erl = 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// FIXME: Summary description for SetProjectError
|
||||
/// </summary>
|
||||
/// <param name="ex">FIXME: Required. Summary description for ex</param>
|
||||
[MonoTODO]
|
||||
public static void SetProjectError(System.Exception ex)
|
||||
{
|
||||
SetProjectError(ex, 0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// FIXME: Summary description for SetProjectError
|
||||
/// </summary>
|
||||
/// <param name="ex">FIXME: Required. Summary description for ex</param>
|
||||
/// <param name="lErl">FIXME: Required. Summary description for lErl</param>
|
||||
[MonoTODO]
|
||||
public static void SetProjectError(System.Exception ex, int lErl)
|
||||
{
|
||||
projectError = ex;
|
||||
erl = lErl;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
[MonoTODO]
|
||||
public static void EndApp()
|
||||
{
|
||||
//FIXME
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
[MonoTODO]
|
||||
protected static void Finalize()
|
||||
{
|
||||
//FIXME
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
+31
-64
@@ -3,15 +3,13 @@
|
||||
//
|
||||
// Author:
|
||||
// Chris J Breisch ([email protected])
|
||||
// Francesco Delfino ([email protected])
|
||||
//
|
||||
// (C) 2002 Chris J Breisch
|
||||
// 2002 Tipic, Inc. (http://www.tipic.com)
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.VisualBasic.CompilerServices
|
||||
namespace Microsoft.VisualBasic.CompilerServices
|
||||
{
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute]
|
||||
@@ -20,67 +18,36 @@ namespace Microsoft.VisualBasic.CompilerServices
|
||||
// Constructors
|
||||
// Properties
|
||||
// Methods
|
||||
public static System.String FromBoolean (System.Boolean Value) {
|
||||
return Convert.ToString(Value);
|
||||
}
|
||||
public static System.String FromByte (System.Byte Value)
|
||||
{
|
||||
return Convert.ToString(Value);
|
||||
}
|
||||
public static System.String FromChar (System.Char Value)
|
||||
{
|
||||
return Convert.ToString(Value);
|
||||
}
|
||||
public static System.String FromShort (System.Int16 Value)
|
||||
{
|
||||
return Convert.ToString(Value);
|
||||
}
|
||||
public static System.String FromInteger (System.Int32 Value)
|
||||
{
|
||||
return Convert.ToString(Value);
|
||||
}
|
||||
public static System.String FromLong (System.Int64 Value)
|
||||
{
|
||||
return Convert.ToString(Value);
|
||||
}
|
||||
public static System.String FromSingle (System.Single Value)
|
||||
{
|
||||
return Convert.ToString(Value);
|
||||
}
|
||||
public static System.String FromDouble (System.Double Value)
|
||||
{
|
||||
return Convert.ToString(Value);
|
||||
}
|
||||
public static System.String FromSingle (System.Single Value, System.Globalization.NumberFormatInfo NumberFormat)
|
||||
{
|
||||
return Convert.ToString(Value,NumberFormat);
|
||||
}
|
||||
public static System.String FromDouble (System.Double Value, System.Globalization.NumberFormatInfo NumberFormat)
|
||||
{
|
||||
return Convert.ToString(Value,NumberFormat);
|
||||
}
|
||||
public static System.String FromDate (System.DateTime Value)
|
||||
{
|
||||
return Convert.ToString(Value);
|
||||
}
|
||||
public static System.String FromDecimal (System.Decimal Value)
|
||||
{
|
||||
return Convert.ToString(Value);
|
||||
}
|
||||
public static System.String FromDecimal (System.Decimal Value, System.Globalization.NumberFormatInfo NumberFormat)
|
||||
{
|
||||
return Convert.ToString(Value,NumberFormat);
|
||||
}
|
||||
public static System.String FromObject (System.Object Value)
|
||||
{
|
||||
if ((object)Value==null) return "";
|
||||
else return Convert.ToString(Value);
|
||||
}
|
||||
[MonoTODO("Last boolean parameter ignored")]
|
||||
public static System.Int32 StrCmp (System.String sLeft, System.String sRight, System.Boolean TextCompare)
|
||||
{
|
||||
return sLeft.CompareTo(sRight);
|
||||
}
|
||||
[MonoTODO]
|
||||
public static System.String FromBoolean (System.Boolean Value) { throw new NotImplementedException (); }
|
||||
[MonoTODO]
|
||||
public static System.String FromByte (System.Byte Value) { throw new NotImplementedException (); }
|
||||
[MonoTODO]
|
||||
public static System.String FromChar (System.Char Value) { throw new NotImplementedException (); }
|
||||
[MonoTODO]
|
||||
public static System.String FromShort (System.Int16 Value) { throw new NotImplementedException (); }
|
||||
[MonoTODO]
|
||||
public static System.String FromInteger (System.Int32 Value) { throw new NotImplementedException (); }
|
||||
[MonoTODO]
|
||||
public static System.String FromLong (System.Int64 Value) { throw new NotImplementedException (); }
|
||||
[MonoTODO]
|
||||
public static System.String FromSingle (System.Single Value) { throw new NotImplementedException (); }
|
||||
[MonoTODO]
|
||||
public static System.String FromDouble (System.Double Value) { throw new NotImplementedException (); }
|
||||
[MonoTODO]
|
||||
public static System.String FromSingle (System.Single Value, System.Globalization.NumberFormatInfo NumberFormat) { throw new NotImplementedException (); }
|
||||
[MonoTODO]
|
||||
public static System.String FromDouble (System.Double Value, System.Globalization.NumberFormatInfo NumberFormat) { throw new NotImplementedException (); }
|
||||
[MonoTODO]
|
||||
public static System.String FromDate (System.DateTime Value) { throw new NotImplementedException (); }
|
||||
[MonoTODO]
|
||||
public static System.String FromDecimal (System.Decimal Value) { throw new NotImplementedException (); }
|
||||
[MonoTODO]
|
||||
public static System.String FromDecimal (System.Decimal Value, System.Globalization.NumberFormatInfo NumberFormat) { throw new NotImplementedException (); }
|
||||
[MonoTODO]
|
||||
public static System.String FromObject (System.Object Value) { throw new NotImplementedException (); }
|
||||
[MonoTODO]
|
||||
public static System.Int32 StrCmp (System.String sLeft, System.String sRight, System.Boolean TextCompare) { throw new NotImplementedException (); }
|
||||
[MonoTODO]
|
||||
public static System.Boolean StrLike (System.String Source, System.String Pattern, Microsoft.VisualBasic.CompareMethod CompareOption) { throw new NotImplementedException (); }
|
||||
[MonoTODO]
|
||||
|
||||
@@ -4,12 +4,8 @@
|
||||
// Authors:
|
||||
// Martin Adoue ([email protected])
|
||||
// Chris J Breisch ([email protected])
|
||||
// Francesco Delfino ([email protected])
|
||||
// Daniel Campos ([email protected])
|
||||
// Rafael Teixeira ([email protected])
|
||||
//
|
||||
// (C) 2002 Ximian Inc.
|
||||
// 2002 Tipic, Inc. (http://www.tipic.com)
|
||||
//
|
||||
|
||||
using System;
|
||||
@@ -40,11 +36,12 @@ namespace Microsoft.VisualBasic
|
||||
/// </summary>
|
||||
/// <param name="String">Required. Any valid Char or String expression. If String is a String expression, only the first character of the string is used for input. If String is Nothing or contains no characters, an ArgumentException error occurs.</param>
|
||||
[MonoTODO]
|
||||
public static int Asc(char Char)
|
||||
public static int Asc(char String)
|
||||
{
|
||||
//FIXME: Check the docs, it says something about Locales, DBCS, etc.
|
||||
return (int)Char;
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -54,8 +51,8 @@ namespace Microsoft.VisualBasic
|
||||
[MonoTODO]
|
||||
public static int Asc(string String)
|
||||
{
|
||||
if ((String == null) || (String.Length < 1))
|
||||
throw new ArgumentException("Length of argument 'String' must be at least one.", "String");
|
||||
if ((String == null) || (String.Length != 1))
|
||||
throw new ArgumentException("Length of argument 'String' must be one.", "String");
|
||||
|
||||
//FIXME: Check the docs, it says something about Locales, DBCS, etc.
|
||||
return (int) String.ToCharArray(0, 1)[0];
|
||||
@@ -280,7 +277,7 @@ namespace Microsoft.VisualBasic
|
||||
/// Returns an expression formatted as a currency value using the currency symbol defined in the system control panel.
|
||||
/// </summary>
|
||||
/// <param name="Expression">Required. Expression to be formatted.</param>
|
||||
/// <param name="NumDigitsAfterDecimal">Optional. Numeric value indicating how many places are displayed to the right of the decimal. Default value is 1, which indicates that the computer's regional settings are used.</param>
|
||||
/// <param name="NumDigitsAfterDecimal">Optional. Numeric value indicating how many places are displayed to the right of the decimal. Default value is –1, which indicates that the computer's regional settings are used.</param>
|
||||
/// <param name="IncludeLeadingDigit">Optional. Tristate enumeration that indicates whether or not a leading zero is displayed for fractional values. See Settings for values.</param>
|
||||
/// <param name="UseParensForNegativeNumbers">Optional. Tristate enumeration that indicates whether or not to place negative values within parentheses. See Settings for values.</param>
|
||||
/// <param name="GroupDigits">Optional. Tristate enumeration that indicates whether or not numbers are grouped using the group delimiter specified in the computer's regional settings. See Settings for values.</param>
|
||||
@@ -338,7 +335,7 @@ namespace Microsoft.VisualBasic
|
||||
/// Returns an expression formatted as a number.
|
||||
/// </summary>
|
||||
/// <param name="Expression">Required. Expression to be formatted.</param>
|
||||
/// <param name="NumDigitsAfterDecimal">Optional. Numeric value indicating how many places are displayed to the right of the decimal. Default value is 1, which indicates that the computer's regional settings are used.</param>
|
||||
/// <param name="NumDigitsAfterDecimal">Optional. Numeric value indicating how many places are displayed to the right of the decimal. Default value is –1, which indicates that the computer's regional settings are used.</param>
|
||||
/// <param name="IncludeLeadingDigit">Optional. Tristate enumeration that indicates whether or not a leading zero is displayed for fractional values. See Settings for values.</param>
|
||||
/// <param name="UseParensForNegativeNumbers">Optional. Tristate enumeration that indicates whether or not to place negative values within parentheses. See Settings for values.</param>
|
||||
/// <param name="GroupDigits">Optional. Tristate enumeration that indicates whether or not numbers are grouped using the group delimiter specified in the computer's regional settings. See Settings for values.</param>
|
||||
@@ -366,7 +363,7 @@ namespace Microsoft.VisualBasic
|
||||
/// Returns an expression formatted as a percentage (that is, multiplied by 100) with a trailing % character.
|
||||
/// </summary>
|
||||
/// <param name="Expression">Required. Expression to be formatted.</param>
|
||||
/// <param name="NumDigitsAfterDecimal">Optional. Numeric value indicating how many places are displayed to the right of the decimal. Default value is 1, which indicates that the computer's regional settings are used.</param>
|
||||
/// <param name="NumDigitsAfterDecimal">Optional. Numeric value indicating how many places are displayed to the right of the decimal. Default value is –1, which indicates that the computer's regional settings are used.</param>
|
||||
/// <param name="IncludeLeadingDigit">Optional. Tristate enumeration that indicates whether or not a leading zero is displayed for fractional values. See Settings for values.</param>
|
||||
/// <param name="UseParensForNegativeNumbers">Optional. Tristate enumeration that indicates whether or not to place negative values within parentheses. See Settings for values.</param>
|
||||
/// <param name="GroupDigits">Optional. Tristate enumeration that indicates whether or not numbers are grouped using the group delimiter specified in the computer's regional settings. See Settings for values.</param>
|
||||
@@ -410,23 +407,6 @@ namespace Microsoft.VisualBasic
|
||||
return Str.ToCharArray(Index -1, 1)[0];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns an integer specifying the start position of the first occurrence of one string within another.
|
||||
/// </summary>
|
||||
/// <param name="Start">Required. Numeric expression that sets the starting position for each search. If omitted, search begins at the first character position. The start index is 1 based.</param>
|
||||
/// <param name="String1">Required. String expression being searched.</param>
|
||||
/// <param name="String2">Required. String expression sought.</param>
|
||||
/// <param name="Compare">Optional. Specifies the type of string comparison. If Compare is omitted, the Option Compare setting determines the type of comparison. Specify a valid LCID (LocaleID) to use locale-specific rules in the comparison. </param>
|
||||
[MonoTODO("Needs testing")]
|
||||
public static int InStr(string String1,
|
||||
string String2,
|
||||
[OptionCompare]
|
||||
[Optional]
|
||||
[DefaultValue(CompareMethod.Binary)]
|
||||
CompareMethod Compare)
|
||||
{
|
||||
return InStr(1, String1, String2, Compare);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns an integer specifying the start position of the first occurrence of one string within another.
|
||||
@@ -465,13 +445,14 @@ namespace Microsoft.VisualBasic
|
||||
*/
|
||||
|
||||
//FIXME: someone with a non US setup should test this.
|
||||
|
||||
switch (Compare)
|
||||
{
|
||||
case CompareMethod.Text:
|
||||
return System.Globalization.CultureInfo.CurrentCulture.CompareInfo.IndexOf(String2, String1, Start - 1) + 1;
|
||||
|
||||
case CompareMethod.Binary:
|
||||
return String1.IndexOf(String2, Start - 1) + 1;
|
||||
return String2.IndexOf(String1, Start - 1) + 1;
|
||||
default:
|
||||
throw new System.ArgumentException("Argument 'Compare' must be CompareMethod.Binary or CompareMethod.Text.", "Compare");
|
||||
}
|
||||
@@ -484,7 +465,7 @@ namespace Microsoft.VisualBasic
|
||||
/// </summary>
|
||||
/// <param name="StringCheck">Required. String expression being searched.</param>
|
||||
/// <param name="StringMatch">Required. String expression being searched for.</param>
|
||||
/// <param name="Start">Optional. Numeric expression that sets the one-based starting position for each search, starting from the left side of the string. If Start is omitted, 1 is used, which means that the search begins at the last character position. Search then proceeds from right to left.</param>
|
||||
/// <param name="Start">Optional. Numeric expression that sets the one-based starting position for each search, starting from the left side of the string. If Start is omitted, –1 is used, which means that the search begins at the last character position. Search then proceeds from right to left.</param>
|
||||
/// <param name="Compare">Optional. Numeric value indicating the kind of comparison to use when evaluating substrings. If omitted, a binary comparison is performed. See Settings for values.</param>
|
||||
[MonoTODO]
|
||||
public static int InStrRev(string StringCheck,
|
||||
@@ -740,7 +721,8 @@ namespace Microsoft.VisualBasic
|
||||
if ((Str == null) || (Str.Length == 0))
|
||||
return String.Empty; // VB.net does this.
|
||||
|
||||
return Str.TrimStart(null);
|
||||
Str.TrimStart(null);
|
||||
return Str;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -753,7 +735,8 @@ namespace Microsoft.VisualBasic
|
||||
if ((Str == null) || (Str.Length == 0))
|
||||
return String.Empty; // VB.net does this.
|
||||
|
||||
return Str.TrimEnd(null);
|
||||
Str.TrimEnd(null);
|
||||
return Str;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -766,7 +749,8 @@ namespace Microsoft.VisualBasic
|
||||
if ((Str == null) || (Str.Length == 0))
|
||||
return String.Empty; // VB.net does this.
|
||||
|
||||
return Str.Trim();
|
||||
Str.Trim();
|
||||
return Str;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -824,7 +808,7 @@ namespace Microsoft.VisualBasic
|
||||
/// <param name="Find">Required. Substring being searched for.</param>
|
||||
/// <param name="Replacement">Required. Replacement substring.</param>
|
||||
/// <param name="Start">Optional. Position within Expression where substring search is to begin. If omitted, 1 is assumed.</param>
|
||||
/// <param name="Count">Optional. Number of substring substitutions to perform. If omitted, the default value is 1, which means make all possible substitutions.</param>
|
||||
/// <param name="Count">Optional. Number of substring substitutions to perform. If omitted, the default value is –1, which means make all possible substitutions.</param>
|
||||
/// <param name="Compare">Optional. Numeric value indicating the kind of comparison to use when evaluating substrings. See Settings for values.</param>
|
||||
[MonoTODO("Needs testing")]
|
||||
public static string Replace(string Expression,
|
||||
@@ -869,7 +853,8 @@ namespace Microsoft.VisualBasic
|
||||
if (Length < 0)
|
||||
throw new ArgumentException("Argument 'Length' must be greater or equal to zero.", "Length");
|
||||
|
||||
return Str.Substring (Str.Length - Length);
|
||||
//FIXME
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -908,7 +893,7 @@ namespace Microsoft.VisualBasic
|
||||
/// </summary>
|
||||
/// <param name="Expression">Required. String expression containing substrings and delimiters. If Expression is a zero-length string (""), the Split function returns an array with no elements and no data.</param>
|
||||
/// <param name="Delimiter">Optional. Single character used to identify substring limits. If Delimiter is omitted, the space character (" ") is assumed to be the delimiter. If Delimiter is a zero-length string, a single-element array containing the entire Expression string is returned.</param>
|
||||
/// <param name="Limit">Optional. Number of substrings to be returned; the default, 1, indicates that all substrings are returned.</param>
|
||||
/// <param name="Limit">Optional. Number of substrings to be returned; the default, –1, indicates that all substrings are returned.</param>
|
||||
/// <param name="Compare">Optional. Numeric value indicating the comparison to use when evaluating substrings. See Settings for values.</param>
|
||||
[MonoTODO]
|
||||
public static string[] Split(string Expression,
|
||||
@@ -1074,26 +1059,27 @@ namespace Microsoft.VisualBasic
|
||||
/// <param name="Expression">Required. String expression whose characters are to be reversed. If Expression is a zero-length string (""), a zero-length string is returned.</param>
|
||||
public static string StrReverse(string Expression)
|
||||
{
|
||||
// patched by Daniel Campos
|
||||
// [email protected]
|
||||
if (Expression != null)
|
||||
{
|
||||
if ( Expression.Length>0)
|
||||
{
|
||||
int counter=0;
|
||||
char[] buf=new char[Expression.Length];
|
||||
|
||||
for (int backwardsCounter=Expression.Length - 1;
|
||||
backwardsCounter>=0;
|
||||
backwardsCounter--)
|
||||
buf[counter++]=Expression[backwardsCounter];
|
||||
return new string(buf);
|
||||
}
|
||||
else
|
||||
return String.Empty;
|
||||
}
|
||||
else
|
||||
return String.Empty;
|
||||
|
||||
if (Expression == null)
|
||||
return String.Empty; // "If Expression is a zero-length string (""), a zero-length string is returned."
|
||||
|
||||
int count = Expression.Length;
|
||||
|
||||
if (count == 0)
|
||||
return String.Empty; // "If Expression is a zero-length string (""), a zero-length string is returned."
|
||||
|
||||
/*
|
||||
* This would be much faster if I had access to the internal array.
|
||||
* I'd just reverse the array. Maybe as strings are inmutable in .net (is this true in Mono?)
|
||||
* it'll be the same. Comments?
|
||||
*/
|
||||
char[] chars = new char[count - 1];
|
||||
chars = Expression.ToCharArray();
|
||||
|
||||
System.Array.Reverse (chars);
|
||||
|
||||
return new string(chars);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -3,10 +3,8 @@
|
||||
//
|
||||
// Author:
|
||||
// Chris J Breisch ([email protected])
|
||||
// Francesco Delfino ([email protected])
|
||||
//
|
||||
// (C) 2002 Chris J Breisch
|
||||
// (C) 2002 Tipic Inc
|
||||
//
|
||||
|
||||
using System;
|
||||
@@ -17,37 +15,15 @@ namespace Microsoft.VisualBasic {
|
||||
// Declarations
|
||||
// Constructors
|
||||
// Properties
|
||||
static Random rnd = new Random();
|
||||
static float last = (float)rnd.NextDouble();
|
||||
// Methods
|
||||
public static float Rnd () {
|
||||
last = (float)rnd.NextDouble();
|
||||
return last;
|
||||
}
|
||||
public static float Rnd (float Number)
|
||||
{
|
||||
if (Number == 0.0)
|
||||
{
|
||||
return last;
|
||||
}
|
||||
else if (Number < 0.0 )
|
||||
{
|
||||
//fd: What does this mean?
|
||||
//fd: ms-help://MS.VSCC/MS.MSDNVS/script56/html/vsstmRandomize
|
||||
//fd: ms-help://MS.VSCC/MS.MSDNVS/script56/html/vsfctrnd.htm
|
||||
Randomize(Number);
|
||||
return Rnd();
|
||||
}
|
||||
return Rnd();
|
||||
}
|
||||
public static void Randomize () {
|
||||
rnd = new Random();
|
||||
}
|
||||
[MonoTODO("Rethink the double => int conversion")]
|
||||
public static void Randomize (double Number)
|
||||
{
|
||||
rnd = new Random((int)Number);
|
||||
}
|
||||
[MonoTODO]
|
||||
public static System.Single Rnd () { throw new NotImplementedException (); }
|
||||
[MonoTODO]
|
||||
public static System.Single Rnd (System.Single Number) { throw new NotImplementedException (); }
|
||||
[MonoTODO]
|
||||
public static void Randomize () { throw new NotImplementedException (); }
|
||||
[MonoTODO]
|
||||
public static void Randomize (System.Double Number) { throw new NotImplementedException (); }
|
||||
// Events
|
||||
};
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
2002-02-19 Carsten Hess
|
||||
* Created
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<!-- NAnt build file for Microsoft.VisualC.dll -->
|
||||
|
||||
<project name="System" default="build">
|
||||
<property name="debug" value="false"/>
|
||||
|
||||
<target name="build">
|
||||
<mkdir dir="../lib"/>
|
||||
<csc target="library" output="../lib/Microsoft.VisualC.dll" debug="${debug}">
|
||||
<arg value="/nowarn:1595"/>
|
||||
<arg value="/noconfig"/> <!-- don't reference ms assemblies -->
|
||||
|
||||
<!-- cor compare dies with these currently -->
|
||||
<!--<arg value="/nostdlib"/>--> <!-- don't reference mscorlib -->
|
||||
<!--<arg value="/lib:../lib/"/>-->
|
||||
<!--<arg value="/r:..\lib\corlib.dll"/>-->
|
||||
<!--<arg value="/r:..\lib\System.dll"/>-->
|
||||
<arg value="/r:System.dll"/>
|
||||
<sources>
|
||||
<includes name="**/*.cs"/>
|
||||
<excludes name="Test/**"/>
|
||||
</sources>
|
||||
<references>
|
||||
<!--<includes name="../lib/corlib.dll"/>-->
|
||||
<!--<includes name="../lib/System.dll"/>-->
|
||||
</references>
|
||||
</csc>
|
||||
<copy file="../lib/Microsoft.VisualC.dll" tofile="Test/Microsoft.VisualC.dll"/>
|
||||
</target>
|
||||
|
||||
<target name="test" depends="build">
|
||||
<nant basedir="Test" target="test"/>
|
||||
</target>
|
||||
|
||||
<target name="clean">
|
||||
<nant basedir="Test" target="clean"/>
|
||||
<delete file="../lib/Microsoft.VisualC.dll" failonerror="false"/>
|
||||
</target>
|
||||
</project>
|
||||
@@ -1,8 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace Microsoft.VisualC
|
||||
{
|
||||
public sealed class DebugInfoInPDBAttribute:System.Attribute
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace Microsoft.VisualC
|
||||
{
|
||||
public sealed class DecoratedNameAttribute:System.Attribute
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace Microsoft.VisualC
|
||||
{
|
||||
public sealed class IsCXXReferenceModifier:System.Attribute
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace Microsoft.VisualC
|
||||
{
|
||||
public sealed class IsConstModifier:System.Attribute
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace Microsoft.VisualC
|
||||
{
|
||||
public sealed class IsLongModifier:System.Attribute
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace Microsoft.VisualC
|
||||
{
|
||||
public sealed class IsSignedModifier:System.Attribute
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace Microsoft.VisualC
|
||||
{
|
||||
public sealed class IsVolatileModifier:System.Attribute
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace Microsoft.VisualC
|
||||
{
|
||||
|
||||
public sealed class MiscellaneousBitsAttribute:System.Attribute
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace Microsoft.VisualC
|
||||
{
|
||||
public sealed class NeedsCopyConstructorModifier:System.Attribute
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace Microsoft.VisualC
|
||||
{
|
||||
public sealed class NoSignSpecifiedModifier:System.Attribute
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
Microsoft.VisualC/DebugInfoInPDBAttribute.cs
|
||||
Microsoft.VisualC/DecoratedNameAttribute.cs
|
||||
Microsoft.VisualC/IsCXXReferenceModifier.cs
|
||||
Microsoft.VisualC/IsConstModifier.cs
|
||||
Microsoft.VisualC/IsLongModifier.cs
|
||||
Microsoft.VisualC/IsSignedModifier.cs
|
||||
Microsoft.VisualC/IsVolatileModifier.cs
|
||||
Microsoft.VisualC/MiscellaneousBitsAttribute.cs
|
||||
Microsoft.VisualC/NeedsCopyConstructorModifier.cs
|
||||
Microsoft.VisualC/NoSignSpecifiedModifier.cs
|
||||
@@ -1,13 +0,0 @@
|
||||
topdir = ../..
|
||||
|
||||
LIBRARY = $(topdir)/class/lib/Microsoft.VisualC.dll
|
||||
|
||||
LIB_LIST = list
|
||||
LIB_FLAGS = -r corlib -r System
|
||||
|
||||
SOURCES_INCLUDE=*.cs
|
||||
SOURCES_EXCLUDE=./Test*
|
||||
|
||||
export MONO_PATH_PREFIX = $(topdir)/class/lib:
|
||||
|
||||
include $(topdir)/class/library.make
|
||||
@@ -1,119 +1,3 @@
|
||||
2003-02-22 Martin Baulig <[email protected]>
|
||||
|
||||
* MonoSymbolTable.cs: Incremented version number.
|
||||
|
||||
2003-02-22 Martin Baulig <[email protected]>
|
||||
|
||||
* MonoSymbolFile.cs (MonoSymbolFile.FindMethod): Fixed a bug.
|
||||
(MonoSymbolFile.MethodLookup): New method.
|
||||
|
||||
2003-02-18 Martin Baulig <[email protected]>
|
||||
|
||||
* MonoSymbolFile.cs (MonoSymbolFile.GetMethod): Added overloaded
|
||||
version which takes a MethodBase.
|
||||
|
||||
2003-02-18 Martin Baulig <[email protected]>
|
||||
|
||||
* MonoSymbolTable.cs (MethodIndexEntry): New public struct.
|
||||
|
||||
* MonoSymbolFile.cs (MonoSymbolFile.GetMethodByToken): New method.
|
||||
|
||||
2003-02-18 Martin Baulig <[email protected]>
|
||||
|
||||
* MonoSymbolFile.cs (MonoSymbolFile.Assembly): New public property.
|
||||
|
||||
* MonoSymbolTable.cs (MethodEntry.MethodBase): New public property.
|
||||
(MethodEntry.LocalTypes): New public variable.
|
||||
|
||||
2003-02-18 Martin Baulig <[email protected]>
|
||||
|
||||
* MonoSymbolFile.cs (MethodEntry.ThisTypeIndex): Renamed to
|
||||
ClassTypeIndex; provide this for all methods so we can get the
|
||||
class of static methods.
|
||||
|
||||
2003-02-10 Nick Drochak <[email protected]>
|
||||
|
||||
* Mono.CSharp.Debugger.build: passing the /r using an 'arg' node works.
|
||||
The <include> node wasn't getting to the compiler. This fixes build
|
||||
breakage on cygwin.
|
||||
|
||||
* MonoSymbolFile.cs: Qualify which Min method. Fixes build breakage
|
||||
on cygwin.
|
||||
|
||||
2003-02-09 Martin Baulig <[email protected]>
|
||||
|
||||
* MonoSymbolWriter.cs (MonoSymbolWriter.ctor): We don't need the
|
||||
`mbuilder_array' anymore.
|
||||
|
||||
2003-02-09 Martin Baulig <[email protected]>
|
||||
|
||||
* MonoSymbolWriter.cs (SourceFile): Derive from SourceFileEntry.
|
||||
(SourceBlock): We don't need source lines here.
|
||||
(SourceMethod): We're always constructed with source info.
|
||||
|
||||
* MonoSymbolTable.cs: Added support for namespaces.
|
||||
(NamespaceEntry): New struct.
|
||||
(SourceFileEntry.DefineNamespace): New method.
|
||||
(MethodEntry.BuildLineNumberTable): The table is already sorted,
|
||||
so we don't need to do this here.
|
||||
|
||||
2003-02-09 Martin Baulig <[email protected]>
|
||||
|
||||
* IMonoSymbolWriter.cs: Ooops, I forgot to remove this.
|
||||
|
||||
2003-02-08 Martin Baulig <[email protected]>
|
||||
|
||||
* MonoSymbolDocumentWriter.cs: Removed.
|
||||
|
||||
* MonoSymbolWriter.cs (SourceFile): Implement ISymbolDocumentWriter.
|
||||
|
||||
2003-02-08 Martin Baulig <[email protected]>
|
||||
|
||||
* MonoSymbolFile.cs (GetMethodSource): New public method.
|
||||
(FindMethod): Return the correct index.
|
||||
|
||||
2003-02-07 Martin Baulig <[email protected]>
|
||||
|
||||
* MonoSymbolFile.cs (Methods, Sources): New public properties.
|
||||
|
||||
2003-02-07 Martin Baulig <[email protected]>
|
||||
|
||||
* MonoSymbolFile.cs (MonoSymbolFile.ReadSymbolFile): New public
|
||||
static method, returns null (without throwing an exception) if the
|
||||
assembly doesn't have any debugging info.
|
||||
|
||||
2003-02-07 Martin Baulig <[email protected]>
|
||||
|
||||
* MonoSymbolWriter.cs (MonoSymbolWriter.Initialize): Removed the
|
||||
custom initialization function.
|
||||
|
||||
* MonoSymbolTableWriter.cs: Removed; the code is now in
|
||||
MonoSymbolFile.cs and MonoSymbolWriter.cs.
|
||||
|
||||
2003-02-07 Martin Baulig <[email protected]>
|
||||
|
||||
* MonoSymbolFile.cs: The symbol file is now a resource in the
|
||||
assembly instead of a separate file.
|
||||
|
||||
* MonoSymbolTable.cs: Did a few more cleanups, sort the line
|
||||
number table and remove duplicate line numbers.
|
||||
|
||||
2003-02-05 Martin Baulig <[email protected]>
|
||||
|
||||
Modified the symbol file format to speed up method looks by name
|
||||
and cleaned this up a lot.
|
||||
|
||||
* MonoSymbolFile.cs: New public class. This is now a public class
|
||||
and writes and reads the symbol file.
|
||||
|
||||
* IMonoBinaryReader.cs: Removed.
|
||||
|
||||
* MonoSymbolTable.cs: Set version number to 29.
|
||||
|
||||
2003-01-17 Zoltan Varga <[email protected]>
|
||||
|
||||
* MonoSymbolWriter.cs (OpenMethod): Make it work on constructors.
|
||||
|
||||
2002-10-13 Martin Baulig <[email protected]>
|
||||
|
||||
* MonoSymbolTable.cs: Set version number to 28.
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// System.Diagnostics.SymbolStore/IMonoBinaryReader.cs
|
||||
//
|
||||
// Author:
|
||||
// Martin Baulig ([email protected])
|
||||
//
|
||||
// (C) 2002 Ximian, Inc. http://www.ximian.com
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace Mono.CSharp.Debugger
|
||||
{
|
||||
public interface IMonoBinaryReader
|
||||
{
|
||||
long Position {
|
||||
get; set;
|
||||
}
|
||||
|
||||
int ReadInt32 ();
|
||||
|
||||
long ReadInt64 ();
|
||||
|
||||
byte[] ReadBuffer (int size);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
//
|
||||
// System.Diagnostics.SymbolStore/IMonoSymbolWriter.cs
|
||||
//
|
||||
// Author:
|
||||
// Martin Baulig ([email protected])
|
||||
//
|
||||
// This interface is derived from System.Diagnostics.SymbolStore.ISymbolWriter.
|
||||
//
|
||||
// (C) 2002 Ximian, Inc. http://www.ximian.com
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Reflection.Emit;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
|
||||
namespace Mono.CSharp.Debugger
|
||||
{
|
||||
public interface IMonoSymbolWriter : System.Diagnostics.SymbolStore.ISymbolWriter
|
||||
{
|
||||
void Initialize (string assembly_filename, string filename, string[] args);
|
||||
}
|
||||
|
||||
internal enum SourceOffsetType
|
||||
{
|
||||
OFFSET_NONE,
|
||||
OFFSET_IL,
|
||||
OFFSET_LOCAL,
|
||||
OFFSET_PARAMETER
|
||||
}
|
||||
|
||||
internal interface ITypeHandle
|
||||
{
|
||||
string Name {
|
||||
get;
|
||||
}
|
||||
|
||||
Type Type {
|
||||
get;
|
||||
}
|
||||
|
||||
int Token {
|
||||
get;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,11 +9,13 @@
|
||||
<csc target="library" output="../lib/Mono.CSharp.Debugger.dll" debug="${debug}">
|
||||
<arg value="/nowarn:1595"/>
|
||||
<arg value="/unsafe"/>
|
||||
<arg value="/r:../lib/corlib.dll"/>
|
||||
<sources>
|
||||
<includes name="**/*.cs"/>
|
||||
<excludes name="Test/**"/>
|
||||
</sources>
|
||||
<references>
|
||||
<includes name="../lib/corlib.dll"/>
|
||||
</references>
|
||||
</csc>
|
||||
</target>
|
||||
<target name="clean">
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
//
|
||||
// System.Diagnostics.SymbolStore/MonoSymbolDocumentWriter.cs
|
||||
//
|
||||
// Author:
|
||||
// Martin Baulig ([email protected])
|
||||
//
|
||||
// This is the default implementation of the
|
||||
// System.Diagnostics.SymbolStore.ISymbolDocumentWriter interface.
|
||||
//
|
||||
// (C) 2002 Ximian, Inc. http://www.ximian.com
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Reflection.Emit;
|
||||
using System.Diagnostics.SymbolStore;
|
||||
using System.IO;
|
||||
|
||||
namespace Mono.CSharp.Debugger
|
||||
{
|
||||
|
||||
public class MonoSymbolDocumentWriter : ISymbolDocumentWriter
|
||||
{
|
||||
protected string url;
|
||||
|
||||
//
|
||||
// Constructor
|
||||
//
|
||||
public MonoSymbolDocumentWriter (string url)
|
||||
{
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
public string FileName {
|
||||
get {
|
||||
return url;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Interface ISymbolDocumentWriter
|
||||
//
|
||||
|
||||
//
|
||||
// MonoSymbolWriter creates a DWARF 2 debugging file and DWARF operates
|
||||
// on file names, but has no way to include a whole source file in the
|
||||
// symbol file.
|
||||
//
|
||||
|
||||
public void SetCheckSum (Guid algorithmId, byte[] checkSum)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public void SetSource (byte[] source)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,607 +0,0 @@
|
||||
//
|
||||
// System.Diagnostics.SymbolStore/MonoSymbolFile.cs
|
||||
//
|
||||
// Author:
|
||||
// Martin Baulig ([email protected])
|
||||
//
|
||||
// (C) 2003 Ximian, Inc. http://www.ximian.com
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Reflection.Emit;
|
||||
using System.Collections;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
|
||||
namespace Mono.CSharp.Debugger
|
||||
{
|
||||
public class MonoSymbolFileException : Exception
|
||||
{
|
||||
public MonoSymbolFileException ()
|
||||
: base ()
|
||||
{ }
|
||||
|
||||
public MonoSymbolFileException (string message, params object[] args)
|
||||
: base (String.Format (message, args))
|
||||
{ }
|
||||
}
|
||||
|
||||
internal class MyMemoryStream : Stream
|
||||
{
|
||||
int length;
|
||||
int real_length;
|
||||
int position;
|
||||
|
||||
int chunk_size = 4096;
|
||||
ArrayList chunks = new ArrayList ();
|
||||
|
||||
private struct Chunk {
|
||||
public readonly int Offset;
|
||||
public readonly int Length;
|
||||
public byte[] Buffer;
|
||||
|
||||
public Chunk (int offset, int length)
|
||||
{
|
||||
this.Offset = offset;
|
||||
this.Length = length;
|
||||
this.Buffer = new Byte [length];
|
||||
}
|
||||
}
|
||||
|
||||
public override long Position {
|
||||
get { return position; }
|
||||
|
||||
set {
|
||||
if (value > length)
|
||||
throw new ArgumentOutOfRangeException ();
|
||||
|
||||
position = (int) value;
|
||||
}
|
||||
}
|
||||
|
||||
public override long Length {
|
||||
get { return length; }
|
||||
}
|
||||
|
||||
public override bool CanRead {
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public override bool CanWrite {
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public override bool CanSeek {
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public override void SetLength (long new_length)
|
||||
{
|
||||
if (new_length < length)
|
||||
throw new ArgumentException ();
|
||||
|
||||
while (new_length >= real_length) {
|
||||
Chunk new_chunk = new Chunk (real_length, chunk_size);
|
||||
chunks.Add (new_chunk);
|
||||
real_length += chunk_size;
|
||||
}
|
||||
|
||||
length = (int) new_length;
|
||||
}
|
||||
|
||||
public override void Flush ()
|
||||
{ }
|
||||
|
||||
public override long Seek (long offset, SeekOrigin origin)
|
||||
{
|
||||
int ref_point;
|
||||
|
||||
switch (origin) {
|
||||
case SeekOrigin.Begin:
|
||||
ref_point = 0;
|
||||
break;
|
||||
case SeekOrigin.Current:
|
||||
ref_point = position;
|
||||
break;
|
||||
case SeekOrigin.End:
|
||||
ref_point = length;
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentException ("Invalid SeekOrigin");
|
||||
}
|
||||
|
||||
if ((ref_point + offset < 0) || (offset > real_length))
|
||||
throw new ArgumentOutOfRangeException ();
|
||||
|
||||
position = ref_point + (int) offset;
|
||||
|
||||
return position;
|
||||
}
|
||||
|
||||
Chunk FindChunk (int offset)
|
||||
{
|
||||
return (Chunk) chunks [offset / chunk_size];
|
||||
}
|
||||
|
||||
public override int Read (byte[] buffer, int offset, int count)
|
||||
{
|
||||
int old_count = count;
|
||||
|
||||
while (count > 0) {
|
||||
Chunk chunk = FindChunk (position);
|
||||
int coffset = position - chunk.Offset;
|
||||
int rest = chunk.Length - coffset;
|
||||
int size = System.Math.Min (count, rest);
|
||||
|
||||
Array.Copy (chunk.Buffer, coffset, buffer, offset, size);
|
||||
position += size;
|
||||
offset += size;
|
||||
count -= size;
|
||||
}
|
||||
|
||||
return old_count;
|
||||
}
|
||||
|
||||
public override void Write (byte[] buffer, int offset, int count)
|
||||
{
|
||||
if (position + count > length)
|
||||
SetLength (position + count);
|
||||
|
||||
while (count > 0) {
|
||||
Chunk chunk = FindChunk (position);
|
||||
int coffset = position - chunk.Offset;
|
||||
int rest = chunk.Length - coffset;
|
||||
int size = System.Math.Min (count, rest);
|
||||
|
||||
Array.Copy (buffer, offset, chunk.Buffer, coffset, size);
|
||||
position += size;
|
||||
offset += size;
|
||||
count -= size;
|
||||
}
|
||||
}
|
||||
|
||||
public byte[] GetContents ()
|
||||
{
|
||||
byte[] retval = new byte [length];
|
||||
position = 0;
|
||||
Read (retval, 0, length);
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
|
||||
public class MonoSymbolFile : IDisposable
|
||||
{
|
||||
ArrayList methods = new ArrayList ();
|
||||
ArrayList sources = new ArrayList ();
|
||||
Hashtable method_source_hash = new Hashtable ();
|
||||
Hashtable type_hash = new Hashtable ();
|
||||
|
||||
OffsetTable ot;
|
||||
int last_type_index;
|
||||
int last_method_index;
|
||||
int last_source_index;
|
||||
int last_namespace_index;
|
||||
|
||||
public MonoSymbolFile ()
|
||||
{ }
|
||||
|
||||
internal int AddSource (SourceFileEntry source)
|
||||
{
|
||||
sources.Add (source);
|
||||
return ++last_source_index;
|
||||
}
|
||||
|
||||
internal int DefineType (Type type)
|
||||
{
|
||||
if (type_hash.Contains (type))
|
||||
return (int) type_hash [type];
|
||||
|
||||
int index = ++last_type_index;
|
||||
type_hash.Add (type, index);
|
||||
return index;
|
||||
}
|
||||
|
||||
internal void AddMethod (MethodEntry entry)
|
||||
{
|
||||
methods.Add (entry);
|
||||
}
|
||||
|
||||
internal int GetNextTypeIndex ()
|
||||
{
|
||||
return ++last_type_index;
|
||||
}
|
||||
|
||||
internal int GetNextMethodIndex ()
|
||||
{
|
||||
return ++last_method_index;
|
||||
}
|
||||
|
||||
internal int GetNextNamespaceIndex ()
|
||||
{
|
||||
return ++last_namespace_index;
|
||||
}
|
||||
|
||||
internal void WriteString (BinaryWriter bw, string text)
|
||||
{
|
||||
byte[] data = Encoding.UTF8.GetBytes (text);
|
||||
bw.Write ((int) data.Length);
|
||||
bw.Write (data);
|
||||
StringSize += data.Length;
|
||||
}
|
||||
|
||||
internal string ReadString (int offset)
|
||||
{
|
||||
int old_pos = (int) reader.BaseStream.Position;
|
||||
reader.BaseStream.Position = offset;
|
||||
int length = reader.ReadInt32 ();
|
||||
|
||||
byte[] data = reader.ReadBytes (length);
|
||||
string text = Encoding.UTF8.GetString (data);
|
||||
reader.BaseStream.Position = old_pos;
|
||||
return text;
|
||||
}
|
||||
|
||||
void Write (BinaryWriter bw)
|
||||
{
|
||||
// Magic number and file version.
|
||||
bw.Write (OffsetTable.Magic);
|
||||
bw.Write (OffsetTable.Version);
|
||||
|
||||
//
|
||||
// Offsets of file sections; we must write this after we're done
|
||||
// writing the whole file, so we just reserve the space for it here.
|
||||
//
|
||||
long offset_table_offset = bw.BaseStream.Position;
|
||||
ot.Write (bw);
|
||||
|
||||
//
|
||||
// Write data sections.
|
||||
//
|
||||
ot.DataSectionOffset = (int) bw.BaseStream.Position;
|
||||
foreach (SourceFileEntry source in sources)
|
||||
source.WriteData (bw);
|
||||
ot.DataSectionSize = (int) bw.BaseStream.Position - ot.DataSectionOffset;
|
||||
|
||||
//
|
||||
// Write method table.
|
||||
//
|
||||
ot.MethodTableOffset = (int) bw.BaseStream.Position;
|
||||
for (int i = 0; i < methods.Count; i++) {
|
||||
MethodEntry entry = (MethodEntry) methods [i];
|
||||
entry.WriteIndex (bw);
|
||||
}
|
||||
ot.MethodTableSize = (int) bw.BaseStream.Position - ot.MethodTableOffset;
|
||||
|
||||
//
|
||||
// Write source table.
|
||||
//
|
||||
ot.SourceTableOffset = (int) bw.BaseStream.Position;
|
||||
for (int i = 0; i < sources.Count; i++) {
|
||||
SourceFileEntry source = (SourceFileEntry) sources [i];
|
||||
source.Write (bw);
|
||||
}
|
||||
ot.SourceTableSize = (int) bw.BaseStream.Position - ot.SourceTableOffset;
|
||||
|
||||
//
|
||||
// Fixup offset table.
|
||||
//
|
||||
ot.TypeCount = last_type_index;
|
||||
ot.MethodCount = methods.Count;
|
||||
ot.SourceCount = sources.Count;
|
||||
|
||||
//
|
||||
// Write offset table.
|
||||
//
|
||||
ot.TotalFileSize = (int) bw.BaseStream.Position;
|
||||
bw.Seek ((int) offset_table_offset, SeekOrigin.Begin);
|
||||
ot.Write (bw);
|
||||
bw.Seek (0, SeekOrigin.End);
|
||||
}
|
||||
|
||||
public byte[] CreateSymbolFile ()
|
||||
{
|
||||
if (reader != null)
|
||||
throw new InvalidOperationException ();
|
||||
|
||||
using (MyMemoryStream stream = new MyMemoryStream ()) {
|
||||
Write (new BinaryWriter (stream));
|
||||
Console.WriteLine ("WROTE SYMFILE: {0} sources, {1} methods, {2} types, " +
|
||||
"{3} line numbers, {4} locals, {5} namespaces, " +
|
||||
"{6} bytes of string data",
|
||||
SourceCount, MethodCount, TypeCount, LineNumberCount,
|
||||
LocalCount, NamespaceCount, StringSize);
|
||||
Console.WriteLine (ot);
|
||||
return stream.GetContents ();
|
||||
}
|
||||
}
|
||||
|
||||
Assembly assembly;
|
||||
BinaryReader reader;
|
||||
Hashtable method_hash;
|
||||
Hashtable source_file_hash;
|
||||
|
||||
Hashtable method_token_hash;
|
||||
Hashtable method_name_hash;
|
||||
Hashtable method_full_name_hash;
|
||||
Hashtable source_name_hash;
|
||||
|
||||
protected MonoSymbolFile (Assembly assembly, Stream stream)
|
||||
{
|
||||
this.assembly = assembly;
|
||||
|
||||
reader = new BinaryReader (stream);
|
||||
|
||||
try {
|
||||
long magic = reader.ReadInt64 ();
|
||||
long version = reader.ReadInt32 ();
|
||||
if ((magic != OffsetTable.Magic) || (version != OffsetTable.Version))
|
||||
throw new MonoSymbolFileException ();
|
||||
ot = new OffsetTable (reader);
|
||||
} catch {
|
||||
throw new MonoSymbolFileException ();
|
||||
}
|
||||
|
||||
method_hash = new Hashtable ();
|
||||
source_file_hash = new Hashtable ();
|
||||
}
|
||||
|
||||
public static MonoSymbolFile ReadSymbolFile (Assembly assembly)
|
||||
{
|
||||
Stream stream = assembly.GetManifestResourceStream ("MonoSymbolFile");
|
||||
if (stream == null)
|
||||
return null;
|
||||
|
||||
return new MonoSymbolFile (assembly, stream);
|
||||
}
|
||||
|
||||
public Assembly Assembly {
|
||||
get { return assembly; }
|
||||
}
|
||||
|
||||
public int SourceCount {
|
||||
get { return ot.SourceCount; }
|
||||
}
|
||||
|
||||
public int MethodCount {
|
||||
get { return ot.MethodCount; }
|
||||
}
|
||||
|
||||
public int TypeCount {
|
||||
get { return ot.TypeCount; }
|
||||
}
|
||||
|
||||
public int NamespaceCount {
|
||||
get { return last_namespace_index; }
|
||||
}
|
||||
|
||||
internal int LineNumberCount = 0;
|
||||
internal int LocalCount = 0;
|
||||
internal int StringSize = 0;
|
||||
|
||||
public SourceFileEntry GetSourceFile (int index)
|
||||
{
|
||||
if ((index < 1) || (index > ot.SourceCount))
|
||||
throw new ArgumentException ();
|
||||
if (reader == null)
|
||||
throw new InvalidOperationException ();
|
||||
|
||||
SourceFileEntry source = (SourceFileEntry) source_file_hash [index];
|
||||
if (source != null)
|
||||
return source;
|
||||
|
||||
reader.BaseStream.Position = ot.SourceTableOffset +
|
||||
SourceFileEntry.Size * (index - 1);
|
||||
source = new SourceFileEntry (this, reader);
|
||||
source_file_hash.Add (index, source);
|
||||
return source;
|
||||
}
|
||||
|
||||
public SourceFileEntry[] Sources {
|
||||
get {
|
||||
if (reader == null)
|
||||
throw new InvalidOperationException ();
|
||||
|
||||
SourceFileEntry[] retval = new SourceFileEntry [SourceCount];
|
||||
for (int i = 0; i < SourceCount; i++)
|
||||
retval [i] = GetSourceFile (i + 1);
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
|
||||
public MethodIndexEntry GetMethodIndexEntry (int index)
|
||||
{
|
||||
int old_pos = (int) reader.BaseStream.Position;
|
||||
reader.BaseStream.Position = ot.MethodTableOffset +
|
||||
MethodIndexEntry.Size * (index - 1);
|
||||
MethodIndexEntry ie = new MethodIndexEntry (reader);
|
||||
reader.BaseStream.Position = old_pos;
|
||||
return ie;
|
||||
}
|
||||
|
||||
public MethodEntry GetMethodByToken (int token)
|
||||
{
|
||||
if (reader == null)
|
||||
throw new InvalidOperationException ();
|
||||
|
||||
if (method_token_hash == null) {
|
||||
method_token_hash = new Hashtable ();
|
||||
|
||||
for (int i = 0; i < MethodCount; i++) {
|
||||
MethodIndexEntry ie = GetMethodIndexEntry (i + 1);
|
||||
|
||||
method_token_hash.Add (ie.Token, i);
|
||||
}
|
||||
}
|
||||
|
||||
object value = method_token_hash [token];
|
||||
if (value == null)
|
||||
return null;
|
||||
|
||||
return GetMethod ((int) value);
|
||||
}
|
||||
|
||||
public MethodEntry GetMethod (MethodBase method)
|
||||
{
|
||||
if (reader == null)
|
||||
throw new InvalidOperationException ();
|
||||
int token = assembly.MonoDebugger_GetMethodToken (method);
|
||||
return GetMethodByToken (token);
|
||||
}
|
||||
|
||||
public MethodEntry GetMethod (int index)
|
||||
{
|
||||
if ((index < 1) || (index > ot.MethodCount))
|
||||
throw new ArgumentException ();
|
||||
if (reader == null)
|
||||
throw new InvalidOperationException ();
|
||||
|
||||
MethodEntry entry = (MethodEntry) method_hash [index];
|
||||
if (entry != null)
|
||||
return entry;
|
||||
|
||||
MethodIndexEntry ie = GetMethodIndexEntry (index);
|
||||
reader.BaseStream.Position = ie.FileOffset;
|
||||
|
||||
entry = new MethodEntry (this, reader, index);
|
||||
method_hash.Add (index, entry);
|
||||
return entry;
|
||||
}
|
||||
|
||||
public MethodEntry[] Methods {
|
||||
get {
|
||||
if (reader == null)
|
||||
throw new InvalidOperationException ();
|
||||
|
||||
MethodEntry[] retval = new MethodEntry [MethodCount];
|
||||
for (int i = 0; i < MethodCount; i++)
|
||||
retval [i] = GetMethod (i + 1);
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
|
||||
public MethodSourceEntry GetMethodSource (int index)
|
||||
{
|
||||
if ((index < 1) || (index > ot.MethodCount))
|
||||
throw new ArgumentException ();
|
||||
if (reader == null)
|
||||
throw new InvalidOperationException ();
|
||||
|
||||
object entry = method_source_hash [index];
|
||||
if (entry != null)
|
||||
return (MethodSourceEntry) entry;
|
||||
|
||||
MethodEntry method = GetMethod (index);
|
||||
foreach (MethodSourceEntry source in method.SourceFile.Methods) {
|
||||
if (source.Index == index) {
|
||||
method_source_hash.Add (index, source);
|
||||
return source;
|
||||
}
|
||||
}
|
||||
|
||||
throw new MonoSymbolFileException ("Internal error.");
|
||||
}
|
||||
|
||||
public int FindMethod (string full_name)
|
||||
{
|
||||
if (reader == null)
|
||||
throw new InvalidOperationException ();
|
||||
|
||||
if (method_full_name_hash == null) {
|
||||
method_full_name_hash = new Hashtable ();
|
||||
|
||||
for (int i = 0; i < ot.MethodCount; i++) {
|
||||
MethodIndexEntry ie = GetMethodIndexEntry (i + 1);
|
||||
string name = ReadString (ie.FullNameOffset);
|
||||
|
||||
method_full_name_hash.Add (name, i + 1);
|
||||
}
|
||||
}
|
||||
|
||||
object value = method_full_name_hash [full_name];
|
||||
if (value == null)
|
||||
return -1;
|
||||
return (int) value;
|
||||
}
|
||||
|
||||
public int[] MethodLookup (string query)
|
||||
{
|
||||
if (reader == null)
|
||||
throw new InvalidOperationException ();
|
||||
|
||||
ArrayList list;
|
||||
if (method_name_hash == null) {
|
||||
method_name_hash = new Hashtable ();
|
||||
|
||||
for (int i = 0; i < ot.MethodCount; i++) {
|
||||
MethodIndexEntry ie = GetMethodIndexEntry (i + 1);
|
||||
string full_name = ReadString (ie.FullNameOffset);
|
||||
|
||||
int pos = full_name.IndexOf ('(');
|
||||
string name = full_name.Substring (0, pos);
|
||||
|
||||
list = method_name_hash [name] as ArrayList;
|
||||
if (list == null) {
|
||||
list = new ArrayList ();
|
||||
method_name_hash.Add (name, list);
|
||||
}
|
||||
|
||||
list.Add (i + 1);
|
||||
}
|
||||
}
|
||||
|
||||
list = method_name_hash [query] as ArrayList;
|
||||
if (list == null)
|
||||
return new int [0];
|
||||
|
||||
int[] retval = new int [list.Count];
|
||||
list.CopyTo (retval, 0);
|
||||
return retval;
|
||||
}
|
||||
|
||||
public int FindSource (string file_name)
|
||||
{
|
||||
if (reader == null)
|
||||
throw new InvalidOperationException ();
|
||||
|
||||
if (source_name_hash == null) {
|
||||
source_name_hash = new Hashtable ();
|
||||
|
||||
for (int i = 0; i < ot.SourceCount; i++) {
|
||||
SourceFileEntry source = GetSourceFile (i + 1);
|
||||
|
||||
source_name_hash.Add (source.FileName, i);
|
||||
}
|
||||
}
|
||||
|
||||
object value = source_name_hash [file_name];
|
||||
if (value == null)
|
||||
return -1;
|
||||
return (int) value;
|
||||
}
|
||||
|
||||
internal BinaryReader BinaryReader {
|
||||
get {
|
||||
if (reader == null)
|
||||
throw new InvalidOperationException ();
|
||||
|
||||
return reader;
|
||||
}
|
||||
}
|
||||
|
||||
void IDisposable.Dispose ()
|
||||
{
|
||||
Dispose (true);
|
||||
}
|
||||
|
||||
protected virtual void Dispose (bool disposing)
|
||||
{
|
||||
if (disposing) {
|
||||
if (reader != null) {
|
||||
reader.Close ();
|
||||
reader = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,55 +18,64 @@ namespace Mono.CSharp.Debugger
|
||||
{
|
||||
public struct OffsetTable
|
||||
{
|
||||
public const int Version = 33;
|
||||
public const int Version = 28;
|
||||
public const long Magic = 0x45e82623fd7fa614;
|
||||
|
||||
public int TotalFileSize;
|
||||
public int DataSectionOffset;
|
||||
public int DataSectionSize;
|
||||
public int SourceCount;
|
||||
public int SourceTableOffset;
|
||||
public int SourceTableSize;
|
||||
public int MethodCount;
|
||||
public int MethodTableOffset;
|
||||
public int MethodTableSize;
|
||||
public int TypeCount;
|
||||
public int total_file_size;
|
||||
public int source_table_offset;
|
||||
public int source_table_size;
|
||||
public int method_count;
|
||||
public int method_table_offset;
|
||||
public int method_table_size;
|
||||
public int line_number_table_offset;
|
||||
public int line_number_table_size;
|
||||
public int local_variable_table_offset;
|
||||
public int local_variable_table_size;
|
||||
public int source_file_table_offset;
|
||||
public int source_file_table_size;
|
||||
public int source_file_count;
|
||||
public int type_count;
|
||||
public int type_index_table_offset;
|
||||
public int type_index_table_size;
|
||||
|
||||
internal OffsetTable (BinaryReader reader)
|
||||
public OffsetTable (IMonoBinaryReader reader)
|
||||
{
|
||||
TotalFileSize = reader.ReadInt32 ();
|
||||
DataSectionOffset = reader.ReadInt32 ();
|
||||
DataSectionSize = reader.ReadInt32 ();
|
||||
SourceCount = reader.ReadInt32 ();
|
||||
SourceTableOffset = reader.ReadInt32 ();
|
||||
SourceTableSize = reader.ReadInt32 ();
|
||||
MethodCount = reader.ReadInt32 ();
|
||||
MethodTableOffset = reader.ReadInt32 ();
|
||||
MethodTableSize = reader.ReadInt32 ();
|
||||
TypeCount = reader.ReadInt32 ();
|
||||
total_file_size = reader.ReadInt32 ();
|
||||
source_table_offset = reader.ReadInt32 ();
|
||||
source_table_size = reader.ReadInt32 ();
|
||||
method_count = reader.ReadInt32 ();
|
||||
method_table_offset = reader.ReadInt32 ();
|
||||
method_table_size = reader.ReadInt32 ();
|
||||
line_number_table_offset = reader.ReadInt32 ();
|
||||
line_number_table_size = reader.ReadInt32 ();
|
||||
local_variable_table_offset = reader.ReadInt32 ();
|
||||
local_variable_table_size = reader.ReadInt32 ();
|
||||
source_file_table_offset = reader.ReadInt32 ();
|
||||
source_file_table_size = reader.ReadInt32 ();
|
||||
source_file_count = reader.ReadInt32 ();
|
||||
type_count = reader.ReadInt32 ();
|
||||
type_index_table_offset = reader.ReadInt32 ();
|
||||
type_index_table_size = reader.ReadInt32 ();
|
||||
}
|
||||
|
||||
internal void Write (BinaryWriter bw)
|
||||
public void Write (BinaryWriter bw)
|
||||
{
|
||||
bw.Write (TotalFileSize);
|
||||
bw.Write (DataSectionOffset);
|
||||
bw.Write (DataSectionSize);
|
||||
bw.Write (SourceCount);
|
||||
bw.Write (SourceTableOffset);
|
||||
bw.Write (SourceTableSize);
|
||||
bw.Write (MethodCount);
|
||||
bw.Write (MethodTableOffset);
|
||||
bw.Write (MethodTableSize);
|
||||
bw.Write (TypeCount);
|
||||
}
|
||||
|
||||
public override string ToString ()
|
||||
{
|
||||
return String.Format (
|
||||
"OffsetTable [{0} - {1}:{2} - {3}:{4}:{5} - {6}:{7}:{8} - {9}]",
|
||||
TotalFileSize, DataSectionOffset, DataSectionSize, SourceCount,
|
||||
SourceTableOffset, SourceTableSize, MethodCount, MethodTableOffset,
|
||||
MethodTableSize, TypeCount);
|
||||
bw.Write (total_file_size);
|
||||
bw.Write (source_table_offset);
|
||||
bw.Write (source_table_size);
|
||||
bw.Write (method_count);
|
||||
bw.Write (method_table_offset);
|
||||
bw.Write (method_table_size);
|
||||
bw.Write (line_number_table_offset);
|
||||
bw.Write (line_number_table_size);
|
||||
bw.Write (local_variable_table_offset);
|
||||
bw.Write (local_variable_table_size);
|
||||
bw.Write (source_file_table_offset);
|
||||
bw.Write (source_file_table_size);
|
||||
bw.Write (source_file_count);
|
||||
bw.Write (type_count);
|
||||
bw.Write (type_index_table_offset);
|
||||
bw.Write (type_index_table_size);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,9 +90,11 @@ namespace Mono.CSharp.Debugger
|
||||
this.Offset = offset;
|
||||
}
|
||||
|
||||
public static LineNumberEntry Null = new LineNumberEntry (0, 0);
|
||||
internal LineNumberEntry (SourceLine line)
|
||||
: this (line.Row, line.Offset)
|
||||
{ }
|
||||
|
||||
internal LineNumberEntry (BinaryReader reader)
|
||||
public LineNumberEntry (IMonoBinaryReader reader)
|
||||
{
|
||||
Row = reader.ReadInt32 ();
|
||||
Offset = reader.ReadInt32 ();
|
||||
@@ -95,41 +106,6 @@ namespace Mono.CSharp.Debugger
|
||||
bw.Write (Offset);
|
||||
}
|
||||
|
||||
private class OffsetComparerClass : IComparer
|
||||
{
|
||||
public int Compare (object a, object b)
|
||||
{
|
||||
LineNumberEntry l1 = (LineNumberEntry) a;
|
||||
LineNumberEntry l2 = (LineNumberEntry) b;
|
||||
|
||||
if (l1.Offset < l2.Offset)
|
||||
return -1;
|
||||
else if (l1.Offset > l2.Offset)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
private class RowComparerClass : IComparer
|
||||
{
|
||||
public int Compare (object a, object b)
|
||||
{
|
||||
LineNumberEntry l1 = (LineNumberEntry) a;
|
||||
LineNumberEntry l2 = (LineNumberEntry) b;
|
||||
|
||||
if (l1.Row < l2.Row)
|
||||
return -1;
|
||||
else if (l1.Row > l2.Row)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public static readonly IComparer OffsetComparer = new OffsetComparerClass ();
|
||||
public static readonly IComparer RowComparer = new RowComparerClass ();
|
||||
|
||||
public override string ToString ()
|
||||
{
|
||||
return String.Format ("[Line {0}:{1}]", Row, Offset);
|
||||
@@ -149,19 +125,21 @@ namespace Mono.CSharp.Debugger
|
||||
this.Signature = Signature;
|
||||
}
|
||||
|
||||
internal LocalVariableEntry (BinaryReader reader)
|
||||
public LocalVariableEntry (IMonoBinaryReader reader)
|
||||
{
|
||||
int name_length = reader.ReadInt32 ();
|
||||
byte[] name = reader.ReadBytes (name_length);
|
||||
byte[] name = reader.ReadBuffer (name_length);
|
||||
Name = Encoding.UTF8.GetString (name);
|
||||
Attributes = (FieldAttributes) reader.ReadInt32 ();
|
||||
int sig_length = reader.ReadInt32 ();
|
||||
Signature = reader.ReadBytes (sig_length);
|
||||
Signature = reader.ReadBuffer (sig_length);
|
||||
}
|
||||
|
||||
internal void Write (MonoSymbolFile file, BinaryWriter bw)
|
||||
internal void Write (BinaryWriter bw)
|
||||
{
|
||||
file.WriteString (bw, Name);
|
||||
byte[] name = Encoding.UTF8.GetBytes (Name);
|
||||
bw.Write ((int) name.Length);
|
||||
bw.Write (name);
|
||||
bw.Write ((int) Attributes);
|
||||
bw.Write ((int) Signature.Length);
|
||||
bw.Write (Signature);
|
||||
@@ -175,129 +153,74 @@ namespace Mono.CSharp.Debugger
|
||||
|
||||
public class SourceFileEntry
|
||||
{
|
||||
MonoSymbolFile file;
|
||||
string file_name;
|
||||
public readonly string SourceFile;
|
||||
|
||||
IMonoBinaryReader reader;
|
||||
long method_position;
|
||||
ArrayList methods;
|
||||
ArrayList namespaces;
|
||||
int index, count, name_offset, method_offset;
|
||||
int namespace_count, nstable_offset;
|
||||
bool creating;
|
||||
int count;
|
||||
|
||||
public static int Size {
|
||||
get { return 24; }
|
||||
internal SourceFileEntry (string source_file)
|
||||
{
|
||||
this.SourceFile = source_file;
|
||||
this.methods = new ArrayList ();
|
||||
this.count = 0;
|
||||
}
|
||||
|
||||
internal SourceFileEntry (MonoSymbolFile file, string file_name)
|
||||
internal void AddMethod (MethodSourceEntry method)
|
||||
{
|
||||
this.file = file;
|
||||
this.file_name = file_name;
|
||||
this.index = file.AddSource (this);
|
||||
|
||||
creating = true;
|
||||
methods = new ArrayList ();
|
||||
namespaces = new ArrayList ();
|
||||
}
|
||||
|
||||
public void DefineMethod (MethodBase method, int token, LocalVariableEntry[] locals,
|
||||
LineNumberEntry[] lines, int start, int end, int namespace_id)
|
||||
{
|
||||
if (!creating)
|
||||
throw new InvalidOperationException ();
|
||||
|
||||
MethodEntry entry = new MethodEntry (
|
||||
file, this, method, token, locals, lines, start, end, namespace_id);
|
||||
|
||||
methods.Add (entry);
|
||||
file.AddMethod (entry);
|
||||
}
|
||||
|
||||
public int DefineNamespace (string name, string[] using_clauses, int parent)
|
||||
{
|
||||
if (!creating)
|
||||
throw new InvalidOperationException ();
|
||||
|
||||
int index = file.GetNextNamespaceIndex ();
|
||||
NamespaceEntry ns = new NamespaceEntry (name, index, using_clauses, parent);
|
||||
namespaces.Add (ns);
|
||||
return index;
|
||||
}
|
||||
|
||||
internal void WriteData (BinaryWriter bw)
|
||||
{
|
||||
name_offset = (int) bw.BaseStream.Position;
|
||||
file.WriteString (bw, file_name);
|
||||
|
||||
ArrayList list = new ArrayList ();
|
||||
foreach (MethodEntry entry in methods)
|
||||
list.Add (entry.Write (file, bw));
|
||||
list.Sort ();
|
||||
count = list.Count;
|
||||
|
||||
method_offset = (int) bw.BaseStream.Position;
|
||||
foreach (MethodSourceEntry method in list)
|
||||
method.Write (bw);
|
||||
|
||||
namespace_count = namespaces.Count;
|
||||
nstable_offset = (int) bw.BaseStream.Position;
|
||||
foreach (NamespaceEntry ns in namespaces)
|
||||
ns.Write (file, bw);
|
||||
methods.Add (method);
|
||||
count++;
|
||||
}
|
||||
|
||||
internal void Write (BinaryWriter bw)
|
||||
{
|
||||
bw.Write (index);
|
||||
bw.Write (count);
|
||||
bw.Write (namespace_count);
|
||||
bw.Write (name_offset);
|
||||
bw.Write (method_offset);
|
||||
bw.Write (nstable_offset);
|
||||
byte[] name = Encoding.UTF8.GetBytes (SourceFile);
|
||||
bw.Write ((int) name.Length);
|
||||
bw.Write (name);
|
||||
|
||||
methods.Sort ();
|
||||
bw.Write (methods.Count);
|
||||
foreach (MethodSourceEntry method in methods)
|
||||
method.Write (bw);
|
||||
}
|
||||
|
||||
internal SourceFileEntry (MonoSymbolFile file, BinaryReader reader)
|
||||
public SourceFileEntry (IMonoBinaryReader reader)
|
||||
{
|
||||
this.file = file;
|
||||
int name_length = reader.ReadInt32 ();
|
||||
byte[] name = reader.ReadBuffer (name_length);
|
||||
SourceFile = Encoding.UTF8.GetString (name);
|
||||
|
||||
index = reader.ReadInt32 ();
|
||||
count = reader.ReadInt32 ();
|
||||
namespace_count = reader.ReadInt32 ();
|
||||
name_offset = reader.ReadInt32 ();
|
||||
method_offset = reader.ReadInt32 ();
|
||||
nstable_offset = reader.ReadInt32 ();
|
||||
this.reader = reader;
|
||||
this.method_position = reader.Position;
|
||||
|
||||
file_name = file.ReadString (name_offset);
|
||||
}
|
||||
|
||||
public int Index {
|
||||
get { return index; }
|
||||
}
|
||||
|
||||
public string FileName {
|
||||
get { return file_name; }
|
||||
reader.Position += count * MethodSourceEntry.Size;
|
||||
}
|
||||
|
||||
public MethodSourceEntry[] Methods {
|
||||
get {
|
||||
if (creating)
|
||||
throw new InvalidOperationException ();
|
||||
|
||||
BinaryReader reader = file.BinaryReader;
|
||||
int old_pos = (int) reader.BaseStream.Position;
|
||||
|
||||
reader.BaseStream.Position = method_offset;
|
||||
ArrayList list = new ArrayList ();
|
||||
for (int i = 0; i < count; i ++)
|
||||
list.Add (new MethodSourceEntry (reader));
|
||||
reader.BaseStream.Position = old_pos;
|
||||
|
||||
MethodSourceEntry[] retval = new MethodSourceEntry [count];
|
||||
list.CopyTo (retval, 0);
|
||||
read_methods ();
|
||||
MethodSourceEntry[] retval = new MethodSourceEntry [methods.Count];
|
||||
methods.CopyTo (retval, 0);
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
|
||||
void read_methods ()
|
||||
{
|
||||
if (methods != null)
|
||||
return;
|
||||
|
||||
reader.Position = method_position;
|
||||
methods = new ArrayList ();
|
||||
for (int i = 0; i < count; i++)
|
||||
methods.Add (new MethodSourceEntry (reader));
|
||||
}
|
||||
|
||||
public override string ToString ()
|
||||
{
|
||||
return String.Format ("SourceFileEntry ({0}:{1}:{2})", index, file_name, count);
|
||||
return String.Format ("SourceFileEntry ({0}:{1})", SourceFile, count);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -316,7 +239,7 @@ namespace Mono.CSharp.Debugger
|
||||
this.EndRow = end;
|
||||
}
|
||||
|
||||
internal MethodSourceEntry (BinaryReader reader)
|
||||
public MethodSourceEntry (IMonoBinaryReader reader)
|
||||
{
|
||||
Index = reader.ReadInt32 ();
|
||||
FileOffset = reader.ReadInt32 ();
|
||||
@@ -324,8 +247,11 @@ namespace Mono.CSharp.Debugger
|
||||
EndRow = reader.ReadInt32 ();
|
||||
}
|
||||
|
||||
public static int Size {
|
||||
get { return 16; }
|
||||
public static int Size
|
||||
{
|
||||
get {
|
||||
return 16;
|
||||
}
|
||||
}
|
||||
|
||||
internal void Write (BinaryWriter bw)
|
||||
@@ -355,152 +281,84 @@ namespace Mono.CSharp.Debugger
|
||||
}
|
||||
}
|
||||
|
||||
public struct MethodIndexEntry
|
||||
{
|
||||
public readonly int FileOffset;
|
||||
public readonly int FullNameOffset;
|
||||
public readonly int Token;
|
||||
|
||||
public static int Size {
|
||||
get { return 12; }
|
||||
}
|
||||
|
||||
public MethodIndexEntry (int offset, int name_offset, int token)
|
||||
{
|
||||
this.FileOffset = offset;
|
||||
this.FullNameOffset = name_offset;
|
||||
this.Token = token;
|
||||
}
|
||||
|
||||
internal MethodIndexEntry (BinaryReader reader)
|
||||
{
|
||||
FileOffset = reader.ReadInt32 ();
|
||||
FullNameOffset = reader.ReadInt32 ();
|
||||
Token = reader.ReadInt32 ();
|
||||
}
|
||||
|
||||
internal void Write (BinaryWriter bw)
|
||||
{
|
||||
bw.Write (FileOffset);
|
||||
bw.Write (FullNameOffset);
|
||||
bw.Write (Token);
|
||||
}
|
||||
|
||||
public override string ToString ()
|
||||
{
|
||||
return String.Format ("MethodIndexEntry ({0}:{1}:{2:x})",
|
||||
FileOffset, FullNameOffset, Token);
|
||||
}
|
||||
}
|
||||
|
||||
public class MethodEntry
|
||||
{
|
||||
#region This is actually written to the symbol file
|
||||
public readonly int SourceFileIndex;
|
||||
public readonly int Token;
|
||||
public readonly int StartRow;
|
||||
public readonly int EndRow;
|
||||
public readonly int ClassTypeIndex;
|
||||
public readonly int NumLineNumbers;
|
||||
public readonly int ThisTypeIndex;
|
||||
public readonly int NumParameters;
|
||||
public readonly int NumLocals;
|
||||
public readonly int NumLineNumbers;
|
||||
public readonly int NamespaceID;
|
||||
|
||||
int NameOffset;
|
||||
int FullNameOffset;
|
||||
int TypeIndexTableOffset;
|
||||
int LocalVariableTableOffset;
|
||||
int LineNumberTableOffset;
|
||||
#endregion
|
||||
public int TypeIndexTableOffset;
|
||||
public int LocalVariableTableOffset;
|
||||
public readonly int SourceFileOffset;
|
||||
public readonly int LineNumberTableOffset;
|
||||
|
||||
int index;
|
||||
int file_offset;
|
||||
string name;
|
||||
string full_name;
|
||||
MethodIndexEntry index_entry;
|
||||
public readonly string SourceFile = null;
|
||||
public readonly LineNumberEntry[] LineNumbers = null;
|
||||
public readonly int[] ParamTypeIndices = null;
|
||||
public readonly int[] LocalTypeIndices = null;
|
||||
public readonly LocalVariableEntry[] Locals = null;
|
||||
|
||||
public readonly SourceFileEntry SourceFile;
|
||||
public readonly LineNumberEntry[] LineNumbers;
|
||||
public readonly int[] ParamTypeIndices;
|
||||
public readonly int[] LocalTypeIndices;
|
||||
public readonly LocalVariableEntry[] Locals;
|
||||
public readonly Type[] LocalTypes;
|
||||
|
||||
public readonly MonoSymbolFile SymbolFile;
|
||||
|
||||
public static int Size {
|
||||
get { return 52; }
|
||||
}
|
||||
|
||||
public string Name {
|
||||
get { return name; }
|
||||
}
|
||||
|
||||
public string FullName {
|
||||
get { return full_name; }
|
||||
}
|
||||
|
||||
public MethodBase MethodBase {
|
||||
get { return SymbolFile.Assembly.MonoDebugger_GetMethod (Token); }
|
||||
public static int Size
|
||||
{
|
||||
get {
|
||||
return 44;
|
||||
}
|
||||
}
|
||||
|
||||
internal MethodEntry (MonoSymbolFile file, BinaryReader reader, int index)
|
||||
public MethodEntry (IMonoBinaryReader reader)
|
||||
{
|
||||
this.SymbolFile = file;
|
||||
this.index = index;
|
||||
SourceFileIndex = reader.ReadInt32 ();
|
||||
Token = reader.ReadInt32 ();
|
||||
StartRow = reader.ReadInt32 ();
|
||||
EndRow = reader.ReadInt32 ();
|
||||
ClassTypeIndex = reader.ReadInt32 ();
|
||||
ThisTypeIndex = reader.ReadInt32 ();
|
||||
NumParameters = reader.ReadInt32 ();
|
||||
NumLocals = reader.ReadInt32 ();
|
||||
NumLineNumbers = reader.ReadInt32 ();
|
||||
NameOffset = reader.ReadInt32 ();
|
||||
FullNameOffset = reader.ReadInt32 ();
|
||||
TypeIndexTableOffset = reader.ReadInt32 ();
|
||||
LocalVariableTableOffset = reader.ReadInt32 ();
|
||||
SourceFileOffset = reader.ReadInt32 ();
|
||||
LineNumberTableOffset = reader.ReadInt32 ();
|
||||
NamespaceID = reader.ReadInt32 ();
|
||||
|
||||
name = file.ReadString (NameOffset);
|
||||
full_name = file.ReadString (FullNameOffset);
|
||||
|
||||
SourceFile = file.GetSourceFile (SourceFileIndex);
|
||||
if (SourceFileOffset != 0) {
|
||||
long old_pos = reader.Position;
|
||||
reader.Position = SourceFileOffset;
|
||||
int source_file_length = reader.ReadInt32 ();
|
||||
byte[] source_file = reader.ReadBuffer (source_file_length);
|
||||
SourceFile = Encoding.UTF8.GetString (source_file);
|
||||
reader.Position = old_pos;
|
||||
}
|
||||
|
||||
if (LineNumberTableOffset != 0) {
|
||||
long old_pos = reader.BaseStream.Position;
|
||||
reader.BaseStream.Position = LineNumberTableOffset;
|
||||
long old_pos = reader.Position;
|
||||
reader.Position = LineNumberTableOffset;
|
||||
|
||||
LineNumbers = new LineNumberEntry [NumLineNumbers];
|
||||
|
||||
for (int i = 0; i < NumLineNumbers; i++)
|
||||
LineNumbers [i] = new LineNumberEntry (reader);
|
||||
|
||||
reader.BaseStream.Position = old_pos;
|
||||
reader.Position = old_pos;
|
||||
}
|
||||
|
||||
if (LocalVariableTableOffset != 0) {
|
||||
long old_pos = reader.BaseStream.Position;
|
||||
reader.BaseStream.Position = LocalVariableTableOffset;
|
||||
long old_pos = reader.Position;
|
||||
reader.Position = LocalVariableTableOffset;
|
||||
|
||||
Locals = new LocalVariableEntry [NumLocals];
|
||||
LocalTypes = new Type [NumLocals];
|
||||
|
||||
Assembly ass = file.Assembly;
|
||||
|
||||
for (int i = 0; i < NumLocals; i++) {
|
||||
for (int i = 0; i < NumLocals; i++)
|
||||
Locals [i] = new LocalVariableEntry (reader);
|
||||
LocalTypes [i] = ass.MonoDebugger_GetLocalTypeFromSignature (
|
||||
Locals [i].Signature);
|
||||
}
|
||||
|
||||
reader.BaseStream.Position = old_pos;
|
||||
reader.Position = old_pos;
|
||||
}
|
||||
|
||||
if (TypeIndexTableOffset != 0) {
|
||||
long old_pos = reader.BaseStream.Position;
|
||||
reader.BaseStream.Position = TypeIndexTableOffset;
|
||||
long old_pos = reader.Position;
|
||||
reader.Position = TypeIndexTableOffset;
|
||||
|
||||
ParamTypeIndices = new int [NumParameters];
|
||||
LocalTypeIndices = new int [NumLocals];
|
||||
@@ -510,180 +368,52 @@ namespace Mono.CSharp.Debugger
|
||||
for (int i = 0; i < NumLocals; i++)
|
||||
LocalTypeIndices [i] = reader.ReadInt32 ();
|
||||
|
||||
reader.BaseStream.Position = old_pos;
|
||||
reader.Position = old_pos;
|
||||
}
|
||||
}
|
||||
|
||||
internal MethodEntry (MonoSymbolFile file, SourceFileEntry source, MethodBase method,
|
||||
int token, LocalVariableEntry[] locals, LineNumberEntry[] lines,
|
||||
int start_row, int end_row, int namespace_id)
|
||||
internal MethodEntry (int token, int sf_offset, string source_file,
|
||||
int this_type_index, int[] param_type_indices,
|
||||
int[] local_type_indices, LocalVariableEntry[] locals,
|
||||
LineNumberEntry[] lines, int lnt_offset,
|
||||
int start_row, int end_row)
|
||||
{
|
||||
this.SymbolFile = file;
|
||||
index = file.GetNextMethodIndex ();
|
||||
|
||||
Token = token;
|
||||
SourceFileIndex = source.Index;
|
||||
SourceFile = source;
|
||||
StartRow = start_row;
|
||||
EndRow = end_row;
|
||||
NamespaceID = namespace_id;
|
||||
|
||||
LineNumbers = BuildLineNumberTable (lines);
|
||||
NumLineNumbers = LineNumbers.Length;
|
||||
|
||||
ParameterInfo[] parameters = method.GetParameters ();
|
||||
if (parameters == null)
|
||||
parameters = new ParameterInfo [0];
|
||||
|
||||
StringBuilder sb = new StringBuilder ();
|
||||
sb.Append (method.DeclaringType.FullName);
|
||||
sb.Append (".");
|
||||
sb.Append (method.Name);
|
||||
sb.Append ("(");
|
||||
for (int i = 0; i < parameters.Length; i++) {
|
||||
if (i > 0)
|
||||
sb.Append (",");
|
||||
sb.Append (parameters [i].ParameterType.FullName);
|
||||
}
|
||||
sb.Append (")");
|
||||
|
||||
name = method.Name;
|
||||
full_name = sb.ToString ();
|
||||
|
||||
NumParameters = parameters.Length;
|
||||
ParamTypeIndices = new int [NumParameters];
|
||||
for (int i = 0; i < NumParameters; i++)
|
||||
ParamTypeIndices [i] = file.DefineType (parameters [i].ParameterType);
|
||||
|
||||
NumLocals = locals.Length;
|
||||
Locals = locals;
|
||||
|
||||
LocalTypeIndices = new int [NumLocals];
|
||||
for (int i = 0; i < NumLocals; i++)
|
||||
LocalTypeIndices [i] = file.GetNextTypeIndex ();
|
||||
|
||||
ClassTypeIndex = file.DefineType (method.ReflectedType);
|
||||
this.Token = token;
|
||||
this.StartRow = start_row;
|
||||
this.EndRow = end_row;
|
||||
this.NumLineNumbers = lines.Length;
|
||||
this.ThisTypeIndex = this_type_index;
|
||||
this.NumParameters = param_type_indices.Length;
|
||||
this.NumLocals = local_type_indices.Length;
|
||||
this.ParamTypeIndices = param_type_indices;
|
||||
this.LocalTypeIndices = local_type_indices;
|
||||
this.Locals = locals;
|
||||
this.SourceFileOffset = sf_offset;
|
||||
this.LineNumberTableOffset = lnt_offset;
|
||||
this.SourceFile = source_file;
|
||||
this.LineNumbers = lines;
|
||||
}
|
||||
|
||||
LineNumberEntry[] BuildLineNumberTable (LineNumberEntry[] line_numbers)
|
||||
internal void Write (BinaryWriter bw)
|
||||
{
|
||||
ArrayList list = new ArrayList ();
|
||||
int last_offset = -1;
|
||||
int last_row = -1;
|
||||
|
||||
for (int i = 0; i < line_numbers.Length; i++) {
|
||||
LineNumberEntry line = (LineNumberEntry) line_numbers [i];
|
||||
|
||||
if (line.Offset > last_offset) {
|
||||
if (last_row >= 0)
|
||||
list.Add (new LineNumberEntry (last_row, last_offset));
|
||||
last_row = line.Row;
|
||||
last_offset = line.Offset;
|
||||
} else if (line.Row > last_row) {
|
||||
last_row = line.Row;
|
||||
}
|
||||
}
|
||||
|
||||
if (last_row >= 0)
|
||||
list.Add (new LineNumberEntry (last_row, last_offset));
|
||||
|
||||
LineNumberEntry[] retval = new LineNumberEntry [list.Count];
|
||||
list.CopyTo (retval, 0);
|
||||
return retval;
|
||||
}
|
||||
|
||||
internal MethodSourceEntry Write (MonoSymbolFile file, BinaryWriter bw)
|
||||
{
|
||||
NameOffset = (int) bw.BaseStream.Position;
|
||||
file.WriteString (bw, name);
|
||||
|
||||
FullNameOffset = (int) bw.BaseStream.Position;
|
||||
file.WriteString (bw, full_name);
|
||||
|
||||
TypeIndexTableOffset = (int) bw.BaseStream.Position;
|
||||
|
||||
for (int i = 0; i < NumParameters; i++)
|
||||
bw.Write (ParamTypeIndices [i]);
|
||||
for (int i = 0; i < NumLocals; i++)
|
||||
bw.Write (LocalTypeIndices [i]);
|
||||
|
||||
LocalVariableTableOffset = (int) bw.BaseStream.Position;
|
||||
|
||||
for (int i = 0; i < NumLocals; i++)
|
||||
Locals [i].Write (file, bw);
|
||||
|
||||
LineNumberTableOffset = (int) bw.BaseStream.Position;
|
||||
|
||||
for (int i = 0; i < NumLineNumbers; i++)
|
||||
LineNumbers [i].Write (bw);
|
||||
|
||||
file.LineNumberCount += NumLineNumbers;
|
||||
file.LocalCount += NumLocals;
|
||||
|
||||
file_offset = (int) bw.BaseStream.Position;
|
||||
|
||||
index_entry = new MethodIndexEntry (file_offset, FullNameOffset, Token);
|
||||
|
||||
bw.Write (SourceFileIndex);
|
||||
bw.Write (Token);
|
||||
bw.Write (StartRow);
|
||||
bw.Write (EndRow);
|
||||
bw.Write (ClassTypeIndex);
|
||||
bw.Write (ThisTypeIndex);
|
||||
bw.Write (NumParameters);
|
||||
bw.Write (NumLocals);
|
||||
bw.Write (NumLineNumbers);
|
||||
bw.Write (NameOffset);
|
||||
bw.Write (FullNameOffset);
|
||||
bw.Write (TypeIndexTableOffset);
|
||||
bw.Write (LocalVariableTableOffset);
|
||||
bw.Write (SourceFileOffset);
|
||||
bw.Write (LineNumberTableOffset);
|
||||
bw.Write (NamespaceID);
|
||||
|
||||
return new MethodSourceEntry (index, file_offset, StartRow, EndRow);
|
||||
}
|
||||
|
||||
internal void WriteIndex (BinaryWriter bw)
|
||||
{
|
||||
index_entry.Write (bw);
|
||||
}
|
||||
|
||||
public override string ToString ()
|
||||
{
|
||||
return String.Format ("[Method {0}:{1}:{2}:{3}:{4} - {7}:{8}:{9}:{10} - {5} - {6}]",
|
||||
index, Token, SourceFileIndex, StartRow, EndRow,
|
||||
SourceFile, FullName, ClassTypeIndex, NumParameters,
|
||||
NumLocals, NumLineNumbers);
|
||||
}
|
||||
}
|
||||
|
||||
public struct NamespaceEntry
|
||||
{
|
||||
public readonly string Name;
|
||||
public readonly int Index;
|
||||
public readonly int Parent;
|
||||
public readonly string[] UsingClauses;
|
||||
|
||||
public NamespaceEntry (string name, int index, string[] using_clauses, int parent)
|
||||
{
|
||||
this.Name = name;
|
||||
this.Index = index;
|
||||
this.Parent = parent;
|
||||
this.UsingClauses = using_clauses != null ? using_clauses : new string [0];
|
||||
}
|
||||
|
||||
internal void Write (MonoSymbolFile file, BinaryWriter bw)
|
||||
{
|
||||
file.WriteString (bw, Name);
|
||||
bw.Write (Index);
|
||||
bw.Write (Parent);
|
||||
bw.Write (UsingClauses.Length);
|
||||
foreach (string uc in UsingClauses)
|
||||
file.WriteString (bw, uc);
|
||||
}
|
||||
|
||||
public override string ToString ()
|
||||
{
|
||||
return String.Format ("[Namespace {0}:{1}:{2}]", Name, Index, Parent);
|
||||
return String.Format ("[Method {0}:{1}:{2}:{3}:{4} - {5}:{6}]",
|
||||
Token, SourceFile, StartRow, EndRow,
|
||||
NumLineNumbers, SourceFileOffset, LineNumberTableOffset);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,213 @@
|
||||
//
|
||||
// System.Diagnostics.SymbolStore/MonoSymbolTableWriter.cs
|
||||
//
|
||||
// Author:
|
||||
// Martin Baulig ([email protected])
|
||||
//
|
||||
// (C) 2002 Ximian, Inc. http://www.ximian.com
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Reflection.Emit;
|
||||
using System.Collections;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
|
||||
namespace Mono.CSharp.Debugger
|
||||
{
|
||||
internal class MonoSymbolTableWriter : IDisposable
|
||||
{
|
||||
BinaryWriter bw;
|
||||
Hashtable type_hash;
|
||||
int last_type_index;
|
||||
|
||||
public MonoSymbolTableWriter (string output_filename)
|
||||
{
|
||||
FileStream stream = new FileStream (output_filename, FileMode.Create);
|
||||
bw = new BinaryWriter (stream);
|
||||
type_hash = new Hashtable ();
|
||||
}
|
||||
|
||||
int GetTypeIndex (Type type)
|
||||
{
|
||||
if (type_hash.Contains (type))
|
||||
return (int) type_hash [type];
|
||||
|
||||
int index = ++last_type_index;
|
||||
type_hash.Add (type, index);
|
||||
return index;
|
||||
}
|
||||
|
||||
public void WriteSymbolTable (MonoSymbolWriter symwriter)
|
||||
{
|
||||
// Magic number and file version.
|
||||
bw.Write (OffsetTable.Magic);
|
||||
bw.Write (OffsetTable.Version);
|
||||
|
||||
OffsetTable ot = new OffsetTable ();
|
||||
|
||||
//
|
||||
// Offsets of file sections; we must write this after we're done
|
||||
// writing the whole file, so we just reserve the space for it here.
|
||||
//
|
||||
long offset_table_offset = bw.BaseStream.Position;
|
||||
ot.Write (bw);
|
||||
|
||||
//
|
||||
// Write source file table.
|
||||
//
|
||||
Hashtable sources = new Hashtable ();
|
||||
|
||||
ot.source_table_offset = (int) bw.BaseStream.Position;
|
||||
foreach (SourceFile source in symwriter.Sources) {
|
||||
if (sources.ContainsKey (source))
|
||||
continue;
|
||||
|
||||
sources.Add (source, (int) bw.BaseStream.Position);
|
||||
byte[] file_name = Encoding.UTF8.GetBytes (source.FileName);
|
||||
bw.Write ((int) file_name.Length);
|
||||
bw.Write (file_name);
|
||||
}
|
||||
ot.source_table_size = (int) bw.BaseStream.Position - ot.source_table_offset;
|
||||
|
||||
Hashtable source_table = new Hashtable ();
|
||||
|
||||
//
|
||||
// Write line number table
|
||||
//
|
||||
ArrayList methods = new ArrayList ();
|
||||
|
||||
int num_methods = 0;
|
||||
|
||||
ot.line_number_table_offset = (int) bw.BaseStream.Position;
|
||||
foreach (SourceMethod method in symwriter.Methods) {
|
||||
if (method.Start == null || method.Start.Row == 0)
|
||||
continue;
|
||||
|
||||
int count = method.Lines.Length;
|
||||
LineNumberEntry[] lines = new LineNumberEntry [count];
|
||||
|
||||
int pos = (int) bw.BaseStream.Position;
|
||||
|
||||
int num_params = method.Parameters.Length;
|
||||
int[] param_type_indices = new int [num_params];
|
||||
for (int i = 0; i < num_params; i++) {
|
||||
Type type = method.Parameters [i].ParameterType;
|
||||
param_type_indices [i] = GetTypeIndex (type);
|
||||
}
|
||||
|
||||
int num_locals = method.Locals.Length;
|
||||
int[] local_type_indices = new int [num_locals];
|
||||
for (int i = 0; i < num_locals; i++)
|
||||
local_type_indices [i] = ++last_type_index;
|
||||
|
||||
int type_index_table_offset = ot.type_index_table_size;
|
||||
ot.type_index_table_size += 4 * (num_params + num_locals);
|
||||
|
||||
int this_type_index = 0;
|
||||
if (!method.MethodBase.IsStatic)
|
||||
this_type_index = GetTypeIndex (method.MethodBase.ReflectedType);
|
||||
|
||||
for (int i = 0; i < count; i++) {
|
||||
lines [i] = new LineNumberEntry (method.Lines [i]);
|
||||
lines [i].Write (bw);
|
||||
}
|
||||
|
||||
MethodEntry entry = new MethodEntry (
|
||||
(int) method.Token, (int) sources [method.SourceFile],
|
||||
method.SourceFile.FileName, this_type_index,
|
||||
param_type_indices, local_type_indices, method.Locals, lines, pos,
|
||||
(int) method.Start.Row, (int) method.End.Row);
|
||||
|
||||
methods.Add (entry);
|
||||
}
|
||||
ot.line_number_table_size = (int) bw.BaseStream.Position -
|
||||
ot.line_number_table_offset;
|
||||
|
||||
//
|
||||
// Write type index table.
|
||||
//
|
||||
|
||||
ot.type_index_table_offset = (int) bw.BaseStream.Position;
|
||||
for (int i = 0; i < methods.Count; i++) {
|
||||
MethodEntry entry = (MethodEntry) methods [i];
|
||||
|
||||
entry.TypeIndexTableOffset = (int) bw.BaseStream.Position;
|
||||
|
||||
for (int j = 0; j < entry.NumParameters; j++)
|
||||
bw.Write (entry.ParamTypeIndices [j]);
|
||||
for (int j = 0; j < entry.NumLocals; j++)
|
||||
bw.Write (entry.LocalTypeIndices [j]);
|
||||
}
|
||||
ot.type_index_table_size = (int) bw.BaseStream.Position -
|
||||
ot.type_index_table_offset;
|
||||
|
||||
//
|
||||
// Write local variable table.
|
||||
//
|
||||
|
||||
ot.local_variable_table_offset = (int) bw.BaseStream.Position;
|
||||
for (int i = 0; i < methods.Count; i++) {
|
||||
MethodEntry entry = (MethodEntry) methods [i];
|
||||
|
||||
entry.LocalVariableTableOffset = (int) bw.BaseStream.Position;
|
||||
|
||||
for (int j = 0; j < entry.NumLocals; j++)
|
||||
entry.Locals [j].Write (bw);
|
||||
}
|
||||
ot.local_variable_table_size = (int) bw.BaseStream.Position -
|
||||
ot.local_variable_table_offset;
|
||||
|
||||
//
|
||||
// Write method table
|
||||
//
|
||||
ot.method_count = methods.Count;
|
||||
ot.method_table_offset = (int) bw.BaseStream.Position;
|
||||
for (int i = 0; i < methods.Count; i++) {
|
||||
MethodEntry entry = (MethodEntry) methods [i];
|
||||
SourceFileEntry source = (SourceFileEntry) source_table [entry.SourceFileOffset];
|
||||
if (source == null) {
|
||||
source = new SourceFileEntry (entry.SourceFile);
|
||||
source_table.Add (entry.SourceFileOffset, source);
|
||||
}
|
||||
|
||||
source.AddMethod (new MethodSourceEntry (
|
||||
i, (int) bw.BaseStream.Position, entry.StartRow, entry.EndRow));
|
||||
|
||||
entry.Write (bw);
|
||||
}
|
||||
ot.method_table_size = (int) bw.BaseStream.Position - ot.method_table_offset;
|
||||
|
||||
//
|
||||
// Write source file table.
|
||||
//
|
||||
ot.source_file_count = source_table.Count;
|
||||
ot.source_file_table_offset = (int) bw.BaseStream.Position;
|
||||
foreach (SourceFileEntry source in source_table.Values)
|
||||
source.Write (bw);
|
||||
ot.source_file_table_size = (int) bw.BaseStream.Position - ot.source_file_table_offset;
|
||||
|
||||
//
|
||||
// Write offset table
|
||||
//
|
||||
ot.type_count = last_type_index;
|
||||
ot.total_file_size = (int) bw.BaseStream.Position;
|
||||
bw.Seek ((int) offset_table_offset, SeekOrigin.Begin);
|
||||
ot.Write (bw);
|
||||
bw.Seek (0, SeekOrigin.End);
|
||||
}
|
||||
|
||||
void IDisposable.Dispose() {
|
||||
Dispose (true);
|
||||
}
|
||||
|
||||
protected virtual void Dispose (bool disposing)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
bw.Close ();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -20,15 +20,28 @@ using System.IO;
|
||||
|
||||
namespace Mono.CSharp.Debugger
|
||||
{
|
||||
internal class SourceFile : SourceFileEntry, ISymbolDocumentWriter
|
||||
internal class SourceFile
|
||||
{
|
||||
private ArrayList _methods = new ArrayList ();
|
||||
private string _file_name;
|
||||
|
||||
public SourceFile (MonoSymbolFile file, string filename)
|
||||
: base (file, filename)
|
||||
{ }
|
||||
public SourceFile (string filename)
|
||||
{
|
||||
this._file_name = filename;
|
||||
}
|
||||
|
||||
public new SourceMethod[] Methods {
|
||||
public override string ToString ()
|
||||
{
|
||||
return _file_name;
|
||||
}
|
||||
|
||||
public string FileName {
|
||||
get {
|
||||
return _file_name;
|
||||
}
|
||||
}
|
||||
|
||||
public SourceMethod[] Methods {
|
||||
get {
|
||||
SourceMethod[] retval = new SourceMethod [_methods.Count];
|
||||
_methods.CopyTo (retval);
|
||||
@@ -40,16 +53,6 @@ namespace Mono.CSharp.Debugger
|
||||
{
|
||||
_methods.Add (method);
|
||||
}
|
||||
|
||||
void ISymbolDocumentWriter.SetCheckSum (Guid algorithmId, byte[] checkSum)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
void ISymbolDocumentWriter.SetSource (byte[] source)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
internal class SourceBlock
|
||||
@@ -57,21 +60,30 @@ namespace Mono.CSharp.Debugger
|
||||
static private int next_index;
|
||||
private readonly int _index;
|
||||
|
||||
public SourceBlock (SourceMethod method, SourceLine start, SourceLine end)
|
||||
{
|
||||
this._method = method;
|
||||
this._start = start;
|
||||
this._end = end;
|
||||
this._index = ++next_index;
|
||||
}
|
||||
|
||||
internal SourceBlock (SourceMethod method, int startOffset)
|
||||
{
|
||||
this._method = method;
|
||||
this._start_offset = startOffset;
|
||||
this._start = new SourceLine (startOffset);
|
||||
this._index = ++next_index;
|
||||
}
|
||||
|
||||
public override string ToString ()
|
||||
{
|
||||
return "SourceBlock #" + ID;
|
||||
return "SourceBlock #" + ID + " (" + Start + " - " + End + ")";
|
||||
}
|
||||
|
||||
private readonly SourceMethod _method;
|
||||
private ArrayList _blocks = new ArrayList ();
|
||||
internal int _start_offset, _end_offset;
|
||||
internal SourceLine _start;
|
||||
internal SourceLine _end;
|
||||
|
||||
private ArrayList _locals = new ArrayList ();
|
||||
|
||||
@@ -94,6 +106,18 @@ namespace Mono.CSharp.Debugger
|
||||
_blocks.Add (block);
|
||||
}
|
||||
|
||||
public SourceLine Start {
|
||||
get {
|
||||
return _start;
|
||||
}
|
||||
}
|
||||
|
||||
public SourceLine End {
|
||||
get {
|
||||
return _end;
|
||||
}
|
||||
}
|
||||
|
||||
public int ID {
|
||||
get {
|
||||
return _index;
|
||||
@@ -114,6 +138,63 @@ namespace Mono.CSharp.Debugger
|
||||
}
|
||||
}
|
||||
|
||||
internal class SourceLine
|
||||
{
|
||||
public SourceLine (int row, int column)
|
||||
: this (0, row, column)
|
||||
{
|
||||
this._type = SourceOffsetType.OFFSET_NONE;
|
||||
}
|
||||
|
||||
public SourceLine (int offset, int row, int column)
|
||||
{
|
||||
this._offset = offset;
|
||||
this._row = row;
|
||||
this._column = column;
|
||||
this._type = SourceOffsetType.OFFSET_IL;
|
||||
}
|
||||
|
||||
internal SourceLine (int offset)
|
||||
: this (offset, 0, 0)
|
||||
{ }
|
||||
|
||||
public override string ToString ()
|
||||
{
|
||||
return "SourceLine (" + _offset + "@" + _row + ":" + _column + ")";
|
||||
}
|
||||
|
||||
internal SourceOffsetType _type;
|
||||
internal int _offset;
|
||||
internal int _row;
|
||||
internal int _column;
|
||||
|
||||
// interface SourceLine
|
||||
|
||||
public SourceOffsetType OffsetType {
|
||||
get {
|
||||
return _type;
|
||||
}
|
||||
}
|
||||
|
||||
public int Offset {
|
||||
get {
|
||||
return _offset;
|
||||
}
|
||||
}
|
||||
|
||||
public int Row {
|
||||
get {
|
||||
return _row;
|
||||
}
|
||||
}
|
||||
|
||||
public int Column {
|
||||
get {
|
||||
return _column;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal class SourceMethod
|
||||
{
|
||||
private ArrayList _lines = new ArrayList ();
|
||||
@@ -124,25 +205,32 @@ namespace Mono.CSharp.Debugger
|
||||
internal readonly MethodBase _method_base;
|
||||
internal SourceFile _source_file;
|
||||
internal int _token;
|
||||
private int _namespace_id;
|
||||
private LineNumberEntry _start, _end;
|
||||
|
||||
private SourceBlock _implicit_block;
|
||||
|
||||
internal SourceMethod (SourceFile source_file, int startLine, int startColumn,
|
||||
int endLine, int endColumn, MethodBase method_base,
|
||||
int namespace_id)
|
||||
public SourceMethod (MethodBase method_base, SourceFile source_file)
|
||||
: this (method_base)
|
||||
{
|
||||
this._source_file = source_file;
|
||||
}
|
||||
|
||||
internal SourceMethod (MethodBase method_base)
|
||||
{
|
||||
this._method_base = method_base;
|
||||
this._source_file = source_file;
|
||||
this._namespace_id = namespace_id;
|
||||
|
||||
this._start = new LineNumberEntry (startLine, 0);
|
||||
this._end = new LineNumberEntry (endLine, 0);
|
||||
|
||||
this._implicit_block = new SourceBlock (this, 0);
|
||||
}
|
||||
|
||||
public void SetSourceRange (SourceFile sourceFile,
|
||||
int startLine, int startColumn,
|
||||
int endLine, int endColumn)
|
||||
{
|
||||
_source_file = sourceFile;
|
||||
_implicit_block._start = new SourceLine (startLine, startColumn);
|
||||
_implicit_block._end = new SourceLine (endLine, endColumn);
|
||||
}
|
||||
|
||||
|
||||
public void StartBlock (SourceBlock block)
|
||||
{
|
||||
_block_stack.Push (block);
|
||||
@@ -151,7 +239,7 @@ namespace Mono.CSharp.Debugger
|
||||
public void EndBlock (int endOffset) {
|
||||
SourceBlock block = (SourceBlock) _block_stack.Pop ();
|
||||
|
||||
block._end_offset = endOffset;
|
||||
block._end = new SourceLine (endOffset);
|
||||
|
||||
if (_block_stack.Count > 0) {
|
||||
SourceBlock parent = (SourceBlock) _block_stack.Peek ();
|
||||
@@ -166,8 +254,8 @@ namespace Mono.CSharp.Debugger
|
||||
public void SetBlockRange (int BlockID, int startOffset, int endOffset)
|
||||
{
|
||||
SourceBlock block = (SourceBlock) _block_hash [BlockID];
|
||||
block._start_offset = startOffset;
|
||||
block._end_offset = endOffset;
|
||||
((SourceLine) block.Start)._offset = startOffset;
|
||||
((SourceLine) block.End)._offset = endOffset;
|
||||
}
|
||||
|
||||
public SourceBlock CurrentBlock {
|
||||
@@ -179,15 +267,15 @@ namespace Mono.CSharp.Debugger
|
||||
}
|
||||
}
|
||||
|
||||
public LineNumberEntry[] Lines {
|
||||
public SourceLine[] Lines {
|
||||
get {
|
||||
LineNumberEntry[] retval = new LineNumberEntry [_lines.Count];
|
||||
SourceLine[] retval = new SourceLine [_lines.Count];
|
||||
_lines.CopyTo (retval);
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
|
||||
public void AddLine (LineNumberEntry line)
|
||||
public void AddLine (SourceLine line)
|
||||
{
|
||||
_lines.Add (line);
|
||||
}
|
||||
@@ -262,39 +350,28 @@ namespace Mono.CSharp.Debugger
|
||||
}
|
||||
}
|
||||
|
||||
public bool HasSource {
|
||||
public SourceLine Start {
|
||||
get {
|
||||
return _source_file != null;
|
||||
return _implicit_block.Start;
|
||||
}
|
||||
}
|
||||
|
||||
public LineNumberEntry Start {
|
||||
public SourceLine End {
|
||||
get {
|
||||
return _start;
|
||||
}
|
||||
}
|
||||
|
||||
public LineNumberEntry End {
|
||||
get {
|
||||
return _end;
|
||||
}
|
||||
}
|
||||
|
||||
public int NamespaceID {
|
||||
get {
|
||||
return _namespace_id;
|
||||
return _implicit_block.End;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class MonoSymbolWriter : IMonoSymbolWriter
|
||||
{
|
||||
protected Assembly assembly;
|
||||
protected ModuleBuilder module_builder;
|
||||
protected ArrayList locals = null;
|
||||
protected ArrayList orphant_methods = null;
|
||||
protected ArrayList methods = null;
|
||||
protected Hashtable sources = null;
|
||||
private MonoSymbolFile file = null;
|
||||
private ArrayList mbuilder_array = null;
|
||||
|
||||
internal SourceMethod[] Methods {
|
||||
get {
|
||||
@@ -313,31 +390,31 @@ namespace Mono.CSharp.Debugger
|
||||
}
|
||||
|
||||
private SourceMethod current_method = null;
|
||||
private string assembly_filename = null;
|
||||
private string output_filename = null;
|
||||
|
||||
//
|
||||
// Interface IMonoSymbolWriter
|
||||
//
|
||||
|
||||
public MonoSymbolWriter (ModuleBuilder mb)
|
||||
public MonoSymbolWriter (ModuleBuilder mb, string filename, ArrayList mbuilder_array)
|
||||
{
|
||||
this.assembly_filename = filename;
|
||||
this.module_builder = mb;
|
||||
this.methods = new ArrayList ();
|
||||
this.sources = new Hashtable ();
|
||||
this.orphant_methods = new ArrayList ();
|
||||
this.locals = new ArrayList ();
|
||||
this.file = new MonoSymbolFile ();
|
||||
this.mbuilder_array = mbuilder_array;
|
||||
}
|
||||
|
||||
public void Close ()
|
||||
{
|
||||
throw new InvalidOperationException ();
|
||||
}
|
||||
public void Close () {
|
||||
if (assembly == null)
|
||||
assembly = Assembly.LoadFrom (assembly_filename);
|
||||
|
||||
public byte[] CreateSymbolFile (AssemblyBuilder assembly_builder)
|
||||
{
|
||||
DoFixups (assembly_builder);
|
||||
DoFixups (assembly);
|
||||
|
||||
return CreateOutput (assembly_builder);
|
||||
CreateOutput (assembly);
|
||||
}
|
||||
|
||||
public void CloseNamespace () {
|
||||
@@ -349,9 +426,7 @@ namespace Mono.CSharp.Debugger
|
||||
Guid languageVendor,
|
||||
Guid documentType)
|
||||
{
|
||||
SourceFile source_info = new SourceFile (file, url);
|
||||
sources.Add (url, source_info);
|
||||
return source_info;
|
||||
return new MonoSymbolDocumentWriter (url);
|
||||
}
|
||||
|
||||
public void DefineField (
|
||||
@@ -412,17 +487,14 @@ namespace Mono.CSharp.Debugger
|
||||
int[] columns,
|
||||
int[] endLines,
|
||||
int[] endColumns)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public void MarkSequencePoint (int offset, int line, int column)
|
||||
{
|
||||
if (current_method == null)
|
||||
return;
|
||||
|
||||
LineNumberEntry source_line = new LineNumberEntry (line, offset);
|
||||
current_method.AddLine (source_line);
|
||||
SourceLine source_line = new SourceLine (offsets [0], lines [0], columns [0]);
|
||||
|
||||
if (current_method != null)
|
||||
current_method.AddLine (source_line);
|
||||
}
|
||||
|
||||
public void Initialize (IntPtr emitter, string filename, bool fFullBuild)
|
||||
@@ -430,9 +502,26 @@ namespace Mono.CSharp.Debugger
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
|
||||
public void Initialize (string assembly_filename, string filename, string[] args)
|
||||
{
|
||||
this.output_filename = filename;
|
||||
this.assembly_filename = assembly_filename;
|
||||
}
|
||||
|
||||
public void OpenMethod (SymbolToken symbol_token)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
int token = symbol_token.GetToken ();
|
||||
|
||||
if ((token & 0xff000000) != 0x06000000)
|
||||
throw new ArgumentException ();
|
||||
|
||||
int index = (token & 0xffffff) - 1;
|
||||
|
||||
MethodBuilder mb = (MethodBuilder) mbuilder_array [index];
|
||||
|
||||
current_method = new SourceMethod (mb);
|
||||
|
||||
methods.Add (current_method);
|
||||
}
|
||||
|
||||
public void SetMethodSourceRange (ISymbolDocumentWriter startDoc,
|
||||
@@ -440,21 +529,32 @@ namespace Mono.CSharp.Debugger
|
||||
ISymbolDocumentWriter endDoc,
|
||||
int endLine, int endColumn)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
if (current_method == null)
|
||||
return;
|
||||
|
||||
public void OpenMethod (ISymbolDocumentWriter document, int startLine, int startColumn,
|
||||
int endLine, int endColumn, MethodBase method, int namespace_id)
|
||||
{
|
||||
SourceFile source_info = document as SourceFile;
|
||||
|
||||
if ((source_info == null) || (method == null))
|
||||
if ((startDoc == null) || (endDoc == null))
|
||||
throw new NullReferenceException ();
|
||||
|
||||
current_method = new SourceMethod (source_info, startLine, startColumn,
|
||||
endLine, endColumn, method, namespace_id);
|
||||
if (!(startDoc is MonoSymbolDocumentWriter) || !(endDoc is MonoSymbolDocumentWriter))
|
||||
throw new NotSupportedException ("both startDoc and endDoc must be of type "
|
||||
+ "MonoSymbolDocumentWriter");
|
||||
|
||||
if (!startDoc.Equals (endDoc))
|
||||
throw new NotSupportedException ("startDoc and endDoc must be the same");
|
||||
|
||||
string source_file = ((MonoSymbolDocumentWriter) startDoc).FileName;
|
||||
SourceFile source_info;
|
||||
|
||||
if (sources.ContainsKey (source_file))
|
||||
source_info = (SourceFile) sources [source_file];
|
||||
else {
|
||||
source_info = new SourceFile (source_file);
|
||||
sources.Add (source_file, source_info);
|
||||
}
|
||||
|
||||
current_method.SetSourceRange (source_info, startLine, startColumn,
|
||||
endLine, endColumn);
|
||||
|
||||
methods.Add (current_method);
|
||||
source_info.AddMethod (current_method);
|
||||
}
|
||||
|
||||
@@ -462,19 +562,6 @@ namespace Mono.CSharp.Debugger
|
||||
current_method = null;
|
||||
}
|
||||
|
||||
public int DefineNamespace (string name, ISymbolDocumentWriter document,
|
||||
string[] using_clauses, int parent)
|
||||
{
|
||||
if ((document == null) || (using_clauses == null))
|
||||
throw new NullReferenceException ();
|
||||
if (!(document is SourceFile))
|
||||
throw new ArgumentException ();
|
||||
|
||||
SourceFile source_info = (SourceFile) document;
|
||||
|
||||
return source_info.DefineNamespace (name, using_clauses, parent);
|
||||
}
|
||||
|
||||
public void OpenNamespace (string name)
|
||||
{
|
||||
throw new NotSupportedException ();
|
||||
@@ -546,21 +633,10 @@ namespace Mono.CSharp.Debugger
|
||||
}
|
||||
}
|
||||
|
||||
protected byte[] CreateOutput (Assembly assembly)
|
||||
protected void CreateOutput (Assembly assembly)
|
||||
{
|
||||
foreach (SourceMethod method in Methods) {
|
||||
if (!method.HasSource) {
|
||||
Console.WriteLine ("INGORING METHOD: {0}", method);
|
||||
continue;
|
||||
}
|
||||
|
||||
method.SourceFile.DefineMethod (
|
||||
method.MethodBase, method.Token, method.Locals,
|
||||
method.Lines, method.Start.Row, method.End.Row,
|
||||
method.NamespaceID);
|
||||
}
|
||||
|
||||
return file.CreateSymbolFile ();
|
||||
using (MonoSymbolTableWriter writer = new MonoSymbolTableWriter (output_filename))
|
||||
writer.WriteSymbolTable (this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
IMonoSymbolWriter.cs
|
||||
MonoSymbolDocumentWriter.cs
|
||||
MonoSymbolWriter.cs
|
||||
MonoSymbolTable.cs
|
||||
MonoSymbolFile.cs
|
||||
MonoSymbolTableWriter.cs
|
||||
IMonoBinaryReader.cs
|
||||
Loaded 100 of 1602 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user