Compare commits

...
553 Commits
Author SHA1 Message Date
nobody 6340550c2b This commit was manufactured by cvs2svn to create tag 'MONO_1_0'.
svn path=/tags/MONO_1_0/mono/; revision=30523
2004-06-29 14:49:15 +00:00
Jackson Harper 6a0ef2bda3 * man/gacutil.1: Update man with new command line options.
svn path=/trunk/mono/; revision=30522
2004-06-29 14:49:15 +00:00
Miguel de Icaza 120479c4b4 Update
svn path=/trunk/mcs/; revision=30521
2004-06-29 14:40:51 +00:00
Miguel de Icaza 62622e734b 1.0
svn path=/trunk/mono/; revision=30517
2004-06-29 14:29:44 +00:00
Gonzalo Paniagua Javier 7ed97db90a 2004-06-29 Gonzalo Paniagua Javier <[email protected]>
* ControlCollection.cs: when clearing the control collection, tell the
	owners about the removal. Fixes bug #60800.

svn path=/trunk/mcs/; revision=30508
2004-06-29 12:42:25 +00:00
Gonzalo Paniagua Javier a6237f8e1f 2004-06-29 Gonzalo Paniagua Javier <[email protected]>
* Page.cs: don't nullify _context after processing the request as there
	are events not triggered yet. Fixes bug #60726.

svn path=/trunk/mcs/; revision=30507
2004-06-29 10:49:23 +00:00
Raja R Harinath 60633644e5 (GAC_ROOT_DIR): Renamed from GAC_DIR.
(GAC_DIR): New define that doesn't include $(DESTDIR).
(install-data-local,uninstall-local): Use them.  Use in-tree mono
runtime, not the installed one.

svn path=/trunk/mono/; revision=30506
2004-06-29 10:23:13 +00:00
Martin Baulig 3b6be82db4 2004-06-29 Martin Baulig <[email protected]>
* mono-debug.c (mono_debug_add_method): Protect the whole function
	in mono_debugger_lock(), not just parts of it.

svn path=/trunk/mono/; revision=30505
2004-06-29 06:22:18 +00:00
Raja R Harinath da7a16cbc0 (gmcs_exe): New. Set only if not W32.
(monotwo_DATA): Use it.
From Atsushi Enomoto.

svn path=/trunk/mono/; revision=30503
2004-06-29 05:25:33 +00:00
Raja R Harinath cd4559a82f Use $(RESGEN) instead of $(INTERNAL_RESGEN).
svn path=/trunk/mcs/; revision=30501
2004-06-29 04:51:48 +00:00
Paolo Molaro 7f5cc73b41 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <[email protected]>
* mini.c: reinstated mono_compile_get_interface_var()
	on x86, too, since the change breaks the Gtk# build there as well.

svn path=/trunk/mono/; revision=30479
2004-06-28 15:18:27 +00:00
Gonzalo Paniagua Javier 004725da98 2004-06-28 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: connect on non-blocking sockets returns EINPROGRESS. Fixes
	bug #60811.

svn path=/trunk/mcs/; revision=30478
2004-06-28 15:06:02 +00:00
Ben Maurer b678c0c3a7 Add some new benchmarks. They will be added to the makefile after the freeze
svn path=/trunk/mono/; revision=30477
2004-06-28 14:45:50 +00:00
Miguel de Icaza 188421611f Fix for NetBSD from Marc Recht
svn path=/trunk/mono/; revision=30476
2004-06-28 14:39:01 +00:00
Zoltan Varga 1d2f1b057d 2004-06-29 Zoltan Varga <[email protected]>
* mono-sha1.c: Use gint32 for 32 types. Fixes random memory corruption
	in SHA1Transform on 64 bit systems.

svn path=/trunk/mono/; revision=30474
2004-06-28 11:32:30 +00:00
Atsushi Eno 9f0265a347 2004-06-28 Atsushi Enomoto <[email protected]>
* VBCodeCompiler.cs : (only for windows) First check mono.bat, then
	  check mono.exe. It enables xsp working with mono windows installer.

svn path=/trunk/mcs/; revision=30473
2004-06-28 09:45:36 +00:00
Atsushi Eno 28ff9d2fd7 2004-06-28 Atsushi Enomoto <[email protected]>
* CSharpCodeCompiler.cs : (only for windows) First check mcs.bat, then
	  check mcs.exe. It enables xsp working with mono windows installer.

svn path=/trunk/mcs/; revision=30472
2004-06-28 09:43:53 +00:00
Atsushi Eno 69821227f0 2004-06-27 Atsushi Enomoto <[email protected]>
* XmlDocument.cs:
	  Close XmlReader only when it is created. This fixes bug #60809.

svn path=/trunk/mcs/; revision=30471
2004-06-28 02:00:58 +00:00
Atsushi Eno bd513c3726 2004-06-27 Atsushi Enomoto <[email protected]>
* XmlDataInferenceLoader.cs : It was not always filling relation
	  child table information correctly. This fixes bug #60742.

svn path=/trunk/mcs/; revision=30467
2004-06-27 21:21:46 +00:00
Jackson Harper bd07011a8c * Report.cs: Fix quiet.
svn path=/trunk/mcs/; revision=30461
2004-06-27 03:14:06 +00:00
Jackson Harper 141bfda2f4 * ILParser.jay: vtable fixups use the int32 or int64 keyword, not
actual int values. When adding modules for pinvoke info use the
	ExternTable so we dont get duplicate modules.

svn path=/trunk/mcs/; revision=30460
2004-06-27 03:13:28 +00:00
Jackson Harper 3878ea2fb0 * TypeDef.cs: Preserve the order of fields in a class. Then after
all the fields have been defined reset the order in PEAPI to the
	correct order. This is done so sequential layouts actually
	work. The order needs to be reset because it can be lost during
	the recursive definition phase.
	* MethodDef.cs: Use and ExternModule for pinvoke data's module
	refs. This way we don't get duplicate module refs.

svn path=/trunk/mcs/; revision=30459
2004-06-27 03:12:33 +00:00
Jackson Harper 54c716697c * PEAPI.cs: Add a method to set the fields list. This is needed so
that sequentially laid out fields are laid out in the right
	order. When building custom attribute tables actually emit the
	custom attribute data. When writing the .sdata section make sure
	to pad to its size. The constants itself will not make up the
	entire section because it is aligned on 512 byte blocks.

svn path=/trunk/mcs/; revision=30458
2004-06-27 03:11:40 +00:00
Sebastien Pouliot 331cac28ce 2004-06-26 Sebastien Pouliot <[email protected]>
* crypto: Updated status for Release Candidate 1.

svn path=/trunk/mono/; revision=30447
2004-06-26 14:37:06 +00:00
César Natarén 8c0e59cf8b updates from grammar changes
svn path=/trunk/mcs/; revision=30436
2004-06-25 23:47:03 +00:00
César Natarén 8e431dd371 back to M.J namespace
svn path=/trunk/mcs/; revision=30435
2004-06-25 23:45:31 +00:00
César Natarén 5949706c8e changelog entries
svn path=/trunk/mcs/; revision=30434
2004-06-25 23:43:58 +00:00
César Natarén 1ad8b99f3d * Globals.cs, ASTList.cs: Back to the useful namespace (M.J).
svn path=/trunk/mcs/; revision=30433
2004-06-25 23:41:17 +00:00
César Natarén a736ad10d6 * ASTList.cs: added Size property.CVS: ----------------------------------------------------------------------
svn path=/trunk/mcs/; revision=30432
2004-06-25 23:41:02 +00:00
César Natarén 03122029ce * ArrayLiteral.cs: added internal size field as an ArrayLiteral can have
elisions we keep track of the "real" size here. Added constructor. Added initial
        Resolve and Emit code.

svn path=/trunk/mcs/; revision=30431
2004-06-25 23:40:48 +00:00
César Natarén 939166e9a7 * Literal.cs: fixed the negative numbers code generation (we must
optimize this). Added initial ObjectLiteral's class, code generation and
        Resolve process. Added class ObjectLiteralItem and PropertyName.

svn path=/trunk/mcs/; revision=30430
2004-06-25 23:40:31 +00:00
César Natarén 0cd2596b30 * jscript-lexer-parser.g: added ast building for object_literal, it's disabled for now while I fix the block Vs object_literal nodeterminism problem on the parser. Added rule for array_literal. Build PropertyName ast build.
svn path=/trunk/mcs/; revision=30429
2004-06-25 23:36:32 +00:00
Duncan Mak def80a53e2 Fix date
svn path=/trunk/mono/; revision=30428
2004-06-25 23:16:51 +00:00
Duncan Mak db74ae145b Fix version number in CVS, fix already on the live server
svn path=/trunk/mono/; revision=30427
2004-06-25 22:37:44 +00:00
Duncan Mak 5ca3ca5217 Add RC info
svn path=/trunk/mono/; revision=30425
2004-06-25 21:18:26 +00:00
Atsushi Eno 0ba7943335 2004-06-25 Atsushi Enomoto <[email protected]>
* RncParser.jay : added MIT license.

svn path=/trunk/mcs/; revision=30420
2004-06-25 20:44:23 +00:00
Atsushi Eno 2da7b509d6 2004-06-25 Atsushi Enomoto <[email protected]>
* RdpContentType.cs, RdpNameClass.cs, RdpObjects.cs, RdpPatterns.cs,
	  Util.cs : added novell license term.

svn path=/trunk/mcs/; revision=30419
2004-06-25 20:43:55 +00:00
Atsushi Eno a544b0c730 2004-06-25 Atsushi Enomoto <[email protected]>
* Misc.cs, RelaxngDatatype.cs, RelaxngDatatypeProvider.cs,
	  RelaxngDefaultDatatype.cs, RelaxngException.cs, RelaxngGrammar.cs,
	  RelaxngMergedProvider.cs, RelaxngNameClass.cs, RelaxngPattern.cs,
	  RelaxngPatternType.cs, RelaxngReader.cs, RelaxngValidatingReader.cs,
	  XsdDatatypeProvider.cs : Added/replaced novell license term.

svn path=/trunk/mcs/; revision=30418
2004-06-25 20:43:15 +00:00
Atsushi Eno ffcffd34d9 2004-06-25 Atsushi Enomoto <[email protected]>
* XmlDefaultReader.cs : Added novell's license (avoid confusion).

svn path=/trunk/mcs/; revision=30416
2004-06-25 20:42:06 +00:00
Ben Maurer e9c345319d 2004-06-25 Ben Maurer <[email protected]>
* Environment.cs: GetFolderPath has new behavior. r=miguel

svn path=/trunk/mcs/; revision=30410
2004-06-25 19:08:20 +00:00
Miguel de Icaza ec388a7eb3 Flush
svn path=/trunk/mono/; revision=30407
2004-06-25 19:02:34 +00:00
Jackson Harper d8dde95cc1 * get.c: Add a few more keywords to be escaped.
* main.c: MS's ildasm writes '// end of class' not '// end of
	type'. The python.net tool searches for this string.

svn path=/trunk/mono/; revision=30406
2004-06-25 18:54:50 +00:00
Paolo Molaro 0f082aa0ab Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <[email protected]>
* reflection.c: make sure padding bytes in heaps are zeroed.

svn path=/trunk/mono/; revision=30403
2004-06-25 18:46:24 +00:00
Lluis Sanchez 173508fd68 * HttpSimpleProtocolImporter.cs: Added null check. The XmlTypeMapping for
the return type will be null if the method returns void.

svn path=/trunk/mcs/; revision=30394
2004-06-25 15:53:30 +00:00
Paolo Molaro 9bd2937f67 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <[email protected]>
* driver.c: remove loop from the default optimizations: it seems to
	interact badly with some of the other options (see bug #60613).

svn path=/trunk/mono/; revision=30383
2004-06-25 14:45:17 +00:00
Miguel de Icaza a8dea00dfb Fixed licenses
svn path=/trunk/mcs/; revision=30382
2004-06-25 14:42:22 +00:00
Ravindra eeb7486b59 * LinearGradientBrush.cs: Added checks for the values of
focus and scale parameters in SetBlendTriangularShape and
	SetSigmaBellShape methods.
	* PathGradientBrush.cs: Same as above.

svn path=/trunk/mcs/; revision=30377
2004-06-25 10:41:37 +00:00
Raja R Harinath 8b5958d00e Enable test-277. The bugfix went in before the freeze :-)
svn path=/trunk/mcs/; revision=30375
2004-06-25 07:42:28 +00:00
Paolo Molaro 7673091063 Add prototype for encode_constant().
svn path=/trunk/mono/; revision=30374
2004-06-25 07:02:44 +00:00
Miguel de Icaza 72ae0a236d Up
svn path=/trunk/mono/; revision=30351
2004-06-24 21:55:21 +00:00
Duncan Mak f1fdcca8f5 Remove duplicate license
svn path=/trunk/mcs/; revision=30350
2004-06-24 21:48:47 +00:00
Duncan Mak bab786ade5 Add licensing info
svn path=/trunk/mcs/; revision=30348
2004-06-24 21:38:17 +00:00
Duncan Mak d1c09fcc67 Add licensing info
svn path=/trunk/mcs/; revision=30345
2004-06-24 20:59:43 +00:00
Duncan Mak 93bcd78c01 Remove the keyword "abstract" to fix the build.
svn path=/trunk/mcs/; revision=30339
2004-06-24 20:42:07 +00:00
David Waite d635611b29 06/24/2004 David Waite <[email protected]>
* Changed comments in ikvm-jni, mono/dis, mono/interpreter,
	mono/metadata, mono/monoburg and mono/utils to be C90-style instead
	of C99/C++-style

svn path=/trunk/mono/; revision=30337
2004-06-24 20:41:39 +00:00
Jackson Harper f31fd0b1a2 * MethodDef.cs: Report when defining methods just like MS.
* TypeDef.cs: Error message when we can't find a locla method.

svn path=/trunk/mcs/; revision=30328
2004-06-24 19:12:01 +00:00
Jackson Harper 3677158928 * Report.cs: Add new mehtod for displaying messages.
svn path=/trunk/mcs/; revision=30327
2004-06-24 19:10:11 +00:00
Jambunathan K dd0da93a79 * RandomVBFile.cs: Fixed FileGet() for Date and Decimal types
* FileSystem.cs: Fixed ChDir, FileCopy
* ControlChars.cs:  corcompare based fixes

* Utils.cs:
* StringType.cs: corcompare based fixes

svn path=/trunk/mcs/; revision=30323
2004-06-24 16:56:07 +00:00
Atsushi Eno eb17094994 2004-06-22 Atsushi Enomoto <[email protected]>
* SqlCommandBuilder.cs : Avoid cast exception caused by DbNull.

svn path=/trunk/mcs/; revision=30322
2004-06-24 16:48:11 +00:00
Atsushi Eno 3e2821d002 2004-06-24 Atsushi Enomoto <[email protected]>
* DataColumnMappingCollection.cs : fixed typo.
	* DbDataAdapter.cs : column mappings were not filled.

svn path=/trunk/mcs/; revision=30321
2004-06-24 16:25:02 +00:00
Gonzalo Paniagua Javier 093071fda3 2004-06-24 Gonzalo Paniagua Javier <[email protected]>
* HtmlTextWriter.cs: only create a closing tag for unknown tags. Fixes
	bug #60681.

svn path=/trunk/mcs/; revision=30317
2004-06-24 15:12:20 +00:00
Atsushi Eno b4bdf95c9d 2004-06-24 Atsushi Enomoto <[email protected]>
* DataTableMapping.cs : Clone() should also clone ColumnMappings.

svn path=/trunk/mcs/; revision=30316
2004-06-24 14:53:54 +00:00
Raja R Harinath f6e4fb2e6a * IBM.Data.DB2/Makefile: Disable for 'net_2_0'.
* ICSharpCode.SharpZipLib/AssemblyInfo.cs (AssemblyVersion): Set different version for the
net_2_0 profile.

svn path=/trunk/mcs/; revision=30315
2004-06-24 14:43:35 +00:00
Raja R Harinath cd66bf8192 (gac_assemblies_list): Put back
ICSharpCode.SharpZipLib, not that it has a different version.

svn path=/trunk/mono/; revision=30314
2004-06-24 14:42:24 +00:00
Gonzalo Paniagua Javier f04f14f3a7 2004-06-24 Gonzalo Paniagua Javier <[email protected]>
* DefaultWatcher.cs: fixed subdirectories notifications and don't
	fail when any directory is removed. Closes bug #59840.

svn path=/trunk/mcs/; revision=30313
2004-06-24 14:22:29 +00:00
Dick Porter cb491f6063 2004-06-24 Dick Porter <[email protected]>
* mutexes.c: Indicate when a named mutex was reused

2004-06-24  Dick Porter  <[email protected]>

	* threads.c
	(ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
	return createdNew.  Fixes bug 60412.

	* threads-types.h:
	* icall.c: Add createdNew parameter to CreateMutex icall

svn path=/trunk/mono/; revision=30312
2004-06-24 14:22:00 +00:00
Zoltan Varga 3851261a9a 2004-06-25 Zoltan Varga <[email protected]>
* mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann
	([email protected]): Add Solaris x86 support.

svn path=/trunk/mono/; revision=30311
2004-06-24 14:21:20 +00:00
Dick Porter 128b0c1159 2004-06-24 Dick Porter <[email protected]>
* Mutex.cs: Implement the createdNew parameter

svn path=/trunk/mcs/; revision=30310
2004-06-24 14:21:03 +00:00
Raja R Harinath f0c1c8324c (BetterConversion): Remove buggy special-case
handling of "implicit constant expression conversions".  At this
point, we already know that the conversion is possible -- we're
only checking to see which is better.

svn path=/trunk/mcs/; revision=30309
2004-06-24 14:19:26 +00:00
Sachin Kumar 5c2898d0d8 Added license and copyright
svn path=/trunk/mcs/; revision=30306
2004-06-24 14:06:50 +00:00
Raja R Harinath 14995f2132 * test-252.cs: Avoid reference to System.dll.
* test-277.cs: New test for #56774.

svn path=/trunk/mcs/; revision=30303
2004-06-24 13:33:42 +00:00
Marek Safar f4d4ebdc7e fixed test
svn path=/trunk/mcs/; revision=30302
2004-06-24 13:19:22 +00:00
Paolo Molaro 1dc753bdc6 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <[email protected]>
* reflection.c, object-internals.h: save default value in params.

svn path=/trunk/mono/; revision=30301
2004-06-24 13:14:51 +00:00
Gonzalo Paniagua Javier 809c3d5843 2004-06-24 Gonzalo Paniagua Javier <[email protected]>
* Directory.cs: implemented GetLogicalDrives.

svn path=/trunk/mcs/; revision=30300
2004-06-24 13:14:24 +00:00
Marek Safar df7da47215 new test
svn path=/trunk/mcs/; revision=30299
2004-06-24 13:14:20 +00:00
Sanja Gupta 79b13a3e46 ChangeLog: Updated ChangeLog.
ImageAnimator.cs: Rewrote complete implementation. Tested on Windows.

svn path=/trunk/mcs/; revision=30297
2004-06-24 12:55:10 +00:00
Paolo Molaro 41172aa516 Thu Jun 24 15:33:04 CEST 2004 Paolo Molaro <[email protected]>
* ParameterBuilder.cs: implement SetConstant ().

svn path=/trunk/mcs/; revision=30295
2004-06-24 12:40:53 +00:00
Marek Safar f78807a86c enabled test-273 (Bug #60411 closed)
svn path=/trunk/mcs/; revision=30294
2004-06-24 12:35:02 +00:00
Atsushi Eno 5698135a41 2004-06-24 Atsushi Enomoto <[email protected]>
* VBCodeCompiler.cs : On windows we use fixed mono.exe and mbas.exe
	  located by mscorlib.dll. (The same fix as that of CSharpCodeCompiler)

svn path=/trunk/mcs/; revision=30292
2004-06-24 12:23:39 +00:00
Dick Porter 673a502e27 2004-06-24 Dick Porter <[email protected]>
* threads.c (SuspendThread):
	* timed-thread.c (_wapi_timed_thread_suspend): Wrap sem_wait in a
	while loop.  See bug 58161.

svn path=/trunk/mono/; revision=30291
2004-06-24 12:17:40 +00:00
Atsushi Eno d4cbaa798f 2004-06-24 Atsushi Enomoto <[email protected]>
* Process.cs : quick fix for UseShellExecute=false on windows. See
	  the code comment.

svn path=/trunk/mcs/; revision=30290
2004-06-24 11:57:36 +00:00
Atsushi Eno edb0c6019c 2004-06-24 Atsushi Enomoto <[email protected]>
* CSharpCodeCompiler.cs : On windows we use fixed mono.exe and mcs.exe
	  located by mscorlib.dll.

svn path=/trunk/mcs/; revision=30289
2004-06-24 11:56:57 +00:00
Lluis Sanchez 92673ba006 * StreamReader.cs: In DiscardBufferedData(), reset the mayBlock flag.
svn path=/trunk/mcs/; revision=30288
2004-06-24 09:34:12 +00:00
Raja R Harinath 856016dd57 * Makefile.am (MCS_DIRS, MCS_FILES): Add back Mono.CSharp.Debugger.
(tmpinst-dir-contents, $(tmpinst)/bin/mono.bat): Remove mono.bat
in W32.  Use 'mono' and 'mcs' in W32 too.
(bootstrap) [PLATFORM_WIN32]: Back to single stage bootstrap.
* runtime/net_2_0/Makefile.am (gac_assemblies_list): Don't mention
nunit.*, IBM.Data.DB2, ICSharpCode.SharpZipLib.
Fix for #60443, the GAC .DLL-Hell.

svn path=/trunk/mono/; revision=30287
2004-06-24 08:40:10 +00:00
Anirban Bhattacharjee e3109b9199 2004-06-24 Anirban Bhattacharjee <[email protected]>
* Strings.cs: Enabled case insensitive search in InStr aand InStrRev functions
                      Fixed Filter method

svn path=/trunk/mcs/; revision=30286
2004-06-24 08:22:28 +00:00
Marek Safar 773e1f90b5 2004-06-24 Marek Safar <[email protected]>
* test-205.cs: Removed because become invalid.

svn path=/trunk/mcs/; revision=30285
2004-06-24 08:19:28 +00:00
Marek Safar 396b130290 2004-06-24 Marek Safar <[email protected]>
* cs-parser.jay: Added error CS0210 test.

svn path=/trunk/mcs/; revision=30284
2004-06-24 08:09:25 +00:00
Marek Safar 4f556d1a67 2004-06-24 Marek Safar <[email protected]>
* cs-parser.jay: Added error CS0134 test.

svn path=/trunk/mcs/; revision=30283
2004-06-24 07:51:48 +00:00
Marek Safar e59ff96c48 2004-06-24 Marek Safar <[email protected]>
Fix bug #52507
	* cs-parser.jay: Added error CS0145 test.

svn path=/trunk/mcs/; revision=30282
2004-06-24 07:25:20 +00:00
Marek Safar 08efe906f1 unsafe-8 without .cs extension
svn path=/trunk/mcs/; revision=30281
2004-06-24 07:24:05 +00:00
Marek Safar 6246d43ed9 2004-06-24 Marek Safar <[email protected]>
* class.cs (Operator.Define): Added test for errors CS0553, CS0554.

svn path=/trunk/mcs/; revision=30280
2004-06-24 06:58:00 +00:00
Raja R Harinath e49aacd981 (gac_assemblies_list): Don't mention nunit.*.
Fix for #60443.

svn path=/trunk/mono/; revision=30277
2004-06-24 06:08:32 +00:00
Raja R Harinath 7d3c788eb8 New test for #60459.
svn path=/trunk/mcs/; revision=30276
2004-06-24 06:04:41 +00:00
Raja R Harinath fb28cf618d (LIBRARY_COMPILE): Only define for W32.
Unbreak the build on Linux.

svn path=/trunk/mcs/; revision=30275
2004-06-24 05:59:44 +00:00
Sanja Gupta 16bea13f66 ChangeLog: Updated Changelog
gdipFunctions.cs: Corrected issue in GdiPlusStreamHelper class.
        If read function was called after seek function call, the
        implementation  was returning data from bytes already peeked and
        not from the new position in stream, which we have seeked.

svn path=/trunk/mcs/; revision=30274
2004-06-24 05:56:02 +00:00
Sebastien Pouliot 83eefc994f 2004-06-23 Sebastien Pouliot <[email protected]>
* UTF7Encoding.cs: Fixed decoding table. Fixed char count calculation.
	Follow the RFC1642 rules for "overbits".

svn path=/trunk/mcs/; revision=30262
2004-06-24 02:39:31 +00:00
Sebastien Pouliot 4f4f9d7e08 2004-06-23 Sebastien Pouliot <[email protected]>
* UTF7EncodingTest.cs: Added 3 more test cases from RFC1642 to decode
	and re-encode UTF7 from/to unicode.

svn path=/trunk/mcs/; revision=30257
2004-06-24 02:10:12 +00:00
Miguel de Icaza c07c3f3d19 Flush
svn path=/trunk/mono/; revision=30255
2004-06-24 00:54:16 +00:00
Miguel de Icaza 9db2e99647 flush
svn path=/trunk/mono/; revision=30254
2004-06-24 00:19:08 +00:00
Miguel de Icaza 7aea17d6fc flush
svn path=/trunk/mono/; revision=30253
2004-06-24 00:14:22 +00:00
Ben Maurer 6dba22de31 test case for 60669
svn path=/trunk/mcs/; revision=30251
2004-06-23 23:33:35 +00:00
Ben Maurer 49f99785d3 2004-06-23 Ben Maurer <[email protected]>
* expression.cs (StackAlloc.Resolve): The argument may not
	be a constant; deal with this case.

svn path=/trunk/mcs/; revision=30250
2004-06-23 23:30:25 +00:00
Paolo Molaro c95c3fcd08 Wed Jun 23 23:29:04 CEST 2004 Paolo Molaro <[email protected]>
* io.c: don't use sharemode for on-disk file permissions: it's used
	for shared access to the open file.

svn path=/trunk/mono/; revision=30240
2004-06-23 20:37:54 +00:00
Marek Safar 45a6eb1331 2004-06-23 Marek Safar <[email protected]>
* attribute.cs (IndexerName_GetIndexerName): Renamed to
	GetIndexerAttributeValue.
	(ScanForIndexerName): Renamed to GetIndexerNameAttribute.

	* class.cs (Indexer.Define): Added error tests for CS0415,
	CS0609.

svn path=/trunk/mcs/; revision=30239
2004-06-23 20:32:33 +00:00
Miguel de Icaza 15c56ab327 Add Edd's Catalog
svn path=/trunk/mcs/; revision=30238
2004-06-23 20:00:36 +00:00
Jackson Harper d43da25048 * Driver.cs: Use the same success message as MS.
svn path=/trunk/mcs/; revision=30237
2004-06-23 19:56:26 +00:00
Jackson Harper dabba3f6d8 * MethodDef.cs: sigh, another varargs fix that probably breaks
other varargs tets. Someday I will get this right, I don't think
	today is that day though. This fix basically just makes sure to
	trim the sentinel off of signatures. Also eliminated some code
	duplication.
	* ParamDef.cs: Make IsSentinel work for both cases of generating a
	sentinel param def.

svn path=/trunk/mcs/; revision=30233
2004-06-23 18:50:54 +00:00
Sebastien Pouliot cfbd5912f8 2004-06-23 Sebastien Pouliot <[email protected]>
* DateTime.cs: Throw ArgumentOutOfRangeException if the year is
	bigger than 9999. Fix bug #41845.

svn path=/trunk/mcs/; revision=30230
2004-06-23 18:19:15 +00:00
Gonzalo Paniagua Javier 193970990d 2004-06-23 Gonzalo Paniagua Javier <[email protected]>
* PageParser.cs:
	* UserControlParser.cs: set the page/user control base type even when no
	default directive provided. Fixes bug #60572.

svn path=/trunk/mcs/; revision=30227
2004-06-23 17:55:50 +00:00
Gonzalo Paniagua Javier 2a958dc772 Store browscap.ini as a text file
svn path=/trunk/mono/; revision=30224
2004-06-23 17:47:20 +00:00
Sebastien Pouliot 62a65807c9 2004-06-23 Sebastien Pouliot <[email protected]>
* SymmetricTransform.cs: The condition to keep a block is a little
	more complex so it was moved as a private property.

svn path=/trunk/mcs/; revision=30223
2004-06-23 17:37:27 +00:00
Miguel de Icaza 59312205f7 Add INTL macro, for the libintl library
svn path=/trunk/mono/; revision=30220
2004-06-23 17:21:02 +00:00
Gonzalo Paniagua Javier af5142b4d2 2004-06-23 Gonzalo Paniagua Javier <[email protected]>
* appdomain.c: for paths in PrivateBinPath that are absolute, there's
	no need to build a new path combining that with the application base.
	Fixes bug #60442.

svn path=/trunk/mono/; revision=30217
2004-06-23 17:14:08 +00:00
Jackson Harper 7b90b85077 * CSharpCodeGenerator.cs (GenerateLabeledStatement): Append a ": "
to the statement name. Make sure the statement isn't null before
	writing. Patch by Alex Yakunin.

svn path=/trunk/mcs/; revision=30211
2004-06-23 16:25:02 +00:00
Paolo Molaro cc7454d782 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <[email protected]>
* reflection.c: fixed minor standard compliance issues.

svn path=/trunk/mono/; revision=30210
2004-06-23 15:45:52 +00:00
Gonzalo Paniagua Javier f58acb1bab 2004-06-23 Gonzalo Paniagua Javier <[email protected]>
* HtmlForm.cs: disabled smartnavigation as we have no scripts to support
	it and failed when the browser was IE.

svn path=/trunk/mcs/; revision=30208
2004-06-23 15:16:27 +00:00
Paolo Molaro fcaf1f7d66 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <[email protected]>
* reflection.c: fixed issue with encoding some custom attributes
	(arrays in properties and fields, bug #60411).

svn path=/trunk/mono/; revision=30207
2004-06-23 15:09:05 +00:00
Gonzalo Paniagua Javier 7371e09828 2004-06-23 Gonzalo Paniagua Javier <[email protected]>
* PageParser.cs: use default trace settings from web.config and check
	if trace is only requested for local connections. Fixes bug #60180.

svn path=/trunk/mcs/; revision=30206
2004-06-23 15:02:35 +00:00
Miguel de Icaza 54f8a7282c 2004-06-23 Miguel de Icaza <[email protected]>
* attribute.cs (Attribute.Resolve): Keep field code in sync with
	property code.

svn path=/trunk/mcs/; revision=30205
2004-06-23 15:02:33 +00:00
Sebastien Pouliot 3e4be5e128 2004-06-23 Sebastien Pouliot <[email protected]>
* FloatingPointFormatter.cs: Applied correction from Jon Skeet on
	the "R"eversible format for negative numbers.

svn path=/trunk/mcs/; revision=30204
2004-06-23 14:54:54 +00:00
Sebastien Pouliot 76f44be2f3 2004-06-23 Sebastien Pouliot <[email protected]>
* DoubleFormatterTest.cs: Added a new test for a negative roundtrip
	(which was broken).

svn path=/trunk/mcs/; revision=30203
2004-06-23 14:52:50 +00:00
Sebastien Pouliot 8c8082be00 2004-06-23 Sebastien Pouliot <[email protected]>
* CryptoStreamTest.cs: Added two tests for bug #60573. One shows that
	an encryptor doesn't reduce the number of block on Write while the
	second shows that a decryptor does reduce the number of blocks on
	Write.

svn path=/trunk/mcs/; revision=30200
2004-06-23 14:39:00 +00:00
Sebastien Pouliot 4ba33a11f2 2004-06-23 Sebastien Pouliot <[email protected]>
* SymmetricTransform.cs: Reduce by one the number of block when
	decrypting. This operation was in CryptoStream before but is only
	required for decryption (which CryptoStream can't know).
	Fix bug #60573.

svn path=/trunk/mcs/; revision=30199
2004-06-23 14:29:59 +00:00
Sebastien Pouliot 0d0a717190 2004-06-23 Sebastien Pouliot <[email protected]>
* CryptoStream.cs: Removed the block reduction. This seems to be done
	only for Decryptor so it was moved to SymmetricTransform.

svn path=/trunk/mcs/; revision=30198
2004-06-23 14:25:11 +00:00
Gonzalo Paniagua Javier 9eced4ea4b 2004-06-23 Gonzalo Paniagua Javier <[email protected]>
* reflection.c: fix start address when copying the public key token.

svn path=/trunk/mono/; revision=30194
2004-06-23 13:52:13 +00:00
Martin Baulig b36b756a32 2004-06-23 Martin Baulig <[email protected]>
* mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
	the `exc' object in a static object to put it into the GC's root set.

svn path=/trunk/mono/; revision=30193
2004-06-23 13:41:56 +00:00
Gonzalo Paniagua Javier 73a1a3866c updated
svn path=/trunk/mono/; revision=30190
2004-06-23 13:31:42 +00:00
Jambunathan K fa54ec10b2 corcompare based fixes
svn path=/trunk/mcs/; revision=30188
2004-06-23 13:01:11 +00:00
Paolo Molaro 24ed1ebc0b Enable alpha and hppa/linux builds, though they probably need more work.
svn path=/trunk/mono/; revision=30187
2004-06-23 12:53:45 +00:00
Miguel de Icaza 6971b9943f fix
svn path=/trunk/mono/; revision=30186
2004-06-23 12:51:26 +00:00
Paolo Molaro bb4d01190c Wed Jun 23 15:40:48 CEST 2004 Paolo Molaro <[email protected]>
* TypeBuilder.cs: handle properly the case when SetParent()
	is called (requires an updated runtime, too bug#60474).

svn path=/trunk/mcs/; revision=30185
2004-06-23 12:50:05 +00:00
Paolo Molaro 8a99e745e0 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <[email protected]>
* reflection.c: make mono_reflection_setup_internal_class ()
	callable a second time to setup a new parent class.

svn path=/trunk/mono/; revision=30184
2004-06-23 12:47:14 +00:00
Sachin Kumar 3e99ece0ea Trivial Fixes
svn path=/trunk/mcs/; revision=30183
2004-06-23 12:46:21 +00:00
Marek Safar e6ab4f17b8 fixed type
svn path=/trunk/mcs/; revision=30182
2004-06-23 12:17:02 +00:00
Marek Safar 4e06d30c9c new tests
svn path=/trunk/mcs/; revision=30181
2004-06-23 12:05:00 +00:00
Paolo Molaro 0243a47fd9 Wed Jun 23 14:20:47 CEST 2004 Paolo Molaro <[email protected]>
* EnumBuilder.cs, TypeBuilder.cs: patch from Gert Driesen
	to implement EnumBuilder (slightly tweaked).

svn path=/trunk/mcs/; revision=30180
2004-06-23 12:02:37 +00:00
Gonzalo Paniagua Javier 40181c2c94 2004-06-23 Gonzalo Paniagua Javier <[email protected]>
* AuthorizationConfig.cs: really fix bug #60482. Thanks David!

svn path=/trunk/mcs/; revision=30178
2004-06-23 11:13:28 +00:00
Anirban Bhattacharjee 126a962029 2004-06-23 Anirban Bhattacharjee <[email protected]>
* Strings.cs: Several trivial bug fixing

svn path=/trunk/mcs/; revision=30176
2004-06-23 11:09:58 +00:00
Miguel de Icaza 3330deac71 Flush
svn path=/trunk/mono/; revision=30175
2004-06-23 10:53:57 +00:00
Lluis Sanchez 0e8cc54621 * System.Runtime.Remoting_test.dll.sources: Added ActivationTests.cs.
svn path=/trunk/mcs/; revision=30174
2004-06-23 10:26:13 +00:00
Lluis Sanchez a8a6c2431d * ActivationTests.cs: New tests.
* BaseCalls.cs, CallSeq.cs: Use Assert instead of the deprecated Assertion.

svn path=/trunk/mcs/; revision=30173
2004-06-23 10:25:15 +00:00
Gonzalo Paniagua Javier 55827b6f12 enable Mono.CSharp.Debugger on windows
svn path=/trunk/mono/; revision=30172
2004-06-23 09:59:27 +00:00
Gonzalo Paniagua Javier 220966f782 2004-06-23 Gonzalo Paniagua Javier <[email protected]>
* Makefile: enabled Mono.CSharp.Debugger on windows.

svn path=/trunk/mcs/; revision=30171
2004-06-23 09:58:18 +00:00
Gonzalo Paniagua Javier 4c581a0e59 2004-06-23 Gonzalo Paniagua Javier <[email protected]>
* Makefile: build using mcs on windows.

svn path=/trunk/mcs/; revision=30170
2004-06-23 09:57:13 +00:00
Gonzalo Paniagua Javier c5512254ac 2004-06-23 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: wrong error code in connect and accept. EWOULDBLOCK is
	10035. Fixes bug #60563.

svn path=/trunk/mcs/; revision=30169
2004-06-23 09:38:50 +00:00
Dick Porter 460f2a77c8 2004-06-23 Dick Porter <[email protected]>
* threads.c: Check for WAIT_IO_COMPLETION return values.

svn path=/trunk/mono/; revision=30167
2004-06-23 08:59:54 +00:00
Dick Porter 71613dce13 Fix the build
svn path=/trunk/mono/; revision=30166
2004-06-23 08:32:16 +00:00
Anirban Bhattacharjee 3769a33f45 2004-06-23 Anirban Bhattacharjee <[email protected]>
* DateTime.cs: More date formats supported by DateValue function now

svn path=/trunk/mcs/; revision=30165
2004-06-23 06:16:41 +00:00
Umadevi S f742f2b454 2004-06-23 Umadevi S <[email protected]>
* UniqueConstraint.cs :changed a ifdef true to ifdef NET_1_1

svn path=/trunk/mcs/; revision=30164
2004-06-23 05:51:35 +00:00
Umadevi S 26968ca6e2 2004-06-23 Umadevi S <[email protected]>
* DataTableTest.cs :Corrected Testcases to .net 1.1 specifications

svn path=/trunk/mcs/; revision=30163
2004-06-23 05:44:04 +00:00
Anirban Bhattacharjee 5a230b617f 2004-06-23 Anirban Bhattacharjee <[email protected]>
* Strings.cs: Trivial changes

svn path=/trunk/mcs/; revision=30162
2004-06-23 05:39:17 +00:00
Sureshkumar T 19abd41ef6 2004-06-23 Sureshkumar T ([email protected])
* OdbcConnection.cs: Fix: Moved env allocation to Open method.
                             Disconnection & freeing handles are done in Close
                             method to avoid simultaneous connections.
        * libodbc.cs       : Added constants for odbc version.

svn path=/trunk/mcs/; revision=30161
2004-06-23 05:19:59 +00:00
Sureshkumar T db3105e999 2004-06-23 Sureshkumar T <[email protected]>
* Added test to check whether the OdbcConnection.Close method closes
          all the handles.
        * New files:
                OdbcConnectionTest.cs   - test suite for OdbcConnection class.

svn path=/trunk/mcs/; revision=30160
2004-06-23 05:13:42 +00:00
Umadevi S c8a01883b7 2004-06-23 Umadevi S <[email protected]>
* DataRelationTest.cs : Corrected AddRelation testcases

svn path=/trunk/mcs/; revision=30158
2004-06-23 04:12:13 +00:00
Raja R Harinath 42b467bbdd (dis_event_signature): Decode and print event_flags.
svn path=/trunk/mono/; revision=30157
2004-06-23 04:10:50 +00:00
Umadevi S 899c87a148 2004-06-23 Umadevi S <[email protected]>
* ConstraintCollectionTest.cs : Corrected AddRange testcases

svn path=/trunk/mcs/; revision=30155
2004-06-23 03:44:36 +00:00
Anirban Bhattacharjee 74962a8e93 bug fixes
svn path=/trunk/mcs/; revision=30154
2004-06-23 03:35:06 +00:00
Martin Baulig 1cf7bcfc62 2004-06-23 Martin Baulig <[email protected]>
* flowanalysis.cs (UsageVector.MergeChild): If we're a loop and we
	neither return nor throw, reset the barrier as well.  Fixes #60457.

svn path=/trunk/mcs/; revision=30150
2004-06-23 00:18:28 +00:00
Martin Baulig a0b25ef280 New test for #60457.
svn path=/trunk/mcs/; revision=30149
2004-06-23 00:16:45 +00:00
Jackson Harper ff5f9c382d fix typo
svn path=/trunk/mono/; revision=30148
2004-06-22 23:18:59 +00:00
Miguel de Icaza ef8e81dbcf Flush
svn path=/trunk/mono/; revision=30146
2004-06-22 23:00:23 +00:00
Atsushi Eno 907fb23d3d 2004-06-22 Atsushi Enomoto <[email protected]>
* Uri.cs : Such ctor arg string that starts with "//" should be
	  regarded as a local file path that will be condensed to single "/",
	  so handle such path differently under Windows and under *nix.
	  Since '\\' is a valid path character on Unix, so we should not
	  replace it with '/' in LocalPath.

svn path=/trunk/mcs/; revision=30142
2004-06-22 20:18:01 +00:00
Atsushi Eno ee12fd768b 2004-06-22 Atsushi Enomoto <[email protected]>
* UriTest.cs : As Unix paths, //foo/bar never means host == foo,
	  file path == /bar. So on *nix environment, interpret LocalPath of
	  file://foo/bar as /bar, not //foo/bar.
	* test-uri-list.txt, tset-uri-props.txt : We cannot test such path
	  that starts with "//" in automatic one, since on Windows it is
	  UNC host name but on Unix it is condensed to /foo style abs path.
	* UriTest2.cs : Test only on windows such path that starts with "\\".

svn path=/trunk/mcs/; revision=30141
2004-06-22 20:10:39 +00:00
Sebastien Pouliot f111ad1180 2004-06-22 Sebastien Pouliot <[email protected]>
* appdomain.c: Removed the g_free on the public key token. Now copy
	the pk token string into the MonoAssemblyName buffer using g_strlcpy.
	* assembly.c: Added public key token string value when loading
	assemblies. Fix bug #60439.
	* icall.c: Added missing informations (like public key) in
	GetReferencedAssemblies. Fix #60519.
	* image.h: Changed definition for public key token from const char*
	public_tok_value to guchar public_key_token [17];
	* reflection.c: Updated for changes to public key token.

svn path=/trunk/mono/; revision=30140
2004-06-22 20:09:27 +00:00
Dick Porter 4b7c1d9725 2004-06-22 Dick Porter <[email protected]>
* events.c (CreateEvent): When creating an auto-reset event that
	is initially owned, make sure the set count starts at 1.

svn path=/trunk/mono/; revision=30137
2004-06-22 19:34:47 +00:00
Atsushi Eno 805fd0c41d 2004-06-22 Atsushi Enomoto <[email protected]>
* class.cs : EventAttributes is now set to None by default.
	  This fixes bug #60459.

svn path=/trunk/mcs/; revision=30133
2004-06-22 19:00:15 +00:00
Atsushi Eno a2343da0de 2004-06-22 Atsushi Enomoto <[email protected]>
* CSharpCodeGenerator.cs :
	  Check null argument in CreateValidIdentifier().

svn path=/trunk/mcs/; revision=30132
2004-06-22 18:53:16 +00:00
Jambunathan K 39051eab8f Added BinaryVBFile.cs and RandomVBFile.cs. Just preliminary changes.
All changes need to be reviewed and committed.

I have pulled off Rob's changes on FileSystem.cs temporarily. I will
remerge it another day or two.

svn path=/trunk/mcs/; revision=30131
2004-06-22 18:49:09 +00:00
Atsushi Eno 420991e86a 2004-06-22 Atsushi Enomoto <[email protected]>
* DataSet.cs : Fixed ReadXml(). When ReadMode is ReadSchema and the
	  schema is inside the document element (as created in XmlWriteMode
	  .WriteSchema), it should read schema from that non-document element.
	  This fixes one case reported in bug #60470.

svn path=/trunk/mcs/; revision=30130
2004-06-22 18:42:26 +00:00
Paolo Molaro bb55581111 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <[email protected]>
* mini-ppc.c, cpu-g4.md: small updates to be able to compile
	vararg-using methods.

svn path=/trunk/mono/; revision=30129
2004-06-22 18:38:07 +00:00
Jordi Mas i Hernandez b5fd3413ce fixes class name in filename
svn path=/trunk/mcs/; revision=30128
2004-06-22 16:49:20 +00:00
Jordi Mas i Hernandez 70b35b408e MeasureString wrappers
svn path=/trunk/mcs/; revision=30127
2004-06-22 16:40:48 +00:00
Lluis Sanchez 24e25ee390 * icall.c: In ves_icall_InternalExecute, when setting a filed, also look
for the field in base classes.

svn path=/trunk/mono/; revision=30125
2004-06-22 15:19:08 +00:00
Miguel de Icaza df6cb78b0c Add Marek to the about section
svn path=/trunk/mcs/; revision=30123
2004-06-22 15:06:48 +00:00
Sachin Kumar cb4a5378f2 Fixed few bugs
svn path=/trunk/mcs/; revision=30122
2004-06-22 14:27:52 +00:00
Marek Safar 0ae7041cc4 fixed error text
svn path=/trunk/mcs/; revision=30121
2004-06-22 14:24:59 +00:00
Paolo Molaro b83501a6b1 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <[email protected]>
* mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
	mark headers as not supported, they are installed only for use by the
	debugger.

svn path=/trunk/mono/; revision=30119
2004-06-22 13:57:15 +00:00
Paolo Molaro 14ec9a1363 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <[email protected]>
* *.c, *.h: avoid namespace pollution in public headers.

svn path=/trunk/mono/; revision=30116
2004-06-22 13:44:46 +00:00
Dick Porter 631b27e200 Fix for older automake
svn path=/trunk/mono/; revision=30115
2004-06-22 13:41:32 +00:00
Marek Safar 2b850af228 new tests
svn path=/trunk/mcs/; revision=30114
2004-06-22 13:40:12 +00:00
Joerg Rosenkranz 03f9ca4f63 Patch submitted by Gert Driesen:
2004-06-19  Gert Driesen <[email protected]>

        * Makefile: added references to System.EnterpriseServices and
        System.Drawing assemblies
        * System.Data.OracleClient.dll: added Assembly/Consts.cs and
        System.Data.OracleClient/OracleMonthSpan.cs
        * OracleCommand.cs: added missing attributes, marked class sealed,
        fixed signature of ExecuteOracleScalar method
        * OracleCommandBuilder.cs: added missing attributes
        * OracleConnection.cs: marked class sealed, added missing attributes,
        stubbed missing propertie, methods and events
        * OracleDataAdapter.cs: added missing attributes, removed extra
        stubbed Dispose method
        * OracleDataReader.cs: stubbed missing methods
        * OracleDataTime.cs: fixed signature and implementation of operator
        * OracleException.cs: marked serializable, added serialization ctor
        * OracleParameter.cs: added missing attributes, marked extra methods
        private
        * OracleParameterCollection.cs: marked class sealed, added missing
        attributes
        * OracleString.cs: added missing methods, added missing operators

svn path=/trunk/mcs/; revision=30112
2004-06-22 13:21:08 +00:00
Sanja Gupta 5f4cfdad82 ChangeLog: Updated ChangeLog.
TestIconConverter.cs, TestImageConverter.cs: Commented out some tests.

svn path=/trunk/mcs/; revision=30111
2004-06-22 13:06:00 +00:00
Dick Porter 0b31cdd230 2004-06-22 Dick Porter <[email protected]>
* MutexTest.cs: No need to ignore these tests now

	* ThreadTest.cs: You can't Start() a thread that's been aborted.
	Improve state tests.

svn path=/trunk/mcs/; revision=30108
2004-06-22 11:55:25 +00:00
Lluis Sanchez dab9b5e951 * proxies.net.xml.gz: Updated.
* wsdlfiles.tar.gz: Updated.

svn path=/trunk/mcs/; revision=30107
2004-06-22 10:05:08 +00:00
Lluis Sanchez e23c82103d * XmlReturnReader.cs, XmlReturnWriter.cs: Generate the serializer with
the root attribute taken from the method attributes.

svn path=/trunk/mcs/; revision=30106
2004-06-22 10:03:21 +00:00
Lluis Sanchez 3680906902 * HttpSimpleProtocolImporter.cs: Import return types as XmlTypeMapping,
not as XmlMemberMapping. This allows the use of the correct AddMetadata
	  method for generating attributes.

svn path=/trunk/mcs/; revision=30105
2004-06-22 09:59:34 +00:00
Lluis Sanchez 360208e654 * ReflectionHelper.cs: Correctly detect private types.
* XmlCodeExporter.cs: Implemented missing method.
	* XmlSchemaImporter.cs: Allow import of root primitive types.

svn path=/trunk/mcs/; revision=30104
2004-06-22 09:51:50 +00:00
Raja R Harinath ad194e0f96 (bootstrap) [PLATFORM_WIN32]: Make two-stage.
svn path=/trunk/mono/; revision=30102
2004-06-22 09:30:49 +00:00
Raja R Harinath 62183b530c Use $(PLATFORM_PATH_SEPARATOR) in MONO_PATH.
svn path=/trunk/mcs/; revision=30101
2004-06-22 09:19:37 +00:00
Jordi Mas i Hernandez df668cb4c0 define and use GdipSetVisibleClip_linux
svn path=/trunk/mcs/; revision=30100
2004-06-22 09:17:28 +00:00
Raja R Harinath 5d884fd231 Use $(PLATFORM_PATH_SEPARATOR) when setting MONO_PATH.
svn path=/trunk/mcs/; revision=30099
2004-06-22 09:15:58 +00:00
Jordi Mas i Hernandez 1f0f46a3dd add clip sample
svn path=/trunk/mcs/; revision=30098
2004-06-22 09:12:36 +00:00
Raja R Harinath b915bc6dfd Refine previous change to work with mcs 0.31.
* Consts.cs (UnmanagedType_80): While bootstrapping, refer to new
internal bootstrap-only define in UnmanagedType.

svn path=/trunk/mcs/; revision=30097
2004-06-22 08:36:47 +00:00
Raja R Harinath d83f98c524 Fix bootstrap with mcs 0.31.
* UnmanagedType.cs (UnmanagedType.__mono_bootstrap_NativeTypeMax):
New bootstrap-only constant.

svn path=/trunk/mcs/; revision=30096
2004-06-22 08:36:05 +00:00
Gonzalo Paniagua Javier 72d5a6809b 2004-06-22 Gonzalo Paniagua Javier <[email protected]>
* AuthorizationConfig.cs: we must match [verb +] (role|user). Fixes bug
	#60482.

svn path=/trunk/mcs/; revision=30095
2004-06-22 08:18:48 +00:00
Todd Berman eb6cb51857 2004-06-22 Todd Berman <[email protected]>
* configure: Patch from Mariano Su��rez-Alvarez
        <[email protected]> to make configure accept jhbuild style
        /prefix /usr options, and to continue past unknown options. Currently
        this patch is a bit spammy with multiple unknown options, anyone
        who is interested is welcome to fix this.

svn path=/trunk/mcs/; revision=30093
2004-06-22 06:02:06 +00:00
Miguel de Icaza ccd3ed614a Add more inline docs, to be extracted later with a tool
svn path=/trunk/mono/; revision=30090
2004-06-22 04:18:17 +00:00
Duncan Mak d74ee6abee Remove duplicate licenses
svn path=/trunk/mcs/; revision=30084
2004-06-22 03:46:33 +00:00
Atsushi Eno a5ef8bedd7 2004-06-21 Atsushi Enomoto <[email protected]>
* XmlSecureResolverTests.cs : Just [Ignore] EmptyEvidenceDeniedAccess.
	  It requires CAS.

svn path=/trunk/mcs/; revision=30074
2004-06-22 01:22:07 +00:00
Atsushi Eno 606f7ce490 2004-06-21 Atsushi Enomoto <[email protected]>
* CSharpCodeGenerator.cs : Fix for tests. Check type names in
	  CreateValidIdentifier. Implemented IsValidIdentifier.

svn path=/trunk/mcs/; revision=30073
2004-06-22 00:58:11 +00:00
Atsushi Eno ea228cfdfe 2004-06-21 Atsushi Enomoto <[email protected]>
* Misc.cs,
	  RelaxngPattern.cs,
	  RelaxngReader.cs :
	  Use XmlResolver (or XmlUrlResolver) directly. XmlResolver was
	  incorrectly _used_ before null check. Don't create XmlResolver
	  instance for _every_ pattern object.
	* RelaxngPattern.cs : UnresolvedRef.ExpandRef() should return not
	  try to find target derivative pattern twice. It was the culprit of
	  infinite loop. Removed dirty switches.
	* RelaxngGrammar.cs : code cleanup.

svn path=/trunk/mcs/; revision=30070
2004-06-21 20:54:39 +00:00
Atsushi Eno 77c7d595f8 2004-06-21 Atsushi Enomoto <[email protected]>
* RdpPatterns.cs : Fixed ExpandRef() that caused incorrect nest error.

svn path=/trunk/mcs/; revision=30069
2004-06-21 20:40:30 +00:00
Martin Baulig 8c2b9a1af2 2004-06-21 Martin Baulig <[email protected]>
* exception.c (mono_get_exception_security): It's in
	"System.Security", not in "System".

	* mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
	the exception classes.

svn path=/trunk/mono/; revision=30067
2004-06-21 20:23:21 +00:00
Miguel de Icaza 5d9705bf2b Add inline documentation to the class API
svn path=/trunk/mono/; revision=30065
2004-06-21 19:51:36 +00:00
Martin Baulig 1886261c12 2004-06-21 Martin Baulig <[email protected]>
* mono-debug-debugger.c (mono_debugger_unhandled_exception):
	Protect the exception object from being finalized.

svn path=/trunk/mono/; revision=30061
2004-06-21 18:43:21 +00:00
Duncan Mak 25e1e7ccfd Add MIT license to System.Security.DLL
svn path=/trunk/mcs/; revision=30060
2004-06-21 18:32:17 +00:00
Duncan Mak 58a0067567 Add MIT license to System.Web.Services.DLL
svn path=/trunk/mcs/; revision=30058
2004-06-21 18:30:28 +00:00
Martin Baulig 83f27b4135 2004-06-21 Martin Baulig <[email protected]>
* mini/mini-exceptions.c
	(mono_handle_exception): Added `gpointer original_ip' argument.
	After calling mono_unhandled_exception(), call
	mono_debugger_unhandled_exception() and if that returns true,
	restore the context and return.

svn path=/trunk/mono/; revision=30057
2004-06-21 18:27:42 +00:00
Martin Baulig 7fd64f5c24 2004-06-21 Martin Baulig <[email protected]>
* mono-debug-debugger.h (mono_debugger_unhandled_exception): New
	public function.

svn path=/trunk/mono/; revision=30056
2004-06-21 18:23:30 +00:00
Duncan Mak 8fa6e766dd Add MIT license to System.XML.DLL
svn path=/trunk/mcs/; revision=30055
2004-06-21 18:07:31 +00:00
Duncan Mak 24f5ef2c44 Add MIT license to System.dll
svn path=/trunk/mcs/; revision=30054
2004-06-21 18:02:11 +00:00
Duncan Mak 9286403c14 Add license and copyright to Mono.Cairo
svn path=/trunk/mcs/; revision=30051
2004-06-21 17:36:11 +00:00
Paolo Molaro 49d673df71 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <[email protected]>
* mini-ppc.c: prefer the use of relative branches so
	they won't need to be patched in aot code (patch from Patrick Beard).

svn path=/trunk/mono/; revision=30046
2004-06-21 16:36:33 +00:00
Paolo Molaro bb9f5fdc12 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <[email protected]>
* aot.c: patch from Patrick Beard to make the output assembly
	more correct for the MacOSX assembler. Small tweak to
	generate sane images on Linux/PPC, too.

svn path=/trunk/mono/; revision=30045
2004-06-21 16:29:32 +00:00
Jackson Harper 1f28102aae * Decimal.cs: Make sure to use invariant culture when parsing
floats stringified with the invariant culture. Patch by Rodrigo
	B. de Oliveira.

svn path=/trunk/mcs/; revision=30044
2004-06-21 16:10:13 +00:00
Atsushi Eno 7d1ecfd7c4 2004-06-21 Atsushi Enomoto <[email protected]>
* FileStreamTest.cs : Added some tests on .ctor() without FileShare.

svn path=/trunk/mcs/; revision=30041
2004-06-21 14:46:14 +00:00
Atsushi Eno d28b4f66c0 2004-06-21 Atsushi Enomoto <[email protected]>
* FileStream.cs :
	  .ctor() should block write access when created with FileAccess.Write.

svn path=/trunk/mcs/; revision=30040
2004-06-21 14:45:01 +00:00
Atsushi Eno 8c0f1bb9d5 2004-06-21 Atsushi Enomoto <[email protected]>
FileInfoTest.cs : more '/' and Path.DirectorySeparatorChar fixes

svn path=/trunk/mcs/; revision=30038
2004-06-21 13:46:04 +00:00
Atsushi Eno 8fa49e6e35 2004-06-16 Atsushi Enomoto <[email protected]>
* DirectoryInfoTest.cs,
	  DirectoryTest.cs,
	  FileStreamTest.cs,
	  FileSystemInfoTest.cs:
	  Replace all '/' in path with Path.DirectorySeparatorChar.

svn path=/trunk/mcs/; revision=30037
2004-06-21 13:42:39 +00:00
Sebastien Pouliot e9c375e394 2004-06-21 Sebastien Pouliot <[email protected]>
* reflection.c: Load the assembly in mono_reflection_type_from_name,
	if it was not loaded before. Fix parts of #60439.

svn path=/trunk/mono/; revision=30036
2004-06-21 13:38:29 +00:00
Paolo Molaro e21b1e1c26 More tests for runtime_invoke ().
svn path=/trunk/mono/; revision=30035
2004-06-21 13:37:29 +00:00
Paolo Molaro e9969921c0 More embedding samples.
svn path=/trunk/mono/; revision=30034
2004-06-21 13:32:25 +00:00
Atsushi Eno 5412643255 2004-06-21 Atsushi Enomoto <[email protected]>
* FileStream.cs : Check buffer size before creating file.
	* StreamReader.cs : Check encoding!=null before creating file.
	* File.cs,
	  MonoIO.cs : Convert DateTime to FileTime after checking
	  file IO sharing violation (it just fixes the type of exception).

svn path=/trunk/mcs/; revision=30033
2004-06-21 13:30:46 +00:00
Paolo Molaro df246a4f9c Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <[email protected]>
* marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
	code that was broken since Ben's change: wrappers are now
	dependent on the method signature only again.

svn path=/trunk/mono/; revision=30032
2004-06-21 13:28:25 +00:00
Raja R Harinath 3f42416e8a (ReSign): Return a bool indicating success or failure.
(Main): Return with failure if ReSign() fails.

svn path=/trunk/mcs/; revision=30031
2004-06-21 12:23:41 +00:00
Raja R Harinath 3dd1fabda2 (LIBRARY_SNK): Sign with nunit.key.
svn path=/trunk/mcs/; revision=30030
2004-06-21 12:15:49 +00:00
Raja R Harinath 51b4a7a71a Avoid spurious "unexpected incorrect error".
svn path=/trunk/mcs/; revision=30029
2004-06-21 12:12:07 +00:00
Raja R Harinath f3834ac171 (LIBRARY_SNK): Sign with Npgsql/Npgsql.snk.
svn path=/trunk/mcs/; revision=30028
2004-06-21 12:08:12 +00:00
Raja R Harinath dbc4617b0c (LIBRARY_SNK): Sign with SharpZipLib.key. The library
is delay-signed according to ICSharpCode.SharpZipLib/AssemblyInfo.cs.

svn path=/trunk/mcs/; revision=30027
2004-06-21 12:07:29 +00:00
Marek Safar 8dd59d7659 new tests
svn path=/trunk/mcs/; revision=30026
2004-06-21 12:07:23 +00:00
Raja R Harinath 092ade872e update
svn path=/trunk/mcs/; revision=30025
2004-06-21 12:07:00 +00:00
Raja R Harinath cb2f17a4ed * executable.make ($(PROGRAM)): Move depend on the makefrags ...
(all-local): ... here.
* library.make ($(the_lib), $(test_lib), $(btest_lib), all-local):
Likewise.
(LIBRARY_SNK): New default define.  Allows library to be signed
with a key other than mono.snk.
($(the_lib_signature_stamp)): New stamp file created when an
assembly is signed.
(install-local, uninstall-local, maybe-sign-lib): Set MONO_PATH.

svn path=/trunk/mcs/; revision=30024
2004-06-21 12:06:34 +00:00
Paolo Molaro ebb4ae0126 Mon Jun 21 14:06:03 CEST 2004 Paolo Molaro <[email protected]>
* interp.h: API updates.

svn path=/trunk/mono/; revision=30023
2004-06-21 11:14:42 +00:00
Marek Safar 66e7897cc9 2004-06-21 Marek Safar <[email protected]>
* test-275.cs: New test for #59792

svn path=/trunk/mcs/; revision=30022
2004-06-21 09:46:14 +00:00
Sachin Kumar c3046ba7a7 Minor bug fixes
svn path=/trunk/mcs/; revision=30021
2004-06-21 07:41:21 +00:00
Atsushi Eno ae05f2b3f8 2004-06-21 Atsushi Enomoto <[email protected]>
* mono-sha1.c : close opened file in case of successful read. This
	  saves a bunch of System.Reflection Emit failures under windows.

svn path=/trunk/mono/; revision=30019
2004-06-21 07:18:40 +00:00
César Natarén 76cc01191d updates from grammar changes
svn path=/trunk/mcs/; revision=30004
2004-06-21 00:50:46 +00:00
César Natarén 3624f7d92f changelog entries
svn path=/trunk/mcs/; revision=30003
2004-06-21 00:48:54 +00:00
César Natarén 1275c3782c * jscript-lexer-parser.g: pass parent to break_stm. Added block as
a statement. Temporarily disabled object_literal in order to test
        the block structure and continue and break statements.

svn path=/trunk/mcs/; revision=30002
2004-06-21 00:45:45 +00:00
César Natarén 9cab3b6de1 * ast.cs: Added InLoop and InSwitch.
svn path=/trunk/mcs/; revision=30000
2004-06-21 00:45:16 +00:00
César Natarén 5b05aba516 * Statement.cs: class If.Emit, call fall_true instead of fall_false so we don't
need to jump if the expression evaluates to true. Continue class,
        replaced ParentIsItrStm with InLoop, emit jump to correct
        place. Break class, implemented Resolve; deleted
        ParentIsCorrect. DoWhile, While classes, set LoopBegin and
        LoopEnd. While class, set LoopBegin and LoopEnd.

svn path=/trunk/mcs/; revision=29999
2004-06-21 00:44:52 +00:00
César Natarén 0e0a64c8ec * CodeGenerator.cs: Added LoopBegin and LoopEnd to EmitContext, they are used by
break and continue in order to jump to the desired place. Added
        check for converting to boolean if we encounter an identifier (at need_convert_to_boolean).

svn path=/trunk/mcs/; revision=29998
2004-06-21 00:44:16 +00:00
Martin Baulig a825eb4c52 2004-06-21 Martin Baulig <[email protected]>
* mono-debug-debugger.c (write_class): Cleaned this up a bit and
	added interface support.

svn path=/trunk/mono/; revision=29996
2004-06-21 00:37:56 +00:00
Jackson Harper 2968f8c40c * dis-cil.c: Handle switch statements with no labels.
svn path=/trunk/mono/; revision=29994
2004-06-20 23:23:38 +00:00
Jackson Harper 87e28b49cb * SwitchInstr.cs: Allow switches with no labels.
svn path=/trunk/mcs/; revision=29993
2004-06-20 23:12:12 +00:00
Jackson Harper 8002eb6ae8 * InstrTable.cs: Add .u8 opcodes for ldind and ldelem these are
just aliases to their .i8 equivelents.

svn path=/trunk/mcs/; revision=29992
2004-06-20 22:38:27 +00:00
Martin Baulig df61aada92 2004-06-21 Martin Baulig <[email protected]>
* class.c (mono_vtable_get_static_field_data): New public method.

svn path=/trunk/mono/; revision=29990
2004-06-20 22:29:00 +00:00
Atsushi Eno 79a84de0fa 2004-06-20 Atsushi Enomoto <[email protected]>
* filewatcher.c : Windows build fix to be compliant with API changes.

svn path=/trunk/mono/; revision=29989
2004-06-20 21:30:31 +00:00
Gonzalo Paniagua Javier acf93ff574 2004-06-20 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: fixed Accept for non-blocking sockets.

svn path=/trunk/mcs/; revision=29980
2004-06-20 19:00:11 +00:00
Atsushi Eno eeb7788acc 2004-06-20 Atsushi Enomoto <[email protected]>
* XmlDataInferenceLoader.cs : Kindly reject xml schema document as a
	  inference target. For bug #60470. (MS does not support schema
	  document inference and results in unconsistent dataset structure.)

svn path=/trunk/mcs/; revision=29977
2004-06-20 18:52:23 +00:00
Atsushi Eno 2949e66c28 2004-06-20 Atsushi Enomoto <[email protected]>
* DataTableCollection.cs : reset the table's DataSet to null when
	  removing a table from this collection.
	* DataTable.cs : When Namespace is not specified explicitly, its
	  Namespace property reflects DataSet's Namespace if exist.
	  This fixes bug #60469.

svn path=/trunk/mcs/; revision=29975
2004-06-20 17:35:14 +00:00
Atsushi Eno dcfd1cffa9 2004-06-20 Atsushi Enomoto <[email protected]>
* DataTableCollectionTest.cs : Added test for DataSet and Namespace
	  adjustment.

svn path=/trunk/mcs/; revision=29974
2004-06-20 17:34:40 +00:00
Jordi Mas i Hernandez 87664ecf85 added missing wrappers
svn path=/trunk/mcs/; revision=29973
2004-06-20 14:44:35 +00:00
Jackson Harper 2ce4a3f049 * monodis.1: Document --blob
svn path=/trunk/mono/; revision=29968
2004-06-20 01:50:13 +00:00
Jackson Harper bcffb8c467 * dump.c/h: New function to dump the contents of the blob
stream. I found it useful for debugging so I will share.
	* main.c: Add --blob switch to dump the blob stream.

svn path=/trunk/mono/; revision=29967
2004-06-20 01:46:44 +00:00
Jackson Harper 4db788efc0 * get.c/h: New function to stringify function pointers.
svn path=/trunk/mono/; revision=29966
2004-06-20 01:40:32 +00:00
Jackson Harper 42cb196921 * get.c: New function to stringify function pointers.
svn path=/trunk/mono/; revision=29965
2004-06-20 01:36:36 +00:00
Jackson Harper 709e98a759 * get.c: Fix name escaping so we dont escape everything in the
world anymore.

svn path=/trunk/mono/; revision=29964
2004-06-20 01:13:56 +00:00
Jackson Harper d7bec71731 * ILParser.jay: Resolve method pointers that are being treated as
typerefs.

svn path=/trunk/mcs/; revision=29963
2004-06-19 23:25:52 +00:00
Jackson Harper 141bac3ad0 * ilasm.exe.sources: Add MethodPointerTypeRef.cs to the build.
svn path=/trunk/mcs/; revision=29962
2004-06-19 23:23:09 +00:00
Jackson Harper 2b7087f3bc * MethodPointerTypeRef.cs: New File - represents a method pointer
that is being treated as a typeref. For example method void*() in
	the statement castclass method void*().

svn path=/trunk/mcs/; revision=29961
2004-06-19 23:21:31 +00:00
Jackson Harper 94c0773c00 * PEAPI.cs: Make sure the sentinel is placed properly for vararg
method pointers.

svn path=/trunk/mcs/; revision=29960
2004-06-19 23:12:20 +00:00
Jackson Harper ddecf09809 Give a little love
svn path=/trunk/mcs/; revision=29959
2004-06-19 22:30:13 +00:00
Jackson Harper b94c1f6680 * PEAPI.cs: Allow MethPtrTypes to be created from a signature
instead of from a method reference because it really doesn't make
	sense to do it that way ;-).

svn path=/trunk/mcs/; revision=29958
2004-06-19 21:14:45 +00:00
Jackson Harper 4a7b3fcc5a Add instructions on setting multiple mask values.
svn path=/trunk/mono/; revision=29953
2004-06-19 17:34:26 +00:00
Jackson Harper 8ae5262c72 * InstrTable.cs: Add undocumented brnull opcode. This is really
just an alias for brfalse.

svn path=/trunk/mcs/; revision=29952
2004-06-19 17:21:57 +00:00
Jackson Harper 0c95afbde4 * ILParser.jay: Resolve other modules global 'type'.
svn path=/trunk/mcs/; revision=29949
2004-06-19 16:43:00 +00:00
Miguel de Icaza 57d706aa4d Floush
svn path=/trunk/mono/; revision=29947
2004-06-19 16:29:08 +00:00
Paolo Molaro 63b0272887 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <[email protected]>
* class.h, class.c: more accessors.
	* metadata.h, metadata.c: prepare for hiding MonoType and
	MonoMethodSignature: people should use the accessors from now on
	outside of the tree.

svn path=/trunk/mono/; revision=29946
2004-06-19 16:17:04 +00:00
Jackson Harper 12357e691b * MethodDef.cs: Add a method to create vararg signatures from a
list of typerefs that matches the algorithm for creating vararg
	signatures from paramdefs. This is used when creating methodref
	signatures.
	* MethodRef.cs: Use the new CreateVarargSignature method to create
	the methods signature if it is a vararg method.

svn path=/trunk/mcs/; revision=29945
2004-06-19 16:12:47 +00:00
Paolo Molaro 0e43f1677e Test with metadata-related API sample usage.
svn path=/trunk/mono/; revision=29943
2004-06-19 15:10:45 +00:00
Paolo Molaro ca60c99375 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <[email protected]>
* *.c, *.h: more API cleanups.

svn path=/trunk/mono/; revision=29942
2004-06-19 15:08:58 +00:00
Atsushi Eno 666767aaf6 2004-06-19 Atsushi Enomoto <[email protected]>
* FloatingPointFormatter.cs : Literal string should be kept in the
	  output.

svn path=/trunk/mcs/; revision=29940
2004-06-19 13:11:50 +00:00
Atsushi Eno 2e8bfb9d63 2004-06-19 Atsushi Enomoto <[email protected]>
* FloatingPointFormatterTest.cs : Format literal (i.e. '...') in
	  format string should be kept as is.

svn path=/trunk/mcs/; revision=29939
2004-06-19 13:11:23 +00:00
Jochen Wezel e18c1d37e0 Changed some public constructors to private to match MS' implementation
svn path=/trunk/mcs/; revision=29938
2004-06-19 11:03:42 +00:00
Gert Driesen 187b6e8dd9 * Consts.cs: Added
svn path=/trunk/mcs/; revision=29937
2004-06-19 10:42:34 +00:00
Gonzalo Paniagua Javier e640278680 2004-06-19 Gonzalo Paniagua Javier <[email protected]>
* TemplateControlCompiler.cs: for system colors, use SystemColors class
	instead of Color. Fixes bug #60249.

svn path=/trunk/mcs/; revision=29936
2004-06-19 10:24:16 +00:00
Paolo Molaro 18f0189f44 Document function remapping, too.
svn path=/trunk/mono/; revision=29935
2004-06-19 09:42:23 +00:00
Atsushi Eno 448baf251a 2004-06-19 Atsushi Enomoto <[email protected]>
* mono-api-diff.cs : tiny fix on warning output.

svn path=/trunk/mcs/; revision=29934
2004-06-19 07:29:22 +00:00
Martin Baulig dda8f8dd35 2004-06-19 Martin Baulig <[email protected]>
* MonoSymbolTable.cs
	(SourceFileTable.Namespaces): New public property.

svn path=/trunk/mcs/; revision=29931
2004-06-19 01:26:02 +00:00
Jackson Harper 0fa628e921 * man/mono.1: Add MONO_LOG_LEVEL and MONO_LOG_MASK
svn path=/trunk/mono/; revision=29930
2004-06-18 23:35:58 +00:00
Jackson Harper 1ed5f785d1 * assembly.c: Trace loading assemblies.
* loader.c: Trace loading native libraries.
	* mono-config.c: Trace loading config files.

svn path=/trunk/mono/; revision=29926
2004-06-18 22:06:53 +00:00
Jackson Harper bdffef14b9 * mono-logger.c/h: Add a trace mask option for tracing loading
config files. A little white space love.

svn path=/trunk/mono/; revision=29925
2004-06-18 22:03:10 +00:00
Martin Baulig 3daec2987b 2004-06-18 Martin Baulig <[email protected]>
* generics.cs (GenericMethod.ctor): Don't take an Attributes
	argument.  Fixes #60441.

svn path=/trunk/mcs/; revision=29922
2004-06-18 21:07:55 +00:00
Duncan Mak 67e9efed0b Enable FC2
svn path=/trunk/mono/; revision=29920
2004-06-18 21:03:35 +00:00
Neale Ferguson 8ded928d50 Fix broken ABI for stack parameters
svn path=/trunk/mono/; revision=29915
2004-06-18 20:03:01 +00:00
Miguel de Icaza 7cb1ef2bf4 Fix
svn path=/trunk/mono/; revision=29914
2004-06-18 19:30:24 +00:00
Sebastien Pouliot cfcb5ae03f 2004-06-18 Sebastien Pouliot <[email protected]>
* ReturnMessage.cs: Added IMessage interface to class definition.

svn path=/trunk/mcs/; revision=29913
2004-06-18 19:12:03 +00:00
Sebastien Pouliot 6bff3db4ae 2004-06-18 Sebastien Pouliot <[email protected]>
* StrongNameMembershipCondition.cs: Added missing [Serializable]
	attribute.
	* ZoneMembershipCondition.cs: Added missing [Serializable] attribute.

svn path=/trunk/mcs/; revision=29912
2004-06-18 19:08:04 +00:00
Ben Maurer 8d8ea7c773 more v2 classes some workarounds are here for gmcs bugs
svn path=/trunk/mcs/; revision=29910
2004-06-18 18:32:31 +00:00
Dick Porter 8dabaf7398 2004-06-18 Dick Porter <[email protected]>
* event-private.h:
	* events.c: Auto-reset events need to release one thread for each
	time SetEvent() is called.  Fixes bug 41292.

	* threads.h:
	* mutex-private.h:
	* mutexes.c: Scan for mutexes that are still locked by a thread
	when it exits.  Fixes the MS demo app linked by bug 41292.

	* wait.c (test_and_own): Make sure a handle is signalled before it
	is owned.

svn path=/trunk/mono/; revision=29909
2004-06-18 18:15:56 +00:00
Atsushi Eno cc6dc18eec 2004-06-18 Atsushi Enomoto <[email protected]>
* DateTime.cs : Concatenating whitespace removal was not working fine.
	  Modified FormatException message (1 cent kindness).

svn path=/trunk/mcs/; revision=29903
2004-06-18 17:48:27 +00:00
Dick Porter ddbb177a02 Thread exiting behaviour
svn path=/trunk/mono/; revision=29902
2004-06-18 17:29:27 +00:00
Gert Driesen 23c68894ff * IStateRuntime.cs: added missing marshalling attributes
svn path=/trunk/mcs/; revision=29901
2004-06-18 17:24:05 +00:00
Gert Driesen 3f09099bcd * IAppDomainFactory.cs: added missing marshalling attributes
* IISAPIRuntime.cs: added missing marshalling attributes

svn path=/trunk/mcs/; revision=29900
2004-06-18 17:22:44 +00:00
Ben Maurer 3939fcd228 2004-06-18 Ben Maurer <[email protected]>
* Action.cs, ArraySegment.cs, Comparison.cs, Converter.cs, Predicate.cs:
	new generics classes
	* IComparable.cs: add the new <T> version.
	* EventHandler.cs: new <T> version.

svn path=/trunk/mcs/; revision=29899
2004-06-18 17:18:10 +00:00
Paolo Molaro d294c046c6 Fix windows build.
svn path=/trunk/mono/; revision=29898
2004-06-18 17:16:14 +00:00
Gert Driesen a34e54fc99 * IComManagedImportUtil.cs: added missing marshalling attributes
* IComSoapIISVRoot.cs: added missing marshalling attributes
* IComSoapMetadata.cs: added missing marshalling attributes
* IComSoapPublisher.cs: added missing marshalling attributes
* IServerWebConfig.cs: added missing marshalling attributes
* ISoapClientImport.cs: added missing marshalling attributes
* ISoapServerTlb.cs: added missing marshalling attributes
* ISoapServerVRoot.cs: added missing marshalling attributes
* ISoapUtility.cs: added missing marshalling attributes

svn path=/trunk/mcs/; revision=29897
2004-06-18 17:08:49 +00:00
Gert Driesen 9d77ba7a02 * Compensator.cs: fixed return value of CommitRecord method
svn path=/trunk/mcs/; revision=29896
2004-06-18 17:01:51 +00:00
Gert Driesen db58d33746 * AuthenticationOption.cs: fixed enum field values to match MS.NET
* IProcessInitializer.cs: added missing marshalling attributes
* IRegistrationHelper.cs: added missing marshalling attributes
* ImpersonationLevelOption: fixed enum field values to match MS.NET
* InstallationFlags: fixed enum field values to match MS.NET
* PropertyLockMode: fixed enum field values to match MS.NET
* PropertyReleaseMode: fixed enum field values to match MS.NET
* RegistrationHelper: added missing marshalling attributes
* RegistrationHelperTx: added missing marshalling attributes
* SynchronizationOption: fixed enum field values to match MS.NET
* TransactionIsolationLevel: fixed enum field values to match MS.NET
* TransactionVote: fixed enum field values to match MS.NET

svn path=/trunk/mcs/; revision=29895
2004-06-18 16:59:14 +00:00
Paolo Molaro abd8757538 Fri Jun 18 19:39:09 CEST 2004 Paolo Molaro <[email protected]>
* Makefile.am: process data before runtime, so the config file is
	installed and gacutil has a chance to work (finding symlink).

svn path=/trunk/mono/; revision=29890
2004-06-18 16:49:57 +00:00
Gert Driesen f9dddf5374 * SqlNullValueException.cs: fixed serialization
* SqlTruncateException.cs: fixed serialization
* SqlTypeException.cs: fixed serialization

svn path=/trunk/mcs/; revision=29887
2004-06-18 15:40:47 +00:00
Gert Driesen f776ed3720 * OleDbError.cs: fixed serialization compatibility with MS.NET
* OleDbErrorCollection.cs: fixed serialization compatibility with
MS.NET

svn path=/trunk/mcs/; revision=29886
2004-06-18 15:38:10 +00:00
Gert Driesen 8c65905adb * OdbcError.cs: fixed serialization compatibility with MS.NET
* OdbcErrorCollection.cs: fixed serialization compatibility with
MS.NET
* OdbcException.cs: fixed serialization compatibility with MS.NET

svn path=/trunk/mcs/; revision=29885
2004-06-18 15:37:16 +00:00
Paolo Molaro 0a9afb7fdc Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <[email protected]>
* mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
	case until bug #59509 is fixed (shows up in #60332).

svn path=/trunk/mono/; revision=29884
2004-06-18 15:34:57 +00:00
Gert Driesen 04d75f32c3 * DBConcurrentcyException.cs: CRLF to LF
* DataViewSetting.cs: CRLF to LF

svn path=/trunk/mcs/; revision=29883
2004-06-18 15:34:23 +00:00
Gert Driesen f8ef4fd803 *** empty log message ***
svn path=/trunk/mcs/; revision=29882
2004-06-18 15:29:34 +00:00
Ravindra 2ef8dce743 Correcting some errors of last checkin.
svn path=/trunk/mcs/; revision=29881
2004-06-18 15:12:34 +00:00
Ravindra 263e9fc081 * FontConverter.cs: Implemented the missing functions.
* Font.cs: Added some notes.

svn path=/trunk/mcs/; revision=29879
2004-06-18 14:56:07 +00:00
Jackson Harper 4a5ee6c278 * mono-logger.c: Change default logging level to ERROR. Make sure
that mono_trace_init is called if mono_tracev is our first trace
	statement is mono_tracev. Little indentation fix.

svn path=/trunk/mono/; revision=29878
2004-06-18 14:46:40 +00:00
Dick Porter a31d672375 2004-06-18 Dick Porter <[email protected]>
* String.cs: The icall can cope with embedded \0 now.

svn path=/trunk/mcs/; revision=29876
2004-06-18 13:53:19 +00:00
Dick Porter e40302bd2b 2004-06-18 Dick Porter <[email protected]>
* locales.c: Tell ICU the lengths of strings, it can cope with
	embedded \0 then.  Fixes bug 59274, and doesn't break bug 55822.

svn path=/trunk/mono/; revision=29875
2004-06-18 13:52:57 +00:00
Atsushi Eno bb1ebb19b8 2004-06-18 Atsushi Enomoto <[email protected]>
* XmlDataDocumentTest2.cs : When line ending is LF, CR is preserved.
	  To reproduce on windows too, set NewLine as LF.

svn path=/trunk/mcs/; revision=29874
2004-06-18 12:32:14 +00:00
Marek Safar 73d81a98dd 2004-06-18 Marek Safar <[email protected]>
* test-274.cs: New test for #60219

svn path=/trunk/mcs/; revision=29873
2004-06-18 12:27:03 +00:00
Marek Safar 1109c9ac7c 2004-06-18 Marek Safar <[email protected]>
Fix bug #60219
 	* class.cs (ConstructorInitializer.GetOverloadedConstructor):
 	Don't throw exception but return null (it's sufficient now).

svn path=/trunk/mcs/; revision=29872
2004-06-18 12:23:29 +00:00
Raja R Harinath 5ebd13b632 * runtime/Makefile.am ($(monoone_DATA) $(monotwo_DATA) $(monobins_DATA)):
Test if files exist in the mcs/ tree before creating symlinks.
Remove symlinks before creating them again.
* runtime/net_1_1/Makefile.am (mscorlib.dll $(gac_assemblies)): Likewise.
* runtime/net_2_0/Makefile.am (mscorlib.dll $(gac_assemblies)): Likewise.

Make real bug more explicit.

svn path=/trunk/mono/; revision=29871
2004-06-18 12:07:45 +00:00
Marek Safar 70e0204235 2004-06-18 Marek Safar <[email protected]>
* typemanager.cs (GetArgumentTypes): Faster implementation.

svn path=/trunk/mcs/; revision=29870
2004-06-18 12:00:32 +00:00
Marek Safar bf40fee8a3 2004-06-18 Marek Safar <[email protected]>
* test-273.cs: New test for #55971

svn path=/trunk/mcs/; revision=29869
2004-06-18 11:31:25 +00:00
Paolo Molaro ff785c3085 Fri Jun 18 13:46:05 CEST 2004 Paolo Molaro <[email protected]>
* mono-jni.c: updates for the API cleanups.

svn path=/trunk/mono/; revision=29867
2004-06-18 10:55:21 +00:00
Umadevi S 41e1f3ce9f 2004-06-18 Umadevi S <[email protected]>
* DataContainer.cs - CheckedforNull before calling the relavant setmethods in each of the
                SetItemForDataRecord method for all the classes.

svn path=/trunk/mcs/; revision=29866
2004-06-18 10:33:17 +00:00
Atsushi Eno a5eaabf6f1 2004-06-18 Atsushi Enomoto <[email protected]>
* CodeIdentifier.cs, CodeIdentifiers.cs, MapCodeGenerator.cs,
	  SerializationCodeGenerator.cs, SerializationSource.cs,
	  TypeTranslator.cs, XmlAttributeOverrides.cs, XmlCustomFormatter.cs,
	  XmlSerializationReader.cs, XmlSerializationWriter.cs,
	  XmlSerializer.cs, XmlTypeMapMemberElement.cs, XmlTypeMapping.cs
	  : Globalization fixes.
	    In XmlCustomFormatter.GenerateToXmlString() time was not
	    generated correctly.
	    Replaced all CRLF XmlAttributeOverrides.cs into LF.

svn path=/trunk/mcs/; revision=29865
2004-06-18 09:50:34 +00:00
Anirban Bhattacharjee e2041f94d7 Interaction.cs: Shell method implemented
svn path=/trunk/mcs/; revision=29864
2004-06-18 09:32:18 +00:00
Atsushi Eno a51abf2aab 2004-06-18 Atsushi Enomoto <[email protected]>
* DateTime.cs :
	  - Added new common pattern "yyyy/M/dZ"
	  - empty string should not be compared in _ParseEnum()
	  - Use culture independent string comparison in _ParseString()
	  - Whitespace removal should be checked after '..' token check (some
	    pattern such like es-ES LongDatePattern contains spaces in '..').
	  - formats null check should be done (to throw ArgumentNullException)
	    in ParseExact().
	  - When specified one character format, dates are incorrectly regarded
	    as to use invariant culture.

svn path=/trunk/mcs/; revision=29863
2004-06-18 09:11:48 +00:00
Paolo Molaro 3f57d35c68 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <[email protected]>
* image.c: swapped name/filename;

svn path=/trunk/mono/; revision=29862
2004-06-18 09:09:37 +00:00
Atsushi Eno 0036fb7850 2004-06-18 Atsushi Enomoto <[email protected]>
* DateTimeTest.cs : Improved CultureIndependentTests(). Error message
	  contains specific locale and error location. Verified by run-test-
	  ondotnet and commented out X509-like pattern.(not all culture passes)

svn path=/trunk/mcs/; revision=29861
2004-06-18 09:04:39 +00:00
Ravindra 61667876de Some formatting and cleanup.
svn path=/trunk/mcs/; revision=29860
2004-06-18 08:39:39 +00:00
Raja R Harinath 2ea89aa1cc (REWRITE): New. Common rewriting 'sed' command.
(bin_SCRIPTS): Unify all the script generating rules into one.

svn path=/trunk/mono/; revision=29859
2004-06-18 08:36:21 +00:00
Raja R Harinath a58b9ee05b fix line-delete-o.
svn path=/trunk/mcs/; revision=29857
2004-06-18 07:53:04 +00:00
Raja R Harinath 4b3f825831 Fix breaking build (see tests/test-272.cs). Since corlib is a
bootstrap library, we have to keep this fix even if the in-tree
mcs compiler is fixed.
* UCOMIEnumConnections.cs: Replace '(UnmanagedType) 80' in
attribute field initialization with Consts.UnmanagedType_80.
* UCOMIEnumMoniker.cs: Likewise.
* UCOMIEnumString.cs: Likewise.
* UCOMIStream.cs: Likewise.
* UCOMITypeInfo.cs: Likewise.
* UCOMITypeLib.cs: Likewise.

svn path=/trunk/mcs/; revision=29856
2004-06-18 07:45:21 +00:00
Raja R Harinath 1c1b502115 (UnmanagedType_80): New constant. Used to workaround
problems like in tests/test-272.cs.

svn path=/trunk/mcs/; revision=29855
2004-06-18 07:44:55 +00:00
Raja R Harinath 7d38cc94b0 New test case for the breaking build.
svn path=/trunk/mcs/; revision=29854
2004-06-18 07:39:32 +00:00
Gert Driesen 2bcaebf1cc * ArgIterator.cs: changed layout to Auto
* DateTime.cs: changed layout to Auto

svn path=/trunk/mcs/; revision=29853
2004-06-18 06:33:49 +00:00
Gert Driesen 1b8b2a501d * DateTime.cs: CRLF to LF
svn path=/trunk/mcs/; revision=29852
2004-06-18 06:30:40 +00:00
Sachin Kumar f47e31b6bf Fixed bugs in Val(string)
svn path=/trunk/mcs/; revision=29851
2004-06-18 06:21:09 +00:00
Anirban Bhattacharjee 16f6cb8223 2004-06-18 Anirban Bhattacharjee <[email protected]>
* Interaction.cs: Few methods implemented - Contribution by Jambunathan and Anirban

svn path=/trunk/mcs/; revision=29850
2004-06-18 06:08:10 +00:00
Umadevi S aeb993c977 2004-06-18 Umadevi S <[email protected]>
* SqlCommand.cs - ExecuteNonQuery returns -1 in all cases except
                insert,update or delete.

svn path=/trunk/mcs/; revision=29849
2004-06-18 06:01:40 +00:00
Gert Driesen d7536995bf * BINDPTR.cs: have layout and charset match MS.NET
* CONNECTDATA.cs: have layout and charset match MS.NET
* DISPPARAMS.cs: have layout and charset match MS.NET
* ELEMDESC.cs: have layout and charset match MS.NET
* EXCEPINFO.cs: have layout and charset match MS.NET
* IDLDESC.cs: have layout and charset match MS.NET
* PARAMDESC.cs: have layout and charset match MS.NET
* STATSTG.cs: have layout and charset match MS.NET
* TYPEATTR.cs: have layout and charset match MS.NET
* TYPEDESC.cs: have layout and charset match MS.NET
* TYPELIBATTR.cs: have layout and charset match MS.NET
* VARDESC.cs: have layout and charset match MS.NET

svn path=/trunk/mcs/; revision=29848
2004-06-18 05:53:26 +00:00
Gert Driesen 48447ddacb * ArrayWithOffset.cs: fixed GetOffset to return int instead of
object
* CONNECTDATA.cs: added missing MarshalAs attribute
* EXCEPINFO.cs: added missing MarshalAs attributes
* ITypeLibConverter.cs: added missing MarshalAs attributes
* ITypeLibImporterNotifySink.cs: added missing MarshalAs attributes
* Marshal.cs: added missing MarshalAs attributues, and missing
Out attributes
* TypeLibConverter.cs: added missing MarshalAs attributes
* UCOMIBindCtx.cs: added missing MarshalAs attributes
* UCOMIConnectionPoint.cs: added missing MarshalAs attributes
* UCOMIEnumConnectionPoints.cs: added missing MarshalAs attributes
* UCOMIEnumConnections.cs: added missing PreserveSig attributes,
added missing MarshalAs attributes
* UCOMIEnumMoniker.cs: added missing PreserveSig attributes,
added missing MarshalAs attributes
* UCOMIEnumString.cs: added missing PreserveSig attributes,
added missing MarshalAs attributes
* UCOMIMoniker.cs: added missing MarshalAs attributes
* UCOMIPersistFile.cs: added missing PreserveSig attribute,
added missing MarshalAs attributes
* UCOMIRunningObjectTable.cs: added missing MarshalAs attributes
* UCOMIStream.cs: added missing MarshalAs attributes
* UCOMITypeComp.cs: added missing MarshalAs attributes
* UCOMITypeInfo.cs: added missing MarshalAs attributes
* UCOMITypeLib.cs: added missing PreserveSig attributes, added
missing MarshalAs attributes

svn path=/trunk/mcs/; revision=29847
2004-06-18 05:17:25 +00:00
Umadevi S 46aa685e63 2004-06-18 Umadevi S <[email protected]>
* SqlConnection.cs - handled null being passed as a connectionstring
          - checked for minimal set of parameters in connectionstring.
          - handled unrecogonized keywords similar to MS.NET

svn path=/trunk/mcs/; revision=29846
2004-06-18 04:23:08 +00:00
Miguel de Icaza 927f734e4a Flush
svn path=/trunk/mono/; revision=29845
2004-06-18 03:44:21 +00:00
Martin Baulig f6f244119f 2004-06-18 Martin Baulig <[email protected]>
* mono-debug-debugger.c (write_class): Write the parent class at
	the end of the header.

svn path=/trunk/mono/; revision=29841
2004-06-18 03:12:01 +00:00
Francisco Figueiredo Jr. c1dbd1467d 2004-06-18 Francisco Figueiredo Jr. <[email protected]>
* Synchronized files with gborg cvs up to release 0.6.

svn path=/trunk/mcs/; revision=29840
2004-06-18 02:58:45 +00:00
Francisco Figueiredo Jr. 8efff70c78 2004-06-18 Francisco Figueiredo Jr. <[email protected]>
* Synchronized files with gborg cvs up to release 0.6

svn path=/trunk/mcs/; revision=29839
2004-06-18 02:56:25 +00:00
Francisco Figueiredo Jr. 249109f582 2004-06-18 Francisco Figueiredo Jr. <[email protected]>
* Synchronized files from gborg cvs up to release 0.6.

svn path=/trunk/mcs/; revision=29838
2004-06-18 02:54:48 +00:00
Geoff Norton 55481f6dfa Updated for B3
svn path=/trunk/mono/; revision=29835
2004-06-18 02:17:48 +00:00
Atsushi Eno ae938f1f66 2004-06-18 Atsushi Enomoto <[email protected]>
* XmlSecureResolverTests.cs : [TestFixture] was missing.

svn path=/trunk/mcs/; revision=29833
2004-06-18 02:06:08 +00:00
Atsushi Eno 5c8ecfc986 2004-06-18 Atsushi Enomoto <[email protected]>
* MonoMicro.Test.csproj : updated.

svn path=/trunk/mcs/; revision=29830
2004-06-18 01:40:17 +00:00
Atsushi Eno 9f2763e462 2004-06-18 Atsushi Enomoto <[email protected]>
* Mono.System.XML.csproj : now contains new NET_2_0 files.

svn path=/trunk/mcs/; revision=29829
2004-06-18 01:36:53 +00:00
Atsushi Eno 6f208edbf7 2004-06-18 Atsushi Enomoto <[email protected]>
* DefaultContext.cs : Globalization.
	* Iterator.cs : In SlashIterator.MoveNext() position might keep 0
	  in case of empty list. Thus extraneous iteration might happened.
	  Removed unused (and clone unsafe) EnumeratorIterator.

svn path=/trunk/mcs/; revision=29828
2004-06-18 01:30:02 +00:00
Atsushi Eno 4cf0759319 2004-06-18 Atsushi Enomoto <[email protected]>
* CustomSerializer.cs, XmlSchemaException.cs,
	  XmlSchemaParticle.cs, XmlSchemaSimpleTypeRestriction.cs
	  : Globalization.

svn path=/trunk/mcs/; revision=29827
2004-06-18 01:25:07 +00:00
Atsushi Eno 47029604e8 2004-06-18 Atsushi Enomoto <[email protected]>
* DTDObjectModel.cs, DTDReader.cs, XmlConvert.cs, XmlDocument.cs,
	  XmlException.cs, XmlParserInput.cs, XmlTextReader.cs,
	  XmlTextWriter.cs : Globalization.
	* XmlNode.cs : Fixed error message that confused node type.

svn path=/trunk/mcs/; revision=29825
2004-06-18 01:22:07 +00:00
Atsushi Eno 72fd119cf8 2004-06-18 Atsushi Enomoto <[email protected]>
* XslNumber.cs : Globalization. Removed unused code.

svn path=/trunk/mcs/; revision=29824
2004-06-18 01:14:29 +00:00
Atsushi Eno dd26fb65db 2004-06-18 Atsushi Enomoto <[email protected]>
* Debug.cs, HtmlEmitter.cs, MSXslScriptManager.cs,
	  ScriptCompilerInfo.cs, XslFunctions.cs, XslTemplate.cs
	  : Globalization. Removed unused code.

svn path=/trunk/mcs/; revision=29823
2004-06-18 01:13:58 +00:00
Atsushi Eno a658ed86da 2004-06-18 Atsushi Enomoto <[email protected]>
* XsdIdentityPath.cs : removed unused code.
	* XsdIdentityState.cs : Globalization.

svn path=/trunk/mcs/; revision=29822
2004-06-18 01:09:03 +00:00
Martin Baulig 043e069ece 2004-06-18 Martin Baulig <[email protected]>
* attribute.cs (Attribute.Resolve): Check whether we're an
	EmptyCast which a Constant child.  Fixes #60333.

svn path=/trunk/mcs/; revision=29821
2004-06-18 00:51:27 +00:00
Atsushi Eno 57a33056a1 2004-06-18 Atsushi Enomoto <[email protected]>
* CodeGeneratorIdentifierTest.cs : [TestFixture] was missing.

svn path=/trunk/mcs/; revision=29819
2004-06-17 23:28:23 +00:00
Atsushi Eno 063a735387 2004-06-18 Atsushi Enomoto <[email protected]>
* TypedDataSetGeneratorTest.cs : [TestFixture] was missing.

svn path=/trunk/mcs/; revision=29818
2004-06-17 23:24:54 +00:00
Sebastien Pouliot e858743eaf 2004-06-17 Sebastien Pouliot <[email protected]>
* KeyInfoX509Data.cs: Removed old internal IssuerSerial for the
	undocumented structure (now documented, and public, in Fx 2.0).
	* X509IssuerSerial.cs: Use structure as public in NET_2_0 and as
	internal before that.

svn path=/trunk/mcs/; revision=29817
2004-06-17 23:12:52 +00:00
Jackson Harper 6e115c811b * Uri.cs: Use invariant culture.
svn path=/trunk/mcs/; revision=29816
2004-06-17 21:48:29 +00:00
Miguel de Icaza 034f6535bb Revert
svn path=/trunk/mono/; revision=29815
2004-06-17 21:36:48 +00:00
Martin Baulig 79f1f8ead4 Revert.
svn path=/trunk/mono/; revision=29814
2004-06-17 21:29:47 +00:00
Ben Maurer 765b9b1d2f new test
svn path=/trunk/mcs/; revision=29813
2004-06-17 20:50:27 +00:00
Ben Maurer c817f917dc 2004-06-17 Ben Maurer <[email protected]>
* statement.cs (EmitCollectionForeach): Account for the fact that
	not all valuetypes are in areas which we can take the address of.
	For these variables, we store to a temporary variable. Also, make
	sure that we dont emit a `callvirt' on a valuetype method.

svn path=/trunk/mcs/; revision=29812
2004-06-17 20:50:10 +00:00
Jackson Harper 13bd73bd49 * CompilerError.cs:
* CodeGenerator.cs: Make sure we are using invariant for non
	culture sensitive operations.

svn path=/trunk/mcs/; revision=29807
2004-06-17 19:27:12 +00:00
Jackson Harper 9fcdd687af * CodeGenerator.cs: Make sure we are using invariant for non
culture sensitive operations.

svn path=/trunk/mcs/; revision=29806
2004-06-17 19:11:43 +00:00
Gert Driesen 1618604541 * ReturnMessage.cs: remove serializable attribute to match MS.NET
svn path=/trunk/mcs/; revision=29805
2004-06-17 19:01:55 +00:00
Duncan Mak 6fd8b12076 In sounds better than On
svn path=/trunk/mono/; revision=29804
2004-06-17 18:56:43 +00:00
Duncan Mak ead6e02f60 Uncomment the MacOS X section
svn path=/trunk/mono/; revision=29803
2004-06-17 18:53:40 +00:00
Sebastien Pouliot 29cb77e547 2004-06-18 Sebastien Pouliot <[email protected]>
* SqlMoney.cs: Removed old "hack" to correct scale after rounding as
	Decimal has been fixed (in fact this code was moved and adapted for
	Decimal as it was better than the previous fix).

svn path=/trunk/mcs/; revision=29802
2004-06-17 18:46:45 +00:00
Gert Driesen 68419f70e1 * MarshalDirectiveException.cs: marked serializable to match MS.NET
* SafeArrayRankMismatchException.cs: marked serializable to match
MS.NET
* SafeArrayTypeMismatchException.cs: marked serializable to match
MS.NET

svn path=/trunk/mcs/; revision=29801
2004-06-17 18:35:35 +00:00
Gert Driesen 1bdec1beee * InvalidComObjectException.cs: marked serializable to match MS.NET
* InvalidOleVarianTypeException.cs: marked serializable to match
MS.NET

svn path=/trunk/mcs/; revision=29800
2004-06-17 18:28:49 +00:00
Sebastien Pouliot d50232bbb4 2004-06-17 Sebastien Pouliot <[email protected]>
* Decimal.cs: Removed unused (and unusable) IsOne and fixed IsZero
	(where scale has no importance).

svn path=/trunk/mcs/; revision=29799
2004-06-17 18:25:02 +00:00
Gert Driesen 83d87af40c * BestFitMappingAttribute.cs: removed serializable attribute
to match MS.NET

svn path=/trunk/mcs/; revision=29798
2004-06-17 18:17:47 +00:00
Gert Driesen d150fc45d4 * Pointer.cs: remove serializable attribute to match MS.NET
svn path=/trunk/mcs/; revision=29797
2004-06-17 18:15:01 +00:00
Gert Driesen 44629757bd * ParameterModifier.cs: marked serializable, renamed field to match
MS.NET, throw ArgumentException when parameter count is less than or
equal to zero

svn path=/trunk/mcs/; revision=29796
2004-06-17 18:09:37 +00:00
Sebastien Pouliot d2adcc4530 2004-06-17 Sebastien Pouliot <[email protected]>
* Decimal.cs: Fixed regression in System.Data caused by the recent
	changes. Adapted (and moved) the code to correct the scale from
	SqlMoney.

svn path=/trunk/mcs/; revision=29795
2004-06-17 18:09:09 +00:00
Lluis Sanchez 77ed91f3ce Restored accents.
svn path=/trunk/mcs/; revision=29794
2004-06-17 18:04:26 +00:00
Lluis Sanchez b7c580bd3a * Activator.cs: In CreateInstance(), use Public|Instance if access binding
attributes are omitted.

svn path=/trunk/mcs/; revision=29793
2004-06-17 17:55:06 +00:00
Miguel de Icaza 8140f5c896 Flush
svn path=/trunk/mono/; revision=29790
2004-06-17 17:01:15 +00:00
Victor Vatamanescu 6c5f412fff *** empty log message ***
svn path=/trunk/mono/; revision=29788
2004-06-17 16:46:56 +00:00
Paolo Molaro 3407807e1d API cleanup fixes.
svn path=/trunk/mono/; revision=29787
2004-06-17 16:25:19 +00:00
Atsushi Eno 5942a2137a 2004-06-17 Atsushi Enomoto <[email protected]>
* relaxngtest.cs : Now we can test all cases (though resulting in
	  failure). Catch unexpected exception and report them as such.

svn path=/trunk/mcs/; revision=29782
2004-06-17 15:31:15 +00:00
Atsushi Eno d8509c465b 2004-06-17 Atsushi Enomoto <[email protected]>
* RdpPatterns.cs : Quick workaround for infinite loop happening in
	  some kind of recursive expansion.

svn path=/trunk/mcs/; revision=29781
2004-06-17 15:22:58 +00:00
Jambunathan K 389b310d7e Ported OutPutVBFile.cs from Mainsoft's codebase. No assurance beyond the
fact that it would compile just fine !

svn path=/trunk/mcs/; revision=29780
2004-06-17 15:20:57 +00:00
Ravindra 33c0975994 Moving samples from Test/System.Drawing to Samples/General and Samples/System.Drawing directories.
svn path=/trunk/mcs/; revision=29778
2004-06-17 14:20:20 +00:00
Paolo Molaro 77c6d215a3 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <[email protected]>
* *.c, *.h, Makefile.am: more API cleanups and bugfixes.

svn path=/trunk/mono/; revision=29777
2004-06-17 14:10:57 +00:00
Atsushi Eno 63f2b74047 2004-06-17 Atsushi Enomoto <[email protected]>
* DateTime.cs : GetDateTimeFormats(char, IFormatProvider) should also
	  check if the format character is valid.

svn path=/trunk/mcs/; revision=29776
2004-06-17 13:17:43 +00:00
Victor Vatamanescu f60c78a067 *** empty log message ***
svn path=/trunk/mono/; revision=29775
2004-06-17 13:12:05 +00:00
Anirban Bhattacharjee cac7679961 2004-06-17 Anirban Bhattacharjee <[email protected]>
* ControlChars.cs: StandardModuleAttribute added

svn path=/trunk/mcs/; revision=29774
2004-06-17 13:08:50 +00:00
Anirban Bhattacharjee f4a7959f92 2004-06-17 Anirban Bhattacharjee <[email protected]>
* Strings.cs: An effort make this file feature complete

svn path=/trunk/mcs/; revision=29772
2004-06-17 13:02:26 +00:00
Atsushi Eno 9176188dc8 2004-06-17 Atsushi Enomoto <[email protected]>
* DateTime.cs : AddDays(double) rounds the input.

svn path=/trunk/mcs/; revision=29771
2004-06-17 12:42:29 +00:00
Sachin Kumar 8ece8b55cd Added license and copyright
svn path=/trunk/mcs/; revision=29770
2004-06-17 12:42:08 +00:00
Jambunathan K 28ed14ccca Committed a couple of FileSystem methods and associated Test cases
submitted by Rob Tillie.

svn path=/trunk/mcs/; revision=29769
2004-06-17 12:37:44 +00:00
Boris Kirzner cea45c8670 * ChangeLog : Fix for misspelled words.
svn path=/trunk/mcs/; revision=29768
2004-06-17 12:29:05 +00:00
Sachin Kumar 86caa35d31 Added license and copyright
svn path=/trunk/mcs/; revision=29767
2004-06-17 12:24:22 +00:00
Boris Kirzner 6e8bc9f17c * DataRowCollection.cs : Removed onColumnRemoved since it iss not in use.
svn path=/trunk/mcs/; revision=29766
2004-06-17 12:23:49 +00:00
Boris Kirzner 04e47fce7d * DataTable.cs :
- Table stores default values for columns in soecial default values row. It is allocated once (in NewRow)
  - DataTable.Copy rewrited. It works with uninitialized rows for better perfomance.
  - OnRemoveColumn has nothing to perform by now.

svn path=/trunk/mcs/; revision=29765
2004-06-17 12:13:57 +00:00
Sachin Kumar 3c6ea8cfd6 Added license and copyright
svn path=/trunk/mcs/; revision=29764
2004-06-17 12:12:59 +00:00
Boris Kirzner 299108b770 * DataRow.cs :
- Changed access of original, current and proposed indexes to internal.
  - ColumnErrors reviewed : now column errors stored in ArrayList and allocated on demand only.
  - Added new DataRow constructor that creates uninitialized DataRow (used in DataTable.Copy).
  - Use DataContainer.CopyValue and default values row for faster set of default values in row.
  - SetColumnValue become CheckValue. Now it does not changes the value, but only checks for its correctness.  Care about Null and DBNull values is now in DataContainer.
  - Use DataColumn.AutoIncrementValue and GetInt64 for faster set of autoincrement value.
  - Use Datacontainer.CopyValue and default values row to speed up CheckChildRows.
  - Fix in CopyState : clone column errors.
  - Removed CollectionChanged and onColumnRemoved since we are not using both of them anymore.

svn path=/trunk/mcs/; revision=29763
2004-06-17 12:00:58 +00:00
Sachin Kumar f9504dbf49 Made corrections as suggested by Hari
svn path=/trunk/mcs/; revision=29762
2004-06-17 11:51:54 +00:00
Boris Kirzner 6878db0601 * DataColumnCollection.cs :
- Fix : Add() now delegates to Add(DataColumn).
  - autoIncrement list holds DataColumn objects, and not just column names.

svn path=/trunk/mcs/; revision=29760
2004-06-17 11:42:55 +00:00
Boris Kirzner edddb534ed * DataColumn.cs :
- AutoIncrementValue fixes. Now AutoIncrement uses DataContainer.GetInt64 to avoid boxing.
  - DefaultValue fixes. Default value from now on is also stored in special record in DataTable, so we're able to set default value for the column faster (typed).

svn path=/trunk/mcs/; revision=29759
2004-06-17 11:36:24 +00:00
Victor Vatamanescu dced06f7cb *** empty log message ***
svn path=/trunk/mcs/; revision=29758
2004-06-17 11:09:59 +00:00
Umadevi S a855975ad5 2004-06-17 Umadevi S <[email protected]>
* SqlTransaction.cs - isRolledBack reset in the internal constructor

svn path=/trunk/mcs/; revision=29757
2004-06-17 10:30:55 +00:00
Victor Vatamanescu 67178abef4 *** empty log message ***
svn path=/trunk/mcs/; revision=29756
2004-06-17 10:14:35 +00:00
Umadevi S 6c50e0cd4b 2004-06-17 Umadevi S <[email protected]>
* SqlTransaction.cs - fixed  multiple rollbacks being called causes invalidoperationexception

svn path=/trunk/mcs/; revision=29755
2004-06-17 08:41:54 +00:00
Boris Kirzner 351b27d360 * RecordCache.cs : Added CopyRecord mathod that copies single record from one table to another.
svn path=/trunk/mcs/; revision=29754
2004-06-17 08:39:07 +00:00
Boris Kirzner 08f68bf0c9 * Datacontainer.cs :
- Store and retreival of null and DBNull values reviewed.
  - Added GetInt64 to support AutoIncrement of DataColumn.
  - Added missing CopyValue method to BitDataContainer.
  - Added FillValues method to propagate single value to whole container.

svn path=/trunk/mcs/; revision=29753
2004-06-17 08:35:21 +00:00
Raja R Harinath 5a1eee2e6a revert wierd commit error
svn path=/trunk/mono/; revision=29752
2004-06-17 08:34:44 +00:00
Boris Kirzner a01de3070a * Comparison.cs - use 'as' to avoid NullReferenceExeption in casting.
svn path=/trunk/mcs/; revision=29751
2004-06-17 08:22:13 +00:00
Raja R Harinath 04ab2a3565 (PLATFORM_LIB): New. Possibly refer to ../os/libmonoos.la.
(bundle_obj): New conditional define.
(BUILT_SOURCES): Remove.
($(bundle_srcs)): Make parallel-make safe.
(libmonoruntime_la_LIBADD): Make unconditional.
(libmetadata_la_LIBADD): Make unconditional.  Refer to $(bundle_obj).
(libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).

svn path=/trunk/mono/; revision=29750
2004-06-17 07:50:24 +00:00
Atsushi Eno 8b736d47b9 2004-06-17 Atsushi Enomoto <[email protected]>
* Misc.cs, RelaxngGrammar.cs, RelaxngPattern.cs, RelaxngReader.cs :
	  Added XmlResolver property to fix bug #60334.
	  Check incrrect recursion check that caused possible infinite loop.

svn path=/trunk/mcs/; revision=29749
2004-06-17 07:06:07 +00:00
Atsushi Eno bfa352dcab 2004-06-17 Atsushi Enomoto <[email protected]>
* XmlDefaultReader.cs : don't catch the exception.

svn path=/trunk/mcs/; revision=29748
2004-06-17 07:05:13 +00:00
Gert Driesen 30237d0377 * AspNetHostingPermission.cs: marked serialiable, renamed field to
match MS.NET
* AspNetHostingPermissionAttribute.cs: marked serializable, renamed
field to match MS.NET

svn path=/trunk/mcs/; revision=29745
2004-06-17 05:58:32 +00:00
Gert Driesen 2dd841e9d8 * AccessControlEntryType.cs: fixed enum field values to correspond
with MS.NET, removed TODO
* AcknowledgeTypes.cs: fixed enum field values to correspond with
MS.NET, removed TODO
* CryptographicProviderType.cs: fixed enum field values to correspond
with MS.NET, removed TODO
* EncryptionAlgorithm.cs: fixed enum field values to correspond with
MS.NET, removed TODO
* EncryptionRequired.cs: fixed enum field values to correspond with
MS.NET, removed TODO
* GenericAccessRights.cs: fixed enum field values to correspond with
MS.NET, removed TODO
* HashAlgortihm.cs: fixed enum field values to correspond with
MS.NET, removed TODO
* MessagePriority.cs: fixed enum field values to correspond with
MS.NET, removed TODO
* MessageQueueErrorCode.cs: fixed enum field values to correspond
with MS.NET, removed TODO
* MessageQueueException.cs: marked serializable
* MessageQueuePermissionAccess.cs: fixed enum field values to
correspond with MS.NET, removed TODO
* MessageQueueTransactionStatus.cs: fixed enum field values to
correspond with MS.NET, removed TODO
* MessageQueueTransactionType.cs: fixed enum field values to
correspond with MS.NET, removed TODO
* MessageType.cs: fixed enum field values to correspond with MS.NET,
removed TODO
* StandardAccessRights.cs: fixed enum field values to correspond
with MS.NET, removed TODO
* TrusteeType.cs: fixed enum field values to correspond with MS.NET,
removed TODO

svn path=/trunk/mcs/; revision=29741
2004-06-17 05:41:58 +00:00
Gert Driesen 75b1140307 * DirectoryServicesPermission.cs: renamed field to match MS.NET
* DirectoryServicesPermissionEntry.cs: fixed serialization
compatibility with MS.NET
* DirectoryServicesPermissionEntryCollection.cs: marked serializable,
added TODO for serialization compatibility
* ReferralChasingOption.cs: changed enum field values to match MS.NET

svn path=/trunk/mcs/; revision=29739
2004-06-17 05:08:24 +00:00
Atsushi Eno 1609b697b0 2004-06-17 Atsushi Enomoto <[email protected]>
* DateTimeFormatInfo.cs : check if pattern array is empty or not. Now
	  icall fills them as possible empty list.

svn path=/trunk/mcs/; revision=29737
2004-06-17 04:29:50 +00:00
Atsushi Eno 4acb7f3eb2 2004-06-17 Atsushi Enomoto <[email protected]>
* culture-info-tables.h: It was inconsistent with the latest
	  supp info files.

svn path=/trunk/mono/; revision=29735
2004-06-17 04:08:33 +00:00
Sebastien Pouliot 00e39cb7f7 2004-06-16 Sebastien Pouliot <[email protected]>
* SignatureDescription.cs: Implemented .ctor(SecurityElement) using
	documentation from VS.NET 2005.

svn path=/trunk/mcs/; revision=29731
2004-06-17 01:45:31 +00:00
Sebastien Pouliot 7314c4cbd1 2004-06-16 Sebastien Pouliot <[email protected]>
* SignatureDescriptionTest.cs: Added missing [TestFixture] :( and
	cases for the previously undocumented .ctor(SecurityElement) - which
	is now, backwardly, documented in VS.NET 2005.

svn path=/trunk/mcs/; revision=29730
2004-06-17 01:34:44 +00:00
Atsushi Eno 78ee678180 2004-06-17 Atsushi Enomoto <[email protected]>
* DateTime.cs : Incorrect maxvalue comparison in ToUniversalTime().
	  Fixed ToLocalTime() as well, but it does check range for MinValue.

svn path=/trunk/mcs/; revision=29729
2004-06-17 01:28:32 +00:00
Atsushi Eno a431a616d1 2004-06-17 Atsushi Enomoto <[email protected]>
* DateTime.cs : Added overflow check in ToUniversalTime() and
	  ToLocalTime(). Fixed bug #60253.

svn path=/trunk/mcs/; revision=29726
2004-06-17 00:48:06 +00:00
Lluis Sanchez 4235983de0 * SoapServerFormatterSink.cs: Removed unneded method.
svn path=/trunk/mcs/; revision=29722
2004-06-16 23:19:51 +00:00
Lluis Sanchez add2bf8f69 * Process.cs: Added missing check in HasExited property.
svn path=/trunk/mcs/; revision=29721
2004-06-16 23:16:49 +00:00
Lluis Sanchez e51bb93c12 * ThreadTest.cs: Improved test.
svn path=/trunk/mcs/; revision=29719
2004-06-16 23:12:10 +00:00
Marek Safar edfced107c new test
svn path=/trunk/mcs/; revision=29709
2004-06-16 19:40:49 +00:00
Zoltan Varga 15a3a676e0 2004-06-17 Zoltan Varga <[email protected]>
* assembly.c (mono_assembly_open): Fix crash when the assembly can't
	be loaded.

svn path=/trunk/mono/; revision=29708
2004-06-16 19:09:00 +00:00
Zoltan Varga c6000e5bc5 2004-06-17 Zoltan Varga <[email protected]>
* threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
	with gcc 2.95.

svn path=/trunk/mono/; revision=29707
2004-06-16 19:03:51 +00:00
Gert Driesen 17e50e1260 * mono-api-diff.cs:
- check method/ctor parameters
  - use target attribute for attributes in key for attributes
    (if available). This allows us to differentiate between method
    and return type attributes for methods
  - check field values (for literal fields)
  - LoadExtraData was not always called, causing certain signature
    mismatches not to be reported
  - now also check charset, layout and serializability of
    types

* mono-api-info.cs:
  - check field values of literal fields
  - document parameters of method/ctors
  - also output attribute applied to return type of methods
  - output charset, layout and flag indicating whether type
    is serializable

svn path=/trunk/mcs/; revision=29706
2004-06-16 18:46:13 +00:00
Sebastien Pouliot 4a5457ed45 2004-06-16 Sebastien Pouliot <[email protected]>
* FloatingPointFormatter.cs: Implemented "R" format using Jon Skeet
	source code (with permission). Fix (biggest) part of bug #60110.
	http://www.yoda.arachsys.com/csharp/floatingpoint.html

svn path=/trunk/mcs/; revision=29704
2004-06-16 18:12:24 +00:00
Sebastien Pouliot 44f1f6c2f3 2004-06-16 Sebastien Pouliot <[email protected]>
* DoubleFormatterTest.cs: Splitted test case for #60110 in two - what
	works with Mono and what's not working.

svn path=/trunk/mcs/; revision=29698
2004-06-16 17:41:05 +00:00
Atsushi Eno 456bd7f06c 2004-06-16 Atsushi Enomoto <[email protected]>
* Manager.cs : If ecoding is not detected it always throws useless
	  null reference exception.

svn path=/trunk/mcs/; revision=29697
2004-06-16 17:39:53 +00:00
Marek Safar 19f5449e51 new test
svn path=/trunk/mcs/; revision=29696
2004-06-16 17:29:27 +00:00
Ben Maurer 58c3cc6ef9 *** empty log message ***
svn path=/trunk/mcs/; revision=29695
2004-06-16 17:13:41 +00:00
Jambunathan K 812007d231 Ported VBFile.cs, BaseVBFile.cs and InputVBFile.cs from Mainsoft's codebase.
Currently these files compile fine. That's it. All these files require
both review and testing.

svn path=/trunk/mcs/; revision=29694
2004-06-16 16:04:42 +00:00
Paolo Molaro 1569b0978d Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <[email protected]>
* threads.h, icall.c, object.c, threadpool.c, threads-types.h:
	cleaned up public header threads.h.

svn path=/trunk/mono/; revision=29692
2004-06-16 15:34:26 +00:00
Paolo Molaro 1c9ec4be0d Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <[email protected]>
* Makefile.am, *.c, *.h: more API cleanups.

svn path=/trunk/mono/; revision=29691
2004-06-16 15:24:15 +00:00
Sebastien Pouliot 5e0c65188f 2004-06-16 Sebastien Pouliot <[email protected]>
* DoubleFormatterTest.cs: Added new cases from bug reports 60110
	(roundtrip format) and 60111 (non-banker rounding).

svn path=/trunk/mcs/; revision=29690
2004-06-16 15:11:50 +00:00
Dick Porter 76c7a995de 2004-06-16 Dick Porter <[email protected]>
* timed-thread.c: Call the thread cleanup exit routine before taking
	the join mutex, because this could deadlock if another thread tries
	to join in the meantime.  This fixes the hang-at-exit problem seen
	on macos.

svn path=/trunk/mono/; revision=29689
2004-06-16 14:11:39 +00:00
Sachin Kumar ec81df777c Add license and copyright to all source files in System.Data
svn path=/trunk/mcs/; revision=29688
2004-06-16 13:52:11 +00:00
Paolo Molaro f5c646ed36 Updates fro API cleanups.
svn path=/trunk/mono/; revision=29687
2004-06-16 13:34:45 +00:00
Marek Safar 809f24fe47 new tests
svn path=/trunk/mcs/; revision=29685
2004-06-16 13:19:33 +00:00
Sanja Gupta ce7abd8456 ChangeLog: Updated ChangeLog.
gdipFunctions.cs: Modified Function signature for
        GdipSaveImageToDelegate_linux() method for saving tiff images
        to streams.
image.cs: Modified function call GdipSaveImageToDelegate_linux()
        with new signature.

svn path=/trunk/mcs/; revision=29684
2004-06-16 13:17:22 +00:00
Sachin Kumar ce459e6e2a Java code converted from Mainsoft
svn path=/trunk/mcs/; revision=29683
2004-06-16 12:52:47 +00:00
Paolo Molaro 99864ffc60 Updates for API cleanups.
svn path=/trunk/mono/; revision=29681
2004-06-16 11:49:22 +00:00
Paolo Molaro ee3e267c3a Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <[email protected]>
* Makefile.am: removed monosn from compilation.
	* appdomain.c, assembly.c, assembly.h, blob.h, class.c,
	debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
	image.c, image.h, loader.c, marshal.c, metadata-internals.h,
	metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
	mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
	reflection.c, reflection.h, verify.c: more API cleanups and fixes.

svn path=/trunk/mono/; revision=29680
2004-06-16 11:48:32 +00:00
Atsushi Eno e005caa547 2004-06-16 Atsushi Enomoto <[email protected]>
* Uri.cs : Fixed LocalPath. In that condition, path is always UNC.

svn path=/trunk/mcs/; revision=29679
2004-06-16 10:17:25 +00:00
Atsushi Eno 62bba9af32 2004-06-16 Atsushi Enomoto <[email protected]>
* Uri.cs : Reimplemented HexUnescape() (It was too broken to handle
	  multi-byte utf-8 characters.)

svn path=/trunk/mcs/; revision=29678
2004-06-16 10:05:44 +00:00
Atsushi Eno 376c149fd1 2004-06-16 Atsushi Enomoto <[email protected]>
* test-uri-list.txt, test-uri-props.txt, test-uri-props-manual.txt :
	  The autogenerated test contained Unix path case. Moved to manual.

svn path=/trunk/mcs/; revision=29677
2004-06-16 10:03:02 +00:00
Raja R Harinath 4977b50340 * library.make ($(makefrag),$(test_makefrag),$(btest_makefrag)):
Depend on library.make.
* executable.make ($(makefrag)): Depend on executable.make.

svn path=/trunk/mcs/; revision=29676
2004-06-16 08:31:51 +00:00
Gonzalo Paniagua Javier a87e673a2c uploaded windows beta3 installer
svn path=/trunk/mono/; revision=29675
2004-06-16 08:23:55 +00:00
Raja R Harinath fbe700235c (populate-runtime-subdir): Rewrite sanity check.
svn path=/trunk/mono/; revision=29674
2004-06-16 08:03:23 +00:00
Raja R Harinath 7bb66c3cac Fix typo
svn path=/trunk/mcs/; revision=29672
2004-06-16 07:40:20 +00:00
Atsushi Eno 75027362fd 2004-06-16 Atsushi Enomoto <[email protected]>
* Makefile.am : GAC path fixie for windows build.

svn path=/trunk/mono/; revision=29671
2004-06-16 07:12:08 +00:00
Atsushi Eno 536e1c2bef 2004-06-16 Atsushi Enomoto <[email protected]>
* library.make : Added GACDIR. Use cygpath -w on windows.

svn path=/trunk/mcs/; revision=29670
2004-06-16 07:10:24 +00:00
Sureshkumar T 15a71c6dbd 2004-06-16 Sureshkumar T <[email protected]>
* Added Odbc tests using MySql test database
        * New files:
                ChangeLog
                OdbcDataReaderTest.cs   - test suite for OdbcDataReader class.
                OdbcDataAdapterTest.cs  - test suite for OdbcDataAdapter class.

svn path=/trunk/mcs/; revision=29668
2004-06-16 06:34:10 +00:00
Sachin Kumar 15a49e8b92 Add license and copyright to all source files in System.Drawing
svn path=/trunk/mcs/; revision=29667
2004-06-16 06:32:39 +00:00
Sureshkumar T 78c2dbbc00 04-06-16 Sureshkumar T <[email protected]>
* Added standalone NUnit test cases for MySql db related tests.
        * Created sub-directory for System.Data.Odbc
        * New Files :
                MySqlTestBed.cs         - Base class for all MySql db based tests.
                                          contains instructions to run these tests.
                MySqlTestBed.dll.config - configurable parameters to this test suite.
                System.Data.Odbc/OdbcDataReaderTest.cs
                System.Data.Odbc/OdbcDataAdapterTest.cs

svn path=/trunk/mcs/; revision=29666
2004-06-16 06:31:24 +00:00
Raja R Harinath da525a5466 (MCS_DIRS, MCS_FILES, MONO_CSHARP_DEBUGGER_DIR, MONO_CSHARP_DEBUGGER_FILE):
Avoid automake conditional/+= problems.

svn path=/trunk/mono/; revision=29665
2004-06-16 06:23:48 +00:00
Sureshkumar T 1193274a28 2004-06-16 Sureshkumar T ([email protected])
* OdbcDataReader.cs: Added GetValue support for Sql Binary type to return byte array.
                             Implemented GetBytes method.
        * libodbc.cs       : Added enums, constants & imports for above fix.

svn path=/trunk/mcs/; revision=29664
2004-06-16 06:23:05 +00:00
Sachin Kumar d391f555ee Add license and copyright to all source files in System.Drawing
svn path=/trunk/mcs/; revision=29662
2004-06-16 06:11:12 +00:00
Raja R Harinath 1d73024b83 (bootstrap) [PLATFORM_WIN32]: Open code. Don't
build and populate net_2_0 profile.
(populate-runtime-subdir): Make into subroutine that takes list of
profiles to populate.
(faststrap): Update.

svn path=/trunk/mono/; revision=29661
2004-06-16 05:57:59 +00:00
Sachin Kumar cb6d808af9 Add license and copyright to all source files in System.Drawing
svn path=/trunk/mcs/; revision=29660
2004-06-16 05:38:50 +00:00
Raja R Harinath efcc851c41 Include prototype completely-untested 'make bootstrap' support for W32.
* Makefile.am (bootstrap): Define to fasterstrap for W32.
(MCS_DIRS, MCS_FILES): Don't refer to Mono.CSharp.Debugger in W32.
(tmpinst-dir): Change sub-make invoke to ...
(tmpinst-dir-contents): ... this.  Build 'mono.bat' in W32 instead
of 'mono' and 'mcs'.
($(tmpinst)/bin/mono.bat): New.

svn path=/trunk/mono/; revision=29659
2004-06-16 04:13:15 +00:00
Miguel de Icaza 9db358014d Lets hide this
svn path=/trunk/mono/; revision=29658
2004-06-16 03:44:07 +00:00
Miguel de Icaza 8851829869 Flush
svn path=/trunk/mono/; revision=29657
2004-06-16 03:33:51 +00:00
Ben Maurer ea6bf9e946 2004-06-16 Ben Maurer <[email protected]>
* ecore.cs (MethodGroupExpr.Name): Revert Martin's patch.
	The name needs to have the actual name of the method in order
	for other tests (such as the one in OverloadResolve for Invoke
	on a delegate) to work. As well, it does not really help
	error reporting because the method group had multiple methods.

svn path=/trunk/mcs/; revision=29656
2004-06-16 03:23:54 +00:00
Atsushi Eno 667f01181e 2004-06-16 Atsushi Enomoto <[email protected]>
* UriTest2.cs : LocalPath values should vary depending on the running
	  environment - so replace '/' and '\\' each other.

svn path=/trunk/mcs/; revision=29655
2004-06-16 02:52:59 +00:00
Atsushi Eno 9c0b280afa 2004-06-16 Atsushi Enomoto
mono.1 : unmanaged xslt is not officially supported now.

svn path=/trunk/mono/; revision=29654
2004-06-16 02:24:31 +00:00
Sebastien Pouliot 2c787153a4 2004-06-15 Sebastien Pouliot <[email protected]>
* FloatingPointFormatter.cs: Fixed ToString which doesn't use banker's
	rounding (which is the rounding provided by Math.Round). This fix bug
	#60111. The code (new Round methods) should be moved elsewhere (as it
	may also be required elsewhere) post Mono 1.0.

svn path=/trunk/mcs/; revision=29653
2004-06-16 01:54:52 +00:00
Gonzalo Paniagua Javier be31b0ce2d 2004-06-16 Gonzalo Paniagua Javier <[email protected]>
* System.Web.Compilation/BaseCompiler.cs: try getting the Type from
	the cache before doing the real work. Remove temporary files right after
	successful compilation.

	* System.Web.Compilation/CachingCompiler.cs: added GetTypeFromCache.

	* System.Web.Compilation/UserControlCompiler.cs: nothing interesting.

	* System.Web.Compilation/WebServiceCompiler.cs: try getting the Type
	from the cache before doing anything else. Remove temp files on
	sucessful compilation.

	* System.Web.UI/SimpleWebHandlerParser.cs: implemented
	GetCompiledTypeFromCache. When we read the default directive, check the
	cache for the Type and if present, don't keep reading and store the
	type found.

	* System.Web.UI/WebHandlerParser.cs:
	* System.Web.UI/WebServiceParser.cs: try GetCompiledTypeFromCache
	before actually compiling.

svn path=/trunk/mcs/; revision=29652
2004-06-16 01:41:10 +00:00
Duncan Mak d6877df05d Add section for beta 3
svn path=/trunk/mono/; revision=29651
2004-06-16 01:25:22 +00:00
Jackson Harper 33420bc369 * assembly.c: Make locales lower case when searching the GAC for
assemblies. gacutil will always make locales lowercase when
	installing so this effectively makes them case insensitive.

svn path=/trunk/mono/; revision=29647
2004-06-15 21:56:11 +00:00
Sebastien Pouliot 89ed662547 2004-06-15 Sebastien Pouliot <[email protected]>
* crypto: Updated status for beta 3. Removed stuff that is better
	documented in monodoc.

svn path=/trunk/mono/; revision=29645
2004-06-15 20:05:00 +00:00
Jackson Harper 50662a8a48 * driver.cs: Ensure that the -gacdir ends with /lib if it does not
appened one. The reason for this is that the runtime expects it,
	and existing makefiles user -gacdir $(destdir)/$(libdir) so auto
	appending it without checking would break many things.

svn path=/trunk/mcs/; revision=29644
2004-06-15 19:27:56 +00:00
Miguel de Icaza 541a601b6e Revert Gert's patch until its fixed
svn path=/trunk/mcs/; revision=29642
2004-06-15 18:56:28 +00:00
Gert Driesen d356b3dd28 * SoapMessage.cs: fixed serialization compatibility with MS.NET
svn path=/trunk/mcs/; revision=29640
2004-06-15 18:42:46 +00:00
Gert Driesen 7f2ede041e * ObjectIDGenerator.cs: added TODO for serialization
svn path=/trunk/mcs/; revision=29639
2004-06-15 18:42:15 +00:00
Gert Driesen 6b001a6c75 * SoapHexBinary.cs: fixed serialization compatibility with MS.NET
* SoapQName.cs: fixed serialization compatibility with MS.NET

svn path=/trunk/mcs/; revision=29638
2004-06-15 18:41:20 +00:00
Gert Driesen 7e7c331dc6 * SynchronizationAttribute.cs: added TODO for serialization
svn path=/trunk/mcs/; revision=29637
2004-06-15 18:40:47 +00:00
Gert Driesen b301575dd6 * TransportHeaders.cs: added TODO for serialization
svn path=/trunk/mcs/; revision=29634
2004-06-15 18:40:13 +00:00
Gert Driesen fba8ec682a * RemotingTimeoutException.cs: added missing serialization ctor
* ServerException.cs: added missing serialization ctor

svn path=/trunk/mcs/; revision=29633
2004-06-15 18:39:20 +00:00
Sebastien Pouliot 09b1b14e35 2004-06-15 Sebastien Pouliot <[email protected]>
* ConvertTest.cs: Changed compare between Decimals (from a string
	compare to Decimal.Equals) because the issue wasn't related to the
	Convert class. See #60227 for more details.

svn path=/trunk/mcs/; revision=29632
2004-06-15 18:26:22 +00:00
Gert Driesen 4e2abb9d75 * ArrayWithOffset.cs: fixed GetOffset to return int instead of
object
* CONNECTDATA.cs: added missing MarshalAs attribute
* EXCEPINFO.cs: added missing MarshalAs attributes
* ITypeLibConverter.cs:
* ITypeLibImporterNotifySink.cs:
* Marshal.cs: added missing MarshalAs attributues, and missing
Out attributes
* TypeLibConverter.cs: added missing MarshalAs attributes
* UCOMIBindCtx.cs:
* UCOMIConnectionPoint.cs:
* UCOMIEnumConnectionPoints.cs:
* UCOMIEnumConnections.cs: added missing PreserveSig attributes,
added missing MarshalAs attributes
* UCOMIEnumMoniker.cs: added missing PreserveSig attributes,
added missing MarshalAs attributes
* UCOMIEnumString.cs: added missing PreserveSig attributes,
added missing MarshalAs attributes
* UCOMIMoniker.cs: added missing MarshalAs attributes
* UCOMIPersistFile.cs: added missing PreserveSig attribute,
added missing MarshalAs attributes
* UCOMIRunningObjectTable.cs: added missing MarshalAs attributes
* UCOMIStream.cs: added missing MarshalAs attributes
* UCOMITypeComp.cs: added missing MarshalAs attributes
* UCOMITypeInfo.cs: added missing MarshalAs attributes
* UCOMITypeLib.cs: added missing PreserveSig attributes, added
missing MarshalAs attributes

svn path=/trunk/mcs/; revision=29631
2004-06-15 18:23:16 +00:00
Gert Driesen 24f35b6a4b * MethodImplAttribute.cs: changed field name to fix serialization
compatibility with MS.NET

svn path=/trunk/mcs/; revision=29630
2004-06-15 18:21:14 +00:00
Gert Driesen bf01781d2e * MethodRental.cs: fixed value of JitOnDemand
svn path=/trunk/mcs/; revision=29629
2004-06-15 18:19:45 +00:00
Gert Driesen 678c1fac55 * AssemblyName.cs: added TODO for serialization
* Pointer.cs: fixed Box method to return object instead of
Pointer

svn path=/trunk/mcs/; revision=29628
2004-06-15 18:18:59 +00:00
Gert Driesen b11894b5c3 * StackTrace.cs: added TODO for serialization
* StackFrame.cs: added TODO for serialization

svn path=/trunk/mcs/; revision=29627
2004-06-15 18:03:10 +00:00
Gert Driesen 7d73431646 * CaseInsensitiveComparer.cs: added TODO for serialization
* CaseInsensitiveHashCodeProvider.cs: added TODO for serialization
* SortedList.cs: added TODO for serialization
* Stack.cs: added TODO for serialization

svn path=/trunk/mcs/; revision=29626
2004-06-15 18:02:16 +00:00
Sebastien Pouliot 5f765610b8 2004-06-15 Sebastien Pouliot <[email protected]>
* Decimal.cs: Fixed scale after Round (a different scale is correct
	from a math point of view but affect the string representation of the
	value). Note: other operations also have scale problems!
	* DecimalFormatter.cs: Fixed FormatGeneral to match Fx 1.1 output.

svn path=/trunk/mcs/; revision=29625
2004-06-15 18:00:42 +00:00
Gert Driesen 8fe65ae3dc * DateTimeFormatInfo.cs: added TODO for serialization
* GregorianCalendar.cs:: added TODO for serialization
* HebrewCalendar.cs: added TODO for serialization
* HijriCalendar.cs: added TODO for serialization
* JapaneseCalendar.cs: added TODO for serialization
* JulianCalendar.cs: added TODO for serialization
* KoreanCalendar.cs: added TODO for serialization
* TaiwanCalendar.cs: added TODO for serialization
* ThaiBuddhistCalendar.cs: added TODO for serialization

svn path=/trunk/mcs/; revision=29624
2004-06-15 17:56:56 +00:00
Gert Driesen b26ef71adf * Evidence.cs: added TODO for serialization
svn path=/trunk/mcs/; revision=29623
2004-06-15 17:55:41 +00:00
Gert Driesen 2eec8e2a38 * Thread.cs: changed return type of VolatileRead to UIntPtr
* ThreadPool.cs: set return type of SetMinThreads to bool

svn path=/trunk/mcs/; revision=29622
2004-06-15 17:55:07 +00:00
Gert Driesen b447caed96 * ASCIIEncoding.cs: added TODO for serialization
* StringBuilder.cs: added TODO for serialization
* UnicodeEncoding.cs: added TODO for serialization
* UTF7Encoding.cs: added TODO for serialization
* UTF8Encoding.cs: added TODO for serialization

svn path=/trunk/mcs/; revision=29621
2004-06-15 17:53:18 +00:00
Gert Driesen 2acc2aed04 * XmlSyntaxException.cs: added missing serialization ctor
* SecurityException.cs: fixed typo

svn path=/trunk/mcs/; revision=29620
2004-06-15 17:52:25 +00:00
Gert Driesen 0d5fadd9d0 * MemoryStream.cs: added TODO for serialization
* StringWriter.cs: added TODO for serialization
* TextWriter.cs: fixed CoreNewLine to return char[]

svn path=/trunk/mcs/; revision=29619
2004-06-15 17:51:32 +00:00
Gert Driesen 10a4773f38 * AppDomainSetup.cs: added TODO for serialization
* ExecutionEngineException.cs: added missing serialization ctor
* InvalidProgramException.cs: added missing serialization ctor
* MulticastNotSupportedException.cs: added missing serialization ctor
* ObsoleteAttribute.cs: fixed serialization compatibility with MS.NET
* Random.cs: fixed serialization compatibility with MS.NET

svn path=/trunk/mcs/; revision=29618
2004-06-15 17:47:32 +00:00
Dick Porter 1e44fbf47f 2004-06-15 Dick Porter <[email protected]>
* configure.in: Check for struct ip_mreqn and struct ip_mreq on
	windows too.  Fixes bug 55040.

svn path=/trunk/mono/; revision=29613
2004-06-15 16:23:59 +00:00
Sebastien Pouliot 136d70a9fa 2004-06-15 Sebastien Pouliot <[email protected]>
* DecimalTest.cs: Added test to ensure we keep/output the decimals
	precision (#59425). Added tests to see how many decimals are supported
	in "G" before switching to "E".

svn path=/trunk/mcs/; revision=29610
2004-06-15 16:21:23 +00:00
Lluis Sanchez 3c1cf1969b * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
* monitor.c: New method mono_monitor_try_enter_internal, which takes a new
	  parameter which allows to choose whether the wait can be interrupted or
	  not. Also added the method mono_monitor_enter(), which locks the monitor
	  using an infinite wait and without allowing interruption.
	  In the Monitor.Enter and Wait icalls, retry the lock if the wait is
	  interrupted.
	* object.h: Added new fields in MonoThread. suspend_event holds the event
	  used to susped/resume the thread. synch_lock is the lock object to use for
	  modifying the thread state.
	* threads.c: Use the new synch_lock object for locking, instead of "this",
	  which can generate deadlocks.
	  Moved thread state change in Thread.Sleep and Thread.Join from managed
	  to unmanaged code. This avoids a deadlock when the thread was suspended
	  just after acquiring the thread lock.
	  In general, use mono_monitor_enter instead of mono_monitor_try_enter.
	  Implemented Thread.Suspend using an event instead of ThreadSuspend,
	  which is not fully implemented in the io-layer.
	* socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.

svn path=/trunk/mono/; revision=29609
2004-06-15 16:20:06 +00:00
Lluis Sanchez 1ac40a0de2 * Thread.cs: Added new fields to keep sync with MonoThread.
Removed state changes in Sleep and Join. The state change is now done
	  in the icall. For accessing to internal fields lock with synch_lock
	  instead of this, which can be a source of deadlocks.

svn path=/trunk/mcs/; revision=29605
2004-06-15 15:56:24 +00:00
Paolo Molaro 4b20312cfb Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <[email protected]>
* Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
	threads-types.h: more API cleanups.

svn path=/trunk/mono/; revision=29604
2004-06-15 15:45:03 +00:00
Sachin Kumar 7a2e814372 Conversion.cs: Implemented few type conversion methods
svn path=/trunk/mcs/; revision=29602
2004-06-15 15:29:58 +00:00
Paolo Molaro b90f596a18 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <[email protected]>
* domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
	domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
	threadpool.c, threads.c: first pass at the exported API cleanup.

svn path=/trunk/mono/; revision=29601
2004-06-15 13:55:28 +00:00
Paolo Molaro 5e05daf849 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <[email protected]>
* mini.c: make sure the needed wrappers are compiled, too, with
	precomp.

svn path=/trunk/mono/; revision=29600
2004-06-15 13:47:13 +00:00
Paolo Molaro d4777f804a Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <[email protected]>
* icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.

svn path=/trunk/mono/; revision=29597
2004-06-15 12:40:35 +00:00
Paolo Molaro 0ce7a42525 Tue Jun 15 15:15:44 CEST 2004 Paolo Molaro <[email protected]>
* Type.cs: removed unused (and non-existing) icall type_is_instance.

svn path=/trunk/mcs/; revision=29596
2004-06-15 12:34:47 +00:00
Sebastien Pouliot e02b362573 2004-06-15 Sebastien Pouliot <[email protected]>
* MemberInfo.cs: Changed constructor from internal to protected.

svn path=/trunk/mcs/; revision=29595
2004-06-15 11:12:48 +00:00
Lluis Sanchez 1c38fe8835 * Timer.cs: The timer thread must be a background thread.
This fixes #58816.

svn path=/trunk/mcs/; revision=29594
2004-06-15 10:15:00 +00:00
Lluis Sanchez 6f79c6d07e * Timer.cs: Don't abort the thread if Dispose() is called from the runner
thread.

svn path=/trunk/mcs/; revision=29593
2004-06-15 09:51:58 +00:00
Atsushi Eno 15596d15bd 2004-06-15 Atsushi Enomoto <[email protected]>
* DataSetTest.cs : Added regression for #53959.

svn path=/trunk/mcs/; revision=29592
2004-06-15 09:51:54 +00:00
Atsushi Eno a657ff5bba 2004-06-15 Atsushi Enomoto <[email protected]>
* DataSet.cs : children of non-root rows were not properly written.
	  Fixed bug #53959.

svn path=/trunk/mcs/; revision=29591
2004-06-15 09:50:39 +00:00
Marek Safar de4a77467d 2004-06-15 Marek Safar <[email protected]>
* expression.cs (StackAlloc.DoReSolve): Added test for
	negative parameter (CS0247).

svn path=/trunk/mcs/; revision=29590
2004-06-15 09:44:07 +00:00
Jambunathan K 44bc84e25c Added FinancialTest.cs to the list of test files
svn path=/trunk/mcs/; revision=29589
2004-06-15 08:52:37 +00:00
Sanja Gupta 82ed3e2366 ChangeLog: Update ChangeLog.
gdipFunctions.cs: Added delegate and StreamHelper functions, Close
        and Size, required by TIFFCodec. Modifed Function signature for
        GdipLoadImageFromDelegate_linux() method.
image.cs: Modified function call GdipLoadImageFromDelegate_linux()
        with new signature.

svn path=/trunk/mcs/; revision=29587
2004-06-15 08:39:16 +00:00
Marek Safar 78c8381095 2004-06-15 Marek Safar <[email protected]>
Fix bug #59792
	* class.cs: (Event.DelegateMethod.Emit): Added synchronization flag.

svn path=/trunk/mcs/; revision=29586
2004-06-15 07:30:43 +00:00
Jambunathan K e64fc9d0a1 Trivial changes to ExceptionUtils.cs
svn path=/trunk/mcs/; revision=29585
2004-06-15 07:08:14 +00:00
Marek Safar 71f584929d 2004-06-15 Marek Safar <[email protected]>
Fix bug #59781
	* expression.cs: (Binary.DoNumericPromotions): Added conversion for
	ulong.

svn path=/trunk/mcs/; revision=29584
2004-06-15 07:07:46 +00:00
Jambunathan K 50f7d0dda4 Fixed a minor bug in Information.LBound() and Information.UBound()
svn path=/trunk/mcs/; revision=29583
2004-06-15 06:52:05 +00:00
Jambunathan K 5efbd856c9 Added back Conversion.cs !
svn path=/trunk/mcs/; revision=29582
2004-06-15 06:20:13 +00:00
Jambunathan K f8098cad73 Accidentally removed Conversion.cs from CVS. The file will be added back
very soon !

svn path=/trunk/mcs/; revision=29581
2004-06-15 06:18:46 +00:00
Gert Driesen 32de3952e4 * OleDbLiteral.cs: changed enum field values to match MS.NET
* OleDbType.cs: changed enum field values to match MS.NET

svn path=/trunk/mcs/; revision=29580
2004-06-15 05:01:54 +00:00
Gert Driesen 82c7d52cc9 * OdbcDataReader.cs: changed GetData method to return IDataReader
to match MS.NET

svn path=/trunk/mcs/; revision=29579
2004-06-15 05:01:26 +00:00
Gonzalo Paniagua Javier e649fb3261 2004-06-15 Gonzalo Paniagua Javier <[email protected]>
* WebConfigurationSettings.cs: allow empty <configSections>.

svn path=/trunk/mcs/; revision=29578
2004-06-15 04:59:43 +00:00
Gonzalo Paniagua Javier cee0aa4219 2004-06-15 Gonzalo Paniagua Javier <[email protected]>
* ConfigurationSettings.cs: allow empty <configSections>.

svn path=/trunk/mcs/; revision=29577
2004-06-15 04:59:18 +00:00
Anirban Bhattacharjee 9ad4888182 2004-05-15 Anirban Bhattacharjee <[email protected]>
* FinancialTest.cs: Tests for Financial class

svn path=/trunk/mcs/; revision=29576
2004-06-15 04:36:06 +00:00
Anirban Bhattacharjee 50723a3752 2004-06-15 Anirban Bhattacharjee <[email protected]>
* VBUtils.txt: Exception messages for Financial functions by Rob Tillie

svn path=/trunk/mcs/; revision=29575
2004-06-15 04:30:39 +00:00
Jackson Harper ec934f4aad * ilasm.exe.sources: Add FileRef.cs
svn path=/trunk/mcs/; revision=29574
2004-06-15 04:12:40 +00:00
Jackson Harper a8b72380fa * ILParser.jay: Add file refs.
svn path=/trunk/mcs/; revision=29572
2004-06-15 04:11:10 +00:00
Jackson Harper 993802a9c6 * CodeGen.cs: Allow file refs to be added.
* FileRef.cs: New file - represents a file ref.

svn path=/trunk/mcs/; revision=29571
2004-06-15 04:08:41 +00:00
Anirban Bhattacharjee 7baeea3dc9 2004-06-15 Anirban Bhattacharjee <[email protected]>
* Financial.cs: Complete implementation by Rob Tillie

svn path=/trunk/mcs/; revision=29570
2004-06-15 04:02:42 +00:00
Gonzalo Paniagua Javier 7a86616f87 2004-06-15 Gonzalo Paniagua Javier <[email protected]>
* TraceData.cs: fixed <br> output. Closes bug #60181.

svn path=/trunk/mcs/; revision=29569
2004-06-15 03:58:43 +00:00
Gonzalo Paniagua Javier 6cf50976b3 2004-06-15 Gonzalo Paniagua Javier <[email protected]>
* DefaultProxyHandler.cs: removed Console.WriteLine's.

svn path=/trunk/mcs/; revision=29568
2004-06-15 03:55:58 +00:00
Gonzalo Paniagua Javier 668a710f63 aded a few default clientTargets
svn path=/trunk/mono/; revision=29567
2004-06-15 03:55:04 +00:00
Gonzalo Paniagua Javier d7dc90b03a 2004-06-15 Gonzalo Paniagua Javier <[email protected]>
* Environment.cs: use internalGetHome instead of getting "HOME" as
	that variable may not be defined.

svn path=/trunk/mcs/; revision=29566
2004-06-15 03:54:22 +00:00
Gonzalo Paniagua Javier 3ed3fd9e1f 2004-06-15 Gonzalo Paniagua Javier <[email protected]>
* icall.c: added internalGetHome.

svn path=/trunk/mono/; revision=29565
2004-06-15 03:54:15 +00:00
Jackson Harper 4cce9d7fd2 flush
svn path=/trunk/mcs/; revision=29563
2004-06-15 02:57:07 +00:00
Jackson Harper 03abbb0d27 * PEAPI.cs: Add IExternRef interface and modify sigs so it can be
used. So we can easily add stuff to modules and assemblies. Fix
	the nometadata flag, it should be set when there is NO metadata
	not when there is metadata.

svn path=/trunk/mcs/; revision=29562
2004-06-15 02:51:00 +00:00
Sebastien Pouliot 63a9ea5d17 2004-06-14 Sebastien Pouliot <[email protected]>
* EnumBuilderTest.cs: Fixed typos so the test is reported in
	alphabetical order by NUnit.

svn path=/trunk/mcs/; revision=29561
2004-06-15 01:28:15 +00:00
Jackson Harper 6431f5fa76 * ILParser.jay: Add module refs, allow them to be referenced.
svn path=/trunk/mcs/; revision=29560
2004-06-15 00:51:07 +00:00
Jackson Harper 66bfaaa6f7 * CodeGen.cs: Allow adding module refs.
* ExternTable.cs: Add ExternModule refs.
	* ExternTypeRef.cs: Take an ExternRef which can be either an
	assmebly ref or a module ref.

svn path=/trunk/mcs/; revision=29559
2004-06-15 00:50:39 +00:00
Lluis Sanchez 142390ed0a * TimerTest.cs: Added more tests.
* ThreadTest.cs: Added new tests for Thread.Suspend.

svn path=/trunk/mcs/; revision=29556
2004-06-14 21:49:38 +00:00
Lluis Sanchez 0036436ef6 * RemotingConfiguration.cs: Read application name from configuraation file.
svn path=/trunk/mcs/; revision=29555
2004-06-14 21:41:02 +00:00
Sebastien Pouliot 9abca3e9dd 2004-06-14 Sebastien Pouliot <[email protected]>
* NameObjectCollectionBase.cs: Now use IComparer to compare keys. This
	completes a TODO and fix Remove in NameValueCollection.

svn path=/trunk/mcs/; revision=29550
2004-06-14 20:43:18 +00:00
Sebastien Pouliot 0bae4d8bb1 2004-06-14 Sebastien Pouliot <[email protected]>
* NameValueCollectionTest.cs: Added test for remove (case insensitive).

svn path=/trunk/mcs/; revision=29545
2004-06-14 20:09:06 +00:00
Sebastien Pouliot 55b671bb85 2004-06-14 Sebastien Pouliot <[email protected]>
* Hashtable.cs: Compare index and length in CopyTo only when length > 0.

svn path=/trunk/mcs/; revision=29538
2004-06-14 19:53:00 +00:00
Sebastien Pouliot 80ccb2b7d0 2004-06-14 Sebastien Pouliot <[email protected]>
* HashtableTest.cs: Added new case to CopyTo(Array,int) an empty
	hashtable.

svn path=/trunk/mcs/; revision=29536
2004-06-14 19:30:21 +00:00
Sebastien Pouliot 95d1497d5f 2004-06-14 Sebastien Pouliot <[email protected]>
* HybridDictionary.cs: Fixed Contains for null argument (again). Return
	false when dictionary is empty or else throw an ArgumentNullException.
	* NameValueCollection.cs: Added missing Rank check in CopyTo (Array,
	int).

svn path=/trunk/mcs/; revision=29534
2004-06-14 19:12:47 +00:00
Sebastien Pouliot 4c43e39933 2004-06-14 Sebastien Pouliot <[email protected]>
* HybridDictionaryTest.cs: Added cases with an non-empty dictionary.
	* NameValueCollectionTest.cs: Added tests for CopyTo(Array,int).

svn path=/trunk/mcs/; revision=29533
2004-06-14 19:06:10 +00:00
Sebastien Pouliot 8eef9e5f2a 2004-06-14 Sebastien Pouliot <[email protected]>
* ResourceReaderTest.cs: Un-ignored an old test case (probably fixed a
	long time ago). Converted tests to NUnit 2.x format to be more
	specific when checking exceptions.

svn path=/trunk/mcs/; revision=29530
2004-06-14 17:43:17 +00:00
Gert Driesen 84bbaf253d * DisplayMode.cs: changed enum field values to match MS.NET
svn path=/trunk/mcs/; revision=29528
2004-06-14 17:01:18 +00:00
Gert Driesen 1c052d21b8 * XmlSerializationWriter.cs: changed signature of protected method
FromByteArrayBase64 to match MS.NET

svn path=/trunk/mcs/; revision=29527
2004-06-14 17:00:12 +00:00
Gert Driesen 4004241887 * SchemaReference.cs: corrected namespace
* SoapBinding.cs: corrected namespace

svn path=/trunk/mcs/; revision=29526
2004-06-14 16:59:10 +00:00
4601 changed files with 128951 additions and 16794 deletions

No files matched your search

+81
View File
@@ -1,3 +1,84 @@
2004-06-29 Raja R Harinath <[email protected]>
Atsushi Enomoto <[email protected]>
* runtime/net_1_1/Makefile.am (GAC_ROOT_DIR): Renamed from GAC_DIR.
(GAC_DIR): New define that doesn't include $(DESTDIR).
(install-data-local,uninstall-local): Use them. Use in-tree mono
runtime, not the installed one.
2004-06-29 Raja R Harinath <[email protected]>
* runtime/Makefile.am (gmcs_exe): New. Set only if not W32.
(monotwo_DATA): Use it.
From Atsushi Enomoto.
2004-06-24 Raja R Harinath <[email protected]>
* runtime/net_2_0/Makefile.am (gac_assemblies_list): Put back
ICSharpCode.SharpZipLib, not that it has a different version.
2004-06-24 Raja R Harinath <[email protected]>
* Makefile.am (MCS_DIRS, MCS_FILES): Add back Mono.CSharp.Debugger.
(tmpinst-dir-contents, $(tmpinst)/bin/mono.bat): Remove mono.bat
in W32. Use 'mono' and 'mcs' in W32 too.
(bootstrap) [PLATFORM_WIN32]: Back to single stage bootstrap.
* runtime/net_2_0/Makefile.am (gac_assemblies_list): Don't mention
nunit.*, IBM.Data.DB2, ICSharpCode.SharpZipLib.
Fix for #60443, the GAC .DLL-Hell.
2004-06-22 Raja R Harinath <[email protected]>
* Makefile.am (bootstrap) [PLATFORM_WIN32]: Make two-stage.
2004-06-18 Jackson Harper <[email protected]>
* man/mono.1: Add MONO_LOG_LEVEL and MONO_LOG_MASK. Add
instructions on setting multiple mask values.
Fri Jun 18 19:39:09 CEST 2004 Paolo Molaro <[email protected]>
* Makefile.am: process data before runtime, so the config file is
installed and gacutil has a chance to work (finding symlink).
2004-06-18 Raja R Harinath <[email protected]>
* runtime/Makefile.am ($(monoone_DATA) $(monotwo_DATA) $(monobins_DATA)):
Test if files exist in the mcs/ tree before creating symlinks.
Remove symlinks before creating them again.
* runtime/net_1_1/Makefile.am (mscorlib.dll $(gac_assemblies)): Likewise.
* runtime/net_2_0/Makefile.am (mscorlib.dll $(gac_assemblies)): Likewise.
2004-06-18 Raja R Harinath <[email protected]>
* scripts/Makefile.am (REWRITE): New. Common rewriting 'sed' command.
(bin_SCRIPTS): Unify all the script generating rules into one.
2004-06-16 Raja R Harinath <[email protected]>
* Makefile.am (bootstrap) [PLATFORM_WIN32]: Open code. Don't
build and populate net_2_0 profile.
(populate-runtime-subdir): Make into subroutine that takes list of
profiles to populate.
(faststrap): Update.
(MCS_DIRS, MCS_FILES, MONO_CSHARP_DEBUGGER_DIR, MONO_CSHARP_DEBUGGER_FILE):
Avoid automake conditional/+= problems.
(populate-runtime-subdir): Rewrite sanity check.
2004-06-16 Raja R Harinath <[email protected]>
Include prototype completely-untested 'make bootstrap' support for W32.
* Makefile.am (bootstrap): Define to fasterstrap for W32.
(MCS_DIRS, MCS_FILES): Don't refer to Mono.CSharp.Debugger in W32.
(tmpinst-dir): Change sub-make invoke to ...
(tmpinst-dir-contents): ... this. Build 'mono.bat' in W32 instead
of 'mono' and 'mcs'.
($(tmpinst)/bin/mono.bat): New.
2004-06-15 Dick Porter <[email protected]>
* configure.in: Check for struct ip_mreqn and struct ip_mreq on
windows too. Fixes bug 55040.
Mon Jun 14 18:38:34 CEST 2004 Paolo Molaro <[email protected]>
+50 -16
View File
@@ -1,11 +1,11 @@
AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I .
SUBDIRS = @libgc_dir@ mono @ikvm_jni_dir@ docs runtime scripts man data samples support web
SUBDIRS = $(libgc_dir) mono $(ikvm_jni_dir) docs data runtime scripts man samples support web
# Keep in sync with SUBDIRS
## 'tools' is not normally built
DIST_SUBDIRS = libgc mono ikvm-jni docs runtime scripts man data samples support web tools
DIST_SUBDIRS = libgc mono ikvm-jni docs data runtime scripts man samples support web tools
EXTRA_DIST= mono.pc.in mono.spec.in mint.pc.in
@@ -28,6 +28,7 @@ mcs_topdir=$(top_srcdir)/../mcs
.PHONY: bootstrap faststrap fasterstrap bootstrap-clean bootstrap-check get-monolite-latest monolite-bootstrap
.PHONY: tmpinst-dir tmpinst-mcs-basic-build tmpinst-mcs-short-build tmpinst-mcs-full-build tmpinst-monolite
.PHONY: mono-do-runtime-only mcs-do-basic-build mcs-do-short-build mcs-do-full-build mcs-do-clean-profiles mcs-do-run-test
.PHONY: populate-runtime-subdir
if USE_JIT
mono_runtime = mono/mini/mono
@@ -51,27 +52,28 @@ MCS_FILES = $(MCS_BASIC_FILES) \
tmpinst = _tmpinst
if PLATFORM_WIN32
populate_profiles = default:net_1_1
# bootstraps using the .NET C# compiler
bootstrap: tmpinst-dir mono-do-runtime-only
$(MAKE) fasterstrap
else
populate_profiles = default:net_1_1 net_2_0:net_2_0
bootstrap: tmpinst-mcs-basic-build mono-do-runtime-only
$(MAKE) tmpinst-mcs-short-build
$(MAKE) fasterstrap
endif
faststrap: tmpinst-mcs-short-build
$(MAKE) mono-do-runtime-only
$(MAKE) fasterstrap
.PHONY: populate-runtime-subdir
## *** warning ***: tested only with GNU make
populate-runtime-subdir:
srcdir=`cd $(srcdir) && pwd`; tmpinst=`pwd`/$(tmpinst) ; \
PATH=$$tmpinst/bin:$$PATH ; export PATH ; \
cd $(mcs_topdir) \
&& $(MAKE) PROGRAM_INSTALL_DIR=$$srcdir/runtime LIBRARY_INSTALL_DIR=$$srcdir/runtime/net_1_1 prefix=$$tmpinst/prefix PROFILE=default install \
&& $(MAKE) PROGRAM_INSTALL_DIR=$$srcdir/runtime LIBRARY_INSTALL_DIR=$$srcdir/runtime/net_2_0 prefix=$$tmpinst/prefix PROFILE=net_2_0 install
test -z "`find $(tmpinst)/prefix -name '*.dll'`"
test -z "`find $(tmpinst)/prefix -name '*.exe'`"
set fnord `find $(tmpinst)/prefix -type f | wc -l` ; test "$$2" = 9
rm -rf $(tmpinst)/prefix
fasterstrap: tmpinst-mcs-full-build
$(MAKE) populate-runtime-subdir
$(MAKE)
@@ -139,9 +141,39 @@ mcs-do-run-test: tmpinst-dir
PATH=$$tmpinst/bin:$$PATH ; export PATH ; \
cd $(mcs_topdir) && $(MAKE) PROFILE=default run-test
populate-runtime-subdir:
test -n '$(populate_profiles)'
@srcdir=`cd $(srcdir) && pwd`; tmpinst=`pwd`/$(tmpinst) ; \
PATH=$$tmpinst/bin:$$PATH ; export PATH ; \
for profile in $(populate_profiles); do \
( set fnord `echo $$profile | sed 's,:, ,g'` && \
echo "cd $(mcs_topdir) && $(MAKE) PROGRAM_INSTALL_DIR=$$srcdir/runtime PROFILE=$$2 LIBRARY_INSTALL_DIR=$$srcdir/runtime/$$3 prefix=$$tmpinst/prefix install" && \
cd $(mcs_topdir) && \
$(MAKE) PROGRAM_INSTALL_DIR=$$srcdir/runtime PROFILE=$$2 LIBRARY_INSTALL_DIR=$$srcdir/runtime/$$3 prefix=$$tmpinst/prefix install ) || exit 1 ; \
done
find $(tmpinst)/prefix -type f -path '*/jay*' -exec rm -f '{}' ';'
test -z "`find $(tmpinst)/prefix -type f -print`"
rm -rf $(tmpinst)/prefix
tmpinst-dir:
mkdir -p $(tmpinst) $(tmpinst)/bin $(tmpinst)/lib $(tmpinst)/etc/mono
$(MAKE) $(tmpinst)/bin/mono $(tmpinst)/bin/mcs $(tmpinst)/etc/mono/machine.config
$(MAKE) tmpinst-dir-contents
tmpinst-dir-contents: $(tmpinst)/bin/mono $(tmpinst)/bin/mcs $(tmpinst)/etc/mono/machine.config
if PLATFORM_WIN32
$(tmpinst)/bin/mono: $(srcdir)/Makefile.am
echo '#! /bin/sh' > $@
echo 'builddir="'`pwd`'"; win_builddir="'`cygpath -w -a .`'"' >> $@
echo 'tmpinst="$$win_builddir\\$(tmpinst)"' >> $@
echo 'if test -z "$$MONO_PATH" ; then MONO_PATH="$$tmpinst\\lib"; else MONO_PATH="$${MONO_PATH};$$tmpinst\\lib" ; fi' >> $@
echo 'MONO_CFG_DIR="$$tmpinst\\etc"' >> $@
echo 'export MONO_PATH MONO_CFG_DIR' >> $@
echo 'exec "$$builddir/libtool" --mode=execute "$$builddir/mono.exe" "$$@"' >> $@
chmod +x $@
else
$(tmpinst)/bin/mono: $(srcdir)/Makefile.am
echo '#! /bin/sh' > $@
@@ -152,6 +184,8 @@ $(tmpinst)/bin/mono: $(srcdir)/Makefile.am
echo 'exec "$$builddir/libtool" --mode=execute "$$builddir/$(mono_runtime)" --config "$$builddir/data/config" "$$@"' >> $@
chmod +x $@
endif
$(tmpinst)/bin/mcs: $(srcdir)/Makefile.am
(t=`cd $(tmpinst) && pwd`; echo '#! /bin/sh'; echo 'exec "'"$$t/bin/mono"'" "'"$$t/lib/mcs.exe"'" "$$@"') > $@
chmod +x $@
+11
View File
@@ -0,0 +1,11 @@
/* config.h.in. Generated automatically from configure.in by autoheader. */
/* Define if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Name of package */
#undef PACKAGE
/* Version number of package */
#undef VERSION
+45 -5
View File
@@ -1,7 +1,7 @@
AC_INIT(README)
AC_CANONICAL_SYSTEM
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(mono,0.96)
AM_INIT_AUTOMAKE(mono,1.0)
AM_MAINTAINER_MODE
AC_PROG_LN_S
@@ -908,6 +908,34 @@ else
jdk_headers_found=no
AC_CHECK_LIB(ws2_32, main, LIBS="$LIBS -lws2_32", AC_ERROR(bad mingw install?))
AC_CHECK_LIB(psapi, main, LIBS="$LIBS -lpsapi", AC_ERROR(bad mingw install?))
dnl *********************************
dnl *** Check for struct ip_mreqn ***
dnl *********************************
AC_MSG_CHECKING(for struct ip_mreqn)
AC_TRY_COMPILE([#include <ws2tcpip.h>], [
struct ip_mreqn mreq;
mreq.imr_address.s_addr = 0;
], [
# Yes, we have it...
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_STRUCT_IP_MREQN)
], [
# We'll just have to try and use struct ip_mreq
AC_MSG_RESULT(no)
AC_MSG_CHECKING(for struct ip_mreq)
AC_TRY_COMPILE([#include <ws2tcpip.h>], [
struct ip_mreq mreq;
mreq.imr_interface.s_addr = 0;
], [
# Yes, we have it...
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_STRUCT_IP_MREQ)
], [
# No multicast support
AC_MSG_RESULT(no)
])
])
fi
dnl socklen_t check
@@ -1048,6 +1076,7 @@ ACCESS_UNALIGNED="yes"
JIT_SUPPORTED=no
LIBC="libc.so.6"
INTL="libc.so.6"
jit_wanted=false
case "$host" in
@@ -1072,12 +1101,15 @@ case "$host" in
JIT_SUPPORTED=yes
ACCESS_UNALIGNED="no"
LIBC="libc.so"
INTL="libintl.so"
jit_wanted=true
;;
# alpha*-*-linux* | alpha*-*-osf*)
# TARGET=ALPHA;
# ACCESS_UNALIGNED="no"
# ;;
alpha*-*-linux* | alpha*-*-osf*)
TARGET=ALPHA;
ACCESS_UNALIGNED="no"
JIT_SUPPORTED=no
arch_target=alpha;
;;
# ia64-*-linux* | ia64-*-hpux*)
# TARGET=IA64;
# arch_target=ia64;
@@ -1097,6 +1129,11 @@ case "$host" in
LIBC="libc.sl"
ACCESS_UNALIGNED="no"
;;
hppa*linux*)
TARGET=HPPA;
arch_target=hppa;
ACCESS_UNALIGNED="no"
;;
macppc-*-openbsd* | powerpc-*-linux* | powerpc-*-openbsd* | \
powerpc-*-sysv* | powerpc-*-darwin*)
TARGET=POWERPC;
@@ -1141,9 +1178,11 @@ case "$host" in
powerpc-*-darwin*)
libsuffix=".dylib"
LIBC="libc.dylib"
INTL="libintl.dylib"
;;
*-*-*netbsd*)
LIBC="libc.so.12"
INTL="libintl.so.0"
;;
esac
AC_SUBST(libsuffix)
@@ -1201,6 +1240,7 @@ AM_CONDITIONAL(HPPA, test x$TARGET = xHPPA)
AM_CONDITIONAL(JIT_SUPPORTED, test x$JIT_SUPPORTED = xyes)
AC_SUBST(LIBC)
AC_SUBST(INTL)
AC_SUBST(arch_target)
AC_SUBST(CFLAGS)
-1
View File
@@ -2,4 +2,3 @@ Makefile.in
Makefile
config
.cvsignore
browscap.ini
+1 -6
View File
@@ -3,15 +3,10 @@ monodir = $(sysconfdir)/mono
EXTRA_DIST = config.in \
machine.config \
DefaultWsdlHelpGenerator.aspx \
browscap.ini.gz
browscap.ini
mono_DATA = config \
machine.config \
DefaultWsdlHelpGenerator.aspx \
browscap.ini
CLEANFILES = browscap.ini
browscap.ini: browscap.ini.gz
gunzip -c $^ > $@
+13082
View File
File diff suppressed because it is too large. Load diff
Binary file not shown.
+1
View File
@@ -1,6 +1,7 @@
<configuration>
<dllmap dll="cygwin1.dll" target="@LIBC@" />
<dllmap dll="libc" target="@LIBC@" />
<dllmap dll="libintl" target="@INTL@" />
<dllmap dll="libxslt.dll" target="libxslt@libsuffix@" />
<dllmap dll="libmySQL.dll" target="libmysqlclient@libsuffix@" />
<dllmap dll="odbc32.dll" target="libodbc@libsuffix@" />
+6
View File
@@ -152,6 +152,12 @@
enableSessionState="true"
autoEventWireup="true"
validateRequest="true" />
<clientTarget>
<add alias="ie5" userAgent="Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)" />
<add alias="ie4" userAgent="Mozilla/4.0 (compatible; MSIE 4.0; Windows NT 4.0)" />
<add alias="uplevel" userAgent="Mozilla/4.0 (compatible; MSIE 4.0; Windows NT 4.0)" />
<add alias="downlevel" userAgent="Unknown" />
</clientTarget>
</system.web>
<system.runtime.remoting>
-246
View File
@@ -1,246 +0,0 @@
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
+8
View File
@@ -1,3 +1,11 @@
2004-06-24 David Waite <[email protected]>
* mono-jni.c: change to C90-style comments from C99/C++-style
Fri Jun 18 13:46:05 CEST 2004 Paolo Molaro <[email protected]>
* mono-jni.c: updates for the API cleanups.
2004-05-05 Zoltan Varga <[email protected]>
* mono-jni.c: Implement some missing JNI functions.
+25 -25
View File
@@ -149,8 +149,8 @@ StringFromUTF8 (const char* psz)
/* TODO: */
return mono_string_new (mono_domain_get (), psz);
#if 0
// Sun's modified UTF8 encoding is not compatible with System::Text::Encoding::UTF8, so
// we need to roll our own
/* Sun's modified UTF8 encoding is not compatible with System::Text::Encoding::UTF8, so */
/* we need to roll our own */
int len, res_len, i;
int *res;
@@ -163,16 +163,16 @@ StringFromUTF8 (const char* psz)
switch (c >> 4)
{
case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7:
// 0xxxxxxx
/* 0xxxxxxx */
break;
case 12: case 13:
// 110x xxxx 10xx xxxx
/* 110x xxxx 10xx xxxx */
char2 = *psz++;
i++;
c = (((c & 0x1F) << 6) | (char2 & 0x3F));
break;
case 14:
// 1110 xxxx 10xx xxxx 10xx xxxx
/* 1110 xxxx 10xx xxxx 10xx xxxx */
char2 = *psz++;
char3 = *psz++;
i++;
@@ -263,50 +263,50 @@ static jobject JNICALL CallObjectMethodA (JNIEnv *env, jobject obj, jmethodID me
static MonoObject *
box_Boolean (jboolean val)
{
return mono_value_box (mono_domain_get (), mono_defaults.boolean_class, &val);
return mono_value_box (mono_domain_get (), mono_get_boolean_class (), &val);
}
static MonoObject *
box_Byte (jbyte val)
{
/* Sbyte ! */
return mono_value_box (mono_domain_get (), mono_defaults.sbyte_class, &val);
return mono_value_box (mono_domain_get (), mono_get_sbyte_class (), &val);
}
static MonoObject *
box_Char (jchar val)
{
return mono_value_box (mono_domain_get (), mono_defaults.char_class, &val);
return mono_value_box (mono_domain_get (), mono_get_char_class (), &val);
}
static MonoObject *
box_Short (jshort val)
{
return mono_value_box (mono_domain_get (), mono_defaults.int16_class, &val);
return mono_value_box (mono_domain_get (), mono_get_int16_class (), &val);
}
static MonoObject *
box_Int (jint val)
{
return mono_value_box (mono_domain_get (), mono_defaults.int32_class, &val);
return mono_value_box (mono_domain_get (), mono_get_int32_class (), &val);
}
static MonoObject *
box_Long (jlong val)
{
return mono_value_box (mono_domain_get (), mono_defaults.int64_class, &val);
return mono_value_box (mono_domain_get (), mono_get_int64_class (), &val);
}
static MonoObject *
box_Float (jfloat val)
{
return mono_value_box (mono_domain_get (), mono_defaults.single_class, &val);
return mono_value_box (mono_domain_get (), mono_get_single_class (), &val);
}
static MonoObject *
box_Double (jdouble val)
{
return mono_value_box (mono_domain_get (), mono_defaults.double_class, &val);
return mono_value_box (mono_domain_get (), mono_get_double_class (), &val);
}
static int
@@ -327,7 +327,7 @@ InvokeHelper (JNIEnv *env, jobject object, jmethodID methodID, jvalue* args)
MonoObject **argarray;
MonoArray *args2;
// assert(!pLocalRefs->PendingException);
/* assert(!pLocalRefs->PendingException); */
g_assert(methodID);
argc = GetMethodArgs(methodID, sig);
@@ -368,7 +368,7 @@ InvokeHelper (JNIEnv *env, jobject object, jmethodID methodID, jvalue* args)
}
}
args2 = mono_array_new (mono_domain_get (), mono_defaults.object_class, argc);
args2 = mono_array_new (mono_domain_get (), mono_get_object_class (), argc);
for (i = 0; i < argc; ++i)
mono_array_set (args2, MonoObject*, i, argarray [i]);
@@ -475,7 +475,7 @@ METHOD_IMPL(Double,jdouble)
// TODO: These should be put into the macros above...
/* TODO: These should be put into the macros above... */
static void JNICALL CallVoidMethodA (JNIEnv *env, jobject obj, jmethodID methodID, jvalue * args) {
InvokeHelper(env, obj, methodID, args);
}
@@ -581,7 +581,7 @@ static type JNICALL GetStatic##Type##Field(JNIEnv *env, jclass clazz, jfieldID f
// return *(cpptype*)BOXED_VALUE (jniFuncs.GetFieldValue (fieldID, jniFuncs.UnwrapRef (obj)));
/* return *(cpptype*)BOXED_VALUE (jniFuncs.GetFieldValue (fieldID, jniFuncs.UnwrapRef (obj))); */
GET_SET_FIELD(Boolean,jboolean,gboolean)
GET_SET_FIELD(Byte,jbyte, gchar)
@@ -734,42 +734,42 @@ static jobjectArray JNICALL NewObjectArray (JNIEnv *env, jsize len, jclass clazz
static jbooleanArray JNICALL NewBooleanArray (JNIEnv *env, jsize len)
{
return (jbooleanArray)new_java_array (env, mono_defaults.boolean_class, len);
return (jbooleanArray)new_java_array (env, mono_get_boolean_class (), len);
}
static jbyteArray JNICALL NewByteArray (JNIEnv *env, jsize len)
{
return (jbyteArray)new_java_array (env, mono_defaults.sbyte_class, len);
return (jbyteArray)new_java_array (env, mono_get_sbyte_class (), len);
}
static jcharArray JNICALL NewCharArray (JNIEnv *env, jsize len)
{
return (jcharArray)new_java_array (env, mono_defaults.char_class, len);
return (jcharArray)new_java_array (env, mono_get_char_class (), len);
}
static jshortArray JNICALL NewShortArray (JNIEnv *env, jsize len)
{
return (jshortArray)new_java_array (env, mono_defaults.int16_class, len);
return (jshortArray)new_java_array (env, mono_get_int16_class (), len);
}
static jintArray JNICALL NewIntArray (JNIEnv *env, jsize len)
{
return (jintArray)new_java_array (env, mono_defaults.int32_class, len);
return (jintArray)new_java_array (env, mono_get_int32_class (), len);
}
static jlongArray JNICALL NewLongArray (JNIEnv *env, jsize len)
{
return (jlongArray)new_java_array (env, mono_defaults.int64_class, len);
return (jlongArray)new_java_array (env, mono_get_int64_class (), len);
}
static jfloatArray JNICALL NewFloatArray (JNIEnv *env, jsize len)
{
return (jfloatArray)new_java_array (env, mono_defaults.single_class, len);
return (jfloatArray)new_java_array (env, mono_get_single_class (), len);
}
static jdoubleArray JNICALL NewDoubleArray (JNIEnv *env, jsize len)
{
return (jdoubleArray)new_java_array (env, mono_defaults.double_class, len);
return (jdoubleArray)new_java_array (env, mono_get_double_class (), len);
}
/* Original version with copy */
+48 -14
View File
@@ -24,20 +24,17 @@ convention is that assemblies must also be placed in a separate
directory for being accessed to the compiler. This is done with the
-package directive to gacutil.
.PP
The tool allows for installationl, removal, and listing of the
The tool allows for installation, removal, and listing of the
contents of the assembly cache.
.PP
The GAC is relative to the Mono installation prefix:
mono_prefix/lib/mono.
.SH FLAGS
The "-user" flag enables you to install/remove the assembly into the
user's assembly cache, as opposed to the global one.
.PP
.SH COMMANDS
.I "-i path_to_assembly" [-f] [-root ROOTDIR] [-package NAME]
.I -i <assembly_path> [-check_refs] [-package NAME] [-root ROOTDIR] [-gacdir GACDIR]
.Sp
The above installs the assembly into the GAC, use the -f flag to force
an installation an overwrite anything in there.
Installs an assembly into the global assembly cache. <assembly_path>
is the name of the file that contains the assembly manifest
.Sp
The -package option can be used to also create a directory in in
prefix/lib/mono with the name NAME, and a symlink is created from
@@ -47,18 +44,32 @@ developers can reference a set of libraries at once.
The -root option is used by developers integrating this with automake
tools or packaging tools that require a prefix directory to be
specified. The root represents the "libdir" component of a prefix
(typically prefix/lib).
(typically prefix/lib).
.Sp
The -gacdir option is used to specify the GACs base directory. Once an
assembly has been installed to a non standard gacdir the MONO_GAC_PATH
environment variable must be used to access the assembly.
.Sp
The -check_refs option is used to ensure that the assembly being
installed into the GAC does not reference any non strong named
assemblies. Assemblies being installed to the GAC should not reference
non strong named assemblies, however the is an optional check.
.fi
.PP
.I "-l"
.I "-l" [assembly_name] [-root ROOTDIR] [-gacdir GACDIR]
.Sp
Lists the contents of the Global Assembly Cache
Lists the contents of the global assembly cache. When the
<assembly_name> parameter is specified only matching assemblies are
listed.
.PP
.I "-u assembly_name [-root]"
.I "-u" <assembly_display_name> [-package NAME] [-root ROOTDIR] [-gacdir GACDIR]
.Sp
The above removes the given assembly name from the Global Assembly
Cache. As opposed to the install option that takes a filename, this
takes as an argument the assembly name, which looks like this:
Uninstalls an assembly from the global assembly cache.
<assembly_display_name> is the name of the assembly (partial or
fully qualified) to remove from the global assembly cache. If a
partial name is specified all matching assemblies will be
uninstalled. As opposed to the install option that takes a filename,
this takes as an argument the assembly name, which looks like this:
.nf
MyLibrary.Something, version=1.0.0.0, publicKeyToken=xxxx,culture=neutral
.fi
@@ -69,6 +80,29 @@ to quote them.
The removal performs a greedy removal, if you only specifiy one
component like, "MyLibrary.Something", it will remove all versions of
the library.
.Sp
.I "-us" <assembly_path> [-package NAME] [-root ROOTDIR] [-gacdir GACDIR]
Uninstalls an assembly using the specifed assemblies full name.
<assembly path> is the path to an assembly. The full assembly name
is retrieved from the specified assembly if there is an assembly in
the GAC with a matching name, it is removed. Unlike the -u option this
option takes a file name, like this:
.nf
Example: -us myDll.dll
.fi
.Sp
.I "-ul" <assembly_list_file> [-package NAME] [-root ROOTDIR] [-gacdir GACDIR]
Uninstalls one or more assemblies from the global assembly cache.
<assembly_list_file> is the path to a test file containing a list of
assembly names on separate lines.
.nf
Example -ul assembly_list.txt
.fi
.nf
assembly_list.txt contents:
assembly1,Version=1.0.0.0,Culture=en,PublicKeyToken=0123456789abcdef
assembly2,Version=2.0.0.0,Culture=en,PublicKeyToken=0123456789abcdef
.fi
.SH FILES
On Unix assemblies are loaded from the installation lib directory. If you set
`prefix' to /usr, the assemblies will be located in /usr/lib. On
+55 -2
View File
@@ -1,8 +1,9 @@
.\"
.\" mono configuration page.
.\" mono-config configuration page.
.\" (C) Ximian, Inc.
.\" Author:
.\" Miguel de Icaza ([email protected])
.\" Paolo Molaro ([email protected])
.\"
.TH Mono "Mono 1.0"
.SH NAME
@@ -12,6 +13,9 @@ The Mono runtime will load configuration data from the
installation prefix /etc/mono/config file, the ~/.mono/config or from
the file pointed by the MONO_CONFIG environment variable.
.PP
For each assembly loaded a config file with the name:
/path/to/the/assembly.exe.config is loaded, too.
.PP
This file controls the behavior of the runtime.
.PP
The file contains an XML-like file with various sections, all of them
@@ -24,6 +28,37 @@ You use the dllmap directive to map shared libraries referenced by
P/Invoke in your assemblies to a different shared library.
.PP
This is typically used to map Windows libraries to Unix library names.
The
.B dllmap
element takes two attributes:
.TP
.I dll
This should be the same string used in the DllImport attribute
.TP
.I target
This should be the name of the library where the function can be found:
this name should be suitable for use with the platform native shared library
loading routines (dlopen etc.), so you may want to check the manpages for that, too.
.SH <dllentry> directive
This directive can be used to map a specific dll/function pair to a different
library and also a different function name. It should appear inside a
.B dllmap
element with only the dll attribute specified.
.PP
The
.B dllentry
element takes 3 attributes:
.TP
.I dll
This is the target library, where the function can be found.
.TP
.I name
This is the name of the fuction as it appears in the metadata: it is the name
of the P/Invoke method.
.TP
.I target
This is the name of the function to lookup instead of the name specified in the
P/Invoke method.
.SH EXAMPLES
The following example maps references to the `cygwin1.dll' shared
library to the `libc.so.6' file.
@@ -32,5 +67,23 @@ library to the `libc.so.6' file.
<dllmap dll="cygwin1.dll" target="libc.so.6"/>
</configuration>
.fi
.PP
This one maps the following C# method:
.nf
[DllImport ("libc")]
static extern void somefunction ();
.fi
to
.B differentfunction
in
.B libdifferent.so.
.nf
<configuration>
<dllmap dll="libc">
<dllentry dll="libdifferent.so" name="somefunction" target="differentfunction" />
</dllmap>
</configuration>
.fi
.SH SEE ALSO
.BR mono(1), monodis(1), mint(1)
.BR mono(1), monodis(1), mint(1)
+15 -9
View File
@@ -252,6 +252,21 @@ If set, this variable overrides the default runtime configuration file
($PREFIX/etc/mono/config). The --config command line options overrides the
environment variable.
.TP
.I "MONO_LOG_LEVEL"
If set, the logging level is changed to the set value. Possible values
are "error", "critical", "warning", "message", "info", "debug". The
default value is "error". Messages with a logging level greater then
or equal to the log level will be printed to stdout/stderr.
.TP
.I "MONO_LOG_MASK"
If set, the log mask is changed to the set value. Possible values are
"asm" (assembly loader), "type", "dll" (native library loader), "gc"
(garbage collector), "cfg" (config file loader), "all". The default value is
"all". Changing the mask value allows you to display only messages for
a certain component. You can use multiple masks by comma separating
them. For example to see config file messages and assembly loader
messages set you mask to "asm,cfg".
.TP
.I "MONO_DEBUG"
If set, enables some features of the runtime useful for debugging.
It makes the runtime display the stack traces for all the threads
@@ -310,15 +325,6 @@ If set its the directory where the ".wapi" handle state is stored.
This is the directory where the Windows I/O Emulation layer stores its
shared state data (files, events, mutexes, pipes). By default Mono
will store the ".wapi" directory in the users's home directory.
.TP
.I "MONO_UNMANAGED_XSLT"
If set any value, System.Xml.Xsl.XslTransform uses libxslt-based
transformation engine (a.k.a Unmanaged XSLT). Unmanaged XSLT has
long been used for XSLT engine while Managed XSLT engine is so
new and might have some bugs. Basically we recommend Managed XSLT
solution, but if it contains some blocking bugs, then you can also
use traditional libxslt. If you want to use msxsl:script, you have
to select Managed XSLT.
.SH FILES
On Unix assemblies are loaded from the installation lib directory. If you set
`prefix' to /usr, the assemblies will be located in /usr/lib. On
+8
View File
@@ -1,3 +1,11 @@
2004-06-22 Todd Berman <[email protected]>
* configure: Patch from Mariano Suárez-Alvarez
<[email protected]> to make configure accept jhbuild style
/prefix /usr options, and to continue past unknown options. Currently
this patch is a bit spammy with multiple unknown options, anyone
who is interested is welcome to fix this.
2004-06-14 Raja R Harinath <[email protected]>
* Makefile (all-profiles, clean-profiles): Simplify slightly.
+26
View File
@@ -1,3 +1,29 @@
2004-06-28 Raja R Harinath <[email protected]>
* platforms/linux.make (RESGEN): Define using $(INTERNAL_RESGEN).
2004-06-21 Raja R Harinath <[email protected]>
* executable.make ($(PROGRAM)): Move depend on the makefrags ...
(all-local): ... here.
* library.make ($(the_lib), $(test_lib), $(btest_lib), all-local):
Likewise.
(LIBRARY_SNK): New default define. Allows library to be signed
with a key other than mono.snk.
($(the_lib_signature_stamp)): New stamp file created when an
assembly is signed.
(install-local, uninstall-local, maybe-sign-lib): Set MONO_PATH.
2004-06-16 Raja R Harinath <[email protected]>
* library.make ($(makefrag),$(test_makefrag),$(btest_makefrag)):
Depend on library.make.
* executable.make ($(makefrag)): Depend on executable.make.
2004-06-16 Atsushi Enomoto <[email protected]>
* library.make : Added GACDIR. Use cygpath -w on windows.
2004-06-14 Raja R Harinath <[email protected]>
* platforms/linux.make (PLATFORM_CHANGE_SEPARATOR_CMD): Define to 'cat'.
+1
View File
@@ -1,3 +1,4 @@
*.makefrag
*.response
*.stamp
*.was_signed
+4 -1
View File
@@ -55,7 +55,7 @@ ifndef PROGRAM_COMPILE
PROGRAM_COMPILE = $(CSCOMPILE)
endif
$(PROGRAM): $(makefrag) $(BUILT_SOURCES) $(response)
$(PROGRAM): $(BUILT_SOURCES) $(response)
$(PROGRAM_COMPILE) /target:exe /out:$@ $(BUILT_SOURCES) @$(response)
$(makefrag): $(sourcefile)
@@ -69,3 +69,6 @@ $(response): $(sourcefile)
endif
-include $(makefrag)
all-local: $(makefrag)
$(makefrag): $(topdir)/build/executable.make
+26 -10
View File
@@ -28,8 +28,9 @@ endif
makefrag = $(depsdir)/$(PROFILE)_$(LIBRARY).makefrag
the_lib = $(topdir)/class/lib/$(PROFILE)/$(LIBRARY_NAME)
the_lib_signature_stamp = $(makefrag:.makefrag=.was_signed)
the_pdb = $(the_lib:.dll=.pdb)
library_CLEAN_FILES += $(makefrag) $(the_lib) $(the_pdb)
library_CLEAN_FILES += $(makefrag) $(the_lib) $(the_pdb) $(the_lib_signature_stamp)
ifndef NO_TEST
test_nunit_lib = nunit.framework.dll nunit.core.dll nunit.util.dll
@@ -80,9 +81,15 @@ ifeq ($(PROFILE), net_2_0)
PACKAGE = 2.0
endif
ifeq ($(PLATFORM), win32)
GACDIR = `cygpath -w $(DESTDIR)$(prefix)/lib`
else
GACDIR = $(DESTDIR)$(prefix)/lib
endif
all-local: $(the_lib)
install-local: $(the_lib) maybe-sign-lib
install-local: $(the_lib)
ifdef LIBRARY_INSTALL_DIR
install-local:
@@ -95,20 +102,26 @@ uninstall-local:
else
install-local: $(gacutil)
$(RUNTIME) $(gacutil) /i $(the_lib) /f /root $(DESTDIR)$(prefix)/lib /package $(PACKAGE)
MONO_PATH="$(topdir)/class/lib/$(PROFILE):$$MONO_PATH" $(RUNTIME) $(gacutil) /i $(the_lib) /f /root $(GACDIR) /package $(PACKAGE)
uninstall-local: $(gacutil)
$(RUNTIME) $(gacutil) /u $(LIBRARY_NAME:.dll=)
MONO_PATH="$(topdir)/class/lib/$(PROFILE):$$MONO_PATH" $(RUNTIME) $(gacutil) /u $(LIBRARY_NAME:.dll=)
$(gacutil):
cd $(topdir)/tools/gacutil && $(MAKE)
endif
maybe-sign-lib:
ifndef NO_SIGN_ASSEMBLY
maybe-sign-lib: $(sn)
$(RUNTIME) $(sn) -q -R $(the_lib) $(topdir)/class/mono.snk
install-local: $(the_lib_signature_stamp)
ifndef LIBRARY_SNK
LIBRARY_SNK = $(topdir)/class/mono.snk
endif
$(the_lib_signature_stamp): $(the_lib) $(sn)
MONO_PATH="$(topdir)/class/lib/$(PROFILE):$$MONO_PATH" $(RUNTIME) $(sn) -q -R $(the_lib) $(LIBRARY_SNK)
echo stamp > $@
endif
$(sn):
@@ -194,7 +207,7 @@ endif
# Fun with dependency tracking
$(the_lib): $(makefrag) $(response)
$(the_lib): $(response)
$(LIBRARY_COMPILE) $(LIBRARY_FLAGS) $(LIB_MCS_FLAGS) /target:library /out:$@ @$(response)
$(makefrag): $(sourcefile)
@@ -214,7 +227,7 @@ endif
ifdef HAVE_CS_TESTS
$(test_lib): $(test_makefrag) $(test_dep) $(test_response) $(test_nunit_dep)
$(test_lib): $(test_dep) $(test_response) $(test_nunit_dep)
$(TEST_COMPILE) /target:library /out:$@ $(test_flags) @$(test_response)
$(test_response): $(test_sourcefile)
@@ -231,7 +244,7 @@ endif
ifdef HAVE_VB_TESTS
$(btest_lib): $(btest_makefrag) $(test_dep) $(btest_response) $(test_nunit_dep)
$(btest_lib): $(test_dep) $(btest_response) $(test_nunit_dep)
$(BTEST_COMPILE) /target:library /out:$@ $(btest_flags) @$(btest_response)
$(btest_response): $(btest_sourcefile)
@@ -245,3 +258,6 @@ $(btest_makefrag): $(btest_response)
-include $(btest_makefrag)
endif
all-local: $(makefrag) $(test_makefrag) $(btest_makefrag)
$(makefrag) $(test_makefrag) $(btest_makefrag): $(topdir)/build/library.make
+1 -1
View File
@@ -9,7 +9,7 @@ PLATFORM_RUNTIME = $(RUNTIME)
PLATFORM_CORLIB = mscorlib.dll
BOOTSTRAP_MCS = mcs
RESGEN = monoresgen
RESGEN = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_RESGEN)
PLATFORM_PATH_SEPARATOR = :
@@ -4,6 +4,27 @@
// What a horrible interface.
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace Accessibility {
public interface IAccessible {
@@ -1,3 +1,24 @@
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
interface IAccessibleHandler {
// Opaque for now.
}
@@ -7,6 +7,27 @@
// (C) 2003 Ximian, Inc. http://www.ximian.com
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Reflection;
using System.Resources;
+8
View File
@@ -1,3 +1,11 @@
2004-06-24 Raja R Harinath <[email protected]>
* IBM.Data.DB2/Makefile: Disable for 'net_2_0'.
2004-06-23 Gonzalo Paniagua Javier <[email protected]>
* Makefile: enabled Mono.CSharp.Debugger on windows.
2004-06-11 Duncan Mak <[email protected]>
* IBM.Data.DB2/IBM.Data.DB2.dll.sources:
@@ -8,6 +8,27 @@
// (C) 2004 Novell (http://www.novell.com)
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Reflection;
using System.Runtime.InteropServices;
@@ -8,6 +8,27 @@
// (C) 2001 - 2003 Ximian, Inc (http://www.ximian.com)
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
internal sealed class Locale {
private Locale ()
@@ -1,3 +1,17 @@
2004-06-25 Atsushi Enomoto <[email protected]>
* RdpContentType.cs, RdpNameClass.cs, RdpObjects.cs, RdpPatterns.cs,
Util.cs : added novell license term.
2004-06-21 Atsushi Enomoto <[email protected]>
* RdpPatterns.cs : Fixed ExpandRef() that caused incorrect nest error.
2004-06-17 Atsushi Enomoto <[email protected]>
* RdpPatterns.cs : Quick workaround for infinite loop happening in
some kind of recursive expansion.
2004-03-12 Atsushi Enomoto <[email protected]>
* RdpPatterns.cs : Fixed TextDeriv() to allow whitespace text nodes
@@ -4,10 +4,32 @@
// Author:
// Atsushi Enomoto <[email protected]>
//
// (C)2004 Novell Inc.
//
// See RELAX NG spec 7.2
//
// Copyright (c) 2004 Novell Inc.
// All rights reserved
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace Commons.Xml.Relaxng.Derivative
{
@@ -6,6 +6,30 @@
//
// 2003 Atsushi Enomoto "No rights reserved."
//
// Copyright (c) 2004 Novell Inc.
// All rights reserved
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Xml;
@@ -6,6 +6,30 @@
//
// 2003 Atsushi Enomoto "No rights reserved."
//
// Copyright (c) 2004 Novell Inc.
// All rights reserved
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Collections;
@@ -6,6 +6,30 @@
//
// 2003 Atsushi Enomoto "No rights reserved."
//
// Copyright (c) 2004 Novell Inc.
// All rights reserved
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Collections;
@@ -1383,11 +1407,17 @@ namespace Commons.Xml.Relaxng.Derivative
bool isExpanded;
short expanding; // FIXME: It is totally not required, but there is
// some bugs in simplification and without it it causes infinite loop.
internal override RdpPattern ExpandRef (Hashtable defs)
{
if (!isExpanded) {
isExpanded = true;
if (expanding == 100)
throw new RelaxngException (String.Format ("Invalid recursion was found. Name is {0}", nameClass));
expanding++;
children = children.ExpandRef (defs);
expanding--;
}
return this;
}
@@ -6,6 +6,30 @@
//
// 2003 Atsushi Enomoto "No rights reserved."
//
// Copyright (c) 2004 Novell Inc.
// All rights reserved
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Collections;
@@ -1,3 +1,7 @@
2004-06-25 Atsushi Enomoto <[email protected]>
* RncParser.jay : added MIT license.
2004-06-07 Atsushi Enomoto <[email protected]>
* RncParser.jay : removed unused code. Fixed LookupNamespace() to
@@ -6,7 +6,30 @@
// Atsushi Enomoto <[email protected]>
//
// (C)2003 Atsushi Enomoto
// (C)2004 Novell Inc.
//
// Copyright (c) 2004 Novell Inc.
// All rights reserved
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
@@ -7,6 +7,27 @@
// (C)2003 Atsushi Enomoto
// (C)2004 Novell Inc.
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Collections;
@@ -1,3 +1,30 @@
2004-06-25 Atsushi Enomoto <[email protected]>
* Misc.cs, RelaxngDatatype.cs, RelaxngDatatypeProvider.cs,
RelaxngDefaultDatatype.cs, RelaxngException.cs, RelaxngGrammar.cs,
RelaxngMergedProvider.cs, RelaxngNameClass.cs, RelaxngPattern.cs,
RelaxngPatternType.cs, RelaxngReader.cs, RelaxngValidatingReader.cs,
XsdDatatypeProvider.cs : Added/replaced novell license term.
2004-06-21 Atsushi Enomoto <[email protected]>
* Misc.cs,
RelaxngPattern.cs,
RelaxngReader.cs :
Use XmlResolver (or XmlUrlResolver) directly. XmlResolver was
incorrectly _used_ before null check. Don't create XmlResolver
instance for _every_ pattern object.
* RelaxngPattern.cs : UnresolvedRef.ExpandRef() should return not
try to find target derivative pattern twice. It was the culprit of
infinite loop. Removed dirty switches.
* RelaxngGrammar.cs : code cleanup.
2004-06-17 Atsushi Enomoto <[email protected]>
* Misc.cs, RelaxngGrammar.cs, RelaxngPattern.cs, RelaxngReader.cs :
Added XmlResolver property to fix bug #60334.
Check incrrect recursion check that caused possible infinite loop.
2004-05-31 Atsushi Enomoto <[email protected]>
* Misc.cs : made Util class internal.
@@ -6,6 +6,30 @@
//
// 2003 Atsushi Enomoto "No rights reserved."
//
// Copyright (c) 2004 Novell Inc.
// All rights reserved
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Collections;
using System.IO;
@@ -16,42 +40,18 @@ namespace Commons.Xml.Relaxng
{
internal class Util
{
public static string ResolveUri (string baseUri, string href)
/*
public static string ResolveUri (string baseUri, string href, XmlResolver resolver)
{
#if true
Uri uri = null;
if (baseUri != null && baseUri.Length > 0)
uri = new Uri (baseUri);
Uri result = new XmlUrlResolver ().ResolveUri (uri, href);
Uri result = resolver.ResolveUri (uri, href);
if (result.Query.Length > 0 || result.Fragment.Length > 0)
throw new RelaxngException ("Invalid URI format: " + href);
return result.ToString ();
#else
// If baseUri does not exist, then it is only the way.
if (baseUri == String.Empty)
return href;
// If href itself is a uri, then return it directly.
try {
return new Uri (href).ToString ();
} catch (UriFormatException) {
}
// If baseUri is a valid uri, then make relative uri.
try {
return new Uri (
new Uri (baseUri), href).ToString ();
} catch (UriFormatException) {
}
// Otherwise, they might be filesystem path.
if (Path.IsPathRooted (href))
return href;
return Path.Combine (
Path.GetDirectoryName (baseUri), href);
#endif
}
*/
public static string NormalizeWhitespace (string s)
{
@@ -4,8 +4,30 @@
// Author:
// Atsushi Enomoto <[email protected]>
//
// (C)2004 Novell Inc.
// Copyright (c) 2004 Novell Inc.
// All rights reserved
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Xml;
@@ -4,8 +4,30 @@
// Author:
// Atsushi Enomoto <[email protected]>
//
// (C)2004 Novell Inc.
// Copyright (c) 2004 Novell Inc.
// All rights reserved
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Xml;
@@ -4,8 +4,30 @@
// Author:
// Atsushi Enomoto <[email protected]>
//
// (C)2004 Novell Inc.
// Copyright (c) 2004 Novell Inc.
// All rights reserved
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Xml;
@@ -6,6 +6,30 @@
//
// 2003 Atsushi Enomoto "No rights reserved."
//
// Copyright (c) 2004 Novell Inc.
// All rights reserved
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Collections;
using System.IO;
@@ -6,7 +6,30 @@
//
// 2003 Atsushi Enomoto "No rights reserved."
//
// Copyright (c) 2004 Novell Inc.
// All rights reserved
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Collections;
using System.IO;
@@ -41,7 +64,6 @@ namespace Commons.Xml.Relaxng
Hashtable includedUris = new Hashtable ();
RelaxngGrammar parentGrammar;
ArrayList includedGrammars;
Hashtable refPatterns = new Hashtable (); // key = RdpPattern of assembledDefs
// only for checkRecursion()
@@ -176,13 +198,7 @@ namespace Commons.Xml.Relaxng
// here we collected element-replaced definitions
foreach (DictionaryEntry entry in elementReplacedDefs)
assembledDefs.Add (entry.Key, entry.Value);
#if REPLACE_IN_ADVANCE
// Well, actual expandRef should be done after checking constraints
// 4.19 (c) expandRef
startPattern = compiledStart.ExpandRef (assembledDefs);
#else
startPattern = compiledStart;
#endif
// 4.20,21 reduce notAllowed and empty.
bool b;
do {
@@ -207,10 +223,8 @@ namespace Commons.Xml.Relaxng
// TODO: 7.3
#if !REPLACE_IN_ADVANCE
// 4.19 (c) expandRef - actual replacement
startPattern = compiledStart.ExpandRef (assembledDefs);
#endif
// return its start pattern.
IsCompiled = true;
@@ -220,10 +234,8 @@ namespace Commons.Xml.Relaxng
private void CheckStartPatternContent (RdpPattern p)
{
switch (p.PatternType) {
#if !REPLACE_IN_ADVANCE
case RelaxngPatternType.Ref:
CheckStartPatternContent (((RdpUnresolvedRef) p).RefPattern);
#endif
break;
case RelaxngPatternType.Element:
break;
@@ -277,8 +289,8 @@ namespace Commons.Xml.Relaxng
checkRecursionDepth = (int) checkedDepth;
// get refPattern
RdpUnresolvedRef pref = p as RdpUnresolvedRef;
RelaxngGrammar target = pref.TargetGrammar;//pref.IsParentRef ? parentGrammar : this;
RdpPattern refPattern = pref.RefPattern;//target.assembledDefs [pref.Name] as RdpPattern;
RelaxngGrammar target = pref.TargetGrammar;
RdpPattern refPattern = pref.RefPattern;
if (refPattern == null)
throw new RelaxngException ("No matching define found for " + pref.Name);
@@ -315,21 +327,15 @@ namespace Commons.Xml.Relaxng
private void CollectGrammars ()
{
// collect ref and parentRef for each define.
includedGrammars = (parentGrammar != null) ?
parentGrammar.includedGrammars : new ArrayList ();
// FIXME: This should be assembledStart.
CheckReferences (compiledStart);
FixupReference ();
this.unresolvedPatterns.Clear ();
// Hashtable ht = assembledDefs.Clone () as Hashtable;
// foreach (string name in ht.Keys) {
foreach (string name in assembledDefs.Keys) {
RdpPattern p = (RdpPattern) assembledDefs [name];
CheckReferences (p);
FixupReference ();
this.unresolvedPatterns.Clear ();
}
// If it is child of any other pattern:
@@ -344,15 +350,22 @@ namespace Commons.Xml.Relaxng
if (al == null)
continue; // Not referenced.
if (parentGrammar.assembledDefs [name] == null)
parentGrammar.assembledDefs [name] =
this.assembledDefs [name];
else
replaceDefines (name, al);
// At this point, parent grammar doesn't
// collect assembledDefs as yet
string uname = GetUniqueName (name, parentGrammar);
parentGrammar.assembledDefs [uname] = assembledDefs [name];
}
}
}
private static string GetUniqueName (string name, RelaxngGrammar grammar)
{
foreach (RelaxngDefine def in grammar.Defines)
if (def.Name == name)
return GetUniqueName (name + '_', grammar);
return name;
}
private void FixupReference ()
{
foreach (RdpUnresolvedRef pref in this.unresolvedPatterns) {
@@ -366,6 +379,7 @@ namespace Commons.Xml.Relaxng
}
al.Add (pref);
}
this.unresolvedPatterns.Clear ();
}
private void replaceDefines (string name, ArrayList al)
@@ -4,8 +4,30 @@
// Author:
// Atsushi Enomoto <[email protected]>
//
// (C)2004 Novell Inc.
// Copyright (c) 2004 Novell Inc.
// All rights reserved
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Collections;
using Commons.Xml.Relaxng.XmlSchema;
@@ -6,6 +6,30 @@
//
// 2003 Atsushi Enomoto "No rights reserved."
//
// Copyright (c) 2004 Novell Inc.
// All rights reserved
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Collections;
@@ -6,6 +6,30 @@
//
// 2003 Atsushi Enomoto "No rights reserved."
//
// Copyright (c) 2004 Novell Inc.
// All rights reserved
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Collections;
@@ -267,10 +291,13 @@ namespace Commons.Xml.Relaxng
{
grammar.CheckIncludeRecursion (Href);
grammar.IncludedUris.Add (Href, Href);
string url = Util.ResolveUri (BaseUri, href);
XmlTextReader xtr = new XmlTextReader (url);
if (grammar.Resolver == null)
throw new RelaxngException ("To compile 'include' element, XmlResolver is required.");
Uri uri = grammar.Resolver.ResolveUri (BaseUri != String.Empty ? new Uri (BaseUri) : null, Href);
XmlTextReader xtr = null;
RelaxngGrammar g = null;
try {
xtr = new XmlTextReader (uri.AbsoluteUri, (Stream) grammar.Resolver.GetEntity (uri, null, typeof (Stream)));
RelaxngReader r = new RelaxngReader (xtr, ns);
r.MoveToContent ();
g = r.ReadPattern () as RelaxngGrammar;
@@ -408,8 +435,17 @@ namespace Commons.Xml.Relaxng
// Private Fields
RdpPattern startRelaxngPattern;
RelaxngDatatypeProvider provider;
XmlResolver resolver;
bool nullResolver;
// Public
public XmlResolver XmlResolver {
set {
nullResolver = value == null;
resolver = value;
}
}
public abstract RelaxngPatternType PatternType { get; }
public RelaxngDatatypeProvider DataProvider {
get {
@@ -427,6 +463,7 @@ namespace Commons.Xml.Relaxng
g = (RelaxngGrammar) this;
else {
g = new RelaxngGrammar ();
g.XmlResolver = this.Resolver;
g.BaseUri = this.BaseUri;
g.LineNumber = this.LineNumber;
g.LinePosition = this.LinePosition;
@@ -444,6 +481,16 @@ namespace Commons.Xml.Relaxng
// Internal
internal XmlResolver Resolver {
get {
if (nullResolver)
return null;
if (resolver == null)
resolver = new XmlUrlResolver ();
return resolver;
}
}
internal abstract void CheckConstraints ();
protected RelaxngPattern ()
@@ -917,11 +964,7 @@ namespace Commons.Xml.Relaxng
}
public override RdpContentType ContentType {
#if REPLACE_IN_ADVANCE
get { throw new InvalidOperationException (); }
#else
get { return RdpContentType.Empty; }
#endif
}
@@ -933,10 +976,7 @@ namespace Commons.Xml.Relaxng
internal override RdpPattern ExpandRef (Hashtable defs)
{
RdpPattern target = (RdpPattern) defs [this.name];
if (target == null)
throw new RelaxngException ("Target definition " + name + " not found.");
return target.ExpandRef (defs);
return referencedPattern.ExpandRef (defs);
}
internal override void MarkReachableDefs ()
@@ -1063,17 +1103,27 @@ namespace Commons.Xml.Relaxng
{
grammar.CheckIncludeRecursion (Href);
grammar.IncludedUris.Add (Href, Href);
string uri = Util.ResolveUri (this.BaseUri, href);
RelaxngReader r = new RelaxngReader (new XmlTextReader (uri), ns);
r.MoveToContent ();
RelaxngPattern p = r.ReadPattern ();
p.DataProvider = grammar.Provider;
if (grammar.Resolver == null)
throw new RelaxngException ("To compile 'include' element, XmlResolver is required.");
Uri uri = grammar.Resolver.ResolveUri (BaseUri != String.Empty ? new Uri (BaseUri) : null, Href);
XmlTextReader xtr = null;
try {
xtr = new XmlTextReader (uri.AbsoluteUri, (Stream) grammar.Resolver.GetEntity (uri, null, typeof (Stream)));
RelaxngReader r = new RelaxngReader (xtr, ns);
r.MoveToContent ();
RelaxngPattern p = r.ReadPattern ();
p.DataProvider = grammar.Provider;
RdpPattern ret = p.Compile (grammar);
RdpPattern ret = p.Compile (grammar);
grammar.IncludedUris.Remove (Href);
grammar.IncludedUris.Remove (Href);
return ret;
} finally {
if (xtr != null)
xtr.Close ();
}
return ret;
}
internal override void CheckConstraints ()
@@ -6,6 +6,30 @@
//
// 2003 Atsushi Enomoto "No rights reserved."
//
// Copyright (c) 2004 Novell Inc.
// All rights reserved
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Collections;
using System.Collections.Specialized;
@@ -6,6 +6,30 @@
//
// 2003 Atsushi Enomoto "No rights reserved."
//
// Copyright (c) 2004 Novell Inc.
// All rights reserved
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Collections;
@@ -33,6 +57,7 @@ namespace Commons.Xml.Relaxng
// fields
Stack nsStack = new Stack ();
Stack datatypeLibraryStack = new Stack ();
XmlResolver resolver = new XmlUrlResolver ();
// ctor
public RelaxngReader (XmlReader reader)
@@ -52,6 +77,14 @@ namespace Commons.Xml.Relaxng
MoveToContent ();
}
public XmlResolver XmlResolver {
set { resolver = value; }
}
internal XmlResolver Resolver {
get { return resolver; }
}
private void FillLocation (RelaxngElementBase el)
{
el.BaseUri = BaseURI;
@@ -432,7 +465,8 @@ namespace Commons.Xml.Relaxng
string href = GetSpaceStrippedAttribute ("href");
if (href == null)
throw new RelaxngException ("Required attribute href was not found.");
i.Href = Util.ResolveUri (BaseURI, href);
XmlResolver res = resolver != null ? resolver : new XmlUrlResolver ();
i.Href = res.ResolveUri (BaseURI != null ? new Uri (BaseURI) : null, href).AbsoluteUri;
if (!IsEmptyElement) {
Read ();
this.readGrammarIncludeContent (i.Starts, i.Defines, i.Divs, null);
@@ -631,7 +665,8 @@ namespace Commons.Xml.Relaxng
string href = GetSpaceStrippedAttribute ("href");
if (href == null)
throw new RelaxngException ("Required attribute href was not found.");
r.Href = Util.ResolveUri (BaseURI, href);
XmlResolver res = resolver != null ? resolver : new XmlUrlResolver ();
r.Href = res.ResolveUri (BaseURI != null ? new Uri (BaseURI) : null, href).AbsoluteUri;
r.NSContext = ContextNamespace;
if (!IsEmptyElement) {
Read ();
@@ -4,8 +4,32 @@
// Author:
// Atsushi Enomoto <[email protected]>
//
// (C)2003 Atsushi Enomoto. "Some rights reserved."
// 2003 Atsushi Enomoto. "No rights reserved."
//
// Copyright (c) 2004 Novell Inc.
// All rights reserved
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Collections;
using System.Xml;
@@ -4,8 +4,30 @@
// Author:
// Atsushi Enomoto <[email protected]>
//
// (C)2004 Novell Inc.
// Copyright (c) 2004 Novell Inc.
// All rights reserved
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Collections;
using System.Text;
@@ -1,3 +1,11 @@
2004-06-25 Atsushi Enomoto <[email protected]>
* XmlDefaultReader.cs : Added novell's license (avoid confusion).
2004-06-17 Atsushi Enomoto <[email protected]>
* XmlDefaultReader.cs : don't catch the exception.
2004-02-25 Atsushi Enomoto <[email protected]>
* XmlDefaultReader.cs : Added support for IXmlLineInfo.
@@ -6,6 +6,28 @@
//
// 2003 Atsushi Enomoto "No rights reserved."
//
// Copyright (c) 2004 Novell Inc.
// All rights reserved
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
//
// Similar to SAX DefaultHandler
@@ -186,11 +208,7 @@ namespace Commons.Xml
public override bool Read ()
{
try {
return Reader.Read ();
} catch (Exception ex) {
throw ex;
}
return Reader.Read ();
}
public override string ReadString ()
@@ -1,3 +1,8 @@
2004-06-17 Atsushi Enomoto <[email protected]>
* relaxngtest.cs : Now we can test all cases (though resulting in
failure). Catch unexpected exception and report them as such.
2004-05-31 Atsushi Enomoto <[email protected]>
* anglia-test-runner.cs : Added support for RELAX NG compact syntax
@@ -20,6 +20,7 @@ Console.WriteLine ("Finished: " + DateTime.Now.ToString ("yyyy-MM-dd HH:mm:ss.ff
foreach (DirectoryInfo di in
new DirectoryInfo (@"relax-ng").GetDirectories ()) {
/*
if (di.Name == "056") // baseURI
continue;
if (di.Name == "102") // invalid URI fragment
@@ -28,6 +29,7 @@ if (di.Name == "208") // infinite loop!!
continue;
if (di.Name == "210") // infinite loop!!
continue;
*/
XmlTextReader xtr = null;
FileInfo fi = new FileInfo (di.FullName + "/i.rng");
@@ -40,9 +42,9 @@ if (di.Name == "210") // infinite loop!!
} catch (RelaxngException ex) {
} catch (XmlException ex) {
} catch (ArgumentNullException ex) {
// } catch (UriFormatException ex) {
// } catch (Exception ex) {
// Console.WriteLine ("Unexpected error type : " + di.Name + " : " + ex.Message);
} catch (UriFormatException ex) {
} catch (Exception ex) {
Console.WriteLine ("Unexpected error type : " + di.Name + " : " + ex.Message);
} finally {
xtr.Close ();
}
@@ -55,9 +57,9 @@ if (di.Name == "210") // infinite loop!!
try {
p = RelaxngPattern.Read (xtr);
p.Compile ();
// } catch (Exception ex) {
// Console.WriteLine ("Invalidated grammar: " + di.Name + " : " + ex.Message);
// continue;
} catch (Exception ex) {
Console.WriteLine ("Invalidated grammar: " + di.Name + " : " + ex.Message);
continue;
} finally {
xtr.Close ();
}
@@ -7,6 +7,27 @@
// (C) 2003 Ximian, Inc. http://www.ximian.com
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Reflection;
using System.Runtime.InteropServices;
+21
View File
@@ -8,6 +8,27 @@
// (C) 2001 - 2003 Ximian, Inc (http://www.ximian.com)
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
internal sealed class Locale {
private Locale ()
@@ -6,6 +6,27 @@
// (C) 2002 Jackson Harper, All rights reserved.
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.IO;
using System.Text;
@@ -6,6 +6,27 @@
// (C) 2002 Jackson Harper, All rights reserved.
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Text;
@@ -6,6 +6,27 @@
// (C) 2002 Jackson Harper, All rights reserved.
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace Microsoft.CSharp {
public enum ErrorLevel {
@@ -6,6 +6,27 @@
//
// (C) Ximian, Inc. http://www.ximian.com
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Microsoft.CSharp {
@@ -7,6 +7,27 @@
// (C) 2003 Ximian, Inc. http://www.ximian.com
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Reflection;
using System.Runtime.InteropServices;
@@ -8,6 +8,27 @@
// (C) 2001 - 2003 Ximian, Inc (http://www.ximian.com)
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
internal sealed class Locale {
private Locale ()
@@ -6,6 +6,27 @@
//
// (C) Ximian, Inc. http://www.ximian.com
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
/// <summary>
@@ -7,6 +7,27 @@
// (C) 2003 Martin Willemoes Hansen
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace System.Runtime.InteropServices.CustomMarshalers
{
public class EnumerableToDispatchMarshaler : ICustomMarshaler {
@@ -7,6 +7,27 @@
// (C) 2003 Martin Willemoes Hansen
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace System.Runtime.InteropServices.CustomMarshalers
{
public class EnumeratorToEnumVariantMarshaler : ICustomMarshaler {
@@ -7,6 +7,27 @@
// (C) 2003 Martin Willemoes Hansen
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace System.Runtime.InteropServices.CustomMarshalers
{
public class ExpandoToDispatchExMarshaler : ICustomMarshaler {
@@ -7,6 +7,27 @@
// (C) 2003 Martin Willemoes Hansen
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace System.Runtime.InteropServices.CustomMarshalers
{
public class TypeToTypeInfoMarshaler : ICustomMarshaler {
+2
View File
@@ -122,6 +122,8 @@ public class Manager
e = Instantiate (alias) as Encoding;
}
}
if (e == null)
return null;
// e.g. Neither euc_jp nor shift-jis not allowed (Normalize() badness)
if (orgName.IndexOf ('_') > 0 && e.WebName.IndexOf ('-') > 0)
@@ -1,3 +1,24 @@
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System.Reflection;
using System.Runtime.CompilerServices;
@@ -1,18 +1,20 @@
./Assembly/AssemblyInfo.cs
./IBM.Data.DB2/DB2CLIWrapper.cs
./IBM.Data.DB2/DB2ClientUtils.cs
./IBM.Data.DB2/DB2OpenConnection.cs
./IBM.Data.DB2/DB2CLIWrapper.cs
./IBM.Data.DB2/DB2Command.cs
./IBM.Data.DB2/DB2CommandBuilder.cs
./IBM.Data.DB2/DB2OpenConnection.cs
./IBM.Data.DB2/DB2Connection.cs
./IBM.Data.DB2/DB2ConnectionPool.cs
./IBM.Data.DB2/DB2ConnectionSettings.cs
./IBM.Data.DB2/DB2Constants.cs
./IBM.Data.DB2/DB2DataAdapter.cs
./IBM.Data.DB2/DB2DataReader.cs
./IBM.Data.DB2/DB2Environment.cs
./IBM.Data.DB2/DB2Error.cs
./IBM.Data.DB2/DB2ErrorCollection.cs
./IBM.Data.DB2/DB2Exception.cs
./IBM.Data.DB2/DB2InfoMessageEventArgs.cs
./IBM.Data.DB2/DB2InfoMessageEventHandler.cs
./IBM.Data.DB2/DB2Parameter.cs
./IBM.Data.DB2/DB2ParameterCollection.cs
./IBM.Data.DB2/DB2RowUpdatedEventArgs.cs
@@ -1,3 +1,24 @@
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Data;
using System.Runtime.InteropServices;
@@ -9,6 +30,134 @@ namespace IBM.Data.DB2
/// DB2Prototypes class is a wrapper for the DB2.lib, IBM's Call Level Interface to DB2
/// </summary>
///
#region comented
/*internal class DB2CLIWrapper
{
#if (OS_LINUX)
private const string libname = "db2_36";
#endif
#if (OS_WINDOWS)
private const string libname = "db2cli";
#endif
[DllImport("db2cli", EntryPoint = "SQLAllocHandle")]
internal static extern short SQLAllocHandle(short handleType, IntPtr inputHandle, ref IntPtr outputHandle);
[DllImport("db2cli", EntryPoint = "SQLFreeHandle")]
internal static extern short SQLFreeHandle(short handleType, IntPtr inputHandle);
[DllImport("db2cli", EntryPoint = "SQLGetConnectAttrW")]
internal static extern short SQLGetConnectAttr(IntPtr ConnectionHandle, int Attribute, [Out] IntPtr ValuePtr, int BufferLength, out int StringLengthPtr);
[DllImport("db2cli", EntryPoint = "SQLGetConnectAttrW")]
internal static extern short SQLGetConnectAttr(IntPtr ConnectionHandle, int Attribute, out int Value, int BufferLength, IntPtr Zero);
[DllImport("db2cli", EntryPoint = "SQLFreeStmt")]
internal static extern short SQLFreeStmt(IntPtr StatementHandle, short option);
[DllImport("db2cli", EntryPoint = "SQLConnect")]
internal static extern short SQLConnect(IntPtr sqlHdbc, string serverName, short serverNameLength, string userName, short userNameLength, string authentication, short authenticationLength);
[DllImport("db2cli", EntryPoint = "SQLColAttribute")]
internal static extern short SQLColAttribute(IntPtr StatementHandle, short ColumnNumber, short FieldIdentifier, IntPtr CharacterAttribute, short BufferLength, ref short StringLength, ref int NumericAttribute);
//[DllImport("db2cli", EntryPoint = "SQLGetData")]
// internal static extern short SQLGetData(IntPtr StatementHandle, short ColumnNumber, short TargetType, IntPtr TargetPtr, IntPtr BufferLength, ref IntPtr StrLen_or_Ind);
[DllImport("db2cli", EntryPoint="SQLMoreResults")]
internal static extern short SQLMoreResults(IntPtr StatementHandle);
//[DllImport("db2cli", EntryPoint = "SQLGetData")]
//internal static extern short SQLGetData(IntPtr StatementHandle, short ColumnNumber, short TargetType, IntPtr TargetPtr, IntPtr BufferLength, out int StrLen_or_Ind);
[DllImport("db2cli", EntryPoint = "SQLGetData")]
internal static extern short SQLGetData(IntPtr StatementHandle, short ColumnNumber, short TargetType, IntPtr TargetPtr, int BufferLength, out int StrLen_or_Ind);
//[DllImport("db2cli", EntryPoint = "SQLGetData")]
//internal static extern short SQLGetData(IntPtr StatementHandle, short ColumnNumber, short TargetType, byte[] TargetPtr, IntPtr BufferLength, ref IntPtr StrLen_or_Ind);
[DllImport("db2cli", EntryPoint = "SQLGetData")]
internal static extern short SQLGetData(IntPtr StatementHandle, short ColumnNumber, short TargetType, byte[] TargetPtr, int BufferLength, out int StrLen_or_Ind);
[DllImport("db2cli", EntryPoint = "SQLGetData")]
internal static extern short SQLGetData(IntPtr StatementHandle, short ColumnNumber, short TargetType, [Out] StringBuilder sb, int BufferLength, out int StrLen_or_Ind);
[DllImport("db2cli", EntryPoint = "SQLColAttributeW")]
internal static extern short SQLColAttribute(IntPtr StatementHandle, short ColumnNumber, short FieldIdentifier, [Out] StringBuilder CharacterAttribute, short BufferLength, out short StringLength, out int NumericAttribute);
[DllImport("db2cli", CharSet = CharSet.Auto, EntryPoint = "SQLDisconnect")]
internal static extern short SQLDisconnect(IntPtr sqlHdbc);
[DllImport("db2cli", EntryPoint = "SQLGetDiagRec")]
internal static extern short SQLGetDiagRec( short handleType, IntPtr handle, short recNum, [Out] StringBuilder sqlState, ref IntPtr nativeErrorPtr, [Out] StringBuilder errorMessage, short bufferLength, ref IntPtr shortTextLengthPtr);
[DllImport("db2cli", EntryPoint = "SQLSetConnectAttr")]
internal static extern short SQLSetConnectAttr(IntPtr sqlHdbc, long sqlAttr, [In] IntPtr sqlValuePtr, long sqlValueLength);
[DllImport("db2cli", EntryPoint = "SQLSetStmtAttr")]
internal static extern short SQLSetStmtAttr(IntPtr sqlHstmt, long sqlAttr, [In] IntPtr sqlValuePtr, long sqlValueLength);
[DllImport("db2cli", EntryPoint = "SQLEndTran")]
internal static extern short SQLEndTran (short handleType, IntPtr handle, short fType);
[DllImport("db2cli", EntryPoint = "SQLCancel")]
internal static extern short SQLCancel(IntPtr handle);
[DllImport("db2cli", EntryPoint = "SQLNumResultCols")]
internal static extern short SQLNumResultCols(IntPtr handle, ref int numCols);
[DllImport("db2cli", EntryPoint = "SQLFetch")]
internal static extern short SQLFetch(IntPtr handle);
[DllImport("db2cli", EntryPoint = "SQLRowCount")]
internal static extern short SQLRowCount(IntPtr stmtHandle, ref int numRows);
[DllImport("db2cli", EntryPoint = "SQLExecute")]
internal static extern short SQLExecute(IntPtr handle);
[DllImport ("db2cli", EntryPoint = "SQLExecDirect")]
internal static extern short SQLExecDirect(IntPtr stmtHandle, string stmt, int length);
[DllImport("db2cli", EntryPoint = "SQLDescribeCol")]
internal static extern short SQLDescribeCol(IntPtr stmtHandle, ushort colNum, StringBuilder colName, short colNameMaxLength, IntPtr colNameLength, ref IntPtr dataType, ref IntPtr colSizePtr, ref IntPtr scalePtr, ref IntPtr nullablePtr );
[DllImport("db2cli", EntryPoint = "SQLBindCol")]
internal static extern short SQLBindCol(IntPtr StatementHandle, short ColumnNumber, short TargetType, IntPtr TargetValue, IntPtr BufferLength, ref IntPtr StrLen_or_Ind);
[DllImport("db2cli", EntryPoint = "SQLDriverConnect")]
internal static extern short SQLDriverConnect(IntPtr hdbc, int centered, [In] string inConnectStr, [In] int inStrLength, [Out] StringBuilder outConnectStr, [Out] int outStrCapacity, [Out] IntPtr outStrLengthReturned, [In] int completion);
[DllImport("db2cli", EntryPoint = "SQLPrepare")]
internal static extern short SQLPrepare(IntPtr stmtHandle, string stmt, int length);
[DllImport("db2cli", EntryPoint = "SQLDescribeParam")]
internal static extern short SQLDescribeParam(IntPtr stmtHandle, short paramNumber,ref IntPtr dataType, ref IntPtr paramSize, ref IntPtr decimalDigits, ref IntPtr nullable);
[DllImport("db2cli", EntryPoint = "SQLNumParams")]
internal static extern short SQLNumParams(IntPtr stmtHandle, ref IntPtr numParams);
[DllImport("db2cli")]
internal static extern short SQLBindParameter(IntPtr stmtHandle, ushort paramNumber,
short dataType, short valueType, short paramType, uint colSize, short decDigits,
IntPtr dataBufferPtr, int dataBufferLength, IntPtr StrLen_or_IndPtr);
[DllImport("db2cli")]
internal static extern short SQLBindParameter(IntPtr stmtHandle, ushort paramNumber,
short dataType, short valueType, short paramType, uint colSize, short decDigits,
byte[] dataBufferPtr, int dataBufferLength, IntPtr StrLen_or_IndPtr);
[DllImport("db2cli", EntryPoint = "SQLBindParameter")]
internal static extern short SQLBindParameter(IntPtr stmtHandle, ushort paramNumber,
short dataType, short valueType, short paramType, uint colSize, short decDigits,
ref int dataBufferPtr, int dataBufferLength, IntPtr StrLen_or_IndPtr);
[DllImport("db2cli", EntryPoint = "SQLBindParameter")]
internal static extern short SQLBindParameter(IntPtr stmtHandle, ushort paramNumber,
short dataType, short valueType, short paramType, uint colSize, short decDigits,
ref double dataBufferPtr, int dataBufferLength, IntPtr StrLen_or_IndPtr);
[DllImport("db2cli", EntryPoint = "SQLDescribeParam")]
internal static extern short SQLDescribeParam(IntPtr stmtHandle, short ParameterNumber, IntPtr DataTypePtr, IntPtr ParameterSizePtr, IntPtr DecimalDigitsPtr, IntPtr NullablePtr);
[DllImport("db2cli", EntryPoint = "SQLGetLength")]
internal static extern short SQLGetLength( IntPtr stmtHandle, short locatorCType, int Locator,
IntPtr stringLength, IntPtr indicatorValue);
[DllImport("db2cli", EntryPoint = "SQLGetPosition")]
internal static extern short SQLGetPosition(IntPtr stmtHandle, short locatorCType, int sourceLocator, int searchLocator,
string searchLiteral, int searchLiteralLength, uint fromPosition, IntPtr locatedAt, IntPtr indicatorValue);
[DllImport("db2cli", EntryPoint = "SQLGetPosition")]
internal static extern short SQLBindFileToCol (IntPtr stmtHandle, ushort colNum, string fileName, IntPtr fileNameLength,
IntPtr fileOptions, short maxFileNameLength, IntPtr stringLength, IntPtr indicatorValue);
[DllImport("db2cli", EntryPoint = "SQLGetPosition")]
internal static extern short SQLBindFileToParam (IntPtr stmtHandle, ushort targetType, short dataType, string fileName,
IntPtr fileNameLength, short maxFileNameLength, IntPtr indicatorValue);
}*/
#endregion
internal class DB2CLIWrapper
{
@@ -16,16 +165,14 @@ namespace IBM.Data.DB2
static public short Initialize(ref IntPtr pEnvHandle)
{
useLibCli = false;
try
{
return DB2CLIWrapper.SQLAllocHandle(DB2Constants.SQL_HANDLE_ENV, IntPtr.Zero, out pEnvHandle);
string OSVersion = Environment.OSVersion.ToString();
useLibCli = true;
if(OSVersion.Substring(0,4)=="Unix"){
useLibCli = false;
}
catch {}
useLibCli = false;
return DB2CLIWrapper.SQLAllocHandle(DB2Constants.SQL_HANDLE_ENV, IntPtr.Zero, out pEnvHandle);
return DB2CLIWrapper.SQLAllocHandle(DB2Constants.SQL_HANDLE_ENV, IntPtr.Zero, out pEnvHandle);
}
static public short SQLAllocHandle(short handleType, IntPtr inputHandle, out IntPtr outputHandle)
{
if(useLibCli)
@@ -122,6 +269,15 @@ namespace IBM.Data.DB2
return StaticWrapperCli.SQLSetStmtAttr(sqlHdbc, sqlAttr, sqlValuePtr, sqlValueLength);
return StaticWrapper36.SQLSetStmtAttr(sqlHdbc, sqlAttr, sqlValuePtr, sqlValueLength);
}
//for bulk operations
static public short SQLSetStmtAttr(IntPtr sqlHdbc, int sqlAttr, ushort[] sqlValuePtr, int sqlValueLength)
{
if(useLibCli)
return StaticWrapperCli.SQLSetStmtAttr(sqlHdbc, sqlAttr, sqlValuePtr, sqlValueLength);
return StaticWrapper36.SQLSetStmtAttr(sqlHdbc, sqlAttr, sqlValuePtr, sqlValueLength);
}
static public short SQLEndTran (short handleType, IntPtr handle, short fType)
{
if(useLibCli)
@@ -182,6 +338,13 @@ namespace IBM.Data.DB2
return StaticWrapperCli.SQLBindParameter(stmtHandle, paramNumber, dataType, valueType, paramType, colSize, decDigits, dataBufferPtr, dataBufferLength, StrLen_or_IndPtr);
return StaticWrapper36.SQLBindParameter(stmtHandle, paramNumber, dataType, valueType, paramType, colSize, decDigits, dataBufferPtr, dataBufferLength, StrLen_or_IndPtr);
}
static public short SQLBindParameter(IntPtr stmtHandle, short paramNumber, short dataType, short valueType, short paramType, int colSize, short decDigits, int[] dataBufferPtr, int dataBufferLength, IntPtr StrLen_or_IndPtr)
{
if(useLibCli)
return StaticWrapperCli.SQLBindParameter(stmtHandle, paramNumber, dataType, valueType, paramType, colSize, decDigits, dataBufferPtr, dataBufferLength, StrLen_or_IndPtr);
return StaticWrapper36.SQLBindParameter(stmtHandle, paramNumber, dataType, valueType, paramType, colSize, decDigits, dataBufferPtr, dataBufferLength, StrLen_or_IndPtr);
}
public static short SQLGetInfo(IntPtr sqlHdbc, short fInfoType, [Out] StringBuilder rgbInfoValue, short cbInfoValueMax, out short pcbInfoValue)
{
if(useLibCli)
@@ -238,8 +401,14 @@ namespace IBM.Data.DB2
[DllImport(libname, EntryPoint = "SQLSetConnectAttr")]
public static extern short SQLSetConnectAttr(IntPtr sqlHdbc, int sqlAttr, [In] IntPtr sqlValuePtr, int sqlValueLength);
[DllImport(libname, EntryPoint = "SQLSetStmtAttr")]
public static extern short SQLSetStmtAttr(IntPtr sqlHdbc, int sqlAttr, [In] IntPtr sqlValuePtr, int sqlValueLength);
//For bulk operations
[DllImport(libname, EntryPoint = "SQLSetStmtAttr")]
public static extern short SQLSetStmtAttr(IntPtr sqlHdbc, int sqlAttr, ushort[] sqlValuePtr, int sqlValueLength);
[DllImport(libname, EntryPoint = "SQLEndTran")]
public static extern short SQLEndTran (short handleType, IntPtr handle, short fType);
[DllImport(libname, EntryPoint = "SQLCancel")]
@@ -262,6 +431,12 @@ namespace IBM.Data.DB2
public static extern short SQLBindParameter(IntPtr stmtHandle, short paramNumber,
short dataType, short valueType, short paramType, int colSize, short decDigits,
IntPtr dataBufferPtr, int dataBufferLength, IntPtr StrLen_or_IndPtr);
[DllImport(libname)]
public static extern short SQLBindParameter(IntPtr stmtHandle, short paramNumber,
short dataType, short valueType, short paramType, int colSize, short decDigits,
int[] dataBufferPtr, int dataBufferLength, IntPtr StrLen_or_IndPtr);
[DllImport(libname, EntryPoint = "SQLGetInfoW", CharSet=CharSet.Unicode)]
public static extern short SQLGetInfo(IntPtr sqlHdbc, short fInfoType, [Out] StringBuilder rgbInfoValue, short cbInfoValueMax, out short pcbInfoValue);
}
@@ -278,7 +453,7 @@ namespace IBM.Data.DB2
[DllImport(libname, EntryPoint = "SQLFreeStmt")]
public static extern short SQLFreeStmt(IntPtr StatementHandle, short option);
[DllImport(libname, EntryPoint = "SQLConnect")]
[DllImport(libname, EntryPoint = "SQLConnect", CharSet=CharSet.Ansi)]
public static extern short SQLConnect(IntPtr sqlHdbc, string serverName, short serverNameLength, string userName, short userNameLength, string authentication, short authenticationLength);
[DllImport(libname, EntryPoint = "SQLColAttributeW", CharSet=CharSet.Unicode)]
@@ -314,6 +489,11 @@ namespace IBM.Data.DB2
public static extern short SQLSetConnectAttr(IntPtr sqlHdbc, int sqlAttr, [In] IntPtr sqlValuePtr, int sqlValueLength);
[DllImport(libname, EntryPoint = "SQLSetStmtAttr")]
public static extern short SQLSetStmtAttr(IntPtr sqlHdbc, int sqlAttr, [In] IntPtr sqlValuePtr, int sqlValueLength);
//for bulk operations
[DllImport(libname, EntryPoint = "SQLSetStmtAttr")]
public static extern short SQLSetStmtAttr(IntPtr sqlHdbc, int sqlAttr, ushort[] sqlValuePtr, int sqlValueLength);
[DllImport(libname, EntryPoint = "SQLEndTran")]
public static extern short SQLEndTran (short handleType, IntPtr handle, short fType);
[DllImport(libname, EntryPoint = "SQLCancel")]
@@ -336,7 +516,13 @@ namespace IBM.Data.DB2
public static extern short SQLBindParameter(IntPtr stmtHandle, short paramNumber,
short dataType, short valueType, short paramType, int colSize, short decDigits,
IntPtr dataBufferPtr, int dataBufferLength, IntPtr StrLen_or_IndPtr);
[DllImport(libname, EntryPoint = "SQLGetInfo")]
[DllImport(libname)]
public static extern short SQLBindParameter(IntPtr stmtHandle, short paramNumber,
short dataType, short valueType, short paramType, int colSize, short decDigits,
int[] dataBufferPtr, int dataBufferLength, IntPtr StrLen_or_IndPtr);
[DllImport(libname, EntryPoint = "SQLGetInfoW", CharSet=CharSet.Unicode)]
public static extern short SQLGetInfo(IntPtr sqlHdbc, short fInfoType, [Out] StringBuilder rgbInfoValue, short cbInfoValueMax, out short pcbInfoValue);
}
@@ -1,3 +1,24 @@
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace IBM.Data.DB2
+437 -405
View File
@@ -1,3 +1,24 @@
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Data;
using System.Runtime.InteropServices;
@@ -10,20 +31,21 @@ namespace IBM.Data.DB2
{
#region Private data members
private WeakReference refDataReader;
private string commandText;
private CommandType commandType = CommandType.Text;
private DB2Connection db2Conn;
private DB2Transaction db2Trans;
private int commandTimeout = 30;
private bool prepared = false;
private IntPtr hwndStmt = IntPtr.Zero; //Our statement handle
private DB2ParameterCollection parameters = new DB2ParameterCollection();
private bool disposed = false;
private bool statementOpen;
private CommandBehavior previousBehavior;
private UpdateRowSource updatedRowSource = UpdateRowSource.Both;
private IntPtr statementParametersMemory;
private WeakReference refDataReader;
private string commandText;
private CommandType commandType = CommandType.Text;
private DB2Connection db2Conn;
private DB2Transaction db2Trans;
private int commandTimeout = 30;
private bool prepared = false;
private bool binded = false;
private IntPtr hwndStmt = IntPtr.Zero; //Our statement handle
private DB2ParameterCollection parameters = new DB2ParameterCollection();
private bool disposed = false;
private bool statementOpen;
private CommandBehavior previousBehavior;
private UpdateRowSource updatedRowSource = UpdateRowSource.Both;
private IntPtr statementParametersMemory;
private int statementParametersMemorySize;
#endregion
@@ -34,114 +56,113 @@ namespace IBM.Data.DB2
{
hwndStmt = IntPtr.Zero;
}
public DB2Command(string commandStr)
public DB2Command(string commandStr):this()
{
commandText = commandStr;
hwndStmt = IntPtr.Zero;
}
public DB2Command(string commandStr, DB2Connection con) :this()
public DB2Command(string commandStr, DB2Connection con) : this()
{
db2Conn = con;
commandText = commandStr;
if(con != null)
{
con.AddCommand(this);
if(con != null)
{
con.AddCommand(this);
}
}
public DB2Command (string commandStr, DB2Connection con, DB2Transaction trans)
{
commandText = commandStr;
db2Conn = con;
db2Trans = trans;
if(con != null)
{
con.AddCommand(this);
commandText = commandStr;
db2Conn = con;
db2Trans = trans;
if(con != null)
{
con.AddCommand(this);
}
}
#endregion
#region Dispose
public new void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
protected override void Dispose(bool disposing)
{
if(!disposed)
{
if(disposing)
{
ConnectionClosed();
if(db2Conn != null)
{
db2Conn.RemoveCommand(this);
db2Conn = null;
}
}
if(statementParametersMemory != IntPtr.Zero)
{
Marshal.FreeHGlobal(statementParametersMemory);
statementParametersMemory = IntPtr.Zero;
}
}
base.Dispose(disposing);
disposed = true;
}
~DB2Command()
{
Dispose(false);
}
internal void DataReaderClosed()
{
CloseStatementHandle(false);
if((previousBehavior & CommandBehavior.CloseConnection) != 0)
Connection.Close();
refDataReader = null;
}
private void CloseStatementHandle(bool dispose)
{
if(hwndStmt != IntPtr.Zero)
{
if(statementOpen)
{
short sqlRet = DB2CLIWrapper.SQLFreeStmt(hwndStmt, DB2Constants.SQL_CLOSE);
}
if((!prepared && statementOpen) ||
dispose)
{
short sqlRet = DB2CLIWrapper.SQLFreeHandle(DB2Constants.SQL_HANDLE_STMT, hwndStmt);
hwndStmt = IntPtr.Zero;
prepared = false;
}
statementOpen = false;
}
}
internal void ConnectionClosed()
{
DB2DataReader reader = null;
if((refDataReader != null) && refDataReader.IsAlive)
{
reader = (DB2DataReader)refDataReader.Target;
}
if((reader != null) && refDataReader.IsAlive)
{
reader.Dispose();
refDataReader = null;
}
CloseStatementHandle(true);
db2Trans = null;
}
#region Dispose
public new void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
protected override void Dispose(bool disposing)
{
if(!disposed)
{
if(disposing)
{
ConnectionClosed();
if(db2Conn != null)
{
db2Conn.RemoveCommand(this);
db2Conn = null;
}
}
if(statementParametersMemory != IntPtr.Zero)
{
Marshal.FreeHGlobal(statementParametersMemory);
statementParametersMemory = IntPtr.Zero;
}
}
base.Dispose(disposing);
disposed = true;
}
~DB2Command()
{
Dispose(false);
}
internal void DataReaderClosed()
{
CloseStatementHandle(false);
if((previousBehavior & CommandBehavior.CloseConnection) != 0)
Connection.Close();
refDataReader = null;
}
private void CloseStatementHandle(bool dispose)
{
if(hwndStmt != IntPtr.Zero)
{
if(statementOpen)
{
short sqlRet = DB2CLIWrapper.SQLFreeStmt(hwndStmt, DB2Constants.SQL_CLOSE);
}
if((!prepared && statementOpen) ||
dispose)
{
short sqlRet = DB2CLIWrapper.SQLFreeHandle(DB2Constants.SQL_HANDLE_STMT, hwndStmt);
hwndStmt = IntPtr.Zero;
prepared = false;
}
statementOpen = false;
}
}
internal void ConnectionClosed()
{
DB2DataReader reader = null;
if((refDataReader != null) && refDataReader.IsAlive)
{
reader = (DB2DataReader)refDataReader.Target;
}
if((reader != null) && refDataReader.IsAlive)
{
reader.Dispose();
refDataReader = null;
}
CloseStatementHandle(true);
db2Trans = null;
}
#endregion
#region SelfDescribe property
@@ -185,18 +206,18 @@ namespace IBM.Data.DB2
///
/// The Timeout property states how long we wait for results to return
///
public int CommandTimeout
{
get
{
return commandTimeout;
}
set
{
commandTimeout = value;
if(hwndStmt != IntPtr.Zero)
SetStatementTimeout();
}
public int CommandTimeout
{
get
{
return commandTimeout;
}
set
{
commandTimeout = value;
if(hwndStmt != IntPtr.Zero)
SetStatementTimeout();
}
}
#endregion
@@ -231,24 +252,24 @@ namespace IBM.Data.DB2
}
}
public DB2Connection Connection
{
get
{
return db2Conn;
}
set
{
if(db2Conn != null)
{
db2Conn.RemoveCommand(this);
}
db2Conn = value;
if(db2Conn != null)
{
db2Conn.AddCommand(this);
}
}
public DB2Connection Connection
{
get
{
return db2Conn;
}
set
{
if(db2Conn != null)
{
db2Conn.RemoveCommand(this);
}
db2Conn = value;
if(db2Conn != null)
{
db2Conn.AddCommand(this);
}
}
}
#endregion
@@ -288,25 +309,25 @@ namespace IBM.Data.DB2
}
}
public DB2Transaction Transaction
{
get
{
return db2Trans;
}
set
{
db2Trans = value;
}
public DB2Transaction Transaction
{
get
{
return db2Trans;
}
set
{
db2Trans = value;
}
}
#endregion
#region UpdatedRowSource property
public UpdateRowSource UpdatedRowSource
{
get { return updatedRowSource; }
set { updatedRowSource = value; }
public UpdateRowSource UpdatedRowSource
{
get { return updatedRowSource; }
set { updatedRowSource = value; }
}
#endregion
@@ -325,23 +346,23 @@ namespace IBM.Data.DB2
#region AllocateStatement function
internal void AllocateStatement(string location)
{
if (db2Conn.DBHandle.ToInt32() == 0) return;
short sqlRet;
sqlRet = DB2CLIWrapper.SQLAllocHandle(DB2Constants.SQL_HANDLE_STMT, db2Conn.DBHandle, out hwndStmt);
if ((sqlRet != DB2Constants.SQL_SUCCESS) && (sqlRet != DB2Constants.SQL_SUCCESS_WITH_INFO))
throw new DB2Exception(DB2Constants.SQL_HANDLE_DBC, db2Conn.DBHandle, location +": Unable to allocate statement handle.");
parameters.HwndStmt = hwndStmt;
SetStatementTimeout();
internal void AllocateStatement(string location)
{
if (db2Conn.DBHandle.ToInt32() == 0) return;
short sqlRet;
sqlRet = DB2CLIWrapper.SQLAllocHandle(DB2Constants.SQL_HANDLE_STMT, db2Conn.DBHandle, out hwndStmt);
if ((sqlRet != DB2Constants.SQL_SUCCESS) && (sqlRet != DB2Constants.SQL_SUCCESS_WITH_INFO))
throw new DB2Exception(DB2Constants.SQL_HANDLE_DBC, db2Conn.DBHandle, location +": Unable to allocate statement handle.");
parameters.HwndStmt = hwndStmt;
SetStatementTimeout();
}
private void SetStatementTimeout()
{
short sqlRet = DB2CLIWrapper.SQLSetStmtAttr(hwndStmt, DB2Constants.SQL_ATTR_QUERY_TIMEOUT, new IntPtr(commandTimeout), 0);
DB2ClientUtils.DB2CheckReturn(sqlRet, DB2Constants.SQL_HANDLE_STMT, hwndStmt, "Set statement timeout.", db2Conn);
private void SetStatementTimeout()
{
short sqlRet = DB2CLIWrapper.SQLSetStmtAttr(hwndStmt, DB2Constants.SQL_ATTR_QUERY_TIMEOUT, new IntPtr(commandTimeout), 0);
DB2ClientUtils.DB2CheckReturn(sqlRet, DB2Constants.SQL_HANDLE_STMT, hwndStmt, "Set statement timeout.", db2Conn);
}
#endregion
@@ -349,13 +370,13 @@ namespace IBM.Data.DB2
/// <summary>
/// Attempt to cancel an executing command
/// </summary>
public void Cancel()
{
if(hwndStmt == IntPtr.Zero)
{
throw new InvalidOperationException("Nothing to Cancel.");
}
DB2CLIWrapper.SQLCancel(hwndStmt);
public void Cancel()
{
if(hwndStmt == IntPtr.Zero)
{
throw new InvalidOperationException("Nothing to Cancel.");
}
DB2CLIWrapper.SQLCancel(hwndStmt);
}
#endregion
@@ -371,161 +392,135 @@ namespace IBM.Data.DB2
#region ExecuteNonQuery
public int ExecuteNonQuery()
{
ExecuteNonQueryInternal(CommandBehavior.Default);
int numRows;
//How many rows affected. numRows will be -1 if we aren't dealing with an Insert, Delete or Update, or if the statement did not execute successfully
short sqlRet = DB2CLIWrapper.SQLRowCount(hwndStmt, out numRows);
DB2ClientUtils.DB2CheckReturn(sqlRet, DB2Constants.SQL_HANDLE_STMT, hwndStmt, "SQLExecDirect error.", db2Conn);
do
{
sqlRet = DB2CLIWrapper.SQLMoreResults(this.hwndStmt);
DB2ClientUtils.DB2CheckReturn(sqlRet, DB2Constants.SQL_HANDLE_STMT, hwndStmt, "DB2ClientDataReader - SQLMoreResults", db2Conn);
} while(sqlRet != DB2Constants.SQL_NO_DATA_FOUND);
CloseStatementHandle(false);
return numRows;
}
public void ExecuteNonQueryInternal(CommandBehavior behavior)
{
short sqlRet;
if((db2Conn == null) || (db2Conn.State != ConnectionState.Open))
throw new InvalidOperationException("Prepare needs an open connection");
if((refDataReader != null) &&
(refDataReader.IsAlive))
throw new InvalidOperationException("There is already an open DataReader associated with this Connection which must be closed first.");
DB2Transaction connectionTransaction = null;
if(db2Conn.WeakRefTransaction != null)
connectionTransaction = (DB2Transaction)db2Conn.WeakRefTransaction.Target;
if(!Object.ReferenceEquals(connectionTransaction, Transaction))
{
if(Transaction == null)
throw new InvalidOperationException("A transaction was started in the connection, but the command doesn't specify a transaction");
throw new InvalidOperationException("The transaction specified at the connection doesn't belong to the connection");
}
if (hwndStmt == IntPtr.Zero)
{
AllocateStatement("InternalExecuteNonQuery");
previousBehavior = 0;
}
if(previousBehavior != behavior)
{
if(((previousBehavior ^ behavior) & CommandBehavior.SchemaOnly) != 0)
{
sqlRet = DB2CLIWrapper.SQLSetStmtAttr(hwndStmt, DB2Constants.SQL_ATTR_DEFERRED_PREPARE,
new IntPtr((behavior & CommandBehavior.SchemaOnly) != 0 ? 0 : 1), 0);
// TODO: don't check. what if it is not supported???
DB2ClientUtils.DB2CheckReturn(sqlRet, DB2Constants.SQL_HANDLE_STMT, hwndStmt, "Defered prepare.", db2Conn);
previousBehavior = (previousBehavior & ~CommandBehavior.SchemaOnly) | (behavior & CommandBehavior.SchemaOnly);
}
if(((previousBehavior ^ behavior) & CommandBehavior.SingleRow) != 0)
{
sqlRet = DB2CLIWrapper.SQLSetStmtAttr(hwndStmt, DB2Constants.SQL_ATTR_MAX_ROWS,
new IntPtr((behavior & CommandBehavior.SingleRow) == 0 ? 0 : 1), 0);
// TODO: don't check. what if it is not supported???
DB2ClientUtils.DB2CheckReturn(sqlRet, DB2Constants.SQL_HANDLE_STMT, hwndStmt, "Set max rows", db2Conn);
previousBehavior = (previousBehavior & ~CommandBehavior.SingleRow) | (behavior & CommandBehavior.SingleRow);
}
previousBehavior = behavior;
}
if((Transaction == null) &&
!db2Conn.openConnection.autoCommit)
{
sqlRet = DB2CLIWrapper.SQLSetConnectAttr(db2Conn.DBHandle, DB2Constants.SQL_ATTR_AUTOCOMMIT, new IntPtr(DB2Constants.SQL_AUTOCOMMIT_ON), 0);
DB2ClientUtils.DB2CheckReturn(sqlRet, DB2Constants.SQL_HANDLE_DBC, db2Conn.DBHandle, "Error setting AUTOCOMMIT ON in transaction CTOR.", db2Conn);
db2Conn.openConnection.autoCommit = true;
sqlRet = DB2CLIWrapper.SQLSetConnectAttr(db2Conn.DBHandle, DB2Constants.SQL_ATTR_TXN_ISOLATION, new IntPtr(DB2Constants.SQL_TXN_READ_COMMITTED), 0);
DB2ClientUtils.DB2CheckReturn(sqlRet, DB2Constants.SQL_HANDLE_DBC, db2Conn.DBHandle, "Error setting isolation level.", db2Conn);
}
if ((commandText == null) ||(commandText.Length == 0))
throw new InvalidOperationException("Command string is empty");
if(CommandType.StoredProcedure == commandType && !commandText.StartsWith("CALL "))
commandText = "CALL " + commandText;
// if(!prepared)
// {
// Prepare();
// }
if((behavior & CommandBehavior.SchemaOnly) != 0)
{
if(!prepared)
{
Prepare();
}
}
else
{
if(statementParametersMemory != IntPtr.Zero)
{
Marshal.FreeHGlobal(statementParametersMemory);
statementParametersMemory = IntPtr.Zero;
}
if(parameters.Count > 0)
{
statementParametersMemorySize = 0;
for(int i = 0; i < parameters.Count; i++)
{
DB2Parameter param = parameters[i];
param.CalculateRequiredmemory();
statementParametersMemorySize += param.requiredMemory + 8;
}
statementParametersMemory = Marshal.AllocHGlobal(statementParametersMemorySize);
int offset = 0;
for(int i = 0; i < parameters.Count; i++)
{
DB2Parameter param = parameters[i];
//param.internalBuffer = new IntPtr(statementParametersMemory.ToInt64() + offset);
int memSize = statementParametersMemory.ToInt32() + offset;
param.internalBuffer = Marshal.AllocHGlobal(memSize);
offset += param.requiredMemory;
//param.internalLengthBuffer = new IntPtr(statementParametersMemory.ToInt32() + offset);
param.internalLengthBuffer = Marshal.AllocHGlobal(4);
offset += 8;
sqlRet = param.Bind(this.hwndStmt, (short)(i + 1));
DB2ClientUtils.DB2CheckReturn(sqlRet, DB2Constants.SQL_HANDLE_STMT, hwndStmt, "Error binding parameter in DB2Command: ", db2Conn);
}
}
if (prepared)
{
sqlRet = DB2CLIWrapper.SQLExecute(hwndStmt);
DB2ClientUtils.DB2CheckReturn(sqlRet, DB2Constants.SQL_HANDLE_STMT, hwndStmt, "SQLExecute error.", db2Conn);
}
else
{
sqlRet = DB2CLIWrapper.SQLExecDirect(hwndStmt, commandText, commandText.Length);
DB2ClientUtils.DB2CheckReturn(sqlRet, DB2Constants.SQL_HANDLE_STMT, hwndStmt, "SQLExecDirect error.", db2Conn);
}
statementOpen = true;
parameters.GetOutValues();
if(statementParametersMemory != IntPtr.Zero)
{
Marshal.FreeHGlobal(statementParametersMemory);
statementParametersMemory = IntPtr.Zero;
}
}
public int ExecuteNonQuery()
{
ExecuteNonQueryInternal(CommandBehavior.Default);
int numRows;
//How many rows affected. numRows will be -1 if we aren't dealing with an Insert, Delete or Update, or if the statement did not execute successfully
short sqlRet = DB2CLIWrapper.SQLRowCount(hwndStmt, out numRows);
DB2ClientUtils.DB2CheckReturn(sqlRet, DB2Constants.SQL_HANDLE_STMT, hwndStmt, "SQLExecDirect error.", db2Conn);
do
{
sqlRet = DB2CLIWrapper.SQLMoreResults(this.hwndStmt);
DB2ClientUtils.DB2CheckReturn(sqlRet, DB2Constants.SQL_HANDLE_STMT, hwndStmt, "DB2ClientDataReader - SQLMoreResults", db2Conn);
} while(sqlRet != DB2Constants.SQL_NO_DATA_FOUND);
CloseStatementHandle(false);
return numRows;
}
public void ExecuteNonQueryInternal(CommandBehavior behavior)
{
short sqlRet;
if(prepared && binded)
{
sqlRet = DB2CLIWrapper.SQLExecute(hwndStmt);
DB2ClientUtils.DB2CheckReturn(sqlRet, DB2Constants.SQL_HANDLE_STMT, hwndStmt, "SQLExecute error.", db2Conn);
return;
}
if((db2Conn == null) || (db2Conn.State != ConnectionState.Open))
throw new InvalidOperationException("Prepare needs an open connection");
if((refDataReader != null) &&
(refDataReader.IsAlive))
throw new InvalidOperationException("There is already an open DataReader associated with this Connection which must be closed first.");
DB2Transaction connectionTransaction = null;
if(db2Conn.WeakRefTransaction != null)
connectionTransaction = (DB2Transaction)db2Conn.WeakRefTransaction.Target;
if(!Object.ReferenceEquals(connectionTransaction, Transaction))
{
if(Transaction == null)
throw new InvalidOperationException("A transaction was started in the connection, but the command doesn't specify a transaction");
throw new InvalidOperationException("The transaction specified at the connection doesn't belong to the connection");
}
if (hwndStmt == IntPtr.Zero)
{
AllocateStatement("InternalExecuteNonQuery");
previousBehavior = 0;
}
if(previousBehavior != behavior)
{
if(((previousBehavior ^ behavior) & CommandBehavior.SchemaOnly) != 0)
{
sqlRet = DB2CLIWrapper.SQLSetStmtAttr(hwndStmt, DB2Constants.SQL_ATTR_DEFERRED_PREPARE,
new IntPtr((behavior & CommandBehavior.SchemaOnly) != 0 ? 0 : 1), 0);
// TODO: don't check. what if it is not supported???
DB2ClientUtils.DB2CheckReturn(sqlRet, DB2Constants.SQL_HANDLE_STMT, hwndStmt, "Defered prepare.", db2Conn);
previousBehavior = (previousBehavior & ~CommandBehavior.SchemaOnly) | (behavior & CommandBehavior.SchemaOnly);
}
if(((previousBehavior ^ behavior) & CommandBehavior.SingleRow) != 0)
{
sqlRet = DB2CLIWrapper.SQLSetStmtAttr(hwndStmt, DB2Constants.SQL_ATTR_MAX_ROWS,
new IntPtr((behavior & CommandBehavior.SingleRow) == 0 ? 0 : 1), 0);
// TODO: don't check. what if it is not supported???
DB2ClientUtils.DB2CheckReturn(sqlRet, DB2Constants.SQL_HANDLE_STMT, hwndStmt, "Set max rows", db2Conn);
previousBehavior = (previousBehavior & ~CommandBehavior.SingleRow) | (behavior & CommandBehavior.SingleRow);
}
previousBehavior = behavior;
}
if((Transaction == null) &&
!db2Conn.openConnection.autoCommit)
{
sqlRet = DB2CLIWrapper.SQLSetConnectAttr(db2Conn.DBHandle, DB2Constants.SQL_ATTR_AUTOCOMMIT, new IntPtr(DB2Constants.SQL_AUTOCOMMIT_ON), 0);
DB2ClientUtils.DB2CheckReturn(sqlRet, DB2Constants.SQL_HANDLE_DBC, db2Conn.DBHandle, "Error setting AUTOCOMMIT ON in transaction CTOR.", db2Conn);
db2Conn.openConnection.autoCommit = true;
sqlRet = DB2CLIWrapper.SQLSetConnectAttr(db2Conn.DBHandle, DB2Constants.SQL_ATTR_TXN_ISOLATION, new IntPtr(DB2Constants.SQL_TXN_READ_COMMITTED), 0);
DB2ClientUtils.DB2CheckReturn(sqlRet, DB2Constants.SQL_HANDLE_DBC, db2Conn.DBHandle, "Error setting isolation level.", db2Conn);
}
if ((commandText == null) ||(commandText.Length == 0))
throw new InvalidOperationException("Command string is empty");
if(CommandType.StoredProcedure == commandType && !commandText.StartsWith("CALL "))
commandText = "CALL " + commandText + " ()";
if((behavior & CommandBehavior.SchemaOnly) != 0)
{
if(!prepared)
{
Prepare();
}
}
else
{
if(statementParametersMemory != IntPtr.Zero)
{
Marshal.FreeHGlobal(statementParametersMemory);
statementParametersMemory = IntPtr.Zero;
}
BindParams();
if (prepared)
{
sqlRet = DB2CLIWrapper.SQLExecute(hwndStmt);
DB2ClientUtils.DB2CheckReturn(sqlRet, DB2Constants.SQL_HANDLE_STMT, hwndStmt, "SQLExecute error.", db2Conn);
}
else
{
sqlRet = DB2CLIWrapper.SQLExecDirect(hwndStmt, commandText, commandText.Length);
DB2ClientUtils.DB2CheckReturn(sqlRet, DB2Constants.SQL_HANDLE_STMT, hwndStmt, "SQLExecDirect error.", db2Conn);
}
statementOpen = true;
parameters.GetOutValues();
if(statementParametersMemory != IntPtr.Zero)
{
Marshal.FreeHGlobal(statementParametersMemory);
statementParametersMemory = IntPtr.Zero;
}
}
}
#endregion
@@ -533,34 +528,34 @@ namespace IBM.Data.DB2
///
///ExecuteReader
///
IDataReader IDbCommand.ExecuteReader()
{
return ExecuteReader(CommandBehavior.Default);
}
IDataReader IDbCommand.ExecuteReader(CommandBehavior behavior)
{
return ExecuteReader(behavior);
}
public DB2DataReader ExecuteReader()
{
return ExecuteReader(CommandBehavior.Default);
}
public DB2DataReader ExecuteReader(CommandBehavior behavior)
{
if((db2Conn == null) || (db2Conn.State != ConnectionState.Open))
throw new InvalidOperationException("Prepare needs an open connection");
DB2DataReader reader;
ExecuteNonQueryInternal(behavior);
reader = new DB2DataReader(db2Conn, this, behavior);
refDataReader = new WeakReference(reader);
return reader;
IDataReader IDbCommand.ExecuteReader()
{
return ExecuteReader(CommandBehavior.Default);
}
IDataReader IDbCommand.ExecuteReader(CommandBehavior behavior)
{
return ExecuteReader(behavior);
}
public DB2DataReader ExecuteReader()
{
return ExecuteReader(CommandBehavior.Default);
}
public DB2DataReader ExecuteReader(CommandBehavior behavior)
{
if((db2Conn == null) || (db2Conn.State != ConnectionState.Open))
throw new InvalidOperationException("Prepare needs an open connection");
DB2DataReader reader;
ExecuteNonQueryInternal(behavior);
reader = new DB2DataReader(db2Conn, this, behavior);
refDataReader = new WeakReference(reader);
return reader;
}
#endregion
@@ -568,65 +563,102 @@ namespace IBM.Data.DB2
///
/// ExecuteScalar
///
public object ExecuteScalar()
{
if((db2Conn == null) || (db2Conn.State != ConnectionState.Open))
throw new InvalidOperationException("Prepare needs an open connection");
using(DB2DataReader reader = ExecuteReader(CommandBehavior.SingleResult | CommandBehavior.SingleRow))
{
if(reader.Read() && (reader.FieldCount > 0))
{
return reader[0];
}
}
return null;
public object ExecuteScalar()
{
if((db2Conn == null) || (db2Conn.State != ConnectionState.Open))
throw new InvalidOperationException("Prepare needs an open connection");
using(DB2DataReader reader = ExecuteReader(CommandBehavior.SingleResult | CommandBehavior.SingleRow))
{
if(reader.Read() && (reader.FieldCount > 0))
{
return reader[0];
}
}
return null;
}
#endregion
#region Prepare ()
public void Prepare ()
{
if((db2Conn == null) || (db2Conn.State != ConnectionState.Open))
throw new InvalidOperationException("Prepare needs an open connection");
CloseStatementHandle(false);
if (hwndStmt == IntPtr.Zero)
{
AllocateStatement("InternalExecuteNonQuery");
}
short sqlRet = 0;
IntPtr numParams = IntPtr.Zero;
sqlRet = DB2CLIWrapper.SQLPrepare(hwndStmt, commandText, commandText.Length);
DB2ClientUtils.DB2CheckReturn(sqlRet, DB2Constants.SQL_HANDLE_STMT, hwndStmt, "SQLPrepare error.", db2Conn);
statementOpen = true;
prepared=true;
public void Prepare ()
{
if((db2Conn == null) || (db2Conn.State != ConnectionState.Open))
throw new InvalidOperationException("Prepare needs an open connection");
CloseStatementHandle(false);
if (hwndStmt == IntPtr.Zero)
{
AllocateStatement("InternalExecuteNonQuery");
}
short sqlRet = 0;
IntPtr numParams = IntPtr.Zero;
sqlRet = DB2CLIWrapper.SQLPrepare(hwndStmt, commandText, commandText.Length);
DB2ClientUtils.DB2CheckReturn(sqlRet, DB2Constants.SQL_HANDLE_STMT, hwndStmt, "SQLPrepare error.", db2Conn);
statementOpen = true;
prepared=true;
}
#endregion
#region ICloneable Members
object ICloneable.Clone()
private string AddCallParam( string _cmString)
{
DB2Command clone = new DB2Command();
clone.Connection = Connection;
clone.commandText = commandText;
clone.commandType = commandType;
clone.Transaction = db2Trans;
clone.commandTimeout = commandTimeout;
clone.updatedRowSource = updatedRowSource;
clone.parameters = new DB2ParameterCollection();
for(int i = 0; i < parameters.Count; i++)
clone.Parameters.Add(((ICloneable)parameters[i]).Clone());
return clone;
if(_cmString.IndexOf("()") != -1)
{
return _cmString.Replace("()","(?)");
}
return _cmString.Replace(")", ",?)");
}
private void BindParams()
{
if(parameters.Count > 0)
{
statementParametersMemorySize = 0;
int offset = 0;
short sqlRet;
for(int i = 0; i < parameters.Count; i++)
{
if(commandType == CommandType.StoredProcedure)
{
commandText = AddCallParam(commandText);
}
DB2Parameter param = parameters[i];
param.CalculateRequiredmemory();
statementParametersMemorySize += param.requiredMemory + 8;
param.internalBuffer = Marshal.AllocHGlobal(param.requiredMemory);
offset += param.requiredMemory;
param.internalLengthBuffer = Marshal.AllocHGlobal(4);
Marshal.WriteInt32(param.internalLengthBuffer, param.requiredMemory);
sqlRet = param.Bind(this.hwndStmt, (short)(i + 1));
DB2ClientUtils.DB2CheckReturn(sqlRet, DB2Constants.SQL_HANDLE_STMT, hwndStmt, "Error binding parameter in DB2Command: ", db2Conn);
}
binded = true;
}
}
#region ICloneable Members
object ICloneable.Clone()
{
DB2Command clone = new DB2Command();
clone.Connection = Connection;
clone.commandText = commandText;
clone.commandType = commandType;
clone.Transaction = db2Trans;
clone.commandTimeout = commandTimeout;
clone.updatedRowSource = updatedRowSource;
clone.parameters = new DB2ParameterCollection();
for(int i = 0; i < parameters.Count; i++)
clone.Parameters.Add(((ICloneable)parameters[i]).Clone());
return clone;
}
#endregion
}
}
+291
View File
@@ -0,0 +1,291 @@
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Data;
using System.ComponentModel;
namespace IBM.Data.DB2
{
public sealed class DB2CommandBuilder : Component
{
bool disposed = false;
private DB2DataAdapter dataAdapter;
private DB2Command insertCommand;
private DB2Command updateCommand;
private DB2Command deleteCommand;
private string tableName = String.Empty;
public DB2CommandBuilder ()
{}
public DB2CommandBuilder (DB2DataAdapter adapter)
{
DataAdapter = adapter;
}
public DB2DataAdapter DataAdapter
{
get
{
return dataAdapter;
}
set
{
if (dataAdapter != null)
{
throw new Exception ("DataAdapter is already set");
}
dataAdapter = value;
string select_text = dataAdapter.SelectCommand.CommandText;
string[] words = select_text.Split(new char [] {' '});
bool from_found = false;
for (int i = 0; i < words.Length; i++)
{
if (from_found && (words[i] != String.Empty))
{
tableName = words[i];
break;
}
if (words[i].ToLower() == "from")
{
from_found = true;
}
}
}
}
public string QuotePrefix
{
get
{
return "";
}
set
{ }
}
public string QuoteSuffix
{
get
{
return "";
}
set
{ }
}
public static void DeriveParameters (DB2Command command)
{}
public DB2Command GetInsertCommand ()
{
DataTable dt = GetSchema();
if (insertCommand == null)
{
string fields = "";
string values = "";
for (int i = 0; i < dt.Rows.Count; i++)
{
//DataColumn column = dt.Columns[i];
DataRow dr = dt.Rows[i];
DataColumn column = new DataColumn((string)dr["ColumnName"], DB2TypeConverter.GetManagedType((int)dr["ProviderType"]));
if (fields.Length != 0 && !((bool)dr["IsAutoIncrement"]))
{
fields += ", ";
values += ", ";
}
if(!((bool)dr["IsAutoIncrement"]))
{
fields += column.ColumnName;
//values += ":v_" + column.ColumnName;
values += "?";
}
}
if (tableName == String.Empty)
{
tableName = dt.TableName;
}
DB2Command cmdaux = new DB2Command("insert into " + tableName + " (" + fields + ") values (" + values + ")", dataAdapter.SelectCommand.Connection);
for (int i = 0;i < dt.Rows.Count;i++)
{
//DataColumn column = dt.Columns[i];
DataRow dr = dt.Rows[i];
DataColumn column = new DataColumn((string)dr["ColumnName"], DB2TypeConverter.GetManagedType((int)dr["ProviderType"]));
if (!((bool)dr["IsAutoIncrement"]))
{
DB2Parameter aux = new DB2Parameter("v_" + column.ColumnName, column.DataType);
aux.Direction = ParameterDirection.Input;
aux.SourceColumn = column.ColumnName;
cmdaux.Parameters.Add(aux);
}
}
insertCommand = cmdaux;
}
return insertCommand;
}
public DB2Command GetUpdateCommand ()
{
DataTable dt = GetSchema();
if (updateCommand == null)
{
string sets = "";
string wheres = "";
for (int i = 0; i < dt.Rows.Count; i++)
{
if (sets.Length != 0 && !((bool)dt.Rows[i]["IsAutoIncrement"]))
{
sets += ", ";
}
if (i != 0)
{
wheres += " and ";
}
DataRow dr = dt.Rows[i];
DataColumn column = new DataColumn((string)dr["ColumnName"], DB2TypeConverter.GetManagedType((int)dr["ProviderType"]));
if(!((bool)dr["IsAutoIncrement"])){sets += String.Format("{0} = ? ", column.ColumnName);}
wheres += String.Format("(({0} is null) or ({0} = ?))", column.ColumnName);
}
if (tableName == String.Empty)
{
tableName = (string)dt.Rows[0]["BaseTableName"];
}
DB2Command cmdaux = new DB2Command("update " + tableName + " set " + sets + " where ( " + wheres + " )", dataAdapter.SelectCommand.Connection);
for (int i = 0; i < dt.Rows.Count; i++)
{
DataRow dr = dt.Rows[i];
DataColumn column = new DataColumn((string)dr["ColumnName"], DB2TypeConverter.GetManagedType((int)dr["ProviderType"]));
if (!((bool)dr["IsAutoIncrement"]))
{
DB2Parameter aux = new DB2Parameter("s_" + column.ColumnName, column.DataType);
aux.Direction = ParameterDirection.Input;
aux.SourceColumn = column.ColumnName;
aux.SourceVersion = DataRowVersion.Current;
cmdaux.Parameters.Add(aux);
}
}
for (int i = 0; i < dt.Rows.Count; i++)
{
DataRow dr = dt.Rows[i];
DataColumn column = new DataColumn((string)dr["ColumnName"], DB2TypeConverter.GetManagedType((int)dr["ProviderType"]));
DB2Parameter aux = new DB2Parameter("w_" + column.ColumnName, column.DataType);
aux.Direction = ParameterDirection.Input;
aux.SourceColumn = column.ColumnName;
aux.SourceVersion = DataRowVersion.Original;
cmdaux.Parameters.Add(aux);
}
updateCommand = cmdaux;
}
return updateCommand;
}
public DB2Command GetDeleteCommand ()
{
DataTable dt = GetSchema();
if (deleteCommand == null)
{
string wheres = "";
for (int i = 0; i < dt.Rows.Count; i++)
{
//DataColumn column = row.Table.Columns[i];
DataRow dr = dt.Rows[i];
DataColumn column = new DataColumn((string)dr["ColumnName"], DB2TypeConverter.GetManagedType((int)dr["ProviderType"]));
if (i != 0)
{
wheres += " and ";
}
//wheres += String.Format("(({0} is null) or ({0} = v_{0}))", column.ColumnName);
wheres += String.Format("(({0} is null) or ({0} = ?))", column.ColumnName);
}
if (tableName == String.Empty)
{
tableName = (string)dt.Rows[0]["BaseTableName"];
}
DB2Command cmdaux = new DB2Command("delete from " + tableName + " where ( " + wheres + " )", dataAdapter.SelectCommand.Connection);
for (int i = 0; i < dt.Rows.Count; i++)
{
DataRow dr = dt.Rows[i];
DataColumn column = new DataColumn((string)dr["ColumnName"], DB2TypeConverter.GetManagedType((int)dr["ProviderType"]));
DB2Parameter aux = new DB2Parameter("v_" + column.ColumnName, column.DataType);
aux.Direction = ParameterDirection.Input;
aux.SourceColumn = column.ColumnName;
aux.SourceVersion = DataRowVersion.Original;
cmdaux.Parameters.Add(aux);
}
deleteCommand = cmdaux;
}
return deleteCommand;
}
public void RefreshSchema ()
{
insertCommand = null;
updateCommand = null;
deleteCommand = null;
}
private DataTable GetSchema()
{
dataAdapter.SelectCommand.Connection.Open();
DB2Command cmd = new DB2Command(dataAdapter.SelectCommand.CommandText, dataAdapter.SelectCommand.Connection);
DB2DataReader fake = cmd.ExecuteReader(CommandBehavior.KeyInfo);
DataTable dt = fake.GetSchemaTable();
fake.Close();
dataAdapter.SelectCommand.Connection.Close();
return dt;
}
protected override void Dispose (bool disposing)
{
if (!disposed)
{
if (disposing)
{
if (insertCommand != null)
{
insertCommand.Dispose();
}
if (updateCommand != null)
{
updateCommand.Dispose();
}
if (deleteCommand != null)
{
deleteCommand.Dispose();
}
}
}
}
}
}
@@ -1,3 +1,24 @@
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Collections;
using System.Collections.Specialized;
@@ -9,7 +30,7 @@ namespace IBM.Data.DB2
{
public sealed class DB2Connection : System.ComponentModel.Component, IDbConnection, ICloneable
public class DB2Connection : System.ComponentModel.Component, IDbConnection, ICloneable
{
#region private data members
@@ -25,7 +46,9 @@ namespace IBM.Data.DB2
#region Constructors
public DB2Connection()
{
{
connectionTimeout = 15;
}
public DB2Connection(string conString)
@@ -84,6 +107,7 @@ namespace IBM.Data.DB2
{
get
{
//if ((long)dbHandle.ToPointer() == DB2Constants.SQL_NULL_HANDLE)
if (openConnection == null)
return ConnectionState.Closed;
return ConnectionState.Open;
@@ -246,6 +270,7 @@ namespace IBM.Data.DB2
#endregion
#region Open
unsafe public void Open()
{
if(disposed)
@@ -1,194 +1,214 @@
using System;
using System.Collections;
using System.Text;
using System.Threading;
namespace IBM.Data.DB2
{
/// <summary>
///
/// </summary>
/// <remarks>One connection pool per connectionstring</remarks>
internal sealed class DB2ConnectionPool
{
private ArrayList openFreeConnections; // list of pooled connections sorted by age. First connection is present at index 'connectionsUsableOffset'
private Queue openFreeMinimalAllocated;
private int connectionsOpen; // total number of connections open (in pool, an in use by application)
private int connectionsInUse; // total connection in use by application
private int connectionsUsableOffset; // Offset to the first pooled connection in 'openFreeConnections'
private Timer timer;
public string databaseProductName;
public string databaseVersion;
public int majorVersion;
public int minorVersion;
private DB2ConnectionSettings connectionSettings;
public DB2ConnectionPool(DB2ConnectionSettings connectionSettings)
{
this.connectionSettings = connectionSettings;
openFreeConnections = new ArrayList();
}
public DB2ConnectionSettings ConnectionSettings
{
get { return connectionSettings; }
}
public DB2OpenConnection GetOpenConnection(DB2Connection db2Conn)
{
DB2OpenConnection connection = null;
lock(openFreeConnections.SyncRoot)
{
if((connectionSettings.ConnectionPoolSizeMax > 0) &&
(connectionsOpen >= connectionSettings.ConnectionPoolSizeMax))
{
throw new ArgumentException("Maximum connections reached for connectionstring");
}
while(connectionsOpen > connectionsInUse)
{
connection = (DB2OpenConnection)openFreeConnections[openFreeConnections.Count - 1];
openFreeConnections.RemoveAt(openFreeConnections.Count - 1);
// check if connection is dead
int isDead;
short sqlRet = DB2CLIWrapper.SQLGetConnectAttr(connection.DBHandle, DB2Constants.SQL_ATTR_CONNECTION_DEAD, out isDead, 0, IntPtr.Zero);
if(((sqlRet == DB2Constants.SQL_SUCCESS_WITH_INFO) || (sqlRet == DB2Constants.SQL_SUCCESS)) &&
(isDead == DB2Constants.SQL_CD_FALSE))
{
connectionsInUse++;
break;
}
else
{
connectionsOpen--;
connection.Dispose();
connection = null;
}
}
if(connectionsOpen == connectionsInUse)
{
if(timer != null)
{
timer.Dispose();
timer = null;
}
}
}
if(connection == null)
{
openFreeConnections.Clear();
connectionsUsableOffset = 0;
connection = new DB2OpenConnection(connectionSettings, db2Conn);
connectionsOpen++;
connectionsInUse++;
}
return connection;
}
private void DisposeTimedoutConnections(object state)
{
lock(openFreeConnections.SyncRoot)
{
if(timer != null)
{
TimeSpan timeToDispose = TimeSpan.Zero;
DB2OpenConnection connection;
while(connectionsOpen > connectionsInUse)
{
connection = (DB2OpenConnection)openFreeConnections[connectionsUsableOffset];
timeToDispose = connection.poolDisposalTime.Subtract(DateTime.Now);
if((timeToDispose.Ticks < 0) || // time to die
(timeToDispose > connectionSettings.ConnectionLifeTime)) // messing with system clock
{
connection.Dispose();
openFreeConnections[connectionsUsableOffset] = null;
connectionsOpen--;
connectionsUsableOffset++;
}
else
{
break;
}
}
if(connectionsOpen > connectionsInUse)
{
connection = (DB2OpenConnection)openFreeConnections[connectionsUsableOffset];
timer.Change(timeToDispose, new TimeSpan(-1));
}
else
{
timer.Dispose();
timer = null;
}
}
if((connectionsUsableOffset > (openFreeConnections.Capacity / 2)) &&
(connectionsOpen > connectionsInUse))
{
openFreeConnections.RemoveRange(0, connectionsUsableOffset); // cleanup once in a while
connectionsUsableOffset = 0;
}
}
}
public void AddToFreeConnections(DB2OpenConnection connection)
{
lock(openFreeConnections.SyncRoot)
{
connection.poolDisposalTime = DateTime.Now.Add(connectionSettings.ConnectionLifeTime);
if(timer == null)
{
timer = new Timer(new TimerCallback(DisposeTimedoutConnections), null,
connectionSettings.ConnectionLifeTime, new TimeSpan(-1));
}
connectionsInUse--;
openFreeConnections.Add(connection);
}
}
public void OpenConnectionFinalized()
{
lock(openFreeConnections.SyncRoot)
{
connectionsOpen--;
connectionsInUse--;
}
}
/// <summary>
/// Find a specific connection pool
/// </summary>
/// <param name="connectionString"></param>
/// <returns></returns>
static public DB2ConnectionPool FindConnectionPool(string connectionString)
{
return (DB2ConnectionPool)DB2Environment.Instance.connectionPools[connectionString];
}
/// <summary>
/// Get a connection pool. If it doesn't exist yet, create it
/// </summary>
/// <param name="connectionSettings"></param>
/// <returns></returns>
static public DB2ConnectionPool GetConnectionPool(DB2ConnectionSettings connectionSettings)
{
DB2Environment environment = DB2Environment.Instance;
lock(environment.connectionPools.SyncRoot)
{
DB2ConnectionPool pool = (DB2ConnectionPool)environment.connectionPools[connectionSettings.ConnectionString];
if(pool == null)
{
pool = new DB2ConnectionPool(connectionSettings);
environment.connectionPools.Add(connectionSettings.ConnectionString, pool);
}
return pool;
}
}
}
}
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Collections;
using System.Text;
using System.Threading;
namespace IBM.Data.DB2
{
/// <summary>
///
/// </summary>
/// <remarks>One connection pool per connectionstring</remarks>
internal sealed class DB2ConnectionPool
{
private ArrayList openFreeConnections; // list of pooled connections sorted by age. First connection is present at index 'connectionsUsableOffset'
private Queue openFreeMinimalAllocated;
private int connectionsOpen; // total number of connections open (in pool, an in use by application)
private int connectionsInUse; // total connection in use by application
private int connectionsUsableOffset; // Offset to the first pooled connection in 'openFreeConnections'
private Timer timer;
public string databaseProductName;
public string databaseVersion;
public int majorVersion;
public int minorVersion;
private DB2ConnectionSettings connectionSettings;
public DB2ConnectionPool(DB2ConnectionSettings connectionSettings)
{
this.connectionSettings = connectionSettings;
openFreeConnections = new ArrayList();
}
public DB2ConnectionSettings ConnectionSettings
{
get { return connectionSettings; }
}
public DB2OpenConnection GetOpenConnection(DB2Connection db2Conn)
{
DB2OpenConnection connection = null;
lock(openFreeConnections.SyncRoot)
{
if((connectionSettings.ConnectionPoolSizeMax > 0) &&
(connectionsOpen >= connectionSettings.ConnectionPoolSizeMax))
{
throw new ArgumentException("Maximum connections reached for connectionstring");
}
while(connectionsOpen > connectionsInUse)
{
connection = (DB2OpenConnection)openFreeConnections[openFreeConnections.Count - 1];
openFreeConnections.RemoveAt(openFreeConnections.Count - 1);
// check if connection is dead
int isDead;
short sqlRet = DB2CLIWrapper.SQLGetConnectAttr(connection.DBHandle, DB2Constants.SQL_ATTR_CONNECTION_DEAD, out isDead, 0, IntPtr.Zero);
if(((sqlRet == DB2Constants.SQL_SUCCESS_WITH_INFO) || (sqlRet == DB2Constants.SQL_SUCCESS)) &&
(isDead == DB2Constants.SQL_CD_FALSE))
{
connectionsInUse++;
break;
}
else
{
connectionsOpen--;
connection.Dispose();
connection = null;
}
}
if(connectionsOpen == connectionsInUse)
{
if(timer != null)
{
timer.Dispose();
timer = null;
}
}
}
if(connection == null)
{
openFreeConnections.Clear();
connectionsUsableOffset = 0;
connection = new DB2OpenConnection(connectionSettings, db2Conn);
connectionsOpen++;
connectionsInUse++;
}
return connection;
}
private void DisposeTimedoutConnections(object state)
{
lock(openFreeConnections.SyncRoot)
{
if(timer != null)
{
TimeSpan timeToDispose = TimeSpan.Zero;
DB2OpenConnection connection;
while(connectionsOpen > connectionsInUse)
{
connection = (DB2OpenConnection)openFreeConnections[connectionsUsableOffset];
timeToDispose = connection.poolDisposalTime.Subtract(DateTime.Now);
if((timeToDispose.Ticks < 0) || // time to die
(timeToDispose > connectionSettings.ConnectionLifeTime)) // messing with system clock
{
connection.Dispose();
openFreeConnections[connectionsUsableOffset] = null;
connectionsOpen--;
connectionsUsableOffset++;
}
else
{
break;
}
}
if(connectionsOpen > connectionsInUse)
{
connection = (DB2OpenConnection)openFreeConnections[connectionsUsableOffset];
timer.Change(timeToDispose, new TimeSpan(-1));
}
else
{
timer.Dispose();
timer = null;
}
}
if((connectionsUsableOffset > (openFreeConnections.Capacity / 2)) &&
(connectionsOpen > connectionsInUse))
{
openFreeConnections.RemoveRange(0, connectionsUsableOffset); // cleanup once in a while
connectionsUsableOffset = 0;
}
}
}
public void AddToFreeConnections(DB2OpenConnection connection)
{
lock(openFreeConnections.SyncRoot)
{
connection.poolDisposalTime = DateTime.Now.Add(connectionSettings.ConnectionLifeTime);
if(timer == null)
{
timer = new Timer(new TimerCallback(DisposeTimedoutConnections), null,
connectionSettings.ConnectionLifeTime, new TimeSpan(-1));
}
connectionsInUse--;
openFreeConnections.Add(connection);
}
}
public void OpenConnectionFinalized()
{
lock(openFreeConnections.SyncRoot)
{
connectionsOpen--;
connectionsInUse--;
}
}
/// <summary>
/// Find a specific connection pool
/// </summary>
/// <param name="connectionString"></param>
/// <returns></returns>
static public DB2ConnectionPool FindConnectionPool(string connectionString)
{
return (DB2ConnectionPool)DB2Environment.Instance.connectionPools[connectionString];
}
/// <summary>
/// Get a connection pool. If it doesn't exist yet, create it
/// </summary>
/// <param name="connectionSettings"></param>
/// <returns></returns>
static public DB2ConnectionPool GetConnectionPool(DB2ConnectionSettings connectionSettings)
{
DB2Environment environment = DB2Environment.Instance;
lock(environment.connectionPools.SyncRoot)
{
DB2ConnectionPool pool = (DB2ConnectionPool)environment.connectionPools[connectionSettings.ConnectionString];
if(pool == null)
{
pool = new DB2ConnectionPool(connectionSettings);
environment.connectionPools.Add(connectionSettings.ConnectionString, pool);
}
return pool;
}
}
}
}
@@ -1,181 +1,202 @@
using System;
using System.Runtime.InteropServices;
using System.Text;
namespace IBM.Data.DB2
{
internal sealed class DB2ConnectionSettings
{
private string connectionString;
private string userName = "";
private string passWord = "";
private string databaseAlias = "";
private string server = "";
private bool pooling = true;
private TimeSpan connectTimeout = new TimeSpan(0, 0, 15);
private TimeSpan connectionLifeTime = new TimeSpan(0, 0, 15); // 15 seconds
private int connectionPoolSizeMin = 0;
private int connectionPoolSizeMax = -1; // no maximum
private DB2ConnectionPool pool;
private DB2ConnectionSettings(string connectionString)
{
this.connectionString = connectionString;
this.Parse();
}
public static DB2ConnectionSettings GetConnectionSettings(string connectionString)
{
DB2ConnectionPool pool = DB2ConnectionPool.FindConnectionPool(connectionString);
if(pool != null)
{
return pool.ConnectionSettings;
}
DB2ConnectionSettings settings = new DB2ConnectionSettings(connectionString);
if(settings.Pooling)
{
settings.pool = DB2ConnectionPool.GetConnectionPool(settings);
}
return settings;
}
public DB2OpenConnection GetRealOpenConnection(DB2Connection connection)
{
if(pool != null)
{
return pool.GetOpenConnection(connection);
}
else
{
return new DB2OpenConnection(this, connection);
}
}
public DB2ConnectionPool Pool
{
get { return pool; }
}
public string ConnectionString
{
get { return connectionString; }
}
public string UserName
{
get { return userName; }
}
public string PassWord
{
get { return passWord; }
}
/// <summary>
/// database alias (for cataloged database)
/// </summary>
public string DatabaseAlias
{
get { return databaseAlias; }
}
/// <summary>
/// server name with optional port number for direct connection (<server name/ip address>[:<port>])
/// </summary>
public string Server
{
get { return server; }
}
public TimeSpan ConnectTimeout
{
get { return connectTimeout; }
}
/// <summary>
/// Connection pooling yes/no
/// </summary>
public bool Pooling
{
get { return pooling; }
}
public int ConnectionPoolSizeMin
{
get { return connectionPoolSizeMin; }
}
public int ConnectionPoolSizeMax
{
get { return connectionPoolSizeMin; }
}
public TimeSpan ConnectionLifeTime
{
get { return connectionLifeTime; }
}
/// <summary>
/// parsed according to IBM DB2 .NET data provider help
/// </summary>
public void Parse()
{
string[] parts = connectionString.Split(new char[]{';'});
foreach(string part in parts)
{
string[] pairs = part.Split(new char[]{'='});
switch(pairs[0].ToLower())
{
case "database":
case "dsn":
databaseAlias = pairs[1];
break;
case "uid":
case "user id":
userName = pairs[1];
break;
case "pwd":
case "password":
passWord = pairs[1];
break;
case "server":
server = pairs[1];
break;
case "pooling":
pooling = (pairs[1].ToLower() == "true") || (pairs[1]== "1");
break;
case "connect timeout":
case "timeout":
case "connection timeout":
connectTimeout = new TimeSpan(0, 0, int.Parse(pairs[1]));
break;
case "min pool size":
connectionPoolSizeMin = int.Parse(pairs[1]);
break;
case "max pool size":
connectionPoolSizeMax = int.Parse(pairs[1]);
break;
case "connection lifetime":
connectionLifeTime = new TimeSpan(0, 0, int.Parse(pairs[1]));
break;
}
}
if(connectionLifeTime.Ticks <= 0)
{
pooling = false;
}
}
public override int GetHashCode()
{
return connectionString.GetHashCode ();
}
public override bool Equals(object obj)
{
return connectionString.Equals (obj);
}
}
}
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Runtime.InteropServices;
using System.Text;
namespace IBM.Data.DB2
{
internal sealed class DB2ConnectionSettings
{
private string connectionString;
private string userName = "";
private string passWord = "";
private string databaseAlias = "";
private string server = "";
private bool pooling = true;
private TimeSpan connectTimeout = new TimeSpan(0, 0, 15);
private TimeSpan connectionLifeTime = new TimeSpan(0, 0, 15); // 15 seconds
private int connectionPoolSizeMin = 0;
private int connectionPoolSizeMax = -1; // no maximum
private DB2ConnectionPool pool;
private DB2ConnectionSettings(string connectionString)
{
this.connectionString = connectionString;
this.Parse();
}
public static DB2ConnectionSettings GetConnectionSettings(string connectionString)
{
DB2ConnectionPool pool = DB2ConnectionPool.FindConnectionPool(connectionString);
if(pool != null)
{
return pool.ConnectionSettings;
}
DB2ConnectionSettings settings = new DB2ConnectionSettings(connectionString);
if(settings.Pooling)
{
settings.pool = DB2ConnectionPool.GetConnectionPool(settings);
}
return settings;
}
public DB2OpenConnection GetRealOpenConnection(DB2Connection connection)
{
if(pool != null)
{
return pool.GetOpenConnection(connection);
}
else
{
return new DB2OpenConnection(this, connection);
}
}
public DB2ConnectionPool Pool
{
get { return pool; }
}
public string ConnectionString
{
get { return connectionString; }
}
public string UserName
{
get { return userName; }
}
public string PassWord
{
get { return passWord; }
}
/// <summary>
/// database alias (for cataloged database)
/// </summary>
public string DatabaseAlias
{
get { return databaseAlias; }
}
/// <summary>
/// server name with optional port number for direct connection (<server name/ip address>[:<port>])
/// </summary>
public string Server
{
get { return server; }
}
public TimeSpan ConnectTimeout
{
get { return connectTimeout; }
}
/// <summary>
/// Connection pooling yes/no
/// </summary>
public bool Pooling
{
get { return pooling; }
}
public int ConnectionPoolSizeMin
{
get { return connectionPoolSizeMin; }
}
public int ConnectionPoolSizeMax
{
get { return connectionPoolSizeMin; }
}
public TimeSpan ConnectionLifeTime
{
get { return connectionLifeTime; }
}
/// <summary>
/// parsed according to IBM DB2 .NET data provider help
/// </summary>
public void Parse()
{
string[] parts = connectionString.Split(new char[]{';'});
foreach(string part in parts)
{
string[] pairs = part.Split(new char[]{'='});
switch(pairs[0].ToLower())
{
case "database":
case "dsn":
databaseAlias = pairs[1];
break;
case "uid":
case "user id":
userName = pairs[1];
break;
case "pwd":
case "password":
passWord = pairs[1];
break;
case "server":
server = pairs[1];
break;
case "pooling":
pooling = (pairs[1].ToLower() == "true") || (pairs[1]== "1");
break;
case "connect timeout":
case "timeout":
case "connection timeout":
connectTimeout = new TimeSpan(0, 0, int.Parse(pairs[1]));
break;
case "min pool size":
connectionPoolSizeMin = int.Parse(pairs[1]);
break;
case "max pool size":
connectionPoolSizeMax = int.Parse(pairs[1]);
break;
case "connection lifetime":
connectionLifeTime = new TimeSpan(0, 0, int.Parse(pairs[1]));
break;
}
}
if(connectionLifeTime.Ticks <= 0)
{
pooling = false;
}
}
public override int GetHashCode()
{
return connectionString.GetHashCode ();
}
public override bool Equals(object obj)
{
return connectionString.Equals (obj);
}
}
}
@@ -1,3 +1,24 @@
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace IBM.Data.DB2
@@ -57,6 +78,12 @@ namespace IBM.Data.DB2
public const int SQL_ATTR_MAX_ROWS = 1;
public const int SQL_ATTR_DEFERRED_PREPARE = 1277;
/*Used for batch operations*/
public const int SQL_ATTR_PARAMSET_SIZE = 22;
public const int SQL_ATTR_PARAM_STATUS_PTR = 20;
public const int SQL_ATTR_PARAMS_PROCESSED_PTR = 21;
public const int SQL_ATTR_PARAM_BIND_TYPE = 18;
public const int SQL_IS_POINTER = -4;
public const int SQL_IS_UINTEGER = -5;
public const int SQL_IS_INTEGER = -6;
@@ -141,6 +168,8 @@ namespace IBM.Data.DB2
public const int SQL_NULLABLE = 1;
public const int SQL_NULLABLE_UNKNOWN = 2;
public const int SQL_PARAM_BIND_BY_COLUMN = 0;
/* Defines for SQLBindParameter and SQLProcedureColumns */
public const int SQL_PARAM_TYPE_UNKNOWN = 0;
public const int SQL_PARAM_INPUT = 1;
+184
View File
@@ -0,0 +1,184 @@
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.ComponentModel;
using System.Data;
using System.Data.Common;
namespace IBM.Data.DB2 {
public sealed class DB2DataAdapter : DbDataAdapter, IDbDataAdapter
{
#region Fields
bool disposed = false;
DB2Command deleteCommand;
DB2Command insertCommand;
DB2Command selectCommand;
DB2Command updateCommand;
#endregion
#region Constructors
public DB2DataAdapter ()
: this (new DB2Command ())
{
}
public DB2DataAdapter (DB2Command selectCommand)
{
DeleteCommand = null;
InsertCommand = null;
SelectCommand = selectCommand;
UpdateCommand = null;
}
public DB2DataAdapter (string selectCommandText, DB2Connection selectConnection)
: this (new DB2Command (selectCommandText, selectConnection))
{
}
public DB2DataAdapter (string selectCommandText, string selectConnectionString)
: this (selectCommandText, new DB2Connection (selectConnectionString))
{
}
#endregion
#region Properties
public DB2Command DeleteCommand {
get { return deleteCommand; }
set { deleteCommand = value; }
}
public DB2Command InsertCommand {
get { return insertCommand; }
set { insertCommand = value; }
}
public DB2Command SelectCommand {
get { return selectCommand; }
set { selectCommand = value; }
}
public DB2Command UpdateCommand {
get { return updateCommand; }
set { updateCommand = value; }
}
IDbCommand IDbDataAdapter.DeleteCommand {
get { return DeleteCommand; }
set {
if (!(value is DB2Command))
throw new ArgumentException ();
DeleteCommand = (DB2Command)value;
}
}
IDbCommand IDbDataAdapter.InsertCommand {
get { return InsertCommand; }
set {
if (!(value is DB2Command))
throw new ArgumentException ();
InsertCommand = (DB2Command)value;
}
}
IDbCommand IDbDataAdapter.SelectCommand {
get { return SelectCommand; }
set {
if (!(value is DB2Command))
throw new ArgumentException ();
SelectCommand = (DB2Command)value;
}
}
IDbCommand IDbDataAdapter.UpdateCommand {
get { return UpdateCommand; }
set {
if (!(value is DB2Command))
throw new ArgumentException ();
UpdateCommand = (DB2Command)value;
}
}
ITableMappingCollection IDataAdapter.TableMappings {
get { return TableMappings; }
}
#endregion
#region Methods
protected override RowUpdatedEventArgs CreateRowUpdatedEvent (DataRow dataRow, IDbCommand command, StatementType statementType, DataTableMapping tableMapping)
{
return new DB2RowUpdatedEventArgs (dataRow, command, statementType, tableMapping);
}
protected override RowUpdatingEventArgs CreateRowUpdatingEvent (DataRow dataRow, IDbCommand command, StatementType statementType, DataTableMapping tableMapping)
{
return new DB2RowUpdatingEventArgs (dataRow, command, statementType, tableMapping);
}
protected override void Dispose (bool disposing)
{
if (!disposed) {
if (disposing) {
}
disposed = true;
}
}
protected override void OnRowUpdated (RowUpdatedEventArgs value)
{
if (RowUpdated != null)
RowUpdated (this, (DB2RowUpdatedEventArgs) value);
}
protected override void OnRowUpdating (RowUpdatingEventArgs value)
{
if (RowUpdating != null)
RowUpdating (this, (DB2RowUpdatingEventArgs) value);
}
#endregion
#region Events and Delegates
public event DB2RowUpdatedEventHandler RowUpdated;
public event DB2RowUpdatingEventHandler RowUpdating;
#endregion
}
}
File diff suppressed because it is too large. Load diff
@@ -1,3 +1,24 @@
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Collections;
@@ -1,3 +1,24 @@
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Runtime.InteropServices;
using System.Text;
@@ -1,3 +1,24 @@
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Collections;
using System.Text;
@@ -1,3 +1,24 @@
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Runtime.InteropServices;
using System.Text;
@@ -1,3 +1,24 @@
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Data;
using System.Runtime.InteropServices;
@@ -0,0 +1,69 @@
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Data;
using System.Runtime.InteropServices;
namespace IBM.Data.DB2
{
public delegate void DB2InfoMessageEventHandler(object sender, DB2InfoMessageEventArgs e);
public sealed class DB2InfoMessageEventArgs : EventArgs
{
private DB2ErrorCollection errors;
public DB2InfoMessageEventArgs(DB2ErrorCollection errors)
{
this.errors = errors;
}
public DB2ErrorCollection Errors
{
get
{
return errors;
}
}
public string Message
{
get
{
if(errors.Count > 0)
{
string result = "";
for(int i = 0; i < errors.Count; i++)
{
if(i > 0)
{
result += " ";
}
result += "INFO [" + errors[i].SQLState + "] " + errors[i].Message;
}
return result;
}
return "No information";
}
}
}
}
@@ -1,196 +1,211 @@
using System;
using System.Collections;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
namespace IBM.Data.DB2
{
internal sealed class DB2OpenConnection : IDisposable
{
private IntPtr dbHandle = IntPtr.Zero;
private DB2ConnectionSettings settings;
private bool disposed = false;
internal DateTime poolDisposalTime; // time to live used for disposal of connections in the connection pool
public bool transactionOpen;
public bool autoCommit = true;
private string databaseProductName;
private string databaseVersion;
private int majorVersion;
private int minorVersion;
public IntPtr DBHandle
{
get { return dbHandle; }
}
public string DatabaseProductName
{
get { return databaseProductName; }
}
public string DatabaseVersion
{
get { return databaseVersion; }
}
public int MajorVersion
{
get { return majorVersion; }
}
public int MinorVersion
{
get { return minorVersion; }
}
public DB2OpenConnection(DB2ConnectionSettings settings, DB2Connection connection)
{
this.settings = settings;
try
{
short sqlRet = DB2CLIWrapper.SQLAllocHandle(DB2Constants.SQL_HANDLE_DBC, DB2Environment.Instance.penvHandle, out dbHandle);
DB2ClientUtils.DB2CheckReturn(sqlRet, DB2Constants.SQL_HANDLE_DBC, DB2Environment.Instance.penvHandle, "Unable to allocate database handle in DB2Connection.", connection);
if(settings.Server.Length > 0)
{
StringBuilder outConnectStr = new StringBuilder(60); // TODO: ????
short numOutCharsReturned;
sqlRet = DB2CLIWrapper.SQLDriverConnect(dbHandle, IntPtr.Zero,
settings.ConnectionString, (short)settings.ConnectionString.Length,
outConnectStr, (short)outConnectStr.Length, out numOutCharsReturned,
DB2Constants.SQL_DRIVER_NOPROMPT /*SQL_DRIVER_COMPLETE*/);
}
else
{
sqlRet = DB2CLIWrapper.SQLConnect(dbHandle,
settings.DatabaseAlias, (short)settings.DatabaseAlias.Length,
settings.UserName, (short)settings.UserName.Length,
settings.PassWord, (short)settings.PassWord.Length);
DB2ClientUtils.DB2CheckReturn(sqlRet, DB2Constants.SQL_HANDLE_DBC, dbHandle, "Unable to connect to the database.", connection);
}
if((settings.Pool == null) || (settings.Pool.databaseProductName == null))
{
StringBuilder sb = new StringBuilder(256);
short stringLength;
sqlRet = DB2CLIWrapper.SQLGetInfo(dbHandle, /*SQL_DBMS_NAME*/17, sb, (short)(sb.Capacity / 2), out stringLength);
new DB2ErrorCollection(DB2Constants.SQL_HANDLE_DBC, dbHandle).ToString();
if(sqlRet == 0)
databaseProductName = sb.ToString(); //(0, Math.Min(sb.Capacity, stringLength / 2));
sqlRet = DB2CLIWrapper.SQLGetInfo(dbHandle, /*SQL_DBMS_VER*/18, sb, (short)(sb.Capacity / 2), out stringLength);
if(sqlRet == 0)
{
databaseVersion = sb.ToString(0, Math.Min(sb.Capacity, stringLength / 2));
try
{
string[] splitVersion = databaseVersion.Split('.');
majorVersion = int.Parse(splitVersion[0]);
minorVersion = int.Parse(splitVersion[1]);
}
catch{}
}
if(settings.Pool != null)
{
settings.Pool.databaseProductName = databaseProductName;
settings.Pool.databaseVersion = databaseVersion;
settings.Pool.majorVersion = majorVersion;
settings.Pool.minorVersion = minorVersion;
}
}
else if(settings.Pool != null)
{
if(settings.Pool != null)
{
databaseProductName = settings.Pool.databaseProductName;
databaseVersion = settings.Pool.databaseVersion;
majorVersion = settings.Pool.majorVersion;
minorVersion = settings.Pool.minorVersion;
}
}
}
catch
{
if(dbHandle != IntPtr.Zero)
{
DB2CLIWrapper.SQLFreeHandle(DB2Constants.SQL_HANDLE_DBC, dbHandle);
dbHandle = IntPtr.Zero;
}
throw;
}
}
public void RollbackDeadTransaction()
{
DB2CLIWrapper.SQLEndTran(DB2Constants.SQL_HANDLE_DBC, DBHandle, DB2Constants.SQL_ROLLBACK);
transactionOpen = false;
}
public void Close()
{
if(transactionOpen)
RollbackDeadTransaction();
if(settings.Pool != null)
{
settings.Pool.AddToFreeConnections(this);
}
else
{
Dispose();
}
}
private void FreeHandles()
{
if(dbHandle != IntPtr.Zero)
{
short sqlRet = DB2CLIWrapper.SQLDisconnect(dbHandle);
// Note that SQLDisconnect() automatically drops any statements and
// descriptors open on the connection.
sqlRet = DB2CLIWrapper.SQLFreeHandle(DB2Constants.SQL_HANDLE_DBC, dbHandle);
dbHandle = IntPtr.Zero;
}
}
#region IDisposable Members
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
private void Dispose(bool disposing)
{
if(!disposed)
{
if(disposing)
{
// dispose managed resources
}
FreeHandles();
}
disposed = true;
}
~DB2OpenConnection()
{
if(settings.Pool != null)
{
settings.Pool.OpenConnectionFinalized();
}
Dispose(false);
}
#endregion
}
}
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Collections;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
namespace IBM.Data.DB2
{
internal sealed class DB2OpenConnection : IDisposable
{
private IntPtr dbHandle = IntPtr.Zero;
private DB2ConnectionSettings settings;
private bool disposed = false;
internal DateTime poolDisposalTime; // time to live used for disposal of connections in the connection pool
public bool transactionOpen;
public bool autoCommit = true;
private string databaseProductName;
private string databaseVersion;
private int majorVersion;
private int minorVersion;
public IntPtr DBHandle
{
get { return dbHandle; }
}
public string DatabaseProductName
{
get { return databaseProductName; }
}
public string DatabaseVersion
{
get { return databaseVersion; }
}
public int MajorVersion
{
get { return majorVersion; }
}
public int MinorVersion
{
get { return minorVersion; }
}
public DB2OpenConnection(DB2ConnectionSettings settings, DB2Connection connection)
{
this.settings = settings;
try
{
short sqlRet = DB2CLIWrapper.SQLAllocHandle(DB2Constants.SQL_HANDLE_DBC, DB2Environment.Instance.penvHandle, out dbHandle);
DB2ClientUtils.DB2CheckReturn(sqlRet, DB2Constants.SQL_HANDLE_DBC, DB2Environment.Instance.penvHandle, "Unable to allocate database handle in DB2Connection.", connection);
if(settings.Server.Length > 0)
{
StringBuilder outConnectStr = new StringBuilder(60); // TODO: ????
short numOutCharsReturned;
sqlRet = DB2CLIWrapper.SQLDriverConnect(dbHandle, IntPtr.Zero,
settings.ConnectionString, (short)settings.ConnectionString.Length,
outConnectStr, (short)outConnectStr.Length, out numOutCharsReturned,
DB2Constants.SQL_DRIVER_NOPROMPT /*SQL_DRIVER_COMPLETE*/);
}
else
{
sqlRet = DB2CLIWrapper.SQLConnect(dbHandle,
settings.DatabaseAlias, (short)settings.DatabaseAlias.Length,
settings.UserName, (short)settings.UserName.Length,
settings.PassWord, (short)settings.PassWord.Length);
DB2ClientUtils.DB2CheckReturn(sqlRet, DB2Constants.SQL_HANDLE_DBC, dbHandle, "Unable to connect to the database.", connection);
}
if((settings.Pool == null) || (settings.Pool.databaseProductName == null))
{
StringBuilder sb = new StringBuilder(256);
short stringLength;
sqlRet = DB2CLIWrapper.SQLGetInfo(dbHandle, /*SQL_DBMS_NAME*/17, sb, (short)(sb.Capacity / 2), out stringLength);
new DB2ErrorCollection(DB2Constants.SQL_HANDLE_DBC, dbHandle).ToString();
if(sqlRet == 0)
databaseProductName = sb.ToString(0, Math.Min(sb.Capacity, stringLength / 2));
sqlRet = DB2CLIWrapper.SQLGetInfo(dbHandle, /*SQL_DBMS_VER*/18, sb, (short)(sb.Capacity / 2), out stringLength);
if(sqlRet == 0)
{
databaseVersion = sb.ToString(0, Math.Min(sb.Capacity, stringLength / 2));
try
{
string[] splitVersion = databaseVersion.Split('.');
majorVersion = int.Parse(splitVersion[0]);
minorVersion = int.Parse(splitVersion[1]);
}
catch{}
}
if(settings.Pool != null)
{
settings.Pool.databaseProductName = databaseProductName;
settings.Pool.databaseVersion = databaseVersion;
settings.Pool.majorVersion = majorVersion;
settings.Pool.minorVersion = minorVersion;
}
}
else if(settings.Pool != null)
{
if(settings.Pool != null)
{
databaseProductName = settings.Pool.databaseProductName;
databaseVersion = settings.Pool.databaseVersion;
majorVersion = settings.Pool.majorVersion;
minorVersion = settings.Pool.minorVersion;
}
}
}
catch
{
if(dbHandle != IntPtr.Zero)
{
DB2CLIWrapper.SQLFreeHandle(DB2Constants.SQL_HANDLE_DBC, dbHandle);
dbHandle = IntPtr.Zero;
}
throw;
}
}
public void RollbackDeadTransaction()
{
DB2CLIWrapper.SQLEndTran(DB2Constants.SQL_HANDLE_DBC, DBHandle, DB2Constants.SQL_ROLLBACK);
transactionOpen = false;
}
public void Close()
{
if(transactionOpen)
RollbackDeadTransaction();
if(settings.Pool != null)
{
settings.Pool.AddToFreeConnections(this);
}
else
{
Dispose();
}
}
private void FreeHandles()
{
if(dbHandle != IntPtr.Zero)
{
short sqlRet = DB2CLIWrapper.SQLDisconnect(dbHandle);
// Note that SQLDisconnect() automatically drops any statements and
// descriptors open on the connection.
sqlRet = DB2CLIWrapper.SQLFreeHandle(DB2Constants.SQL_HANDLE_DBC, dbHandle);
dbHandle = IntPtr.Zero;
}
}
#region IDisposable Members
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
private void Dispose(bool disposing)
{
if(!disposed)
{
if(disposing)
{
// dispose managed resources
}
FreeHandles();
}
disposed = true;
}
~DB2OpenConnection()
{
if(settings.Pool != null)
{
settings.Pool.OpenConnectionFinalized();
}
Dispose(false);
}
#endregion
}
}
File diff suppressed because it is too large. Load diff
@@ -1,3 +1,24 @@
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Data;
using System.Collections;
@@ -1,3 +1,24 @@
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Data;
using System.Data.Common;
@@ -1,3 +1,24 @@
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace IBM.Data.DB2 {
@@ -1,3 +1,24 @@
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Data;
using System.Data.Common;
@@ -1,3 +1,24 @@
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace IBM.Data.DB2 {
@@ -1,3 +1,24 @@
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Data;
using System.Runtime.InteropServices;
@@ -1,3 +1,24 @@
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace IBM.Data.DB2
@@ -32,4 +53,39 @@ namespace IBM.Data.DB2
RowId = 25,
XmlReader = 26,
}
public class DB2TypeConverter
{
public static Type GetManagedType(int sql_type)
{
switch(sql_type)
{
case DB2Constants.SQL_INTEGER:
return typeof(int);
case DB2Constants.SQL_SMALLINT:
return typeof(short);
case DB2Constants.SQL_BIGINT:
return typeof(long);
case DB2Constants.SQL_DOUBLE:
return typeof(double);
case DB2Constants.SQL_DECIMAL:
return typeof(decimal);
case DB2Constants.SQL_DATETIME:
case DB2Constants.SQL_TYPE_DATE:
case DB2Constants.SQL_TYPE_TIMESTAMP:
return typeof(DateTime);
case DB2Constants.SQL_TYPE_TIME:
return typeof(TimeSpan);
case DB2Constants.SQL_CHAR:
case DB2Constants.SQL_VARCHAR:
case DB2Constants.SQL_TYPE_CLOB:
return typeof(string);
case DB2Constants.SQL_TYPE_BLOB:
case DB2Constants.SQL_TYPE_BINARY:
case DB2Constants.SQL_LONGVARBINARY:
case DB2Constants.SQL_VARBINARY:
return typeof(byte[]);
}
throw new NotImplementedException("Unknown SQL type " + sql_type);
}
}
}
+4
View File
@@ -7,5 +7,9 @@ LIB_MCS_FLAGS = /unsafe /r:$(corlib) /r:System.dll \
/r:System.Xml.dll /r:System.Data.dll
NO_TEST = yes
ifeq (net_2_0, $(PROFILE))
all-local install-local test-local run-test-local clean-local dist-local uninstall-local:
else
include ../../build/library.make
endif
@@ -1,3 +1,8 @@
2004-06-21 Raja R Harinath <[email protected]>
* Makefile (LIBRARY_SNK): Sign with SharpZipLib.key. The library
is delay-signed according to ICSharpCode.SharpZipLib/AssemblyInfo.cs.
2004-06-09 Sebastien Pouliot <[email protected]>
* Makefile: Don't sign this assembly as it is fully signed during
@@ -47,7 +47,12 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
#if NET_2_0
[assembly: AssemblyVersion("2.6.0.0")]
#else
// not worrying about the NET_1_0 profile for now.
[assembly: AssemblyVersion("0.6.0.0")]
#endif
[assembly: AssemblyDelaySign(true)]
[assembly: AssemblyKeyFile ("SharpZipLib.pub")]
@@ -1,5 +1,10 @@
2004-06-24 Raja R Harinath <[email protected]>
* AssemblyInfo.cs (AssemblyVersion): Set different version for the
net_2_0 profile.
2004-05-28 Duncan Mak <[email protected]>
* AssemblyInfo.cs: Use the new SharpZipLib.pub.
* Zip/Compression/DeflaterHuffman.cs (FlushBlock): Add some
parenthesis to help the generics compiler read this source.
parenthesis to help the generics compiler read this source.
Loaded 100 of 4601 files, more files were not shown because too many files have changed in this diff. Show more