Compare commits

..
635 Commits
Author SHA1 Message Date
nobody 6f9059cfb8 This commit was manufactured by cvs2svn to create tag 'MCS_0_11'.
svn path=/tags/MCS_0_11/mcs/; revision=4034
2002-04-24 22:18:01 +00:00
Miguel de Icaza a87aabc7d3 Update ChangeLog
svn path=/trunk/mcs/; revision=4033
2002-04-24 22:18:01 +00:00
Miguel de Icaza f3f15ab21a Improve test
svn path=/trunk/mcs/; revision=4032
2002-04-24 22:17:23 +00:00
Miguel de Icaza 25223cfb6f Flush
svn path=/trunk/mono/; revision=4031
2002-04-24 22:16:41 +00:00
Miguel de Icaza 280531a9fc 2002-04-24 Miguel de Icaza <[email protected]>
* expression.cs: Fix the case where the argument to params if the
	type of the params.  I omitted handling this before.   Fixed

svn path=/trunk/mcs/; revision=4030
2002-04-24 22:02:15 +00:00
Patrik Torstensson e5016b784a 2002-04-24 Patrik Torstensson <[email protected]>
* string-icalls.c : String does now passes unit tests without any
	errors, the following changes has been made:

	Implemented replace methods.
	Renaming of methods to (try) follow the standard.
	Fixed compare ordinal
	Made all memory allocated directly to function instead of via icall function.
	Small performance fix in is_in_array function

 (2002-04-23) Changes from Duncan Mak <[email protected]>

	c (mono_string_Internal_ctor_charp_int_int):
	(mono_string_Internal_ctor_sbytep_int_int):  Removed check for
	sindex < 0, throw ArgumentOutOfRangeException instead of
	ArgumentNullException.

	Added new check for length == 0, however
	I need to make it return String.Empty from the C code.

	(mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
	that calculate the length for us here.

	(mono_string_Internal_ctor_sbytep_int_int): Replaced
	mono_string_new_utf16 with mono_string_new, since value is utf8.

svn path=/trunk/mono/; revision=4029
2002-04-24 19:20:29 +00:00
Patrik Torstensson b999b9c67c 2002-04-24 Patrik Torstensson <[email protected]>
* AppDomain.cs (GetValue): usage of the correct icall (bug)

svn path=/trunk/mcs/; revision=4028
2002-04-24 17:36:50 +00:00
Paolo Molaro faa5b3692a Wed Apr 24 21:15:44 CEST 2002 Paolo Molaro <[email protected]>
* GC.cs: implement most of the methods as icalls.

svn path=/trunk/mcs/; revision=4027
2002-04-24 15:27:21 +00:00
Paolo Molaro 36461d0ab0 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <[email protected]>
* object.c: register the object for finalization if needed.
	Allocate one more char in the string for the terminating 0 char.

svn path=/trunk/mono/; revision=4026
2002-04-24 12:57:25 +00:00
Paolo Molaro 8252333926 Forgot file.
svn path=/trunk/mono/; revision=4025
2002-04-24 12:40:42 +00:00
Paolo Molaro 099a67d228 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <[email protected]>
* class.c, class.h, image.c: check if a type implemenst a destructor.
	Use the proper key for array class lookups.
	* icall.c: register the icalls in the System.GC class.
	* gc.c, gc.h: GC-related functions and icalls.

svn path=/trunk/mono/; revision=4024
2002-04-24 12:38:43 +00:00
Gonzalo Paniagua Javier 43c5c6b1ac One-liner in the comments of decimal2string ()
svn path=/trunk/mono/; revision=4023
2002-04-24 11:20:29 +00:00
Gonzalo Paniagua Javier 9597512c71 2002-04-24 Gonzalo Paniagua Javier <[email protected]>
* DecimalFormatter.cs (ToString): return correct value when the
	decimal number is 0.

svn path=/trunk/mcs/; revision=4022
2002-04-24 11:17:34 +00:00
Gonzalo Paniagua Javier 73e0b719d5 2002-04-24 Gonzalo Paniagua Javier <[email protected]>
* icall.c:
	* socket-io.c:
	* unicode.c: free some strings gotten from mono_string_to_utf8 and
	changed a couple of free () by g_free ().

svn path=/trunk/mono/; revision=4021
2002-04-24 10:30:12 +00:00
Rodrigo Moya c61c1b8de1 Removed stuff I'm working on
svn path=/trunk/mcs/; revision=4020
2002-04-24 10:22:15 +00:00
Dick Porter 592a5f901c 2002-04-24 Dick Porter <[email protected]>
* Socket.cs (Poll): Give correct argument to Select(), as spotted
	by Jaroslaw Kowalski <[email protected]>

svn path=/trunk/mcs/; revision=4019
2002-04-24 08:39:24 +00:00
Nick Drochak a6190d8168 2002-04-24 Nick Drochak <[email protected]>
* IPAddressTest.cs: Make test conform to MS behavior. Also, if wrong
	exception is thrown, let eveyone know which one.

svn path=/trunk/mcs/; revision=4018
2002-04-24 08:39:05 +00:00
Nick Drochak 4cae49d0d9 2002/04/24 Nick Drochak <[email protected]>
* IntegerFormatterTest.cs: Remove Console.WriteLines and use
	AssertEquals() instead.

svn path=/trunk/mcs/; revision=4016
2002-04-24 01:39:48 +00:00
Dennis Hayes f372a49b3e *** empty log message ***
svn path=/trunk/mcs/; revision=4015
2002-04-23 23:42:39 +00:00
Dennis Hayes 51ce3b1892 * Added all classes from F to H. Stubbed and commented out. *
svn path=/trunk/mcs/; revision=4014
2002-04-23 23:40:56 +00:00
Dennis Hayes 9c50665d6f * Added enums delagtes interfaces and stubbed out classes. *
* Most of the enums have correct values. *
*At least one enum has incorrect valuesI Will correct all by 5/1/2002. *

svn path=/trunk/mcs/; revision=4013
2002-04-23 23:31:03 +00:00
Dennis Hayes 9e37d3b01a * added [Flags} attribute that I mistakenly removed before the first commit. *
svn path=/trunk/mcs/; revision=4012
2002-04-23 22:58:31 +00:00
Dennis Hayes 6cae23ae31 * Corrected Enum Values. *
svn path=/trunk/mcs/; revision=4011
2002-04-23 22:18:36 +00:00
Daniel Morgan 457dd7cee7 2002-04-23 Daniel Morgan <[email protected]>
* System.Data.build: modified - added new
	files to exclude from build

	* System.Data/Constraint.cs
	* System.Data/ConstraintCollection.cs
	* System.Data/InternalDataCollectionBase.cs: added -
	stubs which are needed to build DataTable.cs

	* TODO: modified - added more classes TODO and
	added more stuff TODO, such as, create script
	to create test database monotestdb for testing
	classes in System.Data

svn path=/trunk/mcs/; revision=4010
2002-04-23 22:15:16 +00:00
Dennis Hayes a9415cb366 * Corrected Enum Values. *
svn path=/trunk/mcs/; revision=4009
2002-04-23 22:12:09 +00:00
Dennis Hayes 5be324df23 * Corrected Enum Values. *
svn path=/trunk/mcs/; revision=4008
2002-04-23 22:03:54 +00:00
Dennis Hayes a1a353b511 * Minor changes to copyright block. added date, .cs to file name comment, corrected case in email address. *
svn path=/trunk/mcs/; revision=4007
2002-04-23 21:58:08 +00:00
Gaurav Vaish fe4c24cb25 2002-24-04 Gaurav Vaish <[email protected]>
* java: Updating information about the new website for the project jilc.

svn path=/trunk/mono/; revision=4006
2002-04-23 21:55:40 +00:00
Dennis Hayes f8501dbee9 * Minor changes to copyright block. added date, .cs to file name comment, corrected case in email address. *
svn path=/trunk/mcs/; revision=4005
2002-04-23 21:48:35 +00:00
Gonzalo Paniagua Javier 4c65b83dbd 2002-04-24 Gonzalo Paniagua Javier <[email protected]>
* IPAddress.cs: initialize the read only fields with Parse().

svn path=/trunk/mcs/; revision=4004
2002-04-23 21:10:02 +00:00
Gonzalo Paniagua Javier c95f392f8b 2002-04-23 Gonzalo Paniagua Javier <[email protected]>
* IPAddressTest.cs: use BitConverter to set localhost, catch
	OverflowException in TestParseWrong() and changed some constants.

svn path=/trunk/mcs/; revision=4003
2002-04-23 21:07:56 +00:00
Patrik Torstensson 44841d2f44 2002-04-24 Patrik Torstensson <[email protected]>
* object.c (mono_runtime_invoke_array) : Bug because of my incompetence.

svn path=/trunk/mono/; revision=4002
2002-04-23 19:44:36 +00:00
Patrik Torstensson cade7da1b9 2002-04-24 Patrik Torstensson <[email protected]>
* MonoProperty.cs (GetValue) : basic implementation to support nunit
	* PropertyInfo.cs (GetValue) : call MonoProperty::GetValue instead of returning null

svn path=/trunk/mcs/; revision=4001
2002-04-23 19:37:33 +00:00
Patrik Torstensson cc71790043 2002-04-24 Patrik Torstensson <[email protected]>
* Type.cs (GetProperty): fixed call syntax (needs an empty array not null)
	* MonoType.cs (GetPropertyImpl) : basic implementation (ignores types, bindingAttr, modifiers)

svn path=/trunk/mcs/; revision=4000
2002-04-23 19:35:59 +00:00
Patrik Torstensson 66f7c6884d 2002-04-24 Patrik Torstensson <[email protected]>
* reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
	* object.c (mono_runtime_invoke_array) : handle null in params

svn path=/trunk/mono/; revision=3999
2002-04-23 19:34:11 +00:00
Gonzalo Paniagua Javier 1ea8796f32 Forgot ChangeLog
svn path=/trunk/mcs/; revision=3998
2002-04-23 19:10:23 +00:00
Rodrigo Moya c430d562ae 2002-04-23 Rodrigo Moya <[email protected]>
* System.Data.Common/DataAdapter.cs:
	* System.Data.Common/DataColumnMappingCollection.cs:
	* System.Data.Common/DataTableMappingCollection.cs:
	* System.Data.Common/DbDataPermission.cs:
	* System.Data.Common/DbDataPermissionAttribute.cs: some
	compilation errors fixed.

svn path=/trunk/mcs/; revision=3997
2002-04-23 18:43:30 +00:00
Daniel Morgan 4f2a5ccc1a 2002-04-23 Daniel Morgan <[email protected]>
* TODO: modified - added classes TODO, and
	a poor attempt at System.Data plan

svn path=/trunk/mcs/; revision=3996
2002-04-23 18:24:12 +00:00
Rodrigo Moya 5c878a092c Added TODO file
svn path=/trunk/mcs/; revision=3995
2002-04-23 17:35:28 +00:00
Joe Shaw 66041020ec 2002-04-23 Joe Shaw <[email protected]>
* Marshal.cs: Stub out a few functions to get gtk# to build.

svn path=/trunk/mcs/; revision=3994
2002-04-23 16:13:15 +00:00
Daniel Morgan ae9689e23b 2002-04-23 Daniel Morgan <[email protected]>
* ChangeLog: modified - put tabs where they belong

	* System.Data.SqlClient/SqlDataReader.cs
	* System.Data/DataColumn.cs: modified - compile errors
	trying to compile SqlDataAdapter and dependencies

svn path=/trunk/mcs/; revision=3993
2002-04-23 16:10:38 +00:00
Nick Drochak b9d124d6ec 2002-04-24 Nick Drochak <[email protected]>
* Double.cs (Parse): Handle case where there are no digits before the
	decimal point, such as ".1".

svn path=/trunk/mcs/; revision=3992
2002-04-23 11:55:02 +00:00
Patrik Torstensson 57abfde175 2002-04-23 Patrik Torstensson <[email protected]>
* string-icalls.c: fixed bug in split (one off bug)

svn path=/trunk/mono/; revision=3991
2002-04-23 11:16:51 +00:00
Patrik Torstensson 0748c2b8d0 2002-04-23 Patrik Torstensson <[email protected]>
* String.cs (Split): fixed invalid split of count 0 and 1.

svn path=/trunk/mcs/; revision=3990
2002-04-23 11:10:10 +00:00
Gonzalo Paniagua Javier 218b7b7e4f Ooops
svn path=/trunk/mono/; revision=3989
2002-04-23 10:15:38 +00:00
Gonzalo Paniagua Javier eeab2e055c 2002-04-23 Gonzalo Paniagua Javier <[email protected]>
* configure.in: removed -Wshadow from CFLAGS.

2002-04-12  Rodrigo Moya <[email protected]>

	* status/maintainers.xml: added danmorg and myself for System.Data.*
	classes.

	* status/class.xml: added System.Data.* classes.

2002-04-08  Dick Porter  <[email protected]>

	* configure.in: Set -mno-cygwin here rather than in the build script

2002-04-05  Dietmar Maurer  <[email protected]>

	* mono/tests/remoting2.cs: new test for async invoke of proxy calls

2002-03-29  Martin Baulig  <[email protected]>

	* doc/jit-debug, docs/jit-debug-sample, docs/jit-debug-sample2:
	New files, added documentation for the debugging code.

	* doc/web/commands: Added the debugging pages.

	* docs/jit-debug: Removed, this is now on the web site.

2002-03-24  Martin Baulig  <[email protected]>

	* man/mcs.1: Documented the new --debug option and added a section
	about debugging support.

	* man/mono.1: Documented the new --dwarf and --dwarf-plus options.

2002-03-21  Martin Baulig  <[email protected]>

	* configure.in: Added check for <elf.h>.

2002-03-18  Dick Porter  <[email protected]>

	* configure.in: Only look for libgc on the system.  Default to not
	using GC at all, because it doesn't work with the jit.

2002-03-17  Miguel de Icaza  <[email protected]>

	* configure.in: Add support for building the included boehm GC.

Thu Mar 7 17:19:44 CET 2002 Paolo Molaro <[email protected]>

	* configure.in: detect Boehm GC libs and add --with-gc switch.
	Boehm GC needs to be explicitly enabled since the JIT currently fails
	in some cases with it.

2002-02-27  Dietmar Maurer  <[email protected]>

	* mono/tests/fib.cs: it is now possible to pass a repeat count as
	command line argument, for example fib.exe 20 runs the test 20
	times.

2002-02-25  Sergey Chaban  <[email protected]>
	* configure.in: added support for ARM target arch.
	Uncommented and modified arm-*-linux* target,
	added mono/arch/arm/Makefile to AC_OUTPUT list.

2002-02-21  Mark Crichton  <[email protected]>

	* status/class.xml: Added contact info for RNGCryptoServiceProvider
	class and Rijndael classes.
	* status/maintainers.xml: Added contact info to maintainers list.

2002-02-21  Mark Crichton  <[email protected]>

        * configure.in: Add checks for a system-provided entropy device
        * acconfig.h: Added HAVE_CRYPT_RNG and NAME_DEV_RANDOM

2002-02-20  Dick Porter  <[email protected]>

	* acconfig.h:
	* configure.in: Always build without cygwin support on windows

2002-02-19  Radek Doulik  <[email protected]>

	* mono/tests/pinvoke.cs: use more pinvoke test methods

2002-02-19  Radek Doulik  <[email protected]>

	* mono/tests/libtest.c (mono_test_many_short_arguments): new test
	method
	(mono_test_many_byte_arguments): ditto

2002-02-18  Radek Doulik  <[email protected]>

	* mono/tests/Makefile.am: added small test library for pinvoke
	testing

	* mono/tests/libtest.c (mono_test_many_int_arguments): new file,
	new function to test pinvoke

	* mono/tests/pinvoke.cs (Test): added pinvoked method with 10 int
	arguments

	* mono/tests/Makefile.am: display # of passing tests too
	added simple shared library libtest with testing function for
	pinvoke

2002-02-17  Radek Doulik  <[email protected]>

	* mono/tests/Makefile.am (test): display # of failed tests

2002-02-16  Jeffrey Stedfast  <[email protected]>

	* configure.in: Add checks for SOL_IP, SOL_TCP, and
	IP_PKTINFO. Also check for struct ip_mreqn.

2002-02-14  Jeffrey Stedfast  <[email protected]>

	* configure.in: Add checks to see if we need to link to libsocket,
	libnsl, and/or librt. Also check for inet_pton and inet_aton.

2002-02-13  Jeffrey Stedfast  <[email protected]>

	* acconfig.h: #undef USE_MONO_MUTEX

	* configure.in: If the system pthread implementation is lacking,
	default to using mono-mutex.

2002-02-05  Dietmar Maurer  <[email protected]>

	* mono/tests/enum2.cs: new file with more enum tests.

2002-02-01  Dietmar Maurer  <[email protected]>

	* mono/tests/jit-long.cs: added some SHL/SHR tests

Fri Feb 1 15:32:36 CET 2002 Paolo Molaro <[email protected]>

	* configure.in: allow PKG_CONFIG_PATH for the build-platform
	pkg-config invocation.

Fri Feb 1 15:13:25 CET 2002 Paolo Molaro <[email protected]>

	* configure.in: add some support/fixes for cross-compilation.

2002-01-14  Dietmar Maurer  <[email protected]>

	* mono/tests/exception6.cs: new tests for ADD_OVF, MUL_OVF
	added tests for SUB_OVF, SUB_OVF_UN

2001-12-21  Dietmar Maurer  <[email protected]>

	* mono/tests/Makefile.am (TESTSRC): disabled stream-writer test

2001-12-21  Aaron Weber  <[email protected]>

	* doc/faq (A): added a linebreak that was missing and was causing
	a heading to appear badly.

2001-12-20  Aaron Weber  <[email protected]>

	* doc/faq: added <a name=""> nav links, and moved all MSFT-related
	questions into a single section.

2001-12-17  Aaron Weber  <[email protected]>

	* doc/faq (Q): Question-by-question, line-by-line revision.

2001-12-17  Dietmar Maurer  <[email protected]>

	* mono/tests/time.cs: new test

2001-11-30  Radek Doulik  <[email protected]>

	* configure.in: remove ACCESS_UNALIGNED="no" from ppc

2001-11-29  Radek Doulik  <[email protected]>

	* configure.in (ACCESS_UNALIGNED): uncommented and modified
	powerpc-*-linux*
	generate mono/arch/ppc/Makefile

2001-11-26  Dietmar Maurer  <[email protected]>

	* mono/tests/exception3.cs: modified the test to show a bug in the
	current exception handling implementation.

2001-11-13  Dick Porter  <[email protected]>

	* configure.in: Some more tests for pthread features
	(specifically, glibc 2.1 doesnt define pthread_mutex_timedlock but
	still needs _GNU_SOURCE for PTHREAD_MUTEX_RECURSIVE)

2001-11-09  Dick Porter  <[email protected]>

	* configure.in: Try and get large file support, but it's not fatal
	if it's not there (the io-layer just ignores the high word in that
	case.)

	Check for windows builds, and only bother to look for pthreads and
	large files if we're not building for cygwin or native win32.  Not
	having pthread support on Posix systems is now a fatal error.

	* autogen.sh: Fix ACLOCAL_FLAGS - it wasn't being passed to
	aclocal

2001-10-15  Dietmar Maurer  <[email protected]>

	* mono/tests/Makefile.am: removed JITTESTS, simply run all tests for
	target testjit.

2001-10-11  Dietmar Maurer  <[email protected]>

	* docs/object-layout: more documentation

Mon Oct 8 20:27:50 CEST 2001 Paolo Molaro <[email protected]>

	* configure.in: define NO_UNALIGNED_ACCESS for platforms that
	can't read on unaligned boundaries

2001-10-04  Dick Porter  <[email protected]>

	* configure.in: Do some deeper checks on pthreads for some of the
	more interesting functions

2001-09-24  Dietmar Maurer  <[email protected]>

	* mono/tests/Makefile.am (testjit): a new target to test the JITer

	* mono/tests/jit-*: added some test for the JITer

2001-09-23  Dick Porter  <[email protected]>

	* configure.in: Arrange to compile dummy thread support routines
	if pthread isnt available

2001-09-23  Dick Porter  <[email protected]>

	* configure.in: Check for pthread.h, so that we can check for the
	HAVE_PTHREAD_H define in config.h

2001-09-21  Dick Porter  <[email protected]>

	* configure.in: Check for libpthread

2001-09-19  Dietmar Maurer  <[email protected]>

	* mono/tests/test-ops.cs: added more tests

Mon Sep 10 20:19:00 CEST 2001 Paolo Molaro <[email protected]>

	* configure.in: check for sizeof(void*) and for the architecture.

2001-09-05  Dick Porter  <[email protected]>

	* autogen.sh: Fixed the section that adds $ACLOCAL_FLAGS to the
	aclocal invocation, so putting aclocal files in /usr/local works

2001-08-30  Dietmar Maurer  <[email protected]>

	* *: removed the libffi dependency, mono now compiles on cygwin

	* mono/wrapper/build-dll: new file.

2001-08-28  Dietmar Maurer  <[email protected]>

	* mono/tests/console.cs: impl.

	* mono/tests/box.cs: impl.

	* mono/tests/stream-writer.cs: impl.

Mon Aug 27 20:24:26 CEST 2001 Paolo Molaro <[email protected]>

	* mono/tests/*: New test cases, mostly for virtual method dispatch.
	Use make testb for the slow benchmarking programs,
	make test for the usual regression test checks.

2001-08-22  Rodrigo Moya <[email protected]>

	* mono/cil/Makefile.am:
	* mono/wrapper/Makefile.am: use correct variables for installation
	directories

Tue Aug 21 18:54:06 CEST 2001 Paolo Molaro <[email protected]>

	* mono/tests/exceptions*: enhanced and added more tests for
	exceptions.

2001-08-20  Miguel de Icaza  <[email protected]>

	* mono/Makefile.am (SUBDIRS): Remove `test' from here to allow us
	to pass make distcheck

	* mono/wrapper/Makefile.am (EXTRA_DIST): Include genwrapper.pl

	* configure.in, Makefile.am, runtime/Makefile.am (dist-hook,
	install-data-hook): Added mechanism to distribute and install the
	dll files.

2001-08-20  Dietmar Maurer  <[email protected]>

	* mono/tests/stream.cs: new tests for the Stream class

	* configure.in: I really need LIBTOOL for libmonowrapper.so, so I
	added it again.

2001-08-16  Alex Graveley  <[email protected]>

	* configure.in: Replace AM_PROG_LIBTOOL with AC_PROG_RANLIB. This
	removes libtool dependency on all of Mono.

2001-08-10  Dietmar Maurer  <[email protected]>

	* mono/tests/array.cs: more array tests

2001-08-09  Dietmar Maurer  <[email protected]>

	* mono/tests/array.cs: more array tests

2001-08-06  Dietmar Maurer  <[email protected]>

	* mono/tests/pinvoke.cs: we can now print strings ;-)

	* mono/tests/array.cs: new test for arrays

2001-08-02  Alex Graveley  <[email protected]>

        * libffi/*: Import libffi CVS version, with minor changes to make it
          compile.

        * mono/interpreter/Makefile.am: Link against
          ../../libffi/.libs/libffi.a.

        * Makefile.am: Add libffi

        * autogen.sh: Replace with adapted gnome autogen.sh

        * configure.in: Add AC_CONFIG_SUBDIRS(libffi).

2001-08-02  Dietmar Maurer  <[email protected]>

	* mono/tests/pinvoke.cs: impl.

Wed Aug 1 22:34:52 CEST 2001 Paolo Molaro <[email protected]>

	* configure.in, mono/tests: added some tests for the interpreter.

2001-07-15  Sean MacIsaac  <[email protected]>

	* doc/download: added instructions for cygwin

	* doc/c-sharp: removed bit about compiling

	* status/compare-assembly.cs: basedir should be there if
	parameters are provided.

	* status/makefile: made targets to dump info.

2001-07-15  Joe Shaw  <[email protected]>

	* configure.in: Don't create doc/Makefile as there's nothing there
	to make.

	* Makefile.am: Don't build the doc directory because there's no
	Makefile.am there.

	* autogen.sh: Call aclocal with the $ACLOCAL_FLAGS env var.

2001-07-15  Miguel de Icaza  <[email protected]>

	* doc/class-library (A): Updated FAQ with question on error 1595.

2001-07-14  Miguel de Icaza  <[email protected]>

	* doc/index:

Wed Jul 11 00:36:36 CEST 2001 Paolo Molaro <[email protected]>

	* status/*: scripts and data to create statistics about the
	class library status.

2001-07-09  Alex Graveley  <[email protected]>

	* doc/makefile (clean): Add clean target.
	* doc/web/makefile (clean): Ditto.

2001-07-09  Alex Graveley  <[email protected]>

	* doc/makefile (all-docs): Fix typo.

2001-05-30  Miguel de Icaza  <[email protected]>

	* NEWS:

svn path=/trunk/mono/; revision=3988
2002-04-23 10:08:19 +00:00
Patrik Torstensson ef1c63f5a8 2002-04-23 Patrik Torstensson <[email protected]>
* String.cs (LastIndexOf): fixed argument checking.
	* String.cs (Equals): made internal for performace.

svn path=/trunk/mcs/; revision=3987
2002-04-23 10:01:22 +00:00
Patrik Torstensson 6395095ed3 2002-04-23 Patrik Torstensson <[email protected]>
* string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
	* icalls.c: added String::Equals as internal method

svn path=/trunk/mono/; revision=3986
2002-04-23 09:56:11 +00:00
Gonzalo Paniagua Javier caea1b6e73 2002-04-23 Gonzalo Paniagua Javier <[email protected]>
* Int32.cs:
	* UInt32.cs:
	* Int64.cs:
	* UInt64.cs: fixed bug #23738 (hex numbers parsed wrong).

svn path=/trunk/mcs/; revision=3985
2002-04-23 09:46:02 +00:00
Patrik Torstensson d884bcb3bb 2002-04-23 Patrik Torstensson <[email protected]>
* threads.c: fixed bug in the double interlocked functions

svn path=/trunk/mono/; revision=3984
2002-04-23 09:12:25 +00:00
Dietmar Maurer c87105386b 2002-04-23 Dietmar Maurer <[email protected]>
* x86.brg: code cleanup - use x86_patch ()

svn path=/trunk/mono/; revision=3983
2002-04-23 08:45:17 +00:00
Paolo Molaro 55f995e669 FreeBSD has giconv.h instead of iconv.h.
svn path=/trunk/mono/; revision=3982
2002-04-23 05:08:42 +00:00
Paolo Molaro 176de7b07f FreeBSD compatibility fixes from Sandro Tolaini <[email protected]>.
svn path=/trunk/mono/; revision=3981
2002-04-23 04:49:39 +00:00
Dietmar Maurer 2d9994d5a0 (mono_analyze_stack): don't store constants in temp. variables for CEE_DUP
svn path=/trunk/mono/; revision=3980
2002-04-23 03:19:17 +00:00
Dietmar Maurer 904af520af 2002-04-23 Dietmar Maurer <[email protected]>
* jit.c (mono_analyze_stack): only use MB_TERM_CHECKTHIS when necessary

	* x86.brg (stmt): removed stmt: STIND_I4 (addr, coni4) rule
	because it slows down performance.

svn path=/trunk/mono/; revision=3979
2002-04-23 02:01:12 +00:00
Daniel Morgan cf9e881c47 2002-04-23 Daniel Morgan <[email protected]>
* System.Data.SqlTypes/SqlBoolean.cs
* System.Data.SqlTypes/SqlCompareOptions.cs
* System.Data.SqlTypes/SqlInt32.cs
* System.Data.SqlTypes/SqlString.cs: added - new stubs

* System.Data/DataTable.cs
* System.Data.SqlClient/SqlCommand.cs
* System.Data.SqlClient/SqlConnection.cs
* System.Data.SqlClient/SqlError.cs
* System.Data.SqlClient/SqlTransaction.cs: modified -
misc. tweaks

* System.Data.SqlClient/SqlException.cs: modified -
missing Message on indexer for Message property

svn path=/trunk/mcs/; revision=3978
2002-04-23 01:34:29 +00:00
Miguel de Icaza 204ed499c5 Commit message so I can continue at home
svn path=/trunk/mcs/; revision=3977
2002-04-22 23:25:00 +00:00
Duncan Mak 11b93b6cd9 2002-04-22 Duncan Mak <[email protected]>
* ImporterEventKind.cs:
	* TypeLibFuncFlags.cs:
	* TypeLibTypeFlags.cs:
	* TypeLibVarFlags.cs: Fixed various typos and added missing elements.

svn path=/trunk/mcs/; revision=3976
2002-04-22 23:16:08 +00:00
Duncan Mak 9fc341b934 Flush.
svn path=/trunk/mcs/; revision=3975
2002-04-22 23:09:04 +00:00
Duncan Mak ce51de08fb 2002-04-22 Duncan Mak <[email protected]>
* ComConventionLossAttribute.cs: Removed, there's a typo.
	* ComConversionLossAttribute.cs: Same attribute, slight change
	of name.

	* PreserveSigAttribute.cs:
	* ImportedFromTypeLibAttribute.cs: Added missing AttributeUsage
	attribute.

	* TypeLibFuncAttribute.cs:
	* TypeLibTypeAttribute.cs:
	* TypeLibVarAttribute.cs: Added missing constructors.

svn path=/trunk/mcs/; revision=3974
2002-04-22 23:06:20 +00:00
Miguel de Icaza 9f7ec86a98 2002-04-22 Miguel de Icaza <[email protected]>
* interface.cs: Temporary hack: try/catch around the
	CustomAttributeBuilder, because I am getting an exception that I
	do not understand.

	* rootcontext.cs (BootCorlib_PopulateCoreType): Populate some
	types whose definitions are required to be there (attributes are
	defined before standard types).

	Compute definitions as we boot the various types, as they are used
	immediately (value_type class will need object_type, but if we do
	not initialize object_type, we will pass a null, which will let
	the runtime pick the System.Object from the existing corlib, which
	is not what we want).

	* class.cs (Property.CheckBase): Check for properties only, not
	for all members.

	* driver.cs: Call BootCorlib_PopulateCoreType

2002-04-22  Miguel de Icaza  <[email protected]>

	* ValueType.cs: Add Serializable attribute.

	* String.cs: ifdef-out out the __arglist Concat function until I
	add support for that to mcs.

svn path=/trunk/mcs/; revision=3973
2002-04-22 23:02:57 +00:00
Gonzalo Paniagua Javier 58816ece55 2002-04-23 Gonzalo Paniagua Javier <[email protected]>
* NumberFormatInfo.cs: always set the values for the invariant culture
	until there are more cultures supported.

svn path=/trunk/mcs/; revision=3972
2002-04-22 22:58:53 +00:00
Duncan Mak c36c8dd2b1 2002-04-22 Duncan Mak <[email protected]>
* AutomationProxyAttribute.cs:
	* CoClassAttribute.cs:
	* ComAliasNameAttribute.cs:
	* ComConventionLossAttribute.cs:
	* ComEventInterfaceAttribute.cs:
	* ComImportAttribute.cs:
	* ComRegisterFunctionAttribute.cs:
	* ComUnregisterFunctionAttribute.cs:
	* DispIdAttribute.cs:
	* ImportedFromTypeLibAttribute.cs:
	* LCIDConversionAttribute.cs:
	* PreserveSigAttribute.cs:
	* PrimaryInteropAssemblyAttribute.cs:
	* ProgIdAttribute.cs:
	* TypeLibFuncAttribute.cs:
	* TypeLibFuncFlags.cs:
	* TypeLibTypeAttribute.cs:
	* TypeLibTypeFlags.cs:
	* TypeLibVarAttribute.cs:
	* TypeLibVarFlags.cs:  Added to CVS.

svn path=/trunk/mcs/; revision=3971
2002-04-22 22:46:36 +00:00
Patrik Torstensson b7de47b0cf 2002-04-22 Patrik Torstensson <[email protected]>
* cs-tokenizer.cs: fixed a number of trim() issues.

svn path=/trunk/mcs/; revision=3970
2002-04-22 19:03:12 +00:00
Patrik Torstensson fae545d00c 2002-04-14 Patrik Torstensson <[email protected]>
* Interlocked.cs: made all methods icalls.

svn path=/trunk/mcs/; revision=3969
2002-04-22 18:44:21 +00:00
Patrik Torstensson 1d0ac15ee2 2002-04-17 Patrik Torstensson <[email protected]>
* threads.c: implemented all of the new interlocked icalls.
	* string-icalls.c: fix a bug in insert.
	* icalls.c: added the icalls for interlocked, removed old string functions.

svn path=/trunk/mono/; revision=3968
2002-04-22 18:43:38 +00:00
Ravi Pratap M 105322ae9f 2002-04-22 Ravi Pratap <[email protected]>
* expression.cs (Argument.Type): Ensure that we return the correct
	type when we have out or ref parameters [in which case we
	append a "&"].

svn path=/trunk/mcs/; revision=3967
2002-04-22 14:32:49 +00:00
Ravi Pratap M 6d29503b13 2002-04-22 Ravi Pratap <[email protected]>
* test-104.cs : Another overload resolution test !

svn path=/trunk/mcs/; revision=3966
2002-04-22 14:31:32 +00:00
Miguel de Icaza b9552b75f0 Flush
svn path=/trunk/mono/; revision=3965
2002-04-22 14:00:21 +00:00
Paolo Molaro 8b547d3826 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <[email protected]>
* loader.c: fix off-by-one error when reading argument names.

svn path=/trunk/mono/; revision=3964
2002-04-22 13:57:40 +00:00
Paolo Molaro 8e9965bda4 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <[email protected]>
* profiler.c: win32 counter implementation (untested).
	* icall.cs: win32 GetNow() and GetTimeZoneData() implementations
	(the latter needs testing and more complete impl. from win32 folks).

svn path=/trunk/mono/; revision=3963
2002-04-22 13:41:10 +00:00
Dan Lewis a3e9b0340e forgot to check for null lower bounds array.
svn path=/trunk/mono/; revision=3962
2002-04-22 12:29:11 +00:00
Dan Lewis c3a1f679c7 2002-04-21 Dan Lewis <[email protected]>
* object.c: mono_array_new_full workaround mono_array_class_get
	problem.

svn path=/trunk/mono/; revision=3961
2002-04-22 12:00:26 +00:00
Nick Drochak 5abd707fd3 2002-04-23 Nick Drochak <[email protected]>
* String.cs (Join): check argument and throw exception if needed

svn path=/trunk/mcs/; revision=3960
2002-04-22 11:46:46 +00:00
Nick Drochak 721de0a91e 2002-04-23 Nick Drochak <[email protected]>
* String.cs (StartsWith): check argument and throw exception if needed

svn path=/trunk/mcs/; revision=3959
2002-04-22 11:22:09 +00:00
Dan Lewis ed57e41044 2002-04-21 Dan Lewis <[email protected]>
* emit-x86.c: enter_method handles 8-byte aligned parameters.

svn path=/trunk/mono/; revision=3958
2002-04-22 11:08:21 +00:00
Nick Drochak a8f3f98e8a 2002-04-22 Nick Drochak <[email protected]>
* StringTest.cs: Add unique markers to Assert messages.

svn path=/trunk/mcs/; revision=3957
2002-04-22 11:04:23 +00:00
Paolo Molaro 8a58de90bf Mon Apr 22 16:52:03 CEST 2002 Paolo Molaro <[email protected]>
* interp.c: handle muslticast delegates. Implement a couple more
	convert opcodes. Pretend we spend some time jitting...

svn path=/trunk/mono/; revision=3956
2002-04-22 11:04:12 +00:00
Nick Drochak 4d915a4471 2002-04-22 Nick Drochak <[email protected]>
* NumberStyles.cs: Add [Serializable].

svn path=/trunk/mcs/; revision=3955
2002-04-22 10:49:21 +00:00
Patrik Torstensson e6daa55141 2002-04-17 Patrik Torstensson <[email protected]>
* string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
	* object.h (mono_string_chars): Changed casting type.

svn path=/trunk/mono/; revision=3954
2002-04-22 10:30:36 +00:00
Nick Drochak d329f3b8b0 2002-04-22 Nick Drochak <[email protected]>
* String.cs (IndexOfAny): check arguments and throw exceptions as
	neccessary.  Also removed some debug WriteLines.

svn path=/trunk/mcs/; revision=3953
2002-04-22 09:41:48 +00:00
Miguel de Icaza 8a83208ae3 2002-04-22 Miguel de Icaza <[email protected]>
* class.cs (Property, Indexer): Allow extern modifier in there.

	* typemanager.cs (InitBaseTypes): Initializes object_type and
	value_type, since those will be used early on during the bootstrap
	process to compile corlib.

	(InitCoreTypes): Move code from here to InitBaseTypes.

svn path=/trunk/mcs/; revision=3952
2002-04-22 09:29:07 +00:00
Patrik Torstensson 33ef37ebdd 2002-04-17 Patrik Torstensson <[email protected]>
* string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
			   method signatures to use gunichar2 instead of gint16.

svn path=/trunk/mono/; revision=3951
2002-04-22 09:28:53 +00:00
Paolo Molaro feb0530f59 Mon Apr 22 12:57:31 CEST 2002 Paolo Molaro <[email protected]>
* x86/x86-codegen.h: added loop instructions and made x86_patch fully
	useful.

svn path=/trunk/mono/; revision=3950
2002-04-22 07:32:11 +00:00
Gaurav Vaish 1ebe41f9bf 2002-22-04 Gaurav Vaish <[email protected]>
* maintainers.xml: changed my email address. Moving out of the institute ;)

svn path=/trunk/mono/; revision=3949
2002-04-22 06:18:36 +00:00
Miguel de Icaza d7bfce6071 Flush
svn path=/trunk/mono/; revision=3944
2002-04-21 20:34:17 +00:00
Miguel de Icaza dc666c66f2 Sync work code
svn path=/trunk/mono/; revision=3943
2002-04-21 18:15:23 +00:00
Dan Lewis be071f5035 2002-04-21 Dan Lewis <[email protected]>
* papers: added bacon thin lock papers.

svn path=/trunk/mono/; revision=3942
2002-04-21 14:48:04 +00:00
Dan Lewis 5b20b51d28 2002-04-22 Dan Lewis <[email protected]>
* papers: fixed citeseer links.

svn path=/trunk/mono/; revision=3941
2002-04-21 13:22:19 +00:00
Dan Lewis 28f833aee1 removed extra space.
svn path=/trunk/mono/; revision=3940
2002-04-21 12:55:56 +00:00
Dan Lewis 5ec5689b67 2002-04-21 Dan Lewis <[email protected]>
* papers: added bacon overview of loop transforms.

svn path=/trunk/mono/; revision=3939
2002-04-21 12:37:39 +00:00
Daniel Morgan a459b5d2cc 2002-04-21 Daniel Morgan <[email protected]>
* System.Data.SqlClient/SqlCommand.cs: modified - to
compile using mcs.  This problem is
returning a stronger type in csc vs. msc

* System.Data.SqlClient/SqlConnection.cs: modified - msc
can not do a using PGconn = IntPtr; and then declare
with PGconn pgConn = IntPtr.Zero;
Thiw works under csc though.  Had to comment using and
changed declaration to IntPtr pgConn = IntPtr.Zero;
Also, got rid of compile warnings for hostaddr and port.

* System.Data.SqlClient/SqlErrorCollection.cs: modified - got
rid of compile warnings.  Commented MonoTODO attribute because mcs
doesn't seem to work with C# array property indexer (Item)
this[int index]

* System.Data.SqlClient/SqlParameterCollection.cs: modified -
commented MonoTODO attribute for indexer for mcs compiling

* Test/TestSqlIsolationLevel.cs:
* Test/TestSqlInsert.cs:
* Test/TestSqlException.cs: modified -
removed extra ExecuteNonQuery which caused two inserted rows

svn path=/trunk/mcs/; revision=3938
2002-04-21 12:18:20 +00:00
Miguel de Icaza ce6e85b863 2002-04-21 Miguel de Icaza <[email protected]>
* ecore.cs (PropertyExpr): Optimize calls to Array::get_Length on
	single-dimension arrays as using the ldlen opcode.

	Daniel Lewis discovered this optimization.

	* typemanager.cs: Add signature for System.Array::get_Length

svn path=/trunk/mcs/; revision=3937
2002-04-21 11:26:55 +00:00
Paolo Molaro 8a901852d6 Added string stress-test from the parrot folks.
svn path=/trunk/mono/; revision=3936
2002-04-21 07:42:51 +00:00
Daniel Morgan 0c4000d461 *** empty log message ***
svn path=/trunk/mcs/; revision=3935
2002-04-20 22:21:51 +00:00
Miguel de Icaza 3bf8e3a8d0 More updates
svn path=/trunk/mono/; revision=3934
2002-04-20 21:34:45 +00:00
Daniel Morgan a9c683d500 2002-04-20 Daniel Morgan <[email protected]>
* System.Data.OleDb: added directory - for OleDb database
provider classes

* System.Data.SqlClient/SqlClientPermission.cs
* System.Data.SqlClient/SqlClientPermissionAttribute.cs
* System.Data.SqlClient/SqlCommandBuilder.cs
* System.Data.SqlClient/SqlInfoMessageEventHandler.cs
* System.Data.SqlClient/SqlRowUpdatedEventArgs.cs
* System.Data.SqlClient/SqlRowUpdatedEventHandler.cs
* System.Data.SqlClient/SqlRowUpdatingEventArgs.cs
* System.Data.SqlClient/SqlRowUpdatingEventHandler.cs
* Test/TestSqlException.cs
* Test/TestSqlIsolationLevel.cs: added - more tests

* System.Data.build: modified - added new files - excludes these too

* System.Data.SqlClient/PostgresLibrary.cs - modified - comment

* System.Data.SqlClient/SqlConnection.cs
* System.Data.SqlClient/SqlCommand.cs
* System.Data.SqlClient/SqlTransaction.cs
* System.Data.SqlClient/SqlException.cs
* System.Data.SqlClient/SqlErrorCollection.cs
* System.Data.SqlClient/SqlError.cs: modified - transaction and
  exception/error handling. SqlConnection(connectionString)
  constructor should not automatically connect.

* System.Data.SqlClient/SqlDataReader.cs
* System.Data.SqlClient/SqlDataAdapter.cs
* System.Data.SqlClient/SqlParameter.cs
* System.Data.SqlClient/SqlParameterCollection.cs: modified -
added using System.ComponentModel;

* Test/TestSqlInsert.cs: modified - to use transaction

svn path=/trunk/mcs/; revision=3933
2002-04-20 20:58:45 +00:00
Dan Lewis c965455def 2002-04-20 Dan Lewis <[email protected]>
* object.h, object.c: domain-specific versions of mono_object_new and
	mono_array_new.

	* jit,h, jit.c, x86.brg: NEWOBJ_SPEC and NEWARR_SPEC terminals for
	non-shared code.

svn path=/trunk/mono/; revision=3932
2002-04-20 16:58:37 +00:00
Dietmar Maurer 31516a8b07 2002-04-20 Dietmar Maurer <[email protected]>
* jit.c (check_inlining): added statistics about inlineing

svn path=/trunk/mono/; revision=3931
2002-04-20 16:05:14 +00:00
Miguel de Icaza d2c3d332d3 Update man page
svn path=/trunk/mono/; revision=3930
2002-04-20 15:57:11 +00:00
Dietmar Maurer 884c6dd14c 2002-04-20 Dietmar Maurer <[email protected]>
* mono.c (usage): new switch --noinline to disable inlining

svn path=/trunk/mono/; revision=3929
2002-04-20 15:53:28 +00:00
Dan Lewis b5e5581acc 2000-04-20 Dan Lewis <[email protected]>
* papers: added briggs ssa paper, gupta bounds checking paper,
	wilson gc intro, two hudson papers.

svn path=/trunk/mono/; revision=3928
2002-04-20 15:29:51 +00:00
Dietmar Maurer 713d547133 bug fix in Concat
svn path=/trunk/mcs/; revision=3927
2002-04-20 14:52:38 +00:00
Gonzalo Paniagua Javier 9121098b78 2002-04-20 Gonzalo Paniagua Javier <[email protected]>
* statement.cs: report the error when the foreach does not apply to an
	array nor a collection.

svn path=/trunk/mcs/; revision=3926
2002-04-20 14:34:32 +00:00
Dietmar Maurer bfb8da8feb 2002-04-20 Dietmar Maurer <[email protected]>
* interp.c (ves_exec_method): support internalcall String constructors

svn path=/trunk/mono/; revision=3925
2002-04-20 14:32:46 +00:00
Miguel de Icaza 07a7b6d3d7 Update news
svn path=/trunk/mono/; revision=3924
2002-04-20 14:08:48 +00:00
Miguel de Icaza 702b0dc1f4 Update news
svn path=/trunk/mono/; revision=3923
2002-04-20 14:07:18 +00:00
Dietmar Maurer 05940b0361 2002-04-20 Dietmar Maurer <[email protected]>
* object.c: changed String layout

	* string-icalls.c (mono_string_Internal_ctor_chara): added
	internal string constructors.

svn path=/trunk/mono/; revision=3922
2002-04-20 13:49:34 +00:00
Dietmar Maurer 7d7a54d1a6 use internal call constructors
svn path=/trunk/mcs/; revision=3921
2002-04-20 13:48:35 +00:00
Dietmar Maurer d32a8c7698 2002-04-20 Dietmar Maurer <[email protected]>
* jit.c (mono_analyze_stack): added a check for (this!=NULL) if we
	inline methods (to keep semantics)

svn path=/trunk/mono/; revision=3920
2002-04-20 09:28:46 +00:00
Dietmar Maurer 06d12ddfa2 *** empty log message ***
svn path=/trunk/mono/; revision=3919
2002-04-20 09:07:16 +00:00
Dietmar Maurer 49469336fc 2002-04-20 Dietmar Maurer <[email protected]>
* x86.brg: added constant folding for inegers

	* emit-x86.c (tree_allocate_regs): handle the special case when
	chain rules need a register.

	* monoburg.y (yylex): bug fix in number parsing

svn path=/trunk/mono/; revision=3918
2002-04-20 07:55:08 +00:00
Paolo Molaro ee226edae5 Sat Apr 20 13:37:39 CEST 2002 Paolo Molaro <[email protected]>
* threads.c: destroy the mutex at thread destruction
	(if/when thread destruction code will be actually called).
	When protecting a tls data pointer from the gc, use also the
	thread id in the key.

svn path=/trunk/mono/; revision=3917
2002-04-20 07:53:07 +00:00
Paolo Molaro 6b12556453 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <[email protected]>
* threads.c: pass 'this' to the thread start routine.

svn path=/trunk/mono/; revision=3916
2002-04-20 07:47:51 +00:00
Gonzalo Paniagua Javier 6a48219059 2002-04-20 Gonzalo Paniagua Javier <[email protected]>
* string-icalls.c: fix IndexOf and LastIndexOf. Now
	InternalCompareStr don't call twice mono_string_cmp_char for the last
	character. Improved performance in mono_string_cmp_char.

svn path=/trunk/mono/; revision=3915
2002-04-20 07:12:53 +00:00
Miguel de Icaza 9e1a8c821b 2002-04-19 Miguel de Icaza <[email protected]>
* expression.cs: Add implicit conversions to the operator ~.

svn path=/trunk/mcs/; revision=3914
2002-04-19 17:13:08 +00:00
Miguel de Icaza 6e00350ed4 2002-04-19 Miguel de Icaza <[email protected]>
* constant.cs (DecimalConstant.Emit): Emit decimal value.

	* typemanager.cs: Locate the decimal constructor.

svn path=/trunk/mcs/; revision=3912
2002-04-19 15:36:46 +00:00
Paolo Molaro 918c707e2b Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <[email protected]>
* Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
	code into its own library: libmonoruntime.

svn path=/trunk/mono/; revision=3911
2002-04-19 13:58:02 +00:00
Paolo Molaro cb93a753bb Martin removed jit-debug from here: fix make distcheck.
svn path=/trunk/mono/; revision=3910
2002-04-19 13:36:45 +00:00
Dietmar Maurer 2684e9be50 2002-04-19 Dietmar Maurer <[email protected]>
* invoke.c (arch_create_native_wrapper): do not save LMF for Strings

	* jit.c (check_inlining): better inlining support

svn path=/trunk/mono/; revision=3909
2002-04-19 12:48:14 +00:00
Dan Lewis faa2607d9b 2002-04-19 Dan Lewis <[email protected]>
* object.h, object.c: changed array format so that szarrays do not
	require a bounds structure.
	* icall.c, appdomain.c, interp.c, jit.c: support for new szarray format
	* x86.brg: LDLEN uses max_length instead of bounds[0]

svn path=/trunk/mono/; revision=3908
2002-04-19 12:33:58 +00:00
Paolo Molaro 7281c280d2 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <[email protected]>
* metadata.c: compare also the retuns type when comparing signatures:
	we didn't do this as an optimization since really overloaded methods
	must differ also in the arguments, but this doesn't work with
	low-level IL code (or when using explicit conversion operators: see
	bug#23498 for an example).

svn path=/trunk/mono/; revision=3907
2002-04-19 12:17:40 +00:00
Paolo Molaro 8670070b0a Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <[email protected]>
* loader.c: SZARRAY types can be saved as TYPESPEC, too.

svn path=/trunk/mono/; revision=3906
2002-04-19 10:26:26 +00:00
Miguel de Icaza e06d966d36 Flush TODO and makefile
svn path=/trunk/mcs/; revision=3905
2002-04-19 10:09:03 +00:00
Miguel de Icaza 3ac4eba228 Add Eclipse C# link
svn path=/trunk/mono/; revision=3904
2002-04-19 10:08:15 +00:00
Gonzalo Paniagua Javier c303807db2 2002-04-19 Gonzalo Paniagua Javier <[email protected]>
* AllTests.cs: added IPEndPointTest.
	* IPEndPointTest.cs: added file (author: Lawrence Pit).
	* IPAdressTest.cs: use Fail is expected exception are not raised.

svn path=/trunk/mcs/; revision=3903
2002-04-19 10:03:21 +00:00
Gonzalo Paniagua Javier df2229db90 2002-04-18 Gonzalo Paniagua Javier <[email protected]>
* IPAddress.cs: little changes to behave as MS.

svn path=/trunk/mcs/; revision=3901
2002-04-18 18:27:26 +00:00
Paolo Molaro f7393432ff Fixed IndexOf() count.
svn path=/trunk/mcs/; revision=3900
2002-04-18 12:40:54 +00:00
Dietmar Maurer d4ee3cf56b 2002-04-18 Dietmar Maurer <[email protected]>
* jit.c (check_inlining): added inlining support

svn path=/trunk/mono/; revision=3899
2002-04-18 11:49:42 +00:00
Paolo Molaro a8838f0465 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <[email protected]>
* icall.c: make MonoType::GetElementType its own icall.

svn path=/trunk/mono/; revision=3898
2002-04-18 11:27:43 +00:00
Paolo Molaro e6f2a4c040 Thu Apr 18 17:16:15 CEST 2002 Paolo Molaro <[email protected]>
* MonoType.cs: make GetElementType its own icall.

svn path=/trunk/mcs/; revision=3897
2002-04-18 11:27:36 +00:00
Paolo Molaro 821a951761 Thu Apr 18 16:40:54 CEST 2002 Paolo Molaro <[email protected]>
* MonoMethod.c: cache the method name.

svn path=/trunk/mcs/; revision=3896
2002-04-18 10:54:09 +00:00
Paolo Molaro 3f2b1cf8a5 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <[email protected]>
* icall.c: remove MonoMethod_get_Name().
	* reflection.c, reflection.h, verify: cache the method name in the MonoMethod
	object.

svn path=/trunk/mono/; revision=3895
2002-04-18 10:54:09 +00:00
Nick Drochak a8356f29a7 2002-04-18 Nick Drochak <[email protected]>
* String.cs: Modified file. Re-add methods needed by the unit tests.

svn path=/trunk/mcs/; revision=3894
2002-04-18 10:29:39 +00:00
Patrik Torstensson 8a7cc6547c 2002-04-17 Patrik Torstensson <[email protected]>
* string-icalls.c: optimized a few methods.

svn path=/trunk/mono/; revision=3893
2002-04-18 09:43:58 +00:00
Gonzalo Paniagua Javier 8f9445d3f9 2002-04-18 Gonzalo Paniagua Javier <[email protected]>
* Dns.cs (Resolve): behave as MS. Agreed with Mads.

svn path=/trunk/mcs/; revision=3892
2002-04-18 09:17:45 +00:00
Miguel de Icaza 91fce8c5dd Add more tests
svn path=/trunk/mcs/; revision=3891
2002-04-18 07:26:43 +00:00
Miguel de Icaza 902ec11fb6 Flush pending changes
svn path=/trunk/mono/; revision=3890
2002-04-18 07:26:19 +00:00
Paolo Molaro c1210d9556 Thu Apr 18 12:38:32 CEST 2002 Paolo Molaro <[email protected]>
* String.cs: some code speedups and restored GetTypeCode().

svn path=/trunk/mcs/; revision=3889
2002-04-18 06:49:57 +00:00
Dietmar Maurer 3725a55729 added a comment howto avoid saving LMF
svn path=/trunk/mono/; revision=3888
2002-04-18 06:12:05 +00:00
Gonzalo Paniagua Javier 6749d6fa98 2002-04-17 Gonzalo Paniagua Javier <[email protected]>
* attribute.cs: use the new property of TypeOf.
	* expression.cs: added 'get' property around typearg.

	These changes fix a build breaker reported by NickD. Is this the
	correct way to fix?  If not, please, revert my changes and make it
	work :-).

svn path=/trunk/mcs/; revision=3887
2002-04-17 22:41:45 +00:00
Rodrigo Moya ca2049ad71 excluded new files from build
svn path=/trunk/mcs/; revision=3886
2002-04-17 22:23:49 +00:00
Rodrigo Moya 7fe84924f8 2002-04-17 Rodrigo Moya <[email protected]>
* System.Data/DataRow.cs: new skeletons.

	* System.Data.Common/DataAdapter.cs:
	* System.Data.Common/DataColumnMapping.cs:
	* System.Data.Common/DataColumnMappingCollection.cs:
	* System.Data.Common/DataTableMapping.cs:
	* System.Data.Common/DataTableMappingCollection.cs:
	* System.Data.Common/DbDataAdapter.cs:
	* System.Data.Common/RowUpdatedEventArgs.cs:
	* System.Data.SqlClient/SqlDataAdapter.cs:
	* System.Data.SqlClient/SqlInfoMessageEventArgs.cs: compilation
	fixes for Linux.

	* System.Data.Common/DbDataRecord.cs:
	* System.Data.Common/DbEnumerator.cs: removed MS implementation
	internal classes.

svn path=/trunk/mcs/; revision=3885
2002-04-17 22:20:22 +00:00
Miguel de Icaza e257fc9520 2002-04-17 Miguel de Icaza <[email protected]>
* attribute.cs: Add support for typeof in attribute invocations.
	I am not sure that this is right though.

svn path=/trunk/mcs/; revision=3884
2002-04-17 20:01:39 +00:00
Duncan Mak ded31b58b4 Test case for triggering CS0020, Division by constant zero.
svn path=/trunk/mcs/; revision=3883
2002-04-17 17:28:50 +00:00
Paolo Molaro acf85ec4d4 Fixed compilation.
svn path=/trunk/mono/; revision=3882
2002-04-17 17:23:58 +00:00
Patrik Torstensson 3352fde99f 2002-04-17 Patrik Torstensson <[email protected]>
* String.cs: New implementation using internal calls.

svn path=/trunk/mcs/; revision=3881
2002-04-17 17:04:41 +00:00
Patrik Torstensson 67e70bfd9b 2002-04-17 Patrik Torstensson <[email protected]>
* icall.c: added all new string internal calls
	* string-icalls.c: added, new string internal call implementation.
	* object.c: added mono_string_new_size for allocating a string a size

svn path=/trunk/mono/; revision=3880
2002-04-17 16:55:18 +00:00
Dietmar Maurer 98da7cd0a5 2002-04-17 Dietmar Maurer <[email protected]>
* x86.brg: optimized version of castclass and isinst

svn path=/trunk/mono/; revision=3879
2002-04-17 13:52:04 +00:00
Dietmar Maurer 29061b64f7 added a new field to TransparentProxy
svn path=/trunk/mcs/; revision=3878
2002-04-17 13:46:30 +00:00
Jaime Anguiano Olarra 671d153de7 Added two new questions and aswers. One is related to CORBA and ORBit. The second one is about if Ximian is going to offer certifications on Mono. There is also a little fix changing one AP(I for API.
svn path=/trunk/mono/; revision=3877
2002-04-17 12:55:02 +00:00
Paolo Molaro aa1e79f210 Wed Apr 17 18:36:27 CEST 2002 Paolo Molaro <[email protected]>
* timed-thread.c: avoid race condition when setting the thread to
	detached.

svn path=/trunk/mono/; revision=3876
2002-04-17 12:48:36 +00:00
Dick Porter a73a4ea6c2 Build libgc with threading support. This stops it going into a recursive
meltdown.

svn path=/trunk/mono/; revision=3875
2002-04-17 11:35:13 +00:00
Daniel Morgan 890650fbb5 2002-04-17 Daniel Morgan <[email protected]>
* Test/TestSqlInsert.cs: modified - do
	  a SQL DELETE before SQL INSERT of row so you can use this
	  test over and over.

	* System.Data.SqlClient/SqlTransaction.cs: modified - default
	  IsolationLevel for PostgreSQL is ReadCommitted.  However,
	  PostgreSQL allows Serializable as well.
      (Thanks to Gonzalo for that!)

	* System.Data.SqlClient/SqlConnection.cs: modified
	* System.Data.SqlClient/SqlCommand.cs: modified
	* System.Data.SqlClient/SqlTransaction.cs: modified - got transactions
	  working; however, we still need to implement SQL errors
	  and exceptions to properly handle transactions.  Also, added
	  status and error message support from the PostgreSQL database.
	  Currently, this does a Console.WriteLine() to display the
	  status and error messages, but this is a TODO
	  for SQL errors and exceptions.

	* System.Data/TODOAttribute.cs: added - needed MonoTODO
      attribute for System.Data.dll assembly

	* System.Data/IDbCommand.cs: modified - commented
	  overloaded method ExecuteReader
	  so System.Data.SqlClient.SqlCommand can compile

	* System.Data/IDbCommand.cs: modified
	* System.Data/IDbConnection.cs: modified - added using System;
	* System.Data/IDataParameter.cs

	* System.Data.build: modified - build classes
	  in System.Data.SqlClient and exclude others in System.Data

	* System.Data.SqlClient/PostgresLibrary.cs: modified - change
	  parameter data type from IntPtr to enum ExecStatusType

	* ChangeLog: modified - corrected previous entries in log

svn path=/trunk/mcs/; revision=3874
2002-04-17 10:57:14 +00:00
Rodrigo Moya e0f6a9c96b 2002-04-16 Rodrigo Moya <[email protected]>
* System.Data.Common/DataColumnMappingCollection.cs: added basic
	implementation. Still missing some stuff.

svn path=/trunk/mcs/; revision=3873
2002-04-17 09:15:46 +00:00
Paolo Molaro 2d41a134bf Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <[email protected]>
* profiler.c: TSC-based timer code (faster and more accurate).
	Not hooked up in configure, yet (set USE_X86TSC to 1).

svn path=/trunk/mono/; revision=3872
2002-04-17 08:27:02 +00:00
Paolo Molaro 667838351b Update with --profile option.
svn path=/trunk/mono/; revision=3871
2002-04-17 06:49:56 +00:00
Paolo Molaro b79e0f0173 Wed Apr 17 12:34:56 CEST 2002 Paolo Molaro <[email protected]>
* emit-x86.c, invoke.c: track time spent compiling.

svn path=/trunk/mono/; revision=3870
2002-04-17 06:49:29 +00:00
Paolo Molaro 1db7a86515 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <[email protected]>
* profiler.c, profiler.h: track time spent compiling methods.
	* threads.c: track thread creation/destruction.

svn path=/trunk/mono/; revision=3869
2002-04-17 06:45:11 +00:00
Paolo Molaro 90631efc8d Wed Apr 17 10:58:37 CEST 2002 Paolo Molaro <[email protected]>
* emit-x86.c, invoke.c: call profile callbacks if needed.
	* jit.c, jit.h, mono.c: add --profile command line option.

svn path=/trunk/mono/; revision=3868
2002-04-17 05:15:02 +00:00
Gonzalo Paniagua Javier d696caf330 2002-04-17 Gonzalo Paniagua Javier <[email protected]>
* IPAddress.cs: the icalls for sockets are endianness-aware. So I
	changed a few things. Also included a workaround for bug #23547.

svn path=/trunk/mcs/; revision=3867
2002-04-16 23:07:29 +00:00
Duncan Mak e230186787 2002-04-16 Duncan Mak <[email protected]>
* XmlParserContext.cs (NameTable): Fixed a typo in the set block.

svn path=/trunk/mcs/; revision=3866
2002-04-16 18:32:20 +00:00
Gonzalo Paniagua Javier ee9a8b4768 2002-04-16 Gonzalo Paniagua Javier <[email protected]>
* jit.h: included mono/io-layer/io-layer.h to avoid breaking
	compilation under windows when upgrading mingw and w32api to
	version	1.3 (thanks Dick!).

svn path=/trunk/mono/; revision=3865
2002-04-16 15:04:34 +00:00
Gonzalo Paniagua Javier 6e61b7db1b 2002-04-16 Gonzalo Paniagua Javier <[email protected]>
* jit.h: to more #include lines to avoid breaking compilation
	under windows when upgrading mingw and w32api to version
	1.3 (thanks Dick!).

svn path=/trunk/mono/; revision=3864
2002-04-16 15:03:47 +00:00
Paolo Molaro a33feb0292 Tue Apr 16 20:12:58 CEST 2002 Paolo Molaro <[email protected]>
* interp.c: removed profiling code (moved to common library).
	Implemented inlining for some special methods.

svn path=/trunk/mono/; revision=3863
2002-04-16 14:25:07 +00:00
Paolo Molaro 4bbb7a1bc4 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <[email protected]>
* profiler.c, profiler.h, profiler-private.h: profiling interface
	and sample implementation. Moved here so that it can be used also by
	the jit.

svn path=/trunk/mono/; revision=3862
2002-04-16 14:20:50 +00:00
Daniel Morgan 7086a2a4c9 2002-04-16 Daniel Morgan <[email protected]>
* System.Data/SqlConnection.cs: modified - got to compile,
	  run, and connect to PostgreSQL database
	* System.Data/SqlCommand.cs: modified - got to compile,
	  run, and execute a SQL INSERT command which successfully
	  inserted a row into the PostgreSQL database

	* System.Data/SqlTransaction.cs: modified
	* System.Data/SqlParameter.cs: modified
	* System.Data/SqlParameterCollection.cs: modified
	* System.Data/SqlError.cs: modified
	* System.Data/SqlErrorCollection.cs: modified
	* System.Data/SqlException.cs: modified
	* System.Data/PostgresLibrary.cs: modified - to compile

	* System.Data/SqlAdapter: modified
	* System.Data/SqlReader: modified - add more stubs

svn path=/trunk/mcs/; revision=3861
2002-04-16 13:24:34 +00:00
Daniel Morgan c1446e2b8d 2002-04-16 Daniel Morgan <[email protected]>
svn path=/trunk/mcs/; revision=3860
2002-04-16 13:02:57 +00:00
Patrik Torstensson 57161eddba 2002-04-15 Patrik Torstensson <[email protected]>
* loader.c : Fixed bug introduced by me in last checkin (corrupt memory)

svn path=/trunk/mono/; revision=3859
2002-04-16 11:39:46 +00:00
Paolo Molaro 6d173d8b43 Added char.
svn path=/trunk/mono/; revision=3858
2002-04-16 11:28:11 +00:00
Paolo Molaro 5e83411e64 Some info for runtime hackers that need to implement internal calls.
svn path=/trunk/mono/; revision=3857
2002-04-16 11:26:33 +00:00
Patrik Torstensson 254e878e48 2002-04-15 Patrik Torstensson <[email protected]>
* interp.c: changed the array icalls to use full names

svn path=/trunk/mono/; revision=3856
2002-04-16 11:10:56 +00:00
Patrik Torstensson 6cf9cfcc82 missed commit
svn path=/trunk/mono/; revision=3855
2002-04-16 11:08:10 +00:00
Patrik Torstensson 3657301773 2002-04-15 Patrik Torstensson <[email protected]>
* jit.c: changed the array icalls to use full names

svn path=/trunk/mono/; revision=3854
2002-04-16 11:07:11 +00:00
Patrik Torstensson ed3cf0ac44 2002-04-15 Patrik Torstensson <[email protected]>
* loader.c/h : added support for icall method overloading (signature checking)

svn path=/trunk/mono/; revision=3853
2002-04-16 11:05:59 +00:00
Nick Drochak 4ee648a9c8 2002-04-16 Nick Drochak <[email protected]>
* DecimalFormatter.cs: Trim off excess null characters from the string
	that decimal2string gives back.

svn path=/trunk/mcs/; revision=3852
2002-04-16 11:00:48 +00:00
Gonzalo Paniagua Javier 9e84501293 2002-04-16 Gonzalo Paniagua Javier <[email protected]>
* maintainers.xml: added myself.
	* class.xml: added System.Net.Sockets.UdpClient and updated
	System.Net.IPAddress and IPEndPoint.

svn path=/trunk/mono/; revision=3851
2002-04-16 09:25:33 +00:00
Dietmar Maurer a07d6cb904 added another paper
svn path=/trunk/mono/; revision=3850
2002-04-16 09:04:08 +00:00
Paolo Molaro e1b4034b26 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <[email protected]>
* reflection.c, reflection.h: keep types and other handles separate in
	the hash tables for referred tokens. Add guid for modules.

svn path=/trunk/mono/; revision=3849
2002-04-16 07:15:06 +00:00
Paolo Molaro 7d3a3ac779 Tue Apr 16 13:02:28 CEST 2002 Paolo Molaro <[email protected]>
* AssemblyBuilder.cs: pad output file to file alignment.
	* FieldBuilder.cs: ReflectedType.
	* ModuleBuilder.cs: added guid generation and array method creation.
	* MonoArrayMethod.cs: array method support code.

svn path=/trunk/mcs/; revision=3848
2002-04-16 07:15:06 +00:00
Dick Porter cf81343402 2002-04-16 Dick Porter <[email protected]>
* atomic.h: Explanatory comment about lack of 80386 support

svn path=/trunk/mono/; revision=3847
2002-04-16 07:00:58 +00:00
Nick Drochak 09515e2520 2002-04-16 Nick Drochak <[email protected]>
* String.cs (SubString): revert my change.  I can't reproduce the
	problem anymore.

svn path=/trunk/mcs/; revision=3846
2002-04-16 06:23:02 +00:00
Dietmar Maurer 5440214ad7 new test
svn path=/trunk/mono/; revision=3845
2002-04-16 03:26:54 +00:00
Gaurav Vaish 3d445fe381 2002-04-16 Gaurav Vaish <[email protected]>
* java: Added information about JILC - Java to IL Compiler

svn path=/trunk/mono/; revision=3844
2002-04-16 00:05:57 +00:00
Gonzalo Paniagua Javier f8067570ba 2002-04-16 Gonzalo Paniagua Javier <[email protected]>
* UdpClient.cs: implemented.

svn path=/trunk/mcs/; revision=3843
2002-04-15 23:57:45 +00:00
Daniel Morgan 222fb82852 *** empty log message ***
svn path=/trunk/mono/; revision=3842
2002-04-15 23:41:10 +00:00
Daniel Morgan 4c23dee643 *** empty log message ***
svn path=/trunk/mcs/; revision=3841
2002-04-15 23:07:23 +00:00
Daniel Morgan 14b4926a06 does
svn path=/trunk/mcs/; revision=3840
2002-04-15 22:58:50 +00:00
Christopher Podurgiel 633dba140b * System.Data.IDbDataParameter: Added Interface to IDataParameter.
* System.Data.IDbTransaction: Added Interface to IDisposable.
* System.Data.IDbCommand: Fixed Capitalization of class name.
* System.Data.IDbConnection: Fixed Capitalization of class name.

svn path=/trunk/mcs/; revision=3839
2002-04-15 21:58:27 +00:00
Rodrigo Moya e601a40811 Some fixes as I read the C# book
svn path=/trunk/mcs/; revision=3838
2002-04-15 20:53:01 +00:00
Rodrigo Moya c063ed29d2 2002-04-15 Rodrigo Moya <[email protected]>
* System.Data.Common/DbDataPermissionAttribute.cs:
	* System.Data.Common/DataAdapter.cs:
	* System.Data.Common/DataColumnMapping.cs:
	* System.Data.Common/DbDataPermission.cs: added some implementation.

svn path=/trunk/mcs/; revision=3837
2002-04-15 20:37:13 +00:00
Dan Lewis 8c4d5cae72 2002-04-15 Dan Lewis <[email protected]>
* MethodImplAttribute.cs: added constructor usage.

svn path=/trunk/mcs/; revision=3836
2002-04-15 19:05:14 +00:00
Rodrigo Moya 246f9d81c1 2002-04-15 Rodrigo Moya <[email protected]>
* System.Data.SqlClient/SqlConnection.cs: fixed constructor chaining
	syntax, as pointed out by Levent Camlibel.

svn path=/trunk/mcs/; revision=3835
2002-04-15 16:30:06 +00:00
Gonzalo Paniagua Javier b8e938a053 2002-04-15 Gonzalo Paniagua Javier <[email protected]>
* IPAddress.cs: use System.BitConverter.IsLittleEndian (suggested
	by Paolo) instead of guessing the endianness.

	* SocketAddress.cs: implemented Equals() and GetHashcode().

svn path=/trunk/mcs/; revision=3834
2002-04-15 16:20:04 +00:00
Gonzalo Paniagua Javier ff29f7f165 2002-04-15 Gonzalo Paniagua Javier <[email protected]>
* IPAddressTest.cs: use System.BitConverter.IsLittleEndian (suggested
	by Paolo) instead of guessing the endianness.

svn path=/trunk/mcs/; revision=3833
2002-04-15 16:07:13 +00:00
Dietmar Maurer 7cae473f2c 2002-04-15 Dietmar Maurer <[email protected]>
* x86.brg: check the this pointer before calling
	non-virtual functions

svn path=/trunk/mono/; revision=3832
2002-04-15 15:11:44 +00:00
Dietmar Maurer c6be154e47 2002-04-15 Dietmar Maurer <[email protected]>
* emit-x86.c (arch_emit_prologue): initialize local vars.

	* x86.brg: removed incredible clumsy code

svn path=/trunk/mono/; revision=3831
2002-04-15 13:51:56 +00:00
Miguel de Icaza 51a5efcee3 Update for ASP.NET
svn path=/trunk/mono/; revision=3830
2002-04-15 13:05:56 +00:00
Dick Porter 9b5e22eb76 2002-04-15 Dick Porter <[email protected]>
* atomic.h: use xaddl for InterlockedIncrement() and
	InterlockedDecrement().  Use cmpxchgl in a loop for
	InterlockedExchange() and InterlockedExchangePointer().

svn path=/trunk/mono/; revision=3829
2002-04-15 13:05:04 +00:00
Miguel de Icaza 4bc54249e3 Add new files
svn path=/trunk/mono/; revision=3828
2002-04-15 12:21:21 +00:00
Gonzalo Paniagua Javier f3cd574ac3 2002-04-15 Gonzalo Paniagua Javier <[email protected]>
* IPEndPoint.cs: modifications to constructors according to the
	specifications (suggested by Lawrence Pit).

svn path=/trunk/mcs/; revision=3827
2002-04-15 11:22:03 +00:00
Paolo Molaro f686661f5f Mon Apr 15 13:31:22 CEST 2002 Paolo Molaro <[email protected]>
* unicode.c: fix unicode_len() to not access uninitialized memory
	(and updated to conform to mono code style).

svn path=/trunk/mono/; revision=3826
2002-04-15 07:43:10 +00:00
Miguel de Icaza 779415f523 Remove debugging message
svn path=/trunk/mcs/; revision=3825
2002-04-15 06:51:10 +00:00
Paolo Molaro 2aefc13cc2 Document --module and fix formatting.
svn path=/trunk/mono/; revision=3824
2002-04-15 06:03:04 +00:00
Paolo Molaro 9f84f7ffec Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <[email protected]>
* assembly.c: fix bugs found with valgrind.
	* metadata.h, metadata.c: added mono_metadata_guid_heap().

svn path=/trunk/mono/; revision=3823
2002-04-15 05:49:21 +00:00
Paolo Molaro 5ef5e8e65b Mon Apr 15 11:35:05 CEST 2002 Paolo Molaro <[email protected]>
* dump.c, dump.h, get.c, get.h, main.c: support for dumping the
	module table and guid values.

svn path=/trunk/mono/; revision=3822
2002-04-15 05:46:56 +00:00
Patrik Torstensson 3d6450fc0f 2002-04-15 Patrik Torstensson
* Test for AppDomain support in thread

svn path=/trunk/mono/; revision=3821
2002-04-15 05:21:13 +00:00
Patrik Torstensson 6bc5cec8f2 2002-04-14 Patrik Torstensson <[email protected]>
* threads: added icall support for getting current domain for
	           the thread.

svn path=/trunk/mono/; revision=3820
2002-04-15 05:05:18 +00:00
Patrik Torstensson e2c8a27eca 2002-04-15 Patrik Torstensson <[email protected]>
* IPEndPoint.cs: Fixed build breaker.

svn path=/trunk/mcs/; revision=3819
2002-04-15 04:16:32 +00:00
Gonzalo Paniagua Javier 833935a07f 2002-04-15 Gonzalo Paniagua Javier <[email protected]>
* IPEndPoint.cs: implemented Equals() and GetHashCode(). Now 100%
	complete.

svn path=/trunk/mcs/; revision=3818
2002-04-15 01:03:28 +00:00
Gonzalo Paniagua Javier 3731330ebb Some changes to behave as MS does.
svn path=/trunk/mcs/; revision=3817
2002-04-15 00:47:14 +00:00
Gonzalo Paniagua Javier 7ad05ce959 2002-04-15 Gonzalo Paniagua Javier <[email protected]>
* IPAddress.cs: finished all MonoTODO's. Use network order to store 
	the address. Check for max and min values in Address:set. IsLoopback()
	returns now true for all 127.x.y.z. Some more checks in Parse ().

svn path=/trunk/mcs/; revision=3816
2002-04-14 23:47:37 +00:00
Duncan Mak b1e70ba3f1 Woohoo, I got a line of code into the compiler!
2002-04-14  Duncan Mak  <[email protected]>

	* cfold.cs (BinaryFold): Catch DivideByZeroException in the
	Binary.Operator.Division case.

svn path=/trunk/mcs/; revision=3815
2002-04-14 21:38:25 +00:00
Adam Treat 1503838060 * Implemented ctor (string xmlFragment).
svn path=/trunk/mcs/; revision=3814
2002-04-14 21:20:16 +00:00
John Barnette 6dd7c6bdeb Added "FooDoc(string name)" constructors in all relevant places.
svn path=/trunk/mcs/; revision=3813
2002-04-14 21:14:47 +00:00
John Barnette 6768166551 Redundant; replaced with StringDictionary in EnumDoc.cs. Remove.
svn path=/trunk/mcs/; revision=3812
2002-04-14 21:10:53 +00:00
Adam Treat eb67401dcb * Implemented ReadInnerXml and ReadOuterXml. We still need to validate for
'well-formed' xml though.  I'll wait for Validating reader before adding that
bit ;-)

svn path=/trunk/mcs/; revision=3811
2002-04-14 20:46:49 +00:00
Gonzalo Paniagua Javier 7d54a1b2bf 2002-04-15 Gonzalo Paniagua Javier <[email protected]>
* System.Net/: added directory.
	* AllTests.cs: added System.Net suite.

In System.Net/

	* ChangeLog:
	* AllTests.cs:
	* IPAddressTest.cs: added files.

svn path=/trunk/mcs/; revision=3810
2002-04-14 20:25:12 +00:00
Rodrigo Moya 6e7bbf106d 2002-04-14 Rodrigo Moya <[email protected]>
* System.Data.SqlTypes/SqlBinary.cs:
	* System.Data.SqlTypes/INullable.cs: new skeletons.

svn path=/trunk/mcs/; revision=3809
2002-04-14 18:06:00 +00:00
Gonzalo Paniagua Javier 4ab3c2c2e3 2002-04-14 Gonzalo Paniagua Javier <[email protected]>
* IOCompletionCallback.cs: added attributes to the delegate
	(CLSCompliant(false) and Serializable).

svn path=/trunk/mcs/; revision=3808
2002-04-14 13:54:03 +00:00
Christian Meyer f6b0eaa121 Added ChangeLog file.
svn path=/trunk/mcs/; revision=3807
2002-04-14 13:21:47 +00:00
Christian Meyer bb15492dc5 Added Metafile.cs. No impl. Not finished, just stubs. 50% of ctors are done.
svn path=/trunk/mcs/; revision=3806
2002-04-14 13:14:57 +00:00
Patrik Torstensson 555a2727f3 2002-04-14 Patrik Torstensson <[email protected]>
* Thread.cs: Fixed IsThreadPoolThread to use a internal property instead of extending
				 the threadstate enum.
	* ThreadPool.cs: Now using the internal Isthreadpoolthread property
	* ThreadState.cs: removed non-standard enum (ThreadPoolThread)

svn path=/trunk/mcs/; revision=3805
2002-04-14 12:13:01 +00:00
Rodrigo Moya 011da1207d 2002-04-14 Daniel Morgan <[email protected]>
* System.Data.SqlClient/PostgresLibrary.cs: new internal class, which
	contains all calls the the PostgreSQL client library, to be used
	everywhere in System.Data.SqlClient.

svn path=/trunk/mcs/; revision=3804
2002-04-14 12:12:45 +00:00
Patrik Torstensson d50c0dc184 2002-04-14 Patrik Torstensson <[email protected]>
* ThreadState.cs: Added enum for threadpool thread
	* Thread.cs: changed the set/clr_state to be internal (used from threadpool)
	* Thread.cs: Added IsThreadPoolThread
	* ThreadPool.cs: Implementation of QueueUserWorkItem

svn path=/trunk/mcs/; revision=3803
2002-04-14 08:44:28 +00:00
Ravi Pratap M 53e4d01105 2002-04-13 Ravi Pratap <[email protected]>
* class.cs (DefineType): Ensure that we do a proper check on
	attribute types and also register it with the TypeManager.

	(TypeContainer.Targets): The default for attribute types is
	AttributeTargets.All.

	* attribute.cs (ApplyAttributes): Registering the attribute type
	is done elsewhere, not when we discover we have a Usage attribute.

svn path=/trunk/mcs/; revision=3802
2002-04-13 19:57:00 +00:00
Martin Baulig 3bf1341d60 2002-04-13 Martin Baulig <[email protected]>
* IMonoSymbolWriter.cs (ISourceBlock): Added `Blocks' property and `AddBlock'
	method to support nested blocks.

	* MonoSymbolWriter.cs: Correctly handle nested blocks.

	* MonoDwarfFileWriter.cs (DieMember): Provide info for all fields, not just for
	public ones; also added DW_AT_accessibility.
	(DieVariable): Reflected latest debug-symfile.c changes.

svn path=/trunk/mcs/; revision=3801
2002-04-13 16:34:42 +00:00
Martin Baulig baee4c3636 2002-04-13 Martin Baulig <[email protected]>
* debug-dwarf2.c (dwarf2_write_variable_location): New static func to write
	the location of a variable.
	(dwarf2_write_variable, dwarf2_write_parameter): Take a MonoDebugVarInfo
	instead of a stack offset and use dwarf2_write_variable_location() to write
	the location.

svn path=/trunk/mono/; revision=3800
2002-04-13 16:26:10 +00:00
Martin Baulig 35c5000510 2002-04-13 Martin Baulig <[email protected]>
* debug.c, debug-stabs.c, debug-dwarf2.c: Reflect latest debug-symfile.h
	API changes.

svn path=/trunk/mono/; revision=3799
2002-04-13 16:14:29 +00:00
Martin Baulig 072bd181e0 2002-04-13 Martin Baulig <[email protected]>
* debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
	(MonoDebugVarInfo): Added `index' field for register based addresses.
	(MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
	(MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
	`MonoDebugVarInfo *params' and `guint32 this_offset' with
	`MonoDebugVarInfo *this_var'.

	* debug-symfile.c (relocate_variable): New static function to write
	a location description for a local variable or method parameter.

svn path=/trunk/mono/; revision=3798
2002-04-13 16:13:51 +00:00
Gonzalo Paniagua Javier 796b57ef91 2002-04-12 Gonzalo Paniagua Javier <[email protected]>
* monoburg/monoburg.c: added option -s to specify the c source file for output.
	* jit/Makefile.am: use the new option.

svn path=/trunk/mono/; revision=3797
2002-04-13 07:46:16 +00:00
Gonzalo Paniagua Javier 5a53082386 2002-04-13 Gonzalo Paniagua Javier <[email protected]>
* Attribute.cs: added GetHashCode and Equals.

svn path=/trunk/mcs/; revision=3796
2002-04-13 07:27:24 +00:00
John Barnette ea198bcf76 Tweaks.
svn path=/trunk/mcs/; revision=3795
2002-04-13 02:56:11 +00:00
John Barnette a0f9a11220 Updated to use ValueConstrainedArrayList.
ParameterDoc removed, as it was useless.

svn path=/trunk/mcs/; revision=3794
2002-04-13 02:55:33 +00:00
Duncan Mak 532d9eb391 2002-04-12 Duncan Mak <[email protected]>
* XmlAttribute.cs (Prefix): Added preliminary code for set block,
	added comment on work that needs to be done here. A new MonoTODO item.

	* XmlDocument.cs (ctor): Corrected constructor signature, changed
	parameter from 'NameTable' to 'XmlNameTable'.

	* XmlDocumentFragment.cs (InnerXml): Added missing set block.

svn path=/trunk/mcs/; revision=3793
2002-04-12 21:15:43 +00:00
Adam Treat 4e70b38a95 * Replace with the replacement string not the pattern ;-)
svn path=/trunk/mcs/; revision=3792
2002-04-12 20:45:53 +00:00
Ravi Pratap M 2d9439b962 2002-04-12 Ravi Pratap <[email protected]>
* expression.cs (VerifyArgumentsCompat): Implement Miguel's suggestion
	and get rid of is_delegate parameter.

	* everywhere : update.

svn path=/trunk/mcs/; revision=3791
2002-04-12 18:54:11 +00:00
Ravi Pratap M 691fe53a0b 2002-04-12 Ravi Pratap <[email protected]>
* cs-parser.jay (compilation_unit): Revamp completely to use
	some new ideas that I got from Rhys' grammar to solve the problems
	with assembly level attributes.

	(outer_declaration): New grammar production.

	(attribute_sections): Add.

	(opt_attributes): Base on attribute_sections

	(namespace_declaration): Allow opt_attributes to tackle the case
	when we have assembly level attributes - we are clever in this
	regard now ;-)

	* attribute.cs (ApplyAttributes): Do not worry about assembly
	attributes in the non-global context.

	* rootcontext.cs (AddGlobalAttributes): Go back to using this
	instead of SetGlobalAttributes.

	* class.cs, rootcontext.cs : Ensure we define and generate
	attribute types before anything else.

	* attribute.cs (CheckAttribute and GetValidPlaces): Handle the exception
	and flag the new error -20 for the case when the attribute type
	does not have valid targets specified. csc does not catch this.

	* ../errors/errors.txt : update for error # -20

2002-04-11  Ravi Pratap  <[email protected]>

	* support.cs (InternalParameters.ParameterModifier): Do some null
	checking and return sane values.

	* class.cs (Method.Define): If we are a PInvoke method, ensure
	that we are static and extern. Report error # 601

	* ../errors/cs0601.cs : Add test case for the above error.

2002-04-07  Ravi Pratap  <[email protected]>

	* rootcontext.cs (attribute_types): We need to keep type of
	all attribute types separately and emit code for them first.

	(RegisterAttribute) : Implement.

	* class.cs (DefineType): Check if the current Type is a custom
	attribute type and register it accordingly.

	* rootcontext.cs (AddGlobalAttributes): Fix silly bug where we were
	adding the first attribute twice and rename to

	(SetGlobalAttributes): this.

	* rootcontext.cs (NamespaceLookup): Run through the aliases too and perform
	lookups.

	* attribute.cs (ApplyAttributes): Take an additional argument telling us
	if we are processing global arguments. Hmm, I am unsure of this.

svn path=/trunk/mcs/; revision=3790
2002-04-12 18:51:32 +00:00
Ravi Pratap M a11971b3ed 2002-04-05 Ravi Pratap <[email protected]>
* test-101.cs : Add test from Paolo.

	* test-102.cs : Another test for attribute emission.

svn path=/trunk/mcs/; revision=3789
2002-04-12 18:50:22 +00:00
Ravi Pratap M 8ea6a01db9 Add
svn path=/trunk/mcs/; revision=3788
2002-04-12 18:25:13 +00:00
Duncan Mak dcce243fc2 2002-04-12 Duncan Mak <[email protected]>
* SerializationException.cs: Added missing constructor for serialization.

svn path=/trunk/mcs/; revision=3787
2002-04-12 16:48:45 +00:00
John Barnette 08f7886841 Initial revision.
svn path=/trunk/mcs/; revision=3786
2002-04-12 16:40:28 +00:00
Duncan Mak 0fda2aa47a 2002-04-12 Duncan Mak <[email protected]>
XmlCaseOrder.cs: Moved to here from System.Xml.

svn path=/trunk/mcs/; revision=3785
2002-04-12 16:38:27 +00:00
Duncan Mak 09c1bfec7e 2002-04-12 Duncan Mak <[email protected]>
XmlCaseOrder.cs: Moved to System.Xml.XPath.

svn path=/trunk/mcs/; revision=3784
2002-04-12 16:37:44 +00:00
Duncan Mak 3ceba8cddc This is a ValueType, return 0 instead of null.
svn path=/trunk/mcs/; revision=3783
2002-04-12 16:22:10 +00:00
Duncan Mak 9f5d8e9657 2002-04-12 Duncan Mak <[email protected]>
* AssemblyAlgorithmIdAttribute.cs: Fixed typo in AlgorithmId
	property.

	* AssemblyDelaySignAttribute.cs: Fixed type in DelaySign
	attribute.

	* AssemblyFileVersionAttribute.cs: Renamed FileVersion property to
	Version.

	* BindingFlags.cs: Added missing value "PutRefDispProperty".

	* FieldAttributes.cs: Removed value "HasSecurity".

	* ManifestResourceInfo.cs: Added missing properties FileName,
	ReferencedAssembly and ResourceLocation.

svn path=/trunk/mcs/; revision=3782
2002-04-12 16:19:30 +00:00
Martin Baulig 888824eae1 2002-04-12 Martin Baulig <[email protected]>
* gdb-variable-scopes.patch: A patch for GDB (against the latest CVS version)
	to implement variable lifetimes.

svn path=/trunk/mcs/; revision=3781
2002-04-12 16:03:06 +00:00
Martin Baulig bd763beb78 Write DW_AT.AT_begin_scope and DW_AT.AT_end_scope as addresses, not as offsets.
svn path=/trunk/mcs/; revision=3780
2002-04-12 15:55:44 +00:00
Martin Baulig 43d5d26901 2002-04-12 Martin Baulig <[email protected]>
* debug-dwarf2.c (dwarf2_write_variable): Emit info about the variable's
	lifetime.

svn path=/trunk/mono/; revision=3779
2002-04-12 15:54:51 +00:00
Martin Baulig 18f1af4e29 Ooops, it's an address, not an offset.
svn path=/trunk/mono/; revision=3778
2002-04-12 15:53:15 +00:00
Duncan Mak aeba4e6224 Forgot about this
svn path=/trunk/mcs/; revision=3777
2002-04-12 15:46:05 +00:00
Duncan Mak e78b3daf64 2002-04-12 Duncan Mak <[email protected]>
* TargetInvocationException.cs: Added the missing constructors.

svn path=/trunk/mcs/; revision=3776
2002-04-12 15:40:36 +00:00
Martin Baulig 609231fe4d 2002-04-12 Martin Baulig <[email protected]>
* MonoDwarfFileWriter.cs (DieVariable): Provide info about the variable's
	lifetime using DW_AT_begin_scope and a new baulig extension DW_AT_end_scope.

svn path=/trunk/mcs/; revision=3775
2002-04-12 15:30:55 +00:00
Martin Baulig b67e5196e8 2002-04-12 Martin Baulig <[email protected]>
* debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
	stack offset and begin/end scope address of a local variable.
	(MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
	'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
	(MONO_DEBUG_SYMBOL_FILE_VERSION): Increase to 8.

	* debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
	Added new relocation types for start/end scope of a local variable.

svn path=/trunk/mono/; revision=3774
2002-04-12 15:27:29 +00:00
Miguel de Icaza 45e6ca7564 Add new test
svn path=/trunk/mcs/; revision=3773
2002-04-12 13:58:39 +00:00
Paolo Molaro 50bb223ddb Fri Apr 12 18:32:34 CEST 2002 Paolo Molaro <[email protected]>
* MonoMethod.cs: make Name property an icall.

svn path=/trunk/mcs/; revision=3772
2002-04-12 12:43:39 +00:00
Paolo Molaro adf453481a Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <[email protected]>
* object.h: add mono_object_domain() macro.
	* reflection.c: handle typespecs.
	* icall.c: MonoMethod::get_Name() implementation.

svn path=/trunk/mono/; revision=3771
2002-04-12 12:43:39 +00:00
Paolo Molaro 70e4152290 Get rid of debug print.
svn path=/trunk/mcs/; revision=3770
2002-04-12 12:39:04 +00:00
Rodrigo Moya dd76baee9d 2002-04-12 Rodrigo Moya <[email protected]>
* status/maintainers.xml: added danmorg and myself for System.Data.*
	classes.

	* status/class.xml: added System.Data.* classes.

svn path=/trunk/mono/; revision=3769
2002-04-12 11:07:36 +00:00
John Sohn caf12171ff added NotifyCollectionHandler class and INotifyCollection
interface to reduce duplicated code

svn path=/trunk/mcs/; revision=3768
2002-04-12 01:13:22 +00:00
Gonzalo Paniagua Javier 192a53bd73 2002-04-12 Gonzalo Paniagua Javier <[email protected]>
* Enum.cs: little improvements to Format ().

svn path=/trunk/mcs/; revision=3767
2002-04-12 00:20:41 +00:00
Gonzalo Paniagua Javier bb45294580 2002-04-12 Gonzalo Paniagua Javier <[email protected]>
* expression.cs: added static array of strings to avoid calling
	Enum.ToString () for Operator in Binary. Significant recover of
	performance.

svn path=/trunk/mcs/; revision=3766
2002-04-12 00:16:02 +00:00
Patrik Torstensson 875e58acae 2002-04-12 Patrik Torstensson <[email protected]>
* HttpApplication.cs: Minor updates
	* HttpApplicationState.cs: Ready.
	* HttpClientCertificate.cs: Signature updates
	* HttpValueCollection.cs: ready
	* HttpStaticObjectsCollection.cs: ready
	* HttpResponseHeader.cs: made internal only
	* HttpResponse.cs: Signature updates
	* HttpPostedFile.cs: ready
	* HttpCacheVaryByHeaders.cs: ready (except communication to policy)
	* HttpCacheVaryByParams.cs: ready (except communication to policy)

	System.Web is now over 60% ready..

svn path=/trunk/mcs/; revision=3765
2002-04-11 19:03:18 +00:00
Ravi Pratap M 08ddd40331 Add
svn path=/trunk/mcs/; revision=3764
2002-04-11 17:51:39 +00:00
Patrik Torstensson a896c8c81c 2002-04-11 Patrik Torstensson
* Forgot to add new files (again...)

svn path=/trunk/mcs/; revision=3763
2002-04-11 14:01:36 +00:00
Patrik Torstensson 90f4845f6f 2002-04-11 Patrik Torstensson <[email protected]>
* HttpException.cs: 95% ready, only windows dependent code left
	* HttpFileCollection.cs: Finished.
	* HttpRequest.cs: Minor fixes and fixed signature problems
	* HttpResponse.cs: Implementation of missing methods and signature problems
	* HttpResponseHeader.cs: Fixed signature problems
	* HttpRuntime.cs: Fixed signature problems
	* HttpServerUtility.cs: Added support for HttpApplication
	* HttpSessionState.cs: Fixed signature issues
	* HttpUtility.cs: fixed signature issues
	* HttpValueCollection.cs: Support for cookie parsing and fixed signature issues
	* HttpWorkerRequest.cs: Fixed small signature issue
	* HttpWriter.cs: Fixed signature issue
	* HttpApplication.cs: Basic implementation
	* HttpApplicationState.cs: Small fixes to support major change comming up
	* HttpBrowserCapabilities.cs: Added Type method
	* HttpClientCertificate.cs: Almost ready, needs to parse certificate.
	* HttpContext.cs: Fixed signature issues and added last methods.
	* HttpCookie.cs: Full implementation
	* HttpCookieCollection.cs: Full implementation
	* TraceContext.cs: Methods implemented.
	* HttpPostedFile.cs: Placeholder
	* HttpStaticObjectsCollection.cs: Placeholder
	* HttpModuleCollection.cs: Ready, will be used during the major revamp.

	* Fixed a number of other small signature problems also (class status page)

svn path=/trunk/mcs/; revision=3762
2002-04-11 13:59:28 +00:00
Miguel de Icaza 36fdbe42d6 Add new links
svn path=/trunk/mono/; revision=3761
2002-04-11 08:03:48 +00:00
Piers Haken 6c048296bb added support for comparing values of static-literal fields
svn path=/trunk/mcs/; revision=3760
2002-04-11 07:04:05 +00:00
Paolo Molaro b6155c9093 Thu Apr 11 12:29:14 CEST 2002 Paolo Molaro <[email protected]>
* icall.c: String::GetHashCode() icall implementation.

svn path=/trunk/mono/; revision=3759
2002-04-11 06:40:17 +00:00
Paolo Molaro eac9e5725a Thu Apr 11 12:28:13 CEST 2002 Paolo Molaro <[email protected]>
* String.cs: internalcall GetHashCode().
	* Array.cS: optimize access to elements.

svn path=/trunk/mcs/; revision=3758
2002-04-11 06:40:15 +00:00
Miguel de Icaza e59897a70c 2002-04-10 Miguel de Icaza <[email protected]>
* class.cs (FindMembers): Allow the Builders of the various
	members to be null.  If they are skip them.  This only happens
	during the PInvoke declaration.

svn path=/trunk/mcs/; revision=3757
2002-04-11 05:26:38 +00:00
John Barnette 7f0c3d7471 This is a useless class, and is better represented with a
Hashtable.  In a related news item, I'm an idiot.

svn path=/trunk/mcs/; revision=3756
2002-04-11 01:55:26 +00:00
Duncan Mak 50f650319a 2002-04-10 Duncan Mak <[email protected]>
* XmlNodeReader.cs: Initial stubs for the class.

svn path=/trunk/mcs/; revision=3755
2002-04-10 23:29:51 +00:00
Duncan Mak 6682b3d792 2002-04-10 Duncan Mak <[email protected]>
* CaptionButton.cs:
	* CharacterCasing.cs:
	* CheckState.cs:
	* DataGridParentRowsLabelStyle.cs:
	* DialogResult.cs:
	* DockStyle.cs:
	* DragAction.cs:
	* DragDropEffects.cs:
	* DrawItemState.cs:
	* DrawMode.cs:
	* ErrorBlinkStyle.cs:
	* ErrorIconAlignment.cs:
	* FlatStyle.cs:
	* FormBorderStyle.cs:
	* FormStartPosition.cs:
	* FormWindowState.cs:
	* FrameStyle.cs: Fixed enum layouts with EnumCheck.

svn path=/trunk/mcs/; revision=3754
2002-04-10 23:28:18 +00:00
Dennis Hayes 02f270f821 * Initial checkin for all delegates *
svn path=/trunk/mcs/; revision=3753
2002-04-10 22:19:55 +00:00
Dennis Hayes 3ba96aed2b * Initial checkin for a number of enums *
svn path=/trunk/mcs/; revision=3752
2002-04-10 21:43:31 +00:00
John Sohn c4220565f9 Call notification event if changes occur during begin/end update
svn path=/trunk/mcs/; revision=3751
2002-04-10 20:49:04 +00:00
Jonathan Pryor 52a4bf6ba2 * TraceListenerCollection.cs: Corrected indexer property to provide the
correct return value and implement the IList indexer property correctly.

svn path=/trunk/mcs/; revision=3750
2002-04-10 20:43:52 +00:00
Gonzalo Paniagua Javier 461e962acf 2002-04-11 Gonzalo Paniagua Javier <[email protected]>
* monoburg.c: added a default handler for warning messages that just
	output the messages to stderr instead of stdout.

svn path=/trunk/mono/; revision=3749
2002-04-10 20:12:48 +00:00
John Sohn a72d48ebd5 implementation of ArrayList and Hashtable class which enables notification
when the contents are changed by an event

svn path=/trunk/mcs/; revision=3748
2002-04-10 16:15:48 +00:00
Sergey Chaban 1cbb1e03bd Do not include signal/syscall header for Win32 build.
svn path=/trunk/mono/; revision=3747
2002-04-10 16:00:17 +00:00
Sergey Chaban 331f8c02c5 Makefile.am: don't exclude JIT from Win32 builds;
svn path=/trunk/mono/; revision=3746
2002-04-10 15:32:08 +00:00
Paolo Molaro bfc71aa9fe Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <[email protected]>
* icall.c: String::IndexOfAny icall.
	* object.c, object.h: make array->max_length more useful.
	Intrduced mono_object_class() and mono_string_length() macros.

svn path=/trunk/mono/; revision=3745
2002-04-10 15:31:11 +00:00
Paolo Molaro e864162f0c Wed Apr 10 21:20:19 CEST 2002 Paolo Molaro <[email protected]>
* String.cs: make IndexOfAny() use an internalcall.

svn path=/trunk/mcs/; revision=3744
2002-04-10 15:31:05 +00:00
Sergey Chaban 3e6037ec96 Changes to support Win32 SEH, see ChangeLog for details.
svn path=/trunk/mono/; revision=3743
2002-04-10 15:30:00 +00:00
Gonzalo Paniagua Javier 4120b86ba4 2002-04-10 Gonzalo Paniagua Javier <[email protected]>
* Int32.cs:
	* UInt32.cs:
	* Int64.cs: 
	* UInt64.cs: fixed error when testing for validity of flags.

svn path=/trunk/mcs/; revision=3742
2002-04-10 13:13:45 +00:00
Gonzalo Paniagua Javier c22020112b 2002-04-10 Gonzalo Paniagua Javier <[email protected]>
* unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
	instead of g_unichar_isdigit.

svn path=/trunk/mono/; revision=3741
2002-04-10 13:00:08 +00:00
Paolo Molaro f21dafd7f9 Forgot to commit.
svn path=/trunk/mono/; revision=3740
2002-04-10 12:34:16 +00:00
Nick Drochak fa2f54345a 2002-04-11 Nick Drochak <[email protected]>
* Double.cs: Use an internal call for ToString(). This is just a simple
	implementation to get away from throwing a NotImplementedException.

svn path=/trunk/mcs/; revision=3739
2002-04-10 11:29:57 +00:00
Nick Drochak 7f58e71351 2002-04-11 Nick Drochak <[email protected]>
* icall.c: Implement a simple Double.ToString().

svn path=/trunk/mono/; revision=3738
2002-04-10 11:27:22 +00:00
Gonzalo Paniagua Javier 8f3156d08d 2002-04-10 Gonzalo Paniagua Javier <[email protected]>
* Int32.cs:
	* UInt32.cs:
	* Int64.cs: 
	* UInt64.cs: changed Type.GetType () by typeof (), as suggested by
	lupus.

	* Int32.cs:
	* Int64.cs: throw an OverFlowException when parsing a string 
	containing a dot followed by any non '0' number.

svn path=/trunk/mcs/; revision=3737
2002-04-10 11:11:31 +00:00
Patrik Torstensson 199e79205d 2002-04-10 Patrik Torstensson <[email protected]>
* Added System.Web.Hosting in the build

svn path=/trunk/mcs/; revision=3736
2002-04-10 10:57:51 +00:00
Paolo Molaro 0c3ef2d951 Wed Apr 10 16:07:23 CEST 2002 Paolo Molaro <[email protected]>
* interp.c: quick implementation for opcodes needed by the new parse
	routines in corlib.

svn path=/trunk/mono/; revision=3735
2002-04-10 10:19:00 +00:00
Patrik Torstensson cf29b2436a 2002-04-10 Patrik Torstensson
* Updated to reflect the new runtime

svn path=/trunk/mcs/; revision=3734
2002-04-10 09:11:49 +00:00
Patrik Torstensson 44f6e8a331 2002-04-10 Patrik Torstensson <[email protected]>
* ApplicationHost.cs: Test implementation to support testing.
        * SimpleWorkerRequest.cs: Rewrite and a almost full implementation.

svn path=/trunk/mcs/; revision=3733
2002-04-10 08:42:30 +00:00
Patrik Torstensson e79159ff2d 2002-04-10 Patrik Torstensson <[email protected]>
* HttpWorkerRequest.EndOfSendNotification.cs Removed (included in WorkerRequest)
    * Checkin of all new files (noted in last changenote)

svn path=/trunk/mcs/; revision=3732
2002-04-10 08:41:20 +00:00
Patrik Torstensson 826f39a57a 2002-04-10 Patrik Torstensson <[email protected]>
* HttpContext.cs: First implementation (basic support, few methods left to impl)
    * HttpException.cs: Partial implementation (basic support)
    * HttpHelper.cs: Header parse helper, used by runtime (non public)
    * HttpRequest.cs: Implementation (all methods there, not all fully impl)
    * HttpRequestStream.cs: Full implementation
    * HttpResponse.cs: Partial implementation(almost all methods)
    * HttpResponseHeader.cs: Header helper
    * HttpResponseStream.cs: Full implementation - Response stream support
    * HttpResponseStreamProxy.cs: Implementation - filter support
    * HttpRuntime.cs: Rewrite to support one IHttpModule (use for testing the runtime)
	* HttpServerUtility.cs: Implemented usage of HttpContext for methods
	                        and moved encoding functions to HttpUtility.

    * HttpUtility.cs: Added encoding/decoding functions from HttpServerUtility and
                      added the Attribute encoding functions.

    * HttpValueCollection.cs: Implementation.
    * HttpWorkerRequest.cs: Rewrite and implementation of all methods (ready)
    * HttpWriter.cs: Implementation (with filter support)

    * HttpFileCollection: Added dummy class (placeholder)
    * HttpApplication.cs: Added dummy class (placeholder)
    * HttpApplicationState.cs: Added dummy class (placeholder)
    * HttpBrowserCapabilities.cs: Added dummy class (placeholder)
    * HtttpCachePolicy.cs: Added dummy class (placeholder)
    * HttpClientCertificate.cs: Added dummy class (placeholder)
    * HttpSessionState.cs: Added dummy class (placeholder)
    * TraceContext.cs: Added dummy class (placeholder)

svn path=/trunk/mcs/; revision=3731
2002-04-10 08:35:39 +00:00
Patrik Torstensson 16ea1221e1 2002-04-10 Patrik Torstensson <[email protected]>
* Changed build file to reflect the runtime changes


svn path=/trunk/mcs/; revision=3730
2002-04-10 08:34:39 +00:00
Patrik Torstensson 8a7fd125b2 2002-04-10 Patrik Torstensson <[email protected]>
* System.Web -- Assembly build.

	  The basic runtime support is now working, we can now start working
	  on the runtime flow system (thread pool etc) and also start testing
	  the parser and control framework. (224 files are compiled)

svn path=/trunk/mcs/; revision=3729
2002-04-10 08:33:36 +00:00
Gonzalo Paniagua Javier 681fa8ab77 2002-04-10 Gonzalo Paniagua Javier <[email protected]>
* Byte.cs:
	* UInt16.cs:
	* UInt32.cs:
	* UInt64.cs: added complex Parse ().

svn path=/trunk/mcs/; revision=3728
2002-04-10 07:42:36 +00:00
Paolo Molaro c15ce613b2 Wed Apr 10 12:57:31 CEST 2002 Paolo Molaro <[email protected]>
* ILGenerator,cs: use a stack to keep track of exception blocks.

svn path=/trunk/mcs/; revision=3727
2002-04-10 07:08:22 +00:00
Patrik Torstensson efb4b9d40b 2002-04-10 Patrik Torstensson
* Added myself as Author

svn path=/trunk/mcs/; revision=3726
2002-04-10 03:49:06 +00:00
Dennis Hayes 3c067f2d2f * Initial checkin for all interfaces *
svn path=/trunk/mcs/; revision=3725
2002-04-09 23:13:49 +00:00
Nick Drochak 9b981c9930 2002/04/10 Nick Drochak <[email protected]>
* HttpServerUtility.cs: Fix build breaker.

svn path=/trunk/mcs/; revision=3724
2002-04-09 22:17:48 +00:00
Miguel de Icaza d8fec8c6ef 2002-04-09 Miguel de Icaza <[email protected]>
* parameter.cs (Parameters.ComputeParameterTypes): Flag the
	failure, so we do not keep going afterwards.

svn path=/trunk/mcs/; revision=3720
2002-04-09 15:46:13 +00:00
Paolo Molaro 5f2fa34563 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <[email protected]>
* appdomain.h: only io-layer.h is supposed to be included.
	* icall.c: explicitly import environ. Fix warning.

svn path=/trunk/mono/; revision=3719
2002-04-09 15:42:40 +00:00
John Barnette 6b954cb144 Added paragraphs on plagarism requested by Miguel.
svn path=/trunk/mono/; revision=3718
2002-04-09 13:52:16 +00:00
Patrik Torstensson ca9621ec3d Added constructor that takes a HttpContext
svn path=/trunk/mcs/; revision=3717
2002-04-09 13:23:04 +00:00
Miguel de Icaza 4faef40090 Remove conflict
svn path=/trunk/mcs/; revision=3716
2002-04-09 12:10:36 +00:00
Miguel de Icaza 2f0d7080c4 2002-04-09 Miguel de Icaza <[email protected]>
* expression.cs: (Invocation.OverloadResolve): I believe Ravi
	wanted to pass `false' as the `is_delegate' argument.  If this is
	the case, why not use delegate_type == null to mean `is_delegate =
	false' and anything else as is_delegate = true.

svn path=/trunk/mcs/; revision=3715
2002-04-09 12:08:43 +00:00
Nick Drochak 5ac7db9a34 2002-04-10 Nick Drochak <[email protected]>
* icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
		return true even if it's not Daylight Savings time.
		Only return false for the case where the function isn't
		implemented for a plaform (read Windows).

svn path=/trunk/mono/; revision=3714
2002-04-09 11:34:50 +00:00
Nick Drochak 131611dd1f 2002-04-09 Nick Drochak <[email protected]>
* ArrayTest.cs: Remove BinarySearch test on unsorted arrays. The
	behavior is undefined if the array isn't sorted.

svn path=/trunk/mcs/; revision=3713
2002-04-09 09:52:37 +00:00
Nick Drochak c57fa0c083 2002-04-09 Nick Drochak <[email protected]>
* Array.cs (BinarySearch): Add checks on paramters before using them
	and throw exceptions as needed.

	* Enum.cs (Format): Check if [Flags] is applied to enum and convert
	"G" format to "F" if so.

svn path=/trunk/mcs/; revision=3712
2002-04-09 09:50:21 +00:00
Piers Haken 33295fe50e Tue Apr 9 05:40:12 2002 Piers Haken <[email protected]>
* statement.cs: fixed SimpleSwitchEmit to make 'goto case' goto the
	code for the section, not the beginning of the tests.

svn path=/trunk/mcs/; revision=3711
2002-04-09 08:43:36 +00:00
Paolo Molaro ca925e0c9b Tue Apr 9 13:12:09 CEST 2002 Paolo Molaro <[email protected]>
* MonoCustomAttrs.cs: return arrays of type Attribute[]
	instead of object[].

svn path=/trunk/mcs/; revision=3710
2002-04-09 07:22:59 +00:00
Paolo Molaro 5b1cd866c7 Tue Apr 9 13:08:26 CEST 2002 Paolo Molaro <[email protected]>
* interp.c: make the interp thread-safe wrt the metadata lib.

svn path=/trunk/mono/; revision=3709
2002-04-09 07:19:31 +00:00
Paolo Molaro dc4ef55c74 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <[email protected]>
* appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
	data with a mutex.

svn path=/trunk/mono/; revision=3708
2002-04-09 07:17:41 +00:00
Nick Drochak b67840cb0c 2002/04/09 Nick Drochak <[email protected]>
* DecimalTest.cs: Use AssertEquals() for better diagnostic message.

svn path=/trunk/mcs/; revision=3707
2002-04-09 06:37:25 +00:00
Dietmar Maurer ed50d5a07d 2002-04-09 Dietmar Maurer <[email protected]>
* mempool.c (mono_mempool_alloc): only use g_malloc when
	absolutely necessary.

svn path=/trunk/mono/; revision=3706
2002-04-09 06:35:10 +00:00
Dietmar Maurer 2f6d98af2b 2002-04-09 Dietmar Maurer <[email protected]>
* delegate.c (arch_end_invoke): restore output arguments

svn path=/trunk/mono/; revision=3705
2002-04-09 05:41:09 +00:00
Kral Ferch 420c7f042a InnerXml, OuterXml, WriteContentTo, and WriteTo for most XmlNode derivatives.
svn path=/trunk/mcs/; revision=3704
2002-04-09 01:38:59 +00:00
Kral Ferch 3100718d55 Initial check-in.
svn path=/trunk/mcs/; revision=3703
2002-04-09 01:37:48 +00:00
Nick Drochak 179e84ae4b 2002/04/09 Nick Drochak <[email protected]>
* String.cs (Substring): Copy only non-null characters to the new
	string.

svn path=/trunk/mcs/; revision=3702
2002-04-09 01:15:37 +00:00
Jonathan Pryor b11ca16998 Debugger.cs: Added [MonoTODO] attribute to methods; modified IsLogging()
and Log() so that System.Diagnostics.DefaultTraceListener could use them
without having NotImplementedException's thrown, as the functionality
DefaultTraceListener is using is non-critical.

The DefaultTraceListener simply checks to see if a debugger is attached, and
if so, invokes Log().  Since we don't currently support a debugger, we can
have IsLogging() simply return false, allowing DefaultTraceListener to
continue on its merry way.

The benefit of this is that when the Debugger class is fully functional, we
won't have to worry about correcting the DefaultTraceListener.  It should
"Just Work".  (Famous last words, I know...)

svn path=/trunk/mcs/; revision=3701
2002-04-08 22:25:20 +00:00
Nick Drochak 5312b20d47 2002-04-09 Nick Drochak <[email protected]>
* Activator.cs: Small header copy-paste error fix.

svn path=/trunk/mcs/; revision=3700
2002-04-08 22:14:10 +00:00
Jonathan Pryor 3afeebb47e The 'Debugger' class (1) already exists (in the corlib assembly), and
(2) is supposed to be in the corlib assembly.  Two strikes against me for
not reading the @#$% docs closely enough to figure this out.

Remove the files I added, as they're unnecessary.

svn path=/trunk/mcs/; revision=3699
2002-04-08 22:13:22 +00:00
Jonathan Pryor 59fb8f92c8 Added 'Debugger.cs', which is used by 'DefaultTraceListener'.
It's just stubbed out for now.

svn path=/trunk/mcs/; revision=3698
2002-04-08 22:02:43 +00:00
John Donagher 3fea99a8b0 Fix ASCIIEncoding.GetString(bytes[],index,count); it was misbehaving when index=0 and count=bytes.length
svn path=/trunk/mcs/; revision=3697
2002-04-08 21:51:50 +00:00
Gonzalo Paniagua Javier 2f1f356cdb 2002-04-09 Gonzalo Paniagua Javier <[email protected]>
* SByte.cs:
	* Int16.cs:
	* Int32.cs:
	* Int64.cs: added complex Parse ().

svn path=/trunk/mcs/; revision=3696
2002-04-08 20:26:36 +00:00
Dietmar Maurer 94f9ad33da alignment fixes
svn path=/trunk/mono/; revision=3695
2002-04-08 13:06:49 +00:00
Dietmar Maurer bd39d65369 2002-04-08 Dietmar Maurer <[email protected]>
* class.c (mono_class_vtable): use domain mempool to allocate vtable
	(mono_class_proxy_vtable): use domain mempool

svn path=/trunk/mono/; revision=3694
2002-04-08 12:17:43 +00:00
Dietmar Maurer 961ab9bf45 (mono_class_vtable): use g_malloc instead of GC_malloc when possible
svn path=/trunk/mono/; revision=3693
2002-04-08 12:00:47 +00:00
Nick Drochak 94fbe6e6b5 2002-04-09 Nick Drochak <[email protected]>
* ByteTest.cs: Use AssertEquals() for better diagnostic message.

svn path=/trunk/mcs/; revision=3692
2002-04-08 12:00:29 +00:00
Nick Drochak c201413221 2002-04-09 Nick Drochak <[email protected]>
* IntegerFormatter.cs: Don't use a format character to indicate a
	custom format was passed in. It was using 'z' to indicate a custom
	format, but really it should throw a format exception if the user
	tries to use "z" as the format string. Now it does.

	* Activator.cs: New File.

svn path=/trunk/mcs/; revision=3691
2002-04-08 11:57:09 +00:00
Paolo Molaro 6ced6f2717 Mon Apr 8 17:15:48 CEST 2002 Paolo Molaro <[email protected]>
* interp.c: display return value with --trace.
	Call mono_runtime_init ().

svn path=/trunk/mono/; revision=3690
2002-04-08 11:28:54 +00:00
Paolo Molaro 8220d9ee8c Mon Apr 8 17:16:40 CEST 2002 Paolo Molaro <[email protected]>
* jit.c: call mono_runtime_init ().

svn path=/trunk/mono/; revision=3689
2002-04-08 11:28:49 +00:00
Paolo Molaro bf9d468ece Mon Apr 8 17:15:04 CEST 2002 Paolo Molaro <[email protected]>
* main.c: removed unneeded runtime invoke support.

svn path=/trunk/mono/; revision=3688
2002-04-08 11:28:28 +00:00
Paolo Molaro cffd93ba3c Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <[email protected]>
* appdomain.h, appdomain.c: split initialization that requires the
	execution engine support into mono_runtime_init().

svn path=/trunk/mono/; revision=3687
2002-04-08 11:28:27 +00:00
Nick Drochak ed6b45e2ca 2002-04-08 Nick Drochak <[email protected]>
* System.build: Build System.dll with mono's corlib.dll and
	System.Xml.dll.

svn path=/trunk/mcs/; revision=3686
2002-04-08 11:10:30 +00:00
Nick Drochak b7a0b10655 2002-04-08 Nick Drochak <[email protected]>
* DefaultMemberAttribute.cs: Add AttributeUsage attribute for class,
	struct and interface.

svn path=/trunk/mcs/; revision=3685
2002-04-08 11:06:59 +00:00
Nick Drochak 334f22a227 2002-04-08 Nick Drochak <[email protected]>
* Marshal.cs: Make class public.
	* ComVisible.cs: New File.

svn path=/trunk/mcs/; revision=3684
2002-04-08 11:03:34 +00:00
Nick Drochak 145e2d5015 2002-04-08 Nick Drochak <[email protected]>
* UnicodeCategory.cs: Fix typos in enum names.

svn path=/trunk/mcs/; revision=3683
2002-04-08 11:00:33 +00:00
Nick Drochak 67d1842855 2002-04-08 Nick Drochak <[email protected]>
* ConditionalAttribute.cs: Add AttributeUsage attribute for methods.

svn path=/trunk/mcs/; revision=3682
2002-04-08 10:58:19 +00:00
Dietmar Maurer 5bb6e2d69b 2002-04-08 Dietmar Maurer <[email protected]>
* class.c (mono_class_init): don't include vtable inside MonoClass
	to save some memory, gather some statistics.

svn path=/trunk/mono/; revision=3681
2002-04-08 10:25:53 +00:00
Nick Drochak 403cbd3a59 2002-04-08 Nick Drochak <[email protected]>
* Enum.cs (ToString): Big ugly fix for the case where [Flags] is
	applied to an enum. Need to handle the different possible integer
	types of an enum somehow.  Can anyone say generics?

svn path=/trunk/mcs/; revision=3680
2002-04-08 09:51:33 +00:00
Nick Drochak 4d42600b20 2002-04-08 Nick Drochak <[email protected]>
* EnumTest.cs: Add a few tests for differently underlying types and
	the [Flags] attribute to test ToString().

svn path=/trunk/mcs/; revision=3679
2002-04-08 09:43:18 +00:00
Piers Haken bf7d08cb1e *** empty log message ***
svn path=/trunk/mcs/; revision=3678
2002-04-08 09:24:11 +00:00
Dick Porter 695883428d 2002-04-08 Dick Porter <[email protected]>
* configure.in: Set -mno-cygwin here rather than in the build script

svn path=/trunk/mono/; revision=3677
2002-04-08 08:34:29 +00:00
Miguel de Icaza 37f334d38b Add new tests
svn path=/trunk/mcs/; revision=3676
2002-04-08 08:29:31 +00:00
Miguel de Icaza 4fd9b07b9d 2002-04-08 Miguel de Icaza <[email protected]>
* cfold.cs: Handle operator + (Enum x, Underlying x)

	* expression.cs (Binary): same.  Warn about errors where we have
	Enum/Enum in operator + as well.

svn path=/trunk/mcs/; revision=3675
2002-04-08 08:29:02 +00:00
Piers Haken 2941639e8f - added support for switch(bool)
- optimize loading of I8/U8 constants (ldc.i4, iconv_i8)
- add TableSwitchEmit() to handle table-based switch statements

svn path=/trunk/mcs/; revision=3674
2002-04-08 07:19:34 +00:00
Piers Haken 0839c9a2d8 added LabelField.label_base to allow for arbitrary offsets (for switch statement)
svn path=/trunk/mcs/; revision=3673
2002-04-08 07:04:29 +00:00
Piers Haken ed886d0e8d switched the To*(object) methods to use IConvertible directly instead of calling ChangeType
svn path=/trunk/mcs/; revision=3672
2002-04-08 07:02:12 +00:00
Dietmar Maurer 2d67968060 2002-04-08 Dietmar Maurer <[email protected]>
* invoke.c (arch_create_native_wrapper): special case EndInvoke -
	we need to pass the MonoMethod pointer as first argument.

	* delegate.c (mono_async_invoke): notify all listeners, not only a
	single one.
	(arch_end_invoke): we now pass a MonoMethod as first parameter and
	use arch_method_call_message_new() to access the stack.
	(arch_end_invoke): wait until we really finished processing
	(async_invoke_abort): notify all listeners, not only a
	single one.

svn path=/trunk/mono/; revision=3671
2002-04-08 05:50:04 +00:00
Dietmar Maurer a5531ea1e3 install dummy runtime_invoke()
svn path=/trunk/mono/; revision=3670
2002-04-08 03:47:01 +00:00
Piers Haken c45a0f9ce1 make_room() now always makes enough room!
svn path=/trunk/mcs/; revision=3669
2002-04-08 02:09:40 +00:00
Piers Haken 6a694a35f1 fixed/optimized qsort()
svn path=/trunk/mcs/; revision=3668
2002-04-08 02:06:41 +00:00
Jonathan Pryor 4a71109852 Updated status of some System.Diagnostics classes.
svn path=/trunk/mono/; revision=3667
2002-04-07 23:08:36 +00:00
Jonathan Pryor cc778456b7 Added myself to list of maintainers.
svn path=/trunk/mono/; revision=3666
2002-04-07 23:08:08 +00:00
Jonathan Pryor 221ba52d5c Added System.Diagnostics tests, as they work now.
svn path=/trunk/mcs/; revision=3665
2002-04-07 23:03:43 +00:00
Jonathan Pryor 29a19186ab Recent updates.
svn path=/trunk/mcs/; revision=3664
2002-04-07 23:01:40 +00:00
Jonathan Pryor 6e420ec4b7 Removed extraneous output; it only existed to help with debugging the Stack
Overflow Exception in Trace.

Fixed name of test case so that NUnit could find it.

svn path=/trunk/mcs/; revision=3663
2002-04-07 22:58:41 +00:00
Jonathan Pryor acc8032424 Recent Changes.
svn path=/trunk/mcs/; revision=3662
2002-04-07 22:56:48 +00:00
Jonathan Pryor 18d54ce582 Implement log file support.
svn path=/trunk/mcs/; revision=3661
2002-04-07 22:56:20 +00:00
Jonathan Pryor 266afa517b Fixed stupid stack overflow bug. My bad.
The problem was that 'WriteIndent' uses 'Write' to write the indentation.
However, 'Write' uses 'WriteIndent' if 'NeedIndent' is true.  Since the
original version of 'WriteIndent' didn't set 'NeedIndent' to false until after
it wrote the indentation...'NeedIndent' would never be set to false, resulting
in repeated calls of 'Write' -> 'WriteIndent' -> 'Write' ... <stack overflow>.

Simple fix: set 'NeedIndent' to false before writing the indent.

svn path=/trunk/mcs/; revision=3660
2002-04-07 22:55:53 +00:00
Nick Drochak 35f1dc476f 2002-04-08 Nick Drochak <[email protected]>
* EnumTest.cs: Add test for ToString for the case where the enum
	has [Flags] on it, and a mask value is used.

svn path=/trunk/mcs/; revision=3659
2002-04-07 18:07:23 +00:00
Miguel de Icaza f69f711c03 Add new files
svn path=/trunk/mono/; revision=3658
2002-04-07 15:15:26 +00:00
Paolo Molaro bac2d63428 Sat Apr 6 20:08:41 CEST 2002 Paolo Molaro <[email protected]>
* ValueType.cs: make Equals() an internalcall.

svn path=/trunk/mcs/; revision=3657
2002-04-06 14:19:48 +00:00
Paolo Molaro 77b6145f09 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <[email protected]>
* icall.c: internalcall implementation for ValueType.Equals().

svn path=/trunk/mono/; revision=3656
2002-04-06 14:19:44 +00:00
Dan Lewis fd9e0a786d 2002-04-06 Dan Lewis <[email protected]>
* cache.cs: Object methods should be overridden with "override".

svn path=/trunk/mcs/; revision=3655
2002-04-06 13:29:01 +00:00
Dietmar Maurer 2d2883a117 *** empty log message ***
svn path=/trunk/mono/; revision=3654
2002-04-06 12:35:46 +00:00
Dietmar Maurer d09d585f3e 2002-04-06 Dietmar Maurer <[email protected]>
(mono_runtime_class_init): new arch. independent impl.
	(mono_runtime_object_init): new arch. independent impl.

svn path=/trunk/mono/; revision=3653
2002-04-06 12:35:14 +00:00
Paolo Molaro 7d54aa2885 Sat Apr 6 16:29:40 CEST 2002 Paolo Molaro <[email protected]>
* x86/tramp.c: fix advancement od argument position on the stack.

svn path=/trunk/mono/; revision=3652
2002-04-06 10:40:58 +00:00
Dietmar Maurer 419560a636 2002-04-06 Dietmar Maurer <[email protected]>
* message.c (arch_return_value): impl.
	(arch_method_return_message_restore): consider delegate BeginInvoke

	* jit.c: removed jit_exec_main()

	* delegate.c (arch_begin_invoke): use the message builder to make
	it architecture independent - still needs more cleanup.

	* object.c (mono_message_init): moved
	(mono_runtime_exec_main): new arch. independent impl.
	(mono_runtime_invoke_array): new method - like
	mono_runtime_invoke, but you can pass an array of objects.
	(mono_remoting_invoke): new arch. independent impl.
	(mono_message_invoke): new arch. independent impl.

svn path=/trunk/mono/; revision=3651
2002-04-06 08:27:13 +00:00
Kral Ferch c8e7937354 Implementation of XmlDocument.CreateNode()
svn path=/trunk/mcs/; revision=3650
2002-04-06 04:19:40 +00:00
Dietmar Maurer 76cfd86852 added a note about Ingo's book
svn path=/trunk/mono/; revision=3649
2002-04-06 03:54:18 +00:00
Ravi Pratap M ab204bc70d 2002-04-05 Ravi Pratap <[email protected]>
* expression.cs (Invocation.OverloadResolve): Factor out code which
	does parameter compatibility checking with arguments so that we can
	re-use the code even from Delegate.VerifyApplicability

	(VerifyArgumentsCompat): Move above code here.

	* delegate.cs (VerifyApplicability): Get rid of duplicate code
	and instead make a call to the above method.

svn path=/trunk/mcs/; revision=3648
2002-04-05 18:58:30 +00:00
Ravi Pratap M 99321f8ddd 2002-04-05 Ravi Pratap <[email protected]>
* test-98.cs : Supply a missing Main.

svn path=/trunk/mcs/; revision=3647
2002-04-05 18:57:58 +00:00
Ravi Pratap M f61f3a1d8b 2002-04-05 Ravi Pratap <[email protected]>
* test-96.cs : Here too !

svn path=/trunk/mcs/; revision=3646
2002-04-05 18:56:16 +00:00
Ravi Pratap M 9c8b9cf356 2002-04-05 Ravi Pratap <[email protected]>
* test-90.cs : Fix bug where we had no class !

All tests pass again

svn path=/trunk/mcs/; revision=3645
2002-04-05 18:51:25 +00:00
Paolo Molaro f357f86d5a Sync for corlib change.
svn path=/trunk/mono/; revision=3644
2002-04-05 13:48:23 +00:00
Paolo Molaro c857a38d59 Update to handle the stupid reflection interface that separates
the directory name from the file name.

svn path=/trunk/mcs/; revision=3643
2002-04-05 13:48:21 +00:00
Piers Haken 042b6ba652 major cleanup
svn path=/trunk/mcs/; revision=3642
2002-04-05 12:41:07 +00:00
Paolo Molaro c4a9e0c68b Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <[email protected]>
* metadata.c, object.c, reflection.c: documented the exported
	functions.

svn path=/trunk/mono/; revision=3641
2002-04-05 12:40:44 +00:00
Miguel de Icaza bb6c546f17 Flush
svn path=/trunk/mono/; revision=3640
2002-04-05 11:16:54 +00:00
Piers Haken ab2e998bc7 Copy: handle overlapped copies
svn path=/trunk/mcs/; revision=3639
2002-04-05 10:59:26 +00:00
Piers Haken 3c9de1d04d FastCopy: use memmove instead of memcpy (for overlapped copies)
svn path=/trunk/mono/; revision=3638
2002-04-05 10:49:24 +00:00
Christian Meyer fd52458085 Uppercased several files.
svn path=/trunk/mcs/; revision=3637
2002-04-05 10:11:42 +00:00
Paolo Molaro 4730dddd5e Fri Apr 5 15:41:19 CEST 2002 Paolo Molaro <[email protected]>
* AssemblyBuilder.cs: simpler protocol wih the runtime to
	get the assembly data.

svn path=/trunk/mcs/; revision=3636
2002-04-05 09:55:45 +00:00
Paolo Molaro f2e9910894 Fri Apr 5 15:40:24 CEST 2002 Paolo Molaro <[email protected]>
* MonoEvent.cs: remove unused code.
	* MonoProperty: implement ToString().

svn path=/trunk/mcs/; revision=3635
2002-04-05 09:55:19 +00:00
Paolo Molaro b6aa7b667f Fri Apr 5 15:38:54 CEST 2002 Paolo Molaro <[email protected]>
* Type.cs: also look for nested types in FindMembers.
	* MonoType.cs: make GetNestedTypes() an internalcall.

svn path=/trunk/mcs/; revision=3634
2002-04-05 09:54:39 +00:00
Paolo Molaro 819af8b70d Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <[email protected]>
* icall.c: simpler code to pass the assembly builder data to corlib.
	Implement GetNestedTypes() internalcall.

svn path=/trunk/mono/; revision=3633
2002-04-05 09:54:37 +00:00
Piers Haken b81bdae191 implement BinarySearch, cleanup
svn path=/trunk/mcs/; revision=3632
2002-04-05 09:08:48 +00:00
Dietmar Maurer 8737daabdb 2002-04-05 Dietmar Maurer <[email protected]>
* delegate.c (mono_delegate_ctor): support for transparent proxy

	* mono/tests/remoting2.cs: new test for async invoke of proxy calls

svn path=/trunk/mono/; revision=3631
2002-04-05 08:41:24 +00:00
Miguel de Icaza 259ff05432 remove PrinciplePermissionAttribute and rename it
svn path=/trunk/mcs/; revision=3630
2002-04-05 07:04:33 +00:00
John Barnette f22360a967 * MainForm.cs: Changed DEBUG|Display Generic Form to set Tag property for MdiToolBar
* MdiToolBar.cs:
	- proper behavior when selected buttons are clicked
	- event cleanup
	- determine image index from mdi child form tag if possible

svn path=/trunk/mcs/; revision=3629
2002-04-05 06:35:07 +00:00
Christian Meyer d31d4f5679 Fixed typo.
svn path=/trunk/mcs/; revision=3628
2002-04-05 05:54:18 +00:00
Dietmar Maurer a4ff9168d0 documentation
svn path=/trunk/mono/; revision=3627
2002-04-05 05:32:56 +00:00
John Donagher a89b7e613b Temporarily disable Serialization namespace building
svn path=/trunk/mcs/; revision=3626
2002-04-05 04:51:05 +00:00
John Donagher f6ae3d98b1 - Initial commit of System.Xml.Serialization namespace (don't get too excited, the Serializer itself has yet to be imp'd)
svn path=/trunk/mcs/; revision=3625
2002-04-05 04:46:53 +00:00
John Barnette 024afea086 Added an MdiToolBar instance to the GUI.
svn path=/trunk/mcs/; revision=3624
2002-04-05 03:56:25 +00:00
John Barnette 46766e76f5 Interfaces can have events. Duh. The project/assembly tree now reflects
this obvious fact.

svn path=/trunk/mcs/; revision=3623
2002-04-05 03:55:53 +00:00
John Barnette d291bd31b5 * MdiToolBar.cs: Initial revision.
* Gui.csproj: Added MdiToolBar to project.

svn path=/trunk/mcs/; revision=3622
2002-04-05 03:54:52 +00:00
Dietmar Maurer f1392f6064 2002-04-05 Dietmar Maurer <[email protected]>
* x86.brg (freg): bug fix in CONV_R* opcodes

svn path=/trunk/mono/; revision=3621
2002-04-05 03:25:08 +00:00
Adam Treat c07e5769bb MoveToAttribute* Fix 'if' brackets.
svn path=/trunk/mcs/; revision=3620
2002-04-05 03:13:38 +00:00
Adam Treat f582bf684b * Make sure we begin the search with the first attribute.
svn path=/trunk/mcs/; revision=3619
2002-04-05 01:11:09 +00:00
Adam Treat 09c6c9c962 * Implement MoveToAttribute(string name) method.
svn path=/trunk/mcs/; revision=3618
2002-04-05 01:06:36 +00:00
Adam Treat a421e3f8dd * Added 'XmlTextReader (string url)' constructor
svn path=/trunk/mcs/; revision=3617
2002-04-04 21:28:09 +00:00
Piers Haken 89493d1a27 field types, nested types, cleanup
svn path=/trunk/mcs/; revision=3616
2002-04-04 19:39:07 +00:00
Paolo Molaro 619b6e0762 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <[email protected]>
* class.c: warn if a type can't be loaded.

svn path=/trunk/mono/; revision=3614
2002-04-04 15:58:03 +00:00
Nick Drochak 0be9af0b30 2002-04-05 Nick Drochak <[email protected]>
* Enum.cs (Parse): Handle different underlying types.

svn path=/trunk/mcs/; revision=3613
2002-04-04 12:06:12 +00:00
Dietmar Maurer b9b3c19014 some docu
svn path=/trunk/mono/; revision=3612
2002-04-04 09:04:24 +00:00
Dietmar Maurer 1a2b9660f9 2002-04-04 Dietmar Maurer <[email protected]>
* image.h: typedef MonoImageOpenStatus
	* types.h: removed unused file

svn path=/trunk/mono/; revision=3611
2002-04-04 08:17:45 +00:00
Dan Lewis 621f470057 2002-04-04 Dan Lewis <[email protected]>
* RegexRunner.cs, RegexRunnerFactory.cs: MS support classes. Stubs
	added for completeness.

	* regex.cs, match.cs, collections.cs: Serializable attribute.

svn path=/trunk/mcs/; revision=3610
2002-04-04 07:49:51 +00:00
Paolo Molaro 4bb8a1cf81 Thu Apr 4 13:13:20 CEST 2002 Paolo Molaro <[email protected]>
* IMethodReturnMessage.cs: added IMethodMessage, IMessage interfaces.
	* ReturnMessage.cs: stubbed out Properties property.

svn path=/trunk/mcs/; revision=3609
2002-04-04 07:24:01 +00:00
Dan Lewis 0841808b7a 2002-04-04 Dan Lewis <[email protected]>
* regex.cs: Added static Matches and IsMatch methods.

svn path=/trunk/mcs/; revision=3608
2002-04-04 07:17:24 +00:00
Miguel de Icaza ec53373289 Flush tests
svn path=/trunk/mcs/; revision=3607
2002-04-04 07:09:49 +00:00
Piers Haken 2b3b645d5e should be internal
svn path=/trunk/mcs/; revision=3606
2002-04-04 06:49:25 +00:00
Dick Porter 7e3b1b7b4c 2002-04-04 Dick Porter <[email protected]>
* ISynchronizeInvoke.cs: Needed by Process

2002-04-04  Dick Porter  <[email protected]>

	* ThreadWaitReason.cs:
	* ThreadState.cs:
	* ThreadPriorityLevel.cs:
	* ProcessWindowStyle.cs:
	* ProcessThreadCollection.cs
	* ProcessThread.cs:
	* ProcessStartInfo.cs:
	* ProcessModuleCollection.cs: Stub out more classes needed for Process

svn path=/trunk/mcs/; revision=3605
2002-04-04 06:45:59 +00:00
Piers Haken 226c940556 fix typo in class name
svn path=/trunk/mcs/; revision=3604
2002-04-04 06:40:57 +00:00
Dan Lewis 4b25f97a2f 2002-04-04 Dan Lewis <[email protected]>
* icall.c: Enum_ToObject accepts enum value arguments.

svn path=/trunk/mono/; revision=3603
2002-04-04 06:32:32 +00:00
Piers Haken 9d70fd98cd added missing [Serializable] attribute
svn path=/trunk/mcs/; revision=3602
2002-04-04 06:17:02 +00:00
Piers Haken 1b357c7803 Assembly.cs: LoadWithPartialName
FieldInfo.cs: finished properties

svn path=/trunk/mcs/; revision=3601
2002-04-04 06:15:48 +00:00
Nick Drochak 4a90b18680 2002-04-04 Nick Drochak <[email protected]>
* EnumTest.cs: Change one Assert() message string so the two are
	unique. And clean up exception catching logic.

svn path=/trunk/mcs/; revision=3600
2002-04-04 06:02:41 +00:00
Nick Drochak 4a0081c54f 2002/04/04 Nick Drochak <[email protected]>
* Enum.cs (IsDefined): Throw exception when type of value to look for
	is not the correct one.  Attempt to have it work with string values
	too, but not sure if the unit tests are getting that far yet.

svn path=/trunk/mcs/; revision=3599
2002-04-04 05:53:47 +00:00
Paolo Molaro 7b02014f58 Thu Apr 4 11:36:52 CEST 2002 Paolo Molaro <[email protected]>
* interp.c: don't try to get an IL opcode for runtime and internal
	call methods.

svn path=/trunk/mono/; revision=3598
2002-04-04 05:47:59 +00:00
Paolo Molaro 724614b919 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <[email protected]>
* class.c: move initialization of properties, events and nested
	classes, so that they happen for interfaces, too.

svn path=/trunk/mono/; revision=3597
2002-04-04 05:46:22 +00:00
Nick Drochak 4cab9c05b6 2002/04/04 Nick Drochak <[email protected]>
* corlib_test.build: Again; disable running of NUnit tests against mono
	corlib.  There are so many icalls now, that these tests need
	to be run inside mint and mono.  Will change this soon to run
	the tests using both.  It still runs the tests against the mscorlib
	to validate the tests themselves.

svn path=/trunk/mcs/; revision=3596
2002-04-04 05:28:20 +00:00
Paolo Molaro b2941eeff0 Remove useless comments in rules.
svn path=/trunk/mono/; revision=3595
2002-04-04 04:42:46 +00:00
Miguel de Icaza 0a63809400 Add new tests
svn path=/trunk/mcs/; revision=3594
2002-04-03 20:58:19 +00:00
Miguel de Icaza c996d93999 2002-04-02 Miguel de Icaza <[email protected]>
* delegate.cs (Delegate.Define): Correctly define the types in the
	presence of fixed and array parameters.

	* class.cs (TypeContainers.FindMembers): Use NonPublic flag while
	doing FindMembers.

	* ecore.cs (Expression.MemberLookup): Reset binding flags to not
	include NonPublic after the first iteration.

	* class.cs (Indexer.CheckBase): Only check if both parents are
	non-null.

	* cs-parser.jay (accessor_body): If empty, set to null.

	* ecore.cs (SimpleName.SimpleNameResolve): We did not have the
	same code path here to resolve constants names that we did have in
	MemberAccess.DoResolve.  There is too much code duplicated here.

svn path=/trunk/mcs/; revision=3593
2002-04-03 20:58:00 +00:00
Piers Haken a7249768a2 faster Equals
svn path=/trunk/mcs/; revision=3592
2002-04-03 18:56:02 +00:00
Nick Drochak 864710833e 2002-04-04 Nick Drochak <[email protected]>
* EnumTest.cs: Change one Assert() message string so the two are
	unique.

svn path=/trunk/mcs/; revision=3591
2002-04-03 18:46:46 +00:00
Nick Drochak 34043730d8 2002-04-04 Nick Drochak <[email protected]>
* Decimal.cs: Fix a couple of typos.

svn path=/trunk/mcs/; revision=3590
2002-04-03 18:43:42 +00:00
John Barnette a94b7891a4 Significant work on the assembly tree browser.
svn path=/trunk/mcs/; revision=3589
2002-04-03 17:13:55 +00:00
John Barnette de3ffcfaea Initial import.
svn path=/trunk/mcs/; revision=3588
2002-04-03 17:12:33 +00:00
Dennis Hayes 4fbe8b6385 * A stake in the ground *
* enums from A to C *
* System.Windows.Forms is open for development *

svn path=/trunk/mcs/; revision=3587
2002-04-03 15:17:57 +00:00
Paolo Molaro 7d3e1582a8 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <[email protected]>
* icall.c: cleanup some ugly casts in Array_SetValue*.

svn path=/trunk/mono/; revision=3586
2002-04-03 14:13:56 +00:00
Paolo Molaro d6cde81ff0 Wed Apr 3 19:46:00 CEST 2002 Paolo Molaro <[email protected]>
* Enum.cs: the values array is of the enum and not of the underlying
	type. Updates and some bug fixes.
	* MonoType.cs: make the internalcall return FullName instead of the
	assembly qualified name.
	* Type.cs: make ToString () simply return FullName.

svn path=/trunk/mcs/; revision=3585
2002-04-03 14:01:51 +00:00
Paolo Molaro c661316bf6 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <[email protected]>
* icall.c: the values array fro enums is of the correct type, now.
	Implement (correctly) getFullName instead of assQualifiedName for
	MonoType.
	* reflection.h, reflection.c: added mono_type_get_name ().

svn path=/trunk/mono/; revision=3584
2002-04-03 14:01:48 +00:00
Paolo Molaro 137168ed73 Wed Apr 3 17:59:26 CEST 2002 Paolo Molaro <[email protected]>
* Assembly.cs: implement GetTypes() and GetExportedTypes().

svn path=/trunk/mcs/; revision=3583
2002-04-03 12:09:37 +00:00
Paolo Molaro f564019f97 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <[email protected]>
* assembly.c, image.h: for each MonoImage, record from wich assembly
	it was loaded.
	* reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
	Make Type.Assembly work.

svn path=/trunk/mono/; revision=3582
2002-04-03 12:08:28 +00:00
Dietmar Maurer e911016c17 fixed broken build
svn path=/trunk/mono/; revision=3581
2002-04-03 11:22:52 +00:00
Dietmar Maurer ff3c98350d * debug-symfile.h: use char* instead of gpointer to avoid
unnecessary casts.

svn path=/trunk/mono/; revision=3580
2002-04-03 11:03:44 +00:00
Dietmar Maurer 6a08adf608 * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
svn path=/trunk/mono/; revision=3579
2002-04-03 10:56:42 +00:00
Piers Haken 60f595496d finished most of the easy implemented stuff
svn path=/trunk/mcs/; revision=3578
2002-04-03 10:33:45 +00:00
Dietmar Maurer d27ef3146c (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
svn path=/trunk/mono/; revision=3577
2002-04-03 10:19:31 +00:00
Nick Drochak 4d43669a3f 2002-04-03 Nick Drochak <[email protected]>
* Type.cs (GetTypeCode): provide some of the implementation for this
		method.  It's still too simplistic to be considered complete.

svn path=/trunk/mcs/; revision=3576
2002-04-03 10:05:15 +00:00
Dietmar Maurer 9e626483d0 compiler warning fixes
svn path=/trunk/mono/; revision=3575
2002-04-03 09:54:29 +00:00
Dietmar Maurer c1784b4eb2 fixed more compiler warnings
svn path=/trunk/mono/; revision=3574
2002-04-03 09:34:29 +00:00
Dietmar Maurer 6049d3d2e7 fixed compiler warnings
svn path=/trunk/mono/; revision=3573
2002-04-03 08:54:53 +00:00
Dan Lewis 83b1351de3 2002-04-03 Dan Lewis <[email protected]>
* ChangeLog: Added changelog.

	* cache.cs: Fixed bug in MRUList.Evict.

svn path=/trunk/mcs/; revision=3572
2002-04-03 07:39:20 +00:00
Piers Haken fafcc6846b field/property type warnings
tidy up

svn path=/trunk/mcs/; revision=3571
2002-04-03 07:38:04 +00:00
Piers Haken 8f94011aa6 fix toggling when flags are on expandable nodes
svn path=/trunk/mono/; revision=3570
2002-04-03 07:37:10 +00:00
Dietmar Maurer b4f71a37fc 2002-04-03 Dietmar Maurer <[email protected]>
* mono.c (main): use --trace instead of --trace-calls

	* x86.brg: impl. REMOTE_STIND_XX

	* message.c (mono_store_remote_field): impl.

	* icall.c (ves_icall_InternalExecute): impl. FielSetter

svn path=/trunk/mono/; revision=3569
2002-04-03 06:59:08 +00:00
Piers Haken cc63806f23 minor CLS conformance tweaks (visibility, virtual, abstract, sealed, etc...)
svn path=/trunk/mcs/; revision=3568
2002-04-03 06:28:53 +00:00
Piers Haken 2bb9bc0295 correct interfaces & base
svn path=/trunk/mcs/; revision=3567
2002-04-03 06:27:40 +00:00
Piers Haken 0e31b1c7b7 not sure what the original was based on, but this is much closer, eg: it actually implements the right methods, etc...
svn path=/trunk/mcs/; revision=3566
2002-04-03 06:26:02 +00:00
John Barnette b41ef921e8 Initial commit; additional documentation stub files.
svn path=/trunk/mcs/; revision=3565
2002-04-03 03:45:52 +00:00
John Barnette b1424a629b Initial documentation stub commit for corlib and System.Xml assemblies.
svn path=/trunk/mcs/; revision=3564
2002-04-03 03:43:20 +00:00
John Barnette 50e768fe27 Stub flush, mostly encoding="" attribute adds in XML declarations.
svn path=/trunk/mcs/; revision=3563
2002-04-03 03:25:33 +00:00
John Barnette 7b1231d6f8 Initial import. Thanks to John Sohn ([email protected]) for this code!
svn path=/trunk/mcs/; revision=3562
2002-04-03 03:01:11 +00:00
Piers Haken c3d67407c9 needed for SynchronizationAttribute
svn path=/trunk/mcs/; revision=3561
2002-04-03 00:42:13 +00:00
John Barnette 02e730dba9 GPL license header flush.
svn path=/trunk/mcs/; revision=3560
2002-04-02 22:57:30 +00:00
John Barnette 59b74e2c53 * src/Gui/DirectorySelectorForm.cs: Initial import
* Everything else: Project load/save/options flush

svn path=/trunk/mcs/; revision=3559
2002-04-02 21:39:37 +00:00
Piers Haken 4c6ef57917 minor fixups:
visibility changes
	remove obsolete (& unimplemented) methods

svn path=/trunk/mcs/; revision=3558
2002-04-02 19:24:40 +00:00
Piers Haken bdc9b17dc1 hide warning 0679 (internal may be overriden by other languages)
svn path=/trunk/mcs/; revision=3557
2002-04-02 19:21:19 +00:00
Piers Haken af3c6ea8c3 more errors/attributes
better handling of properties/events

svn path=/trunk/mcs/; revision=3556
2002-04-02 19:14:02 +00:00
Piers Haken f5700b29d8 various fixups
svn path=/trunk/mono/; revision=3555
2002-04-02 19:12:32 +00:00
Nick Drochak 5605e38fe8 2002/04/02 Nick Drochak <[email protected]>
* StringBuilder.cs (Append): Removed obsolete overload.

svn path=/trunk/mcs/; revision=3554
2002-04-02 06:32:01 +00:00
Dick Porter 471f5cb78b 2002-04-02 Dick Porter <[email protected]>
* TcpListener.cs: in Start(), set the socket listen backlog value
	to a sane value (noticed by Jonathan Stowe <[email protected]>)

svn path=/trunk/mcs/; revision=3553
2002-04-02 06:15:02 +00:00
Dietmar Maurer b15faf8f87 2002-04-02 Dietmar Maurer <[email protected]>
* Object.cs: fixed FieldGetter/FieldSetter signature

svn path=/trunk/mcs/; revision=3552
2002-04-02 05:13:11 +00:00
Piers Haken 2be106aaae remove obsolete IsReadOnly
svn path=/trunk/mcs/; revision=3551
2002-04-02 04:49:37 +00:00
Piers Haken 78b493b9b7 remove IsReadOnly
svn path=/trunk/mcs/; revision=3550
2002-04-02 04:48:13 +00:00
Piers Haken 24e720488d fix OnSet*, access
svn path=/trunk/mcs/; revision=3549
2002-04-02 04:42:01 +00:00
Piers Haken 96b77bc494 fix negative case & optimize
svn path=/trunk/mcs/; revision=3548
2002-04-02 04:35:11 +00:00
Piers Haken f409a4273b added missing [Flags] attribute
svn path=/trunk/mcs/; revision=3547
2002-04-02 03:44:35 +00:00
Kral Ferch c9c678a115 XmlTextWriter impls for WriteEndDocument and WriteFullEndElement.
svn path=/trunk/mcs/; revision=3546
2002-04-02 02:59:42 +00:00
Dennis Hayes 6f4821f77b fixed bugs with isknowncolor, compiles now
svn path=/trunk/mcs/; revision=3545
2002-04-01 23:38:25 +00:00
Dennis Hayes b5cb34092b * All system.Drawing.Printing enums complete *
* Inital and final? checkin *

svn path=/trunk/mcs/; revision=3544
2002-04-01 23:36:27 +00:00
Dennis Hayes 954c939197 * All system.Drawing.Text enums complete *
* Inital and final? checkin *

svn path=/trunk/mcs/; revision=3543
2002-04-01 23:34:12 +00:00
Dennis Hayes 44d1c7129a * inital and final checkin *
svn path=/trunk/mcs/; revision=3542
2002-04-01 23:27:46 +00:00
Dennis Hayes 82557db819 * All system.Drawing.Imaging enums complete *
* Inital and final? checkin *

svn path=/trunk/mcs/; revision=3541
2002-04-01 22:57:25 +00:00
Piers Haken 610d7923ac added missing [Serializable] attribute
svn path=/trunk/mcs/; revision=3540
2002-04-01 20:22:40 +00:00
Piers Haken 91ad44d53e serializable
svn path=/trunk/mcs/; revision=3539
2002-04-01 19:14:43 +00:00
Piers Haken 1f9ba1d2f3 fix access
svn path=/trunk/mcs/; revision=3538
2002-04-01 19:07:39 +00:00
Piers Haken 0291fdff08 fix typos, access
svn path=/trunk/mcs/; revision=3537
2002-04-01 19:05:51 +00:00
Piers Haken 719292eee9 fix typos
svn path=/trunk/mcs/; revision=3536
2002-04-01 18:54:20 +00:00
Nick Drochak 2d786fab8c 2002-04-02 Nick Drochak <[email protected]>
* Environment.cs: add MonoTODO's on parts that should have it.

svn path=/trunk/mcs/; revision=3535
2002-04-01 18:18:44 +00:00
John Barnette 647fcfc14a Flush.
svn path=/trunk/mcs/; revision=3534
2002-04-01 16:08:08 +00:00
Miguel de Icaza 3b436bcbb5 2002-04-01 Miguel de Icaza <[email protected]>
* statement.cs, makefile: Drop Statementcollection and just use ArrayLists

	* ecore.cs: Optimize UserDefinedConversion by minimizing the calls
	to MakeUnionSet.

	* cs-tokenizer.cs: Reuse a single StringBuilder for assembling
	tokens, numbers and strings.

	* ecore.cs (MethodGroupExpr): Make Emit warn about missing
	parenthesis.

	* delegate.cs: Use ComputeAndDefineParameterTypes for both the
	asyncronous parameters and the regular parameters.

	* codegen.cs (CodeGen.Init): Use the constructor that allows us to
	specify the target directory.

	* expression.cs: (This.DoResolve): Simplify
	(As.Emit): Optimize, do not generate IsInst if the expression is
	always of the given type.

	(Is.DoResolve): Bug fix, we were reporting both always/never for
	the is expression.

	* (Invocation.MakeUnionSet): Simplify vastly and optimize, we were
	creating too many unnecessary arrays.

2002-03-31  Miguel de Icaza  <[email protected]>

	* class.cs (EmitFieldInitializer): Use Assign expression to assign
	fields instead of rolling our own initializer.   Takes care of all
	implicit conversions, and drops unnecessary static checks/argument.

svn path=/trunk/mcs/; revision=3533
2002-04-01 10:52:44 +00:00
Piers Haken 7c1ac4e3a9 fixed base classes (and typos)
svn path=/trunk/mcs/; revision=3532
2002-04-01 08:10:13 +00:00
Piers Haken 84187bf9a6 fixed member accessibility to match MS (corcompare).
svn path=/trunk/mcs/; revision=3531
2002-04-01 06:07:43 +00:00
John Barnette 5fd40ea80b * Additions for project save/load/edit
* AssemblyTreeLoader refactoring
* For debug purposes, VS.NET project builds with console window

svn path=/trunk/mcs/; revision=3530
2002-04-01 05:07:52 +00:00
Piers Haken 961a97ae75 constructor, GetRank should be private
svn path=/trunk/mcs/; revision=3529
2002-04-01 03:25:29 +00:00
Piers Haken f86a6635e6 member should be private
svn path=/trunk/mcs/; revision=3528
2002-04-01 03:23:35 +00:00
Kral Ferch cbe4a80d16 XmlTextWriter impls for LookupPrefix, WriteBase64, and WriteCharEntity.
svn path=/trunk/mcs/; revision=3527
2002-03-31 20:11:56 +00:00
Nick Drochak 30bcf7dc11 2002-04-01 Nick Drochak <[email protected]>
* Enum.cs: added reality checks (check parameters to most methods that
		need them).

svn path=/trunk/mcs/; revision=3526
2002-03-31 18:56:26 +00:00
Kral Ferch 4f5ed6b2da touchups on XmlTextWriter attribute writing.
svn path=/trunk/mcs/; revision=3525
2002-03-31 17:35:36 +00:00
Gonzalo Paniagua Javier ae313095a8 2002-03-31 Gonzalo Paniagua Javier <[email protected]>
* corlib_test.build: don't exclude IntegerFormatterTest.

	* System/AllTests.cs: added IntegerFormatterTest suite.

	* System/IntegerFormatterTest.cs: totally reworked to use NUnit. Right
	now it fails cause I haven't implemented Parse () methods yet. With
	corlib_reference.dll runs ok.

svn path=/trunk/mcs/; revision=3524
2002-03-31 16:01:09 +00:00
Dick Porter 2c30bec578 2002-03-31 Dick Porter <[email protected]>
* Process.cs:
	* ProcessPriorityClass.cs:
	* ProcessModule.cs:
	* FileVersionInfo.cs: Stub out classes needed for Process

svn path=/trunk/mcs/; revision=3523
2002-03-31 12:25:21 +00:00
Dick Porter b4fb31a53c 2002-03-31 Dick Porter <[email protected]>
* Directory.cs: Strip out "." and ".." from returned list

	* FileAttributes.cs: Get the right enum values

svn path=/trunk/mcs/; revision=3522
2002-03-31 12:24:56 +00:00
Dick Porter 3d18bf1c58 2002-03-31 Dick Porter <[email protected]>
* driver.cs: use the GetDirectories() return values properly, and
	use "/" as path separator.

svn path=/trunk/mcs/; revision=3521
2002-03-31 12:23:45 +00:00
Adam Treat bee7f53b67 * Fixed corlib_cmp and System.Xml problems. Exclude problem types from Type[].
svn path=/trunk/mcs/; revision=3520
2002-03-31 03:56:42 +00:00
Miguel de Icaza 39a56780eb Share more code between class/interface/delegate and enum.
Simplify the recursive toplevel definition process.
Initial steps to fix the toplevel delegate type reference declarations.

2002-03-30  Miguel de Icaza  <[email protected]>

	* expression.cs (Unary): Optimize - - expr into expr.
	(Binary): Optimize a + (-b) into a -b.

	* codegen.cs (CodeGen): Made all methods static.

2002-03-29  Miguel de Icaza  <[email protected]>

	* rootcontext.cs:

	* decl.cs: Rename `definition' into `TypeBuilder' and drop the
	TypeBuilder property.

	* cs-parser.jay: Drop the use of RecordXXX and use RecordDecl
	instead.

	* tree.cs: Removed the various RecordXXXX, and replaced with a
	single RecordDecl.  Removed all the accessor methods, and just
	left a single access point Type

	* enum.cs: Rename DefineEnum to DefineType.

	* decl.cs: New abstract method `DefineType' used to unify the
	Defines for Enumerations, Interfaces, TypeContainers and
	Delegates.

	(FindType): Moved LookupInterfaceOrClass here.  Moved the
	LookupBaseClasses method that used to live in class.cs and
	interface.cs here, and renamed to FindType.

	* delegate.cs: Implement DefineType.  Take advantage of the
	refactored pattern for locating the parent builder without taking
	the parent_builder argument (which we know does not work if we are
	nested, and triggering a toplevel definition).

svn path=/trunk/mcs/; revision=3519
2002-03-31 02:46:48 +00:00
John Barnette ce1d390da6 X11 license header flush.
svn path=/trunk/mcs/; revision=3518
2002-03-30 17:33:55 +00:00
Dietmar Maurer dd0b1ec579 2002-03-30 Dietmar Maurer <[email protected]>
* x86.brg: impl. REMOTE_FIELD (load fields of remote objects)

	* message.c (mono_load_remote_field): impl.

	* icall.c (mono_message_init): impl. (code cleanup)
	(ves_icall_InternalExecute): impl. FieldGetter

svn path=/trunk/mono/; revision=3517
2002-03-30 16:56:30 +00:00
Dietmar Maurer 87b59db253 2002-03-30 Dietmar Maurer <[email protected]>
* Object.cs: added FieldGetter/FieldSetter

svn path=/trunk/mcs/; revision=3516
2002-03-30 16:47:02 +00:00
Dietmar Maurer 79dcae0b0f *** empty log message ***
svn path=/trunk/mono/; revision=3515
2002-03-30 11:21:55 +00:00
Dietmar Maurer 9c60fdbcbf fixed compiler warnings
svn path=/trunk/mono/; revision=3514
2002-03-30 11:19:26 +00:00
Dietmar Maurer 62b06ec721 2002-03-30 Dietmar Maurer <[email protected]>
* jit.c (mono_analyze_stack): only call marshalbyref methods
	through the vtable.

svn path=/trunk/mono/; revision=3513
2002-03-30 09:51:30 +00:00
Dietmar Maurer b27a661fc6 2002-03-30 Dietmar Maurer <[email protected]>
* class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
	defined we call all (non-static)methods through the vtable.

svn path=/trunk/mono/; revision=3512
2002-03-30 06:53:32 +00:00
Dietmar Maurer d7de82d61d 2002-03-28 Dietmar Maurer <[email protected]>
* TextWriter.cs (write): added check for null

svn path=/trunk/mcs/; revision=3511
2002-03-30 06:52:09 +00:00
John Barnette f53d9edfe9 AbstractDoc.cs: Added 'Language' attribute
MonodocException.cs: Initial import
Core.csproj: Added entry for MonodocException.cs

svn path=/trunk/mcs/; revision=3510
2002-03-30 06:28:57 +00:00
John Barnette e6065f02e1 Initial import.
svn path=/trunk/mcs/; revision=3509
2002-03-30 06:24:10 +00:00
Kral Ferch 97a1576096 XmlLang and XmlSpace for XmlTextWriter.
svn path=/trunk/mcs/; revision=3508
2002-03-30 03:42:19 +00:00
Kral Ferch 7816a48c12 Working on Attribute methods for XmlTextWriter.
svn path=/trunk/mcs/; revision=3507
2002-03-30 01:18:09 +00:00
Kral Ferch f30d9fd73d new proj file for vs.net users.
svn path=/trunk/mcs/; revision=3506
2002-03-30 01:17:19 +00:00
Rodrigo Moya 8c09df93af 2002-03-29 Rodrigo Moya <[email protected]>
* System.Data.Common/DbDataRecord.cs:
	* System.Data.Common/DbEnumerator.cs:
	* System.Data.Common/RowUpdatedEventArgs.cs:
	* System.Data.Common/RowUpdatingEventArgs.cs:
	* System.Data.Common/DbDataPermissionAttribute.cs: new skeletons.

svn path=/trunk/mcs/; revision=3504
2002-03-29 20:08:44 +00:00
Rodrigo Moya bf354de47e 2002-03-29 Rodrigo Moya <[email protected]>
* System.Data.Common/DbDataRecord.cs:
	* System.Data.Common/DbEnumerator.cs:
	* System.Data.Common/RowUpdatedEventArgs.cs:
	* System.Data.Common/RowUpdatingEventArgs.cs:
	* System.Data.Common/DbDataPermissionAttribute.cs: new skeletons.

svn path=/trunk/mcs/; revision=3503
2002-03-29 19:51:45 +00:00
John Barnette 3415459861 Whoops; missed this one. Initial revision.
svn path=/trunk/mcs/; revision=3502
2002-03-29 19:37:41 +00:00
Dennis Hayes 8f3e08958b * init and final checkin for a bunch of enum classes in System.Drawing *
svn path=/trunk/mcs/; revision=3500
2002-03-29 14:59:16 +00:00
John Barnette f5138e22de Initial import: Monodoc documentation data model.
svn path=/trunk/mcs/; revision=3499
2002-03-29 14:59:08 +00:00
Paolo Molaro dc18f68b07 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <[email protected]>
* class.c: it seems GC_debug_malloc() makes the Boehm GC call the
	finalizer even though the memory is still referenced (and the chunk of
	memory is not freed).

svn path=/trunk/mono/; revision=3498
2002-03-29 13:21:50 +00:00
Paolo Molaro d62b0f7fa8 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <[email protected]>
* assembly.c: fix brokeness.

svn path=/trunk/mono/; revision=3497
2002-03-29 12:54:28 +00:00
Paolo Molaro bf59d3bcb1 Fri Mar 29 17:15:11 CET 2002 Paolo Molaro <[email protected]>
* io.c: EEXISTS is ignored for directory creation.
	* mono-mutex.h: remove silly "pragma }" that emacs users insert
	because they use a broken editor:-)

svn path=/trunk/mono/; revision=3496
2002-03-29 12:27:08 +00:00
Paolo Molaro fa2b79271c Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <[email protected]>
* class.c: kill some warnings. Check explicit interface method
	implementation also without considering the namespace.
	Load also literal strings in static class data.

svn path=/trunk/mono/; revision=3495
2002-03-29 11:21:18 +00:00
Paolo Molaro 1a76bfdb15 Fri Mar 29 16:00:27 CET 2002 Paolo Molaro <[email protected]>
* x86.brg: kill pointer arithmetric.

svn path=/trunk/mono/; revision=3494
2002-03-29 11:10:30 +00:00
Martin Baulig e09cc97a75 2002-03-29 Martin Baulig <[email protected]>
* doc/jit-debug, docs/jit-debug-sample, docs/jit-debug-sample2:
	New files, added documentation for the debugging code.

	* doc/web/commands: Added the debugging pages.

	* docs/jit-debug: Removed, this is now on the web site.

svn path=/trunk/mono/; revision=3493
2002-03-29 09:56:40 +00:00
Paolo Molaro b1a7c0e3f7 Added the docs dir to the dist (with a new doc on GC issues).
Removed defunct wrapper dir.
Fixed make distcheck in jit.
Really build monoburg if needed.

svn path=/trunk/mono/; revision=3492
2002-03-29 08:18:03 +00:00
Dietmar Maurer b2136d6dec *** empty log message ***
svn path=/trunk/mono/; revision=3491
2002-03-29 06:37:55 +00:00
John Barnette 2a32ff20e0 Initial import of stub XML document for System.Data, System.Web and System, in the correct
directory this time.  DEFINITELY no cookie for me.

svn path=/trunk/mcs/; revision=3490
2002-03-29 05:32:53 +00:00
John Barnette a45933a1db Like an idiot, I added these in the wrong place. No cookie for me.
svn path=/trunk/mcs/; revision=3489
2002-03-29 04:23:35 +00:00
John Barnette 7a6bd5beb2 Initial documentation stub import for assemblies:
* System.Data
	* System.Web
	* System

svn path=/trunk/mcs/; revision=3488
2002-03-29 03:35:22 +00:00
Adam Treat d0e6e3fdb8 * scratch that. go-mono.org instead ;-)
svn path=/trunk/mcs/; revision=3487
2002-03-29 03:09:08 +00:00
Adam Treat 53d4bd2e45 * Changed the <!DOCTYPE to point to http://www.go-mono.com/monodoc.dtd
svn path=/trunk/mcs/; revision=3486
2002-03-29 03:07:24 +00:00
John Barnette 6c82dc3c99 Added targets for docval.
svn path=/trunk/mcs/; revision=3485
2002-03-29 02:59:53 +00:00
Miguel de Icaza 1258a0daf1 Flush
svn path=/trunk/mono/; revision=3484
2002-03-29 02:31:27 +00:00
Miguel de Icaza 037a2e2f43 2002-03-29 Miguel de Icaza <[email protected]>
* assembly.c (default_assembly_name_resolver): Kill memory leak.
	(default_assembly_name_resolver): Make the resolver take the
	"base" directory where the assembly was originally defined, so we
	can load DLLs that are in the same directory as the assembly that
	is being referenced.

svn path=/trunk/mono/; revision=3483
2002-03-29 02:20:36 +00:00
Martin Baulig 747e1aa628 Don't crash if klass->fields is NULL.
svn path=/trunk/mono/; revision=3482
2002-03-29 01:08:51 +00:00
Martin Baulig cc5b7ae7d3 2002-03-29 Martin Baulig <[email protected]>
* AssemblerWriterI386.cs: Rewrote most of the string output function, do the
	number->string conversion manually. It's now taking about 15 seconds to write
	a symbol file for MCS, no longer more than a minute.

	* MonoDwarfFileWriter.cs: Added some profiling code, speeded things up, fixed
	a few bugs.

svn path=/trunk/mcs/; revision=3481
2002-03-29 01:07:37 +00:00
John Barnette 23f4754f19 Initial imports / build modifications.
svn path=/trunk/mcs/; revision=3480
2002-03-29 00:39:16 +00:00
John Barnette 76a8378a53 Initial import.
svn path=/trunk/mcs/; revision=3479
2002-03-29 00:36:11 +00:00
John Barnette 08d43ec3be Initial revision.
svn path=/trunk/mcs/; revision=3478
2002-03-29 00:34:54 +00:00
Adam Treat e906a57fb3 * Initial checkin. docval is a validation tool for monodoc xml.
svn path=/trunk/mcs/; revision=3477
2002-03-29 00:24:49 +00:00
Miguel de Icaza 6f4231ef8b flush
svn path=/trunk/mcs/; revision=3476
2002-03-29 00:23:21 +00:00
Adam Treat b9583cd87f * Used monostyle to update the formatting.
* Do not generate xml for private methods/types.
* Add a <!DOCTYPE tag to stubbed xml.

svn path=/trunk/mcs/; revision=3475
2002-03-29 00:23:14 +00:00
Miguel de Icaza add513886e 2002-03-28 Miguel de Icaza <[email protected]>
* decl.cs (MemberCore.CheckMethodAgainstBase): Test if the
	accessibility of a member has changed during override and report
	an error if so.

	* class.cs (Method.Define, Property.Define): Only complain on
	overrides if the method is private, any other accessibility is
	fine (and since we just checked the permission is the same, we are
	good to go).

	* cs-tokenizer.cs: only line, region, endregion, if, endif, else
	and elif are processed always.  The other pre-processing
	directives are only processed if we are "taking" the path

svn path=/trunk/mcs/; revision=3474
2002-03-28 22:24:28 +00:00
John Barnette 0caac90f3c Moved docstub.cs to mcs/doctools/src/Console/docstub.cs
svn path=/trunk/mcs/; revision=3473
2002-03-28 21:52:52 +00:00
Dennis Hayes 9cbe932215 * included stuff left out of initial check in *
* Done? execpt for part of ToKnownColor *

svn path=/trunk/mcs/; revision=3472
2002-03-28 21:24:12 +00:00
Martin Baulig 9771101e76 Oooops ....
svn path=/trunk/mcs/; revision=3471
2002-03-28 21:23:30 +00:00
Dennis Hayes 323a570906 * Initial file check in. *
* Mostly done, will finish in the next few days. *

svn path=/trunk/mcs/; revision=3470
2002-03-28 21:21:57 +00:00
Martin Baulig b4f76a5890 2002-03-29 Martin Baulig <[email protected]>
* class.cs (Method.Emit): Only emit symbolic debugging info if the
	current location is not Null.

	* codegen.cs (CodeGen.SaveSymbols): Split out symbol writing code into
	a separate method so we can profile it.

	* driver.cs (ShowTime): We need to use `(int) span.TotalSeconds' since
	`span.Seconds' are just seconds, but no minutes or hours.
	(MainDriver): Profile the CodeGen.SaveSymbols calls.

svn path=/trunk/mcs/; revision=3469
2002-03-28 21:17:12 +00:00
Duncan Mak 66461e7b7a 2002-03-28 Duncan Mak <[email protected]>
* XmlDocument.cs (CreateWhitespace):
	(CreateSignificantWhitespace): Removed extraneous call to the ToCharArray
	method.

	* XmlSignificantWhitespace.cs (Value): Removed MonoTODO attribute.

	* XmlDeclarationTests.cs (TestConstructor):
	* XmlDocumentTypeTests.cs (TestAppendChild):
	* XmlSignificantWhitespaceTests.cs (TestXmlWhitespaceConstructor):
	* XmlWhiteSpaceTests.cs (TestXmlWhitespaceConstructor): Fixed the
	test for catching Exceptions.

svn path=/trunk/mcs/; revision=3467
2002-03-28 20:20:01 +00:00
Miguel de Icaza 34b2b26e3e FLush updates
svn path=/trunk/mono/; revision=3466
2002-03-28 20:11:49 +00:00
John Barnette 89b8edcfc9 Moved from mcs/doctools/docstub.cs
svn path=/trunk/mcs/; revision=3465
2002-03-28 20:10:51 +00:00
Ulrich Kunitz 1e55fd531a added my tests for the calendars
svn path=/trunk/mcs/; revision=3464
2002-03-28 20:07:42 +00:00
Ulrich Kunitz 96281c1ef5 helper class for calendars; based on the "Calendrical Calculations" books
svn path=/trunk/mcs/; revision=3463
2002-03-28 20:02:57 +00:00
Ulrich Kunitz a5a1c1d334 *Calendar classes
svn path=/trunk/mcs/; revision=3462
2002-03-28 20:00:29 +00:00
Rodrigo Moya d11d2324e5 2002-03-28 Rodrigo Moya <[email protected]>
* System.Data.Common/DataTableMappingCollection.cs:
	* System.Data.Common/DbDataAdapter.cs:
	* System.Data.Common/DbDataPermission.cs:
	* System.Data.Common/DataTableMapping.cs: new skeletons.

	* System.Data.SqlClient/SqlDataAdapter.cs:
	* System.Data.SqlClient/SqlDataReader.cs:
	* System.Data.SqlClient/SqlErrors.cs:
	* System.Data.SqlClient/SqlError.cs:
	* System.Data.SqlClient/SqlException.cs:
	* System.Data.SqlClient/SqlParameter.cs:
	* System.Data.SqlClient/SqlParameterCollection.cs:
	* System.Data.SqlClient/SqlTransaction.cs:
	* System.Data.SqlClient/SqlCommand.cs: fixed skeletons.

svn path=/trunk/mcs/; revision=3461
2002-03-28 19:55:41 +00:00
John Barnette 79977cbc61 Initial revision.
svn path=/trunk/mcs/; revision=3460
2002-03-28 19:53:16 +00:00
Miguel de Icaza e3fef3523b 2002-03-28 Miguel de Icaza <[email protected]>
* class.cs (Method.Define), (Property.Define), (Indexer.Define):
	Remove the gratuitous set of Final:

				// If an interface implementation, then we can set Final.
				if (((flags & MethodAttributes.Abstract) == 0) &&
				    implementing.DeclaringType.IsInterface)
					flags |= MethodAttributes.Final;

        I do not know what I was smoking when I used that.


	* cs-parser.jay, delegate.cs: Make Delegate be a DeclSpace, first
	step into fixing the name resolution issues for delegates and
	unifying the toplevel name resolution.

svn path=/trunk/mcs/; revision=3459
2002-03-28 19:50:33 +00:00
John Barnette c6b4c87e77 Remove /doctools from the build for the moment.
svn path=/trunk/mcs/; revision=3458
2002-03-28 19:38:44 +00:00
Martin Baulig a13eef80a8 2002-03-28 Martin Baulig <[email protected]>
* class.cs (Method.Emit): If we have a symbol writer, call its
	OpenMethod(), CloseMethod() and SetMethodSourceRange() methods to
	tell it about the current method.

	* codegen.cs (EmitContext.Mark): New public method. Tell the symbol
	writer that we're going to emit the first byte of IL code for a new
	statement (a new source line).
	(EmitContext.EmitTopBlock): If we have a symbol writer, call
	EmitContext.Mark() before emitting any code.

	* location.cs (SymbolDocument): Return null when we're Null.

	* statement.cs (Statement): Moved the `Location loc' variable here.
	(Statement.EmitBoolExpression): If we have a symbol writer, call
	ec.Mark() before emitting any code to tell it that we're at the
	beginning of a new statement.
	(StatementExpression): Added `Location' argument to the constructor.
	(Block): Added public readonly variable `StartLocation' and public
	variable `EndLocation'.  The latter is to be set using SetEndLocation().
	(Block): Added constructor which takes a start and end location.
	(Block.SetEndLocation): New method. This sets the end location.
	(Block.EmitMeta): If we have a symbol writer, tell it the names of the
	local variables we create.
	(Block.Emit): If we have a symbol writer, call ec.Mark() before emitting
	each statement and do also mark the begin and end of the block.

	* cs-parser.jay (block : OPEN_BRACE): Use the new `Block' constructor to
	tell it the current lexer.Location, use Location.Null for the end of the
	block.
	(block : OPEN_BRACE opt_statement_list CLOSE_BRACE): When closing the
	current block, set its end location using SetEndLocation().
	(statement_expression): StatementExpression constructor now takes the
	lexer.Location as additional argument.
	(for_statement, declare_local_variables): Likewise.
	(declare_local_variables): When creating a new implicit block, use the
	new Block constructor and pass it the lexer.Location.

svn path=/trunk/mcs/; revision=3457
2002-03-28 16:51:04 +00:00
Martin Baulig ad28fa550b 2002-03-28 Martin Baulig <[email protected]>
* jit.c (mono_debug_insert_breakpoint): New global variable.
	(mono_debug_last_breakpoint_address): New global variable.

	* emit-x86.c (arch_compile_method): If `mono_debug_insert_breakpoint' is
	non-zero, insert a breakpoint; if it's positive, decrement it when done.
	Set `mono_debug_last_breakpoint_address' to the address of the last inserted
	breakpoint.

	* debug.h: Provide external declaration of `mono_debug_insert_breakpoint' and
	`mono_debug_last_breakpoint_address', also documented them here.

svn path=/trunk/mono/; revision=3456
2002-03-28 16:25:40 +00:00
John Barnette a6dd976775 More spring-cleaning.
svn path=/trunk/mcs/; revision=3455
2002-03-28 16:20:20 +00:00
Martin Baulig 1b4b00015a 2002-03-28 Martin Baulig <[email protected]>
* debug-private.h (MonoDebugHandle): Renamed `format' to `default_format'.
	(AssemblyDebugInfo): Added `format'.

	* debug.c: Use the AssemblyDebugInfo's `format' field to determine the format,
	this allows us choose the format on a per-assembly basis.
	(mono_debug_open_assembly): When using MONO_DEBUG_FORMAT_DWARF2_PLUS, fall back
	to MONO_DEBUG_FORMAT_DWARF2 if the symbol file does not exist, but the IL file
	exists.
	(debug_generate_method_lines): Generate correct IL offsets.

svn path=/trunk/mono/; revision=3454
2002-03-28 15:43:18 +00:00
Miguel de Icaza 6b6571f701 2002-03-28 Miguel de Icaza <[email protected]>
* ecore.cs (Expression.MemberLookup): On interfaces, lookup
	members also on the parent interfaces recursively.

svn path=/trunk/mcs/; revision=3453
2002-03-28 14:59:45 +00:00
Dick Porter cad03a5f27 2002-03-28 Dick Porter <[email protected]>
* sockets.h:
	* sockets.c:
	* io.c:
	* handles.h:
	* handles.c: Warning cleanups

2002-03-28  Dick Porter  <[email protected]>

	* file-io.h:
	* file-io.c:
	* socket-io.c:
	* unicode.h:
	* unicode.c: Warning cleanups

svn path=/trunk/mono/; revision=3452
2002-03-28 13:58:02 +00:00
Paolo Molaro 477d1ecfd3 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <[email protected]>
* object.h, reflection.h: use the correct type instead of MonoObject.

svn path=/trunk/mono/; revision=3451
2002-03-28 13:17:56 +00:00
Martin Baulig 9ddfe94a31 2002-03-28 Martin Baulig <[email protected]>
* jit.h (MonoFlowGraph): Added `prologue_end' and `epilogue_start' fields.

	* emit-x86.c (arch_compile_method): Set prologue_end and epilogue_start.

	* debug-private.h (DebugMethodInfo): Renamed `frame_start_offset' to
	`prologue_end_offset', added `epilogue_begin_offset' and `last_line'.

	* debug.c (debug_generate_method_lines): Don't return if we don't have line
	numbers, we still need to generate the IL offsets here. Emit line numbers
	for `prologue_end_offset' (the first line of actual code) and
	`epilogue_begin_offset' (the line of the method's closing brace).
	Don't crash if cfg->bblocks [i].forest is NULL.
	(mono_debug_add_method): Don't crash if we don't have line numbers.
	Initialize the newly added fields.

	* debug-stabs.c: Record first and last line, emit filename info at the
	beginning of the stab file, gdb ignores the types otherwise.

	* debug-dwarf2.c: Use the new prologue_end_offset instead of guessing it;
	emit line number info for the first and last line.

svn path=/trunk/mono/; revision=3450
2002-03-28 12:20:43 +00:00
Gonzalo Paniagua Javier e22a6faa99 2002-03-28 Gonzalo Paniagua Javier <[email protected]>
* IntegerFormatter.cs: fixed initialization error in static
	constructor.

svn path=/trunk/mcs/; revision=3449
2002-03-28 12:20:33 +00:00
Martin Baulig a9637d4aa4 2002-03-28 Martin Baulig <[email protected]>
* debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
	(mono_debug_update_symbol_file): Initialize classes if necessary.

svn path=/trunk/mono/; revision=3448
2002-03-28 12:10:45 +00:00
Paolo Molaro ef213acf92 Thu Mar 28 16:54:51 CET 2002 Paolo Molaro <[email protected]>
* interp.c: spring warning cleanup.

svn path=/trunk/mono/; revision=3447
2002-03-28 12:04:44 +00:00
Paolo Molaro c0e1442d78 Thu Mar 28 16:52:11 CET 2002 Paolo Molaro <[email protected]>
* dis-cil.c, dump.c, get.c, main.c, util.h: spring warning cleanup.

svn path=/trunk/mono/; revision=3446
2002-03-28 12:02:38 +00:00
Paolo Molaro f0eba74556 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <[email protected]>
* assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
	rawbuffer.c, reflection.c, verify.c: mare warning cleanups.

svn path=/trunk/mono/; revision=3445
2002-03-28 11:10:56 +00:00
Paolo Molaro 116532a44c Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <[email protected]>
* assembly.h: fix function prototype.
	* metadata.h, metadata.c, object.h, private.h: get rid of warnings.
	* mono-endian.h: use const cast.

svn path=/trunk/mono/; revision=3444
2002-03-28 10:41:59 +00:00
Paolo Molaro fc7f4dcc18 Thu Mar 28 15:18:50 CET 2002 Paolo Molaro <[email protected]>
* monograph.c: some warning cleanups.

svn path=/trunk/mono/; revision=3443
2002-03-28 10:28:38 +00:00
Paolo Molaro 88b4664a73 Enable lots of warning from GCC.
Make --with-gc=none work.

svn path=/trunk/mono/; revision=3442
2002-03-28 10:18:39 +00:00
Wictor Wilén fc2025c1b9 2002-03-28 Wictor Wiln <[email protected]>
* HttpServerUtils.cs : Added some more functionality

svn path=/trunk/mcs/; revision=3441
2002-03-28 09:01:49 +00:00
Wictor Wilén cc9a32769d Wictor Wil�n <[email protected]>
* HttpServerUtils.cs : Added some more functionality

svn path=/trunk/mcs/; revision=3440
2002-03-28 09:00:50 +00:00
Dietmar Maurer eee99754da 2002-03-28 Dietmar Maurer <[email protected]>
* icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c

svn path=/trunk/mono/; revision=3439
2002-03-28 08:18:48 +00:00
Paolo Molaro fce93f9a03 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <[email protected]>
* loader.c: don't assert when a typeref can't be loaded, give
	a chance to the runtime to trow an exception instead.
	* loader.h: fix warning.

svn path=/trunk/mono/; revision=3438
2002-03-28 07:42:58 +00:00
Dietmar Maurer d2edbae9f0 etmar Maurer <[email protected]>
* invoke.c (arch_create_delegate_trampoline): impl.

svn path=/trunk/mono/; revision=3437
2002-03-28 07:18:59 +00:00
Paolo Molaro c624cde011 Thu Mar 28 12:03:28 CET 2002 Paolo Molaro <[email protected]>
* interp.c: check obj address in stfld.

svn path=/trunk/mono/; revision=3436
2002-03-28 07:13:37 +00:00
Paolo Molaro 724b11d303 Thu Mar 28 11:58:53 CET 2002 Paolo Molaro <[email protected]>
* Makefile.am, mono.c, jit.h, jit.c: build the libmono library
	with the jit runtime to easy embedding. main() is moved to mono.c, now.
	* jit.c: use opcode names from libmetadata.
	* debug.h, debug.c: constify char* argument.

svn path=/trunk/mono/; revision=3435
2002-03-28 07:11:04 +00:00
Dan Lewis a827553ae1 2002-03-28 Dan Lewis <[email protected]>
* Directory.cs: Throws DirectoryNotFoundException.
	* MonoIO.cs: Fixed to work around enum problem.

svn path=/trunk/mcs/; revision=3434
2002-03-28 07:07:57 +00:00
Dietmar Maurer debc96c5a3 2002-03-28 Dietmar Maurer <[email protected]>
* Delegate.cs: added new field to store a trampoline function

svn path=/trunk/mcs/; revision=3433
2002-03-28 07:04:13 +00:00
Paolo Molaro 8cb994c635 Thu Mar 28 11:29:58 CET 2002 Paolo Molaro <[email protected]>
* util.c: when an invalid flags combination is seen,
	return the string "invalid-flags", so disassembly can continue.

svn path=/trunk/mono/; revision=3432
2002-03-28 06:40:42 +00:00
Martin Baulig b9cdf86567 2002-03-28 Martin Baulig <[email protected]>
* HttpServerUtils.cs (UrlDecode): You cannot implicitly cast a
	char to a string, use ToString() instead.

svn path=/trunk/mcs/; revision=3431
2002-03-28 06:32:55 +00:00
Martin Baulig d8f281fe04 It's called NAnt', not Nant'.
svn path=/trunk/mcs/; revision=3430
2002-03-28 06:24:45 +00:00
Martin Baulig 0d800904d8 Removed CVS conflict marker.
svn path=/trunk/mcs/; revision=3429
2002-03-28 06:18:41 +00:00
Wictor Wilén ca93d0ee75 Started Implementation of this class
svn path=/trunk/mcs/; revision=3428
2002-03-28 04:50:30 +00:00
Dietmar Maurer d2590d863c added proxy support
svn path=/trunk/mono/; revision=3427
2002-03-28 04:28:28 +00:00
Dietmar Maurer 3d465d1a05 started proxy support
svn path=/trunk/mcs/; revision=3426
2002-03-28 04:07:31 +00:00
Miguel de Icaza c553abaf29 More updates to the man page
svn path=/trunk/mono/; revision=3425
2002-03-28 03:16:19 +00:00
Adam Treat 721daabc59 * Add monostyle.1 to Makefile.am
svn path=/trunk/mono/; revision=3424
2002-03-28 02:53:00 +00:00
Adam Treat f1050560c1 * monostyle.1: A man page for the monostyle tool.
svn path=/trunk/mono/; revision=3423
2002-03-28 02:52:22 +00:00
Adam Treat 915a3107fe * add monostyle.exe as a build target
svn path=/trunk/mcs/; revision=3422
2002-03-28 02:51:15 +00:00
Adam Treat af2bec2215 * monostyle: a csharp code beautifier.
svn path=/trunk/mcs/; revision=3421
2002-03-28 02:50:26 +00:00
Nick Drochak 7c4cb1a886 2002/03/28 Nick Drochak <[email protected]>
* corlib_test.build: Re-exclude it in a couple of places where it was
	breaking the build.  This test is not an NUnit test.  So, it doesn't
	belong in these dll's until it's made a proper NUnit test.

svn path=/trunk/mcs/; revision=3420
2002-03-28 01:31:26 +00:00
Gonzalo Paniagua Javier f3fd694b7b * IntegerFormatter.cs: added workaround for bug #22668. First patch to
make custom format strings work (not fully functional yet).


	* corlib_test.build: remove two more lines that excluded
	IntegerFormatterTest.

svn path=/trunk/mcs/; revision=3419
2002-03-28 00:47:09 +00:00
Nick Drochak 4081b12c44 2002/03/28 Nick Drochak <[email protected]>
* corlib_test.build: Don't exclude IntegerFormatterTest any more.

svn path=/trunk/mcs/; revision=3418
2002-03-27 23:43:17 +00:00
Miguel de Icaza 82314f5282 2002-03-27 Miguel de Icaza <[email protected]>
* report.cs: Use new formats, since Gonzalo finished the missing
	bits.

svn path=/trunk/mcs/; revision=3417
2002-03-27 23:42:51 +00:00
Nick Drochak bd2f530949 2002/03/28 Nick Drochak <[email protected]>
* IntegerFormatter.cs: Change class from internal to public.  Add
	necessary [CLSCompliant(false)] attributes.

svn path=/trunk/mcs/; revision=3416
2002-03-27 23:41:17 +00:00
Nick Drochak f367733871 2002/03/28 Nick Drochak <[email protected]>
* IntegerFormatterTest.cs: Eliminate warnings about unused exception
	variables.

svn path=/trunk/mcs/; revision=3415
2002-03-27 23:36:35 +00:00
Miguel de Icaza 5f47281301 More bug fixages:
2002-03-27  Miguel de Icaza  <[email protected]>

	* expression.cs (Binary.ResolveOperator): added missing operator|
	operator& and operator^ for bool/bool.

	* cs-parser.jay: CheckDef now takes a Location argument that is
	used to report errors more precisly (instead of reporting the end
	of a definition, we try to track something which is a lot closer
	to the source of the problem).

svn path=/trunk/mcs/; revision=3414
2002-03-27 23:07:49 +00:00
Miguel de Icaza 927f64a784 2002-03-27 Miguel de Icaza <[email protected]>
* cs-tokenizer.cs: Track global token use, so we can properly flag
	the use of #define/#undef after the first token has been seen.

	Also, rename the reportXXXX to Error_DescriptiveName

svn path=/trunk/mcs/; revision=3413
2002-03-27 22:32:00 +00:00
Miguel de Icaza 02bb2f6885 Add new error test case
svn path=/trunk/mcs/; revision=3412
2002-03-27 22:30:47 +00:00
Miguel de Icaza ea5728d2b0 2002-03-27 Miguel de Icaza <[email protected]>
* decl.cs (DeclSpace.IsTopLevel): Move property here from
	TypeContainer, so that Enum and Interface can use this too.

	* class.cs (TypeContainer.LookupInterfaceOrClass,
	GetInterfaceOrClass, GetClassBases, DefineType): Drop the
	`builder' argument.  Typically this was used to pass the parent
	builder (a ModuleBuilder or a TypeBuilder from whoever triggered
	the definition).

	The problem is that a nested class could trigger the definition of
	a toplevel class, and the builder would be obviously wrong in that
	case.

	So we drop this argument, and we compute dynamically the
	TypeBuilder/ModuleBuilder (the correct information was available
	to us anyways from DeclSpace.Parent)

	* interface.cs (Interface.DefineInterface): Drop builder
	parameter cleanup like class.cs

	* enum.cs (Enum.DefineEnum): Drop builder parameter.  Clean up
	like class.cs

svn path=/trunk/mcs/; revision=3411
2002-03-27 22:25:15 +00:00
Miguel de Icaza 8f18cb9acc New test
svn path=/trunk/mcs/; revision=3410
2002-03-27 22:24:41 +00:00
Miguel de Icaza f411b9c5d7 2002-03-27 Miguel de Icaza <[email protected]>
* test-18.cs: Augment test with the multi-flow try/catch.

svn path=/trunk/mcs/; revision=3409
2002-03-27 21:34:42 +00:00
Miguel de Icaza 9b47a633f4 2002-03-27 Miguel de Icaza <[email protected]>
* statement.cs (Switch.EmitObjectInteger): Emit short/ushort
	values.

	(Try.Emit): Propagate the returns value from the statement.

	(Return.Emit): Even if we are leavning

	* driver.cs: Catch IOExpcetion for Directory.GetFiles as well.

	* modifiers.cs: Fix the computation of MethodAttributes flags.

svn path=/trunk/mcs/; revision=3408
2002-03-27 21:30:03 +00:00
Rodrigo Moya 7db99d9dba 2002-03-27 Rodrigo Moya <[email protected]>
* System.Data.Common/DataColumnMapping.cs:
	* System.Data.Common/DataColumnMappingCollection.cs:
	* System.Data.Common/DataAdapter.cs: created skeletons.

	* System.Data.build: exclude new directories from build.

svn path=/trunk/mcs/; revision=3407
2002-03-27 21:10:03 +00:00
Miguel de Icaza 0addbdbb46 Add test-91
svn path=/trunk/mcs/; revision=3406
2002-03-27 20:31:52 +00:00
John Barnette c5cea324c3 Initial revision.
svn path=/trunk/mcs/; revision=3405
2002-03-27 18:56:32 +00:00
John Barnette 8c9ef8feab Interim graphical resources for the Monodoc GUI.
svn path=/trunk/mcs/; revision=3404
2002-03-27 18:51:22 +00:00
Duncan Mak 338bb215df Reverting changes to the makefile
svn path=/trunk/mcs/; revision=3403
2002-03-27 18:17:14 +00:00
John Barnette 21c4c6de8f More spring cleaning.
svn path=/trunk/mcs/; revision=3402
2002-03-27 18:15:18 +00:00
John Barnette c71704b06d Removing old cruft. It's spring-cleaning time in the land of doctools!
svn path=/trunk/mcs/; revision=3401
2002-03-27 18:11:33 +00:00
Christian Meyer 801d17c60b Cleaned up the code a little bit...
svn path=/trunk/mcs/; revision=3400
2002-03-27 17:28:27 +00:00
Duco Fijma 9f33267466 AppDomain.GetDate also renamed to GetData
svn path=/trunk/mcs/; revision=3399
2002-03-27 16:58:11 +00:00
Duco Fijma 662e17093b Corrected typo in System._AppDomain
svn path=/trunk/mcs/; revision=3398
2002-03-27 16:27:57 +00:00
Rodrigo Moya 71a5a1158b 2002-03-27 Rodrigo Moya <[email protected]>
* System.Data.SqlClient/SqlTransaction.cs: started implementation.

	* System.Data.SqlClient/SqlConnection.cs (BeginTransaction):
	implemented (2 methods).

svn path=/trunk/mcs/; revision=3397
2002-03-27 14:51:07 +00:00
Mike Kestner 55a217cd66 2002-03-27 Mike Kestner <[email protected]>
* delegate.c (arch_get_delegate_invoke): malloc a bigger area

svn path=/trunk/mono/; revision=3396
2002-03-27 13:11:21 +00:00
Dan Lewis 6de415adc3 2002-03-27 Dan Lewis <[email protected]>
* StreamReader.cs: Implemented ReadLine() and ReadEnd().

svn path=/trunk/mcs/; revision=3395
2002-03-27 12:36:47 +00:00
Nick Drochak 120b7227d3 2002-03-28 Nick Drochak <[email protected]>
* EnumTest.cs(TestFormat): Use Fail() instead of AssertEquals() in
        try-catch blocks. Add test to check if correct exception is being
        thrown.

svn path=/trunk/mcs/; revision=3394
2002-03-27 11:45:28 +00:00
Nick Drochak 6d7ce0f075 2002-03-28 Nick Drochak <[email protected]>
* Type.cs: Added MonoTODO tags on members that have FIXME, etc.

svn path=/trunk/mcs/; revision=3393
2002-03-27 11:35:22 +00:00
Sergey Chaban 9188402fc4 * resources: Assembly language manuals/tutorials and Win32 SEH internals;
svn path=/trunk/mono/; revision=3392
2002-03-27 10:23:29 +00:00
Paolo Molaro 31d3af16dc Forgot to commit this file, sorry.
svn path=/trunk/mono/; revision=3391
2002-03-27 05:46:35 +00:00
Gaurav Vaish dae3fc6fcb 2002-03-27 Gaurav Vaish <[email protected]>
* More error corrections....

svn path=/trunk/mcs/; revision=3390
2002-03-27 03:27:27 +00:00
Miguel de Icaza 1f3b3e0a2f More last minute fixes
svn path=/trunk/mcs/; revision=3389
2002-03-27 02:58:45 +00:00
Miguel de Icaza 9ddbab85b0 Flush
svn path=/trunk/mcs/; revision=3388
2002-03-27 02:52:02 +00:00
Martin Baulig 7f0542b133 Importing NUnit 1.11.
svn path=/branches/NUNIT/mcs/; revision=2713
2002-02-27 09:38:21 +00:00
nobody 9f187b5dd0 This commit was manufactured by cvs2svn to create branch 'NUNIT'.
svn path=/branches/NUNIT/mcs/; revision=2712
2002-02-27 09:38:18 +00:00
2305 changed files with 127078 additions and 12593 deletions

No files matched your search

+28
View File
@@ -1,3 +1,31 @@
2002-04-23 Gonzalo Paniagua Javier <[email protected]>
* configure.in: removed -Wshadow from CFLAGS.
2002-04-12 Rodrigo Moya <[email protected]>
* status/maintainers.xml: added danmorg and myself for System.Data.*
classes.
* status/class.xml: added System.Data.* classes.
2002-04-08 Dick Porter <[email protected]>
* configure.in: Set -mno-cygwin here rather than in the build script
2002-04-05 Dietmar Maurer <[email protected]>
* mono/tests/remoting2.cs: new test for async invoke of proxy calls
2002-03-29 Martin Baulig <[email protected]>
* doc/jit-debug, docs/jit-debug-sample, docs/jit-debug-sample2:
New files, added documentation for the debugging code.
* doc/web/commands: Added the debugging pages.
* docs/jit-debug: Removed, this is now on the web site.
2002-03-24 Martin Baulig <[email protected]>
* man/mcs.1: Documented the new --debug option and added a section
+1 -1
View File
@@ -1,3 +1,3 @@
AUTOMAKE_OPTIONS = foreign
SUBDIRS = mono doc runtime scripts man
SUBDIRS = mono doc docs runtime scripts man
+51
View File
@@ -0,0 +1,51 @@
/* 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
+27 -19
View File
@@ -5,6 +5,23 @@ AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(mono, 0.10)
AM_MAINTAINER_MODE
dnl ****************************************
dnl *** Check if we're building on win32 ***
dnl ****************************************
AC_MSG_CHECKING([if building for some Win32 platform])
case "$host" in
*-*-mingw*|*-*-cygwin*)
platform_win32=yes
AC_DEFINE(PLATFORM_WIN32)
CC="gcc -mno-cygwin"
;;
*)
platform_win32=no
;;
esac
AC_MSG_RESULT($platform_win32)
AM_CONDITIONAL(PLATFORM_WIN32, test x$platform_win32 = xyes)
AC_CHECK_TOOL(CC, gcc, gcc)
AC_PROG_CC
AM_PROG_CC_STDC
@@ -30,13 +47,16 @@ AM_PROG_LIBTOOL
AC_CHECK_HEADERS(sys/filio.h sys/sockio.h netdb.h utime.h)
AC_CHECK_HEADERS(iconv.h)
AC_CHECK_HEADERS(giconv.h)
# for mono/metadata/debug-symfile.c
AC_CHECK_HEADERS(elf.h)
# not 64 bit clean in cross-compile
AC_CHECK_SIZEOF(void *, 4)
CFLAGS='-g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations'
CFLAGS='-g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual -Wcast-align -Wwrite-strings'
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
if test "x$PKG_CONFIG" = "xno"; then
@@ -79,7 +99,7 @@ AC_SUBST(GMODULE_CFLAGS)
AC_SUBST(GMODULE_LIBS)
AC_CHECK_LIB(gc, GC_malloc, found_boehm="yes")
gc=none
gc=auto
AC_ARG_WITH(gc, [ --with-gc=boehm,none],[gc=$with_gc])
case "x$gc" in
@@ -92,6 +112,9 @@ case "x$gc" in
AC_SUBST(HAVE_BOEHM_GC)
LIBS="$LIBS -lgc"
;;
xnone)
AC_MSG_WARN("Compiling mono without GC.")
;;
*)
dnl When the JIT works with libgc, use this chunk.
dnl # If libgc was found, use it. Otherwise just warn.
@@ -107,22 +130,6 @@ dnl AC_MSG_WARN("Compiling mono without GC.")
;;
esac
dnl ****************************************
dnl *** Check if we're building on win32 ***
dnl ****************************************
AC_MSG_CHECKING([if building for some Win32 platform])
case "$host" in
*-*-mingw*|*-*-cygwin*)
platform_win32=yes
AC_DEFINE(PLATFORM_WIN32)
;;
*)
platform_win32=no
;;
esac
AC_MSG_RESULT($platform_win32)
AM_CONDITIONAL(PLATFORM_WIN32, test x$platform_win32 = xyes)
if test x$platform_win32 = xno; then
dnl ******************************************************************
dnl *** Check for large file support ***
@@ -472,7 +479,7 @@ mono/arch/sparc/Makefile
mono/arch/arm/Makefile
mono/interpreter/Makefile
mono/tests/Makefile
mono/wrapper/Makefile
mono/benchmark/Makefile
mono/monoburg/Makefile
mono/monograph/Makefile
mono/jit/Makefile
@@ -481,6 +488,7 @@ runtime/Makefile
scripts/Makefile
man/Makefile
doc/Makefile
docs/Makefile
])
echo "
+2 -2
View File
@@ -1,7 +1,7 @@
WEB_FILES= \
c-sharp class-library contact contributing documentation download \
ado-net c-sharp class-library contact contributing documentation download \
faq gcc-frontend ideas index passport rationale resources \
roadmap runtime status team testing thanks tools porting anoncvs monodoc-xml
roadmap runtime status team testing thanks tools porting anoncvs monodoc-xml winforms
OTHERS= pending resources-pending todo mono-build.sh mono-build-w32.sh
+44
View File
@@ -0,0 +1,44 @@
* ADO.NET
The coordinator for the ADO.NET implementation is <a
href="mailto:[email protected]">Rodrigo Moya</a>.
* Action plan
The current plan to implement ADO.NET is as follows:
<b>Step 1:</b> SqlClient:
<ul>
* Implementation of System.Data.SqlClient based on
the PostgreSQL C API.
* Once the System.Data.SqlClient code is functional and
is usable by other people, we willl move it to
System.Data.PostgreSQL, and will convert the existing
System.Data.SqlClient to be just a wrapper around
System.Data.PostgreSQL.
</ul>
<b>Step 2:</b> OleDBClient:
<ul>
* On Unix systems: System.Data.OleDb will use LibGDA as its
engine.
LibGDA is the data access engine that is used by
Gnome-Db (only libgda, not libgnomedb at all).
* On Windows systems: System.Data.OleDb will use OLE-DB as
its engine.
</ul>
<b>Step 3:</b> System.Data.SqlClient Providers:
<ul>
* System.Data.SqlClient will then become a generic
proxy for binding to other SQL implementations other
than PostgreSQL (MySQL on Unix/Windows; MS SQL on
Window; Interbase on Unix/Windows). Others are welcomed.
</ul>
Executable
+11
View File
@@ -0,0 +1,11 @@
* ASP.NET
The classes for running ASP.NET are being actively written.
Gaurav, Leen and Patrik have been building the classes
required to run ASP.NET web application as well as a small
embeddable web server.
Currently ASP.NET does not work, but work is underway. If you
are interested in helping the effort please contact the
mono-list mailing list.
+5
View File
@@ -2,6 +2,11 @@
A Programmer's Introduction to C# - Second Edition: Eric Gunnerson
* Remoting
<a href="http://www.dotnetremoting.cc/book/AdvancedDotNetRemoting.asp">
Advanced .NET Remoting: Ingo Rammer</a>
* Compiler Implementation
Compilers - Principles, Techniques, and Tools: Alfred V. Aho, Ravi Sethi,
+3
View File
@@ -11,6 +11,9 @@
for the first time on December 28 2001. MCS became self hosting
on January 3rd, 2002.
The Mono Runtime and the Mono execution engine were able to make
our compiler self hosting on March 12, 2002.
A test suite is maintained to track the progress of
the compiler and various programs are routinely compiled and
ran.
+28 -1
View File
@@ -32,4 +32,31 @@
** Class Library documentation
We are moving to a new setup for documenting the class libraries,
you can read about it <a href="classlib-doc.html">here</a>
and you can read about it <a href="classlib-doc.html">here</a>.
A few words of warning and advice for class documentors:
A well-documented API can ease hours of frustration; as Mono
matures, robust and complete class library documentation will
become increasingly important. As you write API documentation,
whether it is embedded in source files or in external Monodoc XML,
please keep the following in mind:
Plagarism, even if it's unintentional, is a Bad Thing(TM).
Microsoft's .NET Framework Class Library documentation is an
excellent resource for understanding the behavior and properties of
a type, and a lot of hard work went in to creating this (copyrighted)
resource. Please don't copy from Microsoft's reference when
documenting a type.
To avoid this, I (<a href="mailto:[email protected]">[email protected]</a>)
suggest that you read the complete Microsoft documentation for a type,
ponder it for a while, and write the Mono documentation in your own
words. While it's certainly okay to refer to the Microsoft
documentation to clarify your understanding of behavior or properties,
please don't open the Microsoft docs and refer to them for each member
you document.
There's a lot of domain expertise among the class library contributors;
let's put the same personal stamp on the class library documentation
that we have on the class libraries themselves.
+20
View File
@@ -29,6 +29,21 @@
mono-cvs-list</a> mailing list. The CVS source code can also
be browsed <a href="http://cvs.hispalinux.es/cgi-bin/cvsweb/mcs/mcs/cfold.cs?cvsroot=Mono">here</a>
<a name="mar-27">
<b>Mono 0.10</b>
New packaged versions of the Mono C# compiler and Mono runtime
are now available. The latest version is 0.10.
<ul>
* <a href="archive/mono-0.10">Mono 0.10 release notes</a>
* <a href="archive/mcs-0.10.tar.gz">mcs-0.10.tar.gz</a>
Mono C# compiler
* <a href="archive/mono-0.10.tar.gz">mono-0.10.tar.gz</a>
Mono runtime
</ul>
<a name="feb-22">
<b>Mono 0.9</b>
@@ -89,6 +104,11 @@
set your CVSROOT environment variable before running the script to
select a particular cvs server.
** Mono Regression Test Suite
You can get binaries for the Mono Regression Test Suite <a
href="archive/mono-tests.tar.gz">here</a>
<a name="install">
** Building the software manually
+9 -1
View File
@@ -225,7 +225,7 @@ A: Yes, we will enable people to write GNOME applications using Mono.
Q: Will Mono enable GUI applications to be authored?
A: Yes, you will be able to build GUI applications. Indeed, that is our
main focus. We will provide both the Windows.Forms API and the Gtk# AP(I.
main focus. We will provide both the Windows.Forms API and the Gtk# API.
Q: What is the difference between Gtk# and System.Windows.Forms?
@@ -393,6 +393,10 @@ Q: Can I serialize my objects to other things other than XML?
A: Yes, although the serializing tools have not yet been planned, and
you would probably have to implement them yourself.
Q: Will Mono use ORBit?
A: No. Mono will be using a new implementation of CORBA that isn't still started.
<a name="devel"></a>
** Development Tools and Issues
@@ -688,3 +692,7 @@ Q: Will you support COM?
A: The runtime will support XPCOM on Unix systems and COM on Windows.
Most of the code for dynamic trampolines exists already.
Q: Will Ximian offer certifications on Mono or related technologies?.
A: It's possible. But there is no plan about this. So the short answer is no.
+112 -4
View File
@@ -37,8 +37,9 @@
<b><a href="c-sharp.html">C# Compiler</a></b>
</td>
<td>
Self hosting on Linux and Windows.
</td>
<b>Self hosting on Linux</b><br>
Self hosting on .NET.
</td>
</tr>
<tr>
<td>
@@ -71,6 +72,109 @@
</tr>
</table>
** Apr 24, 2002
SharpDevelop 0.88a <a href="http://www.icsharpcode.net/OpenSource/SD">is out!</a>
Congratulations to the developers behind SharpDevelop for
their new release.
** Apr 20, 2002
Some updates from the hacking lines:
<b>The web:</b> Patrik Torstensson last week contributed the
http runtime support and started work on thread pools. This
is part of the ASP.NET support.
<b>Docs:</b> John Barnette, John Sohn and Adam Treat have been
hacking on MonoDoc.
<b>ADO.NET:</b> Daniel Morgan and Rodrigo Moya have been
working on the <a href="ado-net">ADO.NET</a> support, and got
the first signs of life this week (we can connect, insert
rows; do transactions: commit/rollback; SQL errors and
exceptions work). Check <a
href="mailing-lists.html">mono-patches</a> for all the
goodies.
<b>Optimizations:</b> A number of optimizations in the runtime
made the compiler twice as fast this week:
Early this week Patrik started the string
rewrite in the runtime. Today Dietmar finished the
constructors and deployed the new layout.
Paolo got the JIT engine to generate profiles, which were in
turn used to find hot spots in Reflection, which he improved.
Daniel Lewis (of Regex fame) noticed the performance issues
with our current array layout, and contributed a new array
representation.
At the same time Dietmar started the the JIT inline code and
implemented constant propagation. These two optimizations
together are very powerful.
<b>Bug fixing:</b> And of course everyone has been helping out
with the bug fixing (Duncan, Gonzalo, Jonathan, Miguel, Nick,
Ravi, Sergey)
** Apr 18, 2002
Dietmar's inlining for the JIT engine just landed into
CVS. This is only a first cut and more improvements will come later.
Patrik, Paolo, Dietmar and Gonzalo have been busy optimizing
our class libraries and runtime engine to become faster. Many changes
on CVS as well.
** Apr 11, 2002
Gtk# 0.1 "ButtonHook" has been <a
href="http://lists.ximian.com/archives/public/gtk-sharp-list/2002-April/000048.html">released</a>
Binaries for the Mono Regression Test Suite are <a
href="archive/mono-tests.tar.gz">available</a> for
people porting the Mono Runtime to new platforms.
** Apr 6, 2002
<a href="http://www.dotnetremoting.cc/book/AdvancedDotNetRemoting.asp">
Advanced .NET Remoting</a> from Ingo Rammer is now available. Ingo
helped us to implement the proxy support and the book is a valuable
resource for anyone interested in remoting.
** Apr 5, 2002
Transparent proxy support has been finished, congrats to
Dietmar. Our JIT engine on CVS contains the implementation.
This should enable people to test the remoting framework on
Mono.
** Mar 28, 2002
Debugging information is now generated by the compiler thanks
to Martin's work. The resulting dwarf file can be used to
single step C# code in GDB. A document will be shortly published with
the details.
** Mar 27, 2002
<b>Mono 0.10 is out!</b> The self hosting release of Mono has
been released.
A new version of the runtime, compiler and class libraries has
been packaged for your download pleasure. Binaries are
included. The <a href="archive/mono-0.10">Release Notes</a>
are available.
You can get it <a
href="download.html#mar-27">Here</a> (quick links: <a
href="archive/mono-0.10.tar.gz">runtime</a> and <a
href="archive/mcs-0.10.tar.gz">compiler/classes</a>).
** Mar 26, 2002
Paolo finally fixed the last bug in the JITer that stopped
@@ -79,7 +183,9 @@
<a href="http://gtk-sharp.sourceforge.net">Gtk#</a> runs <a
href="http://gtk-sharp.sourceforge.net/gtk-hello-world.png">Hello
World</a>
World</a>. Mike posted some <a
href="http://lists.ximian.com/archives/public/gtk-sharp-list/2002-March/000034.html">details.</a>
** Mar 19, 2002
@@ -132,7 +238,9 @@
href="http://lists.ximian.com/archives/public/mono-list/2002-March/003726.html">MCS
compiler compiling itself on Linux</a>
completely for the first time! The resulting image still contains
some errors, but the whole compiler process goes now.
some errors, but the whole compiler process goes now. Later in the day
and a couple of small optimizations and bug fixes, the compile
speed was improved in 400%
We are very close to have a complete self hosting environment now.
Executable
+52
View File
@@ -0,0 +1,52 @@
* Java
It would be interesting to support the Java language as part
of the Mono project.
You have to think of Java as various pieces: Java the
language and Java the virtual machine.
It is possible to compile Java to .NET, as shown by the
Microsoft J# compiler. We could then allow the migration of
Java applications to the Mono runtime.
** The translator.
It would be interesting to write a semantic translator that
converts java byte codes into CIL opcodes. This is possible
because the Java byte codes are a subset of the CIL ones.
A semantic tree needs to be constructed (very much in the
spirit of what is done in mono_analize_stack in
<tt>mono/mono/jit/jit.c</tt>. Once such a semantic tree is
constructed, we could generate the equivalent Java code.
This has a number of interesting side effects: people can
continue to use their existing Java compilers to compile their
code, and a simple tool that converts their .class files into
a .NET assembly can be used.
** Libraries
We could translate the GNU Classpath libraries with the above
tools to provide the Java runtime required to host into the
Mono runtime. Some special treatment would be required for
core data types like integers, arrays and strings, and of
course reuse where possible existing classes from .NET to make
them compatible.
** JILC - Java to IL Compiler
This is an attempt to make the java bytecode available for the
.NET environment.
The project attempts to generate the IL code / bytecode from the
compiled java class files. It has reached the stage of code-generation.
The issues that needs to be addressed is the mapping of java objects
to the IL objects, eg: java.lang.String to System.String.
Gaurav Vaish and Abhaya Agarwal are currently leading this project.
The project is currently hosted at <a href="http://sourceforge.net/projects/jilc">SourceForge.Net</a>.
The official home page of the project is
<a href="http://jilc.sourceforge.net">http://jilc.sourceforge.net</a>.
+181
View File
@@ -0,0 +1,181 @@
* How to debug your C# application with the JIT engine
To debug a C# application you need to run the JIT in your debugger.
Before you can do anything useful in a debugger, you need a symbol
file which tells your debugger about functions, types, line numbers
and such. Unfortunately, this symbol file needs to be recreated each
time the JIT compiles a new method since it doesn't know anything
about this method (especially not its memory address) before actually
compiling it.
You have two ways of creating a symbol file:
** Letting the JIT dynamically create the symbol file
This'll give you a symbol file which is suitable for debugging IL byte
code - you won't see your C# source code.
However, this method has the advantage that it works with every assembly,
no matter whether it has been compiled with Mono's C# compiler (MCS) or
with any other compiler. It's currently the only way to debug
<tt>corlib.dll</tt> or any other library which cannot be compiled with
our compiler yet.
All that you need is a dump of the IL bytecode for each assembly (including
all assemblies this assembly is referencing). This is done by using the
<tt>monodis</tt> utility:
<pre>
monodis /home/export/martin/MONO-LINUX/lib/corlib.dll > corlib.il<br>
monodis /home/export/martin/MONO-LINUX/lib/System.dll > System.il<br>
monodis /home/export/martin/MONO-LINUX/bin/mcs.exe > mcs.il
</pre>
Make sure that all the .il files have the same name as their corresponding
assembly and that they're all created in the current directory.
The JIT supports two different debugging file formats:
<ul>
* STABS: This is a very simple debugging format, but it may be the only one
which is supported on your system. It is limited to source files of no more
than 65.535 lines and it's type support is also very limited. You should only
use this if your debugger doesn't support DWARF 2.
To generate STABS output, use the <tt>--stabs</tt> command line argument.
* DWARF 2: The DWARF 2 debugging format is a very powerful debugging format
which can handle source files of arbitrary size and has a highly sophisticated
type support. It's the recommended format unless you need to use STABS because
your debugger doesn't support DWARF 2.
To generate DWARF 2 output, use the <tt>--dwarf</tt> command line argument.
</ul>
You need to regenerate the symbol file each time the JIT compiled a new
method and each time you restart the JIT. You cannot reuse your symbol file
if you start the JIT a second file, not even if you're running the same
application with the same input data a second time.
Regenerating the symbol file is done by calling the JIT's
<tt>mono_debug_make_symbols ()</tt> function from within your debugger and
then reloading the symbol files. This function creates a <tt>filename-dwarf.s</tt>
(or <tt>filename-stabs.s</tt>) assembler input file in the current directory and
an object file in <tt>/tmp/filename.o</tt> - you need to tell your debugger to
add this object file as symbol file.
If you're using the GNU debugger, this is done like this:
<pre>
call mono_debug_make_symbols ()
add-symbol-file /tmp/corlib.o
add-symbol-file /tmp/mcs.o
add-symbol-file /tmp/Mono.CSharp.Debugger.o
</pre>
You can also write a GDB macro like this:
<pre>
define reload
call mono_debug_make_symbols ()
add-symbol-file /tmp/corlib.o
add-symbol-file /tmp/mcs.o
add-symbol-file /tmp/Mono.CSharp.Debugger.o
end
</pre>
Then you can just say <tt>reload</tt> to have GDB recreate the symbol file.
There's also an <a href="jit-debug-sample.html">example debugging session</a> using
the GNU debugger.
** Using a symbol file which have been created by the Mono C# compiler
If you compiled your application with Mono's C# compiler (MCS), you can tell it to
create a symbol file which is then processed and rewritten by the JIT engine.
To do this, you must give MCS the <tt>-g</tt> option:
<pre>
$ mcs -g Foo.cs
</pre>
This creates a <tt>Foo-debug.s</tt> assembler input file.
To use this in the JIT, you must first copy it to the target machine (the machine
where you want to run the JIT to debug your application) and run it through the
assembler to produce an object file <tt>Foo-debug.o</tt>. This object file must be
in the current directory.
Then start the JIT in your debugger and give it the <tt>--dwarf-plus</tt> command
line argument.
Each time you call <tt>mono_debug_make_symbols ()</tt> from withing your debugger,
the JIT will read this <tt>Foo-debug.o</tt>, fix some machine dependent things like
memory addresses etc. in it and write it back to disk.
If you're using the GNU debugger, you'll want to use a macro like this:
<pre>
define relocate
call mono_debug_make_symbols ()
add-symbol-file /tmp/corlib.o
add-symbol-file mcs-debug.o
add-symbol-file Mono.CSharp.Debugger-debug.o
end
</pre>
If there is no <tt>assembly-debug.o</tt> file, but an <tt>assembly.il</tt> one, the
JIT will fall back to normal DWARF 2 (in the example above, <tt>corlib.dll</tt> was
compiled with Microsoft's compiler and the JIT is thus using DWARF to debug it).
This debugging method only works if you compiled your assembly with MCS, but it'll
allow you to actually debug your C# source code :-)
Here's an <a href="jit-debug-sample2.html">example debugging session</a> using
the GNU debugger.
** Breakpoints and single stepping
The JIT has a <tt>--debug</tt> command line argument to insert a breakpoint at the
beginning of this method. It takes a <tt>Namespace.Class:Method</tt> argument which
is the method. This argument can be given multiple times.
However, once your application is stopped in GDB you may want to insert a breakpoint
the next time the JIT compiles a method. There's a global variable
<tt>mono_debug_insert_breakpoint</tt> which you can modify in your debugger.
If this variable is set to a non-zero value, the JIT's <tt>arch_compile_method</tt>
will insert a breakpoint the next time it is called, ie. at the top of the next
method it compiles. If this value has a positive value, it acts as a counter and is
decremented after inserting the breakpoint - setting it to a negative value will let
the JIT insert the breakpoint each time it compiles a new method.
There's also global variable <tt>mono_debug_last_breakpoint_address</tt> which always
contains the address of the last inserted breakpoint. You may manually override this
address with a <tt>nop</tt> instruction to delete the breakpoint.
For instance, I have a GDB macro called <tt>enter</tt> which I use to enter a method
rather than stepping over it:
<pre>
define enter
set mono_debug_insert_breakpoint = 1
continue
set *mono_debug_last_breakpoint_address = 0x90
relocate
frame
</pre>
Btw. speaking of single stepping - you should use your debuggers <tt>next</tt> command,
not its <tt>step</tt> command for single stepping unless you compiled the JIT without
debugging support. The reason for this is that the JIT creates machine code which contains
calls to JIT methods such as <tt>mono_object_new_wrapper</tt> at places where you don't
expect them - so unless the JIT is compiled at least without line numbers, your debugger
will enter such methods if you use <tt>step</tt> rather than <tt>next</tt>.
+86
View File
@@ -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 --dwarf --debug Foo:Main ./Foo.exe
Starting program: /home/martin/monocvs/mono/mono/jit/mono --dwarf --debug 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.
+70
View File
@@ -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 --dwarf-plus --debug Foo:Main ./Foo.exe
Starting program: /home/martin/monocvs/mono/mono/jit/mono --dwarf-plus --debug 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>
Executable
+19
View File
@@ -0,0 +1,19 @@
* Compilers for other languages
Here are some other free compilers for other languages that
target .NET and should work with Mono with no problem:
* Oberon
This Oberon compiler is written in Oberon.NET (another self
hosting compiler):
<a href="http://www.superin.formativ.net/mono/oberon/oberon.zip">http://www.superin.formativ.net/mono/oberon/oberon.zip</a>
* Component Pascal
The Component Pascal compiler: <a
href="http://www2.fit.qut.edu.au/CompSci/PLAS/ComponentPascal">Home
Page</a>, you can <a
href="http://www2.fit.qut.edu.au/CompSci/PLAS/ComponentPascal/gpcp1.1.4-netRTM.zip">
download it</a>
+2 -2
View File
@@ -120,8 +120,8 @@ export CPPFLAGS
export LDFLAGS
# Make sure we build native w32, not cygwin
CC="gcc -mno-cygwin"
export CC
#CC="gcc -mno-cygwin"
#export CC
# --prefix is used to set the class library dir in mono, and it needs
# to be in windows-native form. It also needs to have '\' turned into
+5 -4
View File
@@ -60,6 +60,7 @@ function install_package() {
tarfile=$1
dirname=$2
name=$3
configure_options=$4
echo "Installing $name..."
if [ ! -f $here/$tarfile ]; then
@@ -70,7 +71,7 @@ function install_package() {
if [ ! -d $here/$dirname ]; then
# Build and install package
tar xzf $here/$tarfile || exit -1
(cd $here/$dirname; ./configure --prefix=$here/install || exit -1; make || exit -1; make install || exit -1)
(cd $here/$dirname; ./configure --prefix=$here/install $configure_options || exit -1; make || exit -1; make install || exit -1)
success=$?
if [ $success -ne 0 ]; then
echo "***** $name build failure. Run rm -rf $here/$dirname to have this script attempt to build $name again next time"
@@ -120,19 +121,19 @@ export LDFLAGS
# Grab pkg-config-0.8, glib-1.3.12 if necessary
if [ $install_pkgconfig = "yes" ]; then
install_package pkgconfig-0.8.0.tar.gz pkgconfig-0.8.0 pkgconfig
install_package pkgconfig-0.8.0.tar.gz pkgconfig-0.8.0 pkgconfig ""
else
echo "Not installing pkgconfig, you already seem to have it installed"
fi
if [ $install_glib = "yes" ]; then
install_package glib-1.3.13.tar.gz glib-1.3.13 glib
install_package glib-1.3.13.tar.gz glib-1.3.13 glib ""
else
echo "Not installing glib, you already seem to have it installed"
fi
if [ $install_libgc = "yes" ]; then
install_package gc6.0.tar.gz gc6.0 libgc
LIBS="-ldl" install_package gc6.0.tar.gz gc6.0 libgc "--enable-threads=pthreads"
# make install didnt do the headers!
mkdir -p $here/install/include/gc
cp -r $here/gc6.0/include/* $here/install/include/gc
+53 -12
View File
@@ -1,55 +1,96 @@
* JIT Compiler
<a
href="http://cui.unige.ch/OSG/publications/OO-articles/TechnicalReports/98/efficient.pdf">
href="http://citeseer.nj.nec.com/vitek97efficient.html">
Efficient Type Inclusion Tests: Jahn Vitek, R. Nigel Horspool, Andres
Krall</a>
<a
href="http://citeseer.nj.nec.com/rd/2822939%2C410249%2C1%2C0.25%2CDownload/http%253A%252F%252Fciteseer.nj.nec.com/cache/papers/cs/20094/http%253AzSzzSzwww.math.tau.ac.ilzSz%257EguyzSzjava-optzSzssa.pdf/cytron91efficiently.pdf">
href="http://citeseer.nj.nec.com/cytron91efficiently.html">
Efficiently Computing Static Single Assignment Form and the Control
Dependence Graph: Ron Cytron, Jeanne Ferrante</a>
<a
href="http://citeseer.nj.nec.com/rd/14269422%2C217684%2C1%2C0.25%2CDownload/http%253A%252F%252Fciteseer.nj.nec.com/cache/papers/cs/9476/http%253AzSzzSzwww.cs.ucsb.eduzSzconferenceszSzjava98zSzpaperszSzcacao.pdf/krall98monitors.pdf">
Monitors and Exceptions - How to implement Java efficiently: Andreas Krall,
Mark Probst</a>
href="http://citeseer.nj.nec.com/193349.html">
Practical Improvements to the Construction and Destruction of Static Single Assignment Form: Preston Briggs,
Keith Cooper, Timothy Harvey, Taylor Simpson</a>
<a
href="http://citeseer.nj.nec.com/rd/78588775%2C217642%2C1%2C0.25%2CDownload/http%253A%252F%252Fciteseer.nj.nec.com/cache/papers/cs/9476/http%253AzSzzSzwww.complang.tuwien.ac.atzSzandizSzpact_98.pdf/krall98efficient.pdf">
href="http://citeseer.nj.nec.com/krall98efficient.html">
Efficient JavaVM Just-in-Time Compilation: Andreas Krall</a>
<a
href="http://www.complang.tuwien.ac.at/andi/scicom_01.ps">Java for
href="http://citeseer.nj.nec.com/452617.html">Java for
Large-Scale Scientific Computations: Andreas Krall, Phillip Thomsich</a>
<a
href="http://citeseer.nj.nec.com/rd/62076894%2C117522%2C1%2C0.25%2CDownload/http%253A%252F%252Fciteseer.nj.nec.com/cache/papers/cs/642/ftp%253AzSzzSzftp.cs.princeton.eduzSzpubzSzlcczSzcontribzSziburg.pdf/fraser92engineering.pdf">
href="http://citeseer.nj.nec.com/117522.html">
Engineering Simple, Efficient Code Generator Generator: Christopher
W. Fraser, David R. Hanson, Todd A. Proebsting</a>
<a
href="http://citeseer.nj.nec.com/rd/8408515%2C54698%2C1%2C0.25%2CDownload/http%253A%252F%252Fciteseer.nj.nec.com/cache/papers/cs/815/http%253AzSzzSzcuiwww.unige.chzSzOSGzSzpeoplezSzjvitekzSzResourceszSzArchivezSzProebsting.pdf/proebsting92code.pdf">
href="http://citeseer.nj.nec.com/proebsting92code.html">
Code Generation Techniques: Todd Alan Proebsting</a>
<a
href="http://citeseer.nj.nec.com/74629.html">Fast,
Effective Code Generation in a Just-In-Time Java Compiler: Ali-Reza
Adl-Tabatabai Guei-Yuan Lueh, Vishesh M. Parikh, James M. Stichnoth...</a>
<a
href="http://citeseer.nj.nec.com/bodik00abcd.html">
ABCD: Eliminating Array-Bounds Checks on Demand: Rastislav Bodik, Rajiv Gupta, Vivek Sarkar</a>
* Register Allocation
<a
href="http://citeseer.nj.nec.com/rd/28309937%2C283402%2C1%2C0.25%2CDownload/http%253A%252F%252Fciteseer.nj.nec.com/cache/papers/cs/12458/http%253AzSzzSzwww.pdos.lcs.mit.eduzSzpaperszSztoplas-linearscan.pdf/poletto99linear.pdf">
href="http://citeseer.nj.nec.com/poletto99linear.html">
Linear Scan Register Allocation: Massimiliano Poletto, Vivek Sarkar</a>
<a
href="http://citeseer.nj.nec.com/rd/19916683%2C91122%2C1%2C0.25%2CDownload/http%253A%252F%252Fciteseer.nj.nec.com/cache/papers/cs/468/http%253AzSzzSzwww.eecs.harvard.eduzSzhubezSzpaperszSzpldi98-binpack.pdf/traub98quality.pdf">
href="http://citeseer.nj.nec.com/traub98quality.html">
Quality and Speed in Linear-scan Register Allocation: Omri Traub, Glenn
Holloway, Michael D. Smith</a>
* Loop Transformations
<a
href="http://citeseer.nj.nec.com/bacon93compiler.html">
Compiler Transformations for High-Performance Computing: David Bacon</a>
* Interpreter
<a
href="http://citeseer.nj.nec.com/rd/62076894%2C470069%2C1%2C0.25%2CDownload/http%253A%252F%252Fciteseer.nj.nec.com/cache/papers/cs/24640/http%253AzSzzSzwww.complang.tuwien.ac.atzSzpaperszSzertlzPz01.pdf/ertl01vmgen.pdf">
href="http://citeseer.nj.nec.com/470069.html">
vmgen-A Generator of Efficient Virtual Machine Interpreters: M. Anton
Ertl, David Gregg, Andreas Krall, Bernd Paysan</a>
* Synchronization
<a
href="http://citeseer.nj.nec.com/krall98monitors.html">
Monitors and Exceptions - How to implement Java efficiently: Andreas Krall,
Mark Probst</a>
<a
href="http://citeseer.nj.nec.com/bacon98thin.html">
Thin Locks: Featherweight Synchronization for Java: David Bacon</a>
<a
href="http://citeseer.nj.nec.com/278639.html">
Featherweight Monitors with Bacon Bits: David Bacon</a>
* Garbage Collection
<a
href="http://citeseer.nj.nec.com/wilson92uniprocessor.html">
Uniprocessor Garbage Collection Techniques: Paul Wilson</a>
<a
href="http://citeseer.nj.nec.com/41666.html">
A Language-Independent Garbage Collector Toolkit: Richard Hudson, Eliot Moss, Amer Diwan, Christopher Weight</a>
<a
href="http://citeseer.nj.nec.com/seligmann95incremental.html">
Incremental Collection of Mature Objects: Richard Hudson, Eliot Moss</a>
+246
View File
@@ -0,0 +1,246 @@
System.Object
System.Exception
System.ValueType
System.Delegate
System.MulticastDelegate
System.Enum
System.Activator
System.ArgIterator
System.__ComObject
System.TypedReference
System.Security.AllowPartiallyTrustedCallersAttribute
System.Runtime.Serialization.Formatter
System.Runtime.Serialization.FormatterConverter
System.Runtime.Serialization.FormatterServices
System.Runtime.Serialization.ObjectIDGenerator
System.Runtime.Serialization.ObjectManager
System.Reflection.ModuleResolveEventHandler
System.Reflection.Pointer
System.Globalization.CompareInfo
System.Globalization.HebrewCalendar
System.Globalization.HijriCalendar
System.Globalization.JapaneseCalendar
System.Globalization.KoreanCalendar
System.Globalization.SortKey
System.Globalization.StringInfo
System.Globalization.TaiwanCalendar
System.Globalization.TextElementEnumerator
System.Globalization.TextInfo
System.Globalization.ThaiBuddhistCalendar
System.IO.IsolatedStorage.IsolatedStorageFile
System.Reflection.Emit.MethodRental
System.Runtime.CompilerServices.AccessedThroughPropertyAttribute
System.Runtime.CompilerServices.CallConvCdecl
System.Runtime.CompilerServices.CallConvStdcall
System.Runtime.CompilerServices.CallConvThiscall
System.Runtime.CompilerServices.CallConvFastcall
System.Runtime.CompilerServices.CustomConstantAttribute
System.Runtime.CompilerServices.DateTimeConstantAttribute
System.Runtime.CompilerServices.DiscardableAttribute
System.Runtime.CompilerServices.DecimalConstantAttribute
System.Runtime.CompilerServices.CompilationRelaxationsAttribute
System.Runtime.CompilerServices.CompilerGlobalScopeAttribute
System.Runtime.CompilerServices.IDispatchConstantAttribute
System.Runtime.CompilerServices.IsVolatile
System.Runtime.CompilerServices.IUnknownConstantAttribute
System.Runtime.CompilerServices.RequiredAttributeAttribute
System.Runtime.InteropServices.ArrayWithOffset
System.Runtime.InteropServices.DispIdAttribute
System.Runtime.InteropServices.ClassInterfaceType
System.Runtime.InteropServices.ClassInterfaceAttribute
System.Runtime.InteropServices.ComVisibleAttribute
System.Runtime.InteropServices.LCIDConversionAttribute
System.Runtime.InteropServices.ComRegisterFunctionAttribute
System.Runtime.InteropServices.ComUnregisterFunctionAttribute
System.Runtime.InteropServices.ProgIdAttribute
System.Runtime.InteropServices.ImportedFromTypeLibAttribute
System.Runtime.InteropServices.IDispatchImplType
System.Runtime.InteropServices.IDispatchImplAttribute
System.Runtime.InteropServices.ComSourceInterfacesAttribute
System.Runtime.InteropServices.ComConversionLossAttribute
System.Runtime.InteropServices.TypeLibTypeFlags
System.Runtime.InteropServices.TypeLibFuncFlags
System.Runtime.InteropServices.TypeLibVarFlags
System.Runtime.InteropServices.TypeLibTypeAttribute
System.Runtime.InteropServices.TypeLibFuncAttribute
System.Runtime.InteropServices.TypeLibVarAttribute
System.Runtime.InteropServices.ComImportAttribute
System.Runtime.InteropServices.PreserveSigAttribute
System.Runtime.InteropServices.ComAliasNameAttribute
System.Runtime.InteropServices.AutomationProxyAttribute
System.Runtime.InteropServices.PrimaryInteropAssemblyAttribute
System.Runtime.InteropServices.CoClassAttribute
System.Runtime.InteropServices.ComEventInterfaceAttribute
System.Runtime.InteropServices.COMException
System.Runtime.InteropServices.ComMemberType
System.Runtime.InteropServices.CurrencyWrapper
System.Runtime.InteropServices.DispatchWrapper
System.Runtime.InteropServices.ErrorWrapper
System.Runtime.InteropServices.ExtensibleClassFactory
System.Runtime.InteropServices.HandleRef
System.Runtime.InteropServices.InvalidComObjectException
System.Runtime.InteropServices.InvalidOleVariantTypeException
System.Runtime.InteropServices.TypeLibImporterFlags
System.Runtime.InteropServices.ExporterEventKind
System.Runtime.InteropServices.ITypeLibExporterNotifySink
System.Runtime.InteropServices.ITypeLibConverter
System.Runtime.InteropServices.MarshalDirectiveException
System.Runtime.InteropServices.ObjectCreationDelegate
System.Runtime.InteropServices.RuntimeEnvironment
System.Runtime.InteropServices.RegistrationServices
System.Runtime.InteropServices.SafeArrayRankMismatchException
System.Runtime.InteropServices.SafeArrayTypeMismatchException
System.Runtime.InteropServices.SEHException
System.Runtime.InteropServices.TypeLibConverter
System.Runtime.InteropServices.BIND_OPTS
System.Runtime.InteropServices.UCOMIBindCtx
System.Runtime.InteropServices.UCOMIConnectionPointContainer
System.Runtime.InteropServices.UCOMIConnectionPoint
System.Runtime.InteropServices.UCOMIEnumMoniker
System.Runtime.InteropServices.CONNECTDATA
System.Runtime.InteropServices.UCOMIEnumConnections
System.Runtime.InteropServices.UCOMIEnumConnectionPoints
System.Runtime.InteropServices.UCOMIEnumString
System.Runtime.InteropServices.UCOMIEnumVARIANT
System.Runtime.InteropServices.FILETIME
System.Runtime.InteropServices.UCOMIMoniker
System.Runtime.InteropServices.UCOMIPersistFile
System.Runtime.InteropServices.UCOMIRunningObjectTable
System.Runtime.InteropServices.STATSTG
System.Runtime.InteropServices.UCOMIStream
System.Runtime.InteropServices.DESCKIND
System.Runtime.InteropServices.BINDPTR
System.Runtime.InteropServices.UCOMITypeComp
System.Runtime.InteropServices.TYPEKIND
System.Runtime.InteropServices.TYPEFLAGS
System.Runtime.InteropServices.IMPLTYPEFLAGS
System.Runtime.InteropServices.TYPEATTR
System.Runtime.InteropServices.FUNCDESC
System.Runtime.InteropServices.IDLFLAG
System.Runtime.InteropServices.IDLDESC
System.Runtime.InteropServices.PARAMFLAG
System.Runtime.InteropServices.PARAMDESC
System.Runtime.InteropServices.TYPEDESC
System.Runtime.InteropServices.ELEMDESC
System.Runtime.InteropServices.VARDESC
System.Runtime.InteropServices.DISPPARAMS
System.Runtime.InteropServices.EXCEPINFO
System.Runtime.InteropServices.FUNCKIND
System.Runtime.InteropServices.INVOKEKIND
System.Runtime.InteropServices.CALLCONV
System.Runtime.InteropServices.FUNCFLAGS
System.Runtime.InteropServices.VARFLAGS
System.Runtime.InteropServices.UCOMITypeInfo
System.Runtime.InteropServices.SYSKIND
System.Runtime.InteropServices.LIBFLAGS
System.Runtime.InteropServices.TYPELIBATTR
System.Runtime.InteropServices.UCOMITypeLib
System.Runtime.InteropServices.UnknownWrapper
System.Runtime.Remoting.IObjectHandle
System.Runtime.Remoting.IRemotingTypeInfo
System.Runtime.Remoting.IChannelInfo
System.Runtime.Remoting.IEnvoyInfo
System.Runtime.Remoting.RemotingConfiguration
System.Runtime.Remoting.TypeEntry
System.Runtime.Remoting.ActivatedClientTypeEntry
System.Runtime.Remoting.ActivatedServiceTypeEntry
System.Runtime.Remoting.WellKnownClientTypeEntry
System.Runtime.Remoting.WellKnownServiceTypeEntry
System.Runtime.Remoting.RemotingException
System.Runtime.Remoting.ServerException
System.Runtime.Remoting.RemotingTimeoutException
System.Runtime.Remoting.RemotingServices
System.Runtime.Remoting.InternalRemotingServices
System.Runtime.Remoting.SoapServices
System.Runtime.Remoting.Activation.UrlAttribute
System.Runtime.Remoting.Messaging.IMessageSink
System.Runtime.Remoting.Messaging.AsyncResult
System.Runtime.Remoting.Messaging.CallContext
System.Runtime.Remoting.Messaging.ILogicalThreadAffinative
System.Runtime.Remoting.Messaging.InternalMessageWrapper
System.Runtime.Remoting.Messaging.IMethodCallMessage
System.Runtime.Remoting.Messaging.MethodCallMessageWrapper
System.Runtime.Remoting.Messaging.HeaderHandler
System.Runtime.Remoting.Messaging.IMessageCtrl
System.Runtime.Remoting.Messaging.IRemotingFormatter
System.Runtime.Remoting.Messaging.ReturnMessage
System.Runtime.Remoting.Messaging.MethodCall
System.Runtime.Remoting.Messaging.ConstructionCall
System.Runtime.Remoting.Messaging.MethodResponse
System.Runtime.Remoting.Messaging.ConstructionResponse
System.Runtime.Remoting.Messaging.MethodReturnMessageWrapper
System.Runtime.Remoting.Messaging.OneWayAttribute
System.Runtime.Remoting.Messaging.MessageSurrogateFilter
System.Runtime.Remoting.Messaging.RemotingSurrogateSelector
System.Runtime.Remoting.Contexts.CrossContextDelegate
System.Runtime.Remoting.Contexts.ContextProperty
System.Runtime.Remoting.Contexts.IContextPropertyActivator
System.Runtime.Remoting.Contexts.IContributeClientContextSink
System.Runtime.Remoting.Contexts.IContributeDynamicSink
System.Runtime.Remoting.Contexts.IContributeEnvoySink
System.Runtime.Remoting.Contexts.IContributeObjectSink
System.Runtime.Remoting.Contexts.IContributeServerContextSink
System.Runtime.Serialization.Formatters.InternalRM
System.Runtime.Serialization.Formatters.InternalST
System.Runtime.Serialization.Formatters.SoapMessage
System.Runtime.Serialization.Formatters.SoapFault
System.Runtime.Serialization.Formatters.ServerFault
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
System.Security.Cryptography.CryptoConfig
System.Security.Cryptography.KeyedHashAlgorithm
System.Security.Cryptography.HMACSHA1
System.Security.Cryptography.MACTripleDES
System.Security.Cryptography.MaskGenerationMethod
System.Security.Cryptography.PasswordDeriveBytes
System.Security.Cryptography.PKCS1MaskGenerationMethod
System.Security.Cryptography.RC2
System.Security.Cryptography.RC2CryptoServiceProvider
System.Security.Cryptography.RSACryptoServiceProvider
System.Security.Cryptography.RSAOAEPKeyExchangeDeformatter
System.Security.Cryptography.RSAOAEPKeyExchangeFormatter
System.Security.Cryptography.RSAPKCS1KeyExchangeDeformatter
System.Security.Cryptography.RSAPKCS1KeyExchangeFormatter
System.Security.Cryptography.RSAPKCS1SignatureDeformatter
System.Security.Cryptography.RSAPKCS1SignatureFormatter
System.Security.Cryptography.SHA1Managed
System.Security.Cryptography.TripleDES
System.Security.Cryptography.TripleDESCryptoServiceProvider
System.Security.Permissions.EnvironmentPermission
System.Security.Permissions.FileDialogPermission
System.Security.Permissions.IsolatedStorageFilePermission
System.Security.Permissions.PrincipalPermissionAttribute
System.Security.Permissions.SecurityPermissionAttribute
System.Security.Permissions.PublisherIdentityPermissionAttribute
System.Security.Permissions.PublisherIdentityPermission
System.Security.Permissions.ReflectionPermission
System.Security.Permissions.RegistryPermission
System.Security.Permissions.PrincipalPermission
System.Security.Permissions.SiteIdentityPermission
System.Security.Permissions.StrongNameIdentityPermission
System.Security.Permissions.StrongNamePublicKeyBlob
System.Security.Permissions.UIPermission
System.Security.Permissions.UrlIdentityPermission
System.Security.Permissions.ZoneIdentityPermission
System.Security.Policy.ApplicationDirectory
System.Security.Policy.ApplicationDirectoryMembershipCondition
System.Security.Policy.FirstMatchCodeGroup
System.Security.Policy.Hash
System.Security.Policy.HashMembershipCondition
System.Security.Policy.NetCodeGroup
System.Security.Policy.PermissionRequestEvidence
System.Security.Policy.Publisher
System.Security.Policy.PublisherMembershipCondition
System.Security.Policy.Site
System.Security.Policy.SiteMembershipCondition
System.Security.Policy.StrongName
System.Security.Policy.StrongNameMembershipCondition
System.Security.Policy.UnionCodeGroup
System.Security.Policy.Url
System.Security.Policy.UrlMembershipCondition
System.Security.Policy.Zone
System.Security.Policy.ZoneMembershipCondition
System.Security.Principal.WindowsIdentity
System.Security.Principal.WindowsImpersonationContext
System.Security.Principal.WindowsPrincipal
System.Threading.CompressedStack
Executable
+15
View File
@@ -0,0 +1,15 @@
* Plans
Here we are tracking some plans to particular pieces of
technology that are part of Mono.
This is just a repository of information that is handy for
contributors.
Currently you can read our plans for <a
href="ado-net.html">ADO.NET</a>, <a
href="asp-net">ASP.NET</a>, <a href="java.html">Java</a> and
<a href="winforms.html">WinForms</a>.
+34 -2
View File
@@ -108,6 +108,10 @@
href="http://www.icsharpcode.net/OpenSource/SD/default.asp">Sharp
Develop:</a> an IDE for the C# language written in C#.
* <a
href="http://www.improve-technologies.com/alpha/esharp/">Eclipse
Plugin for C#</a>
* <a
href="http://janet-js.sourceforge.net/">Janet:</a>
an implemention of ECMAScript (the standarized
@@ -151,6 +155,34 @@
* <A
href="http://developer.gnome.org/arch/">Architecture Overview</a>
</ul>
** Assembly Language Manuals online
<ul>
* <a href="http://www.agner.org/assem/#optimize">
Pentium optimization tutorial</a> by Agner Fog
* <a href="http://webster.cs.ucr.edu/">
Art of Assembly</a> (x86 only)
* Documentation for various CPUs
(<a href="http://www.mit.edu/afs/sipb/contrib/doc/specs/ic/cpu/">
x86, IA64, MIPS, ARM, Alpha</a>)
* <a href="http://www.heyrick.co.uk/assembler/">
ARM Assembler</a> tutorial
* PowerPC
<a href="http://www-3.ibm.com/chips/techlib/techlib.nsf/techdocs/852569B20050FF7785256996007558C6">
Compiler Writer's Guide</a>
* <a href="http://www.lightsoft.co.uk/Fantasm/Beginners/begin1.html">
Beginners Guide to PowerPC Assembler</a>
</ul>
** Win32
<ul>
* Win32 <a href="http://www.jorgon.freeserve.co.uk/ExceptFrame.htm">
Structured Exception Handling (SEH)</a> internals (x86 specific)
</ul>
+38 -10
View File
@@ -16,14 +16,8 @@
easy-to-port runtime engine.
</ul>
Currently both runtimes are missing garbage collection. We
are planning on using the ORP GC engine and deploy it by
middle January.
* COM and XPCOM
We plan on adding support for XPCOM on Unix and COM on Microsoft
Windows later in our development process.
Currently we are using the Bohem conservative garbage
collector, but we working on incorporating the ORP GC engine.
** Executing MSIL/CIL images
@@ -60,18 +54,34 @@
layout the code to support non-IA32 architectures. Our work
will be focused on getting a IA32 version running first.
The JIT engine should work on Linux and Win32, although you
The JIT engine works on Linux and Win32, although you
will need to install the CygWin32 development tools to get a
Unix-like compilation environment (mostly we use GNU make in
a few of the makefiles).
** JIT Engine (<b>updated, March 26th, 2002</b>)
** JIT Engine (<b>updated, April 21, 2002</b>)
The JIT engine uses a code-generator generator approach for
compilation. Given the properties of CIL byte codes, we can
take full advantage of a real instruction selector for our
code generator.
The JIT engine implements a number of optimizations:
<ul>
* Opcode cost estimates (our architecture allows
us to generate different code paths depending
on the target CPU dynamically).
* Inlining.
* Constant folding.
Although compilers typically do
constant folding, the combination of inlining with
constant folding gives some very good results.
</ul>
There are a couple of books that deal with this technique: "A
Retargetable C Compiler" and "Advanced Compiler Design and
Implementation" are good references. You can also get a
@@ -165,3 +175,21 @@
Initially we used libffi, but it was fairly slow, so we have
reused parts of the JIT work to create efficient PInvoke trampolines.
** Remoting
Mono has support for remoting and proxy objects, just like
.NET does. The runtime provides these facilities.
** Porting
If you are interested in porting the Mono runtime to other
platforms, you might find the pre-compiled <a
href="archive/mono-tests.tar.gz">Mono regression test
suite</a> useful to debug your implementation.
* COM and XPCOM
We plan on adding support for XPCOM on Unix and COM on Microsoft
Windows later in our development process.
+9
View File
@@ -11,6 +11,9 @@
2,System.Data,class-status-System.Data.html,class-status-System.Data.src,cm/cormissing.css,cm/cormissing.js
2,System.Web,class-status-System.Web.html,class-status-System.Web.src,cm/cormissing.css,cm/cormissing.js
1,C# Compiler,c-sharp.html,c-sharp.src
1,Debugging,jit-debug.html,jit-debug.src
2,Example 1,jit-debug-sample.html,jit-debug-sample.src
2,Example 2,jit-debug-sample2.html,jit-debug-sample2.src
1,Status,status.html,status.src
0,Download,download.html,download.src
1,CVS access,ccvs.html,ccvs.src
@@ -22,10 +25,16 @@
1,Test Suite,testing.html,testing.src
1,Tools,tools.html,tools.src
1,Porting,porting.html,porting.src
0,Plans,plans.html,plans.src
1,ADO.NET,ado-net.html,ado-net.src
1,ASP.NET,asp-net.html,asp-net.src
1,Java,java.html,java.src
1,Windows.Forms,winforms.html,winforms.src
0,Resources,resources.html,resources.src
1,Mailing Lists,mailing-lists.html,mailing-lists.src
1,Ideas,ideas.html,ideas.src
1,Passport,passport.html,passport.src
1,Books,books.html,books.src
1,Papers,papers.html,papers.src
1,Languages,languages.html,languages.src
0,Contact,contact.html,contact.src
+2
View File
@@ -123,6 +123,8 @@
.s_ .r_,
.s_ .x,
.s_ .x_,
.s_ .i,
.s_ .i_,
.e_ .r,
.e_ .r_,
+11 -15
View File
@@ -61,24 +61,20 @@ function getChildrenByTagName (elt, strTag)
function viewAll (elt, dictTypes)
{
var fView = false;
var rgElts = getChildrenByTagName (elt, 'DIV');
var cElts = rgElts.length;
if (cElts == 0)
var rgImages = getChildrenByTagName (elt, 'IMG');
var cImages = rgImages.length;
for (var iImage = 0; iImage < cImages; iImage++)
{
var rgImages = getChildrenByTagName (elt, 'IMG');
var cImages = rgImages.length;
for (var iImage = 0; iImage < cImages; iImage++)
var strImage = trimSrc (rgImages [iImage].src);
if (dictTypes [strImage])
{
var image = rgImages [iImage];
var strImage = trimSrc (rgImages [iImage].src);
if (dictTypes [strImage])
{
fView = true;
break;
}
fView = true;
break;
}
}
else
var rgElts = getChildrenByTagName (elt, 'DIV');
var cElts = rgElts.length;
if (cElts != 0)
{
var iElt;
for (iElt = 0; iElt < cElts; iElt ++)
@@ -322,7 +318,7 @@ function filterTree ()
dictTypes ['se'] = true;
if (eltExtra.checked)
dictTypes ['sx'] = true;
dictTypes ['sc'] = true;
// dictTypes ['sc'] = true;
viewAll (document.getElementById ('ROOT'), dictTypes);
}
+14 -4
View File
@@ -3,11 +3,13 @@ CSCRIPT = $(SYSTEMROOT)/system32/cscript.exe
CORCOMPARE=../../../mcs/tools/corcompare
OBJECTS= \
deploy/ado-net.html \
deploy/anoncvs.html \
deploy/asp-net.html \
deploy/books.html \
deploy/contributing.html \
deploy/class-status.html \
deploy/class-status-corlib.html \
deploy/class-status-System.html \
deploy/class-status-System.Xml.html \
deploy/class-status-System.Data.html \
deploy/class-status-System.Web.html \
@@ -22,19 +24,27 @@ OBJECTS= \
deploy/gcc-frontend.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/monodoc-xml.html \
deploy/papers.html \
deploy/passport.html \
deploy/plans.html \
deploy/porting.html \
deploy/rationale.html \
deploy/resources.html \
deploy/roadmap.html \
deploy/runtime.html \
deploy/status.html \
deploy/testing.html \
deploy/porting.html \
deploy/tools.html \
deploy/books.html \
deploy/papers.html
deploy/winforms.html
# deploy/class-status-System.html \
NON_HTML_SOURCES= \
../mono-build.sh \
+90
View File
@@ -0,0 +1,90 @@
* System.Windows.Forms
System.Windows.Forms eventually will support multiple
toolkits. Ximian will be delivering a product that will allow
for System.Windows.Forms applications to integrate with GNOME
through Gtk and MacOS X using Cocoa.
There are no current plans to support embedded devices, but
Gtk/FrameBuffer is an option. If you have suggestions or
recommendations, please let us <a
href="mailto:[email protected]">let us know</a>
* Contributing
Currently Ximian developers are busy making our JIT engine
feature complete, and dealing with the low-level details of
the Mono runtime.
If you are interested in contributing, you can start stubbing
out classes and providing enumerations. That will help us
significantly when we start working on the actual bindings.
Christian Meyer is currently organizing this effort.
* System.Drawing
Using existing libraries to implement some of the functionality required
<ul>
* gdk-pixbuf is a generic image loader that loads an image
and leaves it into an RGB buffer. It hides all the details
about what image file format is being loaded.
* Libart is a general framework for rendering RGB/RGBA
buffers into RGB buffers and rendering postscript-like paths into
RGB/RGBA buffers.
</ul>
We want to use gdk-pixbuf as the image loader for the image
classes, and then we need operations to render that into the
windowing system (Gtk+, MacOS, etc). But notice how there is
very little dependnecies in Gdk-pixbuf on gtk, and libart has
none.
They are pretty independent from a windowing system
(gdk-pixbuf comes with some "helper" routines for rendering
data into a pixmap and to load pixmaps into RGB buffers).
A few things to keep in mind:
<ul>
* gdk-pixbuf can be used to load images for Gtk+,
MacOS X and Windows, it should be pretty portable,
although we might need in the future to back-port
some new features from Gtk head.
* Libart is probably only going to be used with X11,
as the MacOS X provides the same features in Quartz,
and Win32 *probably* has that in GDI+. If not, we
should use libart in Win32 as well (or for older
Windows systems).
</ul>
* Directory Layout
System.Drawing (assembly directory)
System.Drawing.Blah
Common code for "Blah"
Stubs for "Blah" to ease ports.
Gtk
System.Drawing.Blah.
Gtk ports of "System.Drawing.Blah"
MacOS
System.Drawing.Blah
MacOS ports of "System.Drawing.Blah"
Win32
System.Drawing.Blah
Win32 ports of "System.Drawing.Blah"
Then we use nant targets to include/exclude the right set of
files to create the assembly.
* Open questions:
I believe that the graphics contexts that are used to render
can accept either libart-like rendering operations and
X11-like rendering operations. This complicates matters, but
I am not sure. Someone needs to investigate this.
+3
View File
@@ -0,0 +1,3 @@
EXTRA_DIST = gc-issues jit-thoughts object-layout unmanaged-calls \
exceptions jit-trampolines stack-alignment
+31
View File
@@ -0,0 +1,31 @@
* GC issues you need to be careful about when hacking on the mono runtime.
mono currently uses the Boehm garbage collection library. This is a conservative
GC package: this means that the memory is searched for possible memory references
to chunks allocated with the GC. Not all the memory is searched, but only the memory
allocated with the GC itself (unless you use the 'atomic' variant of the allocation
routines), the stack and global variables. Also, if the last reference to an object
is stored in an area of themory that is not searched, the object may be freed resulting
in memory corruption ind segfaults.
In particular, memory allocated with system's malloc() is not searched, so you need to be
careful NOT to store object references in memory allocated with malloc() (unless you are sure
that the object reference will be live at the same time in some other area under the control
of the GC (on the stack or in a global variable, for example). Since g_malloc()
ultimately calls system malloc() the data structures in GLib are not safe to
use to store object references.
Occasionally, you'll need to store some object reference from C code: in this case,
you must make sure that the store location is searched by the GC. You can safely
use thread local storage areas, global variables, stack variables. If you need a more
complicated data structure, you can use a hash table: MonoGHashTable.
This hash table has the same interface as GHashTable from GLib, just stick the "mono_"
prefix in function calls and the "Mono" prefix in the hash table type name.
This hash table ensures that object references stored in it are tracked by the GC, as long
as the pointer to the hash is tracked itself.
Other data structures that are allocated with the GC and are safe to use to store pointers
to GC-allocated memory, are MonoDomain (keeps track of many domain specfic objects)
and MonoVTable (referenced by MonoDomain: keeps track of the static data of a type
since that can hold references to objects).
+59
View File
@@ -0,0 +1,59 @@
* How to map C# types for use in the C implementation of internal calls
C# type C type
char gunichar2
bool MonoBoolean
sbyte signed char
byte guchar
short gint16
ushort guint16
int gint32
uint guint32
long gint64
ulong guint64
IntPtr/UIntPtr gpointer
object MonoObject*
string MonoString*
For ref and out paramaters you'll use the corresponding pointer type.
Arrays of any type must be described with a MonoArray* and the elements
must be accessed with the mono_array_* macros.
Any other type that has a matching C structure representation, should use
a pointer to the struct instead of a generic MonoObject pointer.
Instance methods that are internal calls will receive as first argument
the instance object, so you must account for it in the C method signature:
[MethodImplAttribute(MethodImplOptions.InternalCall)]
public extern override int GetHashCode ();
becaomes:
gint32 ves_icall_System_String_GetHashCode (MonoString *this);
* How to hook internal calls with the runtime
Once you require an internal call in corlib, you need to create a C
implementation for it and register it in a static table in metadata/icall.c.
Add an entry in the table like:
"System.String::GetHashCode", ves_icall_System_String_GetHashCode,
Note that you need to include the full namespace.name of the class.
If there are overloaded methods, you need also to specify the signature
of _all_ of them:
[MethodImplAttribute(MethodImplOptions.InternalCall)]
public extern override void DoSomething ();
[MethodImplAttribute(MethodImplOptions.InternalCall)]
public extern override void DoSomething (bool useful);
should be mapped with:
"Namespace.ClassName::DoSomething()", ves_icall_Namespace_ClassName_DoSomething,
"Namespace.ClassName::DoSomething(bool)", ves_icall_Namespace_ClassName_DoSomething_bool,
-73
View File
@@ -1,73 +0,0 @@
How to use the debug support in the jit.
----------------------------------------
You need to run mono inside gdb. The following command line swicthes
are available:
--stabs
--dwarf
--debug className:methodName
--stabs will create an assemblyname-stabs.s file for each assembly the
CLR program uses. Note that to properly display source code lines,
you need to disassemble the CLR executables with monodis before running
mono. Each IL assembly file needs to have the name <assemblyname>.il.
--dwarf will create an assemblyname-dwarf.s file for each assembly the
CLR program uses. Note that to properly display source code lines,
you need to disassemble the CLR executables with monodis before running
mono. Each IL assembly file needs to have the name <assemblyname>.il.
--debug className:methodName will insert a breakpoin at the beginning of
methodName's code, so that control is trasnfered to the debugger as soon
as it is entered. You may use this switch multiple times.
So, suppose you use the --debug switch, or hit a segfault inside a
jitted method. In a shell you need to compile the stab/dwarf information
created with the --stabs or --dwarf option with the assembler:
as assemblyname-stabs.s -o assemblyname-stabs.o
or
as assemblyname-dwarf.s -o assemblyname-dwarf.o
Now, inside gdb, you can load the debug information with:
add-symbol-file assemblyname-stabs.o 0
or
add-symbol-file assemblyname-dwarf.o 0
And at this point the debugger should be able to print a correct
backtrace, you should be able to inspect method parameters and local
variables, disassemble methods and step through the code.
Using the DWARF 2 debugging format (with the --dwarf) argument is the
recommended one since it supports source files with more than 65.536
lines (for instance corlib.il) and you'll also get much better type
support with it. [FIXME: I'm still working on this, but it's already
making good progress. Martin].
However, some systems or debuggers may not support the DWARF 2 format,
in this case just use stabs.
Note that apparently you can't unload a symbol file from gdb, so you
need to restart it if you restart the program to debug.
Name mangling.
-------------
Currently CLR methods are exposed as C functions, so, if they are not
static, their first argument will be called 'this'.
Method names are mangled in the following way: a long name is created
concatting namespace, class name and method name. '.' chars are changed
to underscaore '_'. To allow for overloading, the address of the
MonoMethod from wich the method was created is appended to the end of
the name (i's also handy since you can use the address in gdb to inspect
the MonoMethod).
[This will change with DWARF 2 since this format is capable of storing
the full type name as it's seen by the programming language and doesn't
need any mangling. Martin]
+1 -1
View File
@@ -1,4 +1,4 @@
man_MANS = mcs.1 mono.1
man_MANS = mcs.1 mono.1 monostyle.1
EXTRA_DIST = $(man_MANS)
+7 -1
View File
@@ -11,7 +11,7 @@ mono \- Mono ECMA-CLI Just in Time compiler.
.PP
.B mono
[\-\-help] [\-d] [\-\-debug-asm] [\-\-debug-forest] [\-\-trace-calls]
[\-\-stabs] [\-\-compile cname] [\-\-ncompile num] [\-\-debug]
[\-\-stabs] [\-\-compile cname] [\-\-ncompile num] [\-\-debug] [\-\-noinline] [\-\-profile]
program.exe [arguments...]
.SH DESCRIPTION
The \fImono\fP program is a Just in Time compiler for ECMA CLI byte
@@ -68,6 +68,12 @@ Compiles the method on the given class (namespace.name:methodname).
.I "--ncompile"
Compiles the method a number of times. If no argument is specified,
the method will be compiled a thousand times.
.TP
.I "--noinline"
Disables the code inliner.
.TP
.I "--profile"
Collect profiling information and dump it at the end of the process.
.SH FILES
Assemblies are lodaed from the installation lib directory. If you set
`prefix' to /usr, the assemblies will be located in /usr/lib.
+43
View File
@@ -0,0 +1,43 @@
.\"
.\" monostyle manual page.
.\" (C) Adam Treat ([email protected])
.\"
.TH monostyle 1
.SH NAME
monostyle \- Mono's C# code beautifier.
.SH SYNOPSIS
.PP
.B monostyle
-f file.cs -l <true|false> > output.cs
.SH DESCRIPTION
monostyle will parse a C# source code file and correct brace formatting
reflective of the Mono Project's coding standard. To use: invoke monostyle
by passing a C# source code file with '-f file.cs' and specify whether to
use linespacing with '-l <true|false>. To output to a file just redirect
with '>'.
.PP
Mono's Coding Standard
.PP
* The opening brace following a namespace, class, struct, enum, property or
flow control unit should be at the end of the declaration line.
.PP
* The opening brace for a function should be on the line following the function.
.PP
* Please use white space around operators and a space between function names
and their parameters.
.SH OPTIONS
.TP
.I \-\-file
The csharp source file to parse.
.TP
.I \-\-line
Specifies wether to use line spacing.
.PP
.SH AUTHORS
Adam Treat ([email protected])
.PP
.SH LICENSE
MonoStyle is released under the terms of the GNU GPL.
.PP
.SH SEE ALSO
mono(1), mint(1)
+1
View File
@@ -2,6 +2,7 @@ C# Compiler:
Miguel de Icaza ([email protected])
Class Libraries:
Patrik Torstensson <[email protected]>
Gaurav Vaish <[email protected]>
Jeff Stedfast ([email protected])
Joe Shaw ([email protected])
@@ -35,36 +35,85 @@ namespace Mono.CSharp.Debugger
public int WriteLabel ()
{
int index = GetNextLabelIndex ();
int index = ++next_anon_label_idx;
WriteLabel (index);
return index;
}
public string GetLabelName (int index)
{
return index.ToString ();
}
public void WriteLabel (int index)
{
WriteLabel (GetLabelName (index));
char[] output = { '.', 'L', '_', '\0', '\0', '\0', '\0', '\0', '\0',
':', '\n' };
unchecked {
int value = (int) index;
output [3] = hex [(value & 0xf00000) >> 20];
output [4] = hex [(value & 0x0f0000) >> 16];
output [5] = hex [(value & 0x00f000) >> 12];
output [6] = hex [(value & 0x000f00) >> 8];
output [7] = hex [(value & 0x0000f0) >> 4];
output [8] = hex [(value & 0x00000f)];
}
writer.Write (output, 0, output.Length);
}
private static readonly char[] hex = { '0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
public void WriteUInt8 (bool value)
{
writer.WriteLine ("\t.byte\t\t" + (value ? 1 : 0));
WriteUInt8 (value ? 1 : 0);
}
public void WriteUInt8 (int value)
{
writer.WriteLine ("\t.byte\t\t" + value);
char[] output = { '\t', '.', 'b', 'y', 't', 'e', '\t', '\t',
'0', 'x', '\0', '\0',
'\n' };
unchecked {
output [10] = hex [(value & 0xf0) >> 4];
output [11] = hex [value & 0x0f];
}
writer.Write (output, 0, output.Length);
}
public void WriteInt8 (int value)
{
writer.WriteLine ("\t.byte\t\t" + value);
char[] output = { '\t', '.', 'b', 'y', 't', 'e', '\t', '\t',
'0', 'x', '\0', '\0',
'\n' };
unchecked {
uint uvalue = (uint) value;
output [10] = hex [(uvalue & 0xf0) >> 4];
output [11] = hex [uvalue & 0x0f];
}
writer.Write (output, 0, output.Length);
}
public void Write2Bytes (int a, int b)
{
char[] output = { '\t', '.', 'b', 'y', 't', 'e', '\t', '\t',
'0', 'x', '\0', '\0', ',', ' ',
'0', 'x', '\0', '\0',
'\n' };
unchecked {
uint ua = (uint) a;
uint ub = (uint) b;
output [10] = hex [(ua & 0xf0) >> 4];
output [11] = hex [ua & 0x0f];
output [16] = hex [(ub & 0xf0) >> 4];
output [17] = hex [ub & 0x0f];
}
writer.Write (output, 0, output.Length);
}
public void WriteUInt16 (int value)
@@ -79,12 +128,43 @@ namespace Mono.CSharp.Debugger
public void WriteUInt32 (int value)
{
writer.WriteLine ("\t.long\t\t" + value);
char[] output = { '\t', '.', 'l', 'o', 'n', 'g', '\t', '\t',
'0', 'x', '\0', '\0', '\0', '\0', '\0', '\0',
'\0', '\0', '\n' };
unchecked {
output [10] = hex [(value & 0xf0000000) >> 28];
output [11] = hex [(value & 0x0f000000) >> 24];
output [12] = hex [(value & 0x00f00000) >> 20];
output [13] = hex [(value & 0x000f0000) >> 16];
output [14] = hex [(value & 0x0000f000) >> 12];
output [15] = hex [(value & 0x00000f00) >> 8];
output [16] = hex [(value & 0x000000f0) >> 4];
output [17] = hex [(value & 0x0000000f)];
}
writer.Write (output, 0, output.Length);
}
public void WriteInt32 (int value)
{
writer.WriteLine ("\t.long\t\t" + value);
char[] output = { '\t', '.', 'l', 'o', 'n', 'g', '\t', '\t',
'0', 'x', '\0', '\0', '\0', '\0', '\0', '\0',
'\0', '\0', '\n' };
unchecked {
uint uvalue = (uint) value;
output [10] = hex [(uvalue & 0xf0000000) >> 28];
output [11] = hex [(uvalue & 0x0f000000) >> 24];
output [12] = hex [(uvalue & 0x00f00000) >> 20];
output [13] = hex [(uvalue & 0x000f0000) >> 16];
output [14] = hex [(uvalue & 0x0000f000) >> 12];
output [15] = hex [(uvalue & 0x00000f00) >> 8];
output [16] = hex [(uvalue & 0x000000f0) >> 4];
output [17] = hex [(uvalue & 0x0000000f)];
}
writer.Write (output, 0, output.Length);
}
public void WriteSLeb128 (int value)
@@ -99,7 +179,10 @@ namespace Mono.CSharp.Debugger
public void WriteAddress (int value)
{
writer.WriteLine ("\t.long\t\t" + value);
if (value == 0)
writer.WriteLine ("\t.long\t\t0");
else
writer.WriteLine ("\t.long\t\t" + value);
}
public void WriteString (string value)
@@ -117,14 +200,56 @@ namespace Mono.CSharp.Debugger
writer.WriteLine ("\t.previous\n");
}
public void WriteRelativeOffset (string start_label, string end_label)
public void WriteRelativeOffset (int start_label, int end_label)
{
writer.WriteLine ("\t.long\t\t.L_" + end_label + " - .L_" + start_label);
char[] output = { '\t', '.', 'l', 'o', 'n', 'g', '\t', '\t',
'.', 'L', '_', '\0', '\0', '\0', '\0', '\0', '\0',
' ', '-', ' ',
'.', 'L', '_', '\0', '\0', '\0', '\0', '\0', '\0',
'\n' };
unchecked {
output [11] = hex [(end_label & 0xf00000) >> 20];
output [12] = hex [(end_label & 0x0f0000) >> 16];
output [13] = hex [(end_label & 0x00f000) >> 12];
output [14] = hex [(end_label & 0x000f00) >> 8];
output [15] = hex [(end_label & 0x0000f0) >> 4];
output [16] = hex [(end_label & 0x00000f)];
output [23] = hex [(start_label & 0xf00000) >> 20];
output [24] = hex [(start_label & 0x0f0000) >> 16];
output [25] = hex [(start_label & 0x00f000) >> 12];
output [26] = hex [(start_label & 0x000f00) >> 8];
output [27] = hex [(start_label & 0x0000f0) >> 4];
output [28] = hex [(start_label & 0x00000f)];
}
writer.Write (output, 0, output.Length);
}
public void WriteShortRelativeOffset (string start_label, string end_label)
public void WriteShortRelativeOffset (int start_label, int end_label)
{
writer.WriteLine ("\t.byte\t\t.L_" + end_label + " - .L_" + start_label);
char[] output = { '\t', '.', 'b', 'y', 't', 'e', '\t', '\t',
'.', 'L', '_', '\0', '\0', '\0', '\0', '\0', '\0',
' ', '-', ' ',
'.', 'L', '_', '\0', '\0', '\0', '\0', '\0', '\0',
'\n' };
unchecked {
output [11] = hex [(end_label & 0xf00000) >> 20];
output [12] = hex [(end_label & 0x0f0000) >> 16];
output [13] = hex [(end_label & 0x00f000) >> 12];
output [14] = hex [(end_label & 0x000f00) >> 8];
output [15] = hex [(end_label & 0x0000f0) >> 4];
output [16] = hex [(end_label & 0x00000f)];
output [23] = hex [(start_label & 0xf00000) >> 20];
output [24] = hex [(start_label & 0x0f0000) >> 16];
output [25] = hex [(start_label & 0x00f000) >> 12];
output [26] = hex [(start_label & 0x000f00) >> 8];
output [27] = hex [(start_label & 0x0000f0) >> 4];
output [28] = hex [(start_label & 0x00000f)];
}
writer.Write (output, 0, output.Length);
}
public void WriteAbsoluteOffset (string label)
@@ -132,12 +257,31 @@ namespace Mono.CSharp.Debugger
writer.WriteLine ("\t.long\t\t.L_" + label);
}
public void WriteAbsoluteOffset (int index)
{
char[] output = { '\t', '.', 'l', 'o', 'n', 'g', '\t', '\t',
'.', 'L', '_', '\0', '\0', '\0', '\0', '\0', '\0',
'\n' };
unchecked {
output [11] = hex [(index & 0xf00000) >> 20];
output [12] = hex [(index & 0x0f0000) >> 16];
output [13] = hex [(index & 0x00f000) >> 12];
output [14] = hex [(index & 0x000f00) >> 8];
output [15] = hex [(index & 0x0000f0) >> 4];
output [16] = hex [(index & 0x00000f)];
}
writer.Write (output, 0, output.Length);
}
public object StartSubsectionWithSize ()
{
int start_index = GetNextLabelIndex ();
int end_index = GetNextLabelIndex ();
int start_index = ++next_anon_label_idx;
int end_index = ++next_anon_label_idx;
WriteRelativeOffset (GetLabelName (start_index), GetLabelName (end_index));
WriteRelativeOffset (start_index, end_index);
WriteLabel (start_index);
return end_index;
@@ -145,10 +289,10 @@ namespace Mono.CSharp.Debugger
public object StartSubsectionWithShortSize ()
{
int start_index = GetNextLabelIndex ();
int end_index = GetNextLabelIndex ();
int start_index = ++next_anon_label_idx;
int end_index = ++next_anon_label_idx;
WriteShortRelativeOffset (GetLabelName (start_index), GetLabelName (end_index));
WriteShortRelativeOffset (start_index, end_index);
WriteLabel (start_index);
return end_index;
@@ -160,4 +304,3 @@ namespace Mono.CSharp.Debugger
}
}
}
+30
View File
@@ -1,3 +1,33 @@
2002-04-13 Martin Baulig <[email protected]>
* IMonoSymbolWriter.cs (ISourceBlock): Added `Blocks' property and `AddBlock'
method to support nested blocks.
* MonoSymbolWriter.cs: Correctly handle nested blocks.
* MonoDwarfFileWriter.cs (DieMember): Provide info for all fields, not just for
public ones; also added DW_AT_accessibility.
(DieVariable): Reflected latest debug-symfile.c changes.
2002-04-12 Martin Baulig <[email protected]>
* gdb-variable-scopes.patch: A patch for GDB (against the latest CVS version)
to implement variable lifetimes.
2002-04-12 Martin Baulig <[email protected]>
* MonoDwarfFileWriter.cs (DieVariable): Provide info about the variable's
lifetime using DW_AT_begin_scope and a new baulig extension DW_AT_end_scope.
2002-03-29 Martin Baulig <[email protected]>
* AssemblerWriterI386.cs: Rewrote most of the string output function, do the
number->string conversion manually. It's now taking about 15 seconds to write
a symbol file for MCS, no longer more than a minute.
* MonoDwarfFileWriter.cs: Added some profiling code, speeded things up, fixed
a few bugs.
2002-03-25 Martin Baulig <[email protected]>
* MonoDwarfFileWriter.cs (CreateType): Return a `DieType'.
@@ -19,8 +19,6 @@ namespace Mono.CSharp.Debugger
{
int GetNextLabelIndex ();
string GetLabelName (int index);
void WriteLabel (int index);
void WriteLabel (string label);
@@ -33,6 +31,8 @@ namespace Mono.CSharp.Debugger
void WriteInt8 (int value);
void Write2Bytes (int a, int b);
void WriteUInt16 (int value);
void WriteInt16 (int value);
@@ -53,9 +53,11 @@ namespace Mono.CSharp.Debugger
void WriteSectionEnd ();
void WriteRelativeOffset (string start_label, string end_label);
void WriteRelativeOffset (int start_label, int end_label);
void WriteShortRelativeOffset (string start_label, string end_label);
void WriteShortRelativeOffset (int start_label, int end_label);
void WriteAbsoluteOffset (int index);
void WriteAbsoluteOffset (string label);
@@ -86,6 +86,12 @@ namespace Mono.CSharp.Debugger
void AddLocal (ILocalVariable local);
ISourceBlock[] Blocks {
get;
}
void AddBlock (ISourceBlock block);
ISourceLine Start {
get;
}
@@ -16,6 +16,7 @@ using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Diagnostics.SymbolStore;
using System.Collections;
using System.Text;
using System.IO;
namespace Mono.CSharp.Debugger
@@ -30,6 +31,9 @@ namespace Mono.CSharp.Debugger
protected IAssemblerWriter aw = null;
protected string symbol_file = null;
public bool timestamps = true;
public bool use_gnu_extensions = false;
// Write a generic file which contains no machine dependant stuff but
// only function and type declarations.
protected readonly bool DoGeneric = false;
@@ -40,21 +44,48 @@ namespace Mono.CSharp.Debugger
public DwarfFileWriter (string symbol_file)
{
this.symbol_file = symbol_file;
this.writer = new StreamWriter (symbol_file);
this.writer = new StreamWriter (symbol_file, false, Encoding.ASCII);
this.aw = new AssemblerWriterI386 (this.writer);
this.last_time = DateTime.Now;
}
DateTime last_time;
void ShowTime (string msg)
{
DateTime now = DateTime.Now;
TimeSpan span = now - last_time;
last_time = now;
Console.WriteLine (
"MonoDwarfFileWriter [{0:00}:{1:000}] {2}",
(int) span.TotalSeconds, span.Milliseconds, msg);
}
// Writes the final dwarf file.
public void Close ()
{
if (timestamps)
ShowTime ("Emitting compile units");
foreach (CompileUnit compile_unit in compile_units)
compile_unit.Emit ();
if (timestamps)
ShowTime ("Done");
foreach (LineNumberEngine line_number_engine in line_number_engines)
line_number_engine.Emit ();
if (timestamps)
ShowTime ("Done emitting " + LineNumberEngine.count + " line numbers");
WriteAbbrevDeclarations ();
if (timestamps)
ShowTime ("Done writing abbrev declarations");
WriteRelocEntries ();
if (timestamps)
ShowTime ("Done writing " + reloc_entries.Count + " reloc entries");
writer.Close ();
}
@@ -104,7 +135,9 @@ namespace Mono.CSharp.Debugger
else if (type.IsClass)
return new DieClassType (die_compile_unit, type);
throw new NotSupportedException ("Type " + type + " is not yet supported.");
return new DiePointerType (die_compile_unit, typeof (void));
// throw new NotSupportedException ("Type " + type + " is not yet supported.");
}
//
@@ -117,10 +150,7 @@ namespace Mono.CSharp.Debugger
protected string source_file;
protected ArrayList dies = new ArrayList ();
private static int next_ref_index = 0;
public readonly int ReferenceIndex;
public readonly string ReferenceLabel;
public CompileUnit (DwarfFileWriter dw, string source_file, Die[] dies)
{
@@ -130,8 +160,7 @@ namespace Mono.CSharp.Debugger
if (dies != null)
this.dies.AddRange (dies);
this.ReferenceIndex = ++next_ref_index;
this.ReferenceLabel = "COMPILE_UNIT_" + this.ReferenceIndex;
this.ReferenceIndex = this.aw.GetNextLabelIndex ();
dw.AddCompileUnit (this);
}
@@ -178,7 +207,7 @@ namespace Mono.CSharp.Debugger
dw.WriteSectionStart (Section.DEBUG_INFO);
aw.WriteLabel (ReferenceLabel);
aw.WriteLabel (ReferenceIndex);
start_index = aw.WriteLabel ();
@@ -205,7 +234,6 @@ namespace Mono.CSharp.Debugger
public class LineNumberEngine
{
public readonly int ReferenceIndex;
public readonly string ReferenceLabel;
public readonly int LineBase = 1;
public readonly int LineRange = 8;
@@ -219,6 +247,8 @@ namespace Mono.CSharp.Debugger
public readonly int OpcodeBase;
public static int count = 0;
private Hashtable _sources = new Hashtable ();
private Hashtable _directories = new Hashtable ();
private Hashtable _methods = new Hashtable ();
@@ -226,7 +256,6 @@ namespace Mono.CSharp.Debugger
private int next_source_id;
private int next_directory_id;
private static int next_ref_index;
private int next_method_id;
private enum DW_LNS {
@@ -248,7 +277,6 @@ namespace Mono.CSharp.Debugger
LNE_define_file = 3
};
public ISourceFile[] Sources {
get {
ISourceFile[] retval = new ISourceFile [_sources.Count];
@@ -287,8 +315,7 @@ namespace Mono.CSharp.Debugger
{
this.dw = writer;
this.aw = writer.AssemblerWriter;
this.ReferenceIndex = ++next_ref_index;
this.ReferenceLabel = "DEBUG_LINE_" + this.ReferenceIndex;
this.ReferenceIndex = aw.GetNextLabelIndex ();
dw.AddLineNumberEngine (this);
}
@@ -328,7 +355,6 @@ namespace Mono.CSharp.Debugger
}
private int st_line = 1;
private int st_address = 0;
private void SetLine (int line)
{
@@ -345,7 +371,6 @@ namespace Mono.CSharp.Debugger
dw.AddRelocEntry (RelocEntryType.IL_OFFSET, token, address);
aw.WriteAddress (0);
aw.EndSubsection (end_index);
st_address = address;
}
private void SetStartAddress (int token)
@@ -380,7 +405,6 @@ namespace Mono.CSharp.Debugger
aw.WriteUInt8 ((int) DW_LNE.LNE_end_sequence);
st_line = 1;
st_address = 0;
}
private void Commit ()
@@ -388,10 +412,27 @@ namespace Mono.CSharp.Debugger
aw.WriteUInt8 ((int) DW_LNS.LNS_copy);
}
private void WriteOneLine (int token, int line, int offset)
{
aw.WriteInt8 ((int) DW_LNS.LNS_advance_line);
aw.WriteSLeb128 (line - st_line);
aw.WriteUInt8 (0);
object end_index = aw.StartSubsectionWithShortSize ();
aw.WriteUInt8 ((int) DW_LNE.LNE_set_address);
dw.AddRelocEntry (RelocEntryType.IL_OFFSET, token, offset);
aw.WriteAddress (0);
aw.EndSubsection (end_index);
aw.Write2Bytes ((int) DW_LNS.LNS_set_basic_block,
(int) DW_LNS.LNS_copy);
st_line = line;
}
public void Emit ()
{
dw.WriteSectionStart (Section.DEBUG_LINE);
aw.WriteLabel (ReferenceLabel);
aw.WriteLabel (ReferenceIndex);
object end_index = aw.StartSubsectionWithSize ();
aw.WriteUInt16 (2);
@@ -430,10 +471,12 @@ namespace Mono.CSharp.Debugger
Commit ();
foreach (ISourceLine line in method.Lines) {
SetLine (line.Row);
SetAddress (method.Token, line.Offset);
SetBasicBlock ();
Commit ();
count++;
WriteOneLine (method.Token, line.Row, line.Offset);
// SetLine (line.Row);
// SetAddress (method.Token, line.Offset);
// SetBasicBlock ();
// Commit ();
}
SetLine (method.End.Row);
@@ -479,16 +522,21 @@ namespace Mono.CSharp.Debugger
AT_low_pc = 0x11,
AT_high_pc = 0x12,
AT_language = 0x13,
AT_string_length = 0x19,
AT_const_value = 0x1c,
AT_lower_bound = 0x22,
AT_producer = 0x25,
AT_start_scope = 0x2c,
AT_upper_bound = 0x2f,
AT_accessibility = 0x32,
AT_artificial = 0x34,
AT_data_member_location = 0x38,
AT_declaration = 0x3c,
AT_encoding = 0x3e,
AT_external = 0x3f,
AT_type = 0x49
AT_type = 0x49,
AT_data_location = 0x50,
AT_end_scope = 0x2121
}
// DWARF form from the DWARF 2 specification.
@@ -499,13 +547,14 @@ namespace Mono.CSharp.Debugger
FORM_string = 0x08,
FORM_data1 = 0x0b,
FORM_flag = 0x0c,
FORM_sdata = 0x0d,
FORM_udata = 0x0f,
FORM_ref4 = 0x13
}
public enum DW_LANG {
LANG_C_plus_plus = 0x04,
LANG_C_sharp = LANG_C_plus_plus
LANG_C_sharp = 0x9001
}
public enum DW_OP {
@@ -525,6 +574,12 @@ namespace Mono.CSharp.Debugger
OP_fbreg = 0x91,
}
public enum DW_ACCESS {
ACCESS_public = 1,
ACCESS_protected = 2,
ACCESS_private = 3
};
protected enum MRI_string {
offset_length = 0x00,
offset_vector = 0x01
@@ -600,13 +655,10 @@ namespace Mono.CSharp.Debugger
protected ArrayList child_dies = new ArrayList ();
public readonly Die Parent;
private static int next_ref_index = 0;
protected readonly int abbrev_id;
protected readonly AbbrevDeclaration abbrev_decl;
public readonly int ReferenceIndex;
public readonly string ReferenceLabel;
//
// Create a new die If @parent is not null, add the newly
@@ -625,8 +677,7 @@ namespace Mono.CSharp.Debugger
this.Parent = parent;
this.abbrev_id = abbrev_id;
this.abbrev_decl = GetAbbrevDeclaration (abbrev_id);
this.ReferenceIndex = ++next_ref_index;
this.ReferenceLabel = "DIE_" + this.ReferenceIndex;
this.ReferenceIndex = this.aw.GetNextLabelIndex ();
if (parent != null)
parent.AddChildDie (this);
@@ -663,7 +714,7 @@ namespace Mono.CSharp.Debugger
//
public virtual void Emit ()
{
aw.WriteLabel (ReferenceLabel);
aw.WriteLabel (ReferenceIndex);
aw.WriteULeb128 (abbrev_id);
DoEmit ();
@@ -721,7 +772,7 @@ namespace Mono.CSharp.Debugger
AbbrevEntry[] entries = {
new AbbrevEntry (DW_AT.AT_name, DW_FORM.FORM_string),
new AbbrevEntry (DW_AT.AT_producer, DW_FORM.FORM_string),
new AbbrevEntry (DW_AT.AT_language, DW_FORM.FORM_data1),
new AbbrevEntry (DW_AT.AT_language, DW_FORM.FORM_udata),
new AbbrevEntry (DW_AT.AT_stmt_list, DW_FORM.FORM_ref4)
};
AbbrevDeclaration decl = new AbbrevDeclaration (
@@ -806,16 +857,19 @@ namespace Mono.CSharp.Debugger
throw new ArgumentException ("Target die must be in the same "
+ "compile unit");
aw.WriteRelativeOffset (CompileUnit.ReferenceLabel,
target_die.ReferenceLabel);
aw.WriteRelativeOffset (CompileUnit.ReferenceIndex,
target_die.ReferenceIndex);
}
public override void DoEmit ()
{
aw.WriteString (CompileUnit.SourceFile);
aw.WriteString (CompileUnit.ProducerID);
aw.WriteUInt8 ((int) DW_LANG.LANG_C_sharp);
aw.WriteAbsoluteOffset (LineNumberEngine.ReferenceLabel);
if (dw.use_gnu_extensions)
aw.WriteULeb128 ((int) DW_LANG.LANG_C_sharp);
else
aw.WriteULeb128 ((int) DW_LANG.LANG_C_plus_plus);
aw.WriteAbsoluteOffset (LineNumberEngine.ReferenceIndex);
}
}
@@ -1182,8 +1236,29 @@ namespace Mono.CSharp.Debugger
public DieEnumType (DieCompileUnit parent_die, Type type)
: base (parent_die, type, my_abbrev_id)
{
foreach (object value in Enum.GetValues (type))
new DieEnumerator (this, Enum.GetName (type, value), (int) value);
Array values = Enum.GetValues (type);
string[] names = Enum.GetNames (type);
foreach (object value in values) {
int intval;
string name = null;
if (value is int)
intval = (int) value;
else
intval = System.Convert.ToInt32 (value);
for (int i = 0; i < values.Length; ++i)
if (value.Equals (values.GetValue (i))) {
name = names [i];
break;
}
if (name == null)
throw new ArgumentException ();
new DieEnumerator (this, name, intval);
}
}
public override void DoEmit ()
@@ -1225,7 +1300,7 @@ namespace Mono.CSharp.Debugger
public override void DoEmit ()
{
aw.WriteString (name);
aw.WriteUInt32 (value);
aw.WriteInt32 (value);
}
}
@@ -1252,17 +1327,31 @@ namespace Mono.CSharp.Debugger
protected Die[] field_type_dies;
protected Die[] field_dies;
protected const BindingFlags FieldBindingFlags =
BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static |
BindingFlags.Instance;
public override void RegisterDependencyTypes ()
{
fields = type.GetFields ();
fields = type.GetFields (FieldBindingFlags);
field_type_dies = new Die [fields.Length];
field_dies = new Die [fields.Length];
for (int i = 0; i < fields.Length; i++) {
Type field_type = fields [i].FieldType;
field_type_dies [i] = DieCompileUnit.RegisterType (field_type);
DW_ACCESS access;
if (fields [i].IsPublic)
access = DW_ACCESS.ACCESS_public;
else if (fields [i].IsPrivate)
access = DW_ACCESS.ACCESS_private;
else
access = DW_ACCESS.ACCESS_protected;
field_dies [i] = new DieMember (this, type, fields [i].Name,
i, field_type_dies [i]);
i, field_type_dies [i],
access);
}
}
@@ -1338,20 +1427,26 @@ namespace Mono.CSharp.Debugger
public class DieStringType : DieStructureType
{
public override void RegisterDependencyTypes ()
{
Die length_die = DieCompileUnit.RegisterType (typeof (int));
new DieMember (this, typeof (MonoString), "Length",
(int) MRI_string.offset_length, length_die);
Die vector_die = new DieArrayType (DieCompileUnit, typeof (char), 1);
new DieSubRangeType (vector_die, typeof (int), 0, -1);
if (dw.use_gnu_extensions) {
Die string_die = new DieInternalString (DieCompileUnit);
Die vector_ptr_die = new DieInternalPointer (DieCompileUnit, vector_die);
new DieMember (this, typeof (MonoString), "String",
(int) MRI_string.offset_vector, string_die);
} else {
Die vector_die = new DieArrayType (DieCompileUnit, typeof (char), 1);
new DieSubRangeType (vector_die, typeof (int), 0, -1);
new DieMember (this, typeof (MonoString), "Vector",
(int) MRI_string.offset_vector, vector_ptr_die);
Die ptr_die = new DieInternalPointer (DieCompileUnit, vector_die);
new DieMember (this, typeof (MonoString), "Vector",
(int) MRI_string.offset_vector, ptr_die);
}
}
public DieStringType (DieCompileUnit parent_die, Type type)
@@ -1359,6 +1454,41 @@ namespace Mono.CSharp.Debugger
{ }
}
public class DieInternalString : Die
{
private static int my_abbrev_id;
static DieInternalString ()
{
AbbrevEntry[] entries = {
new AbbrevEntry (DW_AT.AT_string_length, DW_FORM.FORM_data4),
new AbbrevEntry (DW_AT.AT_byte_size, DW_FORM.FORM_data4),
new AbbrevEntry (DW_AT.AT_data_location, DW_FORM.FORM_data4)
};
AbbrevDeclaration decl = new AbbrevDeclaration (
DW_TAG.TAG_string_type, false, entries);
my_abbrev_id = RegisterAbbrevDeclaration (decl);
}
public DieInternalString (Die parent_die)
: base (parent_die, my_abbrev_id)
{ }
public override void DoEmit ()
{
dw.AddRelocEntry_TypeFieldOffset (typeof (MonoArray),
(int) MRI_array.offset_max_length);
aw.WriteInt32 (0);
dw.AddRelocEntry_TypeFieldSize (typeof (MonoArray),
(int) MRI_array.offset_max_length);
aw.WriteInt32 (0);
dw.AddRelocEntry_TypeFieldOffset (typeof (MonoArray),
(int) MRI_array.offset_vector);
aw.WriteInt32 (0);
}
}
protected class DieInternalArray : Die
{
@@ -1431,8 +1561,8 @@ namespace Mono.CSharp.Debugger
public override void DoEmit ()
{
DieCompileUnit.WriteRelativeDieReference (type_die);
aw.WriteUInt32 (lower);
aw.WriteUInt32 (upper);
aw.WriteInt32 (lower);
aw.WriteInt32 (upper);
}
}
@@ -1523,6 +1653,7 @@ namespace Mono.CSharp.Debugger
AbbrevEntry[] entries = {
new AbbrevEntry (DW_AT.AT_name, DW_FORM.FORM_string),
new AbbrevEntry (DW_AT.AT_type, DW_FORM.FORM_ref4),
new AbbrevEntry (DW_AT.AT_accessibility, DW_FORM.FORM_data1),
new AbbrevEntry (DW_AT.AT_data_member_location, DW_FORM.FORM_block4)
};
@@ -1536,21 +1667,30 @@ namespace Mono.CSharp.Debugger
protected string name;
protected int index;
protected Die type_die;
protected DW_ACCESS access;
public DieMember (Die parent_die, Type parent_type, string name, int index,
Die type_die)
Die type_die, DW_ACCESS access)
: base (parent_die, my_abbrev_id)
{
this.name = name;
this.index = index;
this.parent_type = parent_type;
this.type_die = type_die;
this.access = access;
}
public DieMember (Die parent_die, Type parent_type, string name, int index,
Die type_die)
: this (parent_die, parent_type, name, index, type_die,
DW_ACCESS.ACCESS_public)
{ }
public override void DoEmit ()
{
aw.WriteString (name);
DieCompileUnit.WriteRelativeDieReference (type_die);
aw.WriteUInt8 ((int) access);
object end_index = aw.StartSubsectionWithSize ();
aw.WriteUInt8 ((int) DW_OP.OP_const4u);
@@ -1592,9 +1732,6 @@ namespace Mono.CSharp.Debugger
int start_offset = block.Start.Offset;
int end_offset = block.End.Offset;
Console.WriteLine ("BLOCK: " + token + " " + start_offset + " " +
end_offset);
dw.AddRelocEntry (RelocEntryType.IL_OFFSET, token, start_offset);
aw.WriteAddress (0);
dw.AddRelocEntry (RelocEntryType.IL_OFFSET, token, end_offset);
@@ -1635,8 +1772,16 @@ namespace Mono.CSharp.Debugger
new AbbrevEntry (DW_AT.AT_type, DW_FORM.FORM_ref4),
new AbbrevEntry (DW_AT.AT_external, DW_FORM.FORM_flag),
new AbbrevEntry (DW_AT.AT_location, DW_FORM.FORM_block4),
new AbbrevEntry (DW_AT.AT_start_scope, DW_FORM.FORM_addr),
new AbbrevEntry (DW_AT.AT_end_scope, DW_FORM.FORM_addr)
};
AbbrevEntry[] entries_2 = {
new AbbrevEntry (DW_AT.AT_name, DW_FORM.FORM_string),
new AbbrevEntry (DW_AT.AT_type, DW_FORM.FORM_ref4),
new AbbrevEntry (DW_AT.AT_external, DW_FORM.FORM_flag),
new AbbrevEntry (DW_AT.AT_location, DW_FORM.FORM_block4),
};
AbbrevEntry[] entries_3 = {
new AbbrevEntry (DW_AT.AT_name, DW_FORM.FORM_string),
new AbbrevEntry (DW_AT.AT_type, DW_FORM.FORM_ref4),
new AbbrevEntry (DW_AT.AT_artificial, DW_FORM.FORM_flag),
@@ -1646,9 +1791,9 @@ namespace Mono.CSharp.Debugger
AbbrevDeclaration decl_local = new AbbrevDeclaration (
DW_TAG.TAG_variable, false, entries_1);
AbbrevDeclaration decl_param = new AbbrevDeclaration (
DW_TAG.TAG_formal_parameter, false, entries_1);
AbbrevDeclaration decl_this = new AbbrevDeclaration (
DW_TAG.TAG_formal_parameter, false, entries_2);
AbbrevDeclaration decl_this = new AbbrevDeclaration (
DW_TAG.TAG_formal_parameter, false, entries_3);
my_abbrev_id_local = RegisterAbbrevDeclaration (decl_local);
@@ -1677,6 +1822,10 @@ namespace Mono.CSharp.Debugger
DieCompileUnit.WriteRelativeDieReference (type_die);
switch (vtype) {
case VariableType.VARIABLE_LOCAL:
aw.WriteUInt8 (false);
DoEmitLocation ();
DoEmitScope ();
break;
case VariableType.VARIABLE_PARAMETER:
aw.WriteUInt8 (false);
DoEmitLocation ();
@@ -1689,6 +1838,7 @@ namespace Mono.CSharp.Debugger
}
protected abstract void DoEmitLocation ();
protected abstract void DoEmitScope ();
}
public class DieMethodVariable : DieVariable
@@ -1718,11 +1868,8 @@ namespace Mono.CSharp.Debugger
protected override void DoEmitLocation ()
{
object end_index = aw.StartSubsectionWithSize ();
// This looks a bit strange, but OP_fbreg takes a sleb128
// agument and we can't fields of variable size.
aw.WriteUInt8 ((int) DW_OP.OP_fbreg);
aw.WriteSLeb128 (0);
aw.WriteUInt8 ((int) DW_OP.OP_const4s);
// These relocation entries expect a location description
// of exactly 8 bytes.
switch (vtype) {
case VariableType.VARIABLE_LOCAL:
dw.AddRelocEntry (RelocEntryType.LOCAL_VARIABLE,
@@ -1737,13 +1884,28 @@ namespace Mono.CSharp.Debugger
method.Token, 0);
break;
}
// This looks a bit strange, but OP_fbreg takes a sleb128
// agument and we can't fields of variable size.
aw.WriteUInt8 ((int) DW_OP.OP_fbreg);
aw.WriteSLeb128 (0);
aw.WriteUInt8 ((int) DW_OP.OP_const4s);
aw.WriteInt32 (0);
aw.WriteUInt8 ((int) DW_OP.OP_plus);
aw.EndSubsection (end_index);
}
protected override void DoEmitScope ()
{
dw.AddRelocEntry (RelocEntryType.VARIABLE_START_SCOPE,
var.Token, var.Index);
aw.WriteAddress (0);
dw.AddRelocEntry (RelocEntryType.VARIABLE_END_SCOPE,
var.Token, var.Index);
aw.WriteAddress (0);
}
}
protected const int reloc_table_version = 7;
protected const int reloc_table_version = 9;
protected enum Section {
DEBUG_INFO = 0x01,
@@ -1829,7 +1991,12 @@ namespace Mono.CSharp.Debugger
MONO_ARRAY_SIZEOF = 0x0b,
MONO_ARRAY_OFFSET = 0x0c,
MONO_ARRAY_BOUNDS_SIZEOF = 0x0d,
MONO_ARRAY_BOUNDS_OFFSET = 0x0e
MONO_ARRAY_BOUNDS_OFFSET = 0x0e,
VARIABLE_START_SCOPE = 0x0f,
VARIABLE_END_SCOPE = 0x10,
MONO_STRING_FIELDSIZE = 0x11,
MONO_ARRAY_FIELDSIZE = 0x12,
TYPE_FIELD_FIELDSIZE = 0x13
}
protected class RelocEntry {
@@ -1964,6 +2131,16 @@ namespace Mono.CSharp.Debugger
AddRelocEntry (RelocEntryType.TYPE_FIELD_OFFSET, type, index);
}
protected void AddRelocEntry_TypeFieldSize (Type type, int index)
{
if (type.Equals (typeof (MonoString)))
AddRelocEntry (RelocEntryType.MONO_STRING_FIELDSIZE, index);
else if (type.Equals (typeof (MonoArray)))
AddRelocEntry (RelocEntryType.MONO_ARRAY_FIELDSIZE, index);
else
AddRelocEntry (RelocEntryType.TYPE_FIELD_FIELDSIZE, type, index);
}
//
// Mono relocation table. See the README.relocation-table file in this
// directory for a detailed description of the file format.
@@ -1975,12 +2152,16 @@ namespace Mono.CSharp.Debugger
aw.WriteUInt8 (0);
object end_index = aw.StartSubsectionWithSize ();
int count = 0;
foreach (RelocEntry entry in reloc_entries) {
count++;
aw.WriteUInt8 ((int) entry.RelocType);
object tmp_index = aw.StartSubsectionWithSize ();
aw.WriteUInt8 ((int) entry.Section);
aw.WriteAbsoluteOffset (aw.GetLabelName (entry.Index));
aw.WriteAbsoluteOffset (entry.Index);
switch (entry.RelocType) {
case RelocEntryType.METHOD_START_ADDRESS:
@@ -1992,6 +2173,9 @@ namespace Mono.CSharp.Debugger
case RelocEntryType.LOCAL_VARIABLE:
case RelocEntryType.METHOD_PARAMETER:
case RelocEntryType.TYPE_FIELD_OFFSET:
case RelocEntryType.VARIABLE_START_SCOPE:
case RelocEntryType.VARIABLE_END_SCOPE:
case RelocEntryType.TYPE_FIELD_FIELDSIZE:
aw.WriteUInt32 (entry.Token);
aw.WriteUInt32 (entry.Original);
break;
@@ -2002,6 +2186,8 @@ namespace Mono.CSharp.Debugger
case RelocEntryType.MONO_STRING_OFFSET:
case RelocEntryType.MONO_ARRAY_OFFSET:
case RelocEntryType.MONO_ARRAY_BOUNDS_OFFSET:
case RelocEntryType.MONO_STRING_FIELDSIZE:
case RelocEntryType.MONO_ARRAY_FIELDSIZE:
aw.WriteUInt32 (entry.Token);
break;
}
@@ -93,6 +93,7 @@ namespace Mono.CSharp.Debugger
}
private readonly ISourceMethod _method;
private ArrayList _blocks = new ArrayList ();
internal ISourceLine _start;
internal ISourceLine _end;
@@ -104,6 +105,19 @@ namespace Mono.CSharp.Debugger
}
}
public ISourceBlock[] Blocks {
get {
ISourceBlock[] retval = new ISourceBlock [_blocks.Count];
_blocks.CopyTo (retval);
return retval;
}
}
public void AddBlock (ISourceBlock block)
{
_blocks.Add (block);
}
public ISourceLine Start {
get {
return _start;
@@ -158,7 +172,7 @@ namespace Mono.CSharp.Debugger
public override string ToString ()
{
return "SourceLine (" + _offset + "," + _row + ":" + _column + ")";
return "SourceLine (" + _offset + "@" + _row + ":" + _column + ")";
}
internal SourceOffsetType _type;
@@ -306,7 +320,14 @@ namespace Mono.CSharp.Debugger
SourceBlock block = (SourceBlock) _block_stack.Pop ();
block._end = new SourceLine (endOffset);
_blocks.Add (block);
if (_block_stack.Count > 0) {
ISourceBlock parent = (ISourceBlock) _block_stack.Peek ();
parent.AddBlock (block);
} else
_blocks.Add (block);
_block_hash.Add (block.ID, block);
}
@@ -617,6 +638,9 @@ namespace Mono.CSharp.Debugger
foreach (ILocalVariable local in block.Locals)
WriteLocal (die, local);
foreach (ISourceBlock subblock in block.Blocks)
WriteBlock (die, subblock);
}
protected void WriteMethod (DwarfFileWriter.DieCompileUnit parent_die, ISourceMethod method)
@@ -690,3 +714,4 @@ namespace Mono.CSharp.Debugger
}
}
}
@@ -0,0 +1,175 @@
Index: include/elf/ChangeLog
===================================================================
RCS file: /cvs/src/src/include/elf/ChangeLog,v
retrieving revision 1.121
diff -u -u -p -r1.121 ChangeLog
--- include/elf/ChangeLog 13 Feb 2002 18:14:48 -0000 1.121
+++ include/elf/ChangeLog 12 Apr 2002 19:50:31 -0000
@@ -1,3 +1,7 @@
+2002-04-12 Martin Baulig <[email protected]>
+
+ * dwarf2.h (DW_AT_end_scope): Added as GNU extension.
+
2002-02-13 Matt Fredette <[email protected]>
* m68k.h (EF_M68000): Define.
Index: include/elf/dwarf2.h
===================================================================
RCS file: /cvs/src/src/include/elf/dwarf2.h,v
retrieving revision 1.8
diff -u -u -p -r1.8 dwarf2.h
--- include/elf/dwarf2.h 28 Jan 2002 23:26:53 -0000 1.8
+++ include/elf/dwarf2.h 12 Apr 2002 19:50:32 -0000
@@ -328,6 +328,8 @@ enum dwarf_attribute
DW_AT_src_coords = 0x2104,
DW_AT_body_begin = 0x2105,
DW_AT_body_end = 0x2106,
+ DW_AT_end_scope = 0x2121,
+
/* VMS Extensions. */
DW_AT_VMS_rtnbeg_pd_address = 0x2201
};
Index: gdb/ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/ChangeLog,v
retrieving revision 1.2421
diff -u -u -p -r1.2421 ChangeLog
--- gdb/ChangeLog 12 Apr 2002 07:37:17 -0000 1.2421
+++ gdb/ChangeLog 12 Apr 2002 19:50:38 -0000
@@ -1,3 +1,14 @@
+2002-04-12 Martin Baulig <[email protected]>
+
+ * dwarf2read.c (new_symbol): If DW_AT_start_scope and DW_AT_end_scope
+ are specified, set SYMBOL_RANGES().
+
+ * findvar.c (read_var_value): Check whether the current PC is within
+ the SYMBOL_RANGES(), return NULL if not.
+
+ * stack.c (print_block_frame_locals): Only print vars if the current PC
+ is in their SYMBOL_RANGES().
+
2002-04-12 Kevin Buettner <[email protected]>
From Jimi X <[email protected]>:
Index: gdb/dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.52
diff -u -u -p -r1.52 dwarf2read.c
--- gdb/dwarf2read.c 4 Apr 2002 22:26:43 -0000 1.52
+++ gdb/dwarf2read.c 12 Apr 2002 19:50:44 -0000
@@ -4394,6 +4394,19 @@ new_symbol (struct die_info *die, struct
add_symbol_to_list (sym, list_in_scope);
break;
}
+ attr = dwarf_attr (die, DW_AT_start_scope);
+ attr2 = dwarf_attr (die, DW_AT_end_scope);
+ if (attr && attr2)
+ {
+ struct range_list *r = (struct range_list *)
+ obstack_alloc (&objfile->type_obstack,
+ sizeof (struct range_list));
+
+ r->start = DW_ADDR (attr);
+ r->end = DW_ADDR (attr2);
+
+ SYMBOL_RANGES (sym) = r;
+ }
attr = dwarf_attr (die, DW_AT_location);
if (attr)
{
Index: gdb/findvar.c
===================================================================
RCS file: /cvs/src/src/gdb/findvar.c,v
retrieving revision 1.31
diff -u -u -p -r1.31 findvar.c
--- gdb/findvar.c 9 Apr 2002 03:06:13 -0000 1.31
+++ gdb/findvar.c 12 Apr 2002 19:50:45 -0000
@@ -417,9 +417,11 @@ struct value *
read_var_value (register struct symbol *var, struct frame_info *frame)
{
register struct value *v;
+ register struct range_list *r;
struct type *type = SYMBOL_TYPE (var);
CORE_ADDR addr;
register int len;
+ int range_ok = 0;
v = allocate_value (type);
VALUE_LVAL (v) = lval_memory; /* The most likely possibility. */
@@ -429,6 +431,23 @@ read_var_value (register struct symbol *
if (frame == NULL)
frame = selected_frame;
+
+ if (!SYMBOL_RANGES (var))
+ range_ok = 1;
+ else
+ {
+ for (r = SYMBOL_RANGES (var); r; r = r->next)
+ {
+ if (r->start <= frame->pc && r->end > frame->pc)
+ {
+ range_ok = 1;
+ break;
+ }
+ }
+ }
+
+ if (!range_ok)
+ return NULL;
switch (SYMBOL_CLASS (var))
{
Index: gdb/stack.c
===================================================================
RCS file: /cvs/src/src/gdb/stack.c,v
retrieving revision 1.33
diff -u -u -p -r1.33 stack.c
--- gdb/stack.c 10 Apr 2002 23:32:33 -0000 1.33
+++ gdb/stack.c 12 Apr 2002 19:50:47 -0000
@@ -1173,14 +1173,36 @@ print_block_frame_locals (struct block *
case LOC_REGISTER:
case LOC_STATIC:
case LOC_BASEREG:
- values_printed = 1;
- for (j = 0; j < num_tabs; j++)
- fputs_filtered ("\t", stream);
- fputs_filtered (SYMBOL_SOURCE_NAME (sym), stream);
- fputs_filtered (" = ", stream);
- print_variable_value (sym, fi, stream);
- fprintf_filtered (stream, "\n");
- break;
+ {
+ struct range_list *r;
+ int range_ok = 0;
+
+ if (!SYMBOL_RANGES (sym))
+ range_ok = 1;
+ else
+ {
+ for (r = SYMBOL_RANGES (sym); r; r = r->next)
+ {
+ if (r->start <= fi->pc && r->end > fi->pc)
+ {
+ range_ok = 1;
+ break;
+ }
+ }
+ }
+
+ if (range_ok)
+ {
+ values_printed = 1;
+ for (j = 0; j < num_tabs; j++)
+ fputs_filtered ("\t", stream);
+ fputs_filtered (SYMBOL_SOURCE_NAME (sym), stream);
+ fputs_filtered (" = ", stream);
+ print_variable_value (sym, fi, stream);
+ fprintf_filtered (stream, "\n");
+ }
+ break;
+ }
default:
/* Ignore symbols which are not locals. */
@@ -0,0 +1,76 @@
//
// System.Data.SqlClient.SqlClientPermission.cs
//
// Author:
// Rodrigo Moya ([email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc 2002
//
using System;
using System.Data;
using System.Data.Common;
namespace System.Data.SqlClient {
public sealed class SqlClientPermission : DBDataPermission {
[MonoTODO]
public SqlClientPermission() {
// FIXME: do constructor
}
[MonoTODO]
public SqlClientPermission(PermissionState state) {
// FIXME: do constructor
}
[MonoTODO]
public SqlClientPermission(PermissionState state,
bool allowBlankPassword) {
throw new NotImplementedException ();
}
[MonoTODO]
public override IPermission Copy() {
throw new NotImplementedException ();
}
[MonoTODO]
public override void FromXml(SecurityElement
securityElement) {
throw new NotImplementedException ();
}
[MonoTODO]
public override IPermission Intersect(IPermission target) {
throw new NotImplementedException ();
}
[MonoTODO]
public override bool IsSubsetOf(IPermission target) {
throw new NotImplementedException ();
}
[MonoTODO]
public override string ToString() {
throw new NotImplementedException ();
}
[MonoTODO]
public override SecurityElement ToXml() {
throw new NotImplementedException ();
}
[MonoTODO]
public override IPermission Union(IPermission target) {
throw new NotImplementedException ();
}
[MonoTODO]
~SqlClientPermission() {
// FIXME: destructor to release resources
}
}
}
@@ -0,0 +1,51 @@
//
// System.Data.SqlClient.SqlClientPermissionAttribute.cs
//
// Author:
// Rodrigo Moya ([email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc 2002
//
using System;
using System.Data;
using System.Data.Common;
namespace System.Data.SqlClient {
[AttributeUsage(AttributeTargets.Assembly |
AttributeTargets.Class |
AttributeTargets.Struct |
AttributeTargets.Constructor |
AttributeTargets.Method)]
[Serializable]
public sealed class SqlClientPermissionAttribute :
DBDataPermissionAttribute {
[MonoTODO]
[AttributeUsage(AttributeTargets.Assembly |
AttributeTargets.Class |
AttributeTargets.Struct |
AttributeTargets.Constructor |
AttributeTargets.Method)]
[Serializable]
public SqlClientPermissionAttribute(SecurityAction action) {
// FIXME: do constructor
}
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class
| AttributeTargets.Struct | AttributeTargets.Constructor |
AttributeTargets.Method)]
[Serializable]
public override IPermission CreatePermission() {
throw new NotImplementedException ();
}
[MonoTODO]
~SqlClientPermissionAttribute() {
// FIXME: destructor to release resources
}
}
}
@@ -2,45 +2,379 @@
// System.Data.SqlClient.SqlCommand.cs
//
// Author:
// Rodrigo Moya (rd[email protected])
// Rodrigo Moya (rod[email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc
// (C) Ximian, Inc 2002
//
// use #define DEBUG_SqlCommand if you want to spew debug messages
// #define DEBUG_SqlCommand
using System;
using System.ComponentModel;
using System.Data;
using System.Data.Common;
using System.Runtime.InteropServices;
using System.Xml;
namespace System.Data.SqlClient
{
/// <summary>
/// Represents a SQL statement that is executed while connected to a SQL database.
/// Represents a SQL statement that is executed
/// while connected to a SQL database.
/// </summary>
public class SqlCommand : IDbCommand
// public sealed class SqlCommand : Component, IDbCommand, ICloneable
public sealed class SqlCommand : IDbCommand
{
void Cancel();
// FIXME: Console.WriteLine() is used for debugging throughout
#region Fields
string sql = "";
int timeout = 30;
// default is 30 seconds
// for command execution
SqlConnection conn = null;
SqlTransaction trans = null;
CommandType cmdType = CommandType.Text;
bool designTime = false;
SqlParameterCollection parmCollection = new
SqlParameterCollection();
#endregion // Fields
#region Constructors
public SqlCommand()
{
sql = "";
}
public SqlCommand (string cmdText)
{
sql = cmdText;
}
public SqlCommand (string cmdText, SqlConnection connection)
{
sql = cmdText;
conn = connection;
}
public SqlCommand (string cmdText, SqlConnection connection,
SqlTransaction transaction)
{
sql = cmdText;
conn = connection;
trans = transaction;
}
#endregion // Constructors
#region Methods
[MonoTODO]
public void Cancel ()
{
// FIXME: use non-blocking Exec for this
throw new NotImplementedException ();
}
// FIXME: is this the correct way to return a stronger type?
[MonoTODO]
IDbDataParameter IDbCommand.CreateParameter ()
{
return CreateParameter ();
}
[MonoTODO]
public SqlParameter CreateParameter ()
{
return new SqlParameter ();
}
[MonoTODO]
public int ExecuteNonQuery ()
{
IntPtr pgResult; // PGresult
int rowsAffected = -1;
ExecStatusType execStatus;
String rowsAffectedString;
if(conn.State != ConnectionState.Open)
throw new InvalidOperationException(
"ConnnectionState is not Open");
// FIXME: PQexec blocks
// while PQsendQuery is non-blocking
// which is better to use?
// int PQsendQuery(PGconn *conn,
// const char *query);
// execute SQL command
// uses internal property to get the PGConn IntPtr
pgResult = PostgresLibrary.
PQexec (conn.PostgresConnection, sql);
execStatus = PostgresLibrary.
PQresultStatus (pgResult);
if(execStatus == ExecStatusType.PGRES_COMMAND_OK)
{
rowsAffectedString = PostgresLibrary.
PQcmdTuples (pgResult);
#if DEBUG_SqlCommand
Console.WriteLine("rowsAffectedString: " +
rowsAffectedString);
#endif // DEBUG_SqlCommand
if(rowsAffectedString != null)
if(rowsAffectedString.Equals("") == false)
rowsAffected = int.Parse(rowsAffectedString);
}
else
{
String errorMessage;
errorMessage = PostgresLibrary.
PQresStatus(execStatus);
errorMessage += " " + PostgresLibrary.
PQresultErrorMessage(pgResult);
throw new SqlException(0, 0,
errorMessage, 0, "",
conn.DataSource, "SqlCommand", 0);
}
#if DEBUG_SqlCommand
String cmdStatus;
cmdStatus = PostgresLibrary.
PQcmdStatus(pgResult);
Console.WriteLine("*** Command Status: " +
cmdStatus);
#endif // DEBUG_SqlCommand
PostgresLibrary.PQclear (pgResult);
// FIXME: get number of rows
// affected for INSERT, UPDATE, or DELETE
// any other, return -1 (such as, CREATE TABLE)
return rowsAffected;
}
SqlParameter CreateParameter();
// FIXME: temporarily commmented out, so I could get a simple working
// SqlConnection and SqlCommand. I had to temporarily
// comment it out the ExecuteReader in IDbCommand as well.
/*
[MonoTODO]
IDataReader IDbCommand.ExecuteReader ()
{
throw new NotImplementedException ();
}
[MonoTODO]
SqlDataReader ExecuteReader ()
{
throw new NotImplementedException ();
}
[MonoTODO]
IDataReader IDbCommand.ExecuteReader (
CommandBehavior behavior)
{
throw new NotImplementedException ();
}
[MonoTODO]
public SqlDataReader ExecuteReader (CommandBehavior behavior)
{
throw new NotImplementedException ();
}
*/
[MonoTODO]
public object ExecuteScalar ()
{
throw new NotImplementedException ();
}
[MonoTODO]
public XmlReader ExecuteXmlReader ()
{
throw new NotImplementedException ();
}
[MonoTODO]
public void Prepare ()
{
// FIXME: parameters have to be implemented for this
throw new NotImplementedException ();
}
[MonoTODO]
public SqlCommand Clone ()
{
throw new NotImplementedException ();
}
#endregion // Methods
#region Properties
public string CommandText {
get {
return sql;
}
set {
sql = value;
}
}
public int CommandTimeout {
get {
return timeout;
}
set {
// FIXME: if value < 0, throw
// ArgumentException
// if (value < 0)
// throw ArgumentException;
timeout = value;
}
}
public CommandType CommandType {
get {
return cmdType;
}
set {
cmdType = value;
}
}
// FIXME: for property Connection, is this the correct
// way to handle a return of a stronger type?
IDbConnection IDbCommand.Connection {
get {
return Connection;
}
set {
// FIXME: throw an InvalidOperationException
// if the change was during a
// transaction in progress
// csc
Connection = (SqlConnection) value;
// mcs
// Connection = value;
// FIXME: set Transaction property to null
}
}
int ExecuteNonQuery();
public SqlConnection Connection {
get {
// conn defaults to null
return conn;
}
SqlDataReader ExecuteReader();
set {
// FIXME: throw an InvalidOperationException
// if the change was during
// a transaction in progress
conn = value;
// FIXME: set Transaction property to null
}
}
SqlDataReader ExecuteReader(CommandBehavior behavior);
public bool DesignTimeVisible {
get {
return designTime;
}
set{
designTime = value;
}
}
object ExecuteScalar();
// FIXME; for property Parameters, is this the correct
// way to handle a stronger return type?
IDataParameterCollection IDbCommand.Parameters {
get {
return Parameters;
}
}
void Prepare();
SqlParameterCollection Parameters {
get {
return parmCollection;
}
}
// FIXME: for property Transaction, is this the correct
// way to handle a return of a stronger type?
IDbTransaction IDbCommand.Transaction {
get {
return Transaction;
}
string CommandText{get; set;}
set {
// FIXME: error handling - do not allow
// setting of transaction if transaction
// has already begun
int CommandTimeout{get; set;}
// csc
Transaction = (SqlTransaction) value;
// mcs
// Transaction = value;
}
}
CommandType CommandType{get; set;}
public SqlTransaction Transaction {
get {
return trans;
}
SqlConnection Connection{get; set;}
set {
// FIXME: error handling
trans = value;
}
}
SqlParameterCollection Parameters{get;}
[MonoTODO]
public UpdateRowSource UpdatedRowSource {
// FIXME: do this once DbDataAdaptor
// and DataRow are done
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
IDbTransaction Transaction{get; set;}
#endregion // Properties
UpdateRowSource UpdatedRowSource{get; set;}
#region Destructors
[MonoTODO]
public void Dispose() {
// FIXME: need proper way to release resources
// Dispose(true);
}
[MonoTODO]
~SqlCommand()
{
// FIXME: need proper way to release resources
// Dispose(false);
}
#endregion //Destructors
}
}
@@ -0,0 +1,103 @@
//
// System.Data.SqlClient.SqlCommandBuilder.cs
//
// Author:
// Rodrigo Moya ([email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc 2002
//
using System;
using System.Data;
using System.ComponentModel;
namespace System.Data.SqlClient {
/// <summary>
/// Builder of one command
/// that will be used in manipulating a table for
/// a DataSet that is assoicated with a database.
/// </summary>
public sealed class SqlCommandBuilder : Component {
[MonoTODO]
public SqlCommandBuilder() {
}
[MonoTODO]
public SqlCommandBuilder(SqlDataAdapter adapter) {
}
[MonoTODO]
public SqlDataAdapter DataAdapter {
get {
throw new NotImplementedException ();
}
set{
throw new NotImplementedException ();
}
}
[MonoTODO]
public string QuotePrefix {
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
[MonoTODO]
public string QuoteSuffix {
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
[MonoTODO]
public static void DeriveParameters(SqlCommand command) {
throw new NotImplementedException ();
}
[MonoTODO]
public SqlCommand GetDeleteCommand() {
throw new NotImplementedException ();
}
[MonoTODO]
public SqlCommand GetInsertCommand() {
throw new NotImplementedException ();
}
[MonoTODO]
public SqlCommand GetUpdateCommand() {
throw new NotImplementedException ();
}
[MonoTODO]
public void RefreshSchema() {
throw new NotImplementedException ();
}
[MonoTODO]
protected override void Dispose(bool disposing) {
throw new NotImplementedException ();
}
[MonoTODO]
~SqlCommandBuilder() {
// FIXME: create destructor - release resources
}
}
}
@@ -3,37 +3,526 @@
//
// Author:
// Rodrigo Moya ([email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc
// (C) Ximian, Inc 2002
//
// use #define DEBUG_SqlConnection if you want to spew debug messages
// #define DEBUG_SqlConnection
using System;
using System.ComponentModel;
using System.Data;
using System.Data.Common;
using System.Runtime.InteropServices;
using System.Text;
namespace System.Data.SqlClient
{
// using PGconn = IntPtr;
// PGconn is native C library type in libpq for Postgres Connection
// using PGressult = IntPtr;
// PGresult is native C library type in libpq for Postgres Resultset
/// <summary>
/// Represents an open connection to a SQL data source
/// </summary>
public class SqlConnection : IDBConnection
//public sealed class SqlConnection : Component, IDbConnection,
// ICloneable
public sealed class SqlConnection : IDbConnection
{
SqlTransaction BeginTransaction();
// FIXME: Need to implement class Component,
// and interfaces: ICloneable and IDisposable
SqlTransaction BeginTransaction(IsolationLevel il);
#region Fields
void ChangeDatabase(string databaseName);
private IntPtr pgConn = IntPtr.Zero;
// PGConn (Postgres Connection)
private string connectionString = "";
// OLE DB Connection String
private string pgConnectionString = "";
// PostgreSQL Connection String
private SqlTransaction trans = null;
private int connectionTimeout = 15;
// default for 15 seconds
// connection parameters in connection string
private string host = "";
// Name of host to connect to
private string hostaddr = "";
// IP address of host to connect to
// should be in "n.n.n.n" format
private string port = "";
// Port number to connect to at the server host
private string dbname = ""; // The database name.
private string user = ""; // User name to connect as.
private string password = "";
// Password to be used if the server
// demands password authentication.
private string options = "";
// Trace/debug options to be sent to the server.
private string tty = "";
// A file or tty for optional
// debug output from the backend.
private string requiressl = "";
// Set to 1 to require
// SSL connection to the backend.
// Libpq will then refuse to connect
// if the server does not
// support SSL. Set to 0 (default) to
// negotiate with server.
void Close();
ConnectionState conState = ConnectionState.Closed;
SqlCommand CreateCommand();
#endregion // Fields
void Open();
#region Constructors
/*
[MonoTODO]
public SqlConnection ()
{
this.ConnectionString = null;
this.ConnectionTimeout = 0;
this.Database = null;
this.State = 0;
}
[MonoTODO]
public SqlConnection (string cs) : SqlConnection ()
{
this.ConnectionString = cs;
}
*/
// A lot of the defaults were initialized in the Fields
[MonoTODO]
public SqlConnection ()
{
string ConnectionString{get; set;}
}
[MonoTODO]
public SqlConnection (String connectionString)
{
SetConnectionString (connectionString);
}
int ConnectionTimeout{get;}
#endregion // Constructors
string Database{get;}
#region Destructors
ConnectionState State{get;}
[MonoTODO]
public void Dispose () {
// FIXME: release resources properly
Close ();
// Dispose (true);
}
// aka Finalize
// [ClassInterface(ClassInterfaceType.AutoDual)]
[MonoTODO]
~SqlConnection()
{
// FIXME: this class need
// a destructor to release resources
// Also, take a look at Dispose
// Dispose (false);
}
#endregion // Destructors
#region Public Methods
IDbTransaction IDbConnection.BeginTransaction ()
{
return BeginTransaction ();
}
public SqlTransaction BeginTransaction ()
{
return TransactionBegin (); // call private method
}
IDbTransaction IDbConnection.BeginTransaction (IsolationLevel
il)
{
return BeginTransaction (il);
}
public SqlTransaction BeginTransaction (IsolationLevel il)
{
return TransactionBegin (il); // call private method
}
// PostgreSQL does not support named transactions/savepoint
// nor nested transactions
[Obsolete]
public SqlTransaction BeginTransaction(string transactionName) {
return TransactionBegin (); // call private method
}
[Obsolete]
public SqlTransaction BeginTransaction(IsolationLevel iso,
string transactionName) {
return TransactionBegin (iso); // call private method
}
[MonoTODO]
public void ChangeDatabase (string databaseName)
{
throw new NotImplementedException ();
}
[MonoTODO]
public void Close ()
{
CloseDataSource ();
}
IDbCommand IDbConnection.CreateCommand ()
{
return CreateCommand ();
}
public SqlCommand CreateCommand ()
{
SqlCommand sqlcmd = new SqlCommand ("", this);
return sqlcmd;
}
[MonoTODO]
public void Open ()
{
OpenDataSource ();
}
#endregion // Public Methods
#region Internal Methods
// this is for System.Data.SqlClient classes
// to get the Postgres connection
internal IntPtr PostgresConnection {
get {
return pgConn;
}
}
#endregion // Internal Methods
#region Protected Methods
// FIXME: protected override void Dispose overrides Component
// however, including Component causes other problems
/*
[MonoTODO]
protected override void Dispose (bool disposing)
{
throw new NotImplementedException ();
}
*/
#endregion
#region Private Methods
private void OpenDataSource ()
{
if(dbname.Equals(""))
throw new InvalidOperationException(
"dbname missing");
else if(conState == ConnectionState.Open)
throw new InvalidOperationException(
"ConnnectionState is already Open");
ConnStatusType connStatus;
// FIXME: check to make sure we have
// everything to connect,
// otherwise, throw an exception
pgConn = PostgresLibrary.PQconnectdb
(pgConnectionString);
// FIXME: should we use PQconnectStart/PQconnectPoll
// instead of PQconnectdb?
// PQconnectdb blocks
// PQconnectStart/PQconnectPoll is non-blocking
connStatus = PostgresLibrary.PQstatus (pgConn);
if(connStatus == ConnStatusType.CONNECTION_OK)
{
// Successfully Connected
conState = ConnectionState.Open;
}
else
{
String errorMessage = PostgresLibrary.
PQerrorMessage (pgConn);
errorMessage += ": Could not connect to database.";
throw new SqlException(0, 0,
errorMessage, 0, "",
host, "SqlConnection", 0);
}
}
private void CloseDataSource ()
{
// FIXME: just a quick hack
conState = ConnectionState.Closed;
PostgresLibrary.PQfinish (pgConn);
}
private void SetConnectionString (string connectionString)
{
// FIXME: perform error checking on string
// while translating string from
// OLE DB format to PostgreSQL
// connection string format
//
// OLE DB: "host=localhost;dbname=test;user=joe;password=smoe"
// PostgreSQL: "host=localhost dbname=test user=joe password=smoe"
//
// For OLE DB, you would have the additional
// "provider=postgresql"
// OleDbConnection you would be using libgda, maybe
// it would be
// "provider=OAFIID:GNOME_Database_Postgres_Provider"
// instead.
//
// Also, parse the connection string into properties
// FIXME: if connection is open, you can
// not set the connection
// string, throw an exception
this.connectionString = connectionString;
pgConnectionString = ConvertStringToPostgres (
connectionString);
#if DEBUG_SqlConnection
Console.WriteLine(
"OLE-DB Connection String [in]: " +
this.ConnectionString);
Console.WriteLine(
"Postgres Connection String [out]: " +
pgConnectionString);
#endif // DEBUG_SqlConnection
}
private String ConvertStringToPostgres (String
oleDbConnectionString)
{
StringBuilder postgresConnection =
new StringBuilder();
string result;
string[] connectionParameters;
char[] semicolon = new Char[1];
semicolon[0] = ';';
// FIXME: what is the max number of value pairs
// can there be for the OLE DB
// connnection string? what about libgda max?
// what about postgres max?
// FIXME: currently assuming value pairs are like:
// "key1=value1;key2=value2;key3=value3"
// Need to deal with values that have
// single or double quotes. And error
// handling of that too.
// "key1=value1;key2='value2';key=\"value3\""
// FIXME: put the connection parameters
// from the connection
// string into a
// Hashtable (System.Collections)
// instead of using private variables
// to store them
connectionParameters = oleDbConnectionString.
Split (semicolon);
foreach (string sParameter in connectionParameters) {
if(sParameter.Length > 0) {
BreakConnectionParameter (sParameter);
postgresConnection.
Append (sParameter +
" ");
}
}
result = postgresConnection.ToString ();
return result;
}
private bool BreakConnectionParameter (String sParameter)
{
bool addParm = true;
int index;
index = sParameter.IndexOf ("=");
if (index > 0) {
string parmKey, parmValue;
// separate string "key=value" to
// string "key" and "value"
parmKey = sParameter.Substring (0, index);
parmValue = sParameter.Substring (index + 1,
sParameter.Length - index - 1);
switch(parmKey.ToLower()) {
case "hostaddr":
hostaddr = parmValue;
break;
case "port":
port = parmValue;
break;
case "host":
// set DataSource property
host = parmValue;
break;
case "dbname":
// set Database property
dbname = parmValue;
break;
case "user":
user = parmValue;
break;
case "password":
password = parmValue;
// addParm = false;
break;
case "options":
options = parmValue;
break;
case "tty":
tty = parmValue;
break;
case "requiressl":
requiressl = parmValue;
break;
}
}
return addParm;
}
private SqlTransaction TransactionBegin ()
{
// FIXME: need to keep track of
// transaction in-progress
trans = new SqlTransaction ();
// using internal methods of SqlTransaction
trans.SetConnection (this);
trans.Begin();
return trans;
}
private SqlTransaction TransactionBegin (IsolationLevel il)
{
// FIXME: need to keep track of
// transaction in-progress
TransactionBegin();
trans.SetIsolationLevel (il);
return trans;
}
#endregion
#region Properties
[MonoTODO]
public ConnectionState State {
get {
return conState;
}
}
public string ConnectionString {
get {
return connectionString;
}
set {
SetConnectionString (value);
}
}
public int ConnectionTimeout {
get {
return connectionTimeout;
}
}
public string Database {
get {
return dbname;
}
}
public string DataSource {
get {
return host;
}
}
/*
* FIXME: this is here because of Component?
[MonoTODO]
protected bool DesignMode {
get {
throw new NotImplementedException ();
}
}
*/
public int PacketSize {
get {
throw new NotImplementedException ();
}
}
public string ServerVersion {
get {
throw new NotImplementedException ();
}
}
internal SqlTransaction Transaction {
get {
return trans;
}
}
#endregion
#region Events and Delegates
// FIXME: the two events belong here
// however, i do not know about the delegates
// also, they are stubs for now
/*
public delegate void
SqlInfoMessageEventHandler (object sender,
SqlInfoMessageEventArgs e);
public event
SqlInfoMessageEventHandler InfoMessage;
public event
StateChangeEventHandler StateChange;
*/
#endregion
}
}
@@ -3,23 +3,229 @@
//
// Author:
// Rodrigo Moya ([email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc
// (C) Ximian, Inc 2002
//
using System;
using System.ComponentModel;
using System.Data;
using System.Data.Common;
namespace System.Data.SqlClient
{
/// <summary>
/// Represents a set of command-related properties that are used to fill the DataSet and update a data source, all this from a SQL database.
/// Represents a set of command-related properties that are used
/// to fill the DataSet and update a data source, all this
/// from a SQL database.
/// </summary>
public class SqlDataAdapter : IDbDataAdapter
public sealed class SqlDataAdapter : DbDataAdapter, IDbDataAdapter
{
SqlCommand DeleteCommand{get; set;}
#region Properties
SqlCommand InsertCommand{get; set;}
[MonoTODO]
public SqlCommand DeleteCommand {
get {
throw new NotImplementedException ();
}
SqlCommand SelectCommand{get; set;}
set {
throw new NotImplementedException ();
}
}
[MonoTODO]
public SqlCommand InsertCommand {
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
[MonoTODO]
public SqlCommand SelectCommand {
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
public SqlCommand UpdateCommand {
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
#endregion // Properties
#region Methods
[MonoTODO]
public override int Fill(DataSet dataSet) {
throw new NotImplementedException ();
}
[MonoTODO]
public int Fill(DataTable dataTable) {
throw new NotImplementedException ();
}
[MonoTODO]
public int Fill(DataSet dataSet, string srcTable) {
throw new NotImplementedException ();
}
[MonoTODO]
protected virtual int Fill(DataTable dataTable,
IDataReader dataReader) {
throw new NotImplementedException ();
}
[MonoTODO]
protected virtual int Fill(DataTable dataTable,
IDbCommand command,
CommandBehavior behavior) {
throw new NotImplementedException ();
}
[MonoTODO]
public int Fill(DataSet dataSet, int startRecord,
int maxRecords, string srcTable) {
throw new NotImplementedException ();
}
[MonoTODO]
protected virtual int Fill(DataSet dataSet,
string srcTable, IDataReader dataReader,
int startRecord, int maxRecords) {
throw new NotImplementedException ();
}
[MonoTODO]
protected virtual int Fill(DataSet dataSet,
int startRecord, int maxRecords,
string srcTable, IDbCommand command,
CommandBehavior behavior) {
throw new NotImplementedException ();
}
[MonoTODO]
public override DataTable[] FillSchema(DataSet dataSet,
SchemaType schemaType) {
throw new NotImplementedException ();
}
[MonoTODO]
public DataTable FillSchema(DataTable dataTable,
SchemaType schemaType) {
throw new NotImplementedException ();
}
[MonoTODO]
public DataTable[] FillSchema(DataSet dataSet,
SchemaType schemaType, string srcTable) {
throw new NotImplementedException ();
}
[MonoTODO]
protected virtual DataTable FillSchema(DataTable dataTable,
SchemaType schemaType, IDbCommand command,
CommandBehavior behavior) {
throw new NotImplementedException ();
}
[MonoTODO]
protected virtual DataTable[] FillSchema(DataSet dataSet,
SchemaType schemaType, IDbCommand command,
string srcTable, CommandBehavior behavior) {
throw new NotImplementedException ();
}
[MonoTODO]
public override IDataParameter[] GetFillParameters() {
throw new NotImplementedException ();
}
[MonoTODO]
public int Update(DataRow[] dataRows) {
throw new NotImplementedException ();
}
[MonoTODO]
public override int Update(DataSet dataSet) {
throw new NotImplementedException ();
}
[MonoTODO]
public int Update(DataTable dataTable) {
throw new NotImplementedException ();
}
[MonoTODO]
protected virtual int Update(DataRow[] dataRows,
DataTableMapping tableMapping) {
throw new NotImplementedException ();
}
[MonoTODO]
public int Update(DataSet dataSet, string srcTable) {
throw new NotImplementedException ();
}
[MonoTODO]
protected override RowUpdatedEventArgs CreateRowUpdatedEvent(
DataRow dataRow,
IDbCommand command,
StatementType statementType,
DataTableMapping tableMapping) {
throw new NotImplementedException ();
}
[MonoTODO]
protected override RowUpdatingEventArgs CreateRowUpdatingEvent(
DataRow dataRow,
IDbCommand command,
StatementType statementType,
DataTableMapping tableMapping) {
throw new NotImplementedException ();
}
[MonoTODO]
protected virtual void OnFillError(FillErrorEventArgs value) {
throw new NotImplementedException ();
}
protected override void OnRowUpdated(RowUpdatedEventArgs value) {
throw new NotImplementedException ();
}
protected override void OnRowUpdating(RowUpdatingEventArgs value) {
throw new NotImplementedException ();
}
#endregion // Methods
#region Events and Delegates
public event FillErrorEventHandler FillError;
public event SqlRowUpdatedEventHandler RowUpdated;
public event SqlRowUpdatingEventHandler RowUpdating;
#endregion // Events and Delegates
SqlCommand UpdateCommand{get; set;}
}
}
@@ -3,31 +3,261 @@
//
// Author:
// Rodrigo Moya ([email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc
// (C) Ximian, Inc 2002
//
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
namespace System.Data.SqlClient
{
/// <summary>
/// Provides a means of reading one or more forward-only streams of result sets obtained by executing a command at a SQL database.
/// Provides a means of reading one or more forward-only streams
/// of result sets obtained by executing a command
/// at a SQL database.
/// </summary>
public interface SqlDataReader : IDataReader
//public sealed class SqlDataReader : MarshalByRefObject,
// IEnumerable, IDataReader, IDisposable, IDataRecord
public sealed class SqlDataReader : IEnumerable,
IDataReader, IDataRecord
{
void Close();
DataTable GetSchemaTable();
bool NextResult();
#region Fields
bool Read();
DataTable tableSchema;
DataTable tableRow;
int Depth{get;}
#endregion // Fields
bool IsClosed{get;}
#region Public Methods
int RecordsAffected{get;}
[MonoTODO]
public void Close()
{
throw new NotImplementedException ();
}
[MonoTODO]
public DataTable GetSchemaTable()
{
throw new NotImplementedException ();
}
[MonoTODO]
public bool NextResult()
{
throw new NotImplementedException ();
}
[MonoTODO]
public bool Read()
{
throw new NotImplementedException ();
}
[MonoTODO]
public byte GetByte(int i)
{
throw new NotImplementedException ();
}
[MonoTODO]
public long GetBytes(int i, long fieldOffset,
byte[] buffer, int bufferOffset,
int length)
{
throw new NotImplementedException ();
}
[MonoTODO]
public char GetChar(int i)
{
throw new NotImplementedException ();
}
[MonoTODO]
public long GetChars(int i, long fieldOffset,
char[] buffer, int bufferOffset,
int length)
{
throw new NotImplementedException ();
}
[MonoTODO]
public IDataReader GetData(int i)
{
throw new NotImplementedException ();
}
[MonoTODO]
public string GetDataTypeName(int i)
{
throw new NotImplementedException ();
}
[MonoTODO]
public DateTime GetDateTime(int i)
{
throw new NotImplementedException ();
}
[MonoTODO]
public decimal GetDecimal(int i)
{
throw new NotImplementedException ();
}
[MonoTODO]
public double GetDouble(int i)
{
throw new NotImplementedException ();
}
[MonoTODO]
public Type GetFieldType(int i)
{
throw new NotImplementedException ();
}
[MonoTODO]
public float GetFloat(int i)
{
throw new NotImplementedException ();
}
[MonoTODO]
public Guid GetGuid(int i)
{
throw new NotImplementedException ();
}
[MonoTODO]
public short GetInt16(int i)
{
throw new NotImplementedException ();
}
[MonoTODO]
public int GetInt32(int i)
{
throw new NotImplementedException ();
}
[MonoTODO]
public long GetInt64(int i)
{
throw new NotImplementedException ();
}
[MonoTODO]
public string GetName(int i)
{
throw new NotImplementedException ();
}
[MonoTODO]
public int GetOrdinal(string name)
{
throw new NotImplementedException ();
}
[MonoTODO]
public string GetString(int i)
{
throw new NotImplementedException ();
}
[MonoTODO]
public object GetValue(int i)
{
throw new NotImplementedException ();
}
[MonoTODO]
public int GetValues(object[] values)
{
throw new NotImplementedException ();
}
[MonoTODO]
public bool IsDBNull(int i)
{
throw new NotImplementedException ();
}
[MonoTODO]
public bool GetBoolean(int i)
{
throw new NotImplementedException ();
}
[MonoTODO]
public IEnumerator GetEnumerator() {
throw new NotImplementedException ();
}
#endregion // Public Methods
#region // Destructors
[MonoTODO]
public void Dispose () {
}
[MonoTODO]
~SqlDataReader() {
}
#endregion // Destructors
#region Properties
public int Depth {
[MonoTODO]
get {
throw new NotImplementedException ();
}
}
public bool IsClosed {
[MonoTODO]
get {
throw new NotImplementedException ();
}
}
public int RecordsAffected {
[MonoTODO]
get {
throw new NotImplementedException ();
}
}
public int FieldCount {
[MonoTODO]
get {
throw new NotImplementedException ();
}
}
public object this[string name] {
[MonoTODO]
get {
throw new NotImplementedException ();
}
}
public object this[int i] {
[MonoTODO]
get
{
throw new NotImplementedException ();
}
}
#endregion // Properties
}
}
@@ -3,18 +3,153 @@
//
// Author:
// Rodrigo Moya ([email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc
// (C) Ximian, Inc 2002
//
using System;
using System.Data;
using System.Runtime.InteropServices;
namespace System.Data.SqlClient
{
/// <summary>
/// Describes an error from a SQL database.
/// </summary>
public class SqlError
[MonoTODO]
public sealed class SqlError
{
// TODO
byte theClass = 0;
int lineNumber = 0;
string message = "";
int number = 0;
string procedure = "";
string server = "";
string source = "";
byte state = 0;
internal SqlError(byte theClass, int lineNumber,
string message, int number, string procedure,
string server, string source, byte state) {
this.theClass = theClass;
this.lineNumber = lineNumber;
this.message = message;
this.number = number;
this.procedure = procedure;
this.server = server;
this.source = source;
this.state = state;
}
#region Properties
[MonoTODO]
/// <summary>
/// severity level of the error
/// </summary>
public byte Class {
get {
return theClass;
}
}
[MonoTODO]
public int LineNumber {
get {
return lineNumber;
}
}
[MonoTODO]
public string Message {
get {
return message;
}
}
[MonoTODO]
public int Number {
get {
return number;
}
}
[MonoTODO]
public string Procedure {
get {
return procedure;
}
}
[MonoTODO]
public string Server {
get {
return server;
}
}
[MonoTODO]
public string Source {
get {
return source;
}
}
[MonoTODO]
public byte State {
get {
return state;
}
}
#endregion
#region Methods
[MonoTODO]
public override string ToString ()
{
String toStr;
String stackTrace;
stackTrace = " <Stack Trace>";
// FIXME: generate the correct SQL error string
toStr = "SqlError:" + message + stackTrace;
return toStr;
}
internal void SetClass(byte theClass) {
this.theClass = theClass;
}
internal void SetLineNumber(int lineNumber) {
this.lineNumber = lineNumber;
}
internal void SetMessage(string message) {
this.message = message;
}
internal void SetNumber(int number) {
this.number = number;
}
internal void SetProcedure(string procedure) {
this.procedure = procedure;
}
internal void SetServer(string server) {
this.server = server;
}
internal void SetSource(string source) {
this.source = source;
}
internal void SetState(byte state) {
this.state = state;
}
#endregion
}
}
@@ -0,0 +1,114 @@
//
// System.Data.SqlClient.SqlError.cs
//
// Author:
// Rodrigo Moya ([email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc 2002
//
using System;
using System.Collections;
using System.Data;
using System.Runtime.InteropServices;
namespace System.Data.SqlClient
{
/// <summary>
/// Describes an error from a SQL database.
/// </summary>
[MonoTODO]
public sealed class SqlErrorCollection : ICollection, IEnumerable
{
ArrayList errorList = new ArrayList();
internal SqlErrorCollection() {
}
internal SqlErrorCollection(byte theClass, int lineNumber,
string message, int number, string procedure,
string server, string source, byte state) {
Add (theClass, lineNumber, message,
number, procedure,
server, source, state);
}
#region Properties
[MonoTODO]
public int Count {
get {
return errorList.Count;
}
}
[MonoTODO]
public void CopyTo(Array array, int index) {
throw new NotImplementedException ();
}
// [MonoTODO]
bool ICollection.IsSynchronized {
get {
throw new NotImplementedException ();
}
}
// [MonoTODO]
object ICollection.SyncRoot {
get {
throw new NotImplementedException ();
}
}
[MonoTODO]
public IEnumerator GetEnumerator() {
throw new NotImplementedException ();
}
// Index property (indexer)
// [MonoTODO]
public SqlError this[int index] {
get {
return (SqlError) errorList[index];
}
}
#endregion
#region Methods
[MonoTODO]
public override string ToString()
{
throw new NotImplementedException ();
}
#endregion
internal void Add(SqlError error) {
errorList.Add(error);
}
internal void Add(byte theClass, int lineNumber,
string message, int number, string procedure,
string server, string source, byte state) {
SqlError error = new SqlError(theClass,
lineNumber, message,
number, procedure,
server, source, state);
Add(error);
}
#region Destructors
[MonoTODO]
~SqlErrorCollection()
{
// FIXME: do the destructor - release resources
}
#endregion
}
}
@@ -3,18 +3,200 @@
//
// Author:
// Rodrigo Moya ([email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc
//
using System;
using System.Data;
using System.Runtime.Serialization;
namespace System.Data.SqlClient
{
/// <summary>
/// Exceptions, as returned by SQL databases.
/// </summary>
public class SqlException : SystemException
public sealed class SqlException : SystemException
{
// TODO
private SqlErrorCollection errors;
internal SqlException() {
errors = new SqlErrorCollection();
}
internal SqlException(byte theClass, int lineNumber,
string message, int number, string procedure,
string server, string source, byte state) {
errors = new SqlErrorCollection (theClass,
lineNumber, message,
number, procedure,
server, source, state);
}
#region Properties
[MonoTODO]
public byte Class {
get {
if(errors.Count == 0)
return 0; // FIXME: throw exception here?
else
return errors[0].Class;
}
set {
errors[0].SetClass(value);
}
}
[MonoTODO]
public SqlErrorCollection Errors {
get {
return errors;
}
set {
errors = value;
}
}
[MonoTODO]
public int LineNumber {
get {
if(errors.Count == 0)
return 0; // FIXME: throw exception here?
return errors[0].LineNumber;
}
set {
errors[0].SetLineNumber(value);
}
}
[MonoTODO]
public override string Message {
get {
if(errors.Count == 0)
return ""; // FIXME: throw exception?
else {
String msg = "";
int i = 0;
for(i = 0; i < errors.Count - 1; i++) {
msg = msg + errors[i].Message + "\n";
}
msg = msg + errors[i].Message;
return msg;
}
}
}
[MonoTODO]
public int Number {
get {
if(errors.Count == 0)
return 0; // FIXME: throw exception?
else
return errors[0].Number;
}
set {
errors[0].SetNumber(value);
}
}
[MonoTODO]
public string Procedure {
get {
if(errors.Count == 0)
return ""; // FIXME: throw exception?
else
return errors[0].Procedure;
}
set {
errors[0].SetProcedure(value);
}
}
[MonoTODO]
public string Server {
get {
if(errors.Count == 0)
return ""; // FIXME: throw exception?
else
return errors[0].Server;
}
set {
errors[0].SetServer(value);
}
}
[MonoTODO]
public override string Source {
get {
if(errors.Count == 0)
return ""; // FIXME: throw exception?
else
return errors[0].Source;
}
set {
errors[0].SetSource(value);
}
}
[MonoTODO]
public byte State {
get {
if(errors.Count == 0)
return 0; // FIXME: throw exception?
else
return errors[0].State;
}
set {
errors[0].SetState(value);
}
}
#endregion // Properties
#region Methods
[MonoTODO]
public override void GetObjectData(SerializationInfo si,
StreamingContext context) {
// FIXME: to do
}
// [Serializable]
// [ClassInterface(ClassInterfaceType.AutoDual)]
public override string ToString() {
String toStr = "";
for (int i = 0; i < errors.Count; i++) {
toStr = toStr + errors[i].ToString() + "\n";
}
return toStr;
}
internal void Add(byte theClass, int lineNumber,
string message, int number, string procedure,
string server, string source, byte state) {
errors.Add (theClass, lineNumber, message,
number, procedure,
server, source, state);
}
[MonoTODO]
~SqlException() {
// FIXME: destructor to release resources
}
#endregion // Methods
}
}
@@ -0,0 +1,50 @@
//
// System.Data.SqlClient.SqlInfoMessageEventArgs.cs
//
// Author:
// Rodrigo Moya ([email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc 2002
//
using System;
using System.Data;
namespace System.Data.SqlClient
{
public sealed class SqlInfoMessageEventArgs : EventArgs
{
[MonoTODO]
public SqlErrorCollection Errors {
get {
throw new NotImplementedException ();
}
}
[MonoTODO]
public string Message
{
get {
throw new NotImplementedException ();
}
}
[MonoTODO]
public string Source {
get {
throw new NotImplementedException ();
}
}
[MonoTODO]
public override string ToString() {
// representation of InfoMessage event
}
[MonoTODO]
~SqlInfoMessageEventArgs() {
// FIXME: destructor needs to release resources
}
}
}
@@ -0,0 +1,19 @@
//
// System.Data.SqlClient.SqlInfoMessageEventHandler.cs
//
// Author:
// Rodrigo Moya ([email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc 2002
//
using System;
using System.Data;
namespace System.Data.SqlClient
{
public delegate void
SqlInfoMessageEventHandler (object sender,
SqlInfoMessageEventArgs e);
}
@@ -3,37 +3,194 @@
//
// Author:
// Rodrigo Moya ([email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc.
// (C) Ximian, Inc. 2002
//
using System;
using System.ComponentModel;
using System.Data;
using System.Data.Common;
using System.Runtime.InteropServices;
namespace System.Data.SqlClient
{
/// <summary>
/// Represents a parameter to a Command object, and optionally, its mapping to DataSet columns; and is implemented by .NET data providers that access data sources.
/// Represents a parameter to a Command object, and optionally,
/// its mapping to DataSet columns; and is implemented by .NET
/// data providers that access data sources.
/// </summary>
public class SqlParameter : IDbDataParameter, IDataParameter
//public sealed class SqlParameter : MarshalByRefObject,
// IDbDataParameter, IDataParameter, ICloneable
public sealed class SqlParameter : IDbDataParameter, IDataParameter
{
[MonoTODO]
public SqlParameter () {
// FIXME: do this
}
[MonoTODO]
public SqlParameter (string parameterName, object value) {
// FIXME: do this
}
DbType DbType{get;set;}
[MonoTODO]
public SqlParameter(string parameterName, SqlDbType dbType) {
// FIXME: do this
}
ParameterDirection Direction{get;set;}
[MonoTODO]
public SqlParameter(string parameterName, SqlDbType dbType,
int size) {
// FIXME: do this
}
[MonoTODO]
public SqlParameter(string parameterName, SqlDbType dbType,
int size, string sourceColumn) {
// FIXME: do this
}
[MonoTODO]
public SqlParameter(string parameterName, SqlDbType dbType,
int size, ParameterDirection direction,
bool isNullable, byte precision,
byte scale, string sourceColumn,
DataRowVersion sourceVersion, object value) {
// FIXME: do this
}
bool IsNullable{get;}
string ParameterName{get;set;}
[MonoTODO]
public DbType DbType {
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
string SourceColumn{get;set;}
[MonoTODO]
public ParameterDirection Direction {
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
DataRowVersion SourceVersion {get;set;}
[MonoTODO]
public bool IsNullable {
get {
throw new NotImplementedException ();
}
}
object Value {get;set;}
[MonoTODO]
public int Offset {
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
byte Precision{get; set;}
[MonoTODO]
public string ParameterName {
get {
throw new NotImplementedException ();
}
byte Scale{get; set;}
set {
throw new NotImplementedException ();
}
}
int Size{get; set;}
[MonoTODO]
public string SourceColumn {
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
[MonoTODO]
public DataRowVersion SourceVersion {
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
[MonoTODO]
public SqlDbType SqlDbType {
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
[MonoTODO]
public object Value {
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
[MonoTODO]
public byte Precision {
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
[MonoTODO]
public byte Scale {
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
[MonoTODO]
public int Size
{
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
[MonoTODO]
public override string ToString() {
throw new NotImplementedException ();
}
}
}
@@ -3,25 +3,229 @@
//
// Author:
// Rodrigo Moya ([email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc
// (C) Ximian, Inc 2002
//
using System;
using System.ComponentModel;
using System.Data;
using System.Collections;
namespace System.Data.SqlClient
{
/// <summary>
/// Collects all parameters relevant to a Command object and their mappings to DataSet columns.
/// Collects all parameters relevant to a Command object
/// and their mappings to DataSet columns.
/// </summary>
public class SqlParameterCollection : IDataParameterCollection
// public sealed class SqlParameterCollection : MarshalByRefObject,
// IDataParameterCollection, IList, ICollection, IEnumerable
public sealed class SqlParameterCollection : IDataParameterCollection
{
void RemoveAt(string parameterName);
[MonoTODO]
public void RemoveAt(string parameterName)
{
throw new NotImplementedException ();
}
[MonoTODO]
public int IndexOf(string parameterName)
{
throw new NotImplementedException ();
}
[MonoTODO]
public bool Contains(string parameterName)
{
throw new NotImplementedException ();
}
// [MonoTODO]
public object this[string parameterName]
{
get { throw new NotImplementedException (); }
set { throw new NotImplementedException (); }
}
[MonoTODO]
public IEnumerator GetEnumerator()
{
throw new NotImplementedException ();
}
[MonoTODO]
public int Add( object value)
{
throw new NotImplementedException ();
}
[MonoTODO]
public SqlParameter Add(SqlParameter value)
{
throw new NotImplementedException ();
}
[MonoTODO]
public SqlParameter Add(string parameterName, object value)
{
throw new NotImplementedException ();
}
[MonoTODO]
public SqlParameter Add(string parameterName, SqlDbType sqlDbType)
{
throw new NotImplementedException ();
}
[MonoTODO]
public SqlParameter Add(string parameterName,
SqlDbType sqlDbType, int size)
{
throw new NotImplementedException ();
}
[MonoTODO]
public SqlParameter Add(string parameterName,
SqlDbType sqlDbType, int size, string sourceColumn)
{
throw new NotImplementedException ();
}
[MonoTODO]
public void Clear()
{
throw new NotImplementedException ();
}
[MonoTODO]
public bool Contains(object value)
{
throw new NotImplementedException ();
}
/*
[MonoTODO]
public bool Contains(string value)
{
throw new NotImplementedException ();
}
int IndexOf(string parameterName);
bool Contains(string parameterName);
*/
[MonoTODO]
public void CopyTo(Array array, int index)
{
throw new NotImplementedException ();
}
[MonoTODO]
public int IndexOf(object value)
{
throw new NotImplementedException ();
}
/*
[MonoTODO]
public int IndexOf(string parameterName)
{
throw new NotImplementedException ();
}
*/
[MonoTODO]
public void Insert(int index, object value)
{
throw new NotImplementedException ();
}
[MonoTODO]
public void Remove(object value)
{
throw new NotImplementedException ();
}
[MonoTODO]
public void RemoveAt(int index)
{
throw new NotImplementedException ();
}
/*
[MonoTODO]
public void RemoveAt(string parameterName)
{
throw new NotImplementedException ();
}
*/
/*
[MonoTODO]
[Serializable]
[ClassInterface(ClassInterfaceType.AutoDual)]
~SqlParameterCollection();
*/
[MonoTODO]
public int Count {
get {
throw new NotImplementedException ();
}
}
// [MonoTODO]
object IList.this[int index] {
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
// [MonoTODO]
public SqlParameter this[int index] {
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
/*
[MonoTODO]
public SqlParameter this[string parameterName] {
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
*/
bool IList.IsFixedSize {
get {
throw new NotImplementedException ();
}
}
bool IList.IsReadOnly {
get {
throw new NotImplementedException ();
}
}
bool ICollection.IsSynchronized {
get {
throw new NotImplementedException ();
}
}
object ICollection.SyncRoot {
get {
throw new NotImplementedException ();
}
}
object this[string parameterName]{get; set;}
}
}
@@ -0,0 +1,38 @@
//
// System.Data.SqlClient.SqlRowUpdatedEventArgs.cs
//
// Author:
// Rodrigo Moya ([email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc 2002
//
using System;
using System.Data;
using System.Data.Common;
namespace System.Data.SqlClient {
public sealed class SqlRowUpdatedEventArgs : RowUpdatedEventArgs {
[MonoTODO]
public SqlRowUpdatedEventArgs (DataRow row,
IDbCommand command, StatementType statementType,
DataTableMapping tableMapping) {
// FIXME: do the constructor
}
[MonoTODO]
public new SqlCommand Command {
get {
}
}
[MonoTODO]
~SqlRowUpdatedEventArgs () {
// FIXME: need destructor to release resources
}
}
}
@@ -0,0 +1,18 @@
//
// System.Data.SqlClient.SqlRowUpdatedEventHandler.cs
//
// Author:
// Rodrigo Moya ([email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc 2002
//
using System;
using System.Data;
namespace System.Data.SqlClient
{
public delegate void SqlRowUpdatedEventHandler(object sender,
SqlRowUpdatedEventArgs e);
}
@@ -0,0 +1,42 @@
//
// System.Data.SqlClient.SqlRowUpdatingEventArgs.cs
//
// Author:
// Rodrigo Moya ([email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc 2002
//
using System;
using System.Data;
using System.Data.Common;
namespace System.Data.SqlClient
{
public sealed class SqlRowUpdatingEventArgs : RowUpdatingEventArgs
{
[MonoTODO]
public SqlRowUpdatingEventArgs( DataRow row,
IDbCommand command, StatementType statementType,
DataTableMapping tableMapping) {
// FIXME: do the constructor
}
[MonoTODO]
public new SqlCommand Command {
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
[MonoTODO]
~SqlRowUpdatingEventArgs() {
// FIXME: create destructor to release resources
}
}
}
@@ -0,0 +1,18 @@
//
// System.Data.SqlClient.SqlRowUpdatingEventHandler.cs
//
// Author:
// Rodrigo Moya ([email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc 2002
//
using System;
using System.Data;
namespace System.Data.SqlClient
{
public delegate void SqlRowUpdatingEventHandler(object sender,
SqlRowUpdatingEventArgs e);
}
@@ -3,23 +3,189 @@
//
// Author:
// Rodrigo Moya ([email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc.
// (C) Ximian, Inc. 2002
//
// use #define DEBUG_SqlTransaction if you want to spew debug messages
// #define DEBUG_SqlTransaction
using System;
using System.Data;
using System.Data.Common;
namespace System.Data.SqlClient
{
/// <summary>
/// Represents a transaction to be performed at a SQL database.
/// Represents a transaction to be performed on a SQL database.
/// </summary>
public interface SqlTransaction : IDbTransaction
// public sealed class SqlTransaction : MarshalByRefObject,
// IDbTransaction, IDisposable
public sealed class SqlTransaction : IDbTransaction
{
void Commit();
#region Fields
void Rollback();
private bool doingTransaction = false;
private SqlConnection conn = null;
private IsolationLevel isolationLevel =
IsolationLevel.ReadCommitted;
// There are only two IsolationLevel's for PostgreSQL:
// ReadCommitted and Serializable,
// but ReadCommitted is the default
SqlConnection Connection{get;}
#endregion
#region Public Methods
IsolationLevel IsolationLevel{get;}
}
[MonoTODO]
public void Commit ()
{
if(doingTransaction == false)
throw new InvalidOperationException(
"Begin transaction was not " +
"done earlier " +
"thus PostgreSQL can not " +
"Commit transaction.");
SqlCommand cmd = new SqlCommand("COMMIT", conn);
cmd.ExecuteNonQuery();
doingTransaction = false;
}
[MonoTODO]
public void Rollback()
{
if(doingTransaction == false)
throw new InvalidOperationException(
"Begin transaction was not " +
"done earlier " +
"thus PostgreSQL can not " +
"Rollback transaction.");
SqlCommand cmd = new SqlCommand("ROLLBACK", conn);
cmd.ExecuteNonQuery();
doingTransaction = false;
}
// For PostgreSQL, Rollback(string) will not be implemented
// because PostgreSQL does not support Savepoints
[Obsolete]
public void Rollback(string transactionName) {
// throw new NotImplementedException ();
Rollback();
}
// For PostgreSQL, Save(string) will not be implemented
// because PostgreSQL does not support Savepoints
[Obsolete]
public void Save (string savePointName) {
// throw new NotImplementedException ();
}
#endregion // Public Methods
#region Internal Methods to System.Data.dll Assembly
internal void Begin()
{
if(doingTransaction == true)
throw new InvalidOperationException(
"Transaction has begun " +
"and PostgreSQL does not " +
"support nested transactions.");
SqlCommand cmd = new SqlCommand("BEGIN", conn);
cmd.ExecuteNonQuery();
doingTransaction = true;
}
internal void SetIsolationLevel(IsolationLevel isoLevel)
{
String sSql = "SET TRANSACTION ISOLATION LEVEL ";
switch (isoLevel)
{
case IsolationLevel.ReadCommitted:
sSql += "READ COMMITTED";
break;
case IsolationLevel.Serializable:
sSql += "SERIALIZABLE";
break;
default:
// FIXME: generate exception here
// PostgreSQL only supports:
// ReadCommitted or Serializable
break;
}
SqlCommand cmd = new SqlCommand(sSql, conn);
cmd.ExecuteNonQuery();
this.isolationLevel = isoLevel;
}
internal void SetConnection(SqlConnection connection)
{
this.conn = connection;
}
#endregion // Internal Methods to System.Data.dll Assembly
#region Properties
IDbConnection IDbTransaction.Connection {
get {
return Connection;
}
}
public SqlConnection Connection {
get {
return conn;
}
}
public IsolationLevel IsolationLevel {
get {
return isolationLevel;
}
}
internal bool DoingTransaction {
get {
return doingTransaction;
}
}
#endregion Properties
#region Destructors
// Destructors aka Finalize and Dispose
[MonoTODO]
public void Dispose()
{
// FIXME: need to properly release resources
// Dispose(true);
}
// Destructor
[MonoTODO]
// [Serializable]
// [ClassInterface(ClassInterfaceType.AutoDual)]
~SqlTransaction() {
// FIXME: need to properly release resources
// Dispose(false);
}
#endregion // Destructors
}
}
@@ -0,0 +1,471 @@
//
// System.Data.SqlClient.PostgresLibrary.cs
//
// PInvoke methods to libpq
// which is PostgreSQL client library
//
// May also contain enumerations,
// data types, or wrapper methods.
//
// Author:
// Rodrigo Moya ([email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc 2002
//
using System;
using System.Data;
using System.Runtime.InteropServices;
using System.Diagnostics;
namespace System.Data.SqlClient
{
/* IMPORTANT: DO NOT CHANGE ANY OF THESE ENUMS */
internal enum ConnStatusType
{
CONNECTION_OK,
CONNECTION_BAD,
CONNECTION_STARTED,
CONNECTION_MADE,
CONNECTION_AWAITING_RESPONSE,
CONNECTION_AUTH_OK,
CONNECTION_SETENV
}
internal enum PostgresPollingStatusType
{
PGRES_POLLING_FAILED = 0,
PGRES_POLLING_READING,
PGRES_POLLING_WRITING,
PGRES_POLLING_OK,
PGRES_POLLING_ACTIVE
}
internal enum ExecStatusType
{
PGRES_EMPTY_QUERY = 0,
PGRES_COMMAND_OK,
PGRES_TUPLES_OK,
PGRES_COPY_OUT,
PGRES_COPY_IN,
PGRES_BAD_RESPONSE,
PGRES_NONFATAL_ERROR,
PGRES_FATAL_ERROR
}
sealed internal class PostgresLibrary
{
#region PInvoke Functions
// pinvoke prototypes to PostgreSQL client library
// pq.dll on windows and libpq.so on linux
[DllImport("pq")]
public static extern IntPtr PQconnectStart (string conninfo);
// PGconn *PQconnectStart(const char *conninfo);
[DllImport("pq")]
public static extern PostgresPollingStatusType PQconnectPoll (IntPtr conn);
// PostgresPollingStatusType PQconnectPoll(PGconn *conn);
[DllImport("pq")]
public static extern IntPtr PQconnectdb (string conninfo);
// PGconn *PQconnectdb(const char *conninfo);
[DllImport("pq")]
public static extern IntPtr PQsetdbLogin (string pghost,
string pgport, string pgoptions,
string pgtty, string dbName,
string login, string pwd);
// PGconn *PQsetdbLogin(const char *pghost,
// const char *pgport, const char *pgoptions,
// const char *pgtty, const char *dbName,
// const char *login, const char *pwd);
[DllImport("pq")]
public static extern void PQfinish (IntPtr conn);
// void PQfinish(PGconn *conn);
[DllImport("pq")]
public static extern IntPtr PQconndefaults ();
// PQconninfoOption *PQconndefaults(void);
[DllImport("pq")]
public static extern void PQconninfoFree (IntPtr connOptions);
// void PQconninfoFree(PQconninfoOption *connOptions);
[DllImport("pq")]
public static extern int PQresetStart (IntPtr conn);
// int PQresetStart(PGconn *conn);
[DllImport("pq")]
public static extern IntPtr PQresetPoll (IntPtr conn);
// PostgresPollingStatusType PQresetPoll(PGconn *conn);
[DllImport("pq")]
public static extern void PQreset (IntPtr conn);
// void PQreset(PGconn *conn);
[DllImport("pq")]
public static extern int PQrequestCancel (IntPtr conn);
// int PQrequestCancel(PGconn *conn);
[DllImport("pq")]
public static extern string PQdb (IntPtr conn);
// char *PQdb(const PGconn *conn);
[DllImport("pq")]
public static extern string PQuser (IntPtr conn);
// char *PQuser(const PGconn *conn);
[DllImport("pq")]
public static extern string PQpass (IntPtr conn);
// char *PQpass(const PGconn *conn);
[DllImport("pq")]
public static extern string PQhost (IntPtr conn);
// char *PQhost(const PGconn *conn);
[DllImport("pq")]
public static extern string PQport (IntPtr conn);
// char *PQport(const PGconn *conn);
[DllImport("pq")]
public static extern string PQtty (IntPtr conn);
// char *PQtty(const PGconn *conn);
[DllImport("pq")]
public static extern string PQoptions (IntPtr conn);
// char *PQoptions(const PGconn *conn);
[DllImport("pq")]
public static extern ConnStatusType PQstatus (IntPtr conn);
// ConnStatusType PQstatus(const PGconn *conn);
[DllImport("pq")]
public static extern string PQerrorMessage (IntPtr conn);
// char *PQerrorMessage(const PGconn *conn);
[DllImport("pq")]
public static extern int PQsocket (IntPtr conn);
// int PQsocket(const PGconn *conn);
[DllImport("pq")]
public static extern int PQbackendPID (IntPtr conn);
// int PQbackendPID(const PGconn *conn);
[DllImport("pq")]
public static extern int PQclientEncoding (IntPtr conn);
// int PQclientEncoding(const PGconn *conn);
[DllImport("pq")]
public static extern int PQsetClientEncoding (IntPtr conn,
string encoding);
// int PQsetClientEncoding(PGconn *conn,
// const char *encoding);
//FIXME: when loading, causes runtime exception
//[DllImport("pq")]
//public static extern IntPtr PQgetssl (IntPtr conn);
// SSL *PQgetssl(PGconn *conn);
[DllImport("pq")]
public static extern void PQtrace (IntPtr conn,
IntPtr debug_port);
// void PQtrace(PGconn *conn,
// FILE *debug_port);
[DllImport("pq")]
public static extern void PQuntrace (IntPtr conn);
// void PQuntrace(PGconn *conn);
[DllImport("pq")]
public static extern IntPtr PQsetNoticeProcessor (IntPtr conn,
IntPtr proc, IntPtr arg);
// PQnoticeProcessor PQsetNoticeProcessor(PGconn *conn,
// PQnoticeProcessor proc, void *arg);
[DllImport("pq")]
public static extern int PQescapeString (string to,
string from, int length);
// size_t PQescapeString(char *to,
// const char *from, size_t length);
[DllImport("pq")]
public static extern string PQescapeBytea (string bintext,
int binlen, IntPtr bytealen);
// unsigned char *PQescapeBytea(unsigned char *bintext,
// size_t binlen, size_t *bytealen);
[DllImport("pq")]
public static extern IntPtr PQexec (IntPtr conn,
string query);
// PGresult *PQexec(PGconn *conn,
// const char *query);
[DllImport("pq")]
public static extern IntPtr PQnotifies (IntPtr conn);
// PGnotify *PQnotifies(PGconn *conn);
[DllImport("pq")]
public static extern void PQfreeNotify (IntPtr notify);
// void PQfreeNotify(PGnotify *notify);
[DllImport("pq")]
public static extern int PQsendQuery (IntPtr conn,
string query);
// int PQsendQuery(PGconn *conn,
// const char *query);
[DllImport("pq")]
public static extern IntPtr PQgetResult (IntPtr conn);
// PGresult *PQgetResult(PGconn *conn);
[DllImport("pq")]
public static extern int PQisBusy (IntPtr conn);
// int PQisBusy(PGconn *conn);
[DllImport("pq")]
public static extern int PQconsumeInput (IntPtr conn);
// int PQconsumeInput(PGconn *conn);
[DllImport("pq")]
public static extern int PQgetline (IntPtr conn,
string str, int length);
// int PQgetline(PGconn *conn,
// char *string, int length);
[DllImport("pq")]
public static extern int PQputline (IntPtr conn,
string str);
// int PQputline(PGconn *conn,
// const char *string);
[DllImport("pq")]
public static extern int PQgetlineAsync (IntPtr conn,
string buffer, int bufsize);
// int PQgetlineAsync(PGconn *conn, char *buffer,
// int bufsize);
[DllImport("pq")]
public static extern int PQputnbytes (IntPtr conn,
string buffer, int nbytes);
// int PQputnbytes(PGconn *conn,
//const char *buffer, int nbytes);
[DllImport("pq")]
public static extern int PQendcopy (IntPtr conn);
// int PQendcopy(PGconn *conn);
[DllImport("pq")]
public static extern int PQsetnonblocking (IntPtr conn,
int arg);
// int PQsetnonblocking(PGconn *conn, int arg);
[DllImport("pq")]
public static extern int PQisnonblocking (IntPtr conn);
// int PQisnonblocking(const PGconn *conn);
[DllImport("pq")]
public static extern int PQflush (IntPtr conn);
// int PQflush(PGconn *conn);
[DllImport("pq")]
public static extern IntPtr PQfn (IntPtr conn, int fnid,
IntPtr result_buf, IntPtr result_len,
int result_is_int, IntPtr args,
int nargs);
// PGresult *PQfn(PGconn *conn, int fnid,
// int *result_buf, int *result_len,
// int result_is_int, const PQArgBlock *args,
// int nargs);
[DllImport("pq")]
public static extern ExecStatusType PQresultStatus (IntPtr res);
// ExecStatusType PQresultStatus(const PGresult *res);
[DllImport("pq")]
public static extern string PQresStatus (ExecStatusType status);
// char *PQresStatus(ExecStatusType status);
[DllImport("pq")]
public static extern string PQresultErrorMessage (IntPtr res);
// char *PQresultErrorMessage(const PGresult *res);
[DllImport("pq")]
public static extern int PQntuples (IntPtr res);
// int PQntuples(const PGresult *res);
[DllImport("pq")]
public static extern int PQnfields (IntPtr res);
// int PQnfields(const PGresult *res);
[DllImport("pq")]
public static extern int PQbinaryTuples (IntPtr res);
// int PQbinaryTuples(const PGresult *res);
[DllImport("pq")]
public static extern string PQfname (IntPtr res,
int field_num);
// char *PQfname(const PGresult *res,
// int field_num);
[DllImport("pq")]
public static extern int PQfnumber (IntPtr res,
string field_name);
// int PQfnumber(const PGresult *res,
// const char *field_name);
[DllImport("pq")]
public static extern int PQftype (IntPtr res,
int field_num);
// Oid PQftype(const PGresult *res,
// int field_num);
[DllImport("pq")]
public static extern int PQfsize (IntPtr res,
int field_num);
// int PQfsize(const PGresult *res,
// int field_num);
[DllImport("pq")]
public static extern int PQfmod (IntPtr res, int field_num);
// int PQfmod(const PGresult *res, int field_num);
[DllImport("pq")]
public static extern string PQcmdStatus (IntPtr res);
// char *PQcmdStatus(PGresult *res);
[DllImport("pq")]
public static extern string PQoidStatus (IntPtr res);
// char *PQoidStatus(const PGresult *res);
[DllImport("pq")]
public static extern int PQoidValue (IntPtr res);
// Oid PQoidValue(const PGresult *res);
[DllImport("pq")]
public static extern string PQcmdTuples (IntPtr res);
// char *PQcmdTuples(PGresult *res);
[DllImport("pq")]
public static extern string PQgetvalue (IntPtr res,
int tup_num, int field_num);
// char *PQgetvalue(const PGresult *res,
// int tup_num, int field_num);
[DllImport("pq")]
public static extern int PQgetlength (IntPtr res,
int tup_num, int field_num);
// int PQgetlength(const PGresult *res,
// int tup_num, int field_num);
[DllImport("pq")]
public static extern int PQgetisnull (IntPtr res,
int tup_num, int field_num);
// int PQgetisnull(const PGresult *res,
// int tup_num, int field_num);
[DllImport("pq")]
public static extern void PQclear (IntPtr res);
// void PQclear(PGresult *res);
[DllImport("pq")]
public static extern IntPtr PQmakeEmptyPGresult (IntPtr conn,
IntPtr status);
// PGresult *PQmakeEmptyPGresult(PGconn *conn,
// ExecStatusType status);
[DllImport("pq")]
public static extern void PQprint (IntPtr fout,
IntPtr res, IntPtr ps);
// void PQprint(FILE *fout,
// const PGresult *res, const PQprintOpt *ps);
[DllImport("pq")]
public static extern void PQdisplayTuples (IntPtr res,
IntPtr fp, int fillAlign, string fieldSep,
int printHeader, int quiet);
// void PQdisplayTuples(const PGresult *res,
// FILE *fp, int fillAlign, const char *fieldSep,
// int printHeader, int quiet);
[DllImport("pq")]
public static extern void PQprintTuples (IntPtr res,
IntPtr fout, int printAttName, int terseOutput,
int width);
// void PQprintTuples(const PGresult *res,
// FILE *fout, int printAttName, int terseOutput,
// int width);
[DllImport("pq")]
public static extern int lo_open (IntPtr conn,
int lobjId, int mode);
// int lo_open(PGconn *conn,
// Oid lobjId, int mode);
[DllImport("pq")]
public static extern int lo_close (IntPtr conn, int fd);
// int lo_close(PGconn *conn, int fd);
[DllImport("pq")]
public static extern int lo_read (IntPtr conn,
int fd, string buf, int len);
// int lo_read(PGconn *conn,
// int fd, char *buf, size_t len);
[DllImport("pq")]
public static extern int lo_write (IntPtr conn,
int fd, string buf, int len);
// int lo_write(PGconn *conn,
// int fd, char *buf, size_t len);
[DllImport("pq")]
public static extern int lo_lseek (IntPtr conn,
int fd, int offset, int whence);
// int lo_lseek(PGconn *conn,
// int fd, int offset, int whence);
[DllImport("pq")]
public static extern int lo_creat (IntPtr conn,
int mode);
// Oid lo_creat(PGconn *conn,
// int mode);
[DllImport("pq")]
public static extern int lo_tell (IntPtr conn, int fd);
// int lo_tell(PGconn *conn, int fd);
[DllImport("pq")]
public static extern int lo_unlink (IntPtr conn,
int lobjId);
// int lo_unlink(PGconn *conn,
// Oid lobjId);
[DllImport("pq")]
public static extern int lo_import (IntPtr conn,
string filename);
// Oid lo_import(PGconn *conn,
// const char *filename);
[DllImport("pq")]
public static extern int lo_export (IntPtr conn,
int lobjId, string filename);
// int lo_export(PGconn *conn,
// Oid lobjId, const char *filename);
[DllImport("pq")]
public static extern int PQmblen (string s,
int encoding);
// int PQmblen(const unsigned char *s,
// int encoding);
[DllImport("pq")]
public static extern int PQenv2encoding ();
// int PQenv2encoding(void);
#endregion
}
}
@@ -0,0 +1,76 @@
//
// System.Data.SqlClient.SqlClientPermission.cs
//
// Author:
// Rodrigo Moya ([email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc 2002
//
using System;
using System.Data;
using System.Data.Common;
namespace System.Data.SqlClient {
public sealed class SqlClientPermission : DBDataPermission {
[MonoTODO]
public SqlClientPermission() {
// FIXME: do constructor
}
[MonoTODO]
public SqlClientPermission(PermissionState state) {
// FIXME: do constructor
}
[MonoTODO]
public SqlClientPermission(PermissionState state,
bool allowBlankPassword) {
throw new NotImplementedException ();
}
[MonoTODO]
public override IPermission Copy() {
throw new NotImplementedException ();
}
[MonoTODO]
public override void FromXml(SecurityElement
securityElement) {
throw new NotImplementedException ();
}
[MonoTODO]
public override IPermission Intersect(IPermission target) {
throw new NotImplementedException ();
}
[MonoTODO]
public override bool IsSubsetOf(IPermission target) {
throw new NotImplementedException ();
}
[MonoTODO]
public override string ToString() {
throw new NotImplementedException ();
}
[MonoTODO]
public override SecurityElement ToXml() {
throw new NotImplementedException ();
}
[MonoTODO]
public override IPermission Union(IPermission target) {
throw new NotImplementedException ();
}
[MonoTODO]
~SqlClientPermission() {
// FIXME: destructor to release resources
}
}
}
@@ -0,0 +1,51 @@
//
// System.Data.SqlClient.SqlClientPermissionAttribute.cs
//
// Author:
// Rodrigo Moya ([email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc 2002
//
using System;
using System.Data;
using System.Data.Common;
namespace System.Data.SqlClient {
[AttributeUsage(AttributeTargets.Assembly |
AttributeTargets.Class |
AttributeTargets.Struct |
AttributeTargets.Constructor |
AttributeTargets.Method)]
[Serializable]
public sealed class SqlClientPermissionAttribute :
DBDataPermissionAttribute {
[MonoTODO]
[AttributeUsage(AttributeTargets.Assembly |
AttributeTargets.Class |
AttributeTargets.Struct |
AttributeTargets.Constructor |
AttributeTargets.Method)]
[Serializable]
public SqlClientPermissionAttribute(SecurityAction action) {
// FIXME: do constructor
}
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class
| AttributeTargets.Struct | AttributeTargets.Constructor |
AttributeTargets.Method)]
[Serializable]
public override IPermission CreatePermission() {
throw new NotImplementedException ();
}
[MonoTODO]
~SqlClientPermissionAttribute() {
// FIXME: destructor to release resources
}
}
}
@@ -2,45 +2,379 @@
// System.Data.SqlClient.SqlCommand.cs
//
// Author:
// Rodrigo Moya (rd[email protected])
// Rodrigo Moya (rod[email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc
// (C) Ximian, Inc 2002
//
// use #define DEBUG_SqlCommand if you want to spew debug messages
// #define DEBUG_SqlCommand
using System;
using System.ComponentModel;
using System.Data;
using System.Data.Common;
using System.Runtime.InteropServices;
using System.Xml;
namespace System.Data.SqlClient
{
/// <summary>
/// Represents a SQL statement that is executed while connected to a SQL database.
/// Represents a SQL statement that is executed
/// while connected to a SQL database.
/// </summary>
public class SqlCommand : IDbCommand
// public sealed class SqlCommand : Component, IDbCommand, ICloneable
public sealed class SqlCommand : IDbCommand
{
void Cancel();
// FIXME: Console.WriteLine() is used for debugging throughout
#region Fields
string sql = "";
int timeout = 30;
// default is 30 seconds
// for command execution
SqlConnection conn = null;
SqlTransaction trans = null;
CommandType cmdType = CommandType.Text;
bool designTime = false;
SqlParameterCollection parmCollection = new
SqlParameterCollection();
#endregion // Fields
#region Constructors
public SqlCommand()
{
sql = "";
}
public SqlCommand (string cmdText)
{
sql = cmdText;
}
public SqlCommand (string cmdText, SqlConnection connection)
{
sql = cmdText;
conn = connection;
}
public SqlCommand (string cmdText, SqlConnection connection,
SqlTransaction transaction)
{
sql = cmdText;
conn = connection;
trans = transaction;
}
#endregion // Constructors
#region Methods
[MonoTODO]
public void Cancel ()
{
// FIXME: use non-blocking Exec for this
throw new NotImplementedException ();
}
// FIXME: is this the correct way to return a stronger type?
[MonoTODO]
IDbDataParameter IDbCommand.CreateParameter ()
{
return CreateParameter ();
}
[MonoTODO]
public SqlParameter CreateParameter ()
{
return new SqlParameter ();
}
[MonoTODO]
public int ExecuteNonQuery ()
{
IntPtr pgResult; // PGresult
int rowsAffected = -1;
ExecStatusType execStatus;
String rowsAffectedString;
if(conn.State != ConnectionState.Open)
throw new InvalidOperationException(
"ConnnectionState is not Open");
// FIXME: PQexec blocks
// while PQsendQuery is non-blocking
// which is better to use?
// int PQsendQuery(PGconn *conn,
// const char *query);
// execute SQL command
// uses internal property to get the PGConn IntPtr
pgResult = PostgresLibrary.
PQexec (conn.PostgresConnection, sql);
execStatus = PostgresLibrary.
PQresultStatus (pgResult);
if(execStatus == ExecStatusType.PGRES_COMMAND_OK)
{
rowsAffectedString = PostgresLibrary.
PQcmdTuples (pgResult);
#if DEBUG_SqlCommand
Console.WriteLine("rowsAffectedString: " +
rowsAffectedString);
#endif // DEBUG_SqlCommand
if(rowsAffectedString != null)
if(rowsAffectedString.Equals("") == false)
rowsAffected = int.Parse(rowsAffectedString);
}
else
{
String errorMessage;
errorMessage = PostgresLibrary.
PQresStatus(execStatus);
errorMessage += " " + PostgresLibrary.
PQresultErrorMessage(pgResult);
throw new SqlException(0, 0,
errorMessage, 0, "",
conn.DataSource, "SqlCommand", 0);
}
#if DEBUG_SqlCommand
String cmdStatus;
cmdStatus = PostgresLibrary.
PQcmdStatus(pgResult);
Console.WriteLine("*** Command Status: " +
cmdStatus);
#endif // DEBUG_SqlCommand
PostgresLibrary.PQclear (pgResult);
// FIXME: get number of rows
// affected for INSERT, UPDATE, or DELETE
// any other, return -1 (such as, CREATE TABLE)
return rowsAffected;
}
SqlParameter CreateParameter();
// FIXME: temporarily commmented out, so I could get a simple working
// SqlConnection and SqlCommand. I had to temporarily
// comment it out the ExecuteReader in IDbCommand as well.
/*
[MonoTODO]
IDataReader IDbCommand.ExecuteReader ()
{
throw new NotImplementedException ();
}
[MonoTODO]
SqlDataReader ExecuteReader ()
{
throw new NotImplementedException ();
}
[MonoTODO]
IDataReader IDbCommand.ExecuteReader (
CommandBehavior behavior)
{
throw new NotImplementedException ();
}
[MonoTODO]
public SqlDataReader ExecuteReader (CommandBehavior behavior)
{
throw new NotImplementedException ();
}
*/
[MonoTODO]
public object ExecuteScalar ()
{
throw new NotImplementedException ();
}
[MonoTODO]
public XmlReader ExecuteXmlReader ()
{
throw new NotImplementedException ();
}
[MonoTODO]
public void Prepare ()
{
// FIXME: parameters have to be implemented for this
throw new NotImplementedException ();
}
[MonoTODO]
public SqlCommand Clone ()
{
throw new NotImplementedException ();
}
#endregion // Methods
#region Properties
public string CommandText {
get {
return sql;
}
set {
sql = value;
}
}
public int CommandTimeout {
get {
return timeout;
}
set {
// FIXME: if value < 0, throw
// ArgumentException
// if (value < 0)
// throw ArgumentException;
timeout = value;
}
}
public CommandType CommandType {
get {
return cmdType;
}
set {
cmdType = value;
}
}
// FIXME: for property Connection, is this the correct
// way to handle a return of a stronger type?
IDbConnection IDbCommand.Connection {
get {
return Connection;
}
set {
// FIXME: throw an InvalidOperationException
// if the change was during a
// transaction in progress
// csc
Connection = (SqlConnection) value;
// mcs
// Connection = value;
// FIXME: set Transaction property to null
}
}
int ExecuteNonQuery();
public SqlConnection Connection {
get {
// conn defaults to null
return conn;
}
SqlDataReader ExecuteReader();
set {
// FIXME: throw an InvalidOperationException
// if the change was during
// a transaction in progress
conn = value;
// FIXME: set Transaction property to null
}
}
SqlDataReader ExecuteReader(CommandBehavior behavior);
public bool DesignTimeVisible {
get {
return designTime;
}
set{
designTime = value;
}
}
object ExecuteScalar();
// FIXME; for property Parameters, is this the correct
// way to handle a stronger return type?
IDataParameterCollection IDbCommand.Parameters {
get {
return Parameters;
}
}
void Prepare();
SqlParameterCollection Parameters {
get {
return parmCollection;
}
}
// FIXME: for property Transaction, is this the correct
// way to handle a return of a stronger type?
IDbTransaction IDbCommand.Transaction {
get {
return Transaction;
}
string CommandText{get; set;}
set {
// FIXME: error handling - do not allow
// setting of transaction if transaction
// has already begun
int CommandTimeout{get; set;}
// csc
Transaction = (SqlTransaction) value;
// mcs
// Transaction = value;
}
}
CommandType CommandType{get; set;}
public SqlTransaction Transaction {
get {
return trans;
}
SqlConnection Connection{get; set;}
set {
// FIXME: error handling
trans = value;
}
}
SqlParameterCollection Parameters{get;}
[MonoTODO]
public UpdateRowSource UpdatedRowSource {
// FIXME: do this once DbDataAdaptor
// and DataRow are done
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
IDbTransaction Transaction{get; set;}
#endregion // Properties
UpdateRowSource UpdatedRowSource{get; set;}
#region Destructors
[MonoTODO]
public void Dispose() {
// FIXME: need proper way to release resources
// Dispose(true);
}
[MonoTODO]
~SqlCommand()
{
// FIXME: need proper way to release resources
// Dispose(false);
}
#endregion //Destructors
}
}
@@ -0,0 +1,103 @@
//
// System.Data.SqlClient.SqlCommandBuilder.cs
//
// Author:
// Rodrigo Moya ([email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc 2002
//
using System;
using System.Data;
using System.ComponentModel;
namespace System.Data.SqlClient {
/// <summary>
/// Builder of one command
/// that will be used in manipulating a table for
/// a DataSet that is assoicated with a database.
/// </summary>
public sealed class SqlCommandBuilder : Component {
[MonoTODO]
public SqlCommandBuilder() {
}
[MonoTODO]
public SqlCommandBuilder(SqlDataAdapter adapter) {
}
[MonoTODO]
public SqlDataAdapter DataAdapter {
get {
throw new NotImplementedException ();
}
set{
throw new NotImplementedException ();
}
}
[MonoTODO]
public string QuotePrefix {
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
[MonoTODO]
public string QuoteSuffix {
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
[MonoTODO]
public static void DeriveParameters(SqlCommand command) {
throw new NotImplementedException ();
}
[MonoTODO]
public SqlCommand GetDeleteCommand() {
throw new NotImplementedException ();
}
[MonoTODO]
public SqlCommand GetInsertCommand() {
throw new NotImplementedException ();
}
[MonoTODO]
public SqlCommand GetUpdateCommand() {
throw new NotImplementedException ();
}
[MonoTODO]
public void RefreshSchema() {
throw new NotImplementedException ();
}
[MonoTODO]
protected override void Dispose(bool disposing) {
throw new NotImplementedException ();
}
[MonoTODO]
~SqlCommandBuilder() {
// FIXME: create destructor - release resources
}
}
}
@@ -3,37 +3,526 @@
//
// Author:
// Rodrigo Moya ([email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc
// (C) Ximian, Inc 2002
//
// use #define DEBUG_SqlConnection if you want to spew debug messages
// #define DEBUG_SqlConnection
using System;
using System.ComponentModel;
using System.Data;
using System.Data.Common;
using System.Runtime.InteropServices;
using System.Text;
namespace System.Data.SqlClient
{
// using PGconn = IntPtr;
// PGconn is native C library type in libpq for Postgres Connection
// using PGressult = IntPtr;
// PGresult is native C library type in libpq for Postgres Resultset
/// <summary>
/// Represents an open connection to a SQL data source
/// </summary>
public class SqlConnection : IDBConnection
//public sealed class SqlConnection : Component, IDbConnection,
// ICloneable
public sealed class SqlConnection : IDbConnection
{
SqlTransaction BeginTransaction();
// FIXME: Need to implement class Component,
// and interfaces: ICloneable and IDisposable
SqlTransaction BeginTransaction(IsolationLevel il);
#region Fields
void ChangeDatabase(string databaseName);
private IntPtr pgConn = IntPtr.Zero;
// PGConn (Postgres Connection)
private string connectionString = "";
// OLE DB Connection String
private string pgConnectionString = "";
// PostgreSQL Connection String
private SqlTransaction trans = null;
private int connectionTimeout = 15;
// default for 15 seconds
// connection parameters in connection string
private string host = "";
// Name of host to connect to
private string hostaddr = "";
// IP address of host to connect to
// should be in "n.n.n.n" format
private string port = "";
// Port number to connect to at the server host
private string dbname = ""; // The database name.
private string user = ""; // User name to connect as.
private string password = "";
// Password to be used if the server
// demands password authentication.
private string options = "";
// Trace/debug options to be sent to the server.
private string tty = "";
// A file or tty for optional
// debug output from the backend.
private string requiressl = "";
// Set to 1 to require
// SSL connection to the backend.
// Libpq will then refuse to connect
// if the server does not
// support SSL. Set to 0 (default) to
// negotiate with server.
void Close();
ConnectionState conState = ConnectionState.Closed;
SqlCommand CreateCommand();
#endregion // Fields
void Open();
#region Constructors
/*
[MonoTODO]
public SqlConnection ()
{
this.ConnectionString = null;
this.ConnectionTimeout = 0;
this.Database = null;
this.State = 0;
}
[MonoTODO]
public SqlConnection (string cs) : SqlConnection ()
{
this.ConnectionString = cs;
}
*/
// A lot of the defaults were initialized in the Fields
[MonoTODO]
public SqlConnection ()
{
string ConnectionString{get; set;}
}
[MonoTODO]
public SqlConnection (String connectionString)
{
SetConnectionString (connectionString);
}
int ConnectionTimeout{get;}
#endregion // Constructors
string Database{get;}
#region Destructors
ConnectionState State{get;}
[MonoTODO]
public void Dispose () {
// FIXME: release resources properly
Close ();
// Dispose (true);
}
// aka Finalize
// [ClassInterface(ClassInterfaceType.AutoDual)]
[MonoTODO]
~SqlConnection()
{
// FIXME: this class need
// a destructor to release resources
// Also, take a look at Dispose
// Dispose (false);
}
#endregion // Destructors
#region Public Methods
IDbTransaction IDbConnection.BeginTransaction ()
{
return BeginTransaction ();
}
public SqlTransaction BeginTransaction ()
{
return TransactionBegin (); // call private method
}
IDbTransaction IDbConnection.BeginTransaction (IsolationLevel
il)
{
return BeginTransaction (il);
}
public SqlTransaction BeginTransaction (IsolationLevel il)
{
return TransactionBegin (il); // call private method
}
// PostgreSQL does not support named transactions/savepoint
// nor nested transactions
[Obsolete]
public SqlTransaction BeginTransaction(string transactionName) {
return TransactionBegin (); // call private method
}
[Obsolete]
public SqlTransaction BeginTransaction(IsolationLevel iso,
string transactionName) {
return TransactionBegin (iso); // call private method
}
[MonoTODO]
public void ChangeDatabase (string databaseName)
{
throw new NotImplementedException ();
}
[MonoTODO]
public void Close ()
{
CloseDataSource ();
}
IDbCommand IDbConnection.CreateCommand ()
{
return CreateCommand ();
}
public SqlCommand CreateCommand ()
{
SqlCommand sqlcmd = new SqlCommand ("", this);
return sqlcmd;
}
[MonoTODO]
public void Open ()
{
OpenDataSource ();
}
#endregion // Public Methods
#region Internal Methods
// this is for System.Data.SqlClient classes
// to get the Postgres connection
internal IntPtr PostgresConnection {
get {
return pgConn;
}
}
#endregion // Internal Methods
#region Protected Methods
// FIXME: protected override void Dispose overrides Component
// however, including Component causes other problems
/*
[MonoTODO]
protected override void Dispose (bool disposing)
{
throw new NotImplementedException ();
}
*/
#endregion
#region Private Methods
private void OpenDataSource ()
{
if(dbname.Equals(""))
throw new InvalidOperationException(
"dbname missing");
else if(conState == ConnectionState.Open)
throw new InvalidOperationException(
"ConnnectionState is already Open");
ConnStatusType connStatus;
// FIXME: check to make sure we have
// everything to connect,
// otherwise, throw an exception
pgConn = PostgresLibrary.PQconnectdb
(pgConnectionString);
// FIXME: should we use PQconnectStart/PQconnectPoll
// instead of PQconnectdb?
// PQconnectdb blocks
// PQconnectStart/PQconnectPoll is non-blocking
connStatus = PostgresLibrary.PQstatus (pgConn);
if(connStatus == ConnStatusType.CONNECTION_OK)
{
// Successfully Connected
conState = ConnectionState.Open;
}
else
{
String errorMessage = PostgresLibrary.
PQerrorMessage (pgConn);
errorMessage += ": Could not connect to database.";
throw new SqlException(0, 0,
errorMessage, 0, "",
host, "SqlConnection", 0);
}
}
private void CloseDataSource ()
{
// FIXME: just a quick hack
conState = ConnectionState.Closed;
PostgresLibrary.PQfinish (pgConn);
}
private void SetConnectionString (string connectionString)
{
// FIXME: perform error checking on string
// while translating string from
// OLE DB format to PostgreSQL
// connection string format
//
// OLE DB: "host=localhost;dbname=test;user=joe;password=smoe"
// PostgreSQL: "host=localhost dbname=test user=joe password=smoe"
//
// For OLE DB, you would have the additional
// "provider=postgresql"
// OleDbConnection you would be using libgda, maybe
// it would be
// "provider=OAFIID:GNOME_Database_Postgres_Provider"
// instead.
//
// Also, parse the connection string into properties
// FIXME: if connection is open, you can
// not set the connection
// string, throw an exception
this.connectionString = connectionString;
pgConnectionString = ConvertStringToPostgres (
connectionString);
#if DEBUG_SqlConnection
Console.WriteLine(
"OLE-DB Connection String [in]: " +
this.ConnectionString);
Console.WriteLine(
"Postgres Connection String [out]: " +
pgConnectionString);
#endif // DEBUG_SqlConnection
}
private String ConvertStringToPostgres (String
oleDbConnectionString)
{
StringBuilder postgresConnection =
new StringBuilder();
string result;
string[] connectionParameters;
char[] semicolon = new Char[1];
semicolon[0] = ';';
// FIXME: what is the max number of value pairs
// can there be for the OLE DB
// connnection string? what about libgda max?
// what about postgres max?
// FIXME: currently assuming value pairs are like:
// "key1=value1;key2=value2;key3=value3"
// Need to deal with values that have
// single or double quotes. And error
// handling of that too.
// "key1=value1;key2='value2';key=\"value3\""
// FIXME: put the connection parameters
// from the connection
// string into a
// Hashtable (System.Collections)
// instead of using private variables
// to store them
connectionParameters = oleDbConnectionString.
Split (semicolon);
foreach (string sParameter in connectionParameters) {
if(sParameter.Length > 0) {
BreakConnectionParameter (sParameter);
postgresConnection.
Append (sParameter +
" ");
}
}
result = postgresConnection.ToString ();
return result;
}
private bool BreakConnectionParameter (String sParameter)
{
bool addParm = true;
int index;
index = sParameter.IndexOf ("=");
if (index > 0) {
string parmKey, parmValue;
// separate string "key=value" to
// string "key" and "value"
parmKey = sParameter.Substring (0, index);
parmValue = sParameter.Substring (index + 1,
sParameter.Length - index - 1);
switch(parmKey.ToLower()) {
case "hostaddr":
hostaddr = parmValue;
break;
case "port":
port = parmValue;
break;
case "host":
// set DataSource property
host = parmValue;
break;
case "dbname":
// set Database property
dbname = parmValue;
break;
case "user":
user = parmValue;
break;
case "password":
password = parmValue;
// addParm = false;
break;
case "options":
options = parmValue;
break;
case "tty":
tty = parmValue;
break;
case "requiressl":
requiressl = parmValue;
break;
}
}
return addParm;
}
private SqlTransaction TransactionBegin ()
{
// FIXME: need to keep track of
// transaction in-progress
trans = new SqlTransaction ();
// using internal methods of SqlTransaction
trans.SetConnection (this);
trans.Begin();
return trans;
}
private SqlTransaction TransactionBegin (IsolationLevel il)
{
// FIXME: need to keep track of
// transaction in-progress
TransactionBegin();
trans.SetIsolationLevel (il);
return trans;
}
#endregion
#region Properties
[MonoTODO]
public ConnectionState State {
get {
return conState;
}
}
public string ConnectionString {
get {
return connectionString;
}
set {
SetConnectionString (value);
}
}
public int ConnectionTimeout {
get {
return connectionTimeout;
}
}
public string Database {
get {
return dbname;
}
}
public string DataSource {
get {
return host;
}
}
/*
* FIXME: this is here because of Component?
[MonoTODO]
protected bool DesignMode {
get {
throw new NotImplementedException ();
}
}
*/
public int PacketSize {
get {
throw new NotImplementedException ();
}
}
public string ServerVersion {
get {
throw new NotImplementedException ();
}
}
internal SqlTransaction Transaction {
get {
return trans;
}
}
#endregion
#region Events and Delegates
// FIXME: the two events belong here
// however, i do not know about the delegates
// also, they are stubs for now
/*
public delegate void
SqlInfoMessageEventHandler (object sender,
SqlInfoMessageEventArgs e);
public event
SqlInfoMessageEventHandler InfoMessage;
public event
StateChangeEventHandler StateChange;
*/
#endregion
}
}
@@ -3,23 +3,229 @@
//
// Author:
// Rodrigo Moya ([email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc
// (C) Ximian, Inc 2002
//
using System;
using System.ComponentModel;
using System.Data;
using System.Data.Common;
namespace System.Data.SqlClient
{
/// <summary>
/// Represents a set of command-related properties that are used to fill the DataSet and update a data source, all this from a SQL database.
/// Represents a set of command-related properties that are used
/// to fill the DataSet and update a data source, all this
/// from a SQL database.
/// </summary>
public class SqlDataAdapter : IDbDataAdapter
public sealed class SqlDataAdapter : DbDataAdapter, IDbDataAdapter
{
SqlCommand DeleteCommand{get; set;}
#region Properties
SqlCommand InsertCommand{get; set;}
[MonoTODO]
public SqlCommand DeleteCommand {
get {
throw new NotImplementedException ();
}
SqlCommand SelectCommand{get; set;}
set {
throw new NotImplementedException ();
}
}
[MonoTODO]
public SqlCommand InsertCommand {
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
[MonoTODO]
public SqlCommand SelectCommand {
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
public SqlCommand UpdateCommand {
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
#endregion // Properties
#region Methods
[MonoTODO]
public override int Fill(DataSet dataSet) {
throw new NotImplementedException ();
}
[MonoTODO]
public int Fill(DataTable dataTable) {
throw new NotImplementedException ();
}
[MonoTODO]
public int Fill(DataSet dataSet, string srcTable) {
throw new NotImplementedException ();
}
[MonoTODO]
protected virtual int Fill(DataTable dataTable,
IDataReader dataReader) {
throw new NotImplementedException ();
}
[MonoTODO]
protected virtual int Fill(DataTable dataTable,
IDbCommand command,
CommandBehavior behavior) {
throw new NotImplementedException ();
}
[MonoTODO]
public int Fill(DataSet dataSet, int startRecord,
int maxRecords, string srcTable) {
throw new NotImplementedException ();
}
[MonoTODO]
protected virtual int Fill(DataSet dataSet,
string srcTable, IDataReader dataReader,
int startRecord, int maxRecords) {
throw new NotImplementedException ();
}
[MonoTODO]
protected virtual int Fill(DataSet dataSet,
int startRecord, int maxRecords,
string srcTable, IDbCommand command,
CommandBehavior behavior) {
throw new NotImplementedException ();
}
[MonoTODO]
public override DataTable[] FillSchema(DataSet dataSet,
SchemaType schemaType) {
throw new NotImplementedException ();
}
[MonoTODO]
public DataTable FillSchema(DataTable dataTable,
SchemaType schemaType) {
throw new NotImplementedException ();
}
[MonoTODO]
public DataTable[] FillSchema(DataSet dataSet,
SchemaType schemaType, string srcTable) {
throw new NotImplementedException ();
}
[MonoTODO]
protected virtual DataTable FillSchema(DataTable dataTable,
SchemaType schemaType, IDbCommand command,
CommandBehavior behavior) {
throw new NotImplementedException ();
}
[MonoTODO]
protected virtual DataTable[] FillSchema(DataSet dataSet,
SchemaType schemaType, IDbCommand command,
string srcTable, CommandBehavior behavior) {
throw new NotImplementedException ();
}
[MonoTODO]
public override IDataParameter[] GetFillParameters() {
throw new NotImplementedException ();
}
[MonoTODO]
public int Update(DataRow[] dataRows) {
throw new NotImplementedException ();
}
[MonoTODO]
public override int Update(DataSet dataSet) {
throw new NotImplementedException ();
}
[MonoTODO]
public int Update(DataTable dataTable) {
throw new NotImplementedException ();
}
[MonoTODO]
protected virtual int Update(DataRow[] dataRows,
DataTableMapping tableMapping) {
throw new NotImplementedException ();
}
[MonoTODO]
public int Update(DataSet dataSet, string srcTable) {
throw new NotImplementedException ();
}
[MonoTODO]
protected override RowUpdatedEventArgs CreateRowUpdatedEvent(
DataRow dataRow,
IDbCommand command,
StatementType statementType,
DataTableMapping tableMapping) {
throw new NotImplementedException ();
}
[MonoTODO]
protected override RowUpdatingEventArgs CreateRowUpdatingEvent(
DataRow dataRow,
IDbCommand command,
StatementType statementType,
DataTableMapping tableMapping) {
throw new NotImplementedException ();
}
[MonoTODO]
protected virtual void OnFillError(FillErrorEventArgs value) {
throw new NotImplementedException ();
}
protected override void OnRowUpdated(RowUpdatedEventArgs value) {
throw new NotImplementedException ();
}
protected override void OnRowUpdating(RowUpdatingEventArgs value) {
throw new NotImplementedException ();
}
#endregion // Methods
#region Events and Delegates
public event FillErrorEventHandler FillError;
public event SqlRowUpdatedEventHandler RowUpdated;
public event SqlRowUpdatingEventHandler RowUpdating;
#endregion // Events and Delegates
SqlCommand UpdateCommand{get; set;}
}
}
@@ -3,31 +3,261 @@
//
// Author:
// Rodrigo Moya ([email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc
// (C) Ximian, Inc 2002
//
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
namespace System.Data.SqlClient
{
/// <summary>
/// Provides a means of reading one or more forward-only streams of result sets obtained by executing a command at a SQL database.
/// Provides a means of reading one or more forward-only streams
/// of result sets obtained by executing a command
/// at a SQL database.
/// </summary>
public interface SqlDataReader : IDataReader
//public sealed class SqlDataReader : MarshalByRefObject,
// IEnumerable, IDataReader, IDisposable, IDataRecord
public sealed class SqlDataReader : IEnumerable,
IDataReader, IDataRecord
{
void Close();
DataTable GetSchemaTable();
bool NextResult();
#region Fields
bool Read();
DataTable tableSchema;
DataTable tableRow;
int Depth{get;}
#endregion // Fields
bool IsClosed{get;}
#region Public Methods
int RecordsAffected{get;}
[MonoTODO]
public void Close()
{
throw new NotImplementedException ();
}
[MonoTODO]
public DataTable GetSchemaTable()
{
throw new NotImplementedException ();
}
[MonoTODO]
public bool NextResult()
{
throw new NotImplementedException ();
}
[MonoTODO]
public bool Read()
{
throw new NotImplementedException ();
}
[MonoTODO]
public byte GetByte(int i)
{
throw new NotImplementedException ();
}
[MonoTODO]
public long GetBytes(int i, long fieldOffset,
byte[] buffer, int bufferOffset,
int length)
{
throw new NotImplementedException ();
}
[MonoTODO]
public char GetChar(int i)
{
throw new NotImplementedException ();
}
[MonoTODO]
public long GetChars(int i, long fieldOffset,
char[] buffer, int bufferOffset,
int length)
{
throw new NotImplementedException ();
}
[MonoTODO]
public IDataReader GetData(int i)
{
throw new NotImplementedException ();
}
[MonoTODO]
public string GetDataTypeName(int i)
{
throw new NotImplementedException ();
}
[MonoTODO]
public DateTime GetDateTime(int i)
{
throw new NotImplementedException ();
}
[MonoTODO]
public decimal GetDecimal(int i)
{
throw new NotImplementedException ();
}
[MonoTODO]
public double GetDouble(int i)
{
throw new NotImplementedException ();
}
[MonoTODO]
public Type GetFieldType(int i)
{
throw new NotImplementedException ();
}
[MonoTODO]
public float GetFloat(int i)
{
throw new NotImplementedException ();
}
[MonoTODO]
public Guid GetGuid(int i)
{
throw new NotImplementedException ();
}
[MonoTODO]
public short GetInt16(int i)
{
throw new NotImplementedException ();
}
[MonoTODO]
public int GetInt32(int i)
{
throw new NotImplementedException ();
}
[MonoTODO]
public long GetInt64(int i)
{
throw new NotImplementedException ();
}
[MonoTODO]
public string GetName(int i)
{
throw new NotImplementedException ();
}
[MonoTODO]
public int GetOrdinal(string name)
{
throw new NotImplementedException ();
}
[MonoTODO]
public string GetString(int i)
{
throw new NotImplementedException ();
}
[MonoTODO]
public object GetValue(int i)
{
throw new NotImplementedException ();
}
[MonoTODO]
public int GetValues(object[] values)
{
throw new NotImplementedException ();
}
[MonoTODO]
public bool IsDBNull(int i)
{
throw new NotImplementedException ();
}
[MonoTODO]
public bool GetBoolean(int i)
{
throw new NotImplementedException ();
}
[MonoTODO]
public IEnumerator GetEnumerator() {
throw new NotImplementedException ();
}
#endregion // Public Methods
#region // Destructors
[MonoTODO]
public void Dispose () {
}
[MonoTODO]
~SqlDataReader() {
}
#endregion // Destructors
#region Properties
public int Depth {
[MonoTODO]
get {
throw new NotImplementedException ();
}
}
public bool IsClosed {
[MonoTODO]
get {
throw new NotImplementedException ();
}
}
public int RecordsAffected {
[MonoTODO]
get {
throw new NotImplementedException ();
}
}
public int FieldCount {
[MonoTODO]
get {
throw new NotImplementedException ();
}
}
public object this[string name] {
[MonoTODO]
get {
throw new NotImplementedException ();
}
}
public object this[int i] {
[MonoTODO]
get
{
throw new NotImplementedException ();
}
}
#endregion // Properties
}
}
@@ -3,18 +3,153 @@
//
// Author:
// Rodrigo Moya ([email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc
// (C) Ximian, Inc 2002
//
using System;
using System.Data;
using System.Runtime.InteropServices;
namespace System.Data.SqlClient
{
/// <summary>
/// Describes an error from a SQL database.
/// </summary>
public class SqlError
[MonoTODO]
public sealed class SqlError
{
// TODO
byte theClass = 0;
int lineNumber = 0;
string message = "";
int number = 0;
string procedure = "";
string server = "";
string source = "";
byte state = 0;
internal SqlError(byte theClass, int lineNumber,
string message, int number, string procedure,
string server, string source, byte state) {
this.theClass = theClass;
this.lineNumber = lineNumber;
this.message = message;
this.number = number;
this.procedure = procedure;
this.server = server;
this.source = source;
this.state = state;
}
#region Properties
[MonoTODO]
/// <summary>
/// severity level of the error
/// </summary>
public byte Class {
get {
return theClass;
}
}
[MonoTODO]
public int LineNumber {
get {
return lineNumber;
}
}
[MonoTODO]
public string Message {
get {
return message;
}
}
[MonoTODO]
public int Number {
get {
return number;
}
}
[MonoTODO]
public string Procedure {
get {
return procedure;
}
}
[MonoTODO]
public string Server {
get {
return server;
}
}
[MonoTODO]
public string Source {
get {
return source;
}
}
[MonoTODO]
public byte State {
get {
return state;
}
}
#endregion
#region Methods
[MonoTODO]
public override string ToString ()
{
String toStr;
String stackTrace;
stackTrace = " <Stack Trace>";
// FIXME: generate the correct SQL error string
toStr = "SqlError:" + message + stackTrace;
return toStr;
}
internal void SetClass(byte theClass) {
this.theClass = theClass;
}
internal void SetLineNumber(int lineNumber) {
this.lineNumber = lineNumber;
}
internal void SetMessage(string message) {
this.message = message;
}
internal void SetNumber(int number) {
this.number = number;
}
internal void SetProcedure(string procedure) {
this.procedure = procedure;
}
internal void SetServer(string server) {
this.server = server;
}
internal void SetSource(string source) {
this.source = source;
}
internal void SetState(byte state) {
this.state = state;
}
#endregion
}
}
@@ -0,0 +1,114 @@
//
// System.Data.SqlClient.SqlError.cs
//
// Author:
// Rodrigo Moya ([email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc 2002
//
using System;
using System.Collections;
using System.Data;
using System.Runtime.InteropServices;
namespace System.Data.SqlClient
{
/// <summary>
/// Describes an error from a SQL database.
/// </summary>
[MonoTODO]
public sealed class SqlErrorCollection : ICollection, IEnumerable
{
ArrayList errorList = new ArrayList();
internal SqlErrorCollection() {
}
internal SqlErrorCollection(byte theClass, int lineNumber,
string message, int number, string procedure,
string server, string source, byte state) {
Add (theClass, lineNumber, message,
number, procedure,
server, source, state);
}
#region Properties
[MonoTODO]
public int Count {
get {
return errorList.Count;
}
}
[MonoTODO]
public void CopyTo(Array array, int index) {
throw new NotImplementedException ();
}
// [MonoTODO]
bool ICollection.IsSynchronized {
get {
throw new NotImplementedException ();
}
}
// [MonoTODO]
object ICollection.SyncRoot {
get {
throw new NotImplementedException ();
}
}
[MonoTODO]
public IEnumerator GetEnumerator() {
throw new NotImplementedException ();
}
// Index property (indexer)
// [MonoTODO]
public SqlError this[int index] {
get {
return (SqlError) errorList[index];
}
}
#endregion
#region Methods
[MonoTODO]
public override string ToString()
{
throw new NotImplementedException ();
}
#endregion
internal void Add(SqlError error) {
errorList.Add(error);
}
internal void Add(byte theClass, int lineNumber,
string message, int number, string procedure,
string server, string source, byte state) {
SqlError error = new SqlError(theClass,
lineNumber, message,
number, procedure,
server, source, state);
Add(error);
}
#region Destructors
[MonoTODO]
~SqlErrorCollection()
{
// FIXME: do the destructor - release resources
}
#endregion
}
}
@@ -3,18 +3,200 @@
//
// Author:
// Rodrigo Moya ([email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc
//
using System;
using System.Data;
using System.Runtime.Serialization;
namespace System.Data.SqlClient
{
/// <summary>
/// Exceptions, as returned by SQL databases.
/// </summary>
public class SqlException : SystemException
public sealed class SqlException : SystemException
{
// TODO
private SqlErrorCollection errors;
internal SqlException() {
errors = new SqlErrorCollection();
}
internal SqlException(byte theClass, int lineNumber,
string message, int number, string procedure,
string server, string source, byte state) {
errors = new SqlErrorCollection (theClass,
lineNumber, message,
number, procedure,
server, source, state);
}
#region Properties
[MonoTODO]
public byte Class {
get {
if(errors.Count == 0)
return 0; // FIXME: throw exception here?
else
return errors[0].Class;
}
set {
errors[0].SetClass(value);
}
}
[MonoTODO]
public SqlErrorCollection Errors {
get {
return errors;
}
set {
errors = value;
}
}
[MonoTODO]
public int LineNumber {
get {
if(errors.Count == 0)
return 0; // FIXME: throw exception here?
return errors[0].LineNumber;
}
set {
errors[0].SetLineNumber(value);
}
}
[MonoTODO]
public override string Message {
get {
if(errors.Count == 0)
return ""; // FIXME: throw exception?
else {
String msg = "";
int i = 0;
for(i = 0; i < errors.Count - 1; i++) {
msg = msg + errors[i].Message + "\n";
}
msg = msg + errors[i].Message;
return msg;
}
}
}
[MonoTODO]
public int Number {
get {
if(errors.Count == 0)
return 0; // FIXME: throw exception?
else
return errors[0].Number;
}
set {
errors[0].SetNumber(value);
}
}
[MonoTODO]
public string Procedure {
get {
if(errors.Count == 0)
return ""; // FIXME: throw exception?
else
return errors[0].Procedure;
}
set {
errors[0].SetProcedure(value);
}
}
[MonoTODO]
public string Server {
get {
if(errors.Count == 0)
return ""; // FIXME: throw exception?
else
return errors[0].Server;
}
set {
errors[0].SetServer(value);
}
}
[MonoTODO]
public override string Source {
get {
if(errors.Count == 0)
return ""; // FIXME: throw exception?
else
return errors[0].Source;
}
set {
errors[0].SetSource(value);
}
}
[MonoTODO]
public byte State {
get {
if(errors.Count == 0)
return 0; // FIXME: throw exception?
else
return errors[0].State;
}
set {
errors[0].SetState(value);
}
}
#endregion // Properties
#region Methods
[MonoTODO]
public override void GetObjectData(SerializationInfo si,
StreamingContext context) {
// FIXME: to do
}
// [Serializable]
// [ClassInterface(ClassInterfaceType.AutoDual)]
public override string ToString() {
String toStr = "";
for (int i = 0; i < errors.Count; i++) {
toStr = toStr + errors[i].ToString() + "\n";
}
return toStr;
}
internal void Add(byte theClass, int lineNumber,
string message, int number, string procedure,
string server, string source, byte state) {
errors.Add (theClass, lineNumber, message,
number, procedure,
server, source, state);
}
[MonoTODO]
~SqlException() {
// FIXME: destructor to release resources
}
#endregion // Methods
}
}
@@ -0,0 +1,50 @@
//
// System.Data.SqlClient.SqlInfoMessageEventArgs.cs
//
// Author:
// Rodrigo Moya ([email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc 2002
//
using System;
using System.Data;
namespace System.Data.SqlClient
{
public sealed class SqlInfoMessageEventArgs : EventArgs
{
[MonoTODO]
public SqlErrorCollection Errors {
get {
throw new NotImplementedException ();
}
}
[MonoTODO]
public string Message
{
get {
throw new NotImplementedException ();
}
}
[MonoTODO]
public string Source {
get {
throw new NotImplementedException ();
}
}
[MonoTODO]
public override string ToString() {
// representation of InfoMessage event
}
[MonoTODO]
~SqlInfoMessageEventArgs() {
// FIXME: destructor needs to release resources
}
}
}
@@ -0,0 +1,19 @@
//
// System.Data.SqlClient.SqlInfoMessageEventHandler.cs
//
// Author:
// Rodrigo Moya ([email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc 2002
//
using System;
using System.Data;
namespace System.Data.SqlClient
{
public delegate void
SqlInfoMessageEventHandler (object sender,
SqlInfoMessageEventArgs e);
}
@@ -3,37 +3,194 @@
//
// Author:
// Rodrigo Moya ([email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc.
// (C) Ximian, Inc. 2002
//
using System;
using System.ComponentModel;
using System.Data;
using System.Data.Common;
using System.Runtime.InteropServices;
namespace System.Data.SqlClient
{
/// <summary>
/// Represents a parameter to a Command object, and optionally, its mapping to DataSet columns; and is implemented by .NET data providers that access data sources.
/// Represents a parameter to a Command object, and optionally,
/// its mapping to DataSet columns; and is implemented by .NET
/// data providers that access data sources.
/// </summary>
public class SqlParameter : IDbDataParameter, IDataParameter
//public sealed class SqlParameter : MarshalByRefObject,
// IDbDataParameter, IDataParameter, ICloneable
public sealed class SqlParameter : IDbDataParameter, IDataParameter
{
[MonoTODO]
public SqlParameter () {
// FIXME: do this
}
[MonoTODO]
public SqlParameter (string parameterName, object value) {
// FIXME: do this
}
DbType DbType{get;set;}
[MonoTODO]
public SqlParameter(string parameterName, SqlDbType dbType) {
// FIXME: do this
}
ParameterDirection Direction{get;set;}
[MonoTODO]
public SqlParameter(string parameterName, SqlDbType dbType,
int size) {
// FIXME: do this
}
[MonoTODO]
public SqlParameter(string parameterName, SqlDbType dbType,
int size, string sourceColumn) {
// FIXME: do this
}
[MonoTODO]
public SqlParameter(string parameterName, SqlDbType dbType,
int size, ParameterDirection direction,
bool isNullable, byte precision,
byte scale, string sourceColumn,
DataRowVersion sourceVersion, object value) {
// FIXME: do this
}
bool IsNullable{get;}
string ParameterName{get;set;}
[MonoTODO]
public DbType DbType {
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
string SourceColumn{get;set;}
[MonoTODO]
public ParameterDirection Direction {
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
DataRowVersion SourceVersion {get;set;}
[MonoTODO]
public bool IsNullable {
get {
throw new NotImplementedException ();
}
}
object Value {get;set;}
[MonoTODO]
public int Offset {
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
byte Precision{get; set;}
[MonoTODO]
public string ParameterName {
get {
throw new NotImplementedException ();
}
byte Scale{get; set;}
set {
throw new NotImplementedException ();
}
}
int Size{get; set;}
[MonoTODO]
public string SourceColumn {
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
[MonoTODO]
public DataRowVersion SourceVersion {
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
[MonoTODO]
public SqlDbType SqlDbType {
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
[MonoTODO]
public object Value {
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
[MonoTODO]
public byte Precision {
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
[MonoTODO]
public byte Scale {
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
[MonoTODO]
public int Size
{
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
[MonoTODO]
public override string ToString() {
throw new NotImplementedException ();
}
}
}
@@ -3,25 +3,229 @@
//
// Author:
// Rodrigo Moya ([email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc
// (C) Ximian, Inc 2002
//
using System;
using System.ComponentModel;
using System.Data;
using System.Collections;
namespace System.Data.SqlClient
{
/// <summary>
/// Collects all parameters relevant to a Command object and their mappings to DataSet columns.
/// Collects all parameters relevant to a Command object
/// and their mappings to DataSet columns.
/// </summary>
public class SqlParameterCollection : IDataParameterCollection
// public sealed class SqlParameterCollection : MarshalByRefObject,
// IDataParameterCollection, IList, ICollection, IEnumerable
public sealed class SqlParameterCollection : IDataParameterCollection
{
void RemoveAt(string parameterName);
[MonoTODO]
public void RemoveAt(string parameterName)
{
throw new NotImplementedException ();
}
[MonoTODO]
public int IndexOf(string parameterName)
{
throw new NotImplementedException ();
}
[MonoTODO]
public bool Contains(string parameterName)
{
throw new NotImplementedException ();
}
// [MonoTODO]
public object this[string parameterName]
{
get { throw new NotImplementedException (); }
set { throw new NotImplementedException (); }
}
[MonoTODO]
public IEnumerator GetEnumerator()
{
throw new NotImplementedException ();
}
[MonoTODO]
public int Add( object value)
{
throw new NotImplementedException ();
}
[MonoTODO]
public SqlParameter Add(SqlParameter value)
{
throw new NotImplementedException ();
}
[MonoTODO]
public SqlParameter Add(string parameterName, object value)
{
throw new NotImplementedException ();
}
[MonoTODO]
public SqlParameter Add(string parameterName, SqlDbType sqlDbType)
{
throw new NotImplementedException ();
}
[MonoTODO]
public SqlParameter Add(string parameterName,
SqlDbType sqlDbType, int size)
{
throw new NotImplementedException ();
}
[MonoTODO]
public SqlParameter Add(string parameterName,
SqlDbType sqlDbType, int size, string sourceColumn)
{
throw new NotImplementedException ();
}
[MonoTODO]
public void Clear()
{
throw new NotImplementedException ();
}
[MonoTODO]
public bool Contains(object value)
{
throw new NotImplementedException ();
}
/*
[MonoTODO]
public bool Contains(string value)
{
throw new NotImplementedException ();
}
int IndexOf(string parameterName);
bool Contains(string parameterName);
*/
[MonoTODO]
public void CopyTo(Array array, int index)
{
throw new NotImplementedException ();
}
[MonoTODO]
public int IndexOf(object value)
{
throw new NotImplementedException ();
}
/*
[MonoTODO]
public int IndexOf(string parameterName)
{
throw new NotImplementedException ();
}
*/
[MonoTODO]
public void Insert(int index, object value)
{
throw new NotImplementedException ();
}
[MonoTODO]
public void Remove(object value)
{
throw new NotImplementedException ();
}
[MonoTODO]
public void RemoveAt(int index)
{
throw new NotImplementedException ();
}
/*
[MonoTODO]
public void RemoveAt(string parameterName)
{
throw new NotImplementedException ();
}
*/
/*
[MonoTODO]
[Serializable]
[ClassInterface(ClassInterfaceType.AutoDual)]
~SqlParameterCollection();
*/
[MonoTODO]
public int Count {
get {
throw new NotImplementedException ();
}
}
// [MonoTODO]
object IList.this[int index] {
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
// [MonoTODO]
public SqlParameter this[int index] {
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
/*
[MonoTODO]
public SqlParameter this[string parameterName] {
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
*/
bool IList.IsFixedSize {
get {
throw new NotImplementedException ();
}
}
bool IList.IsReadOnly {
get {
throw new NotImplementedException ();
}
}
bool ICollection.IsSynchronized {
get {
throw new NotImplementedException ();
}
}
object ICollection.SyncRoot {
get {
throw new NotImplementedException ();
}
}
object this[string parameterName]{get; set;}
}
}
@@ -0,0 +1,38 @@
//
// System.Data.SqlClient.SqlRowUpdatedEventArgs.cs
//
// Author:
// Rodrigo Moya ([email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc 2002
//
using System;
using System.Data;
using System.Data.Common;
namespace System.Data.SqlClient {
public sealed class SqlRowUpdatedEventArgs : RowUpdatedEventArgs {
[MonoTODO]
public SqlRowUpdatedEventArgs (DataRow row,
IDbCommand command, StatementType statementType,
DataTableMapping tableMapping) {
// FIXME: do the constructor
}
[MonoTODO]
public new SqlCommand Command {
get {
}
}
[MonoTODO]
~SqlRowUpdatedEventArgs () {
// FIXME: need destructor to release resources
}
}
}
@@ -0,0 +1,18 @@
//
// System.Data.SqlClient.SqlRowUpdatedEventHandler.cs
//
// Author:
// Rodrigo Moya ([email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc 2002
//
using System;
using System.Data;
namespace System.Data.SqlClient
{
public delegate void SqlRowUpdatedEventHandler(object sender,
SqlRowUpdatedEventArgs e);
}
@@ -0,0 +1,42 @@
//
// System.Data.SqlClient.SqlRowUpdatingEventArgs.cs
//
// Author:
// Rodrigo Moya ([email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc 2002
//
using System;
using System.Data;
using System.Data.Common;
namespace System.Data.SqlClient
{
public sealed class SqlRowUpdatingEventArgs : RowUpdatingEventArgs
{
[MonoTODO]
public SqlRowUpdatingEventArgs( DataRow row,
IDbCommand command, StatementType statementType,
DataTableMapping tableMapping) {
// FIXME: do the constructor
}
[MonoTODO]
public new SqlCommand Command {
get {
throw new NotImplementedException ();
}
set {
throw new NotImplementedException ();
}
}
[MonoTODO]
~SqlRowUpdatingEventArgs() {
// FIXME: create destructor to release resources
}
}
}
@@ -0,0 +1,18 @@
//
// System.Data.SqlClient.SqlRowUpdatingEventHandler.cs
//
// Author:
// Rodrigo Moya ([email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc 2002
//
using System;
using System.Data;
namespace System.Data.SqlClient
{
public delegate void SqlRowUpdatingEventHandler(object sender,
SqlRowUpdatingEventArgs e);
}
@@ -3,23 +3,189 @@
//
// Author:
// Rodrigo Moya ([email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc.
// (C) Ximian, Inc. 2002
//
// use #define DEBUG_SqlTransaction if you want to spew debug messages
// #define DEBUG_SqlTransaction
using System;
using System.Data;
using System.Data.Common;
namespace System.Data.SqlClient
{
/// <summary>
/// Represents a transaction to be performed at a SQL database.
/// Represents a transaction to be performed on a SQL database.
/// </summary>
public interface SqlTransaction : IDbTransaction
// public sealed class SqlTransaction : MarshalByRefObject,
// IDbTransaction, IDisposable
public sealed class SqlTransaction : IDbTransaction
{
void Commit();
#region Fields
void Rollback();
private bool doingTransaction = false;
private SqlConnection conn = null;
private IsolationLevel isolationLevel =
IsolationLevel.ReadCommitted;
// There are only two IsolationLevel's for PostgreSQL:
// ReadCommitted and Serializable,
// but ReadCommitted is the default
SqlConnection Connection{get;}
#endregion
#region Public Methods
IsolationLevel IsolationLevel{get;}
}
[MonoTODO]
public void Commit ()
{
if(doingTransaction == false)
throw new InvalidOperationException(
"Begin transaction was not " +
"done earlier " +
"thus PostgreSQL can not " +
"Commit transaction.");
SqlCommand cmd = new SqlCommand("COMMIT", conn);
cmd.ExecuteNonQuery();
doingTransaction = false;
}
[MonoTODO]
public void Rollback()
{
if(doingTransaction == false)
throw new InvalidOperationException(
"Begin transaction was not " +
"done earlier " +
"thus PostgreSQL can not " +
"Rollback transaction.");
SqlCommand cmd = new SqlCommand("ROLLBACK", conn);
cmd.ExecuteNonQuery();
doingTransaction = false;
}
// For PostgreSQL, Rollback(string) will not be implemented
// because PostgreSQL does not support Savepoints
[Obsolete]
public void Rollback(string transactionName) {
// throw new NotImplementedException ();
Rollback();
}
// For PostgreSQL, Save(string) will not be implemented
// because PostgreSQL does not support Savepoints
[Obsolete]
public void Save (string savePointName) {
// throw new NotImplementedException ();
}
#endregion // Public Methods
#region Internal Methods to System.Data.dll Assembly
internal void Begin()
{
if(doingTransaction == true)
throw new InvalidOperationException(
"Transaction has begun " +
"and PostgreSQL does not " +
"support nested transactions.");
SqlCommand cmd = new SqlCommand("BEGIN", conn);
cmd.ExecuteNonQuery();
doingTransaction = true;
}
internal void SetIsolationLevel(IsolationLevel isoLevel)
{
String sSql = "SET TRANSACTION ISOLATION LEVEL ";
switch (isoLevel)
{
case IsolationLevel.ReadCommitted:
sSql += "READ COMMITTED";
break;
case IsolationLevel.Serializable:
sSql += "SERIALIZABLE";
break;
default:
// FIXME: generate exception here
// PostgreSQL only supports:
// ReadCommitted or Serializable
break;
}
SqlCommand cmd = new SqlCommand(sSql, conn);
cmd.ExecuteNonQuery();
this.isolationLevel = isoLevel;
}
internal void SetConnection(SqlConnection connection)
{
this.conn = connection;
}
#endregion // Internal Methods to System.Data.dll Assembly
#region Properties
IDbConnection IDbTransaction.Connection {
get {
return Connection;
}
}
public SqlConnection Connection {
get {
return conn;
}
}
public IsolationLevel IsolationLevel {
get {
return isolationLevel;
}
}
internal bool DoingTransaction {
get {
return doingTransaction;
}
}
#endregion Properties
#region Destructors
// Destructors aka Finalize and Dispose
[MonoTODO]
public void Dispose()
{
// FIXME: need to properly release resources
// Dispose(true);
}
// Destructor
[MonoTODO]
// [Serializable]
// [ClassInterface(ClassInterfaceType.AutoDual)]
~SqlTransaction() {
// FIXME: need to properly release resources
// Dispose(false);
}
#endregion // Destructors
}
}
@@ -0,0 +1,471 @@
//
// System.Data.SqlClient.PostgresLibrary.cs
//
// PInvoke methods to libpq
// which is PostgreSQL client library
//
// May also contain enumerations,
// data types, or wrapper methods.
//
// Author:
// Rodrigo Moya ([email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc 2002
//
using System;
using System.Data;
using System.Runtime.InteropServices;
using System.Diagnostics;
namespace System.Data.SqlClient
{
/* IMPORTANT: DO NOT CHANGE ANY OF THESE ENUMS */
internal enum ConnStatusType
{
CONNECTION_OK,
CONNECTION_BAD,
CONNECTION_STARTED,
CONNECTION_MADE,
CONNECTION_AWAITING_RESPONSE,
CONNECTION_AUTH_OK,
CONNECTION_SETENV
}
internal enum PostgresPollingStatusType
{
PGRES_POLLING_FAILED = 0,
PGRES_POLLING_READING,
PGRES_POLLING_WRITING,
PGRES_POLLING_OK,
PGRES_POLLING_ACTIVE
}
internal enum ExecStatusType
{
PGRES_EMPTY_QUERY = 0,
PGRES_COMMAND_OK,
PGRES_TUPLES_OK,
PGRES_COPY_OUT,
PGRES_COPY_IN,
PGRES_BAD_RESPONSE,
PGRES_NONFATAL_ERROR,
PGRES_FATAL_ERROR
}
sealed internal class PostgresLibrary
{
#region PInvoke Functions
// pinvoke prototypes to PostgreSQL client library
// pq.dll on windows and libpq.so on linux
[DllImport("pq")]
public static extern IntPtr PQconnectStart (string conninfo);
// PGconn *PQconnectStart(const char *conninfo);
[DllImport("pq")]
public static extern PostgresPollingStatusType PQconnectPoll (IntPtr conn);
// PostgresPollingStatusType PQconnectPoll(PGconn *conn);
[DllImport("pq")]
public static extern IntPtr PQconnectdb (string conninfo);
// PGconn *PQconnectdb(const char *conninfo);
[DllImport("pq")]
public static extern IntPtr PQsetdbLogin (string pghost,
string pgport, string pgoptions,
string pgtty, string dbName,
string login, string pwd);
// PGconn *PQsetdbLogin(const char *pghost,
// const char *pgport, const char *pgoptions,
// const char *pgtty, const char *dbName,
// const char *login, const char *pwd);
[DllImport("pq")]
public static extern void PQfinish (IntPtr conn);
// void PQfinish(PGconn *conn);
[DllImport("pq")]
public static extern IntPtr PQconndefaults ();
// PQconninfoOption *PQconndefaults(void);
[DllImport("pq")]
public static extern void PQconninfoFree (IntPtr connOptions);
// void PQconninfoFree(PQconninfoOption *connOptions);
[DllImport("pq")]
public static extern int PQresetStart (IntPtr conn);
// int PQresetStart(PGconn *conn);
[DllImport("pq")]
public static extern IntPtr PQresetPoll (IntPtr conn);
// PostgresPollingStatusType PQresetPoll(PGconn *conn);
[DllImport("pq")]
public static extern void PQreset (IntPtr conn);
// void PQreset(PGconn *conn);
[DllImport("pq")]
public static extern int PQrequestCancel (IntPtr conn);
// int PQrequestCancel(PGconn *conn);
[DllImport("pq")]
public static extern string PQdb (IntPtr conn);
// char *PQdb(const PGconn *conn);
[DllImport("pq")]
public static extern string PQuser (IntPtr conn);
// char *PQuser(const PGconn *conn);
[DllImport("pq")]
public static extern string PQpass (IntPtr conn);
// char *PQpass(const PGconn *conn);
[DllImport("pq")]
public static extern string PQhost (IntPtr conn);
// char *PQhost(const PGconn *conn);
[DllImport("pq")]
public static extern string PQport (IntPtr conn);
// char *PQport(const PGconn *conn);
[DllImport("pq")]
public static extern string PQtty (IntPtr conn);
// char *PQtty(const PGconn *conn);
[DllImport("pq")]
public static extern string PQoptions (IntPtr conn);
// char *PQoptions(const PGconn *conn);
[DllImport("pq")]
public static extern ConnStatusType PQstatus (IntPtr conn);
// ConnStatusType PQstatus(const PGconn *conn);
[DllImport("pq")]
public static extern string PQerrorMessage (IntPtr conn);
// char *PQerrorMessage(const PGconn *conn);
[DllImport("pq")]
public static extern int PQsocket (IntPtr conn);
// int PQsocket(const PGconn *conn);
[DllImport("pq")]
public static extern int PQbackendPID (IntPtr conn);
// int PQbackendPID(const PGconn *conn);
[DllImport("pq")]
public static extern int PQclientEncoding (IntPtr conn);
// int PQclientEncoding(const PGconn *conn);
[DllImport("pq")]
public static extern int PQsetClientEncoding (IntPtr conn,
string encoding);
// int PQsetClientEncoding(PGconn *conn,
// const char *encoding);
//FIXME: when loading, causes runtime exception
//[DllImport("pq")]
//public static extern IntPtr PQgetssl (IntPtr conn);
// SSL *PQgetssl(PGconn *conn);
[DllImport("pq")]
public static extern void PQtrace (IntPtr conn,
IntPtr debug_port);
// void PQtrace(PGconn *conn,
// FILE *debug_port);
[DllImport("pq")]
public static extern void PQuntrace (IntPtr conn);
// void PQuntrace(PGconn *conn);
[DllImport("pq")]
public static extern IntPtr PQsetNoticeProcessor (IntPtr conn,
IntPtr proc, IntPtr arg);
// PQnoticeProcessor PQsetNoticeProcessor(PGconn *conn,
// PQnoticeProcessor proc, void *arg);
[DllImport("pq")]
public static extern int PQescapeString (string to,
string from, int length);
// size_t PQescapeString(char *to,
// const char *from, size_t length);
[DllImport("pq")]
public static extern string PQescapeBytea (string bintext,
int binlen, IntPtr bytealen);
// unsigned char *PQescapeBytea(unsigned char *bintext,
// size_t binlen, size_t *bytealen);
[DllImport("pq")]
public static extern IntPtr PQexec (IntPtr conn,
string query);
// PGresult *PQexec(PGconn *conn,
// const char *query);
[DllImport("pq")]
public static extern IntPtr PQnotifies (IntPtr conn);
// PGnotify *PQnotifies(PGconn *conn);
[DllImport("pq")]
public static extern void PQfreeNotify (IntPtr notify);
// void PQfreeNotify(PGnotify *notify);
[DllImport("pq")]
public static extern int PQsendQuery (IntPtr conn,
string query);
// int PQsendQuery(PGconn *conn,
// const char *query);
[DllImport("pq")]
public static extern IntPtr PQgetResult (IntPtr conn);
// PGresult *PQgetResult(PGconn *conn);
[DllImport("pq")]
public static extern int PQisBusy (IntPtr conn);
// int PQisBusy(PGconn *conn);
[DllImport("pq")]
public static extern int PQconsumeInput (IntPtr conn);
// int PQconsumeInput(PGconn *conn);
[DllImport("pq")]
public static extern int PQgetline (IntPtr conn,
string str, int length);
// int PQgetline(PGconn *conn,
// char *string, int length);
[DllImport("pq")]
public static extern int PQputline (IntPtr conn,
string str);
// int PQputline(PGconn *conn,
// const char *string);
[DllImport("pq")]
public static extern int PQgetlineAsync (IntPtr conn,
string buffer, int bufsize);
// int PQgetlineAsync(PGconn *conn, char *buffer,
// int bufsize);
[DllImport("pq")]
public static extern int PQputnbytes (IntPtr conn,
string buffer, int nbytes);
// int PQputnbytes(PGconn *conn,
//const char *buffer, int nbytes);
[DllImport("pq")]
public static extern int PQendcopy (IntPtr conn);
// int PQendcopy(PGconn *conn);
[DllImport("pq")]
public static extern int PQsetnonblocking (IntPtr conn,
int arg);
// int PQsetnonblocking(PGconn *conn, int arg);
[DllImport("pq")]
public static extern int PQisnonblocking (IntPtr conn);
// int PQisnonblocking(const PGconn *conn);
[DllImport("pq")]
public static extern int PQflush (IntPtr conn);
// int PQflush(PGconn *conn);
[DllImport("pq")]
public static extern IntPtr PQfn (IntPtr conn, int fnid,
IntPtr result_buf, IntPtr result_len,
int result_is_int, IntPtr args,
int nargs);
// PGresult *PQfn(PGconn *conn, int fnid,
// int *result_buf, int *result_len,
// int result_is_int, const PQArgBlock *args,
// int nargs);
[DllImport("pq")]
public static extern ExecStatusType PQresultStatus (IntPtr res);
// ExecStatusType PQresultStatus(const PGresult *res);
[DllImport("pq")]
public static extern string PQresStatus (ExecStatusType status);
// char *PQresStatus(ExecStatusType status);
[DllImport("pq")]
public static extern string PQresultErrorMessage (IntPtr res);
// char *PQresultErrorMessage(const PGresult *res);
[DllImport("pq")]
public static extern int PQntuples (IntPtr res);
// int PQntuples(const PGresult *res);
[DllImport("pq")]
public static extern int PQnfields (IntPtr res);
// int PQnfields(const PGresult *res);
[DllImport("pq")]
public static extern int PQbinaryTuples (IntPtr res);
// int PQbinaryTuples(const PGresult *res);
[DllImport("pq")]
public static extern string PQfname (IntPtr res,
int field_num);
// char *PQfname(const PGresult *res,
// int field_num);
[DllImport("pq")]
public static extern int PQfnumber (IntPtr res,
string field_name);
// int PQfnumber(const PGresult *res,
// const char *field_name);
[DllImport("pq")]
public static extern int PQftype (IntPtr res,
int field_num);
// Oid PQftype(const PGresult *res,
// int field_num);
[DllImport("pq")]
public static extern int PQfsize (IntPtr res,
int field_num);
// int PQfsize(const PGresult *res,
// int field_num);
[DllImport("pq")]
public static extern int PQfmod (IntPtr res, int field_num);
// int PQfmod(const PGresult *res, int field_num);
[DllImport("pq")]
public static extern string PQcmdStatus (IntPtr res);
// char *PQcmdStatus(PGresult *res);
[DllImport("pq")]
public static extern string PQoidStatus (IntPtr res);
// char *PQoidStatus(const PGresult *res);
[DllImport("pq")]
public static extern int PQoidValue (IntPtr res);
// Oid PQoidValue(const PGresult *res);
[DllImport("pq")]
public static extern string PQcmdTuples (IntPtr res);
// char *PQcmdTuples(PGresult *res);
[DllImport("pq")]
public static extern string PQgetvalue (IntPtr res,
int tup_num, int field_num);
// char *PQgetvalue(const PGresult *res,
// int tup_num, int field_num);
[DllImport("pq")]
public static extern int PQgetlength (IntPtr res,
int tup_num, int field_num);
// int PQgetlength(const PGresult *res,
// int tup_num, int field_num);
[DllImport("pq")]
public static extern int PQgetisnull (IntPtr res,
int tup_num, int field_num);
// int PQgetisnull(const PGresult *res,
// int tup_num, int field_num);
[DllImport("pq")]
public static extern void PQclear (IntPtr res);
// void PQclear(PGresult *res);
[DllImport("pq")]
public static extern IntPtr PQmakeEmptyPGresult (IntPtr conn,
IntPtr status);
// PGresult *PQmakeEmptyPGresult(PGconn *conn,
// ExecStatusType status);
[DllImport("pq")]
public static extern void PQprint (IntPtr fout,
IntPtr res, IntPtr ps);
// void PQprint(FILE *fout,
// const PGresult *res, const PQprintOpt *ps);
[DllImport("pq")]
public static extern void PQdisplayTuples (IntPtr res,
IntPtr fp, int fillAlign, string fieldSep,
int printHeader, int quiet);
// void PQdisplayTuples(const PGresult *res,
// FILE *fp, int fillAlign, const char *fieldSep,
// int printHeader, int quiet);
[DllImport("pq")]
public static extern void PQprintTuples (IntPtr res,
IntPtr fout, int printAttName, int terseOutput,
int width);
// void PQprintTuples(const PGresult *res,
// FILE *fout, int printAttName, int terseOutput,
// int width);
[DllImport("pq")]
public static extern int lo_open (IntPtr conn,
int lobjId, int mode);
// int lo_open(PGconn *conn,
// Oid lobjId, int mode);
[DllImport("pq")]
public static extern int lo_close (IntPtr conn, int fd);
// int lo_close(PGconn *conn, int fd);
[DllImport("pq")]
public static extern int lo_read (IntPtr conn,
int fd, string buf, int len);
// int lo_read(PGconn *conn,
// int fd, char *buf, size_t len);
[DllImport("pq")]
public static extern int lo_write (IntPtr conn,
int fd, string buf, int len);
// int lo_write(PGconn *conn,
// int fd, char *buf, size_t len);
[DllImport("pq")]
public static extern int lo_lseek (IntPtr conn,
int fd, int offset, int whence);
// int lo_lseek(PGconn *conn,
// int fd, int offset, int whence);
[DllImport("pq")]
public static extern int lo_creat (IntPtr conn,
int mode);
// Oid lo_creat(PGconn *conn,
// int mode);
[DllImport("pq")]
public static extern int lo_tell (IntPtr conn, int fd);
// int lo_tell(PGconn *conn, int fd);
[DllImport("pq")]
public static extern int lo_unlink (IntPtr conn,
int lobjId);
// int lo_unlink(PGconn *conn,
// Oid lobjId);
[DllImport("pq")]
public static extern int lo_import (IntPtr conn,
string filename);
// Oid lo_import(PGconn *conn,
// const char *filename);
[DllImport("pq")]
public static extern int lo_export (IntPtr conn,
int lobjId, string filename);
// int lo_export(PGconn *conn,
// Oid lobjId, const char *filename);
[DllImport("pq")]
public static extern int PQmblen (string s,
int encoding);
// int PQmblen(const unsigned char *s,
// int encoding);
[DllImport("pq")]
public static extern int PQenv2encoding ();
// int PQenv2encoding(void);
#endregion
}
}
@@ -1,20 +0,0 @@
//
// System.Data.SqlClient.SqlDataReader.cs
//
// Author:
// Rodrigo Moya ([email protected])
//
// (C) Ximian, Inc
//
namespace System.Data.SqlClient
{
/// <summary>
/// Provides a means of reading one or more forward-only streams of result sets obtained by executing a command at a SQL database.
/// </summary>
public class SqlErrors : ICollection, IEnumerable
{
// TODO
}
}
+306 -10
View File
@@ -1,3 +1,298 @@
2002-04-23 Daniel Morgan <[email protected]>
* System.Data.build: modified - added new
files to exclude from build
* System.Data/Constraint.cs
* System.Data/ConstraintCollection.cs
* System.Data/InternalDataCollectionBase.cs: added -
stubs which are needed to build DataTable.cs
* TODO: modified - added more classes TODO and
added more stuff TODO, such as, create script
to create test database monotestdb for testing
classes in System.Data
2002-04-23 Rodrigo Moya <[email protected]>
* System.Data.Common/DataAdapter.cs:
* System.Data.Common/DataColumnMappingCollection.cs:
* System.Data.Common/DataTableMappingCollection.cs:
* System.Data.Common/DbDataPermission.cs:
* System.Data.Common/DbDataPermissionAttribute.cs: some
compilation errors fixed.
2002-04-23 Daniel Morgan <[email protected]>
* TODO: modified - added classes TODO, and
a poor attempt at System.Data plan
2002-04-23 Daniel Morgan <[email protected]>
* ChangeLog: modified - put tabs where they belong
* System.Data.SqlClient/SqlDataReader.cs
* System.Data/DataColumn.cs: modified - compile errors
trying to compile SqlDataAdapter and dependencies
2002-04-23 Daniel Morgan <[email protected]>
* System.Data.SqlTypes/SqlBoolean.cs
* System.Data.SqlTypes/SqlCompareOptions.cs
* System.Data.SqlTypes/SqlInt32.cs
* System.Data.SqlTypes/SqlString.cs: added - new stubs
* System.Data/DataTable.cs
* System.Data.SqlClient/SqlCommand.cs
* System.Data.SqlClient/SqlConnection.cs
* System.Data.SqlClient/SqlError.cs
* System.Data.SqlClient/SqlTransaction.cs: modified -
misc. tweaks
* System.Data.SqlClient/SqlException.cs: modified -
missing Message on indexer for Message property
2002-04-21 Daniel Morgan <[email protected]>
* System.Data.SqlClient/SqlCommand.cs: modified - to
compile using mcs. This problem is
returning a stronger type in csc vs. msc
* System.Data.SqlClient/SqlConnection.cs: modified - msc
can not do a using PGconn = IntPtr; and then declare
with PGconn pgConn = IntPtr.Zero;
Thiw works under csc though. Had to comment using and
changed declaration to IntPtr pgConn = IntPtr.Zero;
Also, got rid of compile warnings for hostaddr and port.
* System.Data.SqlClient/SqlErrorCollection.cs: modified - got
rid of compile warnings. Commented MonoTODO attribute because mcs
doesn't seem to work with C# array property indexer (Item)
this[int index]
* System.Data.SqlClient/SqlParameterCollection.cs: modified -
commented MonoTODO attribute for indexer for mcs compiling
* Test/TestSqlIsolationLevel.cs:
* Test/TestSqlInsert.cs:
* Test/TestSqlException.cs: modified -
removed extra ExecuteNonQuery which caused two inserted rows
2002-04-20 Daniel Morgan <[email protected]>
* System.Data/StateChangeEventArgs.cs - added
needed to compile System.Data.dll with mcs.
2002-04-20 Daniel Morgan <[email protected]>
* System.Data.OleDb: added directory - for OleDb database
provider classes
* System.Data.SqlClient/SqlClientPermission.cs
* System.Data.SqlClient/SqlClientPermissionAttribute.cs
* System.Data.SqlClient/SqlCommandBuilder.cs
* System.Data.SqlClient/SqlInfoMessageEventHandler.cs
* System.Data.SqlClient/SqlRowUpdatedEventArgs.cs
* System.Data.SqlClient/SqlRowUpdatedEventHandler.cs
* System.Data.SqlClient/SqlRowUpdatingEventArgs.cs
* System.Data.SqlClient/SqlRowUpdatingEventHandler.cs
* Test/TestSqlException.cs
* Test/TestSqlIsolationLevel.cs: added - more tests
* System.Data.build: modified - added new files - excludes these too
* System.Data.SqlClient/PostgresLibrary.cs - modified - comment
* System.Data.SqlClient/SqlConnection.cs
* System.Data.SqlClient/SqlCommand.cs
* System.Data.SqlClient/SqlTransaction.cs
* System.Data.SqlClient/SqlException.cs
* System.Data.SqlClient/SqlErrorCollection.cs
* System.Data.SqlClient/SqlError.cs: modified - transaction and
exception/error handling. SqlConnection(connectionString)
constructor should not automatically connect.
* System.Data.SqlClient/SqlDataReader.cs
* System.Data.SqlClient/SqlDataAdapter.cs
* System.Data.SqlClient/SqlParameter.cs
* System.Data.SqlClient/SqlParameterCollection.cs: modified -
added using System.ComponentModel;
* Test/TestSqlInsert.cs: modified - to use transaction
2002-04-17 Rodrigo Moya <[email protected]>
* System.Data/DataRow.cs: new skeletons.
* System.Data.Common/DataAdapter.cs:
* System.Data.Common/DataColumnMapping.cs:
* System.Data.Common/DataColumnMappingCollection.cs:
* System.Data.Common/DataTableMapping.cs:
* System.Data.Common/DataTableMappingCollection.cs:
* System.Data.Common/DbDataAdapter.cs:
* System.Data.Common/RowUpdatedEventArgs.cs:
* System.Data.SqlClient/SqlDataAdapter.cs:
* System.Data.SqlClient/SqlInfoMessageEventArgs.cs: compilation
fixes for Linux.
* System.Data.Common/DbDataRecord.cs:
* System.Data.Common/DbEnumerator.cs: removed MS implementation
internal classes.
2002-04-17 Daniel Morgan <[email protected]>
* Test/TestSqlInsert.cs: modified - do
a SQL DELETE before SQL INSERT of row so you can use this
test over and over.
* System.Data.SqlClient/SqlTransaction.cs: modified - default
IsolationLevel for PostgreSQL is ReadCommitted. However,
PostgreSQL allows Serializable as well.
(Thanks to Gonzalo for that!)
* System.Data.SqlClient/SqlConnection.cs: modified
* System.Data.SqlClient/SqlCommand.cs: modified
* System.Data.SqlClient/SqlTransaction.cs: modified - got transactions
working; however, we still need to implement SQL errors
and exceptions to properly handle transactions. Also, added
status and error message support from the PostgreSQL database.
Currently, this does a Console.WriteLine() to display the
status and error messages, but this is a TODO
for SQL errors and exceptions.
* System.Data/TODOAttribute.cs: added - needed MonoTODO
attribute for System.Data.dll assembly
* System.Data/IDbCommand.cs: modified - commented
overloaded method ExecuteReader
so System.Data.SqlClient.SqlCommand can compile
* System.Data/IDbCommand.cs: modified
* System.Data/IDbConnection.cs: modified - added using System;
* System.Data/IDataParameter.cs
* System.Data.build: modified - build classes
in System.Data.SqlClient and exclude others in System.Data
* System.Data.SqlClient/PostgresLibrary.cs: modified - change
parameter data type from IntPtr to enum ExecStatusType
* ChangeLog: modified - corrected previous entries in log
2002-04-16 Rodrigo Moya <[email protected]>
* System.Data.Common/DataColumnMappingCollection.cs: added basic
implementation. Still missing some stuff.
2002-04-16 Daniel Morgan <[email protected]>
* System.Data.SqlClient/SqlConnection.cs: modified - got
to compile, run, and connect to PostgreSQL database
* System.Data.SqlClient/SqlCommand.cs: modified - got
to compile, run, and execute a SQL INSERT command
which successfully inserted a row
into the PostgreSQL database
* System.Data.SqlClient/SqlTransaction.cs: modified
* System.Data.SqlClient/SqlParameter.cs: modified
* System.Data.SqlClient/SqlParameterCollection.cs: modified
* System.Data.SqlClient/SqlError.cs: modified
* System.Data.SqlClient/SqlErrorCollection.cs: modified
* System.Data.SqlClient/SqlException.cs: modified
* System.Data.SqlClient/PostgresLibrary.cs: modified - to compile
* System.Data.SqlClient/SqlAdapter: modified
* System.Data.SqlClient/SqlReader: modified - add more stubs
2002-04-16 Daniel Morgan <[email protected]>
* Test/TestSqlInsert.cs: added
2002-04-15 Daniel Morgan <[email protected]>
* System.Data.SqlClient/SqlInfoMessageEventArgs.cs: added - using in
class SqlConnecition
* System.Data.SqlClient/SqlErrorCollection.cs: added
* System.Data.SqlClient/SqlErrors.cs: removed - no such class SqlErrors
2002-04-15 Christopher Podurgiel <[email protected]>
* System.Data.IDbDataParameter: Added Interface to IDataParameter.
* System.Data.IDbTransaction: Added Interface to IDisposable.
* System.Data.IDbCommand: Fixed Capitalization of class name.
* System.Data.IDbConnection: Fixed Capitalization of class name.
2002-04-15 Rodrigo Moya <[email protected]>
* System.Data.Common/DbDataPermissionAttribute.cs:
* System.Data.Common/DataAdapter.cs:
* System.Data.Common/DataColumnMapping.cs:
* System.Data.Common/DbDataPermission.cs: added some implementation.
2002-04-15 Rodrigo Moya <[email protected]>
* System.Data.SqlClient/SqlConnection.cs: fixed constructor chaining
syntax, as pointed out by Levent Camlibel.
2002-04-14 Rodrigo Moya <[email protected]>
* System.Data.SqlTypes/SqlBinary.cs:
* System.Data.SqlTypes/INullable.cs: new skeletons.
2002-04-14 Daniel Morgan <[email protected]>
* System.Data.SqlClient/PostgresLibrary.cs: new internal class, which
contains all calls the the PostgreSQL client library, to be used
everywhere in System.Data.SqlClient.
2002-03-30 Rodrigo Moya <[email protected]>
* System.Data.SqlClient/SqlConnection.cs: implemented basic
constructors.
* System.Data.SqlTypes/SqlNullValueException.cs: new skeletons.
2002-03-29 Rodrigo Moya <[email protected]>
* System.Data.Common/DbDataRecord.cs:
* System.Data.Common/DbEnumerator.cs:
* System.Data.Common/RowUpdatedEventArgs.cs:
* System.Data.Common/RowUpdatingEventArgs.cs:
* System.Data.Common/DbDataPermissionAttribute.cs: new skeletons.
2002-03-28 Rodrigo Moya <[email protected]>
* System.Data.Common/DataTableMappingCollection.cs:
* System.Data.Common/DbDataAdapter.cs:
* System.Data.Common/DbDataPermission.cs:
* System.Data.Common/DataTableMapping.cs: new skeletons.
* System.Data.SqlClient/SqlDataAdapter.cs:
* System.Data.SqlClient/SqlDataReader.cs:
* System.Data.SqlClient/SqlErrors.cs:
* System.Data.SqlClient/SqlError.cs:
* System.Data.SqlClient/SqlException.cs:
* System.Data.SqlClient/SqlParameter.cs:
* System.Data.SqlClient/SqlParameterCollection.cs:
* System.Data.SqlClient/SqlTransaction.cs:
* System.Data.SqlClient/SqlCommand.cs: fixed skeletons.
2002-03-27 Rodrigo Moya <[email protected]>
* System.Data.Common/DataColumnMapping.cs:
* System.Data.Common/DataColumnMappingCollection.cs:
* System.Data.Common/DataAdapter.cs: created skeletons.
* System.Data.build: exclude new directories from build.
2002-03-27 Rodrigo Moya <[email protected]>
* System.Data.SqlClient/SqlTransaction.cs: started implementation.
* System.Data.SqlClient/SqlConnection.cs (BeginTransaction):
implemented (2 methods).
2002-03-24 Duncan Mak <[email protected]>
* System.Data.build: Excluded System.Data.SqlClient from the build.
@@ -10,15 +305,9 @@
* System.Data.SqlClient/*: added skeletons for the SQL managed
provider for ADO.Net, to be based initially in PostgreSQL.
2002-02-10 Christopher Podurgiel <[email protected]>
2002-03-15 Christopher Podurgiel <[email protected]>
* Removed *.cs from System.Data as the correct files are in mcs/class/System.Data/System.Data
* Updated all Enums, Interfaces, and Delegates in System.Data
2002-02-11 Christopher Podurgiel <[email protected]>
* DataColumnChangeEventArgs.cs : Added
* DataColumnCollection.cs : Added
Changed the Namespace on some Enums from mono.System.Data to System.Data
2002-03-01 Christopher Podurgiel <[email protected]>
@@ -29,6 +318,13 @@
* DataRelationCollection.cs : Added
* DataTableRelationCollection.cs : Added
* DataColumn : Added
2002-03-15 Christopher Podurgiel <[email protected]>
2002-02-11 Christopher Podurgiel <[email protected]>
* DataColumnChangeEventArgs.cs : Added
* DataColumnCollection.cs : Added
2002-02-10 Christopher Podurgiel <[email protected]>
Changed the Namespace on some Enums from mono.System.Data to System.Data
* Removed *.cs from System.Data as the correct files are in mcs/class/System.Data/System.Data
* Updated all Enums, Interfaces, and Delegates in System.Data
@@ -0,0 +1,96 @@
//
// System.Data.Common.DataAdapter
//
// Author:
// Rodrigo Moya ([email protected])
//
// (C) Ximian, Inc
//
using System.ComponentModel;
using System.Data;
namespace System.Data.Common
{
/// <summary>
/// Represents a set of data commands and a database connection that are used to fill the DataSet and update the data source.
/// </summary>
public abstract class DataAdapter : Component, IDataAdapter
{
private bool acceptChangesDuringFill;
private bool continueUpdateOnError;
private MissingMappingAction missingMappingAction;
private MissingSchemaAction missingSchemaAction;
private DataTableMappingCollection tableMappings;
protected DataAdapter () {
acceptChangesDuringFill = false;
continueUpdateOnError = false;
missingMappingAction = MissingMappingAction.Error;
missingSchemaAction = MissingSchemaAction.Error;
tableMappings = null;
}
public abstract int Fill (DataSet dataSet);
public abstract DataTable[] FillSchema (DataSet dataSet,
SchemaType schemaType);
public abstract IDataParameter[] GetFillParameters ();
public abstract int Update (DataSet dataSet);
protected virtual DataAdapter CloneInternals () {
}
protected virtual DataTableMappingCollection CreateTableMappings () {
}
protected virtual bool ShouldSerializeTableMappings () {
}
public bool AcceptChangesDuringFill {
get {
return acceptChangesDuringFill;
}
set {
acceptChangesDuringFill = value;
}
}
public bool ContinueUpdateOnError {
get {
return continueUpdateOnError;
}
set {
continueUpdateOnError = value;
}
}
public MissingMappingAction MissingMappingAction {
get {
return missingMappingAction;
}
set {
missingMappingAction = value;
}
}
public MissingSchemaAction MissingSchemaAction {
get {
return missingSchemaAction;
}
set {
missingSchemaAction = value;
}
}
public DataTableMappingCollection TableMappings {
get {
if (tableMappings == null)
tableMappings = CreateTableMappings ();
return tableMappings;
}
}
}
}
@@ -0,0 +1,58 @@
//
// System.Data.Common.DataColumnMapping
//
// Author:
// Rodrigo Moya ([email protected])
//
// (C) Ximian, Inc
//
using System.Data;
namespace System.Data.Common
{
/// <summary>
/// Contains a generic column mapping for an object that inherits from DataAdapter. This class cannot be inherited.
/// </summary>
public sealed class DataColumnMapping : MarshalByRefObject, IColumnMapping, ICloneable
{
private string srcColumn;
private string dsColumn;
public DataColumnMapping () {
srcColumn = null;
dsColumn = null;
}
public DataColumnMapping(string sc, string dc) {
srcColumn = sc;
dsColumn = dc;
}
[MonoTODO]
public DataColumn GetDataColumnBySchemaAction (
DataTable dataTable,
Type dataType,
MissingSchemaAction schemaAction) {
throw new NotImplementedException ();
}
public string DataSetColumn {
get {
return this.dsColumn;
}
set {
this.dsColumn = value;
}
}
public string SourceColumn {
get {
return this.srcColumn;
}
set {
this.srcColumn = value;
}
}
}
}
@@ -0,0 +1,140 @@
//
// System.Data.Common.DataColumnCollection
//
// Author:
// Rodrigo Moya ([email protected])
//
// (C) Ximian, Inc
//
using System;
using System.Collections;
using System.Data;
namespace System.Data.Common
{
/// <summary>
/// Contains a collection of DataColumnMapping objects. This class cannot be inherited.
/// </summary>
public sealed class DataColumnMappingCollection :
MarshalByRefObject, IColumnMappingCollection, IList,
ICollection, IEnumerable
{
private DataColumnMapping[] mappings = null;
private int size = 0;
public DataColumnMappingCollection () {
}
public int Add (object obj) {
DataColumnMapping[] tmp = new DataColumnMapping[size + 1];
Array.Copy (mappings, tmp, size);
size++;
mappings = tmp;
mappings[size - 1] = obj;
return size;
}
public void AddRange (DataColumnMapping[] values) {
DataColumnMapping[] tmp = new DataColumnMapping[size + values.Length];
Array.Copy (mappings, tmp, size);
for (int i = 0; i < values.Length; i++) {
tmp[i + size] = values[i];
}
size += values.Length;
mappings = tmp;
}
public void Clear () {
/* FIXME */
for (int i = 0; i < size; i++)
mappings[i] = null;
size = 0;
}
public bool Contains (object obj) {
for (int i = 0; i < size; i++) {
if (obj.Equals (mappings[i]))
return true;
}
return false;
}
public void CopyTo (Array array, int index) {
DataColumnMapping[] tmp = new DataColumnMapping[size];
Array.Copy (mappings, tmp, size);
}
public DataColumnMapping GetByDataSetColumn (string value) {
for (int i = 0; i < size; i++) {
if (mappings[i].DataSetColumn == value)
return mappings[i];
}
return null;
}
[MonoTODO]
public static DataColumnMapping GetColumnMappingBySchemaAction (
DataColumnMappingCollection columnMappings,
string sourceColumn,
MissingMappingAction mappingAction) {
throw new NotImplementedException ();
}
public int IndexOf (object obj) {
for (int i = 0; i < size; i++) {
if (obj.Equals (mappings[i]))
return i;
}
return -1;
}
public int IndexOfDataSetColumn (string value) {
for (int i = 0; i < size; i++) {
if (mappings[i].DataSetColumn == value)
return i;
}
return -1;
}
[MonoTODO]
public void Insert (int index, object value) {
throw new NotImplementedException ();
}
[MonoTODO]
public void Remove (object value) {
throw new NotImplementedException ();
}
[MonoTODO]
public void RemoveAt (int index) {
throw new NotImplementedException ();
}
public int Count {
get { return size; }
}
public DataColumnMapping this[int index] {
get {
if (value < size)
return mappings[index];
return null;
}
set {
if (value < size)
mappings[index] = value;
}
}
}
}
@@ -0,0 +1,65 @@
//
// System.Data.Common.DataTableMapping.cs
//
// Author:
// Rodrigo Moya ([email protected])
//
// (C) Ximian, Inc
//
using System.Data;
namespace System.Data.Common
{
/// <summary>
/// Contains a description of a mapped relationship between a source table and a DataTable. This class is used by a DataAdapter when populating a DataSet.
/// </summary>
public sealed class DataTableMapping : MarshalByRefObject, ITableMapping, ICloneable
{
[MonoTODO]
public DataTableMapping() {
throw new NotImplementedException ();
}
[MonoTODO]
public DataTableMapping (string a, string b) {
throw new NotImplementedException ();
}
[MonoTODO]
public DataTableMapping(string a, string b, DataColumnMapping[] c) {
throw new NotImplementedException ();
}
[MonoTODO]
public DataColumnMapping GetColumnMappingBySchemaAction(
string sourceColumn,
MissingMappingAction mappingAction) {
throw new NotImplementedException ();
}
[MonoTODO]
public DataTable GetDataTableBySchemaAction(
DataSet dataSet,
MissingSchemaAction schemaAction) {
throw new NotImplementedException ();
}
[MonoTODO]
public DataColumnMappingCollection ColumnMappings {
get { throw new NotImplementedException (); }
}
[MonoTODO]
public string DataSetTable {
get { throw new NotImplementedException (); }
set { throw new NotImplementedException (); }
}
[MonoTODO]
public string SourceTable {
get { throw new NotImplementedException (); }
set { throw new NotImplementedException (); }
}
}
}
@@ -0,0 +1,128 @@
//
// System.Data.Common.DataTableMappingCollection.cs
//
// Author:
// Rodrigo Moya ([email protected])
//
// (C) Ximian, Inc
//
using System;
using System.Collections;
namespace System.Data.Common
{
/// <summary>
/// A collection of DataTableMapping objects. This class cannot be inherited.
/// </summary>
public sealed class DataTableMappingCollection :
MarshalByRefObject, ITableMappingCollection, IList,
ICollection, IEnumerable
{
[MonoTODO]
public DataTableMappingCollection() {
throw new NotImplementedException ();
}
[MonoTODO]
public int Add (object obj) {
throw new NotImplementedException ();
}
[MonoTODO]
public DataTableMapping Add (string a, string b) {
throw new NotImplementedException ();
}
[MonoTODO]
public void AddRange(DataTableMapping[] values) {
throw new NotImplementedException ();
}
[MonoTODO]
public void Clear() {
throw new NotImplementedException ();
}
[MonoTODO]
public bool Contains (object obj) {
throw new NotImplementedException ();
}
[MonoTODO]
public bool Contains (string str) {
throw new NotImplementedException ();
}
[MonoTODO]
public void CopyTo(Array array, int index) {
throw new NotImplementedException ();
}
[MonoTODO]
public DataTableMapping GetByDataSetTable(string dataSetTable) {
throw new NotImplementedException ();
}
[MonoTODO]
public static DataTableMapping GetTableMappingBySchemaAction(
DataTableMappingCollection tableMappings,
string sourceTable,
string dataSetTable,
MissingMappingAction mappingAction) {
throw new NotImplementedException ();
}
[MonoTODO]
public int IndexOf (object obj) {
throw new NotImplementedException ();
}
[MonoTODO]
public int IndexOf (string str) {
throw new NotImplementedException ();
}
[MonoTODO]
public int IndexOfDataSetTable (string dataSetTable) {
throw new NotImplementedException ();
}
[MonoTODO]
public void Insert (int index, object value) {
throw new NotImplementedException ();
}
[MonoTODO]
public void Remove (object value) {
throw new NotImplementedException ();
}
[MonoTODO]
public void RemoveAt (int index) {
throw new NotImplementedException ();
}
[MonoTODO]
public void RemoveAt (string index) {
throw new NotImplementedException ();
}
[MonoTODO]
public int Count {
get { throw new NotImplementedException (); }
}
[MonoTODO]
public DataTableMapping this[int i] {
get { throw new NotImplementedException (); }
set { throw new NotImplementedException (); }
}
[MonoTODO]
public DataTableMapping this[string s] {
get { throw new NotImplementedException (); }
set { throw new NotImplementedException (); }
}
}
}
@@ -0,0 +1,160 @@
//
// System.Data.Common.DbDataAdapter.cs
//
// Author:
// Rodrigo Moya ([email protected])
//
// (C) Ximian, Inc
//
namespace System.Data.Common
{
/// <summary>
/// Aids implementation of the IDbDataAdapter interface. Inheritors of DbDataAdapter implement a set of functions to provide strong typing, but inherit most of the functionality needed to fully implement a DataAdapter.
/// </summary>
public abstract class DbDataAdapter : DataAdapter, ICloneable
{
public const string DefaultSourceTableName = "default";
[MonoTODO]
protected DbDataAdapter() {
throw new NotImplementedException ();
}
[MonoTODO]
public override int Fill (DataSet ds) {
throw new NotImplementedException ();
}
[MonoTODO]
public int Fill (DataTable dt) {
throw new NotImplementedException ();
}
[MonoTODO]
public int Fill (DataSet ds, string s) {
throw new NotImplementedException ();
}
[MonoTODO]
protected virtual int Fill (DataTable dt, IDataReader idr) {
throw new NotImplementedException ();
}
[MonoTODO]
protected virtual int Fill (DataTable dt,
IDbCommand idc,
CommandBehavior behavior) {
throw new NotImplementedException ();
}
[MonoTODO]
public int Fill (DataSet ds, int i, int j, string s) {
throw new NotImplementedException ();
}
[MonoTODO]
protected virtual int Fill (DataSet ds,
string s,
IDataReader idr,
int i,
int j) {
throw new NotImplementedException ();
}
[MonoTODO]
protected virtual int Fill (DataSet ds,
int i,
int j,
string s,
IDbCommand idc,
CommandBehavior behavior) {
throw new NotImplementedException ();
}
[MonoTODO]
public override DataTable[] FillSchema (DataSet ds, SchemaType type) {
throw new NotImplementedException ();
}
[MonoTODO]
public DataTable FillSchema (DataTable dt, SchemaType type) {
throw new NotImplementedException ();
}
[MonoTODO]
public DataTable[] FillSchema (DataSet ds, SchemaType type, string s) {
throw new NotImplementedException ();
}
[MonoTODO]
protected virtual DataTable FillSchema (DataTable dt,
SchemaType type,
IDbCommand idc,
CommandBehavior behavior) {
throw new NotImplementedException ();
}
[MonoTODO]
protected virtual DataTable[] FillSchema (DataSet ds,
SchemaType type,
IDbCommand idc,
string s,
CommandBehavior behavior) {
throw new NotImplementedException ();
}
[MonoTODO]
public override IDataParameter[] GetFillParameters() {
throw new NotImplementedException ();
}
[MonoTODO]
public int Update (DataRow[] row) {
throw new NotImplementedException ();
}
[MonoTODO]
public override int Update (DataSet ds) {
throw new NotImplementedException ();
}
[MonoTODO]
public int Update (DataTable dt) {
throw new NotImplementedException ();
}
[MonoTODO]
protected virtual int Update (DataRow[] row, DataTableMapping dtm) {
throw new NotImplementedException ();
}
[MonoTODO]
public int Update (DataSet ds, string s) {
throw new NotImplementedException ();
}
protected abstract RowUpdatedEventArgs CreateRowUpdatedEvent(
DataRow dataRow,
IDbCommand command,
StatementType statementType,
DataTableMapping tableMapping);
protected abstract RowUpdatingEventArgs CreateRowUpdatingEvent(
DataRow dataRow,
IDbCommand command,
StatementType statementType,
DataTableMapping tableMapping);
[MonoTODO]
protected virtual void OnFillError(FillErrorEventArgs value) {
throw new NotImplementedException ();
}
protected abstract void OnRowUpdated(RowUpdatedEventArgs value);
protected abstract void OnRowUpdating(RowUpdatingEventArgs value);
public event FillErrorEventHandler FillError;
}
}
@@ -0,0 +1,86 @@
//
// System.Data.Common.DbDataAdapter.cs
//
// Author:
// Rodrigo Moya ([email protected])
//
// (C) Ximian, Inc
//
using System.Security;
using System.Security.Permissions;
namespace System.Data.Common
{
/// <summary>
/// Provides the capability for a .NET data provider to ensure that a user has a security level adequate for accessing data.
/// </summary>
public abstract class DBDataPermission : CodeAccessPermission,
IUnrestrictedPermission
{
private bool allowBlankPassword;
private PermissionState permissionState;
protected DBDataPermission () {
allowBlankPassword = false;
permissionState = PermissionState.None;
}
protected DBDataPermission (PermissionState state) {
allowBlankPassword = false;
permissionState = state;
}
public DBDataPermission (PermissionState state, bool abp) {
allowBlankPassword = abp;
permissionState = state;
}
public override IPermission Copy () {
DbDataPermission copy = new DbDataPermission (
permissionState, allowBlankPassword);
return copy;
}
[MonoTODO]
public override void FromXml (SecurityElement securityElement) {
throw new NotImplementedException ();
}
[MonoTODO]
public override IPermission Intersect (IPermission target) {
throw new NotImplementedException ();
}
[MonoTODO]
public override bool IsSubsetOf (IPermission target) {
throw new NotImplementedException ();
}
public bool IsUnrestricted () {
if (permissionState == PermissionState.Unrestricted)
return true;
return false;
}
[MonoTODO]
public override SecurityElement ToXml () {
throw new NotImplementedException ();
}
[MonoTODO]
public override IPermission Union (IPermission target) {
throw new NotImplementedException ();
}
public bool AllowBlankPassword {
get {
return allowBlankPassword;
}
set {
allowBlankPassword = value;
}
}
}
}
@@ -0,0 +1,36 @@
//
// System.Data.Common.DbDataPermissionAttribute.cs
//
// Author:
// Rodrigo Moya ([email protected])
//
// (C) Ximian, Inc
//
using System.Security.Permissions;
namespace System.Data.Common
{
/// <summary>
/// Associates a security action with a custom security attribute.
/// </summary>
public abstract class DBDataPermissionAttribute : CodeAccessSecurityAttribute
{
private SecurityAction securityAction;
private bool allowBlankPassword;
protected DBDataPermissionAttribute (SecurityAction action) {
securityAction = action;
allowBlankPassword = false;
}
public bool AllowBlankPassword {
get {
return allowBlankPassword;
}
set {
allowBlankPassword = value;
}
}
}
}
@@ -0,0 +1,64 @@
//
// System.Data.Common.RowUpdatedEventArgs.cs
//
// Author:
// Rodrigo Moya ([email protected])
//
// (C) Ximian, Inc
//
using System.Data;
namespace System.Data.Common
{
/// <summary>
/// Provides data for the RowUpdated event of a .NET data provider.
/// </summary>
public abstract class RowUpdatedEventArgs : EventArgs
{
[MonoTODO]
protected RowUpdatedEventArgs(DataRow dataRow,
IDbCommand command,
StatementType statementType,
DataTableMapping tableMapping) {
throw new NotImplementedException ();
}
[MonoTODO]
public IDbCommand Command {
get { throw new NotImplementedException (); }
}
[MonoTODO]
public Exception Errors {
get { throw new NotImplementedException (); }
set { throw new NotImplementedException (); }
}
[MonoTODO]
public int RecordsAffected {
get { throw new NotImplementedException (); }
}
[MonoTODO]
public DataRow Row {
get { throw new NotImplementedException (); }
}
[MonoTODO]
public StatementType StatementType {
get { throw new NotImplementedException (); }
}
[MonoTODO]
public UpdateStatus Status {
get { throw new NotImplementedException (); }
set { throw new NotImplementedException (); }
}
[MonoTODO]
public DataTableMapping TableMapping {
get { throw new NotImplementedException (); }
}
}
}
@@ -0,0 +1,58 @@
//
// System.Data.Common.RowUpdatingEventArgs.cs
//
// Author:
// Rodrigo Moya ([email protected])
//
// (C) Ximian, Inc
//
namespace System.Data.Common
{
/// <summary>
/// Provides the data for the RowUpdating event of a .NET data provider.
/// </summary>
public abstract class RowUpdatingEventArgs : EventArgs
{
[MonoTODO]
protected RowUpdatingEventArgs(DataRow dataRow,
IDbCommand command,
StatementType statementType,
DataTableMapping tableMapping) {
throw new NotImplementedException ();
}
[MonoTODO]
public IDbCommand Command {
get { throw new NotImplementedException (); }
set { throw new NotImplementedException (); }
}
[MonoTODO]
public Exception Errors {
get { throw new NotImplementedException (); }
set { throw new NotImplementedException (); }
}
[MonoTODO]
public DataRow Row {
get { throw new NotImplementedException (); }
}
[MonoTODO]
public StatementType StatementType {
get { throw new NotImplementedException (); }
}
[MonoTODO]
public UpdateStatus Status {
get { throw new NotImplementedException (); }
set { throw new NotImplementedException (); }
}
[MonoTODO]
public DataTableMapping TableMapping {
get { throw new NotImplementedException (); }
}
}
}
@@ -0,0 +1,471 @@
//
// System.Data.SqlClient.PostgresLibrary.cs
//
// PInvoke methods to libpq
// which is PostgreSQL client library
//
// May also contain enumerations,
// data types, or wrapper methods.
//
// Author:
// Rodrigo Moya ([email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc 2002
//
using System;
using System.Data;
using System.Runtime.InteropServices;
using System.Diagnostics;
namespace System.Data.SqlClient
{
/* IMPORTANT: DO NOT CHANGE ANY OF THESE ENUMS */
internal enum ConnStatusType
{
CONNECTION_OK,
CONNECTION_BAD,
CONNECTION_STARTED,
CONNECTION_MADE,
CONNECTION_AWAITING_RESPONSE,
CONNECTION_AUTH_OK,
CONNECTION_SETENV
}
internal enum PostgresPollingStatusType
{
PGRES_POLLING_FAILED = 0,
PGRES_POLLING_READING,
PGRES_POLLING_WRITING,
PGRES_POLLING_OK,
PGRES_POLLING_ACTIVE
}
internal enum ExecStatusType
{
PGRES_EMPTY_QUERY = 0,
PGRES_COMMAND_OK,
PGRES_TUPLES_OK,
PGRES_COPY_OUT,
PGRES_COPY_IN,
PGRES_BAD_RESPONSE,
PGRES_NONFATAL_ERROR,
PGRES_FATAL_ERROR
}
sealed internal class PostgresLibrary
{
#region PInvoke Functions
// pinvoke prototypes to PostgreSQL client library
// pq.dll on windows and libpq.so on linux
[DllImport("pq")]
public static extern IntPtr PQconnectStart (string conninfo);
// PGconn *PQconnectStart(const char *conninfo);
[DllImport("pq")]
public static extern PostgresPollingStatusType PQconnectPoll (IntPtr conn);
// PostgresPollingStatusType PQconnectPoll(PGconn *conn);
[DllImport("pq")]
public static extern IntPtr PQconnectdb (string conninfo);
// PGconn *PQconnectdb(const char *conninfo);
[DllImport("pq")]
public static extern IntPtr PQsetdbLogin (string pghost,
string pgport, string pgoptions,
string pgtty, string dbName,
string login, string pwd);
// PGconn *PQsetdbLogin(const char *pghost,
// const char *pgport, const char *pgoptions,
// const char *pgtty, const char *dbName,
// const char *login, const char *pwd);
[DllImport("pq")]
public static extern void PQfinish (IntPtr conn);
// void PQfinish(PGconn *conn);
[DllImport("pq")]
public static extern IntPtr PQconndefaults ();
// PQconninfoOption *PQconndefaults(void);
[DllImport("pq")]
public static extern void PQconninfoFree (IntPtr connOptions);
// void PQconninfoFree(PQconninfoOption *connOptions);
[DllImport("pq")]
public static extern int PQresetStart (IntPtr conn);
// int PQresetStart(PGconn *conn);
[DllImport("pq")]
public static extern IntPtr PQresetPoll (IntPtr conn);
// PostgresPollingStatusType PQresetPoll(PGconn *conn);
[DllImport("pq")]
public static extern void PQreset (IntPtr conn);
// void PQreset(PGconn *conn);
[DllImport("pq")]
public static extern int PQrequestCancel (IntPtr conn);
// int PQrequestCancel(PGconn *conn);
[DllImport("pq")]
public static extern string PQdb (IntPtr conn);
// char *PQdb(const PGconn *conn);
[DllImport("pq")]
public static extern string PQuser (IntPtr conn);
// char *PQuser(const PGconn *conn);
[DllImport("pq")]
public static extern string PQpass (IntPtr conn);
// char *PQpass(const PGconn *conn);
[DllImport("pq")]
public static extern string PQhost (IntPtr conn);
// char *PQhost(const PGconn *conn);
[DllImport("pq")]
public static extern string PQport (IntPtr conn);
// char *PQport(const PGconn *conn);
[DllImport("pq")]
public static extern string PQtty (IntPtr conn);
// char *PQtty(const PGconn *conn);
[DllImport("pq")]
public static extern string PQoptions (IntPtr conn);
// char *PQoptions(const PGconn *conn);
[DllImport("pq")]
public static extern ConnStatusType PQstatus (IntPtr conn);
// ConnStatusType PQstatus(const PGconn *conn);
[DllImport("pq")]
public static extern string PQerrorMessage (IntPtr conn);
// char *PQerrorMessage(const PGconn *conn);
[DllImport("pq")]
public static extern int PQsocket (IntPtr conn);
// int PQsocket(const PGconn *conn);
[DllImport("pq")]
public static extern int PQbackendPID (IntPtr conn);
// int PQbackendPID(const PGconn *conn);
[DllImport("pq")]
public static extern int PQclientEncoding (IntPtr conn);
// int PQclientEncoding(const PGconn *conn);
[DllImport("pq")]
public static extern int PQsetClientEncoding (IntPtr conn,
string encoding);
// int PQsetClientEncoding(PGconn *conn,
// const char *encoding);
//FIXME: when loading, causes runtime exception
//[DllImport("pq")]
//public static extern IntPtr PQgetssl (IntPtr conn);
// SSL *PQgetssl(PGconn *conn);
[DllImport("pq")]
public static extern void PQtrace (IntPtr conn,
IntPtr debug_port);
// void PQtrace(PGconn *conn,
// FILE *debug_port);
[DllImport("pq")]
public static extern void PQuntrace (IntPtr conn);
// void PQuntrace(PGconn *conn);
[DllImport("pq")]
public static extern IntPtr PQsetNoticeProcessor (IntPtr conn,
IntPtr proc, IntPtr arg);
// PQnoticeProcessor PQsetNoticeProcessor(PGconn *conn,
// PQnoticeProcessor proc, void *arg);
[DllImport("pq")]
public static extern int PQescapeString (string to,
string from, int length);
// size_t PQescapeString(char *to,
// const char *from, size_t length);
[DllImport("pq")]
public static extern string PQescapeBytea (string bintext,
int binlen, IntPtr bytealen);
// unsigned char *PQescapeBytea(unsigned char *bintext,
// size_t binlen, size_t *bytealen);
[DllImport("pq")]
public static extern IntPtr PQexec (IntPtr conn,
string query);
// PGresult *PQexec(PGconn *conn,
// const char *query);
[DllImport("pq")]
public static extern IntPtr PQnotifies (IntPtr conn);
// PGnotify *PQnotifies(PGconn *conn);
[DllImport("pq")]
public static extern void PQfreeNotify (IntPtr notify);
// void PQfreeNotify(PGnotify *notify);
[DllImport("pq")]
public static extern int PQsendQuery (IntPtr conn,
string query);
// int PQsendQuery(PGconn *conn,
// const char *query);
[DllImport("pq")]
public static extern IntPtr PQgetResult (IntPtr conn);
// PGresult *PQgetResult(PGconn *conn);
[DllImport("pq")]
public static extern int PQisBusy (IntPtr conn);
// int PQisBusy(PGconn *conn);
[DllImport("pq")]
public static extern int PQconsumeInput (IntPtr conn);
// int PQconsumeInput(PGconn *conn);
[DllImport("pq")]
public static extern int PQgetline (IntPtr conn,
string str, int length);
// int PQgetline(PGconn *conn,
// char *string, int length);
[DllImport("pq")]
public static extern int PQputline (IntPtr conn,
string str);
// int PQputline(PGconn *conn,
// const char *string);
[DllImport("pq")]
public static extern int PQgetlineAsync (IntPtr conn,
string buffer, int bufsize);
// int PQgetlineAsync(PGconn *conn, char *buffer,
// int bufsize);
[DllImport("pq")]
public static extern int PQputnbytes (IntPtr conn,
string buffer, int nbytes);
// int PQputnbytes(PGconn *conn,
//const char *buffer, int nbytes);
[DllImport("pq")]
public static extern int PQendcopy (IntPtr conn);
// int PQendcopy(PGconn *conn);
[DllImport("pq")]
public static extern int PQsetnonblocking (IntPtr conn,
int arg);
// int PQsetnonblocking(PGconn *conn, int arg);
[DllImport("pq")]
public static extern int PQisnonblocking (IntPtr conn);
// int PQisnonblocking(const PGconn *conn);
[DllImport("pq")]
public static extern int PQflush (IntPtr conn);
// int PQflush(PGconn *conn);
[DllImport("pq")]
public static extern IntPtr PQfn (IntPtr conn, int fnid,
IntPtr result_buf, IntPtr result_len,
int result_is_int, IntPtr args,
int nargs);
// PGresult *PQfn(PGconn *conn, int fnid,
// int *result_buf, int *result_len,
// int result_is_int, const PQArgBlock *args,
// int nargs);
[DllImport("pq")]
public static extern ExecStatusType PQresultStatus (IntPtr res);
// ExecStatusType PQresultStatus(const PGresult *res);
[DllImport("pq")]
public static extern string PQresStatus (ExecStatusType status);
// char *PQresStatus(ExecStatusType status);
[DllImport("pq")]
public static extern string PQresultErrorMessage (IntPtr res);
// char *PQresultErrorMessage(const PGresult *res);
[DllImport("pq")]
public static extern int PQntuples (IntPtr res);
// int PQntuples(const PGresult *res);
[DllImport("pq")]
public static extern int PQnfields (IntPtr res);
// int PQnfields(const PGresult *res);
[DllImport("pq")]
public static extern int PQbinaryTuples (IntPtr res);
// int PQbinaryTuples(const PGresult *res);
[DllImport("pq")]
public static extern string PQfname (IntPtr res,
int field_num);
// char *PQfname(const PGresult *res,
// int field_num);
[DllImport("pq")]
public static extern int PQfnumber (IntPtr res,
string field_name);
// int PQfnumber(const PGresult *res,
// const char *field_name);
[DllImport("pq")]
public static extern int PQftype (IntPtr res,
int field_num);
// Oid PQftype(const PGresult *res,
// int field_num);
[DllImport("pq")]
public static extern int PQfsize (IntPtr res,
int field_num);
// int PQfsize(const PGresult *res,
// int field_num);
[DllImport("pq")]
public static extern int PQfmod (IntPtr res, int field_num);
// int PQfmod(const PGresult *res, int field_num);
[DllImport("pq")]
public static extern string PQcmdStatus (IntPtr res);
// char *PQcmdStatus(PGresult *res);
[DllImport("pq")]
public static extern string PQoidStatus (IntPtr res);
// char *PQoidStatus(const PGresult *res);
[DllImport("pq")]
public static extern int PQoidValue (IntPtr res);
// Oid PQoidValue(const PGresult *res);
[DllImport("pq")]
public static extern string PQcmdTuples (IntPtr res);
// char *PQcmdTuples(PGresult *res);
[DllImport("pq")]
public static extern string PQgetvalue (IntPtr res,
int tup_num, int field_num);
// char *PQgetvalue(const PGresult *res,
// int tup_num, int field_num);
[DllImport("pq")]
public static extern int PQgetlength (IntPtr res,
int tup_num, int field_num);
// int PQgetlength(const PGresult *res,
// int tup_num, int field_num);
[DllImport("pq")]
public static extern int PQgetisnull (IntPtr res,
int tup_num, int field_num);
// int PQgetisnull(const PGresult *res,
// int tup_num, int field_num);
[DllImport("pq")]
public static extern void PQclear (IntPtr res);
// void PQclear(PGresult *res);
[DllImport("pq")]
public static extern IntPtr PQmakeEmptyPGresult (IntPtr conn,
IntPtr status);
// PGresult *PQmakeEmptyPGresult(PGconn *conn,
// ExecStatusType status);
[DllImport("pq")]
public static extern void PQprint (IntPtr fout,
IntPtr res, IntPtr ps);
// void PQprint(FILE *fout,
// const PGresult *res, const PQprintOpt *ps);
[DllImport("pq")]
public static extern void PQdisplayTuples (IntPtr res,
IntPtr fp, int fillAlign, string fieldSep,
int printHeader, int quiet);
// void PQdisplayTuples(const PGresult *res,
// FILE *fp, int fillAlign, const char *fieldSep,
// int printHeader, int quiet);
[DllImport("pq")]
public static extern void PQprintTuples (IntPtr res,
IntPtr fout, int printAttName, int terseOutput,
int width);
// void PQprintTuples(const PGresult *res,
// FILE *fout, int printAttName, int terseOutput,
// int width);
[DllImport("pq")]
public static extern int lo_open (IntPtr conn,
int lobjId, int mode);
// int lo_open(PGconn *conn,
// Oid lobjId, int mode);
[DllImport("pq")]
public static extern int lo_close (IntPtr conn, int fd);
// int lo_close(PGconn *conn, int fd);
[DllImport("pq")]
public static extern int lo_read (IntPtr conn,
int fd, string buf, int len);
// int lo_read(PGconn *conn,
// int fd, char *buf, size_t len);
[DllImport("pq")]
public static extern int lo_write (IntPtr conn,
int fd, string buf, int len);
// int lo_write(PGconn *conn,
// int fd, char *buf, size_t len);
[DllImport("pq")]
public static extern int lo_lseek (IntPtr conn,
int fd, int offset, int whence);
// int lo_lseek(PGconn *conn,
// int fd, int offset, int whence);
[DllImport("pq")]
public static extern int lo_creat (IntPtr conn,
int mode);
// Oid lo_creat(PGconn *conn,
// int mode);
[DllImport("pq")]
public static extern int lo_tell (IntPtr conn, int fd);
// int lo_tell(PGconn *conn, int fd);
[DllImport("pq")]
public static extern int lo_unlink (IntPtr conn,
int lobjId);
// int lo_unlink(PGconn *conn,
// Oid lobjId);
[DllImport("pq")]
public static extern int lo_import (IntPtr conn,
string filename);
// Oid lo_import(PGconn *conn,
// const char *filename);
[DllImport("pq")]
public static extern int lo_export (IntPtr conn,
int lobjId, string filename);
// int lo_export(PGconn *conn,
// Oid lobjId, const char *filename);
[DllImport("pq")]
public static extern int PQmblen (string s,
int encoding);
// int PQmblen(const unsigned char *s,
// int encoding);
[DllImport("pq")]
public static extern int PQenv2encoding ();
// int PQenv2encoding(void);
#endregion
}
}
@@ -0,0 +1,76 @@
//
// System.Data.SqlClient.SqlClientPermission.cs
//
// Author:
// Rodrigo Moya ([email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc 2002
//
using System;
using System.Data;
using System.Data.Common;
namespace System.Data.SqlClient {
public sealed class SqlClientPermission : DBDataPermission {
[MonoTODO]
public SqlClientPermission() {
// FIXME: do constructor
}
[MonoTODO]
public SqlClientPermission(PermissionState state) {
// FIXME: do constructor
}
[MonoTODO]
public SqlClientPermission(PermissionState state,
bool allowBlankPassword) {
throw new NotImplementedException ();
}
[MonoTODO]
public override IPermission Copy() {
throw new NotImplementedException ();
}
[MonoTODO]
public override void FromXml(SecurityElement
securityElement) {
throw new NotImplementedException ();
}
[MonoTODO]
public override IPermission Intersect(IPermission target) {
throw new NotImplementedException ();
}
[MonoTODO]
public override bool IsSubsetOf(IPermission target) {
throw new NotImplementedException ();
}
[MonoTODO]
public override string ToString() {
throw new NotImplementedException ();
}
[MonoTODO]
public override SecurityElement ToXml() {
throw new NotImplementedException ();
}
[MonoTODO]
public override IPermission Union(IPermission target) {
throw new NotImplementedException ();
}
[MonoTODO]
~SqlClientPermission() {
// FIXME: destructor to release resources
}
}
}
@@ -0,0 +1,51 @@
//
// System.Data.SqlClient.SqlClientPermissionAttribute.cs
//
// Author:
// Rodrigo Moya ([email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc 2002
//
using System;
using System.Data;
using System.Data.Common;
namespace System.Data.SqlClient {
[AttributeUsage(AttributeTargets.Assembly |
AttributeTargets.Class |
AttributeTargets.Struct |
AttributeTargets.Constructor |
AttributeTargets.Method)]
[Serializable]
public sealed class SqlClientPermissionAttribute :
DBDataPermissionAttribute {
[MonoTODO]
[AttributeUsage(AttributeTargets.Assembly |
AttributeTargets.Class |
AttributeTargets.Struct |
AttributeTargets.Constructor |
AttributeTargets.Method)]
[Serializable]
public SqlClientPermissionAttribute(SecurityAction action) {
// FIXME: do constructor
}
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class
| AttributeTargets.Struct | AttributeTargets.Constructor |
AttributeTargets.Method)]
[Serializable]
public override IPermission CreatePermission() {
throw new NotImplementedException ();
}
[MonoTODO]
~SqlClientPermissionAttribute() {
// FIXME: destructor to release resources
}
}
}
Loaded 100 of 2305 files, more files were not shown because too many files have changed in this diff. Show more