Compare commits

...
1507 Commits
Author SHA1 Message Date
nobody 920d6fe40d This commit was manufactured by cvs2svn to create tag 'MONO_0_95'.
svn path=/tags/MONO_0_95/mono/; revision=28568
2004-05-31 17:51:14 +00:00
Miguel de Icaza 3389912d8f This is Beta2
svn path=/trunk/mono/; revision=28567
2004-05-31 17:51:14 +00:00
Miguel de Icaza f131483ce6 UPdate
svn path=/trunk/mono/; revision=28566
2004-05-31 17:28:06 +00:00
Atsushi Eno f2bfd9fe48 2004-05-31 Atsushi Enomoto <[email protected]>
* XmlDataInferenceLoader.cs : Fixed GetMappedTable() that incorrectly
	  rejected same-named tables in different hierarchy. Thanks to Boris.

svn path=/trunk/mcs/; revision=28565
2004-05-31 17:16:55 +00:00
Ben Maurer e45a69164c add multi-6
svn path=/trunk/mcs/; revision=28564
2004-05-31 17:12:21 +00:00
Gonzalo Paniagua Javier 1602cb9de7 2004-05-31 Gonzalo Paniagua Javier <[email protected]>
* configure.in: fixlets for windows.

svn path=/trunk/mono/; revision=28562
2004-05-31 17:01:48 +00:00
Paolo Molaro d273b61a20 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <[email protected]>
* mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
	regressions in gtk-sharp.

svn path=/trunk/mono/; revision=28561
2004-05-31 17:01:25 +00:00
Miguel de Icaza 81e825559a 2004-05-31 Miguel de Icaza <[email protected]>
* Reverted patch to namespace.cs (Use lookuptypedirect).  This
	caused a regression: #59343.  Referencing nested classes from an
	assembly stopped working.

svn path=/trunk/mcs/; revision=28560
2004-05-31 16:57:21 +00:00
Atsushi Eno b1000500d6 2004-05-31 Atsushi Enomoto <[email protected]>
* XmlDiffLoader.cs : Added some Skip() that is required not to go to
	  infinite loop. Thanks to Boris for this fix.

svn path=/trunk/mcs/; revision=28558
2004-05-31 16:50:16 +00:00
Atsushi Eno 4557407d6d 2004-05-31 Atsushi Enomoto <[email protected]>
* Directory.cs, File.cs : Fixed Exists() that raised
	  DirectoryNotFoundException. Quick fix for bug #59354.

svn path=/trunk/mcs/; revision=28557
2004-05-31 16:44:03 +00:00
Zoltan Varga a84be32229 2004-05-31 Zoltan Varga <[email protected]>
* marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.

svn path=/trunk/mono/; revision=28555
2004-05-31 15:47:57 +00:00
Miguel de Icaza 862d515398 Updated with new tests
svn path=/trunk/mcs/; revision=28554
2004-05-31 15:18:47 +00:00
Miguel de Icaza 27adaadb5b Add new test files
svn path=/trunk/mcs/; revision=28553
2004-05-31 15:13:25 +00:00
Atsushi Eno 0820f840a5 2004-05-31 Atsushi Enomoto <[email protected]>
* SignedXml.cs : partial fix for bug #59165 that does not output
	  namespace that conflicts with element's namespace.

svn path=/trunk/mcs/; revision=28551
2004-05-31 12:06:45 +00:00
Atsushi Eno 87aa3d424c The latest tests were by Boris Kirzner (thanks!)
svn path=/trunk/mcs/; revision=28550
2004-05-31 10:47:19 +00:00
Atsushi Eno acec2a5772 2004-05-31 Atsushi Enomoto <[email protected]>
* DataTableTest.cs : Added test for serialization.
	* DataSetInferXmlSchemaTest.cs : Added test for schema element skip.

svn path=/trunk/mcs/; revision=28549
2004-05-31 10:45:27 +00:00
Atsushi Eno c4c84f3d00 2004-05-31 Atsushi Enomoto <[email protected]>
* XmlDataInferenceLoader.cs : XmlSchema elements should not be infered.
	  Thanks to Boris for this fix.

svn path=/trunk/mcs/; revision=28548
2004-05-31 10:29:27 +00:00
Atsushi Eno d538cb0571 2004-05-31 Atsushi Enomoto <[email protected]>
* RncParser.jay : now error output is disabled.
	* RncTokenizer.cs : It should not be public class.

svn path=/trunk/mcs/; revision=28547
2004-05-31 10:23:31 +00:00
Atsushi Eno 9c5f8f2746 2004-05-31 Atsushi Enomoto <[email protected]>
* Misc.cs : made Util class internal.
	* RelaxngDatatypeProvider.cs : looks commit was missing.
	* RelaxngException.cs : made one .ctor() internal that accepts
	  RdpPattern.
	* RelaxngNameClas.cs : Names list should not be settable.
	* RelaxngPattern.cs : RelaxngRefPattern class is internal use only.
	* RelaxngPatternType.cs : there is not "Include" pattern.

svn path=/trunk/mcs/; revision=28546
2004-05-31 10:22:51 +00:00
Atsushi Eno da5275f248 2004-05-31 Atsushi Enomoto <[email protected]>
* anglia-test-runner.cs : Added support for RELAX NG compact syntax
	  parser tests.
	* Makefile : added anglia-test support.
	* README : ditto.

svn path=/trunk/mcs/; revision=28545
2004-05-31 10:22:02 +00:00
Rafael Teixeira 776110a374 2004-05-31 Rafael Teixeira <[email protected]>
* OptionDetails.cs : ShortForm member now a string to favor some simplifications, fixes for Bug 58672
	* OptionList.cs : Fixes for Bug 58672 and better handling for mixed-form options (linux/windows)

svn path=/trunk/mcs/; revision=28543
2004-05-31 09:15:09 +00:00
Rafael Teixeira 386481ff06 Exercise Mono.GetOptions a bit in the testmbas/WriteOK.exe target
svn path=/trunk/mcs/; revision=28542
2004-05-31 08:57:22 +00:00
Ravindra 956c67906f * pie.cs: Made the output image little organized and added a
case where DrawPie and FillPie were crashing the system. It
	was happening with zero degree sweep angle.

svn path=/trunk/mcs/; revision=28541
2004-05-31 08:43:54 +00:00
Rafael Teixeira a9c884eaef 2004-05-31 Rafael Teixeira <[email protected]>
* OptionDetails.cs: Assemble an one-line authors' list in about processor (also abandon after about)

svn path=/trunk/mcs/; revision=28534
2004-05-31 07:03:50 +00:00
Rafael Teixeira 86a295501e 2004/05/31 Rafael Teixeira <[email protected]>
* AssemblyInfo.cs : Anirban is and author too

svn path=/trunk/mcs/; revision=28532
2004-05-31 07:00:05 +00:00
Rafael Teixeira 7ebae8306a 2004-05-31 Rafael Teixeira <[email protected]>
* Financial.cs:
		Correct IRR and MIRR method signatures and prevent public default constructor, all according to Class Status Page (corcompare)

svn path=/trunk/mcs/; revision=28530
2004-05-31 05:35:21 +00:00
Rafael Teixeira b1853cba15 BETTER ALPHA WARNING
svn path=/trunk/mcs/; revision=28529
2004-05-31 04:51:11 +00:00
Martin Baulig 5d7664c3cc 2004-05-31 Martin Baulig <[email protected]>
MCS is now frozen for beta 2.

svn path=/trunk/mcs/; revision=28528
2004-05-31 02:55:34 +00:00
Martin Baulig 1390efe910 **** Merged from MCS ****
svn path=/trunk/mcs/; revision=28527
2004-05-31 02:46:01 +00:00
Martin Baulig b5c5563b18 **** Merged from MCS ****
svn path=/trunk/mcs/; revision=28526
2004-05-31 02:44:20 +00:00
Martin Baulig a02bf8816d Reverted everything back until 14:15 this afternoon.
svn path=/trunk/mcs/; revision=28525
2004-05-31 02:32:48 +00:00
Martin Baulig 7e9bc7847d 2004-05-30 Ben Maurer <[email protected]>
* decl.cs: If possible, use lookuptypedirect here. We can only do
	this if there is no `.' after the namespace. Avoids using
	LookupType, which does lots of slow processing.
	(FindNestedType) New method, does what it says :-).
	* namespace.cs: use LookupTypeDirect.
	* rootcontext.cs: use membercache, if possible.
	* typemanager.cs (LookupTypeDirect): Cache negative hits too.

svn path=/trunk/mcs/; revision=28523
2004-05-31 02:31:16 +00:00
Martin Baulig 42981c413a 2004-05-30 Ben Maurer <[email protected]>
* expression.cs:
	According to the spec,

	In a member access of the form E.I, if E is a single identifier,
	and if the meaning of E as a simple-name (�7.5.2) is a constant,
	field, property, localvariable, or parameter with the same type as
	the meaning of E as a type-name (�3.8), then both possible
	meanings of E are permitted.

	We did not check that E as a simple-name had the same type as E as
	a type name.

	This trivial check gives us 5-7% on bootstrap time.

2004-05-30 Ben Maurer  <[email protected]>

	* expression.cs (Invocation.OverloadResolve): Avoid the
	use of hashtables and boxing here by allocating on demand.

svn path=/trunk/mcs/; revision=28522
2004-05-31 02:26:38 +00:00
Martin Baulig d31c6ef8d0 2004-05-30 Martin Baulig <[email protected]>
* rootcontext.cs (RootContext.LookupType): Don't cache things if
	we're doing a silent lookup.  Don't try to lookup nested types in
	TypeManager.object_type (thanks to Ben Maurer).

2004-05-30  Martin Baulig  <[email protected]>

	Committing a patch from Ben Maurer.

	* rootcontext.cs (RootContext.LookupType): Cache negative results.

svn path=/trunk/mcs/; revision=28521
2004-05-31 02:24:04 +00:00
Martin Baulig 7af71bde6d Reverted everything back until 14:15:00 this afternoon.
svn path=/trunk/mcs/; revision=28520
2004-05-31 02:12:45 +00:00
Martin Baulig 53624cf702 Moved the marker again.
svn path=/trunk/mcs/; revision=28519
2004-05-31 01:18:45 +00:00
Martin Baulig 4f900ec539 **** Merged from MCS ****
svn path=/trunk/mcs/; revision=28518
2004-05-31 01:18:06 +00:00
Ben Maurer aa976d180b hush little baby, dont say a word
svn path=/trunk/mcs/; revision=28517
2004-05-31 01:13:30 +00:00
Ben Maurer 9221c586f1 disable this for now
svn path=/trunk/mcs/; revision=28516
2004-05-31 01:11:56 +00:00
Ben Maurer 74df29cff8 2004-05-30 Ben Maurer <[email protected]>
* convert.cs: add a trivial cache for overload operator resolution.

svn path=/trunk/mcs/; revision=28515
2004-05-30 23:11:04 +00:00
Ben Maurer f333a7fbb7 revert this patch, it broke the build
svn path=/trunk/mcs/; revision=28514
2004-05-30 22:49:58 +00:00
Jackson Harper 518da7775c * library.make: Install to 2.0 package if building with the
net_2_0 profile.

svn path=/trunk/mcs/; revision=28513
2004-05-30 22:44:38 +00:00
Ben Maurer de1565c510 2004-05-31 Marek Safar <[email protected]>
* attribute.cs
	(AttributeTester.GetObsoleteAttribute): Returns instance of
	ObsoleteAttribute when type is obsolete.

	* class.cs
	(TypeContainer.VerifyObsoleteAttribute): Override.
	(Method.GetSignatureForError): New method for usage when MethodBuilder is null.
	(MethodCode.VerifyObsoleteAttribute): Override.

svn path=/trunk/mcs/; revision=28512
2004-05-30 22:10:04 +00:00
Marek Safar df8d224980 2004-05-31 Marek Safar <[email protected]>
* attribute.cs
	(AttributeTester.GetObsoleteAttribute): Returns instance of
	ObsoleteAttribute when type is obsolete.

	* class.cs
	(TypeContainer.VerifyObsoleteAttribute): Override.
	(Method.GetSignatureForError): New method for usage when MethodBuilder is null.
	(MethodCode.VerifyObsoleteAttribute): Override.
	(MemberBase.VerifyObsoleteAttribute): Override.

	* decl.cs
	(MemberCore.CheckUsageOfObsoleteAttribute): Tests presence of ObsoleteAttribute
	and report proper error.

	*delegate.cs
	(Delegate.VerifyObsoleteAttribute): Override.

	* ecore.cs
	(Expression.CheckObsoleteAttribute): Tests presence of ObsoleteAttribute
	and report proper error.
	(FieldExpr.DoResolve): Added tests for ObsoleteAttribute.

	* enum.cs
	(Enum.GetObsoleteAttribute): Returns ObsoleteAttribute for both enum type
	and enum member.

	* expression.cs
	(Probe.DoResolve, Cast.DoResolve, LocalVariableReference.DoResolve,
	New.DoResolve, SizeOf.DoResolve, TypeOf.DoResolce, MemberAccess.DoResolve):
	Added test for ObsoleteAttribute.

	* statement.cs
	(Catch): Derived from Statement.

svn path=/trunk/mcs/; revision=28511
2004-05-30 21:56:07 +00:00
Marek Safar 27e7e8ce15 2004-05-31 Marek Safar <[email protected]>
* attribute.cs
	(GetConditionalAttributeValue): New method. Returns
	condition of ConditionalAttribute.
	(SearchMulti): New method.  Returns all attributes of type 't'.
	Use it when attribute is AllowMultiple = true.

	* class.cs
	(Method.IsExcluded): Implemented. Returns true if method has conditional
	attribute and the conditions is not defined (method is excluded).
	(IMethodData): Extended interface for ConditionalAttribute support.
	(PropertyMethod.IsExcluded): Implemented.

svn path=/trunk/mcs/; revision=28510
2004-05-30 21:37:08 +00:00
Martin Baulig c69e5cf3df Oooops, forgot to add this.
svn path=/trunk/mcs/; revision=28509
2004-05-30 21:32:23 +00:00
Marek Safar 88c51c34b5 2004-05-30 Marek Safar <[email protected]>
* test-240.cs: Enable test.

svn path=/trunk/mcs/; revision=28508
2004-05-30 21:28:21 +00:00
Gonzalo Paniagua Javier a2890ef65c 2004-05-30 Gonzalo Paniagua Javier <[email protected]>
* Mono.Data.SqliteClient.dll.sources: added SqliteTransaction.cs

	* Mono.Data.SqliteClient/SqliteConnection.cs:
	* Mono.Data.SqliteClient/SqliteTransaction.cs: patch from
	[email protected] that adds transactions support.

svn path=/trunk/mcs/; revision=28507
2004-05-30 20:50:33 +00:00
Gonzalo Paniagua Javier 370c785c91 2004-05-30 Gert Driesen ([email protected])
* SetWin32ContextInIDispatchAttribute.cs: only build
	for NET_2_0 profile
	* VariantWrapper.cs: only build for NET_2_0 profile

svn path=/trunk/mcs/; revision=28506
2004-05-30 20:42:47 +00:00
Ben Maurer 03fc690667 2004-05-30 Ben Maurer <[email protected]>
* expression.cs:
	According to the spec,

	In a member access of the form E.I, if E is a single identifier,
	and if the meaning of E as a simple-name (�7.5.2) is a constant,
	field, property, localvariable, or parameter with the same type as
	the meaning of E as a type-name (�3.8), then both possible
	meanings of E are permitted.

	We did not check that E as a simple-name had the same type as E as
	a type name.

	This trivial check gives us 5-7% on bootstrap time.

svn path=/trunk/mcs/; revision=28505
2004-05-30 20:37:58 +00:00
Ben Maurer 9027e9d1b2 add this
svn path=/trunk/mcs/; revision=28504
2004-05-30 20:33:08 +00:00
Atsushi Eno e21ad29117 2004-05-30 Atsushi Enomoto <[email protected]>
* RncTests.cs : fixed test that got impossible to build anymore.

svn path=/trunk/mcs/; revision=28503
2004-05-30 20:23:52 +00:00
Atsushi Eno 5cd74c6e93 2004-05-30 Atsushi Enomoto <[email protected]>
* RncParser.jay :
	  Now RncParser.Parse() returns RelaxngPattern, not RelaxngGrammar.
	  Fixed many "confusing RelaxngPattern and RelaxngPatternList"
	  problems, and ditto for other "List" stuff.
	  To avoid complex situations, mostly removed unused annotation stuff.

svn path=/trunk/mcs/; revision=28502
2004-05-30 20:23:26 +00:00
Atsushi Eno f03957145f 2004-05-30 Atsushi Enomoto <[email protected]>
* RelaxngDatatypeProvider.cs : removed meaningless using alias.
	* RelaxngGrammar.cs : modified ArrayList to RelaxngGrammarContentList.
	  RelaxngMergedProvider.cs : Added #if PNET switch to support non-
	  xmlschema available environment.
	* RelaxngPattern.cs : added IGrammarContent and
	  RelaxngGrammarContentList.

svn path=/trunk/mcs/; revision=28501
2004-05-30 20:22:51 +00:00
Miguel de Icaza 022f2a162c Start
svn path=/trunk/mono/; revision=28500
2004-05-30 20:18:01 +00:00
Martin Baulig 8bdc8dbbb8 2004-05-30 Martin Baulig <[email protected]>
* Makefile (net_2_0_dir): New variable; also use the correct
	directory here.

svn path=/trunk/mcs/; revision=28499
2004-05-30 19:52:04 +00:00
Marek Safar 86108c6777 2004-05-30 Marek Safar <[email protected]>
Fixed bug #59071 & cs0160.cs
	* statement.cs (Try.Resolve): Check here whether order of catch
	clauses matches their dependencies.

svn path=/trunk/mcs/; revision=28498
2004-05-30 19:51:00 +00:00
Sebastien Pouliot 782aff048c 2004-05-30 Sebastien Pouliot <[email protected]>
* FileStream.cs: Added missing validations.

svn path=/trunk/mcs/; revision=28497
2004-05-30 19:34:26 +00:00
Sebastien Pouliot 3666377b63 2004-05-30 Sebastien Pouliot <[email protected]>
* FileStream.cs: Lots of new tests for exception handling (negatives,
	disposed) and test reading a byte ast the end of the stream.

svn path=/trunk/mcs/; revision=28496
2004-05-30 19:18:50 +00:00
Atsushi Eno b20f049e63 2004-05-30 Atsushi Enomoto <[email protected]>
* DataTable.cs : serialization .ctor() should use XmlReadMode.DiffGram
	  for ReadXml(). Thanks to Boris.

svn path=/trunk/mcs/; revision=28495
2004-05-30 19:13:00 +00:00
Marek Safar 2f31aa3e43 2004-05-30 Marek Safar <[email protected]>
* cs1017.cs: New test.

svn path=/trunk/mcs/; revision=28494
2004-05-30 19:08:00 +00:00
Marek Safar b18d980fab 2004-05-30 Marek Safar <[email protected]>
Fixed bug #58624
	* ecore.cs (SimpleName.SimpleNameResolve): Added test for
	unsafe type.

svn path=/trunk/mcs/; revision=28493
2004-05-30 19:00:12 +00:00
Jackson Harper d857e242ab * AssemblyInfo.cs: Sign corlib for net_2_0 now too.
svn path=/trunk/mcs/; revision=28492
2004-05-30 17:58:43 +00:00
Sebastien Pouliot c716a7bd6f 2004-05-30 Sebastien Pouliot <[email protected]>
* BufferedStreamTest.cs: Added tests for Position after SetLength,
	SetLength after Close and Seek logic exception handling.
	* FileStream.cs: Added test for invalid SeekOrigin in Seek.
	* MemoryStream.cs: Added test for Seek after Close.

svn path=/trunk/mcs/; revision=28491
2004-05-30 17:58:09 +00:00
Sebastien Pouliot 50ad571d70 2004-05-30 Sebastien Pouliot <[email protected]>
* BufferedStream.cs: Fixed Seek logic (check for CanSeek and dispose).
	SetLength must also reset Position and check for dispose.
	* FileStream.cs: Added missing check for invalid SeekOrigin.

svn path=/trunk/mcs/; revision=28490
2004-05-30 17:52:35 +00:00
Jackson Harper 1fc3bcc2b8 * reflection.c: Do not hardcode assembly versions or public key
tokens anymore. All of this except the corlib section was dead
	code anyways.

svn path=/trunk/mono/; revision=28489
2004-05-30 17:19:24 +00:00
Martin Baulig 94abf32795 Small fix for NET_2_0.
svn path=/trunk/mcs/; revision=28488
2004-05-30 17:17:15 +00:00
Martin Baulig b47870a87b Small fix.
svn path=/trunk/mcs/; revision=28487
2004-05-30 17:04:33 +00:00
Martin Baulig 957bc1dbe3 Make things work again.
This should have been done during merging.

svn path=/trunk/mcs/; revision=28486
2004-05-30 16:59:41 +00:00
Martin Baulig a5d9b3f229 Fix typo (base_classs_type' -> base_class_type').
svn path=/trunk/mcs/; revision=28485
2004-05-30 16:20:02 +00:00
Martin Baulig 374bdf5cd7 Moved the marker.
svn path=/trunk/mcs/; revision=28484
2004-05-30 16:08:34 +00:00
Martin Baulig fee32a49f5 **** Merged from MCS ****
svn path=/trunk/mcs/; revision=28483
2004-05-30 16:06:13 +00:00
Ben Maurer c7f63eecba 2004-05-30 Ben Maurer <[email protected]>
* expression.cs (Invocation.OverloadResolve): Avoid the
	use of hashtables and boxing here by allocating on demand.

svn path=/trunk/mcs/; revision=28482
2004-05-30 15:48:50 +00:00
Martin Baulig 3920aa8c5c 2004-05-30 Martin Baulig <[email protected]>
* rootcontext.cs (RootContext.LookupType): Don't cache things if
	we're doing a silent lookup.  Don't try to lookup nested types in
	TypeManager.object_type (thanks to Ben Maurer).

svn path=/trunk/mcs/; revision=28481
2004-05-30 15:42:56 +00:00
Sebastien Pouliot 502882dde2 2004-05-30 Sebastien Pouliot <[email protected]>
* BinaryReader.cs: Added missing disposed check for most methods.
	Reordered some exceptions to match MS implementation.

svn path=/trunk/mcs/; revision=28480
2004-05-30 15:10:15 +00:00
Martin Baulig 6a30d9b3c6 2004-05-30 Martin Baulig <[email protected]>
Merged latest changes into gmcs.  Please keep this comment in
	here, it makes it easier for me to see what changed in MCS since
	the last time I merged.

svn path=/trunk/mcs/; revision=28477
2004-05-30 14:12:23 +00:00
Martin Baulig e1029c24e4 **** Merged from MCS ****
svn path=/trunk/mcs/; revision=28476
2004-05-30 14:10:53 +00:00
Martin Baulig e6971e6673 2004-05-30 Martin Baulig <[email protected]>
Committing a patch from Ben Maurer.

	* rootcontext.cs (RootContext.LookupType): Cache negative results.

svn path=/trunk/mcs/; revision=28475
2004-05-30 12:58:09 +00:00
Gonzalo Paniagua Javier 2f8403bcf4 *** empty log message ***
svn path=/trunk/mcs/; revision=28474
2004-05-30 11:57:18 +00:00
Gonzalo Paniagua Javier 83c5cdea3c 2004-05-30 Gonzalo Paniagua Javier <[email protected]>
* DateTime.cs: adjust milliseconds for fraction specifier ('f').

svn path=/trunk/mcs/; revision=28473
2004-05-30 11:45:33 +00:00
David Sheldon cd7a35cae1 2004-05-30 David Sheldon <[email protected]>
* StackFrameTest.cs: Mark the failures that have been failing
	for months due to bug 45730 as ignored as it doesn't look like
	it will be fixed soon.

My aim with these commits is that eventually people will run the test cases,
and see what errors they have caused, rather than tens of pages of stacktraces.

svn path=/trunk/mcs/; revision=28472
2004-05-30 08:23:00 +00:00
David Sheldon b03e7fffb8 2004-05-30 David Sheldon <[email protected]>
* DecimalTest.cs: Moved the rounding test that fails due to
    bug 37744 (bankers rounding) into its own test, and annotated it as ignored
    until the bug is fixed.

svn path=/trunk/mcs/; revision=28471
2004-05-30 08:02:01 +00:00
Miguel de Icaza 819395604c 2004-05-30 Miguel de Icaza <[email protected]>
* Console.cs: Remove *again* the version of WriteLine with four
	arguments;  That should *not* be added.

	Flag it as internal as people migrate their code.

svn path=/trunk/mcs/; revision=28469
2004-05-30 05:39:21 +00:00
Atsushi Eno 4fc67d1a14 2004-05-30 Atsushi Enomoto <[email protected]>
* XmlTextReader.cs : Fixed version mismatch; ProhibitDtd should be
	  NET_2_0.

svn path=/trunk/mcs/; revision=28468
2004-05-30 04:07:19 +00:00
Sebastien Pouliot 2c47c798a5 2004-05-29 Sebastien Pouliot <[email protected]>
* BinaryReader.cs: Added new cases to check exceptions thrown by Read
	methods.

svn path=/trunk/mcs/; revision=28467
2004-05-29 22:44:01 +00:00
Zoltan Varga 4a791732ff 2004-05-29 Zoltan Varga <[email protected]>
* invoke.cs: Add an Invoke test.

svn path=/trunk/mono/; revision=28465
2004-05-29 19:22:32 +00:00
Zoltan Varga a1e21f8406 2004-05-29 Zoltan Varga <[email protected]>
* object.c (mono_runtime_invoke_array): Automatically create boxed
	objects for byref valuetypes if needed. Fixes #59300.

svn path=/trunk/mono/; revision=28464
2004-05-29 19:20:49 +00:00
Sebastien Pouliot 942bdbd5f4 2004-05-29 Sebastien Pouliot <[email protected]>
* Convert.cs: Fixed ChangeTo where null could be misinterpreted
	between null and Empty.

svn path=/trunk/mcs/; revision=28462
2004-05-29 18:47:09 +00:00
Zoltan Varga ae63609233 2004-05-29 Zoltan Varga <[email protected]>
* object.c (mono_method_return_message_restore): Handle
	MONO_TYPE_OBJECT as well.

svn path=/trunk/mono/; revision=28461
2004-05-29 18:29:35 +00:00
Zoltan Varga 5e69101fb5 2004-05-29 Zoltan Varga <[email protected]>
* exceptions.cs: New regression tests.

	* jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.

svn path=/trunk/mono/; revision=28460
2004-05-29 18:16:08 +00:00
Sebastien Pouliot 71e6af6bfb 2004-05-29 Sebastien Pouliot <[email protected]>
* ConvertTest.cs: Added test to ChangeType to Empty.

svn path=/trunk/mcs/; revision=28459
2004-05-29 18:12:28 +00:00
Martin Baulig 4cb79d4939 2004-05-29 Martin Baulig <[email protected]>
* class.cs (IMethodData.ShouldIgnore): New method.

	* typemanager.cs (TypeManager.MethodFlags): Don't take a
	`Location' argument, we don't need it anywhere.  Use
	`IMethodData.ShouldIgnore ()' instead of
	`MethodData.GetMethodFlags ()'.
	(TypeManager.AddMethod): Removed.
	(TypeManager.AddMethod2): Renamed to AddMethod.

svn path=/trunk/mcs/; revision=28458
2004-05-29 18:03:07 +00:00
Martin Baulig c299d9423a 2004-05-29 Martin Baulig <[email protected]>
* test-266.cs: New test for #52578.

svn path=/trunk/mcs/; revision=28457
2004-05-29 17:41:42 +00:00
Martin Baulig 4b82041b60 2004-05-29 Martin Baulig <[email protected]>
Committing a patch from Benjamin Jemlich <[email protected]>.

	* convert.cs (Convert.ImplicitReferenceConversion): If we're
	converting from a class type S to an interface type and we already
	have an object on the stack, don't box it again.  Fixes #52578.

svn path=/trunk/mcs/; revision=28456
2004-05-29 17:40:21 +00:00
Martin Baulig fe699eac7f 2004-05-29 Martin Baulig <[email protected]>
* test-265.cs: New test for #59267.

svn path=/trunk/mcs/; revision=28455
2004-05-29 17:29:34 +00:00
Martin Baulig 1a336cbb03 2004-05-29 Martin Baulig <[email protected]>
* test-264.cs: New test for #59188.

svn path=/trunk/mcs/; revision=28454
2004-05-29 17:28:30 +00:00
Martin Baulig 6cb5277b61 2004-05-29 Martin Baulig <[email protected]>
* class.cs (ConstructorInitializer.GetOverloadedConstructor):
	Added support for `params' parameters.  Fixes #59267.

svn path=/trunk/mcs/; revision=28453
2004-05-29 17:27:57 +00:00
Sebastien Pouliot ac9098f000 2004-05-29 Sebastien Pouliot <[email protected]>
* Convert.cs: Fixed ToSByte(string,IFormatProvider) to throw
	ArgumentNullException (only case, all other returns 0). Fixed exception
	reporting for hex prefix only strings.

svn path=/trunk/mcs/; revision=28450
2004-05-29 16:56:04 +00:00
Miguel de Icaza 4b541b39b1 Update
svn path=/trunk/mono/; revision=28448
2004-05-29 16:42:23 +00:00
Miguel de Icaza bf7f10d598 update
svn path=/trunk/mcs/; revision=28447
2004-05-29 16:41:43 +00:00
Miguel de Icaza b346b5fdd2 up
svn path=/trunk/mcs/; revision=28446
2004-05-29 16:40:57 +00:00
Zoltan Varga 6dd9ea60dd 2004-05-29 Zoltan Varga <[email protected]>
* configure.in: export CC instead of passing it to libgc/configure.

svn path=/trunk/mono/; revision=28445
2004-05-29 16:32:27 +00:00
Sebastien Pouliot 3f625156e6 2004-05-29 Sebastien Pouliot <[email protected]>
* ConvertTest.cs: Added new parsing tests including special case for
	Convert.ToSByte.
	* Int64Test.cs: Added new test cases for overflows.

svn path=/trunk/mcs/; revision=28444
2004-05-29 16:31:32 +00:00
Gonzalo Paniagua Javier d311a8974f 2004-05-29 Gonzalo Paniagua Javier <[email protected]>
* ChangeLog:
	* Comparer.cs: reverted last 2 patches from Gert Driesen. Totally wrong.
	I wonder why.

svn path=/trunk/mcs/; revision=28441
2004-05-29 14:56:35 +00:00
Sebastien Pouliot a9dc7c1423 2004-05-29 Sebastien Pouliot <[email protected]>
* CspProviderFlags.cs: Reverted previous patch as UseExistingKey isn't
	part of the 1.0/1.1 framework.

svn path=/trunk/mcs/; revision=28440
2004-05-29 14:48:10 +00:00
Gonzalo Paniagua Javier 560e4580b9 2004-05-29 Gonzalo Paniagua Javier <[email protected]>
* ObjectWriter.cs: reduce contention in GetObjectData.

svn path=/trunk/mcs/; revision=28439
2004-05-29 14:23:10 +00:00
Gert Driesen ddc29a68dc * System.Messaging/Acknowledgment.cs: added/corrected values,
removed TODO
* System.Messaging/MessageQueueErrorCode.cs: fixed typo
* System.Messaging/MessageQueueAccessRights.cs: removed extra
enum field

svn path=/trunk/mcs/; revision=28438
2004-05-29 12:43:03 +00:00
Francisco Figueiredo Jr. b767d8ce93 2004-05-29 Francisco Figueiredo Jr. <[email protected]>
* Npgsql/NpgsqlConnection.cs: Added workaround for redhat server versions.
	It returns 7.3.4-RH as its server version. Thanks Jaroslaw Kowalski
([email protected]) for the patch.

svn path=/trunk/mcs/; revision=28437
2004-05-29 12:39:05 +00:00
Gert Driesen 31d3a9249b * Compare.cs: ISerializable should only be implemented
for NET_1_1 profile

svn path=/trunk/mcs/; revision=28436
2004-05-29 12:18:54 +00:00
Gert Driesen 31ce1e8731 * XmlTextReader.cs: Added ProhibitDtd property for NET 1.1 to match
public API in MS.NET 1.1

svn path=/trunk/mcs/; revision=28435
2004-05-29 12:09:06 +00:00
Martin Baulig 0ea9548259 2004-05-29 Martin Baulig <[email protected]>
* literal.cs (NullPointer): Provide a private .ctor which sets
	`type' to TypeManager.object_type.  Fixes #59048.

svn path=/trunk/mcs/; revision=28434
2004-05-29 11:58:51 +00:00
Gert Driesen 6966c937a7 * CspProviderFlags.cs: Added missing enum field UseExistingKey
svn path=/trunk/mcs/; revision=28433
2004-05-29 11:54:24 +00:00
Martin Baulig 4ed05be113 2004-05-29 Martin Baulig <[email protected]>
* test-264.cs: New test for #59188.

2004-05-27  Marek Safar <[email protected]>

	* test-263.cs: New test.

svn path=/trunk/mcs/; revision=28432
2004-05-29 11:50:44 +00:00
Martin Baulig 468605ade8 2004-05-29 Martin Baulig <[email protected]>
* expression.cs (MemberAccess.ResolveMemberAccess): If we're an
	EventExpr, set `ee.InstanceExpression = left'.  Fixes #59188.

	* ecore.cs (EventExpr.instance_expr): Make the field private.

svn path=/trunk/mcs/; revision=28431
2004-05-29 11:48:06 +00:00
Gert Driesen 8e85175c9f * corlib.dll.sources: added SetWin32ContextInIDispatchAttribute
and VariantWrapper

svn path=/trunk/mcs/; revision=28430
2004-05-29 11:47:40 +00:00
Gert Driesen 52b617c26d * SetWin32ContextInIDispatchAttribute.cs: added
* VariantWrapper.cs: added

svn path=/trunk/mcs/; revision=28429
2004-05-29 11:47:08 +00:00
Gert Driesen 33a27d220a * Compare.cs: Implemented ISerializable, fixes public API
svn path=/trunk/mcs/; revision=28428
2004-05-29 11:10:08 +00:00
Paolo Molaro 14fd5a011c Sat May 29 10:45:58 CEST 2004 Paolo Molaro <[email protected]>
* mini.c: emit castclass/isinst in their own trees (bug #54209/59057).

svn path=/trunk/mono/; revision=28427
2004-05-29 08:05:51 +00:00
Gert Driesen fbc5540411 * AssemblyBuilder.cs: removed extra method, fixes public API
compatibility with MS.NET
* TypeBuilder.cs: removed extra method, fixes public API
compatibility with MS.NET

svn path=/trunk/mcs/; revision=28426
2004-05-29 07:50:08 +00:00
Gonzalo Paniagua Javier 5c116b3809 update version
svn path=/trunk/mcs/; revision=28423
2004-05-29 02:10:28 +00:00
Gonzalo Paniagua Javier 041074c05c update and cleanup
svn path=/trunk/mono/; revision=28422
2004-05-29 02:06:59 +00:00
Duncan Mak 2eec15c2c2 Fix
svn path=/trunk/mcs/; revision=28421
2004-05-29 01:50:37 +00:00
Duncan Mak c036498ee3 2004-05-28 Duncan Mak <[email protected]>
* SharpZipLib.pub: Added public key.

	* AssemblyInfo.cs: Use the new SharpZipLib.pub.

svn path=/trunk/mcs/; revision=28420
2004-05-29 01:43:13 +00:00
Duncan Mak 348cc03c6b 2004-05-28 Duncan Mak <[email protected]>
* Zip/Compression/DeflaterHuffman.cs (FlushBlock): Add some
	parenthesis to help the generics compiler read this source.

svn path=/trunk/mcs/; revision=28419
2004-05-29 01:21:29 +00:00
Jackson Harper bf10762927 * reflection.c: The modified type encoding was causing build
problems. Reverted for now.

svn path=/trunk/mono/; revision=28417
2004-05-29 00:33:48 +00:00
Duncan Mak 539f93dc9b Weird! How did that get in there?
svn path=/trunk/mono/; revision=28416
2004-05-29 00:30:26 +00:00
Ben Maurer 100b11f54e fixeypoo
svn path=/trunk/mcs/; revision=28415
2004-05-29 00:19:40 +00:00
Duncan Mak 9c5054496a Fixity fix
svn path=/trunk/mono/; revision=28414
2004-05-29 00:17:56 +00:00
Duncan Mak 44e346f730 Add mono-find-provides and mono-find-requires
svn path=/trunk/mono/; revision=28413
2004-05-29 00:09:34 +00:00
Gonzalo Paniagua Javier e803963be2 2004-05-29 Gonzalo Paniagua Javier <[email protected]>
* WebConnectionStream.cs: fixed CanRead property. Closes bug #59273.

svn path=/trunk/mcs/; revision=28412
2004-05-28 23:54:19 +00:00
Duncan Mak 00afe48c72 * runtime/Makefile.am:
* scripts/Makefile.am: Include mono-find-provides and
mono-find-requires.

svn path=/trunk/mono/; revision=28411
2004-05-28 23:49:32 +00:00
Sebastien Pouliot 20205363c3 2004-05-28 Sebastien Pouliot <[email protected]>
* Convert.cs: Fixed the case when we parse Int64.MinValue (positive
	doesn't fit a signed long).

svn path=/trunk/mcs/; revision=28410
2004-05-28 23:48:05 +00:00
Jackson Harper c5ee2c6e20 * reflection.c/h: Take an assembly ref so that we dont create
fully qualified names when encoding types in the same assembly as
	the custom attribute being emitted.

svn path=/trunk/mono/; revision=28409
2004-05-28 23:37:42 +00:00
Duncan Mak 0462988716 * scripts/Makefile.am: Include mono-find-provides and
mono-find-requires.

* scripts/mono-find-provides.in:
* scripts/mono-find-requires.in: New wrapper scripts.

svn path=/trunk/mono/; revision=28408
2004-05-28 23:33:19 +00:00
Duncan Mak 9df2d2b132 2004-05-26 Duncan Mak <[email protected]>
* icall.c
	(ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
	Set the full version number (major, minor, build, revision).

svn path=/trunk/mono/; revision=28407
2004-05-28 23:28:44 +00:00
Jackson Harper ab9ac534ec * appdomain.c: Increment version number.
svn path=/trunk/mono/; revision=28404
2004-05-28 22:36:45 +00:00
Ben Maurer 443a7ccc56 import .6
svn path=/trunk/mcs/; revision=28391
2004-05-28 20:53:20 +00:00
Peter Dennis Bartok bbc196f353 - Fixes for ContainerControl, ScrollableControl and UserControl, fixes some
of the issues I found with the pnet Coding Developers (Dining
  Philosophers) sample app. We now at least draw on screen :-)

svn path=/trunk/mcs/; revision=28390
2004-05-28 20:31:10 +00:00
Sebastien Pouliot f712d57b1d 2004-05-28 Sebastien Pouliot <[email protected]>
* Convert.cs: Fixed integer parsing for special cases (0x, 0X for base
	16), non-base 10 negative numbers ... see new unit tests.

svn path=/trunk/mcs/; revision=28389
2004-05-28 20:20:09 +00:00
Sebastien Pouliot 2bba2cb921 2004-05-28 Sebastien Pouliot <[email protected]>
* ConvertTest.cs: Added case for a prefixed hexadecimal without a number.

svn path=/trunk/mcs/; revision=28388
2004-05-28 19:51:19 +00:00
Jackson Harper 84b44740df * Environment.cs: Increment version number.
svn path=/trunk/mcs/; revision=28382
2004-05-28 19:01:22 +00:00
Jackson Harper 659bbbf9ed * CustomAttributeBuilder.cs: GetBlob now takes a ref to the
assembly so it can encode type names properly.

svn path=/trunk/mcs/; revision=28381
2004-05-28 18:59:37 +00:00
César Natarén 2f2dc9b0d1 2004-05-28 Cesar Lopez Nataren <[email protected]>
* switch.js: added clause after default

svn path=/trunk/mcs/; revision=28379
2004-05-28 18:47:04 +00:00
Sebastien Pouliot 4a36e8f8d3 2004-05-28 Sebastien Pouliot <[email protected]>
* ConvertTest.cs: Added new tests for pasring MinValue and MaxValue
	of integer types in all supported bases.

svn path=/trunk/mcs/; revision=28378
2004-05-28 18:46:47 +00:00
César Natarén df9f0d3bf7 updates from grammar changes
svn path=/trunk/mcs/; revision=28377
2004-05-28 18:39:31 +00:00
César Natarén 3d8ec43e8e 2004-05-28 Cesar Lopez Nataren <[email protected]>
* Statement.cs: changed parent_is_itr_stm method to ParentIsItrStm
	property. Added initial pieces for Break's Resolve. Fixed bug that
	did not let Emit the code for case clauses that came after the
	default clause (we match the jsc behavior).

svn path=/trunk/mcs/; revision=28376
2004-05-28 18:37:29 +00:00
Zoltan Varga d9ac812f0e 2004-05-28 Vladimir Vukicevic <[email protected]>
* marshal.c (emit_struct_conv): increment src/dst after blit
	(mono_marshal_get_managed_wrapper,
	mono_marshal_get_native_wrapper): make sure we have marshalling
	info before marshalling params (info computation affects
	blittable)

	* class.c (class_compute_field_layout): correctly deal with
	blittable
	(mono_class_layout_fields): Don't do gc_aware_layout for AUTO
	value types (as per what windows dows by default)
	(mono_class_setup_mono_type): System.ValueType is blittable
	(mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
	blittable

	* marshal.c (mono_marshal_load_type_info): flag types  as
	non-blittable if the native layout doesn't match the managed
	layout

svn path=/trunk/mono/; revision=28375
2004-05-28 18:30:22 +00:00
Gonzalo Paniagua Javier ccf4e0f3ad 2004-05-28 Gonzalo Paniagua Javier <[email protected]>
* appdomain.c: don't add stuff in the private search path that is
	above the application base. If application base is not set, there's
	no private search path.

svn path=/trunk/mono/; revision=28374
2004-05-28 18:28:21 +00:00
César Natarén 0d0977764d set parent of switch's clauses
svn path=/trunk/mcs/; revision=28373
2004-05-28 18:25:53 +00:00
Sebastien Pouliot b7b4ddd52f 2004-05-28 Sebastien Pouliot <[email protected]>
* AssemblyInfo.cs: Update version number for beta 2.

svn path=/trunk/mcs/; revision=28370
2004-05-28 17:54:19 +00:00
Zoltan Varga be04be228d 2004-05-28 Zoltan Varga <[email protected]>
* mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.

svn path=/trunk/mono/; revision=28368
2004-05-28 17:43:38 +00:00
Zoltan Varga 095130eca6 2004-05-28 Zoltan Varga <[email protected]>
* cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.

svn path=/trunk/mono/; revision=28366
2004-05-28 17:27:16 +00:00
Zoltan Varga d18c179d5e 2004-05-28 Zoltan Varga <[email protected]>
* pinvoke3.cs libtest.c: New tests for byref struct marshalling.

svn path=/trunk/mono/; revision=28365
2004-05-28 17:26:37 +00:00
Zoltan Varga 778d849ef0 2004-05-28 Zoltan Varga <[email protected]>
* marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
	byref struct arguments in native->managed marshalling.

svn path=/trunk/mono/; revision=28364
2004-05-28 17:23:50 +00:00
Miguel de Icaza 0a2fccb980 Up
svn path=/trunk/mono/; revision=28363
2004-05-28 17:14:27 +00:00
Patrik Torstensson 12561b45b4 2004-05-28 Patrik Torstensson <[email protected]>
* mini.c (mono_jit_runtime_invoke): Init class in this
	method instead of trusting mono_jit_compile_method to
	do the work (because wrappers can be in object class)

svn path=/trunk/mono/; revision=28359
2004-05-28 16:22:40 +00:00
Patrik Torstensson 4dc959ad28 2004-05-28 Patrik Torstensson <[email protected]>
* marshal.c (mono_marshal_get_runtime_invoke): correctly
	cache methods using signature (special case for methods
	that are value type or string class)

	* image.c (mono_image_close): clean up allocated GSList's
	in runtime_invoke_cache.

svn path=/trunk/mono/; revision=28358
2004-05-28 16:21:23 +00:00
Gonzalo Paniagua Javier 37dc7f44c1 2004-05-28 Gonzalo Paniagua Javier <[email protected]>
* mono-config.c: set the correct path for mono_cfg_dir on windows when
	there's no MONO_CFG_DIR environment variable defined.

svn path=/trunk/mono/; revision=28357
2004-05-28 16:18:18 +00:00
Zoltan Varga d8e15dec91 2004-05-28 Zoltan Varga <[email protected]>
* AppDomain.cs (Load): Try loading from assemblyRef.CodeBase if exists.
	Fixes #59189.

svn path=/trunk/mcs/; revision=28356
2004-05-28 16:14:00 +00:00
Gonzalo Paniagua Javier 11f4b5566f 2004-05-28 Gonzalo Paniagua Javier <[email protected]>
* threads.c: windows version must be >= 0x0500 to include OpenThread.

svn path=/trunk/mono/; revision=28352
2004-05-28 15:27:12 +00:00
Sebastien Pouliot 04c8585361 2004-05-28 Sebastien Pouliot <[email protected]>
* ConvertTest.cs: Added overflow testing for integer types convertion.

svn path=/trunk/mcs/; revision=28348
2004-05-28 14:21:24 +00:00
Zoltan Varga 49066dff5d 2004-05-28 Zoltan Varga <[email protected]>
* static-constructor.cs: Add new regression test for bug #59193.

svn path=/trunk/mono/; revision=28347
2004-05-28 13:27:01 +00:00
Sebastien Pouliot a52fa324e3 2004-05-28 Sebastien Pouliot <[email protected]>
* ConvertTest.cs: Removed extra 0 from ToInt16_MinValue.

svn path=/trunk/mcs/; revision=28346
2004-05-28 13:18:11 +00:00
Marek Safar 9919fd997b I forgot
// Compiler options: -unsafe

svn path=/trunk/mcs/; revision=28345
2004-05-28 12:20:06 +00:00
Marek Safar ae2d2298b8 new test
svn path=/trunk/mcs/; revision=28344
2004-05-28 12:13:03 +00:00
Lluis Sanchez f49a9b2ba0 * threadpool.c: Really wait for 500ms after the async call, even if the wait
is interrumped.
	* threads.c: In mono_thread_manage, call OpenThread to ref each handle
	  before waiting for it, and call CloseHandle after the wait to unref it.
	  This will make sure that handles are not disposed too early.

svn path=/trunk/mono/; revision=28343
2004-05-28 12:00:35 +00:00
Atsushi Eno ee9709c1c7 2004-05-28 Atsushi Enomoto <[email protected]>
* DateTimeFormatInfo.cs : In fact GetAllDateTimePatterns() returns
	  non-unique results.  Just reordered return values looking at MS
	  invariant behavior.

svn path=/trunk/mcs/; revision=28342
2004-05-28 11:44:02 +00:00
Atsushi Eno efd218530c 2004-05-28 Atsushi Enomoto <[email protected]>
* DateTime.cs : I reverted my fix by accident :(

svn path=/trunk/mcs/; revision=28341
2004-05-28 11:40:58 +00:00
Zoltan Varga e283a05ca5 2004-05-28 Zoltan Varga <[email protected]>
* setenv.cs: Fix this after marshalling changes.

svn path=/trunk/mono/; revision=28340
2004-05-28 11:24:28 +00:00
Atsushi Eno f9bd23cd5b 2004-05-28 Atsushi Enomoto <[email protected]>
* DateTime.cs :
	  - In ToString(), Don't use culture-dependent daynames to format
	    Universal/RFC1123 date/time. Also, use FullDateTimePattern for 'U'.
	  - Fixed GetDateTimeFormats () that generated incorrect 'U' value
	    (since the format string is the same as 'F').

svn path=/trunk/mcs/; revision=28339
2004-05-28 11:00:50 +00:00
Ravindra ae1b49ead9 * gdipFunctions.cs: Added some P/Invoke calls for Draw/Fill
rectangles.
	* Graphics.cs: Implemented Dispose method and changed Draw/Fill
	rectangles implementation (This is basically done to avoid lots
	of brush and pen setup happening in libgdiplus.)

svn path=/trunk/mcs/; revision=28336
2004-05-28 08:31:46 +00:00
Joerg Rosenkranz f417fe531b 2004-05-27 Joerg Rosenkranz <[email protected]>
* System.Data.OracleClient/OracleCommandBuilder.cs:
		Fixed namespace.
	* System.Data.OracleClient.dll.sources:
		Added OracleCommandBuilder.cs.

2004-05-26	Joerg Rosenkranz <[email protected]>

	* System.Data.OracleClient.Oci/OciDefineHandle.cs:
		Merged in a fix send by Rogerio Pereira Araujo
		<[email protected]>: Fixed a bug with NUMBER data type
		when no parameter is passed to OracleCommand.

svn path=/trunk/mcs/; revision=28333
2004-05-28 07:28:45 +00:00
Atsushi Eno 0cd8291185 2004-05-28 Atsushi Enomoto <[email protected]>
* DateTime.cs : don't adjust utc value in ToString(). It must output
	  the same time value, just adding 'Z' for UTC.

svn path=/trunk/mcs/; revision=28332
2004-05-28 07:21:45 +00:00
Atsushi Eno e04b91b820 2004-05-28 Atsushi Enomoto <[email protected]>
* DateTime.cs : in 'Z' case, remove the 'Z' char from input before
	  proceeding.

svn path=/trunk/mcs/; revision=28331
2004-05-28 06:34:26 +00:00
Gonzalo Paniagua Javier 71888f0ed0 2004-05-28 Gonzalo Paniagua Javier <[email protected]>
* AppDomainSetup.cs: InitAppDomainSetup is not needed now.

svn path=/trunk/mcs/; revision=28326
2004-05-28 03:24:49 +00:00
Gonzalo Paniagua Javier d2a988415f 2004-05-28 Gonzalo Paniagua Javier <[email protected]>
* appdomain.c:
	* appdomain.h:
	* icall.c: removed
	ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
	needed now.

	* object.c: se the application_base only for the domain that
	runs Main. Fixes bug #59216,

svn path=/trunk/mono/; revision=28325
2004-05-28 03:22:35 +00:00
Gonzalo Paniagua Javier 0d9077e0dd 2004-05-28 Gonzalo Paniagua Javier <[email protected]>
* appdomain.c:
	* object.c: only the domain in which Main is run have
	SetupInformation.ConfigurationFile set, so moved a few lines from
	appdomain.c to object.c.

svn path=/trunk/mono/; revision=28324
2004-05-28 02:57:33 +00:00
Gonzalo Paniagua Javier 4ce94f3420 2004-05-28 Gonzalo Paniagua Javier <[email protected]>
* appdomain.c: we tried to load [name].(dll|exe), but according
	to bug #57710, we must also try [culture]/[name].(dll|exe) and
	[culture]/[name]/[name](dll|exe). This patch fixes the bug.
	There's a test case attached to bug #58922.

svn path=/trunk/mono/; revision=28323
2004-05-28 02:30:23 +00:00
Sebastien Pouliot 39543dad84 2004-05-27 Sebastien Pouliot <[email protected]>
* ConvertTest.cs: Added tests for int16 limits in various bases.

svn path=/trunk/mcs/; revision=28322
2004-05-28 02:04:36 +00:00
Sebastien Pouliot b1ae573339 2004-05-27 Sebastien Pouliot <[email protected]>
* Convert.cs: Convert with a base parameter cannot parse negative
	string numbers, even "-0".

svn path=/trunk/mcs/; revision=28321
2004-05-28 01:52:38 +00:00
Sebastien Pouliot f0ad255138 2004-05-27 Sebastien Pouliot <[email protected]>
* Byte.cs: Fixed parsing for "-0" which is valid for unsigned types.
	* UInt16.cs: Fixed parsing for "-0" which is valid for unsigned types.
	* UInt32.cs: Fixed parsing for "-0" which is valid for unsigned types.
	* UInt64.cs: Fixed parsing for "-0" which is valid for unsigned types.

svn path=/trunk/mcs/; revision=28320
2004-05-28 01:37:50 +00:00
Sebastien Pouliot 984876a733 2004-05-27 Sebastien Pouliot <[email protected]>
* X509Certificate.cs: Rethrow original exception when parsing X.509
	certificates (inside a CryptographicException) so people can see if
	their changes affects certificate decoding.

svn path=/trunk/mcs/; revision=28319
2004-05-28 01:22:52 +00:00
Gonzalo Paniagua Javier 6f1dbe972c 2004-05-28 Gonzalo Paniagua Javier <[email protected]>
* DigestClient.cs: cache the sessions based on address and
	credentials, not only address. Added poor men's expiration to
	the session cache. Fixes bug #59202.

svn path=/trunk/mcs/; revision=28316
2004-05-27 23:19:35 +00:00
Sebastien Pouliot f545ed2905 2004-05-27 Sebastien Pouliot <[email protected]>
* ConvertTest.cs: Mode complete tests for unsigned type convertion wrt
	-0, base != 10, ...

svn path=/trunk/mcs/; revision=28312
2004-05-27 20:57:15 +00:00
Zoltan Varga d80bfe411b 2004-05-27 Zoltan Varga <[email protected]>
* mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.

	* basic-long.cs: New regression test.

svn path=/trunk/mono/; revision=28311
2004-05-27 20:47:31 +00:00
Sebastien Pouliot 4404826946 2004-05-27 Sebastien Pouliot <[email protected]>
* ConvertTest.cs: Another case of -0 - so many to do things, so
	many way to mess them...

svn path=/trunk/mcs/; revision=28310
2004-05-27 20:16:29 +00:00
Sebastien Pouliot 9b8e420c32 2004-05-27 Sebastien Pouliot <[email protected]>
* ConvertTest.cs: Added case where Convert.ToByte ("-0") is legal.

svn path=/trunk/mcs/; revision=28309
2004-05-27 20:04:34 +00:00
Sebastien Pouliot 3c401168cb 2004-05-27 Sebastien Pouliot <[email protected]>
* SortedList.cs: Setting Capacity to 0 returns it to it's default
	value (16).

svn path=/trunk/mcs/; revision=28308
2004-05-27 19:46:32 +00:00
Sebastien Pouliot 847faa71a9 2004-05-27 Sebastien Pouliot <[email protected]>
* SortedListTest.cs: Test that setting Capacity	to zero return the
	capacity to it's initial default (16).

svn path=/trunk/mcs/; revision=28307
2004-05-27 19:42:57 +00:00
Miguel de Icaza 14974ecb87 2004-05-27 Miguel de Icaza <[email protected]>
* icall.c (ves_icall_System_Text_Encoding_InternalCodePage): The
	test was broken, just make sure that codepage contains utf-8
	string.

svn path=/trunk/mono/; revision=28306
2004-05-27 19:42:01 +00:00
Marek Safar 68cd1cb0ac new test
svn path=/trunk/mcs/; revision=28305
2004-05-27 19:26:33 +00:00
Marek Safar 2460782960 2004-05-27 Marek Safar <[email protected]>
* test-263.cs: New test.

svn path=/trunk/mcs/; revision=28304
2004-05-27 19:16:56 +00:00
Sebastien Pouliot 565c846b77 2004-05-27 Sebastien Pouliot <[email protected]>
* SortedList.cs: Added missing ICloneable support to internal
	enumerator. Added Capacity to the synchronized version of SortedList.

svn path=/trunk/mcs/; revision=28303
2004-05-27 19:15:43 +00:00
Sebastien Pouliot 953e7056d6 2004-05-27 Sebastien Pouliot <[email protected]>
* QueueTest.cs: Test for synchronized clones.
	* SortedListTest.cs: Added cases for synchronized capacity and testing
	the interface from the internal enumerator.

svn path=/trunk/mcs/; revision=28302
2004-05-27 19:11:14 +00:00
Dick Porter 9ce3c08653 2004-05-27 Dick Porter <[email protected]>
* FileSystemInfo.cs: Take out the error checking in Refresh(), it
	broke other stuff

svn path=/trunk/mcs/; revision=28299
2004-05-27 18:44:14 +00:00
Zoltan Varga 27489d4d21 2004-05-27 Zoltan Varga <[email protected]>
* configure.in: Pass CC to libgc configure.

svn path=/trunk/mono/; revision=28298
2004-05-27 18:42:54 +00:00
Duncan Mak 8fb99b40b9 2004-05-27 Duncan Mak <[email protected]>
* mono-find-provides.cs
	* mono-find-requires.cs: Added. These are
	helper tools to help RPM packaging.

	* Makefile (Module): Add mono-rpm-helpers

svn path=/trunk/mcs/; revision=28297
2004-05-27 18:03:16 +00:00
Atsushi Eno 4277238022 2004-05-27 Atsushi Enomoto <[email protected]>
* DateTimeFormatInfo.cs : 'U' is in fact the same as 'F' for pattern
	  strings. Thanks to kangaroo for the hint.

svn path=/trunk/mcs/; revision=28296
2004-05-27 17:54:59 +00:00
César Natarén 897de58083 ChangeLog entries
svn path=/trunk/mcs/; revision=28295
2004-05-27 17:34:06 +00:00
César Natarén be5aa2266b updates from grammar changes
svn path=/trunk/mcs/; revision=28294
2004-05-27 17:31:43 +00:00
Sebastien Pouliot e0fc892e70 2004-05-27 Sebastien Pouliot <[email protected]>
* Queue.cs: Fixed Count for Queue.Synchronize (Queue.Synchronize (q)).

svn path=/trunk/mcs/; revision=28293
2004-05-27 17:30:21 +00:00
César Natarén 47c365831a allow continue ast building tree. fixed parent references at iteration_stm
svn path=/trunk/mcs/; revision=28292
2004-05-27 17:29:57 +00:00
César Natarén 476363200c added parent parameter to Continue's constructor. Added parent_is_itr_stm
svn path=/trunk/mcs/; revision=28291
2004-05-27 17:28:30 +00:00
César Natarén b2fa973341 back to Microsoft.JScript namespace
svn path=/trunk/mcs/; revision=28290
2004-05-27 17:18:04 +00:00
Dick Porter 7f436bdc58 Shut up gcc warnings
svn path=/trunk/mono/; revision=28289
2004-05-27 17:06:15 +00:00
Atsushi Eno f6a94472d1 2004-05-27 Atsushi Enomoto <[email protected]>
* DateTime.cs :
	  - Added "yyyy/MM/dd HH:mm:ss 'GMT'" and "yyyy-MM-dd HH:mm:ss 'GMT'"
	    to common formats (yes, I know it is nothing more than hack)
	  - Fixed some GetDateTimeFormats() that just returned patterns.
	  - For InvariantCulture, now try both supported formats and our
	    predefined formats.
	  - It was accepting incorrectly extraneous characters. That caused
	    some UTC/non-UTC bug.
	  - RFC1123 string should return universal time. Uncomment again (the
	    problem should went away because of the extra characters fix above.

	    With some of the changes above, fixed bug #47720.

svn path=/trunk/mcs/; revision=28288
2004-05-27 17:04:48 +00:00
Atsushi Eno 48e2ca895c 2004-05-27 Atsushi Enomoto <[email protected]>
* DateTimeFormatInfo.cs : Fixed longtimes and shorttimes (exchanged).

svn path=/trunk/mcs/; revision=28287
2004-05-27 16:59:14 +00:00
Dick Porter d024688825 2004-05-27 Dick Porter <[email protected]>
* MonoIO.cs: Define icalls for Lock() and Unlock()

	* FileStream.cs: Implement Lock() and Unlock().  Also improve IO
	error reporting.

	* FileSystemInfo.cs:
	* File.cs:
	* Directory.cs: Improve IO error reporting

svn path=/trunk/mcs/; revision=28285
2004-05-27 16:25:27 +00:00
Dick Porter ddad604639 2004-05-27 Dick Porter <[email protected]>
* io.h:
	* io.c: Implemented LockFile() and UnlockFile()

2004-05-27  Dick Porter  <[email protected]>

	* icall.c:
	* file-io.c: Implemented icalls for locking and unlocking regions
	in a file.
	(ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
	FALSE on error (fixes both compiler warning and real bug.)

svn path=/trunk/mono/; revision=28284
2004-05-27 16:24:52 +00:00
Paolo Molaro 0f4f36e3a7 Forgot in previous commit.
svn path=/trunk/mono/; revision=28283
2004-05-27 16:24:04 +00:00
Atsushi Eno 30e4b3f86b 2004-05-27 Atsushi Enomoto <[email protected]>
* DateTimeFormatInfo.cs : Added some string[] fields for
	  GetAllDateTimePatterns(char). The fields will be filled in metadata
	  and culture info table. Added improved patterns for
	  GetAllDateTimePatterns() (right now works only for invariant).
	* CultureInfo.cs : Use InvariantInfo for InvariantCulture.

svn path=/trunk/mcs/; revision=28282
2004-05-27 16:23:05 +00:00
Atsushi Eno ea57b163a7 2004-05-27 Atsushi Enomoto <[email protected]>
* culture-info-tables.h: reflecting locale-builder updates.

	  (Added missing ChangeLog entry for 05/26)

svn path=/trunk/mono/; revision=28281
2004-05-27 15:58:26 +00:00
Atsushi Eno c6346fd7f5 2004-05-27 Atsushi Enomoto <[email protected]>
* en_PH.xml, en_ZW.xml, fr_CA.xml, fr_CH.xml, fr_FR.xml, fr_LU.xml :
	  fixed incorrect markup.

svn path=/trunk/mono/; revision=28279
2004-05-27 15:55:59 +00:00
Jackson Harper cd99189733 * PEAPI.cs: When writing to the blob heap we always set a
size.

svn path=/trunk/mcs/; revision=28277
2004-05-27 15:46:15 +00:00
Jackson Harper 8a50eabb98 * locales.c: Fix some cut and paste errors.
svn path=/trunk/mono/; revision=28276
2004-05-27 15:21:33 +00:00
Anirban Bhattacharjee 238a334118 * delegate.cs:
* expression.cs:
                Few exception checks for delegete

svn path=/trunk/mcs/; revision=28274
2004-05-27 14:48:25 +00:00
Sebastien Pouliot 06257093b5 2004-05-27 Sebastien Pouliot <[email protected]>
* Hashtable.cs: Cloned synchronized Hashtables are now synchronized.

svn path=/trunk/mcs/; revision=28273
2004-05-27 14:46:50 +00:00
Sebastien Pouliot fd3cc90c78 2004-05-27 Sebastien Pouliot <[email protected]>
* HashtableTest.cs: Added case where a cloned hashtable must also be
	synchronized (if the original was).

svn path=/trunk/mcs/; revision=28272
2004-05-27 14:33:38 +00:00
Sebastien Pouliot 5639cebe40 2004-05-27 Sebastien Pouliot <[email protected]>
* QueueTest.cs: Added case to ensure that MoveNext always return
	false (after the first time).

svn path=/trunk/mcs/; revision=28271
2004-05-27 14:20:49 +00:00
Anirban Bhattacharjee a6c9098ad4 * mb-parser.jay:
* delegate.cs:
        Few more fixes in delegate grammar

svn path=/trunk/mcs/; revision=28270
2004-05-27 14:19:52 +00:00
Sebastien Pouliot 7638d64d48 2004-05-27 Sebastien Pouliot <[email protected]>
* Queue.cs: Changed -1 to Int32.MaxValue so calling MoveNext again
	(after a false) still returns false.

svn path=/trunk/mcs/; revision=28269
2004-05-27 14:14:57 +00:00
Sebastien Pouliot b5ab2d09bb 2004-05-27 Sebastien Pouliot <[email protected]>
* Queue.cs: Fixed case where we could still get Current after the last
	MoveNext.

svn path=/trunk/mcs/; revision=28268
2004-05-27 14:01:24 +00:00
Sebastien Pouliot 28d5f93fcf 2004-05-27 Sebastien Pouliot <[email protected]>
* QueueTest.cs: Added case where we try to get Current after the last
	MoveNext.

svn path=/trunk/mcs/; revision=28267
2004-05-27 13:59:34 +00:00
Nick Drochak 3dc53f3345 2004-05-27 Nick Drochak <[email protected]>
* DataRelationCollectionTest.cs: Fixed build when using csc.

svn path=/trunk/mcs/; revision=28266
2004-05-27 13:52:07 +00:00
Patrik Torstensson 73613bd9ea Sorry Sorry Sorry
svn path=/trunk/mcs/; revision=28265
2004-05-27 13:41:52 +00:00
Patrik Torstensson 4ea1031684 2004-05-27 Patrik Torstensson <[email protected]>
* ExpiresBucket.cs (FlushExpiredItems): fix csc and a typo bug

svn path=/trunk/mcs/; revision=28264
2004-05-27 13:34:30 +00:00
Paolo Molaro b7b4d2ff81 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <[email protected]>
* cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
	and div/rem checks.

svn path=/trunk/mono/; revision=28263
2004-05-27 13:11:09 +00:00
Gert Driesen b4fd1bcc1a * monowiz.win32.nsi: normalized line-endings to unix (LF)
svn path=/trunk/mono/; revision=28262
2004-05-27 13:04:43 +00:00
Sebastien Pouliot ea3e5137cf 2004-05-27 Sebastien Pouliot <[email protected]>
* SymmetricTransform.cs: Added missing exception handling in
	TransformBlock and TransformFinalBlock.

svn path=/trunk/mcs/; revision=28259
2004-05-27 12:40:08 +00:00
Sebastien Pouliot ead10bbbe3 2004-05-27 Sebastien Pouliot <[email protected]>
* ARC4Managed.cs: Added missing exception handling in TransformBlock
	and TransformFinalBlock.

svn path=/trunk/mcs/; revision=28258
2004-05-27 12:29:28 +00:00
Sebastien Pouliot 467dd77d3e 2004-05-27 Sebastien Pouliot <[email protected]>
* ARC4ManagedTest.cs: Added unit tests for exceptions coming from
	ICryptoTransform interface (TransformBlock, TransformFinalBlock).

svn path=/trunk/mcs/; revision=28256
2004-05-27 12:27:16 +00:00
Patrik Torstensson b4aa05b699 2004-05-27 Patrik Torstensson <[email protected]>
* HttpApplicationFactory.cs: Added SignalError (still todo)

svn path=/trunk/mcs/; revision=28255
2004-05-27 12:25:30 +00:00
Patrik Torstensson a596fe4999 2004-05-27 Patrik Torstensson <[email protected]>
* CacheEntry.cs,CacheExpires.cs,ExpiresBucket.cs,
	  Cache.cs : Fixed deadlock issues, fixed
	  items not correctly being flushed, fixed update
	  of item when expiration has been updated more
	  than 1 min (placed in wrong bucket),
	  fixed deadlock during cache callback when item
	  is removed due to expiriation.

	  Rewrite of locking handling in Cache class, leading
	  to better performance and less bugs.

	  This rewrite is due to a number of bugs found
	  in the output caching during load (leading to memory
	  leaks and deadlocks)

svn path=/trunk/mcs/; revision=28254
2004-05-27 12:15:13 +00:00
Sebastien Pouliot 78cde01104 2004-05-27 Sebastien Pouliot <[email protected]>
* SymmetricTransform.cs: Fixed possible integer overflow.

svn path=/trunk/mcs/; revision=28253
2004-05-27 11:57:33 +00:00
Sebastien Pouliot 7e0b188fe3 2004-05-27 Sebastien Pouliot <[email protected]>
* HashAlgorithm.cs: Added missing exception handling to ComputeHash,
	TransformBlock and TransformFinalBlock.

svn path=/trunk/mcs/; revision=28252
2004-05-27 11:47:56 +00:00
Sebastien Pouliot ef48a9ec22 2004-05-27 Sebastien Pouliot <[email protected]>
* HashAlgorithmTest.cs: Added new tests to check for more exceptions.

svn path=/trunk/mcs/; revision=28250
2004-05-27 11:21:20 +00:00
Boris Kirzner d354bd2ab6 DataRow.cs :
- CheckReadOnlyStatus : use typed (and faster comparing).
- EndEdit : bug fix - do not dispose record if it holds original version.
- SetValuesFromDataRecord : Take care about autoincrement columns.

svn path=/trunk/mcs/; revision=28249
2004-05-27 11:14:32 +00:00
Raja R Harinath 2a676e1fa8 reindent with monostyle
svn path=/trunk/mcs/; revision=28248
2004-05-27 10:55:59 +00:00
Anirban Bhattacharjee 90acb9e77f * mb-parser.jay: Changed Delegate instantiation grammar to get it working
svn path=/trunk/mcs/; revision=28247
2004-05-27 10:48:04 +00:00
Raja R Harinath f219cf5a68 revert one unintentional change.
svn path=/trunk/mcs/; revision=28246
2004-05-27 10:46:03 +00:00
Raja R Harinath f50193fb6e Fix formatting using 'c-indent-line-or-region' in csharp-mode.
Only whitespace changes.

svn path=/trunk/mcs/; revision=28245
2004-05-27 10:42:44 +00:00
Boris Kirzner d424220532 * DataContainer.cs : Bug fixes in BitDataContainer.get_Item and StringDataContainer.SetValue .
svn path=/trunk/mcs/; revision=28244
2004-05-27 10:36:17 +00:00
Paolo Molaro a5c830fc40 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <[email protected]>
* Makefile.am: fix miguel's change to build mono statically against
	libmono (track build dependencies).

svn path=/trunk/mono/; revision=28243
2004-05-27 09:52:02 +00:00
Atsushi Eno a22089fbd5 2004-05-27 Atsushi Enomoto <[email protected]>
* SqlDecimal.cs : don't output debug message to Console.

svn path=/trunk/mcs/; revision=28242
2004-05-27 09:47:17 +00:00
Atsushi Eno 75d61ade9d 2004-05-27 Atsushi Enomoto <[email protected]>
* OleDbDataReader.cs : don't output debug message to Console.

svn path=/trunk/mcs/; revision=28241
2004-05-27 09:46:48 +00:00
Atsushi Eno 7f63eeafcd 2004-05-27 Atsushi Enomoto <[email protected]>
* MergeManager.cs : don't output debug message to Console.

svn path=/trunk/mcs/; revision=28240
2004-05-27 09:46:27 +00:00
Atsushi Eno 261e928b07 2004-05-27 Atsushi Enomoto <[email protected]>
* XmlTextReaderTests.cs : added test for bug #59142.
	* XmlTextWriterTests.cs : added test for bug #59154.
	* XmlDocumentTests.cs : added test for bug #59155.

svn path=/trunk/mcs/; revision=28238
2004-05-27 09:29:47 +00:00
Atsushi Eno 2ead87db32 2004-05-22 Atsushi Enomoto <[email protected]>
* DefaultContext.cs : Add XPathNavigator input support for ToBoolean()
	  and ToNavigator().
	* Expression.cs : In Equality comparison, evaluate XPathNavigator in
	  the same as well as NodeSet. This fixes bug #59134.

svn path=/trunk/mcs/; revision=28237
2004-05-27 09:10:08 +00:00
Atsushi Eno bb195f33c3 2004-05-27 Atsushi Enomoto <[email protected]>
* XmlDataInferenceLoader.cs : Namespace are not imported to the table
	  structure. Thanks to Boris Kirzner for the fix.

svn path=/trunk/mcs/; revision=28235
2004-05-27 08:32:40 +00:00
Atsushi Eno 00781b75f7 2004-05-27 Atsushi Enomoto <[email protected]>
* XmlDocument.cs : Save() should indent only when PreserveWhitespace
	  is false. Fixed bug #59155.
	  Modified comment lines a bit.

svn path=/trunk/mcs/; revision=28234
2004-05-27 08:22:09 +00:00
Atsushi Eno 87846a29cd 2004-05-27 Atsushi Enomoto <[email protected]>
* XmlTextWriter.cs : WriteRaw() looks to proceed WriteState to Prolog
	  (if it is Start). Fixed bug #59154.

svn path=/trunk/mcs/; revision=28233
2004-05-27 07:50:31 +00:00
Umadevi S 59c6edbda5 2004-05-27 Umadevi S <[email protected]>
* added files DataTableMappingCollectionTest and DataColumnMappingCollectionTest to system.data_test.dll.sources

svn path=/trunk/mcs/; revision=28232
2004-05-27 07:22:22 +00:00
Ravindra 78693a6be5 Temporarily ignoring a failing test case.
svn path=/trunk/mcs/; revision=28231
2004-05-27 07:20:18 +00:00
Umadevi S c5faa10091 2004-05-27 Umadevi S <[email protected]>
* Added Classes DataColumnMappingCollectionTest and DataTableMappingCollectionTest

svn path=/trunk/mcs/; revision=28230
2004-05-27 07:20:07 +00:00
Atsushi Eno 297c5f5069 2004-05-27 Atsushi Enomoto <[email protected]>
* XmlTextReader.cs : simplified ReadCharsInternal(); use ReadEndTag()
	  and don't bork against <foo></foo>. Also mofidied this method to skip
	  <foo/>. Fixed bug #59142.
	  Modified some comments on the code (FIXME->LAMESPEC et al).

svn path=/trunk/mcs/; revision=28229
2004-05-27 07:13:28 +00:00
Marek Safar b0ee1263f2 I forgot commit changelog
svn path=/trunk/mcs/; revision=28228
2004-05-27 06:55:36 +00:00
Umadevi S f561b92c2f 2004-05-27 Umadevi S <[email protected]>
* Corrected small typos in DataTableCollectionTest & DataRelationCollectionTest

svn path=/trunk/mcs/; revision=28227
2004-05-27 06:30:14 +00:00
Ravindra ef9e08f735 Ignored the tests that are failing because of bug #58435.
svn path=/trunk/mcs/; revision=28226
2004-05-27 06:28:06 +00:00
Umadevi S 3453a2f9a4 2004-05-27 Umadevi S <[email protected]>
* DataRelationCollection.cs - fixed nunit test errors

svn path=/trunk/mcs/; revision=28225
2004-05-27 06:27:11 +00:00
Umadevi S ce8fd78890 2004-05-27 Umadevi S <[email protected]>
* DataTableCollection.cs - fixed nunit test errors

svn path=/trunk/mcs/; revision=28223
2004-05-27 05:31:53 +00:00
Gonzalo Paniagua Javier 31172b2d1e 2004-05-27 Gonzalo Paniagua Javier <[email protected]>
* FileStream.cs: delay seeking to the end when FileMode.Append is
	specified until after buffer initialization. Fixes bug #59151.

svn path=/trunk/mcs/; revision=28222
2004-05-27 04:37:28 +00:00
Gert Driesen 2fbc744790 * monowiz.win32.nsi: do not include mono subdirectory in
MonoConfigDir registry key, to match batch files

svn path=/trunk/mono/; revision=28221
2004-05-27 04:25:07 +00:00
Ravindra cb641ea4f1 Changed test for Color.Green.G to make it pass on MS.
svn path=/trunk/mcs/; revision=28220
2004-05-27 04:00:24 +00:00
Ravindra 5d6b742de6 Conforming Color.Green to MS.
svn path=/trunk/mcs/; revision=28219
2004-05-27 04:00:07 +00:00
Gonzalo Paniagua Javier fef90f0a49 2004-05-27 Gonzalo Paniagua Javier <[email protected]>
* category.cs: added LastValue field to mark the end of enum Category.
	* syntax.cs: in CharacterClass, use Category.LastValue to get the size
	of the array needed. Use a BitArray instead of bool[].
	In AddCategory(), don't set the opposite category as false. Fixes
	bug #59150. All tests pass.

svn path=/trunk/mcs/; revision=28218
2004-05-27 03:40:44 +00:00
Miguel de Icaza d31dd7f6e4 2004-05-27 Miguel de Icaza <[email protected]>
* loader.c: Only init Wine on non-Windows platforms.

svn path=/trunk/mono/; revision=28217
2004-05-27 03:17:28 +00:00
Gonzalo Paniagua Javier 6e6ffcb1a2 2004-05-27 Gonzalo Paniagua Javier <[email protected]>
* RegexBugs.cs: added tests from bug #59150.

svn path=/trunk/mcs/; revision=28216
2004-05-27 02:36:25 +00:00
Atsushi Eno d813b13d95 2004-05-27 Atsushi Enomoto <[email protected]>
* DateTime.cs : quick revert 'Z' support for certificate verifications.

svn path=/trunk/mcs/; revision=28215
2004-05-27 02:29:42 +00:00
Sebastien Pouliot 2318a431a0 2004-05-26 Sebastien Pouliot <[email protected]>
* CryptoStream.cs: Fixed possible integer overflow.
	* FromBase64Transform.cs: Better exception handling and fixed possible
	integer overflow.
	* ToBase64Transform.cs: Better exception handling and fixed possible
	integer overflow.

svn path=/trunk/mcs/; revision=28213
2004-05-27 01:05:57 +00:00
Sebastien Pouliot d1c40d086b 2004-05-26 Sebastien Pouliot <[email protected]>
* ToBase64TransformTest.cs: Added new unit tests for negatives and
	overflows.

svn path=/trunk/mcs/; revision=28212
2004-05-27 00:46:14 +00:00
Sebastien Pouliot 3d66415c6e 2004-05-26 Sebastien Pouliot <[email protected]>
* CryptoStreamTest.cs: Added new unit tests for overflows.

svn path=/trunk/mcs/; revision=28211
2004-05-27 00:28:58 +00:00
Sebastien Pouliot b45673de55 2004-05-26 Sebastien Pouliot <[email protected]>
* FromBase64Transform.cs: Added new unit tests for undocumented
	exceptions (null, overflows...).

svn path=/trunk/mcs/; revision=28210
2004-05-27 00:09:42 +00:00
Gonzalo Paniagua Javier bfd5dd8e7d 2004-05-27 Gonzalo Paniagua Javier <[email protected]>
* mono-config.c: set the correct path for config. directory on windows.

svn path=/trunk/mono/; revision=28209
2004-05-26 23:01:57 +00:00
Gonzalo Paniagua Javier d356ac7a4d 2004-05-27 Gonzalo Paniagua Javier <[email protected]>
* gacutil.cs: when -il, don't stop if one assembly fails to install.

svn path=/trunk/mcs/; revision=28208
2004-05-26 22:48:17 +00:00
Neale Ferguson a4c3047380 Further exception handling refinement for JIT
svn path=/trunk/mono/; revision=28207
2004-05-26 22:30:14 +00:00
Duncan Mak feaf80aae9 Fix typo.
svn path=/trunk/mcs/; revision=28206
2004-05-26 20:59:28 +00:00
Zoltan Varga f045df4406 2004-05-26 Zoltan Varga <[email protected]>
* cfold.c: Some glib versions do not have G_MININT32.

svn path=/trunk/mono/; revision=28205
2004-05-26 20:38:35 +00:00
Sebastien Pouliot c6e84ac1a3 2004-05-26 Sebastien Pouliot <[email protected]>
* Queue.cs: Fixed possible integer overflow in CopyTo methods.
	* Stack.cs: Fixed possible integer overflow in CopyTo methods.

svn path=/trunk/mcs/; revision=28204
2004-05-26 20:18:35 +00:00
Miguel de Icaza 38f87f7c37 2004-05-26 Miguel de Icaza <[email protected]>
* Mono.Cairo/Cairo.cs: Do not use `extern string' here, as the
	return value is owned by Cairo.

svn path=/trunk/mcs/; revision=28203
2004-05-26 20:14:09 +00:00
Miguel de Icaza 3b0b8f7c97 Remove old stale directory
svn path=/trunk/mcs/; revision=28202
2004-05-26 20:10:20 +00:00
Sebastien Pouliot 94053e134a 2004-05-26 Sebastien Pouliot <[email protected]>
* ArrayList.cs: Fixed possible integer overflows.

svn path=/trunk/mcs/; revision=28201
2004-05-26 20:08:27 +00:00
Miguel de Icaza 4efac0362d 2004-05-26 Miguel de Icaza <[email protected]>
* Syscall.cs: Do not let the runtime handle strings, as we do not
	own those strings, we must transform the char * into a string
	ourselves.

svn path=/trunk/mcs/; revision=28200
2004-05-26 20:07:57 +00:00
Sebastien Pouliot b50dbda591 2004-05-26 Sebastien Pouliot <[email protected]>
* Array.cs: Removed duplicate condition if LastIndexOf.

svn path=/trunk/mcs/; revision=28199
2004-05-26 20:06:56 +00:00
Zoltan Varga 78be95d070 2004-05-26 Zoltan Varga <[email protected]>
* marshal.c (mono_marshal_get_native_wrapper): Free strings returned
	from pinvoke functions.

svn path=/trunk/mono/; revision=28198
2004-05-26 20:04:09 +00:00
Sebastien Pouliot 1d4370ad9a 2004-05-26 Sebastien Pouliot <[email protected]>
* ArrayListTest.cs: Added tests for integer overflows.

svn path=/trunk/mcs/; revision=28197
2004-05-26 20:03:34 +00:00
Miguel de Icaza b7f472596b *** empty log message ***
svn path=/trunk/mono/; revision=28196
2004-05-26 20:03:31 +00:00
Massimiliano Mantione 1c04f49c67 Fixed problem with precision of tan, atan, sin and cos, and implemented
related regressions tests (fixes bug 54467, but one new problem appeared
and is not fixed yet).

svn path=/trunk/mono/; revision=28195
2004-05-26 19:49:55 +00:00
Miguel de Icaza f6c7d28d4f Link libmono statically, its easier to debug, per irc discussion today
svn path=/trunk/mono/; revision=28193
2004-05-26 19:45:59 +00:00
Gonzalo Paniagua Javier 60e721afba long time...
svn path=/trunk/mono/; revision=28192
2004-05-26 19:45:42 +00:00
Zoltan Varga eacf760fd2 2004-05-26 Zoltan Varga <[email protected]>
* cfold.c (FOLD_BINOPZ): Avoid division by zero.

svn path=/trunk/mono/; revision=28190
2004-05-26 19:35:12 +00:00
Zoltan Varga 2a999ebccc 2004-05-26 Zoltan Varga <[email protected]>
* exceptions.cs: Add test for constant folding && division by zero.

svn path=/trunk/mono/; revision=28189
2004-05-26 19:32:28 +00:00
Gonzalo Paniagua Javier 6d36d994dc 2004-05-26 Gonzalo Paniagua Javier <[email protected]>
* data/DefaultWsdlHelpGenerator.aspx: fixed querystring attribute
	values. Now they are URlEncoded.

	* data/browscap.ini.gz: updated.

svn path=/trunk/mono/; revision=28188
2004-05-26 19:25:28 +00:00
Gonzalo Paniagua Javier 3ccd2c085f 2004-05-26 Gonzalo Paniagua Javier <[email protected]>
* BrowserCapsUpdater.cs: update URL for browscap.ini.

svn path=/trunk/mcs/; revision=28187
2004-05-26 19:25:21 +00:00
Gonzalo Paniagua Javier d54ba0dbe0 2004-05-26 Gonzalo Paniagua Javier <[email protected]>
* HttpResponse.cs: remove hardcoded "HTTP/1.0" version that kept
	chunked encoding disabled. Fixed chunked suffix and end. Send the
	'lastchunk' marked when in the final Flush even if the content length
	is 0. This makes mod-mono-server work fine with chunked encoding.

	* HttpRuntime.cs: Set the _firstRequest* variables to true
	earlier. TraceContext don't take any parameter now.

	* TraceManager.cs: don't need a context. Use GetAppConfig.

svn path=/trunk/mcs/; revision=28186
2004-05-26 19:25:17 +00:00
Sebastien Pouliot 5d8ff40aa8 2004-05-26 Sebastien Pouliot <[email protected]>
* ArrayTest.cs: Added integer overflow tests for LastIndexOf.

svn path=/trunk/mcs/; revision=28185
2004-05-26 19:21:45 +00:00
Zoltan Varga c122e0e595 2004-05-26 Zoltan Varga <[email protected]>
* driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
	since driver.c is in libmono too, so the optimization was useless.

svn path=/trunk/mono/; revision=28184
2004-05-26 19:01:38 +00:00
Atsushi Eno d7a5613ab0 2004-05-26 Atsushi Enomoto <[email protected]>
* DateTimeFormatInfo.cs :
	  hack implementation for GetAllDateTimePatterns().

svn path=/trunk/mcs/; revision=28182
2004-05-26 18:45:56 +00:00
Atsushi Eno cf946a498f 2003-05-26 Atsushi Enomoto <[email protected]>
* FileInfoTest.cs : more incorrect \ fix.

svn path=/trunk/mcs/; revision=28181
2004-05-26 18:36:54 +00:00
Atsushi Eno 32c0427f83 2004-05-26 Atsushi Enomoto <[email protected]>
* icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
	  on win32.

svn path=/trunk/mono/; revision=28180
2004-05-26 18:29:07 +00:00
Lluis Sanchez 0ed89f563f * HttpServerChannel.cs: Default port is 0.
svn path=/trunk/mcs/; revision=28179
2004-05-26 18:25:52 +00:00
Lluis Sanchez 99bb845efd * SoapMessageFormatter.cs: Include soap headers as properties when creating
the IMessage, and add IMessage properties as headers when creating the
	  SoapMessage. LogicalCallContext info will be passed as a header value.

svn path=/trunk/mcs/; revision=28178
2004-05-26 18:24:43 +00:00
Atsushi Eno b725942d10 2004-05-26 Atsushi Enomoto <[email protected]>
* DateTime.cs :
	  - Added "yyyy-MM-dd HH:mm:ss" to "compatible patterns".
	    (Fixed bug #58938.)
	  - As a quick remedy to accept more patterns, Parse() now also tries
	    InvariantInfo patterns (this is because we have no more than one
	    pattern for each pattern component.)
	  - In _DoParse(), 'Z' should not be read as timezone specifier. Some
	    culture uses 'Z' as AM/PM designer, and it should be recognized as
	    part of the UTCpattern (if it actually UTC pattern for the culture
	    contains 'Z').

svn path=/trunk/mcs/; revision=28177
2004-05-26 18:18:39 +00:00
Sebastien Pouliot 9cd88d39f6 2004-05-26 Sebastien Pouliot <[email protected]>
* BufferedStream.cs: Fixed possible integer overflow.
	* FileStream.cs: Fixed possible integer overflow.
	* MemoryStream.cs: Fixed possible integer overflow.
	* StringReader.cs: Fixed possible integer overflow.

svn path=/trunk/mcs/; revision=28176
2004-05-26 17:40:51 +00:00
Sebastien Pouliot 0683f54f83 2004-05-26 Sebastien Pouliot <[email protected]>
* FileStreamTest.cs: Added new tests for integer overflow checks.
	* StringReaderTest.cs: Added new tests for integer overflow checks.

svn path=/trunk/mcs/; revision=28175
2004-05-26 17:38:02 +00:00
Gert Driesen 86a107d225 * MonoCustomAttrs.cs: Fixed issue with AllowMultiple, as MS
seems to allow multiple attributes with AllowMultiple at
runtime.

svn path=/trunk/mcs/; revision=28174
2004-05-26 17:28:57 +00:00
Sebastien Pouliot 1ca4636760 2004-05-26 Sebastien Pouliot <[email protected]>
* BufferedStream.cs: Added globalization and fixed exceptions and
	possible integer overflow.
	* TextWriter.cs: Fixed possible integer	overflow.

svn path=/trunk/mcs/; revision=28172
2004-05-26 17:04:43 +00:00
Sebastien Pouliot 825b2dfec3 2004-05-26 Sebastien Pouliot <[email protected]>
* BufferedStreamTest.cs: Added new unit tests for exceptions.

svn path=/trunk/mcs/; revision=28171
2004-05-26 16:42:38 +00:00
Sebastien Pouliot 83e514bc50 2004-05-26 Sebastien Pouliot <[email protected]>
* rand.c: Fixed CrypptReleaseContext (missing parameter).

svn path=/trunk/mono/; revision=28169
2004-05-26 16:12:59 +00:00
Gonzalo Paniagua Javier 5a00aadf38 2004-05-26 Gonzalo Paniagua Javier <[email protected]>
* library.make: reference nunti.core.dll and nunit.util.dll when
	building tests.

svn path=/trunk/mcs/; revision=28167
2004-05-26 15:39:32 +00:00
Sebastien Pouliot efd29ca224 *** empty log message ***
svn path=/trunk/mcs/; revision=28165
2004-05-26 15:04:22 +00:00
Sebastien Pouliot b48bc7611d 2004-05-26 Sebastien Pouliot <[email protected]>
* rand.c: Used wrong define in call :(

svn path=/trunk/mono/; revision=28164
2004-05-26 14:59:44 +00:00
Sebastien Pouliot a06631a3e2 2004-05-26 Sebastien Pouliot <[email protected]>
* rand.c: Define PROV_INTEL_SEC and CRYPT_VERIFY_CONTEXT if not
	defined in cygwin version of wincrypt.h.

svn path=/trunk/mono/; revision=28162
2004-05-26 14:33:21 +00:00
Sebastien Pouliot 961f3692e4 2004-05-26 Sebastien Pouliot <[email protected]>
* Byte.cs: Throw an OverflowException for negative numbers.
	* Convert.cs: Accept 0x and 0X as prefix when parsing base16 strings.

svn path=/trunk/mcs/; revision=28160
2004-05-26 14:05:46 +00:00
Sebastien Pouliot b20d1bac54 2004-05-26 Sebastien Pouliot <[email protected]>
* ConvertTest.cs: Added case where 0X00 is valid when parsed in base16

svn path=/trunk/mcs/; revision=28159
2004-05-26 13:56:12 +00:00
Zoltan Varga a7a8581a85 2004-05-26 Zoltan Varga <[email protected]>
* pinvoke3.cs libtest.c: Add tests for fnptr->delegate marshalling.

svn path=/trunk/mono/; revision=28158
2004-05-26 13:41:24 +00:00
Lluis Sanchez 9bf6263942 * SerializationCodeGenerator.cs, XmlSerializationReaderInterpreter.cs:
In encoded format, primitive types can be null. Read them using
	  ReadReferencingElement, that already checks for the null tag.

svn path=/trunk/mcs/; revision=28157
2004-05-26 13:41:23 +00:00
Zoltan Varga 30ffec36d6 2004-05-26 Zoltan Varga <[email protected]>
* marshal.c (mono_ftnptr_to_delegate): Implement this.

svn path=/trunk/mono/; revision=28156
2004-05-26 13:37:30 +00:00
Sebastien Pouliot af43a7a510 2004-05-26 Sebastien Pouliot <[email protected]>
* StringBuilder.cs: Fixed potential integer overflows in several
	methods.

svn path=/trunk/mcs/; revision=28155
2004-05-26 13:37:21 +00:00
Sebastien Pouliot d1f4ff909a 2004-05-26 Sebastien Pouliot <[email protected]>
* StringBuilderTest.cs: Added unit tests to be sure integer overflows
	are catched.

svn path=/trunk/mcs/; revision=28154
2004-05-26 13:24:16 +00:00
Zoltan Varga bdc4bc43d0 2004-05-26 Zoltan Varga <[email protected]>
* Makefile.am (DISABLED_TESTS): appdomain-unload.exe seems to run too.

svn path=/trunk/mono/; revision=28153
2004-05-26 13:23:42 +00:00
Zoltan Varga 6f2d24e6bb 2004-05-26 Zoltan Varga <[email protected]>
* driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS
	variable to driver.c so the compiler can emit more efficient code to
	access them.

svn path=/trunk/mono/; revision=28152
2004-05-26 13:22:42 +00:00
Marek Safar ca91493e38 fix the build
svn path=/trunk/mcs/; revision=28151
2004-05-26 12:44:15 +00:00
Atsushi Eno 103dedd502 2004-05-26 Atsushi Enomoto <[email protected]>
* culture-info-tables.h: reflecting locale-builder updates.

svn path=/trunk/mono/; revision=28150
2004-05-26 12:08:35 +00:00
Atsushi Eno 2bbfe589c8 2004-05-26 Atsushi Enomoto <[email protected]>
* Driver.cs : for af_ZA locale, am/pm part got required to support
	  "empty" string. So check am/pm elements and overwrite AMDesigner/
	  PMDesigner value even if they consist of empty string.

	* (moved logs for supp/ content to supp/)

svn path=/trunk/mono/; revision=28149
2004-05-26 11:53:06 +00:00
Zoltan Varga b12832127c 2004-05-26 Zoltan Varga <[email protected]>
* profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
	#59086.

svn path=/trunk/mono/; revision=28148
2004-05-26 11:52:38 +00:00
Atsushi Eno c24e59e5cd 2004-05-26 Atsushi Enomoto <[email protected]>
* Added ChangeLog also here (and moved the last msg from ..).

	* af_ZA.xml, ar_SA.xml, be_BY.xml, de_AT.xml, en_AU.xml, en_GB.xml,
	  en_NZ.xml, es_AR.xml, es_BO.xml, es_CL.xml, es_CO.xml, es_CR.xml,
	  es_DO.xml, es_EC.xml, es_ES.xml, es_GT.xml, es_HN.xml, es_MX.xml,
	  es_PA.xml, es_PE.xml, es_PR.xml, es_PY.xml, es_SV.xml, es_UY.xml,
	  es_VE.xml, eu_ES.xml,
	  fo_FO.xml, fr_BE.xml, fr_CA.xml, fr_FR.xml, fr_CH.xml, fr_FR.xml,
	  fr_LU.xml, hi_IN.xml, id_ID.xml, it_CH.xml, it_IT.xml, ko_KR.xml,
	  nl_BE.xml, nl_NL.xml, pt_BR.xml, pt_PT.xml, sv_FI.xml, sv_SE.xml,
	  sw_KE.xml, bg.xml, ca.xml, cs.xml, da.xml, de.xml, el.xml, es.xml,
	  et.xml, fa.xml, fi.xml, he.xml, hr.xml, hu.xml, hy.xml, is.xml,
	  lt.xml, lv.xml, mk.xml, ro.xml, ru.xml, sk.xml, sl.xml, sq.xml,
	  tr.xml, uk.xml, vi.xml :
	  Added shortdate/longtime/am/pm etc. for DateTime.ToString().
	* ar_AE.xml, ar_BH.xml, ar_DZ.xml, ar_EG.xml, ar_JO.xml, ar_KW.xml,
	  ar_LB.xml, ar_LY.xml, ar_MA.xml, ar_OM.xml, ar_QA.xml, ar_SY.xml,
	  ar_TN.xml, ar_YE.xml, en_CA.xml, en_IE.xml, en_PH.xml, en_ZA.xml,
	  en_ZW.xml :
	  Added shortdate/longtime.
	* th.xml : ditto.
	* ja.xml : I incorrectly modified long time format. Reverting.

svn path=/trunk/mono/; revision=28147
2004-05-26 11:49:35 +00:00
Umadevi S 1816c5b871 2004-05-26 Umadevi S <[email protected].
* Added files DataTableCollectionTest and DataRelationCollectionTest to the system.data_test.dll.sources

svn path=/trunk/mcs/; revision=28146
2004-05-26 11:35:36 +00:00
Sebastien Pouliot 59a8b939c4 2004-05-26 Sebastien Pouliot <[email protected]>
Environment.cs: Bumped mono_corlib_version to 20 (rng interface).

svn path=/trunk/mcs/; revision=28145
2004-05-26 11:27:56 +00:00
Umadevi S 0b1871044d 2004-05-26 Umadevi S <[email protected].
* Added files DataTableCollectionTest and DataRelationCollectionTest

svn path=/trunk/mcs/; revision=28144
2004-05-26 11:26:34 +00:00
Sebastien Pouliot 2b2c201528 2004-05-26 Sebastien Pouliot <[email protected]>
* RNGCryptoServiceProvider.cs: Changed RNG interface with the runtime
	so it could be used in a thread-safe way with CryptoAPI.

svn path=/trunk/mcs/; revision=28143
2004-05-26 11:26:23 +00:00
Umadevi S cae794742c 2004-05-26 Umadevi S <[email protected]>.
* Added files DataTableCollectionTest and DataRelationCollectionTest

svn path=/trunk/mcs/; revision=28142
2004-05-26 11:26:07 +00:00
Lluis Sanchez 78e0f4ad97 * SoapFormatter.cs: Added headers parameter to SoapWriter call.
* SoapReader.cs: Added support for deserialization of headers. Cache
	  both member indexes and member infos in the new TypeMetadata structure.
	* SoapWriter.cs: Added support for serialization of headers.

svn path=/trunk/mcs/; revision=28141
2004-05-26 11:26:05 +00:00
Sebastien Pouliot eb35a5ff05 2004-05-26 Sebastien Pouliot <[email protected]>
* appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
	* icall.c: Modified icalls for RNG.
	* rand.c|h: Changed RNG interface to allow thread-safe usage under
	Windows (CryptoAPI).

svn path=/trunk/mono/; revision=28140
2004-05-26 11:25:26 +00:00
Marek Safar 3f360142ae 2004-05-26 Marek Safar <[email protected]>
* test-74.cs: Now test passes on my machine too.
	It is not perfect though.

svn path=/trunk/mcs/; revision=28139
2004-05-26 11:07:30 +00:00
Raja R Harinath 57576aabc2 (clean-local): Add $(CLEAN_FILES) too.
svn path=/trunk/mcs/; revision=28137
2004-05-26 09:36:25 +00:00
Marek Safar 0ed51a2049 2004-05-26 Marek Safar <[email protected]>
Fixed bug #50080 & cs0214-2.cs
	* expression.cs (Cast.DoResolve): Check unsafe context here.

	* statement.cs (Resolve.DoResolve): Likewise.

svn path=/trunk/mcs/; revision=28136
2004-05-26 09:29:13 +00:00
Jordi Mas i Hernandez 45329d4007 gif image sample
svn path=/trunk/mcs/; revision=28135
2004-05-26 09:28:55 +00:00
Raja R Harinath 0a91e7c527 Rebuild
svn path=/trunk/mcs/; revision=28134
2004-05-26 09:27:23 +00:00
Raja R Harinath 4a6967728b * nunit20/util/Makefile (EXTRA_DISTFILES): Remove
Transform.resources.
($(the_lib)): Make Transform.resources using internal resgen.
* nunit20/util/Transform.resources: Rebuild.

svn path=/trunk/mcs/; revision=28133
2004-05-26 09:22:25 +00:00
Sanja Gupta cd77a06594 ChangeLog: Updated ChangeLog.
TestImageFormatConverter.cs: Removed duplicate assertion numbers.

svn path=/trunk/mcs/; revision=28132
2004-05-26 08:41:51 +00:00
Sanja Gupta 99f35ca769 ChangeLog: Update ChangeLog.
ImageFormatConverter.cs: Fixed issues discovered from nunit test cases.

svn path=/trunk/mcs/; revision=28131
2004-05-26 08:36:32 +00:00
Raja R Harinath 8ff8dec32b Remove a couple of noise words.
svn path=/trunk/mono/; revision=28129
2004-05-26 08:21:34 +00:00
Ravindra 354be45444 Added test for Color.cs.
svn path=/trunk/mcs/; revision=28128
2004-05-26 08:11:49 +00:00
Ravindra 2a753f23f5 Added a note.
svn path=/trunk/mcs/; revision=28127
2004-05-26 08:08:22 +00:00
Ravindra c2aa7b1c9f Minor fix in Color.Green property.
svn path=/trunk/mcs/; revision=28126
2004-05-26 08:06:07 +00:00
Ravindra 11379f4141 Test for Color.cs.
svn path=/trunk/mcs/; revision=28125
2004-05-26 08:03:52 +00:00
Anirban Bhattacharjee 7fb97ff443 Few property related checks applied
svn path=/trunk/mcs/; revision=28124
2004-05-26 07:59:30 +00:00
Raja R Harinath 28d631d201 * Makefile.am (mcs-do-basic-build): No need to set MCS here.
* runtime/net_1_1/Makefile.am (gac_assemblies_list): Update to
reflect new names for nunit.util and nunit.framework.  Add
nunit.core.
* runtime/net_2_0/Makefile.am (gac_assemblies_list): Likewise.

svn path=/trunk/mono/; revision=28123
2004-05-26 07:41:03 +00:00
Martin Baulig b2fb916aed 2004-05-26 Martin Baulig <[email protected]>
* namespace.cs (NamespaceEntry.Lookup): Added `bool silent'.

	* rootcontext.cs (RootContext.NamespaceLookup): Added `bool silent'.
	(RootContext.LookupType): Pass down the `silent' flag.

svn path=/trunk/mcs/; revision=28122
2004-05-26 06:03:37 +00:00
Martin Baulig 3ea141228f Put my changes back.
svn path=/trunk/mcs/; revision=28121
2004-05-26 06:01:33 +00:00
Atsushi Eno 7e8678f8c6 2004-05-26 Atsushi Enomoto <[email protected]>
* FileInfo.cs,
	  DirectoryInfo.cs : ToString() should return constructor arg as is.
	  This fixes bug #58804.

svn path=/trunk/mcs/; revision=28120
2004-05-26 03:54:51 +00:00
Atsushi Eno 2f91adfd77 2003-05-26 Atsushi Enomoto <[email protected]>
* FileInfoTest.cs : incorrect \ fix. added more cases.

svn path=/trunk/mcs/; revision=28119
2004-05-26 03:45:34 +00:00
Atsushi Eno ac00a4d3f3 2003-05-26 Atsushi Enomoto <[email protected]>
* FileInfoTest.cs : added tests for ToString().

svn path=/trunk/mcs/; revision=28118
2004-05-26 03:33:21 +00:00
Gonzalo Paniagua Javier d1177f0843 fixed 59051
svn path=/trunk/mcs/; revision=28117
2004-05-26 02:51:47 +00:00
Jackson Harper e6b19e2a4a * ILParser.jay: Fix casting for data type constants.
svn path=/trunk/mcs/; revision=28116
2004-05-26 01:37:52 +00:00
Sebastien Pouliot 7672953ef6 2004-05-25 Sebastien Pouliot <[email protected]>
* Makefile: changed case on nunit.framework.dll (lowercase)

svn path=/trunk/mcs/; revision=28115
2004-05-26 01:16:57 +00:00
Sebastien Pouliot 25d6b85e07 2004-05-25 Sebastien Pouliot <[email protected]>
* library.make: changed case on nunit.framework.dll (lowercase)

svn path=/trunk/mcs/; revision=28114
2004-05-26 01:15:07 +00:00
Sebastien Pouliot 7d77e174cb 2004-05-25 Sebastien Pouliot <[email protected]>
* AssemblyInfo.cs: Removed MONO define for strongnaming assembly.

svn path=/trunk/mcs/; revision=28113
2004-05-26 01:10:55 +00:00
Gonzalo Paniagua Javier 2068a5adf9 Details...
svn path=/trunk/mcs/; revision=28112
2004-05-26 01:09:55 +00:00
Sebastien Pouliot 4748a08227 2004-05-25 Sebastien Pouliot <[email protected]>
* Makefile: Allow different case between *.source and assembly name.
	* AssemblyInfo.cs: Nunit.key->nunit.key

svn path=/trunk/mcs/; revision=28111
2004-05-26 01:09:20 +00:00
Sebastien Pouliot 525c601353 2004-05-25 Sebastien Pouliot <[email protected]>
* Allow different filename case for *.source and resulting assembly.

svn path=/trunk/mcs/; revision=28110
2004-05-26 01:08:00 +00:00
Gonzalo Paniagua Javier 05400a27d7 2004-05-26 Gonzalo Paniagua Javier <[email protected]>
* UrlUtils.cs:
	(GetFile): not public, and fixed to really return just the file name.
	(InsertSessionId): ensure that the directory ends with a "/". This
	fixes cookieless sessions.

svn path=/trunk/mcs/; revision=28109
2004-05-26 01:05:43 +00:00
Ben Maurer 49cf2ab03e test the regression
svn path=/trunk/mcs/; revision=28108
2004-05-26 00:48:28 +00:00
Sebastien Pouliot 0c2cc49f3e 2004-05-25 Sebastien Pouliot <[email protected]>
* Updated files (and added new ones) for NUnit 2.1.91.

svn path=/trunk/mcs/; revision=28107
2004-05-26 00:38:46 +00:00
Sebastien Pouliot 3465260328 2004-05-25 Sebastien Pouliot <[email protected]>
* forgot to remove TestLoadEventArgs.cs

svn path=/trunk/mcs/; revision=28106
2004-05-26 00:36:51 +00:00
Sebastien Pouliot fe3cd77c73 2004-05-25 Sebastien Pouliot <[email protected]>
* Updated files for nunit-console 2.1.91.

svn path=/trunk/mcs/; revision=28105
2004-05-26 00:35:08 +00:00
Sebastien Pouliot 32a425e1e3 2004-05-25 Sebastien Pouliot <[email protected]>
* Removed old files from previous versions of NUnit.

svn path=/trunk/mcs/; revision=28104
2004-05-26 00:33:22 +00:00
Sebastien Pouliot 05ebe2b79e 2004-05-25 Sebastien Pouliot <[email protected]>
* Update existing files (and added new ones) for nunit 2.1.91.

svn path=/trunk/mcs/; revision=28103
2004-05-26 00:31:38 +00:00
Miguel de Icaza 6e8fda40bb Revert the last two patches, they regress
svn path=/trunk/mcs/; revision=28102
2004-05-26 00:29:07 +00:00
Sebastien Pouliot 7d25a7d718 2004-05-25 Sebastien Pouliot <[email protected]>
* Removed old files from previous Nunit versions.

svn path=/trunk/mcs/; revision=28101
2004-05-26 00:25:00 +00:00
Sebastien Pouliot 7bd8f52d43 2004-05-25 Sebastien Pouliot <[email protected]>
* Update to existing files and new files for NUnit 2.1.91.

svn path=/trunk/mcs/; revision=28100
2004-05-26 00:23:03 +00:00
Sebastien Pouliot e648010cec 2004-05-25 Sebastien Pouliot <[email protected]>
Removed old files (most have been move to other assemblies).

svn path=/trunk/mcs/; revision=28099
2004-05-26 00:20:24 +00:00
Sebastien Pouliot 13d4b3253f 2004-05-25 Sebastien Pouliot <[email protected]>
* Imported NUnit 2.1.91 (2.2 beta) source code for new assembly.

svn path=/trunk/mcs/; revision=28098
2004-05-26 00:12:18 +00:00
Sebastien Pouliot f3400b881b 2004-05-25 Sebastien Pouliot <[email protected]>
* nunit.key: New. NUnit private key. Due to build issues the key
	must be present in this directory.

svn path=/trunk/mcs/; revision=28097
2004-05-26 00:05:37 +00:00
Jordi Mas i Hernandez 471a2a236c fixes compilation problem under win32 using csc
svn path=/trunk/mcs/; revision=28096
2004-05-25 23:33:31 +00:00
Gonzalo Paniagua Javier ff305f8291 2004-05-26 Gonzalo Paniagua Javier <[email protected]>
* OracleType.cs: fixed values for Int16 and Int32. Thanks to Artem
	Zabytin for reporting this.

svn path=/trunk/mcs/; revision=28092
2004-05-25 22:27:41 +00:00
Jackson Harper b3175dd00f * PEAPI.cs: Set the has default flag on fields when a default data
constant is assigned to them.

svn path=/trunk/mcs/; revision=28091
2004-05-25 22:27:08 +00:00
Gonzalo Paniagua Javier 00f11231ef 2004-05-26 Gonzalo Paniagua Javier <[email protected]>
* Makefile.am: don't distribute generated inssel.[ch] files.

svn path=/trunk/mono/; revision=28090
2004-05-25 22:23:23 +00:00
Jackson Harper 5e11dd3483 * PEAPI.cs: Encode string constants as unicode before putting them
in the blob.

svn path=/trunk/mcs/; revision=28089
2004-05-25 22:09:24 +00:00
Gonzalo Paniagua Javier 01040c6fdd 2004-05-26 Gonzalo Paniagua Javier <[email protected]>
* IPAddress.cs:
	* IPEndPoint.cs:
	* IPv6Address.cs: no more warnings about IPAddress.Address.

svn path=/trunk/mcs/; revision=28086
2004-05-25 21:28:41 +00:00
Martin Baulig cd4490d4bd 2004-05-25 Martin Baulig <[email protected]>
* expression.cs
	(MethodGroupExpr.IdenticalTypeName): New public property.
	(Invocation.DoResolve): Don't report a CS0176 if the "instance"
	expression actually refers to a type.

svn path=/trunk/mcs/; revision=28084
2004-05-25 21:15:23 +00:00
Gonzalo Paniagua Javier d51339b19b *** empty log message ***
svn path=/trunk/mcs/; revision=28083
2004-05-25 21:12:04 +00:00
Gonzalo Paniagua Javier 9634b2bb99 2004-05-25 Gonzalo Paniagua Javier <[email protected]>
* System.Web/HttpApplication.cs: set culture/uiculture from
	configuration and restore it after each step. Fixes bug #52851.

	* System.Web.Configuration/GlobalizationConfiguration.cs: if we have no
	context, use GetAppConfig instead of GetConfig.

svn path=/trunk/mcs/; revision=28081
2004-05-25 20:59:53 +00:00
Ben Maurer 19c21859ba 2004-05-25 Ben Maurer <[email protected]>
* config.h.in: remove

svn path=/trunk/mono/; revision=28080
2004-05-25 20:18:36 +00:00
Martin Baulig 810bd43c2b New test.
svn path=/trunk/mcs/; revision=28079
2004-05-25 20:18:25 +00:00
Martin Baulig 74dedf71a1 2004-05-25 Martin Baulig <[email protected]>
* expression.cs (Invocation.DoResolve): Applied Ben Maurer's patch
	for #56176 and made it actually work.

svn path=/trunk/mcs/; revision=28078
2004-05-25 20:16:53 +00:00
Zoltan Varga 95a3e3e63b 2004-05-25 Zoltan Varga <[email protected]>
* mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
	into the default appdomain. Fixes #58707.

svn path=/trunk/mono/; revision=28077
2004-05-25 19:21:00 +00:00
Sebastien Pouliot 47ec8815df 2004-05-25 Sebastien Pouliot <[email protected]>
* Array.cs: Fixed possible integer overflow.
	* BitConverter.cs: Fixed a possible integer overflow in ToString.

svn path=/trunk/mcs/; revision=28070
2004-05-25 18:59:35 +00:00
Sebastien Pouliot 5b9e9f8578 2004-05-25 Sebastien Pouliot <[email protected]>
* MethodBuilder.cs: Now use FastNewGuidArray to create new random
	Guids without using CryptoConfig. Speed up for MCS.

svn path=/trunk/mcs/; revision=28069
2004-05-25 18:53:12 +00:00
Sebastien Pouliot fea3c895fe 2004-05-25 Sebastien Pouliot <[email protected]>
* Guid.cs: Added an internal method to create a random Guid without
	using CryptoConfig (which is heavy on first use). This is only used
	in S.R.E.ModuleBuilder to speedup MCS compilation.

svn path=/trunk/mcs/; revision=28068
2004-05-25 18:51:22 +00:00
Martin Baulig 6025a14c1a 2004-05-25 Martin Baulig <[email protected]>
* ecore.cs (Expression.CacheTemporaries): Make this virtual.
	(FieldExpr, PropertyExpr): Override and implement
	CacheTemporaries.  Fixes #52279.

svn path=/trunk/mcs/; revision=28067
2004-05-25 18:51:11 +00:00
Martin Baulig 351636b5be 2004-05-25 Martin Baulig <[email protected]>
* test-261.cs: New test for #52279.

svn path=/trunk/mcs/; revision=28066
2004-05-25 18:49:36 +00:00
Jackson Harper 3339f45af0 * PEAPI.cs: zero RVAs for abstract, runtime, and internal call
methods.

svn path=/trunk/mcs/; revision=28065
2004-05-25 18:46:37 +00:00
Zoltan Varga 2ce114b1f3 2004-05-25 Zoltan Varga <[email protected]>
* mono-codeman.c (mono_code_manager_invalidate): On x86, fill the
	memory with 0xcc (x86 break).

svn path=/trunk/mono/; revision=28064
2004-05-25 18:29:18 +00:00
Zoltan Varga 9f6a6852c9 2004-05-25 Zoltan Varga <[email protected]>
* locales.c: Fix build.

svn path=/trunk/mono/; revision=28063
2004-05-25 18:18:22 +00:00
Sebastien Pouliot f2f10096e4 2004-05-25 Sebastien Pouliot <[email protected]>
* ArrayTest.cs: Added tests to check for integer overflow in Clear,
       Copy and Reverse.
       * BitConverterTest.cs: Added test to check for possible integer
       overflow in ToString (byte,int,int)

svn path=/trunk/mcs/; revision=28062
2004-05-25 17:59:05 +00:00
Jackson Harper 000a582758 * parser.cs: Allow creating a regular expression using {,n} as the
specified. The min bounds is set to -1, I am not completely sure
	if that is what it is supposed to be but MS does not set it to 0
	based on testing. Patch by [email protected]. Fixes bug
	#56761.

svn path=/trunk/mcs/; revision=28061
2004-05-25 17:29:44 +00:00
Sebastien Pouliot 1934e429b0 2004-05-25 Sebastien Pouliot <[email protected]>
* String.cs: Fixed reported exception for PadLeft|Right. Fixed
	possible integer overflow in methods that takes index and count
	as parameters.

svn path=/trunk/mcs/; revision=28060
2004-05-25 17:10:39 +00:00
Jackson Harper cc5910d215 fix name
svn path=/trunk/mono/; revision=28059
2004-05-25 17:05:32 +00:00
Atsushi Eno f2e9f1ad8d 2004-05-25 Atsushi Enomoto <[email protected]>
* culture-info-tables.h: reflecting locale-builder updates.

svn path=/trunk/mono/; revision=28057
2004-05-25 16:49:14 +00:00
Patrik Torstensson fc4890ddd2 2004-05-25 18:30 CET Patrik Torstensson <[email protected]>
* configure.in: Check for trunc instead of truncl (HAVE_TRUNC)

svn path=/trunk/mono/; revision=28056
2004-05-25 16:45:08 +00:00
Jordi Mas i Hernandez b9813f94b1 added wrapmode examples
svn path=/trunk/mcs/; revision=28054
2004-05-25 16:08:52 +00:00
Atsushi Eno 0a3f85c02b 2004-05-26 Atsushi Enomoto <[email protected]>
* supp/pl.xml,
	  supp/ja.xml : Added overriding formats. pl.xml fixes bug #58186.

svn path=/trunk/mono/; revision=28053
2004-05-25 15:44:12 +00:00
Jackson Harper 0b904ce407 * Makefile.am: Extract xml files.
svn path=/trunk/mono/; revision=28052
2004-05-25 15:41:50 +00:00
Jackson Harper d49790403c * locales.c: When creating the current culture use the $LANGs
specific culture. So DateTimeFormat and NumberFormat entries are created.

svn path=/trunk/mono/; revision=28050
2004-05-25 15:17:00 +00:00
Sebastien Pouliot fae256a97e 2004-05-25 Sebastien Pouliot <[email protected]>
* StringTest.cs: Added tests for special cases like
	s.LastIndexOf ('o', s.Length, 1) fail but
	s.LastIndexOf ("o", s.Length, 1) works.

svn path=/trunk/mcs/; revision=28049
2004-05-25 14:25:57 +00:00
Lluis Sanchez 2295258581 * XmlSerializationReader.cs: Check for empty element when reading an array
element. This fixes bug #59003. Thanks Atsushi!

svn path=/trunk/mcs/; revision=28048
2004-05-25 13:49:22 +00:00
Zoltan Varga 1c54c6de8e 2004-05-25 Zoltan Varga <[email protected]>
* String.cs: Add new Strcpy icalls which take a char array as
	parameter.

svn path=/trunk/mcs/; revision=28046
2004-05-25 13:23:36 +00:00
Zoltan Varga 56bc7bbd0b 2004-05-25 Zoltan Varga <[email protected]>
* string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
	a char array as parameter.

svn path=/trunk/mono/; revision=28045
2004-05-25 13:19:38 +00:00
Zoltan Varga 088a486d76 2004-05-25 Zoltan Varga <[email protected]>
* jit-icalls.c: Remove the broken approximation for truncl, doing
	no conversion is better.

svn path=/trunk/mono/; revision=28044
2004-05-25 13:13:09 +00:00
Sebastien Pouliot 6b6f15ecae 2004-05-25 Sebastien Pouliot <[email protected]>
* ConvertTest.cs: New tests for prefixed hexadecimal strings and
	negative byte convertion.
	* StringTest.cs: Added new tests for integer overflow and negatives.

svn path=/trunk/mcs/; revision=28042
2004-05-25 12:56:02 +00:00
Atsushi Eno 48ff110b43 2004-05-25 Atsushi Enomoto <[email protected]>
* DateTime.cs : added more invariant format patterns. This should
	  really fix bug #57656.

svn path=/trunk/mcs/; revision=28041
2004-05-25 12:44:48 +00:00
Marek Safar ff7f9b6e20 New test
svn path=/trunk/mcs/; revision=28040
2004-05-25 12:43:41 +00:00
Zoltan Varga c945701176 2004-05-25 Zoltan Varga <[email protected]>
* mini.c (handle_stack_args): Avoid reusing variables for stack slots.
	Fixes #58863.

svn path=/trunk/mono/; revision=28039
2004-05-25 12:29:28 +00:00
Patrik Torstensson f13ad4d8cd 2004-05-25 14:14 CET Patrik Torstensson <[email protected]>
* BitConverter.cs (ToBoolean): Return true or false instead
	of unsafe returing byte as bool. Fixes bug #58874.

svn path=/trunk/mcs/; revision=28038
2004-05-25 12:28:09 +00:00
Atsushi Eno ebcf12b2da 2004-05-25 Atsushi Enomoto <[email protected]>
* DateTime.cs : In ToString(string, IFormatProvider), use "G" if
	  string format argument is null. This should fix bug #57656.

svn path=/trunk/mcs/; revision=28037
2004-05-25 12:21:51 +00:00
Lluis Sanchez e4b7a90e7a * BindingCollection.cs: Fixed this[string] property.
svn path=/trunk/mcs/; revision=28036
2004-05-25 12:18:31 +00:00
Paolo Molaro 576aaead4c Tue May 25 14:33:56 CEST 2004 Paolo Molaro <[email protected]>
* mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
	of the mcrxr instruction which is not available on some processors
	even if it's documented to be. Implement add and sub overflow correctly
	(still not complete for long unsigned). Speed up icalls a bit.

svn path=/trunk/mono/; revision=28035
2004-05-25 11:55:12 +00:00
Lluis Sanchez 466fabe5ae * HttpServerChannel.cs: Take unused port if the provided prot is 0.
svn path=/trunk/mcs/; revision=28034
2004-05-25 11:34:08 +00:00
Patrik Torstensson 018125cad1 2004-05-25 13:01 CET Patrik Torstenson <[email protected]>
* mini.c (mono_jit_compile_method_with_opt): Make sure that
	we run .cctor in the current domain instead of target_domain.

	Fixes bug #58558, .cctor not being called in -O=shared.

svn path=/trunk/mono/; revision=28032
2004-05-25 11:15:40 +00:00
Lluis Sanchez d3642dfc0c * Version.cs: Rename of data fields to match those in Microsoft.NET.
Patch by [email protected].

svn path=/trunk/mcs/; revision=28031
2004-05-25 10:25:06 +00:00
Paolo Molaro bf19feb145 More tests for div, rem.
svn path=/trunk/mono/; revision=28030
2004-05-25 10:13:30 +00:00
Paolo Molaro 1ade5cf1f1 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <[email protected]>
* mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.

svn path=/trunk/mono/; revision=28029
2004-05-25 10:02:28 +00:00
Lluis Sanchez 683bba8ceb * ScriptCompilerInfo.cs: the name used to load the Microsoft.JScript
assembly should not include the .dll extension.

svn path=/trunk/mcs/; revision=28028
2004-05-25 09:09:33 +00:00
Marek Safar 8a6749f11e New tests
svn path=/trunk/mcs/; revision=28027
2004-05-25 08:35:08 +00:00
Atsushi Eno 8db1637866 2004-05-25 Atsushi Enomoto <[email protected]>
* PrintDialog.cs : Build fix related to win32functions.cs changes.

svn path=/trunk/mcs/; revision=28026
2004-05-25 06:14:42 +00:00
Miguel de Icaza 314f866345 2004-05-25 Miguel de Icaza <[email protected]>
* location.cs: In the new compiler listing a file twice is a
	warning, not an error.

svn path=/trunk/mcs/; revision=28025
2004-05-25 04:01:54 +00:00
Gonzalo Paniagua Javier 64f41b5283 2004-05-25 Gonzalo Paniagua Javier <[email protected]>
* System.Data.OracleClient/OracleCommand.cs:
	* System.Data.OracleClient/OracleDataReader.cs:
	* System.Data.OracleClient.Oci/OciStatementHandle.cs: patch by Eduard
	Nesiba that implements autocommit behavior for non query statement
	which is out of transaction. In previous implementation changed rows
	stayed locked until client disconnect and hasRows proper settings.

svn path=/trunk/mcs/; revision=28019
2004-05-25 00:49:50 +00:00
César Natarén f482db7298 2004-05-24 Cesar Lopez Nataren <[email protected]>
* StrictEquality.cs, JSFieldInfo.cs: got it back to Microsoft.JScript namespace.

svn path=/trunk/mcs/; revision=28018
2004-05-25 00:30:53 +00:00
César Natarén 8fba3ffa73 2004-05-24 Cesar Lopez Nataren <[email protected]>
* StrictEquality.cs: got it back to Microsoft.JScript namespace.

svn path=/trunk/mcs/; revision=28017
2004-05-25 00:29:10 +00:00
César Natarén 56dd512971 updates from grammar changes
svn path=/trunk/mcs/; revision=28016
2004-05-25 00:27:54 +00:00
César Natarén 7497bd9358 2004-05-24 Cesar Lopez Nataren <[email protected]>
* Statement.cs: Added code generation support for 'switch' statement.

svn path=/trunk/mcs/; revision=28015
2004-05-25 00:25:44 +00:00
César Natarén 27c19dba87 2004-05-24 Cesar Lopez Nataren <[email protected]>
* Added switch.js

svn path=/trunk/mcs/; revision=28014
2004-05-25 00:23:59 +00:00
César Natarén 5fe9ea2627 2004-05-24 Cesar Lopez Nataren <[email protected]>
* jscript-lexer-parser.g: added 'using' for
	System.Collections. Allow 'switch' statement building of its
	ast. Added parent parameter to constructor of With. Build
	inside_for ast.

svn path=/trunk/mcs/; revision=28013
2004-05-25 00:21:16 +00:00
Gonzalo Paniagua Javier c7038a7ccc 2004-05-25 Gonzalo Paniagua Javier <[email protected]>
* DateTimeTest.cs: test for bug 56436.

svn path=/trunk/mcs/; revision=28012
2004-05-25 00:15:15 +00:00
Gonzalo Paniagua Javier 49ffcb66e0 2004-05-25 Gonzalo Paniagua Javier <[email protected]>
* DateTime.cs: allow double quotes in the formats. Don't set
	next_not_digit to true in presence of single or double quotes. Patch by
	Martin Probst.

svn path=/trunk/mcs/; revision=28011
2004-05-25 00:14:20 +00:00
Peter Dennis Bartok 96528389da - Added ActiveMdiChild method
svn path=/trunk/mcs/; revision=28010
2004-05-25 00:04:10 +00:00
Peter Dennis Bartok 20772dd521 - Fixed translation of wine pathnames to their unix counterpart
- Added loading of comdlg32 for wine to enable usage of common dialogs.
- Moved the comdlg32 functions into the Win32 section

svn path=/trunk/mcs/; revision=28009
2004-05-24 23:34:20 +00:00
Gonzalo Paniagua Javier 3df8e09908 2004-05-25 Gonzalo Paniagua Javier <[email protected]>
* DirectoryTest.cs: added test from bug 58875.

svn path=/trunk/mcs/; revision=28007
2004-05-24 21:56:42 +00:00
Gonzalo Paniagua Javier 8dd5b7a64b no more IsEmptyString
svn path=/trunk/mcs/; revision=28006
2004-05-24 21:49:55 +00:00
Gonzalo Paniagua Javier a7402c9747 2004-05-25 Gonzalo Paniagua Javier <[email protected]>
* Directory.cs: ERROR_FILE_NOT_FOUND in FindFirstFile means there are
	no files, but the directory was found. Fixes bug #58875.

svn path=/trunk/mcs/; revision=28005
2004-05-24 21:36:27 +00:00
Ben Maurer 893b008e14 2004-05-24 Ben Maurer <[email protected]>
* mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
	which can be done with an imm8, do it that way.
	(mono_arch_output_basic_block): ditto for a jmp
	(mono_arch_emit_prolog): Computate maximum offset of a label.

svn path=/trunk/mono/; revision=28004
2004-05-24 20:57:39 +00:00
Duncan Mak fa66940492 (Close): Remember to set the 'closed' flag.
svn path=/trunk/mcs/; revision=28003
2004-05-24 20:29:04 +00:00
Duncan Mak 955c3bbef4 Fix embarrassing typo.
svn path=/trunk/mcs/; revision=28001
2004-05-24 20:27:58 +00:00
Sebastien Pouliot 03b1d4987c 2004-05-24 Sebastien Pouliot <[email protected]>
* StreamReader.cs: Add checks for null encoding. Fixed possible integer
	overflow and ArgumentNullException in Read.

svn path=/trunk/mcs/; revision=28000
2004-05-24 20:15:47 +00:00
Martin Baulig 5873b67054 2004-05-24 Martin Baulig <[email protected]>
* enum.cs (Enum.DefineType): For the `BaseType' to be a
	TypeLookupExpression; otherwise, report a CS1008.  Fixes #58571.

svn path=/trunk/mcs/; revision=27999
2004-05-24 20:15:03 +00:00
Sebastien Pouliot 15b3b0d548 2004-05-24 Sebastien Pouliot <[email protected]>
* StreamReaderTest.cs: New tests for integer overflow and null handling

svn path=/trunk/mcs/; revision=27998
2004-05-24 20:13:55 +00:00
Martin Baulig dda855e1bf New test.
svn path=/trunk/mcs/; revision=27997
2004-05-24 20:13:16 +00:00
Duncan Mak adac222648 * DirectoryInfo.cs:
* FileInfo.cs: Reformat the whole file to use DOS line endings.
(MoveTo): Return if the destination of Move is the same as the file's
current location.

svn path=/trunk/mcs/; revision=27996
2004-05-24 19:49:18 +00:00
Martin Baulig e0daa067de 2004-05-24 Martin Baulig <[email protected]>
* decl.cs (DeclSpace.FindType): Try doing an alias lookup before
	walking the `using' list.  Fixes #53921.

svn path=/trunk/mcs/; revision=27995
2004-05-24 19:41:33 +00:00
Martin Baulig 4582bae056 2004-05-24 Martin Baulig <[email protected]>
* test-260.cs: New test for #53921.

svn path=/trunk/mcs/; revision=27994
2004-05-24 19:37:17 +00:00
Sebastien Pouliot f9154436b5 2004-05-24 Sebastien Pouliot <[email protected]>
* StreamWriter.cs: Add dispose check to Write(char) and Write(char[]),
	AutoFlush. Fixed possible integer overflow in Write(char[],int,int).

svn path=/trunk/mcs/; revision=27993
2004-05-24 19:29:11 +00:00
Sebastien Pouliot 51111282bc 2004-05-24 Sebastien Pouliot <[email protected]>
* StreamWriterTest.cs: New tests for integer overflow, disposed
	exceptions and null handling.

svn path=/trunk/mcs/; revision=27992
2004-05-24 19:27:51 +00:00
Duncan Mak 6ecda639c2 Remove debug messages
svn path=/trunk/mcs/; revision=27991
2004-05-24 19:17:23 +00:00
Duncan Mak 263c2985a7 2004-05-22 Duncan Mak <[email protected]>
* Directory.cs: Reformat the whole file to use Unix line endings
	for consistency.
	(GetFileSystemEntries): If pattern is String.Empty, always
	return an empty string array. Throw the ArgumentException if path
	is an empty string (determined using the new helper method)
	(IsEmptyString): Returns true on an empty string or a string with
	only whitespace characters.

	* Path.cs (GetPathRoot): Throw an ArgumentException if the path
	argument is String.Empty.

svn path=/trunk/mcs/; revision=27990
2004-05-24 18:45:35 +00:00
Miguel de Icaza d29ce95d37 Inner release
svn path=/trunk/mono/; revision=27988
2004-05-24 18:28:03 +00:00
Peter Dennis Bartok a1c98f5519 - Added loading of common dialog dll
svn path=/trunk/mcs/; revision=27987
2004-05-24 18:24:38 +00:00
Sebastien Pouliot 2740d6eb84 2004-05-24 Sebastien Pouliot <[email protected]>
* StringWriter.cs: Fixed possible integer overflow in Write. Changed
	spaces for tabs.

svn path=/trunk/mcs/; revision=27986
2004-05-24 18:24:29 +00:00
Sebastien Pouliot 2785a192ff 2004-05-24 Sebastien Pouliot <[email protected]>
* StringWriterTest.cs: New tests for integer overflow and disposed
	exceptions.

svn path=/trunk/mcs/; revision=27985
2004-05-24 18:21:08 +00:00
César Natarén ed63219adf 2004-05-24 Cesar Lopez Nataren <[email protected]>
* With.cs: code generation support for 'with' stm.

svn path=/trunk/mcs/; revision=27983
2004-05-24 17:52:43 +00:00
Lluis Sanchez f69e1ada89 * image.c: In mono_image_open(), always use an absolute path name to
look for already loaded images.

svn path=/trunk/mono/; revision=27982
2004-05-24 16:40:10 +00:00
Patrik Torstensson 35d5369a85 2004-05-24 18:18 CET Patrik Torstenson <[email protected]>
* mini-x86.c (mono_arch_local_regalloc): the reg allocator
	now tries to allocate prefered physical reg's for virtual
	regs. This reduces the number of emited spills/loads with
	20-30% on our core assemblies.

svn path=/trunk/mono/; revision=27981
2004-05-24 16:38:32 +00:00
Martin Baulig 90224d7d1f 2004-05-24 Martin Baulig <[email protected]>
* test-259.cs: New test for #55251.

svn path=/trunk/mcs/; revision=27980
2004-05-24 16:35:10 +00:00
Martin Baulig e121c3ecfe 2004-05-24 Martin Baulig <[email protected]>
* const.cs (Const.LookupConstantValue): Added support for
	EmptyCast's; fixes #55251.

svn path=/trunk/mcs/; revision=27979
2004-05-24 16:34:42 +00:00
Martin Baulig 8b049ae604 2004-05-24 Martin Baulig <[email protected]>
* test-258.cs: New test for #58584.

svn path=/trunk/mcs/; revision=27978
2004-05-24 16:17:38 +00:00
Sebastien Pouliot 4494459053 2004-05-24 Sebastien Pouliot <[email protected]>
* MemoryStream.cs: Fixed exception reporting to match MS Fx. Fixed the
	condition to allow zeroization of existing data when we shrink the
	stream.

svn path=/trunk/mcs/; revision=27977
2004-05-24 15:39:39 +00:00
Paolo Molaro 7d16f3f65d Mon May 24 18:21:51 CEST 2004 Paolo Molaro <[email protected]>
* jit-icalls.c: truncl() is not needed and trunc() is
	the correct thing to do anyway (bug #58287).

svn path=/trunk/mono/; revision=27975
2004-05-24 15:38:19 +00:00
Sebastien Pouliot 81abb44b6e 2004-05-24 Sebastien Pouliot <[email protected]>
* MemoryStreamTest.cs: Test that we zeroize old data when we manipulate
	the length of the stream. Verify that we throw the same exceptions as
	MS fx.

svn path=/trunk/mcs/; revision=27974
2004-05-24 15:36:14 +00:00
Martin Baulig 442edc485f 2004-05-24 Martin Baulig <[email protected]>
* ecore.cs (SimpleName.SimpleNameResolve): Renamed to
	DoSimpleNameResolve() and provide a SimpleNameResolve() wrapper
	which does the CS0135 check.  The reason is that we first need to
	check whether the variable actually exists.

svn path=/trunk/mcs/; revision=27973
2004-05-24 15:34:49 +00:00
Martin Baulig 3384dc1f42 2004-05-24 Martin Baulig <[email protected]>
* class.cs (MemberBase.DoDefine): Use DeclSpace.FindType() rather
	than RootContext.LookupType() to find the explicit interface
	type.  Fixes #58584.

svn path=/trunk/mcs/; revision=27972
2004-05-24 15:09:12 +00:00
Anirban Bhattacharjee 0cdb99143c Few tests on property grammar
svn path=/trunk/mcs/; revision=27971
2004-05-24 14:48:13 +00:00
Anirban Bhattacharjee 5a784c61ef * class.cs: Check for ReadOnly and WriteOnly modifiers added to property
svn path=/trunk/mcs/; revision=27970
2004-05-24 14:41:36 +00:00
Anirban Bhattacharjee 49fbdb1a92 * mb-paresr.jay: Support for abstruct property is added
svn path=/trunk/mcs/; revision=27969
2004-05-24 14:37:20 +00:00
Sebastien Pouliot 18f3b62bdf 2004-05-24 Sebastien Pouliot <[email protected]>
* icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
	missing in the windows build (like older cygwin include files).

svn path=/trunk/mono/; revision=27968
2004-05-24 14:32:56 +00:00
Lluis Sanchez 8934a37601 * SoapClientMessage.cs: Get the MethodInfo from the corresponding
SoapMethodStubInfo.

svn path=/trunk/mcs/; revision=27967
2004-05-24 14:03:37 +00:00
Zoltan Varga 4f89b59e58 2004-05-24 Zoltan Varga <[email protected]>
* mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
	if available.

svn path=/trunk/mono/; revision=27965
2004-05-24 12:59:48 +00:00
Zoltan Varga f68dd1444b 2004-05-24 Zoltan Varga <[email protected]>
* AppDomainSetup.cs (InitAppDomainSetup): This one returns void.

svn path=/trunk/mcs/; revision=27964
2004-05-24 12:56:12 +00:00
Jackson Harper 852c973b78 * Driver.cs: Filter on GetFiles so we only get the xml locale
files.

svn path=/trunk/mono/; revision=27963
2004-05-24 12:52:23 +00:00
Lluis Sanchez 013f0130e1 * StringCollection.cs: Renamed internal variable to make serialization
compatible with MS.NET.

svn path=/trunk/mcs/; revision=27962
2004-05-24 11:33:48 +00:00
Lluis Sanchez 3a59ec0931 * Hashtable.cs: Renamed internal class to make serialization compatible
with MS.NET.

svn path=/trunk/mcs/; revision=27961
2004-05-24 11:20:08 +00:00
Gonzalo Paniagua Javier d782507b2b 2004-05-24 Gonzalo Paniagua Javier <[email protected]>
* Page.cs: call DeterminePostBackMode only once per request. Patch by
	Evain Jb.

svn path=/trunk/mcs/; revision=27960
2004-05-24 11:14:46 +00:00
Paolo Molaro 3cad0c0665 Mon May 24 13:36:53 CEST 2004 Paolo Molaro <[email protected]>
* monograph.c: default assembly name is "mscorlib" now.

svn path=/trunk/mono/; revision=27959
2004-05-24 10:57:38 +00:00
Lluis Sanchez 1185f9fb56 * ContractReference.cs: convert relative import uris to absolute uris.
* DiscoveryClientProtocol.cs: Before resolving a reference, always
	  set the Url property.

svn path=/trunk/mcs/; revision=27958
2004-05-24 10:44:17 +00:00
Lluis Sanchez 7bcc59e7ff * ProtocolImporter.cs: issue a warning if no services have been found.
svn path=/trunk/mcs/; revision=27957
2004-05-24 10:42:05 +00:00
Atsushi Eno 814122aadc 2004-05-24 Atsushi Enomoto <[email protected]>
* XmlSchemaBuiltInDataypeTests.cs : 'Z' is not allowed here (maybe it
	  is 'T' that was wanted). More kind error message in Fail().

svn path=/trunk/mcs/; revision=27956
2004-05-24 10:40:09 +00:00
Lluis Sanchez b06d37cfb1 * MonoWSDL.cs: Get the name of the generated file from the first WSDL doc
that has a service. Don't print exception on error.

svn path=/trunk/mcs/; revision=27955
2004-05-24 10:39:05 +00:00
Raja R Harinath bb9e438c4d * Makefile: Simplify. Use executable.make.
* mcs.exe.sources: New file.  List of sources of mcs.exe.

svn path=/trunk/mcs/; revision=27954
2004-05-24 10:37:00 +00:00
Paolo Molaro 255f667098 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <[email protected]>
* driver.c: enable loop optimizations by default.

svn path=/trunk/mono/; revision=27952
2004-05-24 10:10:28 +00:00
Raja R Harinath 785d0c9457 (EXTRA_FLAGS): Remove.
(LIBRARY_COMPILE) [!HAVE_SYSTEM_XML]: Use $(BOOT_COMPILE) for
non-Xml first build.
(all-local) [!SECOND_PASS]: Simplify.

svn path=/trunk/mcs/; revision=27950
2004-05-24 09:33:14 +00:00
Raja R Harinath b2566b1126 * library.make (LIBRARY_COMPILE): New define.
($(the_lib)): Use $(LIBRARY_COMPILE) to compile $(the_lib).

* executable.make (uninstall-local): Use PROGRAM_INSTALL_DIR.

svn path=/trunk/mcs/; revision=27949
2004-05-24 09:30:22 +00:00
Jordi Mas i Hernandez ec348dff63 remove unnecessary code, since bug 57706 is fixed
svn path=/trunk/mcs/; revision=27948
2004-05-24 09:29:54 +00:00
Raja R Harinath 35a5549966 (PROGRAM_INSTALL_DIR): Install mbas into
$(prefix)/lib/mono/1.0.

svn path=/trunk/mcs/; revision=27947
2004-05-24 08:45:19 +00:00
Raja R Harinath 55767df4e3 (PROGRAM_INSTALL_DIR): Allow makefile to specify
a different directory for installation.

svn path=/trunk/mcs/; revision=27946
2004-05-24 08:43:27 +00:00
Paolo Molaro 31685d7b00 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <[email protected]>
* mini-x86.c: fix calc of max loop size when aligning loops start.

svn path=/trunk/mono/; revision=27945
2004-05-24 08:35:20 +00:00
Atsushi Eno 8aab01d991 2004-05-24 Atsushi Enomoto <[email protected]>
* NamedNodeMap.cs : Modified. "domestic or street" does not mean
	  the exact literal node name, but it means "either 'domestic' or
	  'street'". We always return fixed values.

svn path=/trunk/mcs/; revision=27944
2004-05-24 07:45:24 +00:00
Atsushi Eno 7ba146f2ca 2004-05-24 Atsushi Enomoto <[email protected]>
* Document.cs : am sure that element nodes are up to 36, not 37
	  (maybe counting the element that is in unused entity value?).

svn path=/trunk/mcs/; revision=27943
2004-05-24 07:44:24 +00:00
Atsushi Eno 92f5d743a2 2004-05-24 Atsushi Enomoto <[email protected]>
* XmlNodeTests.cs : added Normalize2().

svn path=/trunk/mcs/; revision=27942
2004-05-24 07:40:48 +00:00
Atsushi Eno 12c0df7558 2004-05-24 Atsushi Enomoto <[email protected]>
* DTDReader.cs : When sequential PE references exist, the reader only
	  expands the first one and in some cases the parser complaints the
	  content (such like expecting name character but found '%').
	  This fixes bug #58818.

svn path=/trunk/mcs/; revision=27941
2004-05-24 07:39:49 +00:00
Sebastien Pouliot 5ca3e2ca6c 2004-05-23 Sebastien Pouliot <[email protected]>
* icall.c: Fixed check for possible integer overflow in Buffer_
	BlockCopy icall. Replaced comments style // by /* */.

svn path=/trunk/mono/; revision=27939
2004-05-23 23:08:32 +00:00
Sebastien Pouliot e860b270f2 2004-05-23 Sebastien Pouliot <[email protected]>
* Buffer.cs: Fixed integer overflow in BlockCopy.

svn path=/trunk/mcs/; revision=27938
2004-05-23 23:03:16 +00:00
Miguel de Icaza 06a4450424 2004-05-24 Anders Carlsson <[email protected]>
* decl.cs:
	* enum.cs:
	Use the invariant culture when doing String.Compare for CLS case
	sensitivity.

svn path=/trunk/mcs/; revision=27937
2004-05-23 22:48:34 +00:00
Sebastien Pouliot fe01f60076 2004-05-23 Sebastien Pouliot <[email protected]>
* BufferTest.cs: Added new tests for integer overflow in BlockCopy.

svn path=/trunk/mcs/; revision=27936
2004-05-23 22:47:11 +00:00
Ben Maurer e979589adb 2004-05-23 Ben Maurer <[email protected]>
* MonoSymbolWriter.cs (AddLocal), etc: kill more arraylists.

svn path=/trunk/mcs/; revision=27935
2004-05-23 20:05:04 +00:00
Jackson Harper 23a351c5ca * MethodDef.cs: Cache vararg signatures so a new memberref is not
created for each vararg pattern.

svn path=/trunk/mcs/; revision=27934
2004-05-23 19:55:40 +00:00
Ben Maurer a530616ba2 2004-05-23 Ben Maurer <[email protected]>
* MonoSymbolTable.cs (BuildLineNumberTable): Avoid arraylist.

svn path=/trunk/mcs/; revision=27933
2004-05-23 19:39:26 +00:00
Martin Baulig 46972b8ca1 New test.
svn path=/trunk/mcs/; revision=27932
2004-05-23 19:10:51 +00:00
Martin Baulig adb9d81270 2004-05-23 Martin Baulig <[email protected]>
* decl.cs (DeclSpace.FindType): Only check the `using' list if we
	don't have any dots.  Fixes #52622, added cs0246-8.cs.

	* namespace.cs (NamespaceEntry.Lookup): Likewise.

svn path=/trunk/mcs/; revision=27931
2004-05-23 19:09:48 +00:00
Sebastien Pouliot e4283bb1bd 2004-05-23 Sebastien Pouliot <[email protected]>
* Array.cs: Fixed exception when we try to Clear outside bounds.

svn path=/trunk/mcs/; revision=27930
2004-05-23 19:05:32 +00:00
Sebastien Pouliot 5bd99cfb02 2004-05-23 Sebastien Pouliot <[email protected]>
* ArrayTest.cs: Oops wrong exception (commited Mono not MS results).

svn path=/trunk/mcs/; revision=27929
2004-05-23 19:02:29 +00:00
Francisco Figueiredo Jr. f045eece2d 2004-05-23 Francisco Figueiredo Jr. <[email protected]>
* Npgsql/NpgsqlConnection.cs: Fixed bug which prevented Npgsql to
connect to cvs built servers which had devel in its version string.

svn path=/trunk/mcs/; revision=27928
2004-05-23 19:01:14 +00:00
Sebastien Pouliot de75a9a1a4 2004-05-23 Sebastien Pouliot <[email protected]>
* ArrayTest.cs: Added a new test to clear outside the bound of a
	multidimentional array.

svn path=/trunk/mcs/; revision=27927
2004-05-23 18:57:16 +00:00
Sebastien Pouliot e9bea44135 2004-05-23 Sebastien Pouliot <[email protected]>
* Boolean.cs: Fixed Equals for True!=True (see bugzilla #58874).
	* BitConverter.cs: Fixed negative index and integer overflow in
	To... methods.

svn path=/trunk/mcs/; revision=27926
2004-05-23 18:54:17 +00:00
Sebastien Pouliot d0bd0daf44 2004-05-23 Sebastien Pouliot <[email protected]>
* BooleanTest.cs: Added new test to compare booleans using Equals
	and == (case of True!=True). Converted to NUnit2 format.

svn path=/trunk/mcs/; revision=27925
2004-05-23 18:50:05 +00:00
Martin Baulig 735f9f7feb 2004-05-23 Martin Baulig <[email protected]>
* ecore.cs (SimpleName.SimpleNameResolve): Only report a CS0135 if
	the variable also exists in the current block (otherwise, we need
	to report a CS0103).  Fixes #58670.

svn path=/trunk/mcs/; revision=27924
2004-05-23 18:30:36 +00:00
Marek Safar ccba624489 2004-05-23 Marek Safar <[email protected]>
* class.cs (MemberBase.Define): Reuse MemberType member for
	resolved type. Other methods can use it too.

svn path=/trunk/mcs/; revision=27923
2004-05-23 18:20:09 +00:00
Martin Baulig cc43a724b5 2004-05-23 Martin Baulig <[email protected]>
* test-154.cs: Added testcase for #58322.

svn path=/trunk/mcs/; revision=27922
2004-05-23 17:56:56 +00:00
Martin Baulig 518606c46f 2004-05-23 Martin Baulig <[email protected]>
* flowanalysis.cs (Reachability.Reachable): Compute this
	on-the-fly rather than storing it as a field.

svn path=/trunk/mcs/; revision=27921
2004-05-23 17:55:51 +00:00
Martin Baulig a74d3ab0a4 2004-05-23 Martin Baulig <[email protected]>
* flowanalysis.cs (Reachability.And): Manually compute the
	resulting `barrier' from the reachability.

svn path=/trunk/mcs/; revision=27920
2004-05-23 17:46:31 +00:00
Zoltan Varga 398b275d50 2004-05-23 Zoltan Varga <[email protected]>
* ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
	the stack.

svn path=/trunk/mono/; revision=27919
2004-05-23 17:33:50 +00:00
Marek Safar 2b213cf3b7 2004-05-23 Marek Safar <[email protected]>
Fix bug #57835
	* attribute.cs (AttributeTester.GetMethodObsoleteAttribute): Returns
	instance of ObsoleteAttribute when symbol is obsolete.

	* class.cs
	(IMethodData): Extended interface for ObsoleteAttribute support.

svn path=/trunk/mcs/; revision=27917
2004-05-23 15:43:06 +00:00
Sebastien Pouliot 474f053e96 2004-05-23 Sebastien Pouliot <[email protected]>
* BitConverterTest.cs: Modified ToBoolean test to prove that True!=True.

svn path=/trunk/mcs/; revision=27915
2004-05-23 15:38:04 +00:00
Sebastien Pouliot 0c596dda01 2004-05-23 Sebastien Pouliot <[email protected]>
* BitConverterTest.cs: Added new tests for negative integers and
	integer overflow in To... methods. Added new boolean convertion
	tests.

svn path=/trunk/mcs/; revision=27912
2004-05-23 15:09:15 +00:00
Zoltan Varga 00184ee838 2004-05-23 Zoltan Varga <[email protected]>
* Makefile.am (DISABLED_TESTS): Reenable remoting2 and remoting3.

svn path=/trunk/mono/; revision=27910
2004-05-23 13:45:41 +00:00
Atsushi Eno 825cdda66f 2004-05-23 Atsushi Enomoto <[email protected]>
* XmlNode.cs : RemoveChild() should check null argument.
	  Normalize() was broken in some cases.

svn path=/trunk/mcs/; revision=27909
2004-05-23 12:10:52 +00:00
Patrik Torstensson 44f764f69b 2004-04-23 Patrik Torstensson
* RealProxy.cs: Moved async functionlity here, also take
	care of custom proxies (non RemotingProxy) case for async and
	construction calls.

	* RemotingProxy.cs: allow RealProxy to call construction method and
	remove end async control (moved to RealProxy)

	Fixes remoting2/3 test case (mono/mono/tests) and closes bug #57672.

svn path=/trunk/mcs/; revision=27908
2004-05-22 22:58:16 +00:00
Duncan Mak cd424ecf02 Reformat the whole file to use Unix line endings for consistency.
svn path=/trunk/mcs/; revision=27907
2004-05-22 21:42:10 +00:00
Sebastien Pouliot aa6e918d96 2004-05-22 Sebastien Pouliot <[email protected]>
* Array.cs: Clear can now work on multidimentional arrays.

svn path=/trunk/mcs/; revision=27906
2004-05-22 21:24:51 +00:00
Jackson Harper c0723ff1e2 * InstrTable.cs: ldc.i4.M1 is aliased to ldc.i4.m1. Fixes bug
#58524.

svn path=/trunk/mcs/; revision=27905
2004-05-22 20:08:09 +00:00
Jackson Harper c57f193477 * ILParser.jay: [,] is short form for [...,...] this fixes bug
number 58569.

svn path=/trunk/mcs/; revision=27904
2004-05-22 20:02:26 +00:00
Jackson Harper 401f6b4c60 * ILParser.jay: Handle wchar, it is just an alias for char.
svn path=/trunk/mcs/; revision=27903
2004-05-22 19:40:32 +00:00
Atsushi Eno 3192ef204e 2004-05-22 Atsushi Enomoto <[email protected]>
* SqlClientPermission.cs : don't use chained obsolete .ctor.

svn path=/trunk/mcs/; revision=27902
2004-05-22 19:39:00 +00:00
Atsushi Eno 4a8aca0670 2004-05-22 Atsushi Enomoto <[email protected]>
* ConformanceLevel.cs : added.

svn path=/trunk/mcs/; revision=27900
2004-05-22 19:11:34 +00:00
Jackson Harper 1459a8a225 * GlobalMethodRef.cs: Check for sentinel properly.
svn path=/trunk/mcs/; revision=27899
2004-05-22 19:01:46 +00:00
Todd Berman 791185b384 2004-05-22 Todd Berman <[email protected]>
* corlib.dll.sources: added Mono/Runtime.cs
        * Mono: added Mono directory back
        * Mono/Runtime.cs: add back Runtime.cs, marked as internal, gnome#
        needs it.

svn path=/trunk/mcs/; revision=27897
2004-05-22 18:01:11 +00:00
Atsushi Eno 68bc8cf585 2004-05-22 Atsushi Enomoto <[email protected]>
* XmlSchemaDatatypeVariety.cs,
	  XmlSchemaValidity.cs : they are NET_2_0 enums.

svn path=/trunk/mcs/; revision=27896
2004-05-22 17:54:59 +00:00
Zoltan Varga d151274ac0 2004-05-22 Zoltan Varga <[email protected]>
* marshal.c (mono_ftnptr_to_delegate): Fix warning.

svn path=/trunk/mono/; revision=27895
2004-05-22 17:50:37 +00:00
Atsushi Eno 19a8d9c09f 2004-05-22 Atsushi Enomoto <[email protected]>
* XmlNodeChangedEventArgs.cs : the last patch looks true
	  ONLY AFTER .NET 2.0.

svn path=/trunk/mcs/; revision=27894
2004-05-22 17:47:26 +00:00
Zoltan Varga d63bf6de65 2004-05-22 Zoltan Varga <[email protected]>
* marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
	check after MONO_VTADDR. Fixes pinvoke2.exe.

svn path=/trunk/mono/; revision=27893
2004-05-22 17:47:19 +00:00
César Natarén 6c51b362ca 2004-05-22 Cesar Lopez Nataren <[email protected]>
* FieldInfo.cs: changed default constructor from internal to protected, so classes
	that inherit from it can get build.

svn path=/trunk/mcs/; revision=27892
2004-05-22 17:43:52 +00:00
Atsushi Eno 521405a974 2004-05-22 Atsushi Enomoto <[email protected]>
* System.Data.SqlXml.dll.sources : updated .net 2.0 classes.

svn path=/trunk/mcs/; revision=27891
2004-05-22 17:23:31 +00:00
Atsushi Eno 79e1bf271d 2004-05-22 Atsushi Enomoto <[email protected]>
* Added ChangeLog.
	* XQueryProcessor.cs,
	  XmlViewSchema.cs,
	  XmlViewSchemaDictionary.cs : removed old classes.
	* XQueryCommand.cs,
	  XmlMapping.cs,
	  XmlMappingDictionary.cs : added new clases.

svn path=/trunk/mcs/; revision=27890
2004-05-22 17:22:27 +00:00
Atsushi Eno 744ed5b65f 2004-05-22 Atsushi Enomoto <[email protected]>
* XmlValueConverter.cs : missed NET_2_0.

svn path=/trunk/mcs/; revision=27889
2004-05-22 17:13:47 +00:00
Atsushi Eno 8c53a3828d 2004-05-22 Atsushi Enomoto <[email protected]>
* XPathAtomicValue.cs : missed NET_2_0.

svn path=/trunk/mcs/; revision=27888
2004-05-22 17:13:00 +00:00
Atsushi Eno 78175a2bdb 2004-05-22 Atsushi Enomoto <[email protected]>
* XmlReaderSettings.cs, XmlWriterSettings.cs : NET_2_0 were missed.

svn path=/trunk/mcs/; revision=27887
2004-05-22 17:12:03 +00:00
Zoltan Varga a0abffd305 2004-05-22 Zoltan Varga <[email protected]>
* mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
	should set carry.

	* basic-long.cs: Add tests for add/subtract of immediates with carry.

svn path=/trunk/mono/; revision=27886
2004-05-22 17:04:16 +00:00
Atsushi Eno 38d8ae1ab7 2004-05-22 Atsushi Enomoto <[email protected]>
* System.Xml.dll.sources : added/removed all NET_2_0 classes.

svn path=/trunk/mcs/; revision=27885
2004-05-22 16:59:50 +00:00
Atsushi Eno edcb7df121 2004-05-22 Atsushi Enomoto <[email protected]>
* IXPathChangeNavigable.cs,
	  IXPathEditable.cs,
	  NodeChangedEventArgs.cs,
	  NodeChangedEventHandler.cs,
	  XPathAtomicValue.cs,
	  XPathChangeNavigator.cs,
	  XPathDocumentNodeChangedAction.cs,
	  XPathEditableNavigator.cs,
	  XPathItem.cs,
	  XmlChangeFilters.cs,
	  XmlNodeChangeType.cs : added NET_2_0 classes.
	* XPathDocument.cs,
	  XPathNavigator.cs : updated NET_2_0 members.

svn path=/trunk/mcs/; revision=27884
2004-05-22 16:59:30 +00:00
Atsushi Eno 01f2cf3765 2004-05-22 Atsushi Enomoto <[email protected]>
* IXmlSchemaInfo.cs,
	  IXmlType.cs,
	  XmlSchemaDatatypeVariety.cs,
	  XmlSchemaValidity.cs,
	  XmlTypeCode.cs,
	  XmlValueConverter.cs : added.

	* XmlSchemaInfo.cs : removed (.NET 1.2).

	* XmlSchemaBuiltInType.cs,
	  XmlSchemaSet.cs : updated.

svn path=/trunk/mcs/; revision=27883
2004-05-22 16:57:46 +00:00
Atsushi Eno 06fd5a823c 2004-05-22 Atsushi Enomoto <[email protected]>
* IXmlCompilerInclude.cs,
	  QueryEventArgs.cs,
	  QuertEventHandler.cs,
	  XmlArgumentList.cs,
	  XsltCommand.cs : added.

	* XmlQueryArgumentList.cs,
	  XsltProcessor.cs : removed (only in .NET 1.2).

	* XmlCommand.cs,
	  XmlQueryCompileException.cs,
	  XmlQueryException.cs : updated API to that of .NET 2.0.

svn path=/trunk/mcs/; revision=27882
2004-05-22 16:56:21 +00:00
Atsushi Eno ab2afd4c7d 2004-05-22 Atsushi Enomoto <[email protected]>
* XmlFactory.cs,
	  XmlItemView.cs,
	  XmlItemViewCollection.cs,
	  XmlReaderSettings.cs,
	  XmlWriterSettings.cs : added new .NET 2.0 classes.

	* AsyncXmlTextWriter.cs,
	  IXPathChangeNavigator.cs,
	  IXPathEditor.cs,
	  IXPathNavigator.cs,
	  XmlChangeFilters.cs,
	  XmlInfoItemType.cs,
	  XmlNodeChangeType.cs,
	  XPathChangeNavigator.cs,
	  XPathDocument2.cs,
	  XPathDocument2ChangedEventAction.cs,
	  XPathDocument2ChangedEventHandler.cs,
	  XPathEditor.cs,
	  XPathNavigator2.cs : removed. (They are only in .NET 1.2)

	* XmlWriter.cs : added new NET_2_0 WriteElementString().

svn path=/trunk/mcs/; revision=27881
2004-05-22 16:54:34 +00:00
Zoltan Varga 64d99d48cc 2004-05-22 Zoltan Varga <[email protected]>
* mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.

svn path=/trunk/mono/; revision=27880
2004-05-22 16:50:22 +00:00
Francisco Figueiredo Jr. eccb3e4616 2004-05-22 Francisco Figueiredo Jr. <[email protected]>
Npgsql.xml: Removed file.

svn path=/trunk/mcs/; revision=27879
2004-05-22 16:47:05 +00:00
Zoltan Varga 94079432ed 2004-05-22 Zoltan Varga <[email protected]>
* Makefile.am (PLATFORM_DISABLED_TESTS): Reenable thread abort test.

svn path=/trunk/mono/; revision=27878
2004-05-22 16:45:44 +00:00
Francisco Figueiredo Jr. 4967a86190 2004-05-22 Francisco Figueiredo Jr. <[email protected]>
Npgsql/NpgsqlCommand.cs,
	Npgsql/NpgsqlConnection.cs,
	Npgsql/NpgsqlDataReader.cs,
	Npgsql/NpgsqlException.cs,
	Npgsql/NpgsqlTransaction.cs,
	Npgsql/Design/ConnectionStringEditor.cs,
	Npgsql/Design/ConnectionStringEditorForm.cs,
	Npgsql/Design/NpgsqlParameterConverter.cs,
	Npgsql/Design/NpgsqlParametersEditor.cs,
	NpgsqlTypes/NpgsqlTypesHelper.cs: Commit log by
	Glen Parker ([email protected]): Bug #772 ("Using
	Command and Prepare adds single quotes to strings twice")
	is fixed  :-)   It was broken when running on the version 3
	protocol (extended query support) on PostgreSQL 7.4.
	Some of the files in Design were formatted with macintosh line
	terminators. This was screwing up the xmldoc generator in csc,
	so I reformatted to make it work.
	I've added some essential xmldoc comments (<summary> tags).  Much work
remains here, but I wanted to get a few in on common functions and
properties.

	The .build file will now generate the Npgsql.xml file, next to the .dll
file.  I removed the existing Npgsql.xml from CVS.

	Thanks Glen Parker for this patch.

svn path=/trunk/mcs/; revision=27877
2004-05-22 16:44:57 +00:00
Francisco Figueiredo Jr. 7d2226c132 2004-05-20 Francisco Figueiredo Jr. <[email protected]>
NpgsqlAsciiRow.cs,
        NpgsqlBackEndKeyData.cs,
        NpgsqlBinaryRow.cs,
        NpgsqlCommand.cs,
        NpgsqlConnectedState.cs,
        NpgsqlConnection.cs,
        NpgsqlConnection.resx,
        NpgsqlConnector.cs,
        NpgsqlConnectorPool.cs,
        NpgsqlError.cs,
        NpgsqlMediator.cs,
        NpgsqlMessageTypes.cs,
        NpgsqlPasswordPacket.cs,
        NpgsqlQuery.cs,
        NpgsqlRowDescription.cs,
        NpgsqlStartupPacket.cs,
        NpgsqlState.cs,
        PGUtil.cs,
        NpgsqlTypes/NpgsqlTypesHelper.cs : - store protocol version as an enum, keep numbers as protocol specific
        - split more protocol handlers between version 2 and version 3
        - split MessageTypes class on ver2/ver3 and add remaining types for ver3        - removed handlers for deprecated protocol message types
        - store BackendKeyData in its own member on Mediator
        - Store ParameterStatus objects in a key map on Mediator
        - Get backend version now from the Mediator if possible
        - Rewrite parsers for server version and connection string
        - Store server version numericially (in a new class ServerVersion)
        - As usual, lots of code cleanup/commenting/etc.

        Thanks very much Glen Parker ([email protected]) for this patch.

svn path=/trunk/mcs/; revision=27876
2004-05-22 16:36:46 +00:00
Marek Safar aaf30086d7 2004-05-22 Marek Safar <[email protected]>
* attribute.cs: Fix bug #55970

svn path=/trunk/mcs/; revision=27875
2004-05-22 16:28:29 +00:00
Zoltan Varga 8a68ae48b4 2004-05-22 Zoltan Varga <[email protected]>
* mini.c (inline_method): Allways inline some wrappers even if the cost
	is too large. Fixes #58785.

	* mini.c: Add support for MARSHAL_CONV_FTN_DEL.

svn path=/trunk/mono/; revision=27874
2004-05-22 16:17:35 +00:00
Zoltan Varga 5e0b82b772 2004-05-22 Zoltan Varga <[email protected]>
* marshal.h marshal.c metadata.h: Add beginnings of support for
	ftnptr -> delegate marshalling.

svn path=/trunk/mono/; revision=27873
2004-05-22 16:16:03 +00:00
Marek Safar fcddd26bcd 2004-05-22 Marek Safar <[email protected]>
Fix bug #52705
	* attribute.cs
	(GetObsoleteAttribute): New method. Creates the instance of
	ObsoleteAttribute.
	(AttributeTester.GetMemberObsoleteAttribute): Returns instance of
	ObsoleteAttribute when method is obsolete.
	(AttributeTester.Report_ObsoleteMessage): Common method for
	Obsolete error/warning reporting.

	* class.cs
	(TypeContainer.base_classs_type): New member for storing parent type.

	* decl.cs
	(MemberCore.GetObsoleteAttribute): Returns instance of ObsoleteAttribute
	for this MemberCore.

svn path=/trunk/mcs/; revision=27872
2004-05-22 15:36:43 +00:00
Atsushi Eno d7c2e3753a 2004-05-22 Atsushi Enomoto <[email protected]>
* XmlNodeChangedEventArgs.cs : not properly inherited from EventArgs.

svn path=/trunk/mcs/; revision=27870
2004-05-22 15:16:02 +00:00
Sebastien Pouliot cd21cc027f 2004-05-22 Sebastien Pouliot <[email protected]>
* ArrayTest.cs: Added a new test to clear a multidimentional array.

svn path=/trunk/mcs/; revision=27869
2004-05-22 14:59:07 +00:00
Sebastien Pouliot 850dd9a2f3 2004-05-22 Sebastien Pouliot <[email protected]>
* ArrayTest.cs: Added a new test to clear a jagged array.

svn path=/trunk/mcs/; revision=27868
2004-05-22 14:50:18 +00:00
Jordi Mas i Hernandez 68751ce1c2 ImageAttributes sample
svn path=/trunk/mcs/; revision=27866
2004-05-22 14:31:53 +00:00
Sebastien Pouliot 73901e647f 2004-05-22 Sebastien Pouliot <[email protected]>
* UIntPtr.cs: We now only accept 32bits unsigned values in the ulong
	constructor unless we're on a 64 bits machine.

svn path=/trunk/mcs/; revision=27865
2004-05-22 14:04:59 +00:00
Sebastien Pouliot 28fb1381e1 2004-05-22 Sebastien Pouliot <[email protected]>
* corlib_test.dll.sources: Added UIntPtrTest to the build.

svn path=/trunk/mcs/; revision=27864
2004-05-22 14:02:47 +00:00
Sebastien Pouliot fc82ab0f27 2004-05-22 Sebastien Pouliot <[email protected]>
* UIntPtrTest.cs: New. Tests for 32/64 bits behaviour of UIntPtr.

svn path=/trunk/mcs/; revision=27863
2004-05-22 14:01:38 +00:00
Sebastien Pouliot 76bc25fee3 2004-05-22 Sebastien Pouliot <[email protected]>
* IntPtr.cs: We now only accept 32bits values in the long constructor
	unless we're on a 64 bits machine.

svn path=/trunk/mcs/; revision=27862
2004-05-22 13:47:13 +00:00
Sebastien Pouliot bb95a9b54e 2004-05-22 Sebastien Pouliot <[email protected]>
* corlib_test.dll.sources: Added IntPtrTest to the build.

svn path=/trunk/mcs/; revision=27861
2004-05-22 13:38:44 +00:00
Sebastien Pouliot 35a2c0856c 2004-05-22 Sebastien Pouliot <[email protected]>
* IntPtrTest.cs: New. Tests for 32/64 bits behaviour of IntPtr.
	* SingleTest.cs: Added tests to compare positive 0 and negative 0.

svn path=/trunk/mcs/; revision=27860
2004-05-22 13:34:07 +00:00
Duncan Mak 6f57519677 The file was mostly in DOS endings already, for the sake of
consistency, converted it all to DOS endings.
(ToType): When value is null, immediately return null and don't ever
throw a NullReferenceException. When conversionType is null, throw an
InvalidCastException. Give a better error message when attempting to
convert to a DBNull as well.

svn path=/trunk/mcs/; revision=27856
2004-05-22 08:09:39 +00:00
Miguel de Icaza 7665cb70ff 2004-05-10 Joerg Rosenkranz <[email protected]>
* System.Data.OracleClient.Oci/OciCalls.cs:
		Added OCI calls OCICharSetToUnicode and OCIUnicodeToCharSet.
 	* System.Data.OracleClient.Oci/OciStatementHandle.cs:
 		Changed statement encoding from UTF8 to OCIUnicodeToCharSet.
 	* System.Data.OracleClient.Oci/OciDefineHandle.cs:
 		Changed string encoding from UTF8 to OCICharSetToUnicode.

svn path=/trunk/mcs/; revision=27855
2004-05-21 22:21:59 +00:00
Bernie Solomon f301225fa7 2004-05-21 Bernie Solomon <[email protected]>
* transform.c: ignore new LMF opcodes

svn path=/trunk/mono/; revision=27854
2004-05-21 21:18:39 +00:00
Jackson Harper 56ca124233 * driver.cs: More fiddling with paths.
svn path=/trunk/mcs/; revision=27853
2004-05-21 20:22:20 +00:00
Neale Ferguson 0620438d6e Remove debugging printfs
svn path=/trunk/mono/; revision=27852
2004-05-21 20:13:49 +00:00
Dick Porter 7d99c5cd37 File share mode notes
svn path=/trunk/mono/; revision=27851
2004-05-21 19:55:14 +00:00
Dick Porter dc53da821c 2004-05-21 Dick Porter <[email protected]>
* io.c (CreateFile): Check for existing share modes when opening
	a file.

	* handles.c:
	* handles-private.h:
	* daemon-messages.h:
	* daemon.c: Maintain a hash of file share modes, keying on device
	and inode (to cope with symlinks.)

svn path=/trunk/mono/; revision=27850
2004-05-21 19:46:43 +00:00
Atsushi Eno 87a6a67327 2004-05-21 Atsushi Enomoto <[email protected]>
* Manager.cs : It should not allow invalid encoding name such as
	  euc_jp and shift-jis.

svn path=/trunk/mcs/; revision=27849
2004-05-21 19:34:42 +00:00
Jackson Harper 2d1255fee8 oops
svn path=/trunk/mcs/; revision=27848
2004-05-21 19:05:43 +00:00
Sebastien Pouliot 020838c2c7 2004-05-21 Sebastien Pouliot <[email protected]>
* Decimal.cs: I say truncate but used floor :(

svn path=/trunk/mcs/; revision=27847
2004-05-21 19:04:42 +00:00
Sebastien Pouliot 66bcd1b91d 2004-05-21 Sebastien Pouliot <[email protected]>
* DecimalTest.cs: Added tests for negative values and large number
	parsing (> Int64).

svn path=/trunk/mcs/; revision=27846
2004-05-21 19:01:11 +00:00
Atsushi Eno 21b31d8da5 2004-05-21 Atsushi Enomoto <[email protected]>
* tools/uni2tab.c : non JIS X 0208 characters could not be decoded.
	  (It is hack!)
	* CJK/jis.table : updated using the latest uni2tab.c

svn path=/trunk/mcs/; revision=27845
2004-05-21 18:59:34 +00:00
Jackson Harper 24cdfee082 * driver.cs: Allow the root and gacdir to both be specified. In
this case they are combined.

svn path=/trunk/mcs/; revision=27844
2004-05-21 18:33:07 +00:00
Neale Ferguson dc8be3c947 Further JIT fixes for S390
svn path=/trunk/mono/; revision=27843
2004-05-21 18:32:16 +00:00
Marek Safar 534934f475 2004-05-21 Marek Safar <[email protected]>
* attribute.cs, const.cs: Fix bug #58590

svn path=/trunk/mcs/; revision=27842
2004-05-21 18:25:21 +00:00
Zoltan Varga 1abb878d0b 2004-05-21 Zoltan Varga <[email protected]>
* threads.c: Fix warnings.

svn path=/trunk/mono/; revision=27841
2004-05-21 18:16:06 +00:00
Zoltan Varga c8c185d620 2004-05-21 Zoltan Varga <[email protected]>
* threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.

svn path=/trunk/mono/; revision=27840
2004-05-21 18:14:35 +00:00
Zoltan Varga 2e29b7b105 2004-05-21 Zoltan Varga <[email protected]>
* mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
	([email protected]). Beginning of support for sparc/linux.

	* mini-sparc.c: Optimize retrieval of LMF address.

svn path=/trunk/mono/; revision=27839
2004-05-21 17:22:56 +00:00
Jackson Harper c986b021fb * driver.cs: Do not allow gacdir and root to be specified at the
same time. Cleanup help. Add help for options.

svn path=/trunk/mcs/; revision=27838
2004-05-21 17:10:29 +00:00
Patrik Torstensson ef50c1b2e1 2004-05-21 Patrik Torstensson <[email protected]>
* TcpListener.cs: Fixes a lot of the problems with remoting nunit tests.

	(AcceptTcpClient): Don't create TcpClient before a
	connection is accepted.

	(LocalEndPoint): Use Server LocalEndPoint if connected
	otherwise use endpoint from ctor.

	(Init): Save end point, not server endpoint. This did
	cause TcpListener to ignore port sent via constructor.

	(Pending): Fixed wait time (method should return directly)

	(Start): Moved Bind here instead of Init method; old method
	caused us to bind ports even if the listener was stopped.

	(Stop): Null server when stopping

svn path=/trunk/mcs/; revision=27837
2004-05-21 17:05:32 +00:00
César Natarén f773ee528a 2004-05-21 Cesar Lopez Nataren <[email protected]>
* Statement.cs: initial code generation of 'for'.

svn path=/trunk/mcs/; revision=27835
2004-05-21 16:27:55 +00:00
César Natarén 7e9b258ea5 updates from grammar changes for building for_stm ast
svn path=/trunk/mcs/; revision=27834
2004-05-21 16:14:29 +00:00
César Natarén 83c65824c1 *** empty log message ***
svn path=/trunk/mcs/; revision=27833
2004-05-21 16:11:41 +00:00
Martin Baulig eca5827d0f 2004-05-21 Martin Baulig <[email protected]>
* test-257.cs: New test for #28098.

svn path=/trunk/mcs/; revision=27832
2004-05-21 16:03:12 +00:00
Martin Baulig 16dc91b8c3 2004-05-21 Martin Baulig <[email protected]>
* flowanalysis.cs (FlowBranching.MergeTopBlock): Don't check for
	out parameters if the end of the method is unreachable.  Fixes
	#58098.

svn path=/trunk/mcs/; revision=27831
2004-05-21 15:53:20 +00:00
Jackson Harper f7b798ebd6 * driver.cs: Add uninstall-specific option. This takes an assembly
file and uninstalls a matching named one from the GAC. Fix search
	string shenanigans when uninstalling.

svn path=/trunk/mcs/; revision=27830
2004-05-21 15:35:40 +00:00
Atsushi Eno a1ad65b95b 2004-05-21 Atsushi Enomoto <[email protected]>
* DataColumnCollection.cs : NullReferenceException was thrown when
	  the table was not found.
	* DataRowCollection.cs :
	  Find() just returns null for null value under MS.NET 1.1.
	  RemoveAt() should also avoid to call AcceptChanges() like Remove().
	* UniqueConstraint.cs : in AssertConstraint() throw ConstraintException
	  directly under MS.NET (for nunit test).

svn path=/trunk/mcs/; revision=27829
2004-05-21 15:29:30 +00:00
Sebastien Pouliot 5d408e4f96 2004-05-21 Sebastien Pouliot <[email protected]>
* Decimal.cs: Fixed To... methods that needs to trunk the integer part
	of Decimal (and not use the banker's rounding like Convert.To...).

svn path=/trunk/mcs/; revision=27828
2004-05-21 15:10:07 +00:00
Sebastien Pouliot 5d7daac707 2004-05-21 Sebastien Pouliot <[email protected]>
* DecimalTest.cs: But IConvertible does share Convert.To behaviour.

svn path=/trunk/mcs/; revision=27827
2004-05-21 15:08:02 +00:00
Sebastien Pouliot a735f6ebfb 2004-05-21 Sebastien Pouliot <[email protected]>
* DecimalTest.cs: Added new unit test to check for correct rounding.
	It appears that Decimal.To... trunk but Convert.To... use banking
	rounding (so we can't use Convert.To... to implement To...).

svn path=/trunk/mcs/; revision=27825
2004-05-21 14:32:36 +00:00
Gonzalo Paniagua Javier f957442c6c removed comment
svn path=/trunk/mono/; revision=27824
2004-05-21 14:01:15 +00:00
Marek Safar 63bb196907 2004-05-21 Marek Safar <[email protected]>
* test-256.cs: New test for #58590.

svn path=/trunk/mcs/; revision=27823
2004-05-21 13:57:16 +00:00
Miguel de Icaza b962e0d7ef Like this
svn path=/trunk/mono/; revision=27822
2004-05-21 13:48:10 +00:00
Paolo Molaro 1b0fe627cd More encoding fixes.
svn path=/trunk/mono/; revision=27820
2004-05-21 13:04:55 +00:00
Gonzalo Paniagua Javier 423cbb8537 2004-05-21 Gonzalo Paniagua Javier <[email protected]>
* Makefile.am:
	* monowiz.win32.nsi: improved windows installer script.

svn path=/trunk/mono/; revision=27818
2004-05-21 13:00:03 +00:00
Gonzalo Paniagua Javier b7e5206d16 added comment to m_value field
svn path=/trunk/mcs/; revision=27817
2004-05-21 12:42:29 +00:00
Urs C. Muff e18f32c0fd Line ending fix
svn path=/trunk/mono/; revision=27816
2004-05-21 12:24:55 +00:00
Marek Safar 2a5ae6f05f 2004-05-21 Marek Safar <[email protected]>
* codegen.cs, cs-parser.jay: Removed SetAttributes method.
	Hari was right, why extra method.

svn path=/trunk/mcs/; revision=27815
2004-05-21 12:15:22 +00:00
Sebastien Pouliot daa6129e0e 2004-05-21 Sebastien Pouliot <[email protected]>
* Single.cs: Fixed CompareTo and Equals (copied fix from Double) wrt
	to NaN compares (see new unit tests).

svn path=/trunk/mcs/; revision=27814
2004-05-21 12:07:48 +00:00
Sebastien Pouliot cfede82cd7 2004-05-21 Sebastien Pouliot <[email protected]>
* corlib_test.dll.sources: Added SingleTest to the build.

svn path=/trunk/mcs/; revision=27813
2004-05-21 11:47:20 +00:00
Sebastien Pouliot 0dcf2237c9 2004-05-21 Sebastien Pouliot <[email protected]>
* SingleTest.cs: New. Unit tests for Single (adapted from Double).

svn path=/trunk/mcs/; revision=27812
2004-05-21 11:44:03 +00:00
Marek Safar 85a4243208 2004-05-21 Marek Safar <[email protected]>
* attribute.cs, cs-parser.jay: Fix errors/cs0579-7.cs.

svn path=/trunk/mcs/; revision=27811
2004-05-21 11:42:47 +00:00
Paolo Molaro f2fb958ea4 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <[email protected]>
* exceptions-ppc.c:  handle alloca in methods with clauses.

svn path=/trunk/mono/; revision=27809
2004-05-21 11:15:33 +00:00
Paolo Molaro a5dff37d61 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <[email protected]>
* mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.

svn path=/trunk/mono/; revision=27808
2004-05-21 10:51:09 +00:00
Raja R Harinath f9ea5d99fb remove doubled word, and slightly disambiguate a sentence.
svn path=/trunk/mono/; revision=27807
2004-05-21 09:56:06 +00:00
Raja R Harinath 57f7b34025 Update to include instructions for the various new
bootstrap-like targets.

svn path=/trunk/mono/; revision=27806
2004-05-21 08:51:29 +00:00
Atsushi Eno b13cbb2557 2004-05-21 Atsushi Enomoto <[email protected]>
* XmlSchemaDataImporter.cs : Setting startindex in LastIndexOf()
	  caused problem on qualified name to get schema Field name.

svn path=/trunk/mcs/; revision=27803
2004-05-21 08:03:32 +00:00
Atsushi Eno d911c8c4e8 2004-05-21 Atsushi Enomoto <[email protected]>
* Uri.cs :
	  AbsoluteUri does not escape file URI string.
	  ToString() should unescape every file uri. MS.NET.ToString() does
	  not unescape '#' but it looks a bug.

svn path=/trunk/mcs/; revision=27802
2004-05-21 07:55:28 +00:00
Jackson Harper 3c53b46c3b * driver.cs: This is the new gacutil. Right now it wont get built,
after I do a little more testing I will make it the built/installed
	gacutil.

svn path=/trunk/mcs/; revision=27801
2004-05-21 07:21:08 +00:00
Atsushi Eno 1f9f45592a 2004-05-20 Atsushi Enomoto <[email protected]>
* XmlDataReader.cs : Now data reader is namespace aware in all places.
	  When table's namespace is different, it entered to infinite loop.

svn path=/trunk/mcs/; revision=27800
2004-05-21 05:55:55 +00:00
Umadevi S 3b7e9b62a3 2004-05-21 Umadevi S <[email protected]>
* System.Data.OracleClient.Oci/OciDefineHandle.cs
          Fixed bug 55030. Included checking for size

svn path=/trunk/mcs/; revision=27799
2004-05-21 05:33:18 +00:00
Sebastien Pouliot cfd312dfb2 2004-05-20 Sebastien Pouliot <[email protected]>
* UTF7EncodingTest.cs, UnicodeEncodingTest.cs: Removed unused SetUp
	and TearDown to facilitate searches.

svn path=/trunk/mcs/; revision=27798
2004-05-21 01:24:26 +00:00
Sebastien Pouliot fc84e62f34 2003-05-20 Sebastien Pouliot <[email protected]>
* PolicyLevelTest.cs, StrongNameTest.cs: SetUp is now public (required
	for new nunit).

svn path=/trunk/mcs/; revision=27797
2004-05-21 01:22:17 +00:00
Sebastien Pouliot 9c9fd72996 2003-05-20 Sebastien Pouliot <[email protected]>
* PublisherIdentityPermissionTest.cs: SetUp is now public (required
	for new nunit).

svn path=/trunk/mcs/; revision=27796
2004-05-21 01:18:43 +00:00
Sebastien Pouliot de2fd4fcac 2004-05-20 Sebastien Pouliot <[email protected]>
* X509CapiTest.cs: SetUp and TearDown are now public (required for new
	nunit).
	* X509SpcTest.cs: SetUp and TearDown are now public (required for new
	nunit).

svn path=/trunk/mcs/; revision=27795
2004-05-21 01:16:53 +00:00
Sebastien Pouliot b20fb36b80 2003-05-20 Sebastien Pouliot <[email protected]>
* SecurityElementTest.cs: SetUp is now public (required for new nunit).

svn path=/trunk/mcs/; revision=27794
2004-05-21 01:14:54 +00:00
Sebastien Pouliot 1ebda52a5a 2003-05-20 Sebastien Pouliot <[email protected]>
* StrongNameKeyPairTest.cs: SetUp (renamed) is now public (required
	for new nunit).

svn path=/trunk/mcs/; revision=27793
2004-05-21 01:13:09 +00:00
Sebastien Pouliot b4ad670189 2004-05-20 Sebastien Pouliot <[email protected]>
* MemoryStream.cs: SetUp is now	public (required for new nunit).

svn path=/trunk/mcs/; revision=27792
2004-05-21 01:10:40 +00:00
Sebastien Pouliot 5dedc57476 2004-05-20 Sebastien Pouliot <[email protected]>
* AppDomainTest.cs: Renamed Unload to TearDown (like it's attribute)
	to ease searches.

svn path=/trunk/mcs/; revision=27791
2004-05-21 01:09:02 +00:00
Sebastien Pouliot 2584b0aaf2 2004-05-20 Sebastien Pouliot <[email protected]>
* CryptoStreamTest.cs, DESCryptoServiceProviderTest.cs,
	DSACryptoServiceProviderTest.cs, DSATest.cs, FromBase64Transform.cs,
	HMACRIPEMD160Test.cs, MD5Test.cs, PKCS1MaskGenerationMethodTest.cs,
	RIPEMD160ManagedTest.cs, RNGCryptoServiceProviderTest.cs,
	RSACryptoServiceProviderTest.cs, RSAOAEPKeyExchangeDeformatterTest.cs,
	RSAOAEPKeyExchangeFormatterTest.cs, RSAPKCS1KeyExchangeDeformatterTest.cs,
	RSAPKCS1KeyExchangeFormatterTest.cs, RSAPKCS1SignatureDeformatterTest.cs,
	RSAPKCS1SignatureFormatterTest.cs, RSATest.cs: SetUp/TearDown are now
	public (required for new nunit).

svn path=/trunk/mcs/; revision=27790
2004-05-21 01:03:41 +00:00
Sebastien Pouliot 6556ca5186 2004-05-20 Sebastien Pouliot <[email protected]>
* KeyInfoTest.cs: SetUp is now public (required for new nunit).
	* ReferenceTest.cs: SetUp is now public (required for new nunit).

svn path=/trunk/mcs/; revision=27789
2004-05-21 00:58:23 +00:00
Jackson Harper dea02cc0e4 * DirectoryInfoTest.cs: Add test for CreateSubdirectory.
svn path=/trunk/mcs/; revision=27788
2004-05-21 00:46:48 +00:00
Francisco Figueiredo Jr. cffa7d149e 2004-05-20 Francisco Figueiredo Jr. <[email protected]>
NpgsqlAsciiRow.cs,
        NpgsqlBackEndKeyData.cs,
        NpgsqlBinaryRow.cs,
        NpgsqlCommand.cs,
        NpgsqlConnectedState.cs,
        NpgsqlConnection.cs,
        NpgsqlConnection.resx,
        NpgsqlConnector.cs,
        NpgsqlConnectorPool.cs,
        NpgsqlError.cs,
        NpgsqlMediator.cs,
        NpgsqlMessageTypes.cs,
        NpgsqlPasswordPacket.cs,
        NpgsqlQuery.cs,
        NpgsqlRowDescription.cs,
        NpgsqlStartupPacket.cs,
        NpgsqlState.cs,
        PGUtil.cs,
        NpgsqlTypes/NpgsqlTypesHelper.cs : - store protocol version as an enum, keep numbers as protocol specific
        - split more protocol handlers between version 2 and version 3
        - split MessageTypes class on ver2/ver3 and add remaining types for ver3        - removed handlers for deprecated protocol message types
        - store BackendKeyData in its own member on Mediator
        - Store ParameterStatus objects in a key map on Mediator
        - Get backend version now from the Mediator if possible
        - Rewrite parsers for server version and connection string
        - Store server version numericially (in a new class ServerVersion)
        - As usual, lots of code cleanup/commenting/etc.

        Thanks very much Glen Parker ([email protected]) for this patch.

svn path=/trunk/mcs/; revision=27787
2004-05-21 00:05:13 +00:00
Francisco Figueiredo Jr. 737e46dcb5 2004-05-20 Francisco Figueiredo Jr. <[email protected]>
NpgsqlAsciiRow.cs,
	NpgsqlBackEndKeyData.cs,
	NpgsqlBinaryRow.cs,
	NpgsqlCommand.cs,
	NpgsqlConnectedState.cs,
	NpgsqlConnection.cs,
	NpgsqlConnection.resx,
	NpgsqlConnector.cs,
	NpgsqlConnectorPool.cs,
	NpgsqlError.cs,
	NpgsqlMediator.cs,
	NpgsqlMessageTypes.cs,
	NpgsqlPasswordPacket.cs,
	NpgsqlQuery.cs,
	NpgsqlRowDescription.cs,
	NpgsqlStartupPacket.cs,
	NpgsqlState.cs,
	PGUtil.cs,
	NpgsqlTypes/NpgsqlTypesHelper.cs : - store protocol version as an enum, keep numbers as protocol specific
	- split more protocol handlers between version 2 and version 3
	- split MessageTypes class on ver2/ver3 and add remaining types for ver3	- removed handlers for deprecated protocol message types
	- store BackendKeyData in its own member on Mediator
	- Store ParameterStatus objects in a key map on Mediator
	- Get backend version now from the Mediator if possible
	- Rewrite parsers for server version and connection string
	- Store server version numericially (in a new class ServerVersion)
	- As usual, lots of code cleanup/commenting/etc.

	Thanks very much Glen Parker ([email protected]) for this patch.

svn path=/trunk/mcs/; revision=27786
2004-05-21 00:04:00 +00:00
Jackson Harper 9c7aa8ac9c * DirectoryInfo.cs: Create subdirectories correctly if more then
one is supplied.

svn path=/trunk/mcs/; revision=27785
2004-05-20 23:59:46 +00:00
Martin Baulig 4b29217cc6 Make this actually compile.
svn path=/trunk/mcs/; revision=27784
2004-05-20 23:17:31 +00:00
Urs C. Muff 1fc1a9d860 Initial checkin for Mono Mac Framework building script by Andy Satori
svn path=/trunk/mono/; revision=27783
2004-05-20 22:43:41 +00:00
Neale Ferguson cf0eedc202 More fixes for code generation (CONV_I1/CONV_I2)
svn path=/trunk/mono/; revision=27782
2004-05-20 21:20:38 +00:00
Sebastien Pouliot ced9344e95 2004-05-20 Sebastien Pouliot <[email protected]>
* Convert.cs: Added checks for integer overflow for From|ToBase64Char.
	Also fixed the case where wide (16 bits) characters were converted to
	bytes.

svn path=/trunk/mcs/; revision=27781
2004-05-20 20:41:29 +00:00
Sebastien Pouliot 1efa9cec28 2004-05-20 Sebastien Pouliot <[email protected]>
* ConvertTest.cs: Added new unit tests for integer overflow in To/From
	Base64CharArray. Added new test for wide char. Exploded some tests in
	NUnit2 format (to ease add new tests).

svn path=/trunk/mcs/; revision=27780
2004-05-20 20:24:53 +00:00
Lluis Sanchez f6c3bffae5 * interp.c, interp.h: Use the new methods for handling thread.abort.
svn path=/trunk/mono/; revision=27779
2004-05-20 20:19:08 +00:00
Lluis Sanchez 7ef569a756 * mini.c: Delegate most of the abort signal work to
mono_thread_request_interruption, which also handles Stop and Suspend
	  states.

svn path=/trunk/mono/; revision=27778
2004-05-20 20:17:53 +00:00
Lluis Sanchez 72164d6cc3 * daemon-messages.c: Retry if the communication with the daemon is
interrupted by a signal.
	* io.c, sockets.c: Check for EINTR in every syscall that can be interrumped.
	  Only return an error in this case if there is something in the apc queue
	  (which means that it is an interruption requested by the "user").
	* processes.c: Use WaitForSingleObjectEx. No need to pass "alertable" as
	  true since the wait is small.
	* shared.c: Retry write calls when interrumped by a signal.
	* timed-thread.h, timed-thread.c: added _wapi_thread_apc_pending, which
	  returns TRUE if there are pending asynchronous calls (APC) for the
	  provided thread. Also added _wapi_thread_dispatch_apc_queue which calls
	  the enqueued APCs. Defined a new struct ApcInfo that holds information
	  about an enqueued APC.
	* thread-private.h, threads.c: Implemented QueueUserAPC (which does the same
	  as in win32),_wapi_thread_apc_pending and _wapi_thread_dispatch_apc_queue.
	  These last two methods call the corresponding apc methods in
	  thread-private using the provided thread handle.
	* threads.h: Added QueueUserAPC.
	* uglify.h: Added WapiApcProc (needed by QueueUserAPC).
	* wait.c, wait.h: Changed WaitForSingleObject to WaitForSingleObjectEx, and
	  WaitForMultipleObjects to WaitForMultipleObjectsEx. Implemented support
	  for APCs in those two methods and also in SleepEx.

svn path=/trunk/mono/; revision=27777
2004-05-20 20:09:58 +00:00
Lluis Sanchez aee60f1e3e * daemon-messages.c: Retry if the communication with the daemon is
interrupted by a signal.
	* io.c, sockets.c: Check for EINTR in every syscall that can be interrumped.
	  Only return an error in this case if there is something in the apc queue
	  (which means that it is an interruption requested by the "user").
	* processes.c: Use WaitForSingleObjectEx. No need to pass "alertable" as
	  true since the wait is small.
	* shared.c: Retry write calls when interrumped by a signal.
	* timed-thread.h, timed-thread.c: added _wapi_thread_apc_pending, which
	  returns TRUE if there are pending asynchronous calls (APC) for the
	  provided thread. Also added _wapi_thread_dispatch_apc_queue which calls
	  the enqueued APCs. Defined a new struct ApcInfo that holds information
	  about an enqueued APC.
	* thread-private.h, threads.c: Implemented QueueUserAPC (which does the same
	  as in win32),_wapi_thread_apc_pending and _wapi_thread_dispatch_apc_queue.
	  These last two methods call the corresponding apc methods in
	  thread-private using the provided thread handle.
	* threads.h: Added QueueUserAPC.
	* uglify.h: Added WapiApcProc (needed by QueueUserAPC).
	* wait.c, wait.h: Changed WaitForSingleObject to WaitForSingleObjectEx, and
	  WaitForMultipleObjects to WaitForMultipleObjectsEx. Implemented support
	  for APCs in those two methods and also in SleepEx.

svn path=/trunk/mono/; revision=27776
2004-05-20 20:04:40 +00:00
Lluis Sanchez 49228e033d * Thread.cs: Some fixes in Abort. Implemented Suspend and Resume.
Added internal interruption_requested field.

svn path=/trunk/mcs/; revision=27775
2004-05-20 20:02:44 +00:00
Patrik Torstensson bde175a9f7 2004-05-20 Patrik Torstensson
* Hostname.cs: Test for hostname crash

svn path=/trunk/mono/; revision=27774
2004-05-20 19:33:58 +00:00
Gert Driesen 5c0e9dc92e * OleDbPermissionAttribute.cs: change AllowMultiple and
Inherited to match .NET

svn path=/trunk/mcs/; revision=27773
2004-05-20 19:18:03 +00:00
Gert Driesen 3ac272d35b * OdbcPermissionAttribute.cs: change AllowMultiple and
Inherited to match .NET

svn path=/trunk/mcs/; revision=27772
2004-05-20 19:16:40 +00:00
Gert Driesen 8663c97122 * DbDataPermissionAttribute.cs: change AllowMultiple and
Inherited to match .NET

svn path=/trunk/mcs/; revision=27771
2004-05-20 19:15:27 +00:00
Gert Driesen a72f4f118c * SqlClientPermissionAttribute.cs: change AllowMultiple and
Inherited to match .NET

svn path=/trunk/mcs/; revision=27770
2004-05-20 19:13:10 +00:00
Gert Driesen 2e472fe368 * EventLogPermissionAttribute.cs:
* PerformanceCounterPermissionAttribute.cs: adjust AllowMultiple
and Inherited to match .NET

svn path=/trunk/mcs/; revision=27769
2004-05-20 18:56:34 +00:00
Marek Safar ff0310677a Added more test code
svn path=/trunk/mcs/; revision=27768
2004-05-20 18:46:35 +00:00
Atsushi Eno ccdf2e0bc1 2004-05-20 Atsushi Enomoto <[email protected]>
* OracleCommandBuilder.cs : Added (stub).
	* OracleString.cs : Implemented missing bits.

svn path=/trunk/mcs/; revision=27766
2004-05-20 17:59:36 +00:00
Boris Kirzner b0ca597d50 * Datacontainer.cs : CompareValues reviewed. set_Item and get_Item of null and DBNull values in case of DataContainers for primitive types reviewed. Added check for null values when reading from IDataRecord.
svn path=/trunk/mcs/; revision=27765
2004-05-20 17:35:22 +00:00
Boris Kirzner 91c5bbb326 * MergeManager.cs : AdjustSchema now updates by reference new created table, so in Merge you do not need to lookup for it (were unable to do this for unnamed tables). Code styling.
svn path=/trunk/mcs/; revision=27764
2004-05-20 17:29:12 +00:00
Boris Kirzner d78c46d04e * DataColumn.cs : In set_Item[int] - if autoincrement, adjust next autoincrement value.
* DataColumnCollection.cs : fixed parantethes.
* DataRow.cs :
- AcceptChanges : do nothing if row state is unchanged.
- GetChildRows, GetParentRows  : bug fix (use correct index).
* DataRowCollection.cs : bug fix (compare all row's values).
* DataTable.cs : bug fix (use correct row version).

svn path=/trunk/mcs/; revision=27763
2004-05-20 17:26:23 +00:00
Marek Safar bb56009ae6 New test
svn path=/trunk/mcs/; revision=27761
2004-05-20 16:41:15 +00:00
Atsushi Eno 12549f8418 2004-05-20 Atsushi Enomoto <[email protected]>
* XmlSchemaDataImporter.cs : xs:positiveInteger is mapped to ulong.
	  When content type is Mixed, text column is not required (it is
	  required only when the complex type has no particle).
	  "Repeated element" column is also created (considering maxOccurs=0
	  and complex content extension).

svn path=/trunk/mcs/; revision=27759
2004-05-20 15:16:41 +00:00
Atsushi Eno e9ecb880af 2004-05-20 Atsushi Enomoto <[email protected]>
* XmlSchemaDataImporter.cs : XmlSchemaGroupBase was not handled
	  properly.

svn path=/trunk/mcs/; revision=27757
2004-05-20 13:56:00 +00:00
Martin Baulig c5b0f1a534 Small fix from Raja.
svn path=/trunk/mcs/; revision=27756
2004-05-20 13:45:12 +00:00
Martin Baulig 0fd37e4030 2004-05-20 Martin Baulig <[email protected]>
* delegate.cs: Convert this file to Unix mode - like the original
	version in mcs is.

svn path=/trunk/mcs/; revision=27755
2004-05-20 13:38:23 +00:00
Martin Baulig dafa3b82c0 **** Merged from MCS ****
svn path=/trunk/mcs/; revision=27754
2004-05-20 13:32:19 +00:00
Martin Baulig 04b1daf7bf 2004-05-20 Martin Baulig <[email protected]>
Merged this back from gmcs to keep the differences to a minumum.

	* attribute.cs (Attribute.CheckAttributeType): Take an EmitContext
	instead of a Declspace.
	(Attribute.ResolveType): Likewise.
	(Attributes.Search): Likewise.
	(Attributes.Contains): Likewise.
	(Attributes.GetClsCompliantAttribute): Likewise.

	* class.cs (TypeContainer.VerifyMembers): Added EmitContext
	argument.
	(MethodData.ApplyAttributes): Take an EmitContext instead of a
	DeclSpace.

svn path=/trunk/mcs/; revision=27753
2004-05-20 13:23:04 +00:00
Martin Baulig d17436a244 Moved this to make diff happy.
svn path=/trunk/mcs/; revision=27752
2004-05-20 13:01:34 +00:00
Martin Baulig c0102e3f8c Whitespace changes to make this more similar to the mcs version.
svn path=/trunk/mcs/; revision=27751
2004-05-20 12:58:53 +00:00
Zoltan Varga 2a8360eba0 2004-05-20 Zoltan Varga <[email protected]>
* mini.c: Allow inlining of icall wrappers if the backend supports
	the save/restore lmf opcodes.

svn path=/trunk/mono/; revision=27750
2004-05-20 12:53:35 +00:00
Zoltan Varga 3fd6bd21d6 2004-05-20 Zoltan Varga <[email protected]>
* marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
	calls.

svn path=/trunk/mono/; revision=27749
2004-05-20 12:50:53 +00:00
Atsushi Eno 5cd8619543 2004-05-20 Atsushi Enomoto <[email protected]>
* XmlSchemaDataImporter.cs : Removed unused code and extra MonoTODO.
	  Fixed relation inference to consider attribute XPath.

svn path=/trunk/mcs/; revision=27748
2004-05-20 12:49:43 +00:00
Zoltan Varga f284ad8dc6 2004-05-20 Zoltan Varga <[email protected]>
* opcode.def: Add mono_save_lmf and mono_restore_lmf.

svn path=/trunk/mono/; revision=27747
2004-05-20 12:48:40 +00:00
Martin Baulig 1a8c47aaca 2004-05-20 Martin Baulig <[email protected]>
* attribute.cs: Convert this file to Unix mode - like the original
	version in mcs is.

svn path=/trunk/mcs/; revision=27746
2004-05-20 12:48:25 +00:00
Martin Baulig 0e6af1f827 2004-04-20 Martin Baulig <[email protected]>
Merged latest changes into gmcs.  Please keep this comment in
	here, it makes it easier for me to see what changed in MCS since
	the last time I merged.

svn path=/trunk/mcs/; revision=27745
2004-05-20 12:28:27 +00:00
Martin Baulig 38a6d54fcb **** Merged from MCS ****
svn path=/trunk/mcs/; revision=27744
2004-05-20 12:26:41 +00:00
Martin Baulig aff5a6b8e0 **** Merged from MCS ****
svn path=/trunk/mcs/; revision=27743
2004-05-20 12:24:59 +00:00
Martin Baulig 287977829c **** Merged from MCS ****
svn path=/trunk/mcs/; revision=27742
2004-05-20 12:08:02 +00:00
Raja R Harinath 903e252fa1 Fix small thinko.
svn path=/trunk/mono/; revision=27741
2004-05-20 11:19:59 +00:00
Raja R Harinath 3eb4ea1425 Fix typo.
svn path=/trunk/mono/; revision=27740
2004-05-20 11:11:44 +00:00
Raja R Harinath 5436b3fb25 (get-monolite-latest, monolite-bootstrap):
New bootstrap targets to build from monolite.
Based on idea from Jaroslaw Kowalski <[email protected]>.

svn path=/trunk/mono/; revision=27739
2004-05-20 11:06:42 +00:00
Marek Safar 3982c48f6e 2004-05-20 Marek Safar <[email protected]>
* test-255.cs: New test.

svn path=/trunk/mcs/; revision=27738
2004-05-20 10:56:16 +00:00
Marek Safar 0492599cb0 New test
svn path=/trunk/mcs/; revision=27737
2004-05-20 10:44:14 +00:00
Raja R Harinath f9078c0a01 (PROGRAM_COMPILE): Define to $(BOOT_COMPILE).
svn path=/trunk/mcs/; revision=27736
2004-05-20 10:41:26 +00:00
Raja R Harinath 4d72b23005 (%.resources): Use INTERNAL_RESGEN.
svn path=/trunk/mcs/; revision=27735
2004-05-20 10:41:09 +00:00
Raja R Harinath 0f06a4fb24 * profiles/default.make (TEST_RUNTIME): Look in class/lib/default
for library to be tested.
* rules.make (INTERNAL_RESGEN): New Define.
* library.make (run-test-local): Move commands to run-test-lib.
Preparartion for allowing creation of addition test dll with .vb
testcases.
* executable.make (PROGRAM_COMPILE): New define.
($(PROGRAM)): Use PROGRAM_COMPILE to compile PROGRAM.

svn path=/trunk/mcs/; revision=27734
2004-05-20 10:40:50 +00:00
Raja R Harinath 1138dbc32c (SUBDIRS): Move 'monoresgen' ahead of 'class'.
svn path=/trunk/mcs/; revision=27733
2004-05-20 10:40:31 +00:00
Raja R Harinath 49bc3c3e85 * configure.in (AC_OUTPUT): Add tools/Makefile and
tools/locale-builder/Makefile.
* Makefile.am (SUBDIRS): Remove tools.
(DIST_SUBDIRS): Add 'tools'.
(bootstrap): Rewrite so that we get two new targets.
(faststrap): New two-stage build.
(fasterstrap): New one-stage build.

Make 'faststrap' and 'fasterstrap' are useful for continuing development
once you've bootstrapped a mono/ CVS checkout.

svn path=/trunk/mono/; revision=27732
2004-05-20 10:26:46 +00:00
Sanja Gupta ab2398148d ChangeLog: Updated ChangeLog.
Icon.cs: Fixed issue with Size property.

svn path=/trunk/mcs/; revision=27731
2004-05-20 10:19:19 +00:00
Sanja Gupta f5bd124831 ChangeLog: Updated ChangeLog
TestIcon.cs: Added.
bitmaps/smiley.ico: Added.

svn path=/trunk/mcs/; revision=27730
2004-05-20 10:09:03 +00:00
Sanja Gupta 3d694370cf ChangeLog: Updated ChangeLog
System.Drawing_test.dll.sources: Added TestIcon.cs to the source list.

svn path=/trunk/mcs/; revision=27729
2004-05-20 10:04:19 +00:00
Umadevi S e3ae8dc698 2004-05-20 Umadevi S <[email protected]>
* Fixed bug 58406- implemented the hasrow method, test program used
         to test with the bug report

svn path=/trunk/mcs/; revision=27728
2004-05-20 09:51:47 +00:00
Atsushi Eno 562b65fc66 2004-05-20 Atsushi Enomoto <[email protected]>
* XslTransformTests.cs : Added tests for msxsl:node-set().

svn path=/trunk/mcs/; revision=27727
2004-05-20 08:44:01 +00:00
Atsushi Eno 7efc4e561b 2004-05-20 Atsushi Enomoto <[email protected]>
* Expression.cs : We should not catch all kind of exception. Just
	  throwing any kind of exception would be preferable.
	  Added support for XPathNavigator values.

svn path=/trunk/mcs/; revision=27726
2004-05-20 08:42:32 +00:00
Atsushi Eno 7580260949 2004-05-20 Atsushi Enomoto <[email protected]>
* XslCopyOf.cs : When evaluation result was result tree fragment (i.e.
	  XPathNavigator) output its content (children).
	* XslNumber.cs : Reflected CompilePattern() change.
	* XslTemplateContent.cs : Don't throw System.Exception.
	* XslVariable.cs : XslVariableInformation.Evaluate() now returns
	  XPathNavigator, not NodeSet (it should not return "children", since
	  the node pointed by XPathNavigator should be referenced as Root).

svn path=/trunk/mcs/; revision=27725
2004-05-20 08:42:04 +00:00
Atsushi Eno ff370646d6 2004-05-20 Atsushi Enomoto <[email protected]>
* Compiler.cs :
	  - CompilePattern() now throws XsltCompileException for invalid
	    pattern, and add error location support.
	  - In Compiler.TryGetFunction(), compare namespace URI, not prefix.
	    Now it returns MSXslNodeSet instance (for msxsl:node-set).
	* Debug.cs : don't throw System.Exception.
	* XslFunctions.cs : Added MSXslNodeSet class.
	* XslTemplate.cs : reflected CompilePattern() change.
	* XslTransformProcessor.cs : don't throw System.Exception.
	* XsltCompiledContext.cs : don't throw System.Exception.

svn path=/trunk/mcs/; revision=27724
2004-05-20 08:41:12 +00:00
Atsushi Eno 23e602b3cc 2004-05-20 Atsushi Enomoto <[email protected]>
* Pattern.cs : don't throw System.Exception. Delegate error handling to
	  the only one caller CompilePattern().

svn path=/trunk/mcs/; revision=27723
2004-05-20 08:40:21 +00:00
Gonzalo Paniagua Javier b06f9960d5 warnings
svn path=/trunk/mono/; revision=27719
2004-05-20 00:00:19 +00:00
Gonzalo Paniagua Javier 3a53032bfa 2004-05-20 Gonzalo Paniagua Javier <[email protected]>
* appdomain.c:
	* assembly.c:
	* gc.c:
	* locales.c:
	* mono-config.c:
	* rand.c: getenv -> g_getenv (windows!)

	* process.c: complete_path is also used on non-windows platforms.

svn path=/trunk/mono/; revision=27718
2004-05-19 23:55:44 +00:00
Jackson Harper 6b4a81594a * tools/
* tools/Makefile.am: Add tools directory
	* tools/locale-builder: Add the locale-builder tool, this tool is
	not built by default as it is only needed by people that wish to
	moidify culture data.
	* Makefile.am: Add tools to build

svn path=/trunk/mono/; revision=27717
2004-05-19 23:18:18 +00:00
Jackson Harper c4e495a504 Ignore Makefile
svn path=/trunk/mono/; revision=27716
2004-05-19 23:16:22 +00:00
Jackson Harper eab58f4b75 ignore generated table
svn path=/trunk/mono/; revision=27715
2004-05-19 23:15:41 +00:00
Jackson Harper 4b7bd9cb4d .cvsignore
svn path=/trunk/mono/; revision=27714
2004-05-19 23:14:53 +00:00
Jackson Harper 6efb874c14 supplemental locale data
svn path=/trunk/mono/; revision=27713
2004-05-19 23:13:38 +00:00
Jackson Harper a236e9766f Add locale builder
svn path=/trunk/mono/; revision=27712
2004-05-19 23:11:58 +00:00
Jackson Harper 5459ad227e * tools/
* tools/Makefile.am: Add tools directory
        CVS: ----------------------------------------------------------------------

svn path=/trunk/mono/; revision=27711
2004-05-19 23:10:38 +00:00
Gonzalo Paniagua Javier 9445db1057 2004-05-20 Gonzalo Paniagua Javier <[email protected]>
* monop.cs: give the correct assembly that fails loading or the type.

svn path=/trunk/mcs/; revision=27710
2004-05-19 23:05:23 +00:00
Gonzalo Paniagua Javier 8886aab23f Fix ChangeLog entry to tell the truth
svn path=/trunk/mcs/; revision=27708
2004-05-19 19:43:16 +00:00
Martin Baulig 954742c93e **** Merged from MCS ****
svn path=/trunk/mcs/; revision=27707
2004-05-19 19:32:24 +00:00
Martin Baulig 20a4365920 **** Merged from MCS ****
svn path=/trunk/mcs/; revision=27706
2004-05-19 19:21:20 +00:00
Martin Baulig 5a4dadc551 **** Merged from MCS ****
svn path=/trunk/mcs/; revision=27705
2004-05-19 19:10:17 +00:00
Gert Driesen bc796a73b4 * AttributeTest.cs: added tests for Inherited and
AllowMultiple

svn path=/trunk/mcs/; revision=27703
2004-05-19 18:52:17 +00:00
Gert Driesen 57cf39129b * DebuggerHiddenAttribute.cs
* DebuggerStepThroughAttribute.cs : now that Inherited is
false by default on AttributeUsageAttribute (as it
should be) we need to explicitly set Inherited to false
for those attributes where it should be false.

svn path=/trunk/mcs/; revision=27702
2004-05-19 18:48:58 +00:00
Gert Driesen 31d549e2d1 * CustomConstantAttribute.cs
* DateTimeconstantAttribute.cs
* DecimalConstantAttribute.cs
* IDispatchConstantAttribute.cs
* IUnknownConstantAttribute.cs
* MethodImplAttribute.cs
* RequiredAttributeAttribute.cs: now that Inherited is
false by default on AttributeUsageAttribute (as it
should be) we need to explicitly set Inherited to false
for those attributes where it should be false.

svn path=/trunk/mcs/; revision=27701
2004-05-19 18:47:07 +00:00
Gert Driesen 5a74724324 * AutomationProxyAttribute.cs
* BestFitMappingAttribute.cs
        * ClassInterfaceAttribute.cs
        * CoClassAttribute.cs
        * ComAliasNameAttribute.cs
        * ComCompatibleVersionAttribute.cs
	* ComConversionLossAttribute.cs
	* ComEventInterfaceAttribute.cs
	* ComImportAttribute.cs
	* ComRegisterFunctionAttribute.cs
	* ComSourceInterfaceAttribute.cs
	* ComUnregisterFunctionAttribute.cs
	* Comvisible.cs
	* DispIdAttribute.cs
	* DllImportAttribute.cs
	* FieldOffsetAttribute.cs
	* GuidAttribute.cs
	* IDispatchImplAttribute.cs
	* ImportedFromTypeLibAttribute.cs
	* InAttribute.cs
	* InterfaceTypeAttribute.cs
	* LCIDConversionAttribute.cs
	* MarshalAsAttribute.cs
	* OptionalAttribute.cs
	* OutAttribute.cs
	* PreserveSigAttribute.cs
	* PrimaryInteropAssemblyAttribute.cs
	* ProgIdAttribute.cs
	* StructLayoutAttribute.cs
	* TypeLibFuncAttribute.Cs
	* TypeLibTypeAttribute.cs
	* TypeLibVarAttribute.cs
	* TypeLibVersionAttribute.cs now that Inherited is
	false by default on AttributeUsageAttribute (as it
	should be) we need to explicitly set Inherited to
	false for those attributes should where it should be
	false.

svn path=/trunk/mcs/; revision=27700
2004-05-19 18:42:54 +00:00
Gert Driesen e0f962b280 * ThreadStaticAttribute.cs
* ContextStaticAttribute.cs
* FlagsAttribute.cs
* ObsoleteAttribute.cs : now that Inherited is false by
default on AttributeUsageAttribute (as it should be) we
need to explicitly set Inherited to false for those
attributes should it be be false.

svn path=/trunk/mcs/; revision=27699
2004-05-19 18:33:38 +00:00
Gert Driesen 086e51d57e * AttributeUsageAttribute.cs: Inherited property should be
true by defaultrs.cs: respect Inherited property, and

svn path=/trunk/mcs/; revision=27698
2004-05-19 18:32:32 +00:00
Gert Driesen 6a3b002263 * MonoCustomAttrs.cs: respect Inherited property, and
AllowMultiple property of a CustomAttribute. This fixes
a major issue we had with respect to custom attributes.

svn path=/trunk/mcs/; revision=27697
2004-05-19 18:23:02 +00:00
Gonzalo Paniagua Javier 411dc70043 2004-05-19 Gonzalo Paniagua Javier <[email protected]>
* icall.c: new signature for Process_Start.

	* process.[ch]: new signature for Process_Start. If we're on windows
	and UseShellExecute is false, we have to search for the program by
	ourselves if we don't get a full path.

svn path=/trunk/mono/; revision=27696
2004-05-19 17:59:26 +00:00
Gonzalo Paniagua Javier d41151034a 2004-05-19 Gonzalo Paniagua Javier <[email protected]>
* Process.cs: separate the command and the arguments when calling
	Start_internal.

svn path=/trunk/mcs/; revision=27695
2004-05-19 17:59:11 +00:00
Gert Driesen 65b9ee31d4 * AttributeTest.cs: formatting, and remove commented
code

svn path=/trunk/mcs/; revision=27689
2004-05-19 16:42:02 +00:00
Paolo Molaro 68bfe3719c Wed May 19 13:22:19 EDT 2004 Paolo Molaro <[email protected]>
* configure.in: make MacOSX default to use the included libgc.

svn path=/trunk/mono/; revision=27688
2004-05-19 16:38:37 +00:00
Marek Safar 24a9a0ce48 2004-05-19 Marek Safar <[email protected]>
Fix bug #58688 (MCS does not report error when the same attribute
	is assigned twice)

	* attribute.cs (Attribute.Emit): Distinction between null and default.

svn path=/trunk/mcs/; revision=27687
2004-05-19 16:34:34 +00:00
Gonzalo Paniagua Javier 84943987e3 2004-05-19 Gonzalo Paniagua Javier <[email protected]>
* Process.cs: redirecting I/O is not permitted if UseShellExecute is
	false. Also throw if FileName is null.

svn path=/trunk/mcs/; revision=27684
2004-05-19 16:10:46 +00:00
Atsushi Eno 8a17df5cd8 2004-05-19 Atsushi Enomoto <[email protected]>
* System.Xml.dll.sources : Added System.Xml.Schema/CustomSerializer.cs

svn path=/trunk/mcs/; revision=27681
2004-05-19 14:57:51 +00:00
Atsushi Eno 1b720ab0bd 2004-05-19 Atsushi Enomoto <[email protected]>
* CustomSerializer.cs : Added custom serializer for XmlSchema, that is
	  generated by SerializationCodeGenerator and edited a bit.
	* XmlSchema.cs : Use XmlSchemaSerializationWriter.

svn path=/trunk/mcs/; revision=27680
2004-05-19 14:57:24 +00:00
Marek Safar 0b29f2df3b 2004-05-19 Marek Safar <[email protected]>
* cs0579-6.cs: New test for bug #58688.

svn path=/trunk/mcs/; revision=27677
2004-05-19 14:38:20 +00:00
Martin Baulig 6388883b62 **** Merged from MCS ****
svn path=/trunk/mcs/; revision=27676
2004-05-19 14:38:01 +00:00
Martin Baulig 681f649bfb **** Merged from MCS ****
svn path=/trunk/mcs/; revision=27675
2004-05-19 14:38:01 +00:00
Miguel de Icaza af6ff4763b Flush
svn path=/trunk/mono/; revision=27674
2004-05-19 14:15:29 +00:00
Martin Baulig 4ee1800ffc **** Merged from MCS ****
svn path=/trunk/mcs/; revision=27673
2004-05-19 14:06:39 +00:00
Martin Baulig 79e7806ea5 **** Merged from MCS ****
svn path=/trunk/mcs/; revision=27672
2004-05-19 14:00:31 +00:00
Zoltan Varga 8fc5d2f120 2004-05-19 Zoltan Varga <[email protected]>
* mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
	by gcc-3.4 as well.

	* mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.

svn path=/trunk/mono/; revision=27671
2004-05-19 13:17:05 +00:00
Martin Baulig 856cd84f60 **** Merged from MCS ****
svn path=/trunk/mcs/; revision=27670
2004-05-19 13:05:18 +00:00
Martin Baulig a3d0b0b6d2 **** Merged from MCS ****
svn path=/trunk/mcs/; revision=27669
2004-05-19 12:55:49 +00:00
Martin Baulig 21534e005f **** Merged from MCS ****
svn path=/trunk/mcs/; revision=27668
2004-05-19 12:43:33 +00:00
Martin Baulig b1801db9eb **** Merged from MCS ****
svn path=/trunk/mcs/; revision=27667
2004-05-19 12:35:05 +00:00
Raja R Harinath 3d11af4fd0 * cs-parser.jay (attribute): Create a GlobalAttribute for the case
of a top-level attribute without an attribute target.
* attribute.cs (Attribute.Error_AttributeConstructorMismatch):
Make non-static.
(Attribute.Conditional_GetConditionName),
(Attribute.Obsolete_GetObsoleteMessage): Update.
(Attribute.IndexerName_GetIndexerName): New.  Attribute-specific
part of ScanForIndexerName.
(Attribute.CanIgnoreInvalidAttribute): New function.
(Attribute.ScanForIndexerName): Move to ...
(Attributes.ScanForIndexerName): ... here.
(Attributes.Attrs): Rename from now-misnamed AttributeSections.
(Attributes.Search): New internal variant that can choose not to
complain if types aren't resolved.  The original signature now
complains.
(Attributes.GetClsCompliantAttribute): Use internal variant, with
complaints suppressed.
(GlobalAttribute.CheckAttributeType): Overwrite ds.NamespaceEntry
only if it not useful.
(CanIgnoreInvalidAttribute): Ignore assembly attribute errors at
top-level for attributes that are shared between the assembly
and a top-level class.
* parameter.cs (ImplicitParameter): Rename from ParameterAtribute.
* class.cs: Update to reflect changes.
(DefineIndexers): Fuse loops.
* codegen.cs (GetAssemblyName): Update to reflect changes.  Accept
a couple more variants of attribute names.

(cleans up some issues with Marek's patch.  Most importantly, it fixes
a breaking build: errors/CS0618-2-lib.dll)

svn path=/trunk/mcs/; revision=27666
2004-05-19 12:18:11 +00:00
Zoltan Varga 436e4e989a 2004-05-18 Zoltan Varga <[email protected]>
* configure.in: Get rid of -DMONO_USE_EXC_TABLES.

svn path=/trunk/mono/; revision=27665
2004-05-19 12:09:53 +00:00
Sebastien Pouliot d502be2267 2004-05-19 Sebastien Pouliot <[email protected]>
* PKCS7.cs: In sync with Mono.Security.dll version.

svn path=/trunk/mcs/; revision=27664
2004-05-19 12:05:50 +00:00
Atsushi Eno b22296f1b6 2004-05-19 Atsushi Enomoto <[email protected]>
* DataColumn.cs : Fixed set_Item[int]. Convert.ToInt64(DBNull.Value)
	  always fails.

svn path=/trunk/mcs/; revision=27663
2004-05-19 11:48:24 +00:00
Sebastien Pouliot 66bce2561f 2004-05-19 Jesper Pedersen <[email protected]>
* PKCS7.cs: Added SignedData.VerifySignature(AsymmetricAlgorithm aa).
	Added support for calculating signature from SignedData content (i.e.
	when UseAuthenticatedAttributes is false). Added contentType to
	AuthenticatedAttributes (when SignedData.UseAuthenticatedAttributes
	is true).

svn path=/trunk/mcs/; revision=27662
2004-05-19 11:24:52 +00:00
Martin Baulig bce2e1bb6a **** Merged from MCS ****
svn path=/trunk/mcs/; revision=27661
2004-05-19 10:53:16 +00:00
Martin Baulig b405f11d8c **** Merged from MCS ****
svn path=/trunk/mcs/; revision=27660
2004-05-19 10:42:15 +00:00
Boris Kirzner 899387a887 * DataColumn.cs - removed default member attribute.
svn path=/trunk/mcs/; revision=27659
2004-05-19 10:37:40 +00:00
Martin Baulig 890e868737 Moved the marker.
svn path=/trunk/mcs/; revision=27658
2004-05-19 10:34:56 +00:00
Martin Baulig 3ef288611d **** Merged from MCS ****
(Last time I merged, I forgot the ChangeLog).

svn path=/trunk/mcs/; revision=27657
2004-05-19 10:33:39 +00:00
Martin Baulig 70ce6b2ff0 Moved the marker.
svn path=/trunk/mcs/; revision=27656
2004-05-19 10:17:28 +00:00
Boris Kirzner 033e708f3c * RecordCache.cs - added. Each instance of record cache belongs to specific table and manages pool of records ( indexes into data containers) to be used by data rows.
* DataContainer.cs - added. Provides implementation for data containers that holds data in arrays of primitives or objects. Each data container belongs to specific DataColumn.
* DbDataAdapter.cs - changes to complete data storage redesign. Bug fix in FillTable ( to fetch exact number of records required ).

svn path=/trunk/mcs/; revision=27655
2004-05-19 09:46:00 +00:00
Boris Kirzner 256439e2eb * System.Data.dll.sources : Added DataContainer.cs, RecordCache.cs
svn path=/trunk/mcs/; revision=27654
2004-05-19 09:39:27 +00:00
Boris Kirzner 0c5044e5f0 * DataColumn.cs, DataColumnChangeEventArgs.cs, DataColumnCollection.cs, DataRow.cs, DataRowCollection.cs, DataTable.cs, Index.cs : Data storage in the row is redesigned. Now data is stored in typed containers inside DataColumn. Row holds its versions as indexes inside each of data container, accessed through the row that holds it.
svn path=/trunk/mcs/; revision=27653
2004-05-19 09:30:15 +00:00
Boris Kirzner b0324213db * UniqueConstraint.cs - added comment.
svn path=/trunk/mcs/; revision=27652
2004-05-19 09:04:44 +00:00
Gert Driesen b73f20514c * MonoType.cs: throw ArgumentNullException when type parameter in
GetCustomAttributes(Type, bool) is null

svn path=/trunk/mcs/; revision=27651
2004-05-19 09:00:58 +00:00
Atsushi Eno cdf2f09c71 2004-05-19 Atsushi Enomoto <[email protected]>
* DataSetTest.cs : Fixed ReadWriteXmlSchema() that miscounted
	  constraints and parent keys.

svn path=/trunk/mcs/; revision=27648
2004-05-19 07:17:44 +00:00
Atsushi Eno 92d6b1bec2 2004-05-19 Atsushi Enomoto <[email protected]>
* XmlDataInferenceLoader.cs : Don't add already-existing DataTable to
	  DataSet.

svn path=/trunk/mcs/; revision=27647
2004-05-19 07:16:23 +00:00
Raja R Harinath ceffb58197 * configure.in: Use proper autoconf idiom to pass additional
arguments to libgc/configure.
(PLATFORM_WIN32, NEED_LINK_UNLINK): Use three-argument AC_DEFINE.
* acconfig.h: Update to reflect changes.

svn path=/trunk/mono/; revision=27644
2004-05-19 03:42:02 +00:00
Gonzalo Paniagua Javier 6aa078964e 2004-05-19 Gonzalo Paniagua Javier <[email protected]>
* gacutil.cs: force = true requested by Miguel.

svn path=/trunk/mcs/; revision=27643
2004-05-19 02:00:03 +00:00
César Natarén a5f40f69b2 updates from grammar changes
svn path=/trunk/mcs/; revision=27640
2004-05-19 01:18:06 +00:00
César Natarén 79763abfaa 2004-05-18 Cesar Lopez Nataren <[email protected]>
* jscript-lexer-parser.g: let's build Try/Catch/Finally ast.

svn path=/trunk/mcs/; revision=27639
2004-05-19 01:13:59 +00:00
César Natarén 51e63f0e42 2004-05-18 Cesar Lopez Nataren <[email protected]>
* expression.cs: handle Try case for field or local vars allocation.

svn path=/trunk/mcs/; revision=27638
2004-05-19 01:08:51 +00:00
César Natarén 199306c26c 2004-05-18 Cesar Lopez Nataren <[email protected]>
* Try.cs: implemented Emit.
	* Throw.cs: implemented code generation.

svn path=/trunk/mcs/; revision=27637
2004-05-19 01:06:00 +00:00
César Natarén 556aa1468e 2004-05-18 Cesar Lopez Nataren <[email protected]>
* Throw.cs: implemented code generation.cs

svn path=/trunk/mcs/; revision=27636
2004-05-19 00:58:54 +00:00
César Natarén c06f369f0a 2004-05-18 Cesar Lopez Nataren <[email protected]>
* FunctionDeclaration.cs: cache some values.

svn path=/trunk/mcs/; revision=27633
2004-05-19 00:51:47 +00:00
Miguel de Icaza 0a7363d72f Remove debugging message
svn path=/trunk/mcs/; revision=27627
2004-05-18 20:36:15 +00:00
Miguel de Icaza 191afb9869 Add warning
svn path=/trunk/mcs/; revision=27626
2004-05-18 19:45:48 +00:00
Atsushi Eno 93ee6369f3 2004-05-18 Atsushi Enomoto <[email protected]>
* SqlDecimal.cs : Fixed operator/ not to return positive always.
	  Halfly fixed ConvertToPrecScale() that was broken.

svn path=/trunk/mcs/; revision=27624
2004-05-18 19:36:51 +00:00
Zoltan Varga 77acfdd06f 2004-05-18 Zoltan Varga <[email protected]>
* marshal9.cs marshal10.cs: Fix custom marshalling tests.

svn path=/trunk/mono/; revision=27620
2004-05-18 19:08:19 +00:00
Zoltan Varga b1091e6ab4 2004-05-18 Zoltan Varga <[email protected]>
* marshal.c (mono_marshal_get_native_wrapper): Fix up custom
	marshalling and call CleanUpNativeData if needed. Fixes #58646.

svn path=/trunk/mono/; revision=27618
2004-05-18 19:06:36 +00:00
Marek Safar 5fd4e2751c Enabled test-254.cs
svn path=/trunk/mcs/; revision=27616
2004-05-18 18:44:56 +00:00
Atsushi Eno 454a3649fd 2004-05-18 Atsushi Enomoto <[email protected]>
* SqlDecimal.cs :
	  - .ctor() should check the valid scale range and throw
	    SqlTypeException.
	  - Value should copy the last int32 value fragment.
	  - Fixed Abs() and Ceiling() to return Null when the input is Null.
	  - Now AdjustScale() should not depend on Truncate() that keeps zero
	    digits correctly. So Round() before returning the final result.
	  - ToString() should insert '-' for minus values.
	  - operator+ should use larger scale of operands rather than smaller
	    scale.

svn path=/trunk/mcs/; revision=27615
2004-05-18 18:44:40 +00:00
Marek Safar 4e8b680d89 2004-05-18 Marek Safar <[email protected]>
Fix bug #52585 (Implemented explicit attribute declaration)

	* attribute.cs:
	(Attributable.ValidAttributeTargets): New abstract method. It gets
	list of valid attribute targets for explicit target declaration.
	(Attribute.Target): It holds target itself.
	(AttributeSection): Removed.
	(Attribute.CheckTargets): New method. It checks whether attribute
	target is valid for the current element.

	* class.cs:
	(EventProperty): New class. For events that are declared like
	property (with add and remove accessors).
	(EventField): New class. For events that are declared like field.
	class.cs

	* cs-parser.jay: Implemented explicit attribute target declaration.

	* class.cs, decl.cs, delegate.cs, enum.cs, parameter.cs:
	Override ValidAttributeTargets.

	* parameter.cs:
	(ReturnParameter): Class for applying custom attributes on
	the return type.
	(ParameterAtribute): New class. Class for applying custom
	attributes on the parameter type.

svn path=/trunk/mcs/; revision=27608
2004-05-18 18:28:40 +00:00
Zoltan Varga e033beea3f 2004-05-18 Zoltan Varga <[email protected]>
* mini.h mini.c (mini_method_compile): Only run abc removal pass on
	methods which contain array accesses.

	* mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
	boundaries. Fixes #58537.

	* iltests.il: Add regression test for #58537.

svn path=/trunk/mono/; revision=27607
2004-05-18 18:02:30 +00:00
Gert Driesen 752cd8ab7a * corlib_test.dll.sources: added PropertyInfoTest
svn path=/trunk/mcs/; revision=27606
2004-05-18 17:56:15 +00:00
Jordi Mas i Hernandez 62a16ab086 fixes GDI+ parameter call
svn path=/trunk/mcs/; revision=27605
2004-05-18 17:55:45 +00:00
Gert Driesen af7d2eaa1d * PropertyInfoTest.cs: New file. Added test for
bug #58661.

svn path=/trunk/mcs/; revision=27602
2004-05-18 17:19:41 +00:00
Gert Driesen 05ed4022f3 * MonoProperty.cs: return correct MethodInfo for
property with only a get or set method. Fixes
bug #58661.

svn path=/trunk/mcs/; revision=27601
2004-05-18 17:17:52 +00:00
Miguel de Icaza 442df184e6 Flush
svn path=/trunk/mono/; revision=27600
2004-05-18 16:27:54 +00:00
Miguel de Icaza c8b6382bfb Flush
svn path=/trunk/mono/; revision=27599
2004-05-18 16:23:12 +00:00
Patrik Torstensson 5b84854a7a 2004-05-18 Patrik Torstensson <[email protected]>
* mini-x86.c (mono_arch_local_regalloc): Last part of
	fix for bug #58633 (releasing register to early).

svn path=/trunk/mono/; revision=27596
2004-05-18 15:36:49 +00:00
Miguel de Icaza 884d6fee74 Improve
svn path=/trunk/mono/; revision=27595
2004-05-18 15:14:44 +00:00
Miguel de Icaza 55c35d975a update
svn path=/trunk/mono/; revision=27594
2004-05-18 15:13:40 +00:00
Miguel de Icaza 97575ebbd2 Add new file
svn path=/trunk/mono/; revision=27593
2004-05-18 15:10:23 +00:00
Miguel de Icaza c21e20f026 2004-05-18 Miguel de Icaza <[email protected]>
* basic-long.cs: Add new regression test.

2004-05-18  Patrik Torstensson <[email protected]>

	* mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
	register too early on the chain.

svn path=/trunk/mono/; revision=27591
2004-05-18 14:16:52 +00:00
Atsushi Eno 8426c230c9 2004-05-18 Atsushi Enomoto <[email protected]>
* SqlDecimalTest.cs : Don't use unreliable SqlDecimal to test
	  Truncate(). Just use decimal.

svn path=/trunk/mcs/; revision=27590
2004-05-18 14:14:03 +00:00
Atsushi Eno d356c5ad90 2004-05-18 Atsushi Enomoto <[email protected]>
* SqlDecimal.cs : Fixed Truncate() to work fine.
	* SqlMoney.cs : Added one hack line in operator/ to work fine.

svn path=/trunk/mcs/; revision=27589
2004-05-18 14:12:03 +00:00
Miguel de Icaza f83b3edda4 Update
svn path=/trunk/mono/; revision=27588
2004-05-18 13:49:14 +00:00
Sebastien Pouliot d0a31f5034 2004-05-18 Sebastien Pouliot <[email protected]>
* ASN1Convert.cs: In sync with Mono.Security.dll version.
	* StrongName.cs: In sync with Mono.Security.dll version.

svn path=/trunk/mcs/; revision=27587
2004-05-18 13:43:17 +00:00
Sebastien Pouliot 916c8ae86f 2004-05-18 Sebastien Pouliot <[email protected]>
* Assembly.cs: Return an empty Evidence collection to avoid
	NullReferenceException from calling code (as this is never
	null with MS implementation). See bugzilla #53548.

svn path=/trunk/mcs/; revision=27586
2004-05-18 13:02:33 +00:00
Sebastien Pouliot 75dacf7bbd 2004-05-18 Sebastien Pouliot <[email protected]>
* Buffer.cs: Added checks for null source and destination. Fix failing
	CryptoStream unit test.
	* Guid.cs: Fixed thread-safety issue. Simplified implementation to use
	pseudo-random numbers to generate GUIDs (as per section 3.4 of the
	spec). This removes the TODO to get the computer MAC address and
	the chances to get a duplicate GUID (across different machines).

svn path=/trunk/mcs/; revision=27585
2004-05-18 12:04:04 +00:00
Ravindra 18b476a537 * CustomLineCap.cs: Added null checks and corrected Dispose method.
svn path=/trunk/mcs/; revision=27584
2004-05-18 11:52:34 +00:00
Ravindra c945b94ae9 * Pen.cs: Added value checks in DashPattern and CompoundArray
properties.

svn path=/trunk/mcs/; revision=27583
2004-05-18 11:49:42 +00:00
Sebastien Pouliot e2f8d7c4f9 2005-05-18 Sebastien Pouliot <[email protected]>
* BufferTest.cs: Added missing tests for BlockCopy exceptions.

svn path=/trunk/mcs/; revision=27582
2004-05-18 11:43:42 +00:00
Sanja Gupta 82ec1082b2 ChangeLog: Updated ChangeLog
TestImageFormatConverter.cs: Fixed issues with test case.

svn path=/trunk/mcs/; revision=27581
2004-05-18 11:36:29 +00:00
Sanja Gupta d2020ddbb6 ChangeLog: UpdateChangeLog
TestImageConverter.cs: Fixed issues with test case

svn path=/trunk/mcs/; revision=27580
2004-05-18 11:25:20 +00:00
Sanja Gupta fc9972c2d3 ChangeLog: Updated ChangeLog.
TestIconConverter.cs: Fixed issues with test case.

svn path=/trunk/mcs/; revision=27579
2004-05-18 11:12:42 +00:00
Zoltan Varga ff9b2c5410 2004-05-18 Zoltan Varga <[email protected]>
* mini.c (create_helper_signature): Use a helper function to reduce
	the code which needs to be written. Also set the calling convention of
	icalls on windows. Fixes #57840.

svn path=/trunk/mono/; revision=27578
2004-05-18 10:55:15 +00:00
Paolo Molaro ee07ba426d Tue May 18 11:05:18 CEST 2004 Paolo Molaro <[email protected]>
* mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
	exceptions-ppc.c: added helper function to get the instruction address
	from a signal handler context.

svn path=/trunk/mono/; revision=27577
2004-05-18 08:27:58 +00:00
Ravindra 644e89a1c7 Minor sentence corrections.
svn path=/trunk/mcs/; revision=27576
2004-05-18 08:27:24 +00:00
Ravindra a2a7a67c02 Minor formatting.
svn path=/trunk/mcs/; revision=27574
2004-05-18 08:25:14 +00:00
Ravindra 6daf8ea664 Typo.
svn path=/trunk/mcs/; revision=27573
2004-05-18 08:21:12 +00:00
Ravindra 8f3191ef9d * System.Drawing_test.dll.sources: Added TestHatchBrush.cs to the
test sources list.
	* README: Added some guidelines for writing tests/samples.

svn path=/trunk/mcs/; revision=27572
2004-05-18 08:19:19 +00:00
Marek Safar 47b2cfce7a 2004-05-18 Marek Safar <[email protected]>
* test-254.cs: New test for #52585.

svn path=/trunk/mcs/; revision=27571
2004-05-18 08:02:25 +00:00
Marek Safar f64e0c0b44 2004-05-18 Marek Safar <[email protected]>
* cs0592-8.cs,
	* cs0657-{2-17}.cs,
	* cs1518-3.cs: 18 new error tests.

svn path=/trunk/mcs/; revision=27570
2004-05-18 07:56:35 +00:00
Atsushi Eno a7f134a1a9 2004-05-18 Atsushi Enomoto <[email protected]>
* SqlDecimal.cs : Fixed AdjustScale(). When reducing digits, scale
	  parameter was incorrect.

svn path=/trunk/mcs/; revision=27569
2004-05-18 07:46:36 +00:00
Atsushi Eno e57e711f64 2004-05-18 Atsushi Enomoto <[email protected]>
* SqlDecimal.cs :
	  - .ctor(double) initializes the precision as 17. If not sufficient,
	    it calls AdjustScale(), and if too much then it calls Round().
	  - Data should not return the internal array otherwise it might be
	    modified by outer code.
	  - Reimplemented AdjustScale() to work fine.
	  - Reimplemented Parse(). It should rather use Decimal.Parse()
	    rather than SqlDouble.Parse() for parsable value range difference.
	  - Reimplemented Round(). Don't use double.
	  - Fixed ToString() to return "Null" for null value.
	  - Fixed explicit let operator to use double .ctor, not decimal
	    .ctor() so that precision can be handled in the same way as double.

svn path=/trunk/mcs/; revision=27568
2004-05-18 06:55:42 +00:00
Ravindra bde80e3981 * TestHatchBrush.cs: Removed. Now, we have a better test for HatchBrush
under Test/System.Drawing.Drawing2D directory.

svn path=/trunk/mcs/; revision=27567
2004-05-18 06:37:14 +00:00
Ravindra 99afc6c7d1 * TestHatchBrush.cs: Added a test case for HatchBrush.cs.
* TestBlend.cs: dos2unix format and namespace changed to
	MonoTests.System.Drawing.Drawing2D.
	* TestColorBlend.cs: dos2unix format and namespace changed to
	MonoTests.System.Drawing.Drawing2D.

svn path=/trunk/mcs/; revision=27566
2004-05-18 06:09:33 +00:00
Atsushi Eno c78ab46991 2004-05-18 Atsushi Enomoto <[email protected]>
* SqlDecimalTest.cs :
	  Don't catch all kind of exception. That hides the exact error info.
	  Don't use ToSqlString() in AdjustScale() test (to make which is
	  wrong).
	  MS.NET's ToSqlInt32() is buggy; no worth following the behavior.
	  Added test for parsing "999999..." (SqlDecimal.MaxValue).

svn path=/trunk/mcs/; revision=27564
2004-05-18 05:14:22 +00:00
Duncan Mak 4f6a26c2a3 Gonzalo reminded me that I need to update the version number as
well. We're at 0.7.6 now.

svn path=/trunk/mcs/; revision=27562
2004-05-18 04:46:40 +00:00
Gonzalo Paniagua Javier eb35fd3737 2004-05-18 Gonzalo Paniagua Javier <[email protected]>
* HttpUtility.cs: use lower case in UrlEncode like MS does. Delay
	entities hashtable creation until it's really needed.

svn path=/trunk/mcs/; revision=27561
2004-05-18 04:38:14 +00:00
Duncan Mak cd8af73359 (CreateUnixSocketStream): Instead of hostList [0], which is a char,
use hostList directly. This fixes the build.

svn path=/trunk/mcs/; revision=27560
2004-05-18 04:21:54 +00:00
Gonzalo Paniagua Javier 5b23316dfe 2004-05-18 Gonzalo Paniagua Javier <[email protected]>
* socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
	Fixes bug #58373.

svn path=/trunk/mono/; revision=27559
2004-05-18 04:17:00 +00:00
Duncan Mak 6269699a07 Build fix
svn path=/trunk/mcs/; revision=27558
2004-05-18 03:47:58 +00:00
Duncan Mak 1da941cf42 * Makefile: Add reference to Mono.Posix.dll.
* ByteFX.Data.dll.sources: Update to latest listing of source
files.

* AssemblyInfo.cs: Revert back to the previous version, because we
don't have bytefx.snk.

* mysqlclient/transcaction.cs: Removed, replaced by the new
transaction.cs.

svn path=/trunk/mcs/; revision=27557
2004-05-18 03:45:54 +00:00
Duncan Mak 54c8857254 Sync the ByteFX source tree to the latest version:
http://www.bytefx.com/releases/ByteFX.MySqlClient.76.src.zip

svn path=/trunk/mcs/; revision=27556
2004-05-18 03:16:43 +00:00
Atsushi Eno e00c1cd980 2004-05-18 Atsushi Enomoto <[email protected]>
* DataSetTest.cs : Converted CRLF to LF for line ending comparison.
	  (and added copyright line.)

svn path=/trunk/mcs/; revision=27555
2004-05-18 02:58:18 +00:00
Sebastien Pouliot be18a0f207 2004-05-17 Sebastien Pouliot <[email protected]>
* RNGCryptoServiceProviderTest.cs: Added new tests to see how the
	constructor behave with null seeds or if they modify the seed.

svn path=/trunk/mcs/; revision=27553
2004-05-18 01:46:19 +00:00
Ben Maurer c6cf2f4308 2004-05-17 Ben Maurer <[email protected]>
* helpers.c: use g_get_tmp_dir. Invokes happyness
	from gonzalo.

svn path=/trunk/mono/; revision=27552
2004-05-18 01:45:49 +00:00
Ben Maurer 3fec6b9b9b 2004-05-17 Ben Maurer <[email protected]>
* helpers.c: Add new env variable to pass args to objdump.
	Specifically for those of us who love -Mintel. r=miguel, gonzalo.

svn path=/trunk/mono/; revision=27551
2004-05-18 01:35:10 +00:00
Gonzalo Paniagua Javier 1265a06ea4 2004-05-18 Gonzalo Paniagua Javier <[email protected]>
* TextBox.cs: don't save the Text if in ViewState if it's a password.
	Save it if the control is not visible or not enabled. Fixes bug #58497.

svn path=/trunk/mcs/; revision=27549
2004-05-18 00:56:18 +00:00
Gonzalo Paniagua Javier 698bb3cd32 2004-05-18 Gonzalo Paniagua Javier <[email protected]>
* TextBox.cs: removed ^Ms and reformatted.

svn path=/trunk/mcs/; revision=27548
2004-05-18 00:43:35 +00:00
Jackson Harper 9fc844b793 * CultureInfo.cs: Invariant culture has the invariant culture as
its parent....<insert joke about the south>. It is readonly so we
	can return this.

svn path=/trunk/mcs/; revision=27547
2004-05-18 00:23:19 +00:00
Neale Ferguson d7ce0f424f Fix local variable allocation logic
svn path=/trunk/mono/; revision=27546
2004-05-18 00:12:50 +00:00
Jackson Harper 32cbdd5985 * CultureInfo.cs: Invariant culture has the invariant culture as
its parent....<insert joke about the south>.

svn path=/trunk/mcs/; revision=27545
2004-05-17 23:37:04 +00:00
Gonzalo Paniagua Javier 8e70fc3962 2004-05-18 Gonzalo Paniagua Javier <[email protected]>
* WebException.cs: implemented serialization .ctor and GetObjectData().

svn path=/trunk/mcs/; revision=27544
2004-05-17 23:19:06 +00:00
Gonzalo Paniagua Javier b53a254e78 2004-05-18 Gonzalo Paniagua Javier <[email protected]>
* SoapHttpClientProtocol.cs: when the response has a not acceptable
	status code, the WebException we throw has a status of ProtocolError.
	Fixes bug #58564.

svn path=/trunk/mcs/; revision=27543
2004-05-17 23:12:01 +00:00
Jackson Harper e0a5360f56 * CultureInfo.cs: Properify error messages when invalid lcid's are
used.

svn path=/trunk/mcs/; revision=27542
2004-05-17 22:47:56 +00:00
Gonzalo Paniagua Javier a221a64c18 2004-05-18 Gonzalo Paniagua Javier <[email protected]>
* HttpApplicationFactory.cs: if no module matches the name found for a
	possible event, ignore it. Fixes bug #58542.

svn path=/trunk/mcs/; revision=27541
2004-05-17 21:37:33 +00:00
Miguel de Icaza 362bcf6ba3 2004-05-17 Miguel de Icaza <[email protected]>
* class.cs (MemberBase.DoDefine): Pass UNSAFE on interface
	definitions.

	(Method): Allow UNSAFE here.

	* modifiers.cs: Support unsafe reporting.

svn path=/trunk/mcs/; revision=27540
2004-05-17 21:22:51 +00:00
Gonzalo Paniagua Javier 99a2ca96d9 2004-05-17 Gonzalo Paniagua Javier <[email protected]>
* ConfigurationSettings.cs: don't ask me why, but the .cctor
	initialization of 'instance' field does no longer work.

svn path=/trunk/mcs/; revision=27539
2004-05-17 20:34:32 +00:00
Miguel de Icaza b668d314eb Flush
svn path=/trunk/mono/; revision=27538
2004-05-17 19:55:40 +00:00
Gonzalo Paniagua Javier b71d0f0f70 2004-05-17 Gonzalo Paniagua Javier <[email protected]>
* gacutil.cs:
	(InstallAssembly): use Array.IndexOf to search for "/f", "-f" or
	"--force" instead of expecting it in a fixed place.

svn path=/trunk/mcs/; revision=27537
2004-05-17 19:47:21 +00:00
Erik Dasque b10714392b added MonoBeta1PressCoverage.htm for Beta 1 press coverage in may. Updated indexes
svn path=/trunk/mono/; revision=27536
2004-05-17 19:31:53 +00:00
Andreas N 02a94c6916 2004-05-17 Andreas Nahr <[email protected]>
* TimeSpan.cs: Only catch expected exceptions, if we get other exceptions
	  than OverflowExceptions then something went wrong internally

svn path=/trunk/mcs/; revision=27535
2004-05-17 19:30:10 +00:00
Duncan Mak 01a193d498 Added section on Nemerle, per request from Kamil Skalski.
svn path=/trunk/mono/; revision=27534
2004-05-17 19:08:42 +00:00
Duncan Mak 6eadf37de4 Untabify and fixed coding style.
(GraphicsPathIterator): Store the path count, path points and path
type arrays instead of calling unmanaged functions in GDI+ each time
to get to get the path data.

(CopyData, Enumerate, HasCurve, Rewind, SubpathCount): Implemented.

svn path=/trunk/mcs/; revision=27533
2004-05-17 18:51:50 +00:00
Miguel de Icaza b538e3116d Fix from Marek to fix pinvoke3.cs
svn path=/trunk/mcs/; revision=27532
2004-05-17 18:51:32 +00:00
Atsushi Eno f4ab0bef2a 2004-05-17 Atsushi Enomoto <[email protected]>
* XmlConvert.cs : Fixed ToString(TimeSpan) that didn't handle Hour
	  correctly. This fixes bug #57786.

svn path=/trunk/mcs/; revision=27531
2004-05-17 18:01:54 +00:00
Atsushi Eno 111d31e19d 2004-05-17 Atsushi Enomoto <[email protected]>
* XmlDataDocument.cs :
	  Removed MonoTODO from implemented members and private members.
	  Updated OnNodeRemoved(), OnDataRowDeleted() and OnDataTableRollback()
	  to match with current implementation.

svn path=/trunk/mcs/; revision=27529
2004-05-17 17:41:20 +00:00
Radek Doulik db7caacaa1 2004-05-17 Radek Doulik <[email protected]>
* Makefile.am (common_sources): added abcremoval.h so it get
	disted and daily mono packages on go-mono.com will build again

svn path=/trunk/mono/; revision=27528
2004-05-17 17:29:45 +00:00
Andreas N 3382c797bb 2004-05-17 Andreas Nahr <[email protected]>
* Char.cs: Fix long standing bug with ToLower/ToUpper not being
	  culture - sensitive

svn path=/trunk/mcs/; revision=27527
2004-05-17 17:27:59 +00:00
Atsushi Eno 75feffdcf8 2004-05-17 Atsushi Enomoto <[email protected]>
* DataSet.cs,
	  XmlDataInferenceLoader.cs,
	  XmlDataReader.cs,
	  XmlSchemaDataImporter.cs : XmlDecode every local name to read and
	  XmlEncode every local name to write. This should fix bug #58268.

svn path=/trunk/mcs/; revision=27524
2004-05-17 17:01:57 +00:00
Atsushi Eno 9990778cc9 2004-05-17 Atsushi Enomoto <[email protected]>
* DataSetTest.cs : Added WriteXmlEncodedXml() test.

svn path=/trunk/mcs/; revision=27523
2004-05-17 16:58:04 +00:00
Miguel de Icaza 4ab87ca826 Flush
svn path=/trunk/mono/; revision=27522
2004-05-17 16:38:49 +00:00
Dick Porter d1e47af8ed 2004-05-17 Dick Porter <[email protected]>
* io.c (CopyFile): Speed up.  Fixes bug 57859.

svn path=/trunk/mono/; revision=27521
2004-05-17 16:07:13 +00:00
Atsushi Eno 9f24e3e501 2004-05-17 Atsushi Enomoto <[email protected]>
* DataSetAssertion.cs : Enabled "Ordinal" check again, unless the test
	  value is -1.
	* DataSetInferXmlSchemaTest.cs,
	  DataSetReadXmlSchemaTest.cs  : Enabled Ordinal check again, as long
	  as working. Added IgnoredNamespaces() to inferxmlschema test.

svn path=/trunk/mcs/; revision=27520
2004-05-17 15:28:12 +00:00
Atsushi Eno 4e8cebe2fa 2004-05-17 Atsushi Enomoto <[email protected]>
* SqlBinary.cs,
	  SqlDateTime.cs,
	  SqlDouble.cs,
	  SqlGuid.cs,
	  SqlMoney.cs,
	  SqlSingle.cs,
	  SqlString.cs : If values are null, ToString() should return "Null".

svn path=/trunk/mcs/; revision=27519
2004-05-17 15:12:17 +00:00
Atsushi Eno aced1da708 2004-05-17 Atsushi Enomoto <[email protected]>
* DataSet.cs : Implemented ignored namespaces in InferXmlSchema().
	  Supported repeated elements. Removed MonoTODOs.
	* XmlDataInferenceLoader.cs : Design change to support ignored
	  namespace and repeated elements.
	* XmlSchemaDataImporter.cs : Added mapping support classes.

svn path=/trunk/mcs/; revision=27518
2004-05-17 15:06:50 +00:00
Sanja Gupta d5ae7da7ca ChangeLog: Updated ChangeLog.
TestIconConverter.cs: Added.
bitmaps/VisualPng.ico: Added.
bitmaps/VisualPng1.ico: Added.

svn path=/trunk/mcs/; revision=27517
2004-05-17 13:28:51 +00:00
Sanja Gupta 56311bab2c ChangeLog: Updated ChangeLog.
System.Drawing_test.dll.sources: Added TestIconConverter to source list.

svn path=/trunk/mcs/; revision=27516
2004-05-17 13:19:33 +00:00
Dick Porter 29aa42c97a Build fixes
svn path=/trunk/mono/; revision=27515
2004-05-17 12:14:29 +00:00
Raja R Harinath 0eb77f0872 (tmpinst-dir): Creates _tmpinst tree if
necessary. Move body ...
(tmpinst-dir.stamp): ... here.
(stage3): Don't remove _tmpinst tree.
(bootstrap-clean, bootstrap-check): New rules.  They run the
corresponding rules in the mcs/ tree.

svn path=/trunk/mono/; revision=27513
2004-05-17 10:08:57 +00:00
Umadevi S f3d8d5e12d 2004-05-17 Umadevi S ([email protected])
* OdbcPermissionAttribute, OdbcPermission.cs - fixed missing methods

svn path=/trunk/mcs/; revision=27512
2004-05-17 10:08:05 +00:00
Massimiliano Mantione f338a0c396 Added documentation for abc removal code.
svn path=/trunk/mono/; revision=27511
2004-05-17 09:35:07 +00:00
Massimiliano Mantione a188e60dac 2004-05-17 Massimiliano Mantione <[email protected]>
svn path=/trunk/mono/; revision=27510
2004-05-17 09:11:53 +00:00
Massimiliano Mantione d1dc118286 Added copyright header.
svn path=/trunk/mono/; revision=27509
2004-05-17 09:11:27 +00:00
Massimiliano Mantione 17cf08c04b Added prototype for abc removal main function.
svn path=/trunk/mono/; revision=27508
2004-05-17 09:04:42 +00:00
Massimiliano Mantione cf45fa5301 Fixed style and moved prototype to mini.h.
svn path=/trunk/mono/; revision=27507
2004-05-17 09:02:27 +00:00
Massimiliano Mantione 659ffa54b9 2004-05-14 Massimiliano Mantione <[email protected]>
svn path=/trunk/mono/; revision=27506
2004-05-17 08:57:51 +00:00
Umadevi S fd9347803b 2004-05-14 Umadevi S ([email protected])
* OleDbAdapter.cs -Implemented attributes, changed method signature for fill

svn path=/trunk/mcs/; revision=27505
2004-05-17 08:56:53 +00:00
Raja R Harinath 37b2ec8785 (all, clean): Remove indirection.
(clean-profiles): New.

svn path=/trunk/mcs/; revision=27504
2004-05-17 08:52:42 +00:00
Massimiliano Mantione b42adeb5e0 Changed header file usage (abcremoval.h).
svn path=/trunk/mono/; revision=27503
2004-05-17 08:49:55 +00:00
Massimiliano Mantione 7213c054ba Fixed coding style.
svn path=/trunk/mono/; revision=27502
2004-05-17 08:45:48 +00:00
Umadevi S cbe452468b 2004-05-14 Umadevi S <[email protected]>
* System.Data.dll.sources : Added SQLDebugging.cs

svn path=/trunk/mcs/; revision=27501
2004-05-17 07:33:01 +00:00
Marek Safar 531dd7c123 2004-05-17 Marek Safar <[email protected]>
* decl.cs: Fix bug #58478.

svn path=/trunk/mcs/; revision=27500
2004-05-17 07:20:58 +00:00
Gert Driesen 88f8cf8c2d * OdbcCategoryAttribute.cs: fixed namespace
* OdbcDataAdapter.cs: removed extra attributes
* OdbcDescriptionAttribute.cs: fixed namespace

svn path=/trunk/mcs/; revision=27499
2004-05-17 06:37:31 +00:00
Gonzalo Paniagua Javier 181a65498c 2004-05-17 Gonzalo Paniagua Javier <[email protected]>
* statement.cs: When checking for unreachable code on an EmptyStatement,
	set the location. Fixes bug #58488.

svn path=/trunk/mcs/; revision=27498
2004-05-17 01:23:34 +00:00
Gonzalo Paniagua Javier ebdbd43045 2004-05-17 Gonzalo Paniagua Javier <[email protected]>
* process.c: use double quotes to quote program name and arguments on
	windows. Fixes bug #58575.

svn path=/trunk/mono/; revision=27497
2004-05-17 00:42:10 +00:00
Gonzalo Paniagua Javier 7ae1740b3f 2004-05-17 Gonzalo Paniagua Javier <[email protected]>
* file-io.c: don't return "." and ".." when using windows Find*File.

svn path=/trunk/mono/; revision=27496
2004-05-17 00:22:20 +00:00
Patrik Torstensson 41f7ebe345 2003-05-17 Patrik Torstensson <[email protected]>
* marshal.c: Don't pass wrappers to message init because method
	addressed used to lookup metadata. part of remoting[2|3] fix.

svn path=/trunk/mono/; revision=27495
2004-05-16 21:37:33 +00:00
Miguel de Icaza 2db8feaede Fix build
svn path=/trunk/mcs/; revision=27494
2004-05-16 20:53:39 +00:00
Miguel de Icaza ca840c4b36 Fix build
svn path=/trunk/mcs/; revision=27493
2004-05-16 20:52:51 +00:00
Miguel de Icaza f60a3314e3 Disable anonymous methods
svn path=/trunk/mcs/; revision=27490
2004-05-16 17:56:15 +00:00
Patrik Torstensson d3620b8aed 2004-05-16 Patrik Torstensson <[email protected]>
* HttpRuntime (Init): Removed old todo
	* HttApplication : Implemented IHttpHandlerFactory recycling

svn path=/trunk/mcs/; revision=27489
2004-05-16 16:48:41 +00:00
Gert Driesen 0e69868443 * DirectoryServicesPermission.cs: marked sealed, added
Serializable attribute
* SearchResultCollection: made Handle public

svn path=/trunk/mcs/; revision=27488
2004-05-16 16:30:38 +00:00
Gert Driesen 5dbd25316b * System.Windows.Forms.Design/IMenuEditorService.cs:
fixed signature

svn path=/trunk/mcs/; revision=27487
2004-05-16 16:22:12 +00:00
Gert Driesen 23e32ce3cc * System.Windows.Forms.Design/DocumentDesigner.cs:
stubbed
* System.Windows.Forms.Design/ParentControlDesigner.cs:
stubbed
* System.Windows.Forms.Design/ScrollableControlDesigner.cs:
stubbed

svn path=/trunk/mcs/; revision=27486
2004-05-16 16:14:11 +00:00
Gert Driesen 20ab038e49 * System.Windows.Forms.Design/ControlDesigner.cs:
stubbed

svn path=/trunk/mcs/; revision=27485
2004-05-16 15:25:23 +00:00
Gert Driesen 3f5d6339ef * UnsafeNativeMethods.cs: added IEnumVariant interface,
added to-do's
* AccessibleObject.cs: stubbed IEnumVariant implementation,
added to-do's

svn path=/trunk/mcs/; revision=27484
2004-05-16 15:23:18 +00:00
Atsushi Eno 99ad74c16d 2004-05-16 Atsushi Enomoto <[email protected]>
* xsd.1 : added description for /generator option.

svn path=/trunk/mono/; revision=27483
2004-05-16 15:21:29 +00:00
Atsushi Eno 8fb3d716a6 2004-05-16 Atsushi Enomoto <[email protected]>
* DirectoryInfo.cs: Fixed ToString() as well as FileInfo.

svn path=/trunk/mcs/; revision=27482
2004-05-16 15:02:47 +00:00
Atsushi Eno 9c425d8ca9 2004-05-16 Atsushi Enomoto <[email protected]>
* FileInfo.cs: ToString() returns not full path but just the file name.

svn path=/trunk/mcs/; revision=27481
2004-05-16 14:53:53 +00:00
Patrik Torstensson d814897206 2004-05-16 Patrik Torstensson <[email protected]>
* ExpiresBucket.cs: Style changes plus;
	(Update): Fixed possible lock bug (bug 54531)
	(Expand): remove lock optimization due to it can cause newly
	added items to be lost.
	(Remove): fixed possible lock bug.

svn path=/trunk/mcs/; revision=27480
2004-05-16 14:43:49 +00:00
Patrik Torstensson 010f3a2087 2004-05-16 Patrik Torstensson <[email protected]>
* basic-long.cs: reg test for complex ceq_long bug.

svn path=/trunk/mono/; revision=27479
2004-05-16 13:18:08 +00:00
Patrik Torstensson 909521f781 2004-05-16 Patrik Torstensson <[email protected]>
* mini-x86.c (mono_arch_local_regalloc): Correctly free
	reg in long and clob case (bug #58343). Fixed/added comments.

svn path=/trunk/mono/; revision=27478
2004-05-16 13:16:45 +00:00
Gert Driesen cf47d2d76a * System.Design.dll.sources: added ISelectionUIHandler
* System.Windows.Forms.Design/ISelectionUIHandler.cs:
added
* System.Windows.Forms.Design/ComponentTray.cs: stubbed

svn path=/trunk/mcs/; revision=27477
2004-05-16 12:46:33 +00:00
Gert Driesen 4898dec25d * CodeDomSerializerException.cs: removed default public
ctror, removed finalizer, removed ToString() method

svn path=/trunk/mcs/; revision=27476
2004-05-16 12:06:27 +00:00
Gert Driesen 7c74c82055 * ByteViewer.cs: removed Site property, added GetBytes sub,
added missing attributes
* LocalizationExtenderProvider.cs: added missing attributes

svn path=/trunk/mcs/; revision=27475
2004-05-16 12:01:58 +00:00
Gert Driesen 03c581a77c * Graphics.cs: fixed warning
* ImageAnimator.cs: fixed warning
* FontConverter.cs: fixed public API

svn path=/trunk/mcs/; revision=27474
2004-05-16 11:47:07 +00:00
Gert Driesen c8514597c4 * GraphicsPath.cs: renamed SetMarker to SetMarkers, to fix
public API to match MS.NET

svn path=/trunk/mcs/; revision=27473
2004-05-16 11:34:27 +00:00
Gert Driesen c76c6cfac3 * EncoderParameterValueType.cs: fix Windows build (CSC),
MCS bug #58571

* EncoderParameter.cs: removed ctors taking int value,
to fix public API

svn path=/trunk/mcs/; revision=27472
2004-05-16 11:28:07 +00:00
Gert Driesen b22358ca00 * IManagedInstaller.cs: fixed signature
* Installer.cs: marked parent internal to match MS
* InstallerCollection.cs: implemented
* InstallEventArgs.cs: remove setter for SavedState

svn path=/trunk/mcs/; revision=27471
2004-05-16 09:22:06 +00:00
Vladimir Vukicevic e932bf2d09 * EncoderParameters.cs: Added ToNativePtr() method to marshal
struct correctly to a native struct.  Resulting data should be
FreeHGlobal'd when finished.

* EncoderParameter.cs: Changed data storage to correspond to
native code layout.  Also changed layout to match native layout.

* EncoderParameterValueType.cs: force EncoderParameterValueType to
be Int32

* gdipFunctions.cs: Fixed prototype for
GdipGetEncoderParameterList

* Image.cs: Reworked Save functions to handle EncoderParameters.
Implemented GetEncoderParameterList.
Also removed unused setGDIPalette internal method.

svn path=/trunk/mcs/; revision=27467
2004-05-15 23:33:15 +00:00
Vladimir Vukicevic 6f39e2d5f7 Changes from arch/CVS synchronization
svn path=/trunk/mcs/; revision=27465
2004-05-15 22:03:58 +00:00
Jackson Harper a3470065d5 * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
path is essentially the same as MONO_PATH except that it points to
	GACs instead of lib directories.
	* loader.h: The user gac is gone so we dont need function to
	enable/disable it.
	* mono-config.c: user gac option is now gone.

svn path=/trunk/mono/; revision=27464
2004-05-15 21:49:35 +00:00
Jackson Harper 962d3d6725 * CultureInfo.cs: Initialize optional calendars. A pointer to an
array of ints is passed back from the runtime to the CultureInfo
	object. The ints store the calendar type and any optional data
	needed to construct the calendar.

svn path=/trunk/mcs/; revision=27462
2004-05-15 20:10:49 +00:00
Jackson Harper 1db9e3e313 * culture-info.h: Make defines more consistent, add calendar data
to the culture info table.
	* culture-info-tables.h: Add basic calendar data. Basically
	everyone gets default gregorian until all the data is
	updated.
	* locales.c: Use the new consistent defines. Set calendar data for
	culture info objects.
	* object.h: add a field for calendar data to CultureInfo

svn path=/trunk/mono/; revision=27461
2004-05-15 20:09:06 +00:00
Duncan Mak f7b1c1a722 Instead of casting null to an IntPtr, use IntPtr.Zero instead. Thanks
to Nick Drochak for spotting this.

svn path=/trunk/mcs/; revision=27460
2004-05-15 19:05:00 +00:00
Rafael Teixeira 68ea632bea 2004-05-15 Rafael Teixeira ([email protected])
* Makefile: corrected /libpath: compiler flag (parameter) to point to ../class/lib/default/ the new location of libraries

svn path=/trunk/mcs/; revision=27459
2004-05-15 18:03:02 +00:00
Gert Driesen 000da9d529 * System.Configuration.Install.dll.sources: added
Assembly/Consts.cs

svn path=/trunk/mcs/; revision=27458
2004-05-15 17:24:39 +00:00
Gert Driesen a3b2c81b31 * Consts.cs: Added
svn path=/trunk/mcs/; revision=27457
2004-05-15 17:23:05 +00:00
Gert Driesen dbfef65642 * InstallContext.cs: removed setter for Parameters
* Installer.cs: added missing attributes, remove
setter for Installers, Context

svn path=/trunk/mcs/; revision=27456
2004-05-15 17:21:51 +00:00
Gert Driesen eed0749763 * ClerkInfo.cs: added internal ctor
svn path=/trunk/mcs/; revision=27455
2004-05-15 16:43:04 +00:00
Gert Driesen faa376b487 * ServiceDomain.cs: added private ctor to match MS
* BYOT.cs: added private ctor to match MS
* RegistrationErrorInfo.cs: marked ctor internal

svn path=/trunk/mcs/; revision=27454
2004-05-15 16:26:41 +00:00
Gert Driesen 6f58865771 * System.EnterpriseServices.dll.sources: Added IConfigurationAttribute
interface

svn path=/trunk/mcs/; revision=27453
2004-05-15 16:18:46 +00:00
Gert Driesen fa08baa33a * IConfigurationAttribute: added
* ApplicationAccessControlAttribute.cs:
* ApplicationActivationAttribute.cs:
* ApplicationIDAttribute.cs:
* ApplicationNameAttribute.cs: stubbed implementation of
IConfigurationAttribute

svn path=/trunk/mcs/; revision=27452
2004-05-15 16:16:33 +00:00
Gert Driesen 386a087eed *** empty log message ***
svn path=/trunk/mcs/; revision=27451
2004-05-15 16:12:18 +00:00
Gert Driesen 3496b6439a * AssemblyInfo.cs: fixed assembly attributes to match MS
frameworks

svn path=/trunk/mcs/; revision=27450
2004-05-15 15:19:42 +00:00
Gert Driesen 9b956f2604 * AssemblyInfo.cs: System.Data.OracleClient is CLS compliant
svn path=/trunk/mcs/; revision=27449
2004-05-15 14:21:13 +00:00
Gert Driesen 48cbabfa38 * Makefile: add reference to Accessibility assembly, needed
to check CLS compliance
* Assembly/AssemblyInfo.cs: System.Design is CLS Compliant

svn path=/trunk/mcs/; revision=27448
2004-05-15 14:18:01 +00:00
Gert Driesen 9c68b6f249 * System.Design.dll.sources: remove DataBindingCollection
* System.Web.UI.Design/DataBindingCollection.cs: removed
* System.Web.UI.Design/HtmlControlDesigner.cs: fixed imports
* System.Web.UI.Design/WebControlToolboxItem.cs: fixed
public API
* System.Web.UI.Design/UrlBuilderOptions.cs: added Flags
attribute

svn path=/trunk/mcs/; revision=27447
2004-05-15 14:13:23 +00:00
Gert Driesen 18c12c1052 * System.Design.dll.sources: added IOleDragClient
* System.ComponentModel.Design/ComponentDesigner.cs: fixed public API
* System.Web.UI.Design/ControlDesigner.cs: fixed public API
* System.Web.UI.Design/HtmlControlDesigner: fixed public API
* System.Windows.Forms.Design/AnchorEditor.cs: fixed public API,
converted to unix linefeeds
* System.Windows.Forms.Design/AxImporter.cs: fixed public API,
converted to unix linefeeds
* System.Windows.Forms.Design/ComponentDocumentDesigner.cs: fixed
public API, converted to unix linefeeds
* System.Windows.Forms.Design/SelectionRules.cs: implementation

svn path=/trunk/mcs/; revision=27445
2004-05-15 13:48:12 +00:00
Gert Driesen f523bd044e * System.Windows.Forms.Design/FileNameEditor.cs: code formatting
* System.Windows.Forms.Design/FolderNameEditor.cs: code formatting
* System.Windows.Forms.Design/MenuCommands.cs: code formatting

svn path=/trunk/mcs/; revision=27444
2004-05-15 13:45:15 +00:00
Gert Driesen 8c4761499e * System.Design.dll.sources: remove MenusCommands, added
MenuCommands
* System.Web.UI.Design/ImageUrlEditor.cs: fixed warnings
* System.Windows.Forms.Design/MenuCommands.cs: added impl
* System.Windows.Forms.Design/MenusCommands.cs: removed,
wrong name

svn path=/trunk/mcs/; revision=27443
2004-05-15 12:12:44 +00:00
Nick Drochak 3f569a1079 2004-05-14 Nick Drochak <[email protected]>
* GraphicsPath.cs: fix build with csc.  No implicit conversion from
	null to IntPtr.  Bug in mcs?

svn path=/trunk/mcs/; revision=27442
2004-05-15 10:53:40 +00:00
Gert Driesen fcf987546e * System.Windows.Forms.Design/FolderNameEditor.cs:
converted to unix linefeeds, marked class TODO, added Flags
attribute to FolderBrowserStyles enum
* System.Windows.Forms.Design/FileNameEditor.cs:
completed stubs, converted to unix linefeeds

svn path=/trunk/mcs/; revision=27441
2004-05-15 10:16:46 +00:00
Gert Driesen 073dabbd04 * System.Windows.Forms.Design/FolderNameEditor.cs: added stub
svn path=/trunk/mcs/; revision=27440
2004-05-15 09:44:35 +00:00
Atsushi Eno 94cdcdb50a 2004-05-15 Atsushi Enomoto <[email protected]>
* CustomDataClassGenerator.cs :
	  Added property parent "[foo]Row" and children "Get[foo]Row" support
	  for custom DataRow classes.
	  Fixed DataColumn property accessibility (public --> internal).

svn path=/trunk/mcs/; revision=27439
2004-05-15 08:54:45 +00:00
Gert Driesen cfe62586cb rolled back change to use mono runtime, committed by accident
svn path=/trunk/mono/; revision=27438
2004-05-15 06:41:09 +00:00
Peter Dennis Bartok 2435a73b4e - Fixed Text set property. If user updated text field through UI the
text!=value comparison might be off

svn path=/trunk/mcs/; revision=27437
2004-05-15 03:55:07 +00:00
Peter Dennis Bartok 211872b6ec - Fixed Text get property (also fixes bug #55005)
- Removed debug output

svn path=/trunk/mcs/; revision=27436
2004-05-15 03:27:07 +00:00
Peter Dennis Bartok 8b6f2d95b6 - Implemented Graphics.MeasureCharacterRanges method
- Added CharacterRange handling to StringFormat

svn path=/trunk/mcs/; revision=27435
2004-05-15 01:53:31 +00:00
Miguel de Icaza c3a262546c Add a few names
svn path=/trunk/mono/; revision=27434
2004-05-14 22:25:10 +00:00
Carlos Alberto Cortez 3065dfdd67 Support for delegates and nestedt types added
svn path=/trunk/mcs/; revision=27433
2004-05-14 22:21:47 +00:00
Todd Berman cdefe9e8a0 2004-05-14 Todd Berman <[email protected]>
* gacutil.cs: Remove old file/symlink, thanks urs.

svn path=/trunk/mcs/; revision=27432
2004-05-14 22:21:24 +00:00
Ben Maurer 57d4440617 share runtime code, r=zoltan
svn path=/trunk/mono/; revision=27431
2004-05-14 22:05:06 +00:00
Gert Driesen 584bf73dbd Added class status pages for these assemblies:
- System.Configuration.Install
- System.Data.OracleClient
- System.Drawing.Design
- System.Design
- System.Management
- System.Messaging

svn path=/trunk/mono/; revision=27429
2004-05-14 20:49:39 +00:00
Peter Dennis Bartok 3744ec8174 - Added error check
svn path=/trunk/mcs/; revision=27427
2004-05-14 20:28:34 +00:00
Duncan Mak 0a60e85735 * GraphicsPath.cs (ConvertPoints): Removed, we'll do the
conversion in C.
(GraphicsPath): Use GdipCreatePath2I instead.
(SetMarker, ClearMarkers):
(Flatten, GetBounds, IsOutlineVisible, IsVisible):
(StartFigure, CloseFigure, CloseFigures):
(Warp, Widen): Implemented. I left the MonoTODO attribute on for
the methods where the equivalent C function has not yet been
implemented.

* GraphicsPathIterator.cs (Count): Implemented.

* gdipFunctions.cs (GdipCreatePath2I, GdipAddPathPieI):
(GdipFlattenPath, GdipWarpPath, GdipWidenPath):
(GdipGetPathWorldBounds, GdipGetPathWorldBoundsI): Imported.

svn path=/trunk/mcs/; revision=27424
2004-05-14 19:29:19 +00:00
Mike Kestner e5759e4837 2004-05-14: Mike Kestner <[email protected]>
* ClientRemotingConfig.cs : stub
	* ComSoapPublishError.cs : stub
	* GenerateMetadata.cs : stub
	* IComSoapIISVRoot.cs : impl
	* IComSoapMetadata.cs : impl
	* IISVirtualRoot.cs : impl
	* IServerWebConfig.cs : impl
	* ServerWebConfig.cs : stub

svn path=/trunk/mcs/; revision=27423
2004-05-14 19:18:44 +00:00
Zoltan Varga 5ada7022ff 2004-05-14 Zoltan Varga <[email protected]>
* ChangeLog: Fix author of memory leak patch.

svn path=/trunk/mono/; revision=27422
2004-05-14 18:19:12 +00:00
Zoltan Varga a2b81dff7e 2004-05-14 Zoltan Varga <[email protected]>
* appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.

svn path=/trunk/mono/; revision=27421
2004-05-14 18:10:59 +00:00
Sebastien Pouliot b2744fd13e 2004-05-14 Sebastien Pouliot <[email protected]>
* UTF8Encoding.cs: Added code to check for overlongs.

svn path=/trunk/mcs/; revision=27419
2004-05-14 17:41:31 +00:00
Atsushi Eno 75833b045e 2004-05-14 Atsushi Enomoto <[email protected]>
* CustomDataClassGenerator.cs :
	  - Put classes inside custom DataSet class.
	  - Added automatic DataRelation creation support.
	  - Added Constraints creation support. That is done separate from
	    relations, since they might be independently created.
	  - Added non-MS public DataRelation fields.
	  - Removed extraneous "DataRelation type generation" code.
	  - Fixed custom_dataset.Initialize() not to create "c" field that
	    was created more than once.
	  - Implemented AddxxxRow() that takes parameters for every column.

svn path=/trunk/mcs/; revision=27418
2004-05-14 16:42:48 +00:00
Miguel de Icaza c1385914f5 Flush
svn path=/trunk/mono/; revision=27417
2004-05-14 15:57:56 +00:00
Miguel de Icaza 7f373e776e Flush
svn path=/trunk/mono/; revision=27416
2004-05-14 15:57:22 +00:00
Jackson Harper 4f742c58fc * gacutil.cs: Always install the package files.
svn path=/trunk/mcs/; revision=27415
2004-05-14 15:45:45 +00:00
Jackson Harper 1ab6c801b8 * library.make: Install package files. Get params in magical
correct order.

svn path=/trunk/mcs/; revision=27414
2004-05-14 15:42:24 +00:00
Anirban Bhattacharjee 47c497c0d6 * mb-parser.jay: few Property related grammar changes
svn path=/trunk/mcs/; revision=27413
2004-05-14 14:55:23 +00:00
Anirban Bhattacharjee 7c36d2ed00 * mb-tokenizer.cs: Bug fixed - Got Property working
svn path=/trunk/mcs/; revision=27412
2004-05-14 14:52:55 +00:00
Miguel de Icaza 7b6935eaea Patch from Gonzalo to improve pkg-config handling
svn path=/trunk/mcs/; revision=27411
2004-05-14 14:32:19 +00:00
Jackson Harper cd14db04a0 * library.make: Install package files.
svn path=/trunk/mcs/; revision=27410
2004-05-14 14:26:49 +00:00
Dick Porter de035cb2c7 2004-05-14 Dick Porter <[email protected]>
* HebrewCalendar.cs: Stubbed ToFourDigitYear()

	* HijriCalendar.cs: Stubbed HijriAdjustment

svn path=/trunk/mcs/; revision=27409
2004-05-14 14:05:18 +00:00
Sanja Gupta 5442f16916 ChangeLog: Updated ChangeLog.
ImageFormatConverter.cs: Modified implementation of ConvertFrom() method.

svn path=/trunk/mcs/; revision=27407
2004-05-14 13:40:06 +00:00
Sanja Gupta 7dbb09a87a ChangeLog: Updated ChangeLog
System.Drawing_test.dll.sources: Added TestImageConverter.cs and TestImageFormatCoverter.cs.

svn path=/trunk/mcs/; revision=27406
2004-05-14 13:37:03 +00:00
Sebastien Pouliot 24a73cab4c 2004-05-14 Sebastien Pouliot <[email protected]>
* UTF8Encoding.cs: Moved charCount-- after the check for surrogate
	pair. This fix bug #57009 (and 2 failing unit tests).

svn path=/trunk/mcs/; revision=27405
2004-05-14 13:36:37 +00:00
Sebastien Pouliot 9993e4e210 2004-05-14 Sebastien Pouliot <[email protected]>
* UTF8EncodingTest.cs: Test both characters in test 2.1.4.

svn path=/trunk/mcs/; revision=27404
2004-05-14 13:33:10 +00:00
Dick Porter 1f181241c9 Shut CVS up
svn path=/trunk/mono/; revision=27403
2004-05-14 13:27:25 +00:00
Sanja Gupta 30d98c1aab ChangeLog: Update ChangeLog
TestBitmap.cs: Modified method signature to static for use in other files.
TestImageConverter.cs: Added.
TestImageFormatConverter.cs: Added.
bitmaps/almogaver24bits1.bmp: Added.

svn path=/trunk/mcs/; revision=27402
2004-05-14 13:25:38 +00:00
Zoltan Varga dbb5513138 2004-05-14 Zoltan Varga <[email protected]>
* Buffer.cs: Optimize BlockCopy.

	* Environment.cs: Bump corlib version.

svn path=/trunk/mcs/; revision=27401
2004-05-14 13:06:16 +00:00
Zoltan Varga ffadde26f7 2004-05-14 Zoltan Varga <[email protected]>
* icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.

	* appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.

	* icall.c: Optimize Buffer.BlockCopy.

svn path=/trunk/mono/; revision=27400
2004-05-14 13:04:47 +00:00
Massimiliano Mantione 29b8cc3208 Added array bounds check (ABC) removal optimization.
svn path=/trunk/mono/; revision=27399
2004-05-14 12:54:27 +00:00
Jordi Mas i Hernandez af528ec870 change for Sachin
svn path=/trunk/mcs/; revision=27398
2004-05-14 12:39:30 +00:00
Umadevi S f1e7f363b3 2004-05-14 Umadevi S ([email protected])
* OdbcParameter.cs - Added Attributes
	* OdbcParamerterConverter.cs - Added File

svn path=/trunk/mcs/; revision=27397
2004-05-14 12:35:56 +00:00
Paolo Molaro 6a2dfc589c Fri May 14 15:13:06 CEST 2004 Paolo Molaro <[email protected]>
* Makefile.am: fix make dist as well...

svn path=/trunk/mono/; revision=27396
2004-05-14 12:35:18 +00:00
Umadevi S 0e3fa8a5ff 2004-05-14 Umadevi S ([email protected])
* Updated System.Data.dll.sources - Added OdbcParameterConverter.cs

svn path=/trunk/mcs/; revision=27395
2004-05-14 12:31:23 +00:00
Umadevi S cbefdb98c2 *** empty log message ***
svn path=/trunk/mcs/; revision=27393
2004-05-14 12:11:14 +00:00
Paolo Molaro 82078d04eb Fri May 14 14:30:13 CEST 2004 Paolo Molaro <[email protected]>
* mini.c, cfold.c: fix style.

svn path=/trunk/mono/; revision=27392
2004-05-14 11:55:11 +00:00
Paolo Molaro 21005c1758 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <[email protected]>
* mini.c: handle issue with the low-level implementation of
	some long opcodes (bug #54209).

svn path=/trunk/mono/; revision=27391
2004-05-14 11:51:35 +00:00
Umadevi S 02583168f9 2004-05-14 Umadevi S ([email protected])
* OdbcCommand.cs - Added Attributes

svn path=/trunk/mcs/; revision=27390
2004-05-14 11:51:09 +00:00
Atsushi Eno 618ba6e268 2004-05-14 Atsushi Enomoto <[email protected]>
ChangeLog update was missing.

svn path=/trunk/mcs/; revision=27389
2004-05-14 11:33:40 +00:00
Atsushi Eno 88b09ce83f 2004-05-14 Atsushi Enomoto <[email protected]>
* XmlSchemaDataImporter.cs : When primary key is used more than once,
	  DataRelation borked because of empty parent column name.

svn path=/trunk/mcs/; revision=27388
2004-05-14 11:32:49 +00:00
Atsushi Eno bf13e10685 2004-05-14 Atsushi Enomoto <[email protected]>
* DataSetReadXmlSchemaTest.cs : Added test014.xsd tes (contains two
	  simple repeatable elements).

svn path=/trunk/mcs/; revision=27387
2004-05-14 11:32:01 +00:00
Atsushi Eno 9f93b9b01a 2004-05-14 Atsushi Enomoto <[email protected]>
* test014.xsd : added.

svn path=/trunk/mcs/; revision=27386
2004-05-14 11:31:09 +00:00
Umadevi S 4b4be57368 2004-05-14 Umadevi S ([email protected])
* OdbcCommand.cs - Added Attributes

svn path=/trunk/mcs/; revision=27385
2004-05-14 11:31:01 +00:00
Raja R Harinath bcba34cecc * SearchResultCollection.cs: Add a few more stubs.
* SchemaNameCollection.cs: Likewise.

svn path=/trunk/mcs/; revision=27384
2004-05-14 11:30:25 +00:00
Dick Porter ae463a57df Fix build
svn path=/trunk/mono/; revision=27382
2004-05-14 11:26:20 +00:00
Zoltan Varga ff39f88dbf 2004-05-14 Zoltan Varga <[email protected]>
* MethodBuilder.cs: Add Equals and GetHashCode.

svn path=/trunk/mcs/; revision=27380
2004-05-14 11:23:29 +00:00
Zoltan Varga 864dd2012c 2004-05-14 Zoltan Varga <[email protected]>
* Assembly.cs: Fix build.

svn path=/trunk/mcs/; revision=27379
2004-05-14 11:22:47 +00:00
Zoltan Varga 2673f7ec67 2004-05-14 Zoltan Varga <[email protected]>
* TypeBuilder.cs: Add IsSubclassOf.

svn path=/trunk/mcs/; revision=27376
2004-05-14 11:09:20 +00:00
Umadevi S 81b45cb3aa 2004-05-14 Umadevi S ([email protected])
* OdbcDataReader.cs - Added Attributes

svn path=/trunk/mcs/; revision=27374
2004-05-14 11:08:12 +00:00
Zoltan Varga 29bd12f2d6 2004-05-14 Zoltan Varga <[email protected]>
* Assembly.cs: Add stub for LoadFrom.

svn path=/trunk/mcs/; revision=27373
2004-05-14 11:06:12 +00:00
Raja R Harinath b90499d893 * DirectoryServicesPermission.cs: Fix typo.
* SchemaNameCollection.cs: Revert.  Add MonoTODO attributes.

svn path=/trunk/mcs/; revision=27372
2004-05-14 10:57:29 +00:00
Marek Safar 29e67c28b3 2004-05-14 Marek Safar <[email protected]>
* cs3008-7.cs: New test for bug #58478.

svn path=/trunk/mcs/; revision=27370
2004-05-14 10:37:41 +00:00
Umadevi S dfdbca7223 2004-05-14 Umadevi S <[email protected]>
* System.Data.dll.sources : Added OdbcCategoryAttribute.cs OdbcDescriptionAttribute.cs

svn path=/trunk/mcs/; revision=27369
2004-05-14 10:37:25 +00:00
Umadevi S bf543a48d2 004-05-14 Umadevi S ([email protected])
* Added Classes OdbcCategoryAttribute.cs, OdbcDescriptionAttribute.cs

svn path=/trunk/mcs/; revision=27368
2004-05-14 10:35:40 +00:00
Atsushi Eno 0f953d8d26 2004-05-14 Atsushi Enomoto <[email protected]>
* XmlSchemaDataImporter.cs : When Creating constraints with related
	  to DataRelation creation, also set PrimaryKey to the parent table.

svn path=/trunk/mcs/; revision=27367
2004-05-14 10:35:27 +00:00
Atsushi Eno 2f9b6ea568 2004-05-14 Atsushi Enomoto <[email protected]>
* DataSetTest.cs,
	  DataSetReadXmlTest.cs,
	  DataSetReadXmlSchemaTest.cs,
	  DataSetInferXmlSchemaTest.cs,
	  DataSetAssertion.cs : AssertDataTable() now checks Constraint count
	  and ParentKey length.

svn path=/trunk/mcs/; revision=27366
2004-05-14 10:34:26 +00:00
Massimiliano Mantione e5bdea8c56 Added array bounds check (ABC) removal optimization.
svn path=/trunk/mono/; revision=27365
2004-05-14 10:30:10 +00:00
Massimiliano Mantione 496b8a7805 Made so that conversions from pointer to int4 are no-ops on archs where pointers are 4 bytes long.
svn path=/trunk/mono/; revision=27364
2004-05-14 10:26:55 +00:00
Umadevi S 61d48e609d 2004-05-14 Umadevi S <[email protected]>
* System.Data.dll.sources : Added OdbcCommandBuilder.cs

svn path=/trunk/mcs/; revision=27363
2004-05-14 10:08:07 +00:00
Umadevi S 4eeb43ddaf 2004-05-14 Umadevi S ([email protected])
* Added Class OdbcCommandBuilder.cs

svn path=/trunk/mcs/; revision=27362
2004-05-14 10:07:10 +00:00
Raja R Harinath c4514f477c * System.DirectoryServices.dll.sources: Add
DirectoryServicesPermission{,Attribute,Entry,EntryCollection}.cs
and TODOAttribute.cs.

svn path=/trunk/mcs/; revision=27361
2004-05-14 10:04:11 +00:00
Raja R Harinath d6dc0dfa37 * DirectoryEntries.cs (SchemaFilter): New stub.
* DirectoryEntry.cs: Add missing [MonoTODO] to NotImplemented
classes.  Remove DesignerCategory attribute.
* DirectorySearcher.cs: Likewise.
* PropertyValueCollection.cs (AddRange([object[]): Don't go into
an infinite loop.
(AddRange(PropertyValueCollection)): New.
(CopyTo): New.
* ResultPropertyCollection.cs (ResultPropertyCollection): Make
internal.
(CopyTo): New.
* SchemaNameCollection.cs: Implement.
* SortOption.cs (PropertyName, Direction): Add DSDescription and
DefaultValue attributes.
* DirectoryServicesPermission.cs: New file.
* DirectoryServicesPermissionAttribute.cs: Likewise.
* DirectoryServicesPermissionEntry.cs: Likewise.
* DirectoryServicesPermissionEntryCollection.cs: Likewise.
* TODOAttribute.cs: Likewise.

svn path=/trunk/mcs/; revision=27360
2004-05-14 10:03:13 +00:00
Atsushi Eno df8f3ff537 2004-05-14 Atsushi Enomoto <[email protected]>
* XmlSchemaDataImporter.cs :
	  Design change to add indirect table and relation structures.
	  Support for "relation" annotation for local element.
	  Support for repeatable simple element column (maxOccurs > 1).
	  Fixed handling of Nested property on DataRelation (for globally
	  annotated relation, Nested is false).

svn path=/trunk/mcs/; revision=27359
2004-05-14 09:59:59 +00:00
Atsushi Eno f487e69db7 2004-05-14 Atsushi Enomoto <[email protected]>
* DataSetReadXmlSchemaTest.cs : Added tests for test012.xsd (repeatable
	  simple element) and test013.xsd (reference to global element;
	  currently failing).

svn path=/trunk/mcs/; revision=27358
2004-05-14 09:54:12 +00:00
Umadevi S 9a537330f5 2004-05-14 Umadevi S <[email protected]>
* System.Data.dll.sources : Added OdbcInfoMessageEventArgs.cs, OdbcInfoMessageEventHandler.cs

svn path=/trunk/mcs/; revision=27357
2004-05-14 09:53:18 +00:00
Umadevi S e2ab5d83c5 2004-05-14 Umadevi S ([email protected])
* Added classes OdbcInfoMessageEventArgs.cs - with stubs
        * Added classes OdbcInfoMessageEventInfo.cs

svn path=/trunk/mcs/; revision=27356
2004-05-14 09:51:06 +00:00
Atsushi Eno 52953e9c06 2004-05-14 Atsushi Enomoto <[email protected]>
* test012.xsd, test013.xsd : added.

svn path=/trunk/mcs/; revision=27355
2004-05-14 09:50:56 +00:00
Umadevi S d350c6b33f 2004-05-14 Umadevi S <[email protected]>
* System.Data.dll.sources : Added OdbcPermission.cs,OdbcPermissionAttribute.cs

svn path=/trunk/mcs/; revision=27354
2004-05-14 09:34:09 +00:00
Umadevi S 0b0d7e2355 2004-05-14 Umadevi S ([email protected])
* Added classes OdbcPermission.cs, OdbcPermissionAttribute.cs - with stubs

svn path=/trunk/mcs/; revision=27353
2004-05-14 09:32:29 +00:00
Marek Safar fd587ba8f7 2004-05-14 Marek Safar <[email protected]>
* cs3008-7.cs: New test for bug #58478.

svn path=/trunk/mcs/; revision=27352
2004-05-14 08:42:05 +00:00
Vladimir Vukicevic 8981619146 * binary_serialization_format.htm: renamed filename from having
spaces to _'s (checked with lluis)

svn path=/trunk/mcs/; revision=27351
2004-05-14 07:57:21 +00:00
Umadevi S 4e42fbd18a 2004-05-14 Umadevi S ([email protected])
* OleDbCommand.cs - Completed implementing all the attribute

svn path=/trunk/mcs/; revision=27350
2004-05-14 07:56:30 +00:00
Umadevi S 6a6f2c9260 2004-05-14 Umadevi S ([email protected])
* OleDbCommand.cs - Completed implementing all the attribute

svn path=/trunk/mcs/; revision=27349
2004-05-14 07:44:01 +00:00
Umadevi S fada37ea87 2004-05-14 Umadevi S ([email protected])
* OleDbConnection.cs - Completed implementing all the attributes
                           - Stubbed EnlistDistributedTransaction method

svn path=/trunk/mcs/; revision=27342
2004-05-14 06:30:19 +00:00
Gonzalo Paniagua Javier 10cfe84e20 Got rid of those Internal(1) warnings
svn path=/trunk/mcs/; revision=27341
2004-05-14 06:19:22 +00:00
Gonzalo Paniagua Javier 343a7a5710 2004-05-14 Gonzalo Paniagua Javier <[email protected]>
* Calendar.cs: fire OnDayRender after assigning the calendar cell text.
	Fixes bug #58097.

svn path=/trunk/mcs/; revision=27340
2004-05-14 05:41:49 +00:00
Raja R Harinath 669391d0a1 Revert unlogged unexplained changes.
(stage3): Make 'all-profiles' since the mono source tarball
carries all the net_2_0 preview dlls.

svn path=/trunk/mono/; revision=27339
2004-05-14 05:36:34 +00:00
Umadevi S 98d7031f10 2004-05-14 Umadevi S ([email protected])
* OleDbDataAdapter.cs - Completed implementing all the attributes
                           - Stubbed the Fill methods

svn path=/trunk/mcs/; revision=27338
2004-05-14 05:34:01 +00:00
Gonzalo Paniagua Javier 6724d64da3 2004-05-14 Gonzalo Paniagua Javier <[email protected]>
* culture-info-tables.h: seems like Spanish and Portuguese cultures had
	DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
	quote). Changed them to "MMMM yyyy".

svn path=/trunk/mono/; revision=27337
2004-05-14 05:21:48 +00:00
Umadevi S cdf38c8cb3 2004-05-14 Umadevi S ([email protected])
* OleDbParameter.cs - Completed implementing all the attributes

svn path=/trunk/mcs/; revision=27335
2004-05-14 04:46:17 +00:00
Atsushi Eno d1b83f96c2 2004-05-14 Atsushi Enomoto <[email protected]>
* XmlDsigC14NTransform.cs : Reverted Ingore attribute that does not
	  seem like incorrect test.

svn path=/trunk/mcs/; revision=27334
2004-05-14 04:38:11 +00:00
Atsushi Eno 4f70c8bd3e 2004-05-14 Atsushi Enomoto <[email protected]>
* Reverted xmlns change that seems my misinterpretation.

svn path=/trunk/mcs/; revision=27333
2004-05-14 04:35:59 +00:00
Gonzalo Paniagua Javier f186acc44a 2004-05-14 Gonzalo Paniagua Javier <[email protected]>
* HtmlForm.cs: default value for Enctype is "".
	* HtmlInputFile.cs: if no one set the encoding type for the HtmlForm,
	we set it to "multipart/form-data". Fixes bug #58359.

svn path=/trunk/mcs/; revision=27332
2004-05-14 04:32:32 +00:00
Atsushi Eno 46d5c0775a 2004-05-14 Atsushi Enomoto <[email protected]>
* __ComObject.cs : This class is not regarded as CLSCompliant by csc.
	  See also bug #58478.

svn path=/trunk/mcs/; revision=27331
2004-05-14 03:56:34 +00:00
Gonzalo Paniagua Javier 21eafae84c 2004-05-14 Gonzalo Paniagua Javier <[email protected]>
* System.Web.Compilation/BaseCompiler.cs: use DynamicBase for the output
	assemblies.

	* System.Web.Configuration/CompilationConfiguration.cs: a null value is
	ok for TempDirectory.

	* System.Web.Hosting/AppDomainFactory.cs: set the Dynamic base for the
	AppDomain.

	Fixes bug #57726.

svn path=/trunk/mcs/; revision=27329
2004-05-14 03:01:04 +00:00
Gonzalo Paniagua Javier db9292e4b5 2004-05-14 Gonzalo Paniagua Javier <[email protected]>
* TempFileCollection.cs: don't create a Random object on every call to
	BasePath.

svn path=/trunk/mcs/; revision=27328
2004-05-14 02:30:31 +00:00
Sanja Gupta ab1b18c6c4 ChangeLog: Updated ChangeLog.
ImageFormatConverter.cs: Implemented GetStandardValuesSupported() method.

svn path=/trunk/mcs/; revision=27327
2004-05-14 02:25:44 +00:00
Gonzalo Paniagua Javier 24bbb48eab 2004-05-14 Gonzalo Paniagua Javier <[email protected]>
* AppDomainSetup.cs: don't throw an exception if dynamic_base has not
	been set. Just return null as MS. Fixes bug #58120.

svn path=/trunk/mcs/; revision=27326
2004-05-14 01:18:45 +00:00
Gonzalo Paniagua Javier a150227a1e 2004-05-14 Gonzalo Paniagua Javier <[email protected]>
* corlib.dll.sources: removed obsolete Mono/Runtime.cs
	* corlib_test.dll.sources: added BinderTests
	* Mono: removed obsolete directory.
	* Mono/ChangeLog: Removed file.
	* Mono/Runtime.cs: Removed file.

svn path=/trunk/mcs/; revision=27325
2004-05-14 01:06:00 +00:00
Gonzalo Paniagua Javier ee18bd70ce removed extra <tr>
svn path=/trunk/mono/; revision=27324
2004-05-14 00:55:36 +00:00
Gonzalo Paniagua Javier 5c8ad0fda3 2004-05-14 Gonzalo Paniagua Javier <[email protected]>
* UrlUtils.cs: respect trailing slashes. Fixes bug #56802.

svn path=/trunk/mcs/; revision=27323
2004-05-14 00:22:16 +00:00
Gonzalo Paniagua Javier 0dfe2b3696 2004-05-14 Gonzalo Paniagua Javier <[email protected]>
* UrlUtils.cs: no more ^Ms.

svn path=/trunk/mcs/; revision=27322
2004-05-14 00:16:00 +00:00
Gonzalo Paniagua Javier ee6f7f3b36 2004-05-14 Gonzalo Paniagua Javier <[email protected]>
* Makefile: install-local is verbose now.

svn path=/trunk/mcs/; revision=27321
2004-05-14 00:11:23 +00:00
Lluis Sanchez 94ede21d42 * AggregateDictionary.cs: Moved to System.Runtime.Remoting.Channels
namespace.
	* BaseChannelObjectWithProperties.cs: format.
	* BaseChannelWithProperties.cs: Implemented.

svn path=/trunk/mcs/; revision=27319
2004-05-13 23:40:11 +00:00
Ben Maurer 8790f8eec2 move on now
svn path=/trunk/mono/; revision=27318
2004-05-13 23:34:42 +00:00
Ben Maurer 636e687442 2004-05-13 Ben Maurer <[email protected]>
* basic.cs: test for my new cmov stuff.

svn path=/trunk/mono/; revision=27317
2004-05-13 22:39:33 +00:00
Ben Maurer fa6ff5f8a9 fix build
svn path=/trunk/mono/; revision=27316
2004-05-13 22:37:52 +00:00
Miguel de Icaza 310e501c06 FixetyFix
svn path=/trunk/mcs/; revision=27315
2004-05-13 22:35:44 +00:00
Marek Safar 17b718a094 Removed useless [CLSCompliant(false)]
svn path=/trunk/mcs/; revision=27314
2004-05-13 22:28:44 +00:00
Mike Kestner 8b44340c98 add guid
svn path=/trunk/mcs/; revision=27313
2004-05-13 21:37:47 +00:00
Ben Maurer 9d5ce3c2e7 new cases for stuff I have been working on
svn path=/trunk/mono/; revision=27312
2004-05-13 21:22:39 +00:00
Mike Kestner 7c606a6af3 2004-05-13: Mike Kestner <[email protected]>
* SoapClientImportUtil.cs : add a TODO
	* SoapServerTlb.cs : stub
	* SoapServerVRoot.cs : stub
	* SoapUtility.cs : stub

svn path=/trunk/mcs/; revision=27311
2004-05-13 21:17:18 +00:00
Mike Kestner 3738551392 2004-05-13: Mike Kestner <[email protected]>
* AppDomainHelper.cs : stub
	* AssemblyLocator.cs : stub
	* ClrObjectFactory.cs : stub
	* ComManagedImportUtil.cs : stub
	* Publish.cs : stub
	* SoapClientImport.cs : stub

svn path=/trunk/mcs/; revision=27310
2004-05-13 20:42:07 +00:00
Miguel de Icaza 54bad6c8db 2004-05-13 Miguel de Icaza <[email protected]>
* driver.cs: Add -pkg handling.

svn path=/trunk/mcs/; revision=27309
2004-05-13 20:25:05 +00:00
Miguel de Icaza f85048dd21 Flush
svn path=/trunk/mono/; revision=27308
2004-05-13 20:24:49 +00:00
Mike Kestner 1fd039cf92 2004-05-13: Mike Kestner <[email protected]>
* IClrObjectFactory.cs : add guid.
	* IComManagedImportUtil.cs : add guid.
	* IComSoapPublisher.cs : add guid.
	* ISoapClientImport.cs : impl.
	* ISoapServerTlb.cs : impl.
	* ISoapServerVRoot.cs : impl.
	* ISoapUtility.cs : impl.

svn path=/trunk/mcs/; revision=27305
2004-05-13 19:10:55 +00:00
Sebastien Pouliot d2da1f5c88 2004-05-14 Sebastien Pouliot <[email protected]>
* corlib.dll.sources: Added System/__ComObject.cs to the build.

svn path=/trunk/mcs/; revision=27304
2004-05-13 19:04:02 +00:00
Sebastien Pouliot 2384356529 2004-05-13 Sebastien Pouliot <[email protected]>
* __ComObject.cs: To please corcompare (no implementation).

svn path=/trunk/mcs/; revision=27303
2004-05-13 19:02:30 +00:00
Miguel de Icaza 17d13ed41c Update
svn path=/trunk/mono/; revision=27302
2004-05-13 18:43:26 +00:00
Francisco Figueiredo Jr. 371c6fe74b 2004-05-13 Francisco Figueiredo Jr. <[email protected]>
* Npgsql/NpgsqlHashAlgorithm.cs: Changed exception type from Exception t
o InvalidOperationException when calling the Hash property and hash value is nul
l. Thanks Gonzalo Paniagua Javier <[email protected]> for catching that.

svn path=/trunk/mcs/; revision=27299
2004-05-13 18:23:17 +00:00
Francisco Figueiredo Jr. 1d152084b7 2004-05-13 Francisco Figueiredo Jr. <[email protected]>
* Npgsql/NpgsqlHashAlgorithm.cs: Changed exception type from Exception to InvalidOperationException when calling the Hash property and hash value is null. Thanks Gonzalo Paniagua Javier <[email protected]> for catching that.

svn path=/trunk/mcs/; revision=27298
2004-05-13 18:22:18 +00:00
Zoltan Varga bf4a56375a 2004-05-13 Zoltan Varga <[email protected]>
* reflection.h: Updated after changes to managed structures.

	* appdomain.c: Bump corlib version.

svn path=/trunk/mono/; revision=27297
2004-05-13 18:11:44 +00:00
Zoltan Varga e7b2e50be3 2004-05-13 Zoltan Varga <[email protected]>
* Environment.cs: Bump corlib version.

svn path=/trunk/mcs/; revision=27296
2004-05-13 18:10:09 +00:00
Zoltan Varga 3b67e9fb1e 2004-05-13 Zoltan Varga <[email protected]>
* Assembly.cs: Add ModuleResolve event.

svn path=/trunk/mcs/; revision=27295
2004-05-13 18:09:44 +00:00
Sebastien Pouliot 29ddfa3b81 2004-05-13 Sebastien Pouliot <[email protected]>
* Thread.cs: Added missing MemoryBarrier (only for 1.1) and SpinWait to please
	corcompare. Both throw a NotImplementedException.
	* ThreadPool.cs: Added missing UnsafeRegisterWaitForSingleObject methods (4
	overloads) to please corcompare. All throw a NotImplementedException.

svn path=/trunk/mcs/; revision=27293
2004-05-13 17:47:00 +00:00
Dick Porter 60f4754270 2004-05-13 Dick Porter <[email protected]>
* mono-mutex.c (mono_mutex_unlock): Return EPERM when the current
	thread doesn't own the mutex, rather than assert()ing.

svn path=/trunk/mono/; revision=27292
2004-05-13 17:37:30 +00:00
Zoltan Varga 75e24be1b9 2004-05-13 Zoltan Varga <[email protected]>
* AssemblyBuilder.cs: Make extra methods internal. mcs was changed
	to handle this a long time ago.

svn path=/trunk/mcs/; revision=27291
2004-05-13 17:37:16 +00:00
Jackson Harper d88e327260 * Makefile: default build is no longer the multi profile build. Do
build both 1.1 and 2.0 profiles use the all-profiles target.

svn path=/trunk/mcs/; revision=27290
2004-05-13 17:25:56 +00:00
Zoltan Varga 320f35b864 2004-05-13 Zoltan Varga <[email protected]>
* TypeBuilder.cs: Add IsAssignableFrom and IsInstanceOfType.

svn path=/trunk/mcs/; revision=27289
2004-05-13 17:21:16 +00:00
Zoltan Varga 6d6869d1d4 2004-05-13 Zoltan Varga <[email protected]>
* Module.cs (Mono_GetGuid): Make this internal.

svn path=/trunk/mcs/; revision=27288
2004-05-13 17:20:32 +00:00
Mike Kestner f2fd14aaa5 2004-05-13 Mike Kestner <[email protected]>
* ApplicationCrmEnabledAttribute.cs : add ComVisible.  Hide val field.
	* ClerkInfo.cs : stub
	* ClerkMonitor.cs : stub

svn path=/trunk/mcs/; revision=27287
2004-05-13 16:32:43 +00:00
Dick Porter 0937ade06a 2004-05-13 Dick Porter <[email protected]>
* UdpClient.cs:
	* TcpClient.cs: Public API fixes

svn path=/trunk/mcs/; revision=27286
2004-05-13 16:22:40 +00:00
Lluis Sanchez c75ec101a3 * SerializationTest.cs: Test serialization of empty struct arrays. This
used to fail.

svn path=/trunk/mcs/; revision=27285
2004-05-13 16:08:41 +00:00
Lluis Sanchez 9e8bde8303 * ObjectWriter.cs: Fixed and Simplified WriteGenericArray and
WriteSingleDimensionArrayElements. This also fixes bug #58345.

svn path=/trunk/mcs/; revision=27284
2004-05-13 16:05:38 +00:00
Mike Kestner fb2b8099be 2004-05-13 Mike Kestner <[email protected]>
* RegistrationHelper.cs : add Guid and 2 methods
	* RegistrationHelperTx.cs : add Guid and 2 methods
	* SynchronizationAttribute.cs : add ComVisible

svn path=/trunk/mcs/; revision=27283
2004-05-13 15:59:35 +00:00
Mike Kestner 42d846de70 2004-05-13 Mike Kestner <[email protected]>
* ContextUtil.cs : fix sigs for 2 methods
	* RegistrationConfig.cs : impl

svn path=/trunk/mcs/; revision=27282
2004-05-13 15:39:47 +00:00
Jackson Harper 22c236ffaf * CultureInfo.cs: You can access DateTimeFormat and NumberFormat
from the invariant culture.

svn path=/trunk/mcs/; revision=27281
2004-05-13 15:17:07 +00:00
Lluis Sanchez 30314b972c * XmlSerializationWriter.cs: Implemented some missing methods.
In .NET 1.0, encoded null elements use the attribute null="1", while in
	  1.1 the attribute is nil="true".
	* XmlTypeMapping.cs: Little fix for nested classes.

svn path=/trunk/mcs/; revision=27279
2004-05-13 15:09:35 +00:00
Rafael Teixeira d3b27cce9c 2004-05-13 Rafael Teixeira <[email protected]>
* Utils.cs: 
		Finally implement fully method CopyArray
		Progression: all nunit-tests for this method now pass on Mono, as they do in .NET

svn path=/trunk/mcs/; revision=27278
2004-05-13 14:55:15 +00:00
Mike Kestner 35201fe0d0 2004-05-13 Mike Kestner <[email protected]>
* EventTrackingEnabledAttribute.cs : add ComVisible
	* ExceptionClassAttribute.cs : add ComVisible
	* IISIntrinsicsAttribute.cs : add ComVisible
	* InterfaceQueuingAttribute.cs : add ComVisible
	* JustInTimeActivationAttribute.cs : add ComVisible
	* LoadBalancingSupportedAttribute.cs : add ComVisible
	* MustRunInClientContextAttribute.cs : add ComVisible
	* ObjectPoolingAttribute.cs : add ComVisible
	* PrivateComponentAttribute.cs : add ComVisible

svn path=/trunk/mcs/; revision=27277
2004-05-13 14:54:50 +00:00
Sebastien Pouliot 116797e522 2004-05-13 Sebastien Pouliot <[email protected]>
* CompressedStack.cs: Added an internal constructor so a default one
	doesn't appear with corcompare.

svn path=/trunk/mcs/; revision=27276
2004-05-13 14:47:10 +00:00
Jackson Harper ff38205e3c * CultureInfo.cs: DateTimeFormat and NumberFormat can not be
accessed for neutral cultures.

svn path=/trunk/mcs/; revision=27275
2004-05-13 14:43:05 +00:00
Sebastien Pouliot 7fcbfac84a 2004-05-13 Sebastien Pouliot <[email protected]>
* SignedXml.cs: Update TODO informations.

svn path=/trunk/mcs/; revision=27274
2004-05-13 14:36:48 +00:00
Jordi Mas i Hernandez ec2a0dd41e include tests in the process and remove not longer need it TestBitmap case
svn path=/trunk/mcs/; revision=27273
2004-05-13 14:29:54 +00:00
Jordi Mas i Hernandez ba9523ce98 bmpcodec and ImageCodec tests
svn path=/trunk/mcs/; revision=27272
2004-05-13 14:26:53 +00:00
Jordi Mas i Hernandez 76e66b730a JpegCodec Testcase
svn path=/trunk/mcs/; revision=27271
2004-05-13 14:22:47 +00:00
Atsushi Eno bb254c546c 2004-05-13 Atsushi Enomoto <[email protected]>
* XmlCanonicalizer.cs :
	  Element namespace is not XPath-selected(selectable) namespace nodes
	  and that should be outputted.
	  Don't return null for empty output.

svn path=/trunk/mcs/; revision=27270
2004-05-13 14:21:58 +00:00
Atsushi Eno 87223a0b93 2004-05-13 Atsushi Enomoto <[email protected]>
* XmlDsigBase64Transform.cs :
	  LoadInput() should retrieve all the descendants.
	  GetOutput() should handle nodes without digging into child nodes.

svn path=/trunk/mcs/; revision=27269
2004-05-13 14:19:22 +00:00
Sebastien Pouliot d81bae3ec2 2004-05-13 Sebastien Pouliot <[email protected]>
* Environement.cs: Removed two security attributes for CurrentDirectory
	that weren't documented (and anyway we don't support them).

svn path=/trunk/mcs/; revision=27268
2004-05-13 14:13:32 +00:00
Lluis Sanchez 569da76f56 Added
svn path=/trunk/mcs/; revision=27267
2004-05-13 14:04:19 +00:00
Atsushi Eno fd25fbd628 2004-05-13 Atsushi Enomoto <[email protected]>
* DataRow.cs : Added DataElement property to avoid storing every row-
	  element mapping. It stored even for nodes that should be removed.

svn path=/trunk/mcs/; revision=27266
2004-05-13 13:59:49 +00:00
Zoltan Varga 9e8399eed9 2004-05-13 Zoltan Varga <[email protected]>
* TypeBuilder.cs (ToString): Make this consistent with MS.NET.

svn path=/trunk/mcs/; revision=27265
2004-05-13 13:59:13 +00:00
Jordi Mas i Hernandez 088b3927d7 jpeg 24 bits sample
svn path=/trunk/mcs/; revision=27264
2004-05-13 13:52:53 +00:00
Patrik Torstensson cc57331140 2004-05-13 Patrik Torstensson
* mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
	opt and added peephole documentation.

svn path=/trunk/mono/; revision=27263
2004-05-13 13:52:01 +00:00
Miguel de Icaza e5a5518fe8 Update with Massi's idea
svn path=/trunk/mono/; revision=27262
2004-05-13 13:30:48 +00:00
Zoltan Varga b52b2342e9 2004-05-13 Zoltan Varga <[email protected]>
* FieldInfo.cs: Add stubs for {Get,Set}ValueDirect.

svn path=/trunk/mcs/; revision=27261
2004-05-13 13:25:50 +00:00
Zoltan Varga 91c673fd99 2004-05-13 Zoltan Varga <[email protected]>
* TypeBuilder.cs MethodBuilder.cs ConstructorBuilder.cs: Implement
	ToString ().

svn path=/trunk/mcs/; revision=27260
2004-05-13 13:10:36 +00:00
Umadevi S 131e878b75 2004-05-13 Umadevi S ([email protected])
* OleDbDataReader.cs - Stubbed HasRows method
                        - Implemented EditorBrowsableAttribute
        * OleDbParameterConverter.cs - Stubbed this class
        * OleDbParameter.cs - Added a few attributes.

svn path=/trunk/mcs/; revision=27258
2004-05-13 10:47:06 +00:00
Umadevi S 8dfa1ba968 2004-05-13 Umadevi S <[email protected]>
* System.Data.dll.sources : added OleDbParameterConverter.cs

svn path=/trunk/mcs/; revision=27257
2004-05-13 10:42:14 +00:00
Jordi Mas i Hernandez 4597d0b6d3 helper scripts to run swi tests
svn path=/trunk/mcs/; revision=27256
2004-05-13 10:34:03 +00:00
Jordi Mas i Hernandez 1b3caabcdc 32-bit bitmap sample
svn path=/trunk/mcs/; revision=27255
2004-05-13 10:21:41 +00:00
Umadevi S 894f66fc34 2004-05013 Umadevi S <[email protected]>
* System.Data.dll.sources : added RelationshipConverter.cs

svn path=/trunk/mcs/; revision=27254
2004-05-13 09:54:08 +00:00
Umadevi S ed3eafa6dd 2004-05-13 Umadevi S <[email protected]>
* RelationshipConverter.cs - Stubbed this class
        * DataRelation.cs - added TypeConveterAttribute

svn path=/trunk/mcs/; revision=27253
2004-05-13 09:52:55 +00:00
Atsushi Eno 3231b47e35 2004-05-13 Atsushi Enomoto <[email protected]>
* XmlDataDocument.cs : Removed row-element mapping. Just use new
	  DataRow.DataElement property. Added/removed some comments.

svn path=/trunk/mcs/; revision=27251
2004-05-13 09:14:46 +00:00
Lluis Sanchez fecd228e26 * System.Runtime.Remoting.dll.sources: Added:
System.Runtime.Remoting.Channels.Http/AggregateDictionary.cs,
	  System.Runtime.Remoting.Services/RemotingClientProxy.cs,
	  System.Runtime.Remoting.Services/RemotingService.cs

svn path=/trunk/mcs/; revision=27250
2004-05-13 09:13:50 +00:00
Lluis Sanchez 45b9119cdb * RemotingClientProxy.cs, RemotingService.cs: Added.
svn path=/trunk/mcs/; revision=27249
2004-05-13 09:07:24 +00:00
Lluis Sanchez 3e925dd61f * SUDSGeneratorException.cs, SUDSParserException.cs: Removed unneeded
methods and added internal constructor.
	* SdlChannelSink.cs: Fixed public constructor.
	* SdlChannelSinkProvider.cs: Added missing constructor.

svn path=/trunk/mcs/; revision=27248
2004-05-13 09:00:46 +00:00
Paolo Molaro fa36c12eaf Thu May 13 11:41:49 CEST 2004 Paolo Molaro <[email protected]>
* tramp-ppc.c: rewrote the generic trampoline code.

svn path=/trunk/mono/; revision=27247
2004-05-13 08:59:53 +00:00
Lluis Sanchez fe5721d637 * TcpChannel.cs: Made Init private.
* TcpClientTransportSink.cs, TcpClientTransportSinkProvider.cs,
	  TcpServerTransportSink.cs: Made internal.

svn path=/trunk/mcs/; revision=27246
2004-05-13 08:59:05 +00:00
Lluis Sanchez a1befbed05 * HttpChannel.cs, HttpClientChannel.cs: Added missing IDictionary
properties.
	* HttpRemotingHandler.cs: Added missing constructor.
	* HttpRemotingHandlerFactory.cs: Made ConfigureHttpChannel private.
	* HttpServerChannel.cs: Fixed IDictionary properties.

svn path=/trunk/mcs/; revision=27245
2004-05-13 08:55:28 +00:00
Lluis Sanchez 0a461a9b9c * BinaryCore.cs, SoapCore.cs: Added Properties property.
* BinaryServerFormatterSink.cs, SoapServerFormatterSink.cs: Added missing
	  TypeFilterLevel property.
	* BinaryServerFormatterSinkProvider.cs: Fixed setter for TypeFilterLevel.
	* SoapServerFormatterSinkProvider.cs: Added missing TypeFilterLevel
	  property.

svn path=/trunk/mcs/; revision=27244
2004-05-13 08:48:08 +00:00
Lluis Sanchez 6378e18dd8 AssemblyInfo.cs: Removed CLSCompliant attribute.
svn path=/trunk/mcs/; revision=27243
2004-05-13 08:43:09 +00:00
Umadevi S 606d9f626b 2004-05-13 Umadevi S <[email protected]>
* DataColumnCollection.cs - Added ResDescriptionAttribute
        * DataRelation.cs - Added TypeConverterAttribute
        * DataRelationCollection.cs - Added DefaultPropertyAttribute
        * DataRowView.cs - Added GetHashCode method with a TODO tag
        * DataSet.cs - Added DesignerAttribute
        * DataView.cs - Added DesignerAttribute
        * DataViewManager.cs - Added DesignerAttribute
        * DataViewSetting.cs - Added TypeConverterAttribute

svn path=/trunk/mcs/; revision=27241
2004-05-13 07:46:01 +00:00
Jordi Mas i Hernandez 28eafe391c make private data private
svn path=/trunk/mcs/; revision=27240
2004-05-13 07:39:14 +00:00
Atsushi Eno 37601e10f9 2004-05-13 Atsushi Enomoto <[email protected]>
* XsdValidatingReaderTests.cs : Ignore TestNamespaceFalse(). It is not
	  kind of thing that should be supported.
	* XmlValidatingReaderTests.cs : commented a bit.

svn path=/trunk/mcs/; revision=27238
2004-05-13 07:26:39 +00:00
Atsushi Eno 02fb9f05e2 2004-05-13 Atsushi Enomoto <[email protected]>
* CharacterData.cs : More don't check error message.

svn path=/trunk/mcs/; revision=27237
2004-05-13 07:24:57 +00:00
Atsushi Eno e7849a7aea 2004-05-13 Atsushi Enomoto <[email protected]>
* Document.cs : More don't check error message.

svn path=/trunk/mcs/; revision=27236
2004-05-13 07:24:38 +00:00
Atsushi Eno 7557c9c2ad 2004-05-13 Atsushi Enomoto <[email protected]>
* Text.cs : More don't check error message.

svn path=/trunk/mcs/; revision=27235
2004-05-13 07:24:17 +00:00
Atsushi Eno a30aba7e98 2004-05-13 Atsushi Enomoto <[email protected]>
* XmlSchema.cs : Removed FIXME. No PSVI required.
	* XmlSchemaAll.cs : Removed FIXME. It was not done.
	* XmlSchemaAttributeGroupRef.cs : Removed FIXME. It can be annotated.
	* XmlSchemaChoice.cs : not FIXME but LAMESPEC.
	* XmlSchemaSimpleTypeRestriction.cs : Added check for non
	  XmlSchemaFacet items on Compile(). Thus removed FIXME.
	* XmlSchemaUtil.cs : Fixed SplitList to handle sequential spaces.
	  Thus removed FIXME.
	* XmlSchemaObjectTable. cs: modified to use HybridDictionary (mostly
	  for avoiding iterator order difference).

svn path=/trunk/mcs/; revision=27232
2004-05-13 07:09:03 +00:00
Peter Dennis Bartok f9665d4497 - Fixed bug #52868, Bitmap(Image, Size) would not resize the image
svn path=/trunk/mcs/; revision=27231
2004-05-13 06:26:25 +00:00
Umadevi S 3f468f6084 2004-05-13 Umadevi S ([email protected])
* DbDataPermissionAttribute.cs - Added KeyRestrictions property with a TODO tag

svn path=/trunk/mcs/; revision=27230
2004-05-13 05:49:30 +00:00
Umadevi S d788e9aec7 2004-05-13 Umadevi S <[email protected]>
*  SqlClientPermission.cs, SqlDataReader.cs - added missing methods with TODO tags
        *  SqlCommand.cs, SqlDataAdapter.cs - implemented ToolboxItemAttribute
        *  SQLDebugging.cs - Added new file with a TODO tag

svn path=/trunk/mcs/; revision=27229
2004-05-13 05:29:56 +00:00
Sanja Gupta 21b14e727b ChangeLog: Updated ChangeLog.
GraphicsState.cs: Added internal constructor.

svn path=/trunk/mcs/; revision=27226
2004-05-13 05:19:28 +00:00
Sanja Gupta 68aa476b9c ChangeLog: Updated ChangeLog
MetafileHeader.cs: Added internal constructor.
PropertyItem.cs: Added internal constructor.

svn path=/trunk/mcs/; revision=27225
2004-05-13 05:17:42 +00:00
Atsushi Eno da650ba480 2004-05-13 Atsushi Enomoto <[email protected]>
* DefaultContext.cs : Removed MonoTODO. done.
	* Expression.cs : handle XPathResultType.Navigator in some places and
	  removed MonoTODO. Mark MonoTODO with explicit comments (though they
	  are mostly pointing out possibilities of optimization).
	  Removed extra check that depended on the old bugs.
	* XPathResultType.cs : Fixed .Navigator that had the same value as
	  .String.

svn path=/trunk/mcs/; revision=27224
2004-05-13 05:09:14 +00:00
Peter Dennis Bartok 3c2237bbe7 - Implemented GetThumbnailImage method
svn path=/trunk/mcs/; revision=27223
2004-05-13 05:07:59 +00:00
Atsushi Eno e0cfce445b 2004-05-13 Atsushi Enomoto <[email protected]>
* XmlSchemaSimpleTypeRestriction.cs : Removed MonoTODO. done.

svn path=/trunk/mcs/; revision=27222
2004-05-13 05:01:01 +00:00
Atsushi Eno c90e7f11e6 2004-05-13 Atsushi Enomoto <[email protected]>
* XmlValidatingReader.cs : explicitly mark as MonoTODO for XDR (not
	  supported).

svn path=/trunk/mcs/; revision=27221
2004-05-13 05:00:37 +00:00
Carlos Alberto Cortez dd76b32ca9 Added the --private option to monop to show private/family members
svn path=/trunk/mcs/; revision=27220
2004-05-13 03:52:53 +00:00
Gonzalo Paniagua Javier 95ed6c4c40 2004-05-13 Gonzalo Paniagua Javier <[email protected]>
* WebAsyncResult.cs: don't create the WaitHandle if not needed.

svn path=/trunk/mcs/; revision=27219
2004-05-13 03:37:35 +00:00
Sanja Gupta 4c94a3d5b8 ChangeLog: Updated ChangeLog.
Graphics.cs: Made method FromXDrawable(IntPtr, IntPtr) internal.

svn path=/trunk/mcs/; revision=27218
2004-05-13 03:36:13 +00:00
Umadevi S 1ae45ce41b 2004-05-13 Umadevi S <[email protected]>
*  Literal.cs - made class internal

svn path=/trunk/mcs/; revision=27217
2004-05-13 03:19:21 +00:00
Sanja Gupta de77cf4f59 ChangeLog: Updated ChangeLog.
Graphics.cs: Made method DrawRectangle (Pen, RectangleF) internal.

svn path=/trunk/mcs/; revision=27216
2004-05-13 03:16:37 +00:00
Sanja Gupta 02bc85cf44 ChangeLog: Updated ChangeLog.
GraphicsPath.cs: Added stub for missing method CloseFigure().

svn path=/trunk/mcs/; revision=27215
2004-05-13 03:06:41 +00:00
Sanja Gupta 460cda8266 ChangeLog: Updated ChangeLog.
Metafile.cs: Added Editor attribute to class Metafile.

svn path=/trunk/mcs/; revision=27214
2004-05-13 03:00:29 +00:00
Sanja Gupta 71f4f40e36 ChangeLog: Updated ChangeLog.
WmfPlaceablleFileHeader.cs: Removed extra property Id.

svn path=/trunk/mcs/; revision=27213
2004-05-13 02:50:09 +00:00
Gonzalo Paniagua Javier ec49116c9e 2004-05-13 Gonzalo Paniagua Javier <[email protected]>
* System.Net/HttpWebRequest.cs: added 3 missing properties for 1.1. They
	are not used yet.

	* System.Net/NetConfig.cs: added MaxResponseHeadersLength field.

	* System.Net/ServicePoint.cs:
	* System.Net/ServicePointManager.cs: added missing properties for 1.1.

	* System.Net.Configuration/NetConfigurationHandler.cs: process the
	httpWebRequest node too. Better error checking.

svn path=/trunk/mcs/; revision=27211
2004-05-13 02:26:55 +00:00
Gonzalo Paniagua Javier 21a0b91547 Removed Consoles and ^Ms
svn path=/trunk/mcs/; revision=27210
2004-05-13 02:13:57 +00:00
Gonzalo Paniagua Javier ce62c7590a Removed Consoles and ^Ms
svn path=/trunk/mcs/; revision=27209
2004-05-13 02:05:19 +00:00
Sebastien Pouliot fceba28ede 2004-05-12 Sebastien Pouliot <[email protected]>
* IsolatedStorage.cs: More details on MonoTODO. Throw exceptions on
	AssemblyIdentity and DomainIdentity properties.
	* IsolatedStorageFile.cs: More details on MonoTODO.
	* IsolatedStorageFileStream.cs: Removed MonoTODO on class. Now use
	Path.Combine to build filenames (constructor) and throw an exception
	when we try to get the handle (as documented).

svn path=/trunk/mcs/; revision=27208
2004-05-13 01:32:30 +00:00
Gonzalo Paniagua Javier ad9ebfec30 2004-05-13 Gonzalo Paniagua Javier <[email protected]>
* util.c: use the W version of the function. With this, 'make test'
	works now on windows.

svn path=/trunk/mono/; revision=27207
2004-05-13 01:20:31 +00:00
Miguel de Icaza 9ac72b51b6 Fix potential leak
svn path=/trunk/mono/; revision=27205
2004-05-13 00:32:52 +00:00
Gonzalo Paniagua Javier 724a9774ef 2004-05-13 Gonzalo Paniagua Javier <[email protected]>
* RegistrationHelper.cs: fixed the build on windows. I will file a bug
	report on mcs for this.

svn path=/trunk/mcs/; revision=27204
2004-05-13 00:32:08 +00:00
Gonzalo Paniagua Javier ea8b58bba8 Cscompmgd -> cscompmgd
svn path=/trunk/mono/; revision=27203
2004-05-13 00:25:09 +00:00
Miguel de Icaza d6766f8afa NetBSD GC patches from [email protected]
svn path=/trunk/mono/; revision=27202
2004-05-13 00:23:34 +00:00
Gonzalo Paniagua Javier b5bd323e56 update win. installer
svn path=/trunk/mono/; revision=27201
2004-05-13 00:14:09 +00:00
Gonzalo Paniagua Javier c6406894fb 2004-05-13 Gonzalo Paniagua Javier <[email protected]>
* corlib_test.dll.sources: added BinderTests.cs
	* System.Reflection/Binder.cs: check for ambiguous matches in
	SelectMethod and SelectProperty. Fixes bug #58381
	* Test/System.Reflection/BinderTests.cs: New file.

svn path=/trunk/mcs/; revision=27199
2004-05-12 23:44:10 +00:00
Mike Kestner 326a50c995 2004-05-12 Mike Kestner <[email protected]>
* ApplicationAccessControlAttribute.cs : Add ComVisible and
	s/Impersonation/ImpersonationLevel.
	* ApplicationActivationAttribute.cs : Add ComVisible
	* ApplicationIDAttribute.cs : Add ComVisible
	* ApplicationNameAttribute.cs : Add ComVisible
	* ApplicationQueuingAttribute.cs : Add ComVisible
	* AutoCompleteAttribute.cs : Add ComVisible
	* ComponentAccessControlAttribute.cs : Add ComVisible and remove
	set_Value.
	* COMTIIntrinsicsAttribute.cs : Add ComVisible and remove set_Value.
	* ConstructionEnabledAttribute.cs : Add ComVisible, add Enabled, and
	remove set_Value.
	* DescriptionAttribute.cs : Add ComVisible
	* EventClassAttribute.cs : Add ComVisible and s/InProc/Inproc.
	* SecureMethodAttribute.cs : Add ComVisible
	* SecurityRoleAttribute.cs : Add ComVisible
	* ServicedComponentException.cs : Add ComVisible

svn path=/trunk/mcs/; revision=27197
2004-05-12 20:56:54 +00:00
Atsushi Eno 9ca9de3f91 2004-05-12 Atsushi Enomoto <[email protected]>
* DataRow.cs : Added XmlDataElement initialization code.

svn path=/trunk/mcs/; revision=27196
2004-05-12 20:17:19 +00:00
Mike Kestner 8888648072 2004-05-12 Mike Kestner <[email protected]>
* BOID.cs : add ComVisible attr.
	* ServiceDomain.cs : impl
	* SynchronizationAttribute.cs : add ComVisible attr
	* TransactionAttribute.cs : add ComVisible attr
	* XACTRRANSINFO.cs : add ComVisible attr.

svn path=/trunk/mcs/; revision=27195
2004-05-12 20:10:45 +00:00
Atsushi Eno c62a359a03 2004-05-12 Atsushi Enomoto <[email protected]>
* XmlDataDocument.cs : Radical design change.
	  - GetElementFromRow() must return "detached" element, even if it is
	    not added to table's Rows.
	  - Introduced XmlDataElement class to map element (this class itself)
	    and DataRow _always_ . It is impossible to map *all* DataRows
	    to/from elements only in XmlDataDocument API, since DataRow can
	    be created separate from it (i.e. by table.NewRow()).
	  - Removed unreliable GetElementsByTagName() dependency from most
	    of the code, since users might create elements that has the same
	    name of any tables (that is possible especially unmapped elements).
	  - Adding/Removing delegates on every event action is unnecessary.
	    Use just flags.
	  - For Load(), just using base.Load() will do most of the job.
	  - Attributes and SimpleContents are not handled properly.

	  "Removed" and "Rollback" events are still TODO.

svn path=/trunk/mcs/; revision=27194
2004-05-12 20:09:51 +00:00
Atsushi Eno 8d885b0916 2004-05-12 Atsushi Enomoto <[email protected]>
* XmlDataDocumentTest.cs : use Environment.NewLine. Added more tests.
	* XmlDataDocumentTest2.cs : Test nested relationship, detached row
	  state, and unmapped element as well.

svn path=/trunk/mcs/; revision=27192
2004-05-12 19:51:34 +00:00
Mike Kestner f4237d2357 2004-05-12 Mike Kestner <[email protected]>
* TransactionStatus.cs : impl

svn path=/trunk/mcs/; revision=27191
2004-05-12 19:49:21 +00:00
Dick Porter 6e830e4bb8 2004-05-12 Dick Porter <[email protected]>
* Uri.cs: Reduce(string) is not in the public API.

svn path=/trunk/mcs/; revision=27190
2004-05-12 19:34:24 +00:00
Dick Porter 3cf2eef79b Unbreak the build
svn path=/trunk/mcs/; revision=27189
2004-05-12 19:22:39 +00:00
Miguel de Icaza 1bb57f6eda update
svn path=/trunk/mcs/; revision=27188
2004-05-12 19:21:15 +00:00
Mike Kestner f345a3e920 2004-05-12 Mike Kestner <[email protected]>
* Activity.cs : stub
	* BindingOption.cs : impl
	* InheritanceOption.cs : impl
	* PartitionOption.cs : impl
	* ServiceConfig.cs : stub
	* SxsOption.cs : impl
	* ThreadPoolOption.cs : impl

svn path=/trunk/mcs/; revision=27187
2004-05-12 19:14:35 +00:00
Lluis Sanchez 797c6414c2 * LogicalMethodInfo.cs: Made EnableSession property internal.
svn path=/trunk/mcs/; revision=27186
2004-05-12 19:07:08 +00:00
Lluis Sanchez 9e13c4ccdb * SoapBinding.cs: Added missing attributes. The class is not sealed.
* SoapBodyBinding.cs: Removed unneeded attributes.

svn path=/trunk/mcs/; revision=27185
2004-05-12 19:03:56 +00:00
Dick Porter 27f8a98046 2004-05-12 Dick Porter <[email protected]>
* regex.cs:
	* quicksearch.cs:
	* RegexRunnerFactory.cs:
	* RegexRunner.cs: More public API difference fixes.

svn path=/trunk/mcs/; revision=27184
2004-05-12 19:03:21 +00:00
Mike Kestner 392101edcd 2004-05-12 Mike Kestner <[email protected]>
* IAsyncErrorNotify.cs : oops, should be public
	* IProcessInitComponent.cs : ditto
	* IProcessInitializer.cs : ditto
	* IServiceCall.cs : ditto

svn path=/trunk/mcs/; revision=27181
2004-05-12 18:09:06 +00:00
Sebastien Pouliot 7af6a24eee 2004-05-12 Jaroslaw Kowalski <[email protected]>
* AuthenticationConfigHandler.cs: fixed slidingExpiration and requireSSL

svn path=/trunk/mcs/; revision=27180
2004-05-12 18:04:18 +00:00
Mike Kestner 80b18a2796 2004-05-12 Mike Kestner <[email protected]>
* System.EnterpriseServices.dll.sources: Added new interface files.

2004-05-12  Mike Kestner <[email protected]>

	* IAsyncErrorNotify.cs : implement new 1.1 iface.
	* IPlaybackControl.cs : implement new 1.1 iface.
	* IProcessInitComponent.cs : implement new 1.1 iface.
	* IProcessInitializer.cs : implement new 1.1 iface.
	* IRegistrationHelper.cs : add GUID, fix some param passing.
	* IRemoteDispatch.cs : add GUID
	* IServiceCall.cs : implement new 1.1 iface.
	* IServicedComponentInfo.cs : add GUID
	* ITransaction.cs : add GUID

svn path=/trunk/mcs/; revision=27179
2004-05-12 17:56:00 +00:00
Jordi Mas i Hernandez 1f5c87144a remove added extra dc
svn path=/trunk/mcs/; revision=27177
2004-05-12 16:30:30 +00:00
Miguel de Icaza c9457beb06 flush
svn path=/trunk/mono/; revision=27176
2004-05-12 16:23:00 +00:00
Dick Porter d500d05763 2004-05-12 Dick Porter <[email protected]>
* GroupCollection.cs:
	* MatchCollection.cs:
	* CaptureCollection.cs: Moved GroupCollection, MatchCollection and
	CaptureCollection so that they no longer inherit from the
	non-standard RegexCollectionBase class.  Fixes the API difference.

svn path=/trunk/mcs/; revision=27175
2004-05-12 16:10:07 +00:00
Zoltan Varga 8c6aacbdfd 2004-05-12 Zoltan Varga <[email protected]>
* corlib.dll.sources: Added System.Threading/CompressedStack.cs

svn path=/trunk/mcs/; revision=27174
2004-05-12 16:01:04 +00:00
Zoltan Varga e21949fa8e 2004-05-12 Zoltan Varga <[email protected]>
* CompressedStack.cs: New file.

svn path=/trunk/mcs/; revision=27173
2004-05-12 16:00:10 +00:00
Miguel de Icaza ddd1fba375 Mhm
svn path=/trunk/mono/; revision=27172
2004-05-12 15:44:18 +00:00
Miguel de Icaza 428676040b Update
svn path=/trunk/mono/; revision=27171
2004-05-12 15:43:27 +00:00
Atsushi Eno e0b51a10ce 2004-05-12 Atsushi Enomoto <[email protected]>
* Makefile : added remoting.dll and enterprisesvc.dll.

svn path=/trunk/mono/; revision=27170
2004-05-12 15:40:33 +00:00
Miguel de Icaza 7b1d3ff919 Flush
svn path=/trunk/mono/; revision=27169
2004-05-12 14:30:51 +00:00
Lluis Sanchez de7bdac611 * HttpSimpleWebServiceHandler.cs: Added GetRequestMethod(), which is used
by the handler factory to check if the target method needs session or not.
	  Also factorized error handling in WriteError().
	* HttpSoapWebServiceHandler.cs: Added GetRequestMethod(), for the same
	  reason. Assign the context to the WebService just before invoking the
	  method.
	* SoapHttpClientProtocol.cs: Use helper method to create the xml writer.
	* WebServiceHandler.cs: Added virtual GetRequestMethod().
	* WebServiceHandlerFactory.cs: Use an http handler wrapper when the target
	  method requires session support.
	* WebServiceHelper.cs: Added some helper methods.

svn path=/trunk/mcs/; revision=27168
2004-05-12 14:25:07 +00:00
Lluis Sanchez 42e925fd3a * WebService.cs: Take the session from the context.
svn path=/trunk/mcs/; revision=27167
2004-05-12 14:22:09 +00:00
Sebastien Pouliot 0a2dad82d7 2004-05-12 Jesper Pedersen <[email protected]>
* PKCS12.cs: Removed file exists check from SaveToFile(). Removed
	Equals() and GetHashCode(). Clone the original iteration count.

svn path=/trunk/mcs/; revision=27166
2004-05-12 14:21:25 +00:00
Lluis Sanchez 38c5d018ae * Makefile: Added reference to System.Data.
* services.xml, wsdl.ignore: Updated.
	* wstest.cs: Small improvements.
	* external/BankCodeEJBHomeTest.cs, external/GlobalWeatherTest.cs,
	  external/HPcatalogTest.cs, external/IODCODESPOSTAUXTest.cs,
	  external/TemperatureServiceTest.cs, localhost/ConvDocEncBarTest.cs,
	  localhost/ConvDocEncWraTest.cs, localhost/ConvDocLitBarTest.cs,
	  localhost/ConvDocLitWraTest.cs, localhost/ConvRpcTest.cs
	  Changed namespace to make it easier to select tests in gnunit.
	* localhost/ConvRpcTest.cs: Added test for method that returns "Object".
	* server/ConvDocEncWra.asmx, ConvDocLitWra.asmx, ConvRpc.asmx: New test
	  methods.
	* server/web.config: Added version to vsdisco handler type name.
	* client/localhost/DataServiceTest.cs
	  client/localhost/DuplicateArrayTestTest.cs
	  client/localhost/SessionCounterTest.cs
	  server/DataService.asmx
	  server/DuplicateArrayTest.asmx
	  server/SessionCounter.asmx: New tests.

svn path=/trunk/mcs/; revision=27165
2004-05-12 14:20:47 +00:00
Jordi Mas i Hernandez c8f6299f1b API compatibility changes
svn path=/trunk/mcs/; revision=27164
2004-05-12 13:05:28 +00:00
Ravindra 35e735ec48 * Bitmap.cs, Font.cs, FontConverter.cs, Graphics.cs, Icon.cs, Image.cs
ImageAnimator.cs, Point.cs, PointF.cs, Rectangle.cs, RectangleF.cs
	Region.cs, Size.cs, SizeF.cs, ToolboxBitmapAttribute.cs, gdipFunctions.cs:
	Added missing attributes and some coding style fixes.
	* Pen.cs: Implementing CustomStartCap and CustomEndCap properties and
	some fixes.

svn path=/trunk/mcs/; revision=27163
2004-05-12 12:33:36 +00:00
Jordi Mas i Hernandez 34661a2fac fixes typos
svn path=/trunk/mcs/; revision=27160
2004-05-12 11:44:44 +00:00
Jordi Mas i Hernandez 9269cfde45 fixes class name definition typo
svn path=/trunk/mcs/; revision=27159
2004-05-12 11:34:37 +00:00
Jordi Mas i Hernandez c7c5623c28 LockBitmap tests for different pixel formats
svn path=/trunk/mcs/; revision=27157
2004-05-12 11:07:16 +00:00
Sebastien Pouliot e9aab56cdf 2004-05-12 Sebastien Pouliot <[email protected]>
* AssemblyInfo.cs: Reduce extra/missing in corcompare (again).

svn path=/trunk/mcs/; revision=27156
2004-05-12 10:54:58 +00:00
Umadevi S e072df5639 2004-05-12 Umadevi S <[email protected]>
* Expression.cs, Functions.cs, In.cs, Like.cs, Parser.jay, StringFunctions.cs - made class/enum/interfaces internal

svn path=/trunk/mcs/; revision=27155
2004-05-12 10:48:10 +00:00
Umadevi S 88c950c9cc 2004-05-12 Umadevi S <[email protected]>
* BooleanExpression.cs,ColumnReference.cs, Comparison.cs - made class/enum internal

svn path=/trunk/mcs/; revision=27154
2004-05-12 10:30:48 +00:00
Umadevi S 810d737cda 2004-05-12 Umadevi S <[email protected]>
* ArithmeticExpression.cs - made class internal

svn path=/trunk/mcs/; revision=27153
2004-05-12 10:22:10 +00:00
Umadevi S e00a913152 2004-05-12 Umadevi S <[email protected]>
* Aggregation.cs - made Class/enum internal

svn path=/trunk/mcs/; revision=27152
2004-05-12 10:17:06 +00:00
Atsushi Eno 20efd1a861 2004-05-12 Atsushi Enomoto <[email protected]>
* Parser.jay : made class internal.

svn path=/trunk/mcs/; revision=27151
2004-05-12 09:13:26 +00:00
Atsushi Eno 848a8c8c44 2004-05-12 Atsushi Enomoto <[email protected]>
* BuiltInDatatype.cs : made classes/enums internal.

svn path=/trunk/mcs/; revision=27150
2004-05-12 09:12:13 +00:00
Atsushi Eno 4190429496 2004-05-12 Atsushi Enomoto <[email protected]>
* DTDObjectModel.cs,
	  DTDReader.cs,
	  XmlDocument.cs,
	  XmlInputStream.cs,
	  XmlParserInput.cs,
	  XmlTextReader.cs,
	  XmlUrlResolver.cs : removed reference to Mono.Xml.
	  Made Mono.Xml.* classes internal.
	* XmlDocument.cs : output xml declaration for TextWriter output in Save()
	* XmlElement.cs : Name character check should be done in .ctor().
	* XmlNamespaceManager.cs : Removed dangerous internal .ctor()

svn path=/trunk/mcs/; revision=27149
2004-05-12 09:11:19 +00:00
Atsushi Eno 8710d9f877 2004-05-12 Atsushi Enomoto <[email protected]>
* XslNumber.cs : made enum internal

svn path=/trunk/mcs/; revision=27148
2004-05-12 09:05:06 +00:00
Atsushi Eno 6447b67d6f 2004-05-12 Atsushi Enomoto <[email protected]>
* XmlOutputter.cs,
	  XslOutput.cs,
	  XslStylesheet.cs : made classes/enums internal.

svn path=/trunk/mcs/; revision=27147
2004-05-12 09:04:23 +00:00
Atsushi Eno c42df60f9e 2004-05-12 Atsushi Enomoto <[email protected]>
* Pattern.cs : made class internal.

svn path=/trunk/mcs/; revision=27146
2004-05-12 09:02:44 +00:00
Nick Drochak fc9998d952 2004-05-12 Nick Drochak <[email protected]>
* PKCS12Test.cs: Do not exceed line length limit.

svn path=/trunk/mcs/; revision=27145
2004-05-12 06:42:48 +00:00
Gonzalo Paniagua Javier b36aa24e62 2004-05-12 Gonzalo Paniagua Javier <[email protected]>
* System.Web.dll.sources: added Html32TextWriter.

	* System.Web.Compilation/AspGenerator.cs: ObjectTagBuilder do not
	override HasBody now.

	* System.Web.UI/Html32TextWriter.cs: stub contributed by Matthijs ter
	Woord [meddochat].

	* System.Web.UI/ObjectTagBuilder.cs: remove the HasBody override as MS
	does not have that.

	This makes System.Web free of errors, missing or extra stuff in the
	class status pages.

svn path=/trunk/mcs/; revision=27144
2004-05-12 06:40:13 +00:00
Marek Safar 92759cb93e 2004-05-12 Marek Safar <[email protected]>
* attribute.cs:
	(Attribute.GetAttributeTargets): New method. Gets AttributeTargets
	for attribute.
	(Attribute.IsClsCompliaceRequired): Moved to base for better
	accesibility.
	(Attribute.UsageAttribute): New property for AttributeUsageAttribute
	when attribute is AttributeUsageAttribute.
	(Attribute.GetValidTargets): Simplified.
	(Attribute.GetAttributeUsage): New method returns AttributeUsage
	attribute for this type.
	(Attribute.ApplyAttributes): Method renamed to Emit and make
	non-static.
	(GlobalAttributeSection): New class for special handling of global
	attributes (assembly, module).
	(AttributeSection.Emit): New method.

	* class.cs: Implemented Attributable abstract methods.
	(MethodCore.LabelParameters): Moved to Parameter class.
	(Accessor): Is back simple class.
	(PropertyMethod): Implemented Attributable abstract class.
	(DelegateMethod): Implemented Attributable abstract class.
	(Event): New constructor for disctintion between normal Event
	and Event with accessors.

	* cs-parser.jay: Used new Event ctor and GlobalAttributeSection.

	* codegen.cs, const.cs, decl.cs, delegate.cs:
	(CommonAssemblyModulClass): Implemented Attributable abstract class
	and simplified.

	* enum.cs: Implement IAttributeSupport interface.
	(EnumMember): New class for emum members. Implemented Attributable
	abstract class

	* parameter.cs:
	(ParameterBase): Is abstract.
	(ReturnParameter): New class for easier [return:] attribute handling.

	* typemanager.cs: Removed builder_to_attr.

svn path=/trunk/mcs/; revision=27143
2004-05-12 06:36:15 +00:00
Gonzalo Paniagua Javier a85c5aeb59 lazy Canadians... ;-)
svn path=/trunk/mcs/; revision=27142
2004-05-12 05:22:19 +00:00
Gonzalo Paniagua Javier 8e05172278 Don't try 2.0 on windows. It does not built yet.
svn path=/trunk/mono/; revision=27141
2004-05-12 05:12:14 +00:00
Gonzalo Paniagua Javier 926e37a2d6 Added cleanassemblies target to remove all dlls and exes
svn path=/trunk/mono/; revision=27140
2004-05-12 05:11:14 +00:00
Atsushi Eno b461488ea1 2004-05-12 Atsushi Enomoto <[email protected]>
* Makefile : added vb.dll

svn path=/trunk/mono/; revision=27139
2004-05-12 05:05:05 +00:00
Gonzalo Paniagua Javier bf7344774a 2004-05-12 Gonzalo Paniagua Javier <[email protected]>
* Makefile.am: also add libmonoos to libmetadata. Fixes the build on
	windows.

svn path=/trunk/mono/; revision=27138
2004-05-12 05:02:11 +00:00
Gonzalo Paniagua Javier d453f6336b 2004-05-12 Gonzalo Paniagua Javier <[email protected]>
* Makefile: disable net_2_0 on windows. It doesn't build. Don't
	try to build net_1_0 and net_2_0 if we provide a PROFILE=xxx in the
	command line.

svn path=/trunk/mcs/; revision=27137
2004-05-12 04:51:03 +00:00
Gonzalo Paniagua Javier f13c127b3c Version
svn path=/trunk/mcs/; revision=27136
2004-05-12 04:42:56 +00:00
Miguel de Icaza e037b59a7e Gone
svn path=/trunk/mono/; revision=27135
2004-05-12 03:01:09 +00:00
Gonzalo Paniagua Javier 1a952799be 2004-05-12 Gonzalo Paniagua Javier <[email protected]>
* metadata/Makefile.am: link to ../os/libmonoos.la on windows.

	* metadata/assembly.c:
		-If MONO_DEBUG, warn about non-existing directories in
		MONO_PATH.
		-Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
		compile time variable.
		-Removed init_default_path and call mono_set_rootdir from
		libmonoos.a instead (windows only).

	* metadata/assembly.h: declare mono_assembly_getrootdir().

	* metadata/domain.c:
	* metadata/icall.c: use mono_assembly_getrootdir() instead of
	MONO_ASSEMBLIES.

	* metadata/loader.c: s/getenv/g_getenv/
	* os/win32/util.c: the path from GetModuleFileName is UTF-16.

svn path=/trunk/mono/; revision=27134
2004-05-12 01:58:21 +00:00
Patrik Torstensson 26c93c9487 2004-05-11 Patrik Torstensson
* mini-x86.c: optimize long shl/shr asm code (one less branch)

svn path=/trunk/mono/; revision=27133
2004-05-11 21:00:44 +00:00
Zoltan Varga f2b868665f 2004-05-11 Zoltan Varga <[email protected]>
* Makefile.am (EXTRA_DIST): Distribute benchmarks as well.

svn path=/trunk/mono/; revision=27131
2004-05-11 19:13:30 +00:00
Zoltan Varga a8be2bfb51 2004-05-11 Zoltan Varga <[email protected]>
* basic.cs basic-long.cs objects.cs: Make these compile under MS csc.

svn path=/trunk/mono/; revision=27130
2004-05-11 19:04:37 +00:00
Zoltan Varga fe50dc6d3d 2004-05-11 Zoltan Varga <[email protected]>
* mini.h mini.c dominators.c: Applied patch from David Waite
	([email protected]): Fix memory leaks in loop optimizations.

svn path=/trunk/mono/; revision=27129
2004-05-11 18:37:50 +00:00
Jackson Harper d5cc4c8b33 * Makefile: Preserve MONO_PATH
svn path=/trunk/mcs/; revision=27128
2004-05-11 18:16:22 +00:00
Jackson Harper dbe9cb30b2 * Makefile: Use snazzy new PLATFORM_PATH_SEPARATOR when setting
the mono path, so it works on Windows.

svn path=/trunk/mcs/; revision=27127
2004-05-11 18:13:00 +00:00
Jackson Harper 9ceb42d7df * platforms/linux.make:
* platforms/win32.make: Define a PLATFORM_PATH_SEPARATOR used for
	separating paths in env vars. (ie MONO_PATH).
	* profiles/net_2_0.make: Always use gmcs for building the 2.0
	libraries. corlib is the first lib built and it will build
        gmcs.

svn path=/trunk/mcs/; revision=27126
2004-05-11 18:05:18 +00:00
Mike Shaver aac5b8d645 update link to Jim Miller's patent message
svn path=/trunk/mono/; revision=27125
2004-05-11 17:27:41 +00:00
Zoltan Varga efa9f9669b 2004-05-11 Zoltan Varga <[email protected]>
* pinvoke2.cs libtest.c: Add tests for AsAny marshalling.

svn path=/trunk/mono/; revision=27124
2004-05-11 17:23:17 +00:00
Zoltan Varga aa60db9b32 2004-05-11 Zoltan Varga <[email protected]>
* mini.c: Add new icalls for AsAny marshalling.

svn path=/trunk/mono/; revision=27123
2004-05-11 17:22:14 +00:00
Zoltan Varga 7c41c5c623 2004-05-11 Zoltan Varga <[email protected]>
* marshal.{h,c}: Add support for UnmanagedType.AsAny.

	* marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.

	* metadata.h: Add new marshalling conversions.

	* metadata.h metadata.c (mono_metadata_signature_dup): New helper function.

svn path=/trunk/mono/; revision=27122
2004-05-11 17:20:07 +00:00
Zoltan Varga becfd57d95 2004-05-11 Zoltan Varga <[email protected]>
* opcode.def: Add mono_func2.

svn path=/trunk/mono/; revision=27121
2004-05-11 17:17:49 +00:00
Andreas N 6efca4fe71 2004-05-11 Andreas Nahr <[email protected]>
* Char.cs: Fix exceptions

svn path=/trunk/mcs/; revision=27120
2004-05-11 17:05:25 +00:00
Andreas N 6a8c196ae4 2004-05-11 Andreas Nahr <[email protected]>
* OpCodes.cs: Refactored to avoid the static constructor

svn path=/trunk/mcs/; revision=27119
2004-05-11 17:03:52 +00:00
Miguel de Icaza 91b5710fc0 flush
svn path=/trunk/mono/; revision=27118
2004-05-11 16:46:40 +00:00
Carlos Guzmán Álvarez 6f94dbbcef 2004-05-11 Carlos Guzman Alvarez <[email protected]>
* Mono.Security.Protocol.Tls.Handshake.Client/TlsServerCertificate.cs:

		- Added fix for better handling of exceptions when
		building the X509 Certificate chain.

svn path=/trunk/mcs/; revision=27117
2004-05-11 16:41:59 +00:00
Jackson Harper 8ac8a83197 * Makefile: Use mono and mcs to build gmcs
svn path=/trunk/mcs/; revision=27116
2004-05-11 16:37:34 +00:00
Gonzalo Paniagua Javier ec3393747f 2004-05-11 Gonzalo Paniagua Javier <[email protected]>
* Timer.cs: if AutoReset, disable the timer before adding the callback
	to the ThreadPool. Patch by Tim Fries <[email protected]>. Fixes bug
	#57993.

svn path=/trunk/mcs/; revision=27114
2004-05-11 16:06:42 +00:00
Jackson Harper 10ae4cb6c5 * runtime/net_1_1/Makefile.am:
* runtime/net_2_0/Makefile.am: cscompmgd.dll is lowercase now.

svn path=/trunk/mono/; revision=27113
2004-05-11 15:35:55 +00:00
Jackson Harper 718ee3cecb * Makefile: Specify correct lowercase assembly name.
svn path=/trunk/mcs/; revision=27112
2004-05-11 15:17:50 +00:00
Atsushi Eno c2a8e95ef6 2004-05-11 Atsushi Enomoto <[email protected]>
* XmlDataInferenceLoader.cs :
	  It now requires XmlDocument as input.  Improved identification of
	  DataSet element.  Removed extra lines.
	  Moved boresome design notes to bottom of the source and
	  added standalone runnable driver (not included on build).
	* DataSet.cs :
	  Update with related to the change above.
	  WriteXml() should call Flush() after writing. This fixes bug #58327.
	* XmlSchemaDataImporter.cs :
	  Improved indentification of DataSet element.

svn path=/trunk/mcs/; revision=27111
2004-05-11 15:16:29 +00:00
Jackson Harper f7313d5ae6 * library.make: Allow assembly names to be different then their
.sources file names.

svn path=/trunk/mcs/; revision=27110
2004-05-11 15:13:51 +00:00
Atsushi Eno f53afd3f14 2004-05-11 Atsushi Enomoto <[email protected]>
* DataSetTest.cs : Added WriteXmlToStream().

svn path=/trunk/mcs/; revision=27109
2004-05-11 15:12:23 +00:00
Paolo Molaro 1d18ae81bd Tue May 11 16:00:38 CEST 2004 Paolo Molaro <[email protected]>
* tramp-ppc.c, mini-ppc.c: more cleanups.

svn path=/trunk/mono/; revision=27104
2004-05-11 13:51:39 +00:00
Lluis Sanchez dc510f2bc5 * MethodResponse.cs: Only get the MethodBase from type and method name when
requested.

svn path=/trunk/mcs/; revision=27102
2004-05-11 13:36:05 +00:00
Lluis Sanchez 96b8f0bb74 * ChannelServices.cs: Configure delayed load channels when a chanel lookup
fails.

svn path=/trunk/mcs/; revision=27101
2004-05-11 13:25:21 +00:00
Lluis Sanchez 421c46d503 * RemotingConfiguration.cs: Added method for configuring chanels with the
delayed client load flag. Added locks for accessing internal tables.

svn path=/trunk/mcs/; revision=27100
2004-05-11 13:22:03 +00:00
Lluis Sanchez 9dd73226eb * ChannelCore.cs: Use LoadWithPartialName when configuration information
is not present.

svn path=/trunk/mcs/; revision=27099
2004-05-11 13:19:02 +00:00
Sanja Gupta eae0449500 ImageAnimator.cs: Fixed compilation problem which crept in 'cos of my carelessness.
svn path=/trunk/mcs/; revision=27098
2004-05-11 13:04:23 +00:00
Dick Porter 71b932b3a4 2004-05-11 Dick Porter <[email protected]>
* shared.c (_wapi_shm_attach): Cope when a previous daemon startup
	attempt failed, leaving shared files that look like a daemon is
	still starting.

svn path=/trunk/mono/; revision=27097
2004-05-11 13:02:27 +00:00
Sanja Gupta 556182dbf6 ChangeLog: Updated ChangeLog
ImageAnimator.cs: Implemented first version. UNTESTED

svn path=/trunk/mcs/; revision=27096
2004-05-11 13:01:53 +00:00
Sebastien Pouliot 5330821009 2004-05-11 Jesper Pedersen <[email protected]>
* PKCS12Test.cs: Added unit tests for the new methods.

svn path=/trunk/mcs/; revision=27094
2004-05-11 12:47:58 +00:00
Gonzalo Paniagua Javier c43de4b511 2004-05-11 Gonzalo Paniagua Javier <[email protected]>
* mini.c: no warnings.

svn path=/trunk/mono/; revision=27093
2004-05-11 12:29:45 +00:00
Gonzalo Paniagua Javier 28e68025c2 2004-05-11 Gonzalo Paniagua Javier <[email protected]>
* SoapDocumentationHandler.cs: added internal property to get the page
	handler when available.

	* WebServiceHandlerFactory.cs: wrap the documentation handler in a class
	that implements IRequiresSessionState and, if requested,
	IReadOnlySessionState, so that we can use Sesion object in the default
	WSDL help generator.

svn path=/trunk/mcs/; revision=27092
2004-05-11 12:18:20 +00:00
Zoltan Varga 0f128ab73f 2004-05-11 Zoltan Varga <[email protected]>
* reflection.c (mono_reflection_get_type): Lookup the type in all
	modules of a multi-module assembly. Fixes #58291.

svn path=/trunk/mono/; revision=27091
2004-05-11 11:48:31 +00:00
Sebastien Pouliot 79f1909e01 2004-05-11 Sebastien Pouliot <[email protected]>
* Mono.Security_test.dll.sources: Added unit tests for Mono.Security.
	Protocol.Ntlm.MessabeBase and Mono.Security.ASN1Convert.

svn path=/trunk/mcs/; revision=27090
2004-05-11 11:37:30 +00:00
Paolo Molaro b43fb4927f Tue May 11 13:59:28 CEST 2004 Paolo Molaro <[email protected]>
* mini-ppc.c, mini.c: use mono_resolve_patch_target ().

svn path=/trunk/mono/; revision=27089
2004-05-11 11:35:59 +00:00
Sebastien Pouliot e2a2d743dc 2004-05-11 Sebastien Pouliot <[email protected]>
* PKCS8.cs: Fixed negative Version check.
	* MD2Managed.cs: Added readonly to static array constants.
	* MD4Managed.cs: Removed unrequired memory allocation in MD4Transform.

svn path=/trunk/mcs/; revision=27088
2004-05-11 11:34:34 +00:00
Sebastien Pouliot 32fa6d4398 2004-05-11 Sebastien Pouliot <[email protected]>
* ARC4ManagedTest.cs: Added missing  unit tests for complete coverage.
	Completed convertion to NUnit 2.
	* CryptoConvertTest.cs: Added/modified unit tests for better coverage.
	* MD2ManagedTest.cs: Added unit tests for better coverage.
	* MD2Test.cs: Added unit tests for better coverage.
	* MD4ManagedTest.cs: Added unit tests for better coverage.
	* MD4Test.cs: Added unit tests for better coverage.
	* PKCS8.cs: Added unit tests for better coverage.

svn path=/trunk/mcs/; revision=27087
2004-05-11 11:30:24 +00:00
Sebastien Pouliot b3dd432929 2004-05-11 Sebastien Pouliot <[email protected]>
* ChallengeResponseTest.cs: Added new unit tests for better coverage.
	* MessageBaseTest.cs: New. Unit tests for the base abstract class.
	* Type2MessageTest.cs: Added new unit tests for better coverage.
	* Type3MessageTest.cs: Added new unit tests for better coverage.

svn path=/trunk/mcs/; revision=27086
2004-05-11 11:25:46 +00:00
Sebastien Pouliot 6c81951fca 2004-05-11 Sebastien Pouliot <[email protected]>
* PrivateKeyTest.cs: Added new unit tests for better coverage.
	* SoftwarePublisherCertificateTest.cs: Added new unit tests for better
	coverage.

svn path=/trunk/mcs/; revision=27085
2004-05-11 11:22:51 +00:00
Sebastien Pouliot 39264c7e95 2004-05-11 Sebastien Pouliot <[email protected]>
* ASN1ConvertTest.cs: New. Unit tests for ASN.1 convertions.
	* StrongNameTest.cs: Added new unit tests for better coverage.

svn path=/trunk/mcs/; revision=27084
2004-05-11 11:20:28 +00:00
Sebastien Pouliot 11bbe77019 2004-05-11 Sebastien Pouliot <[email protected]>
* PrivateKey.cs: Better exception reporting. Added globalization to
	exceptions.
	* SoftwarePublisherCertificate.cs: Better exception reporting. Added
	globalization to exceptions.

svn path=/trunk/mcs/; revision=27083
2004-05-11 11:17:48 +00:00
Sebastien Pouliot 1292d8b337 2004-05-11 Sebastien Pouliot <[email protected]>
* ASN1Convert.cs: Added better exceptions. Fixed bugs found by new
	unit tests.
	* StrongName.cs: Fixed GetBytes() when creating a new strongname.
	Removed	unrequired :base() from a constructor. Removed debugging
	Console.WriteLine.

svn path=/trunk/mcs/; revision=27082
2004-05-11 11:15:13 +00:00
Raja R Harinath 4a6d35661f add test-252.cs
svn path=/trunk/mcs/; revision=27081
2004-05-11 11:09:46 +00:00
Raja R Harinath 84753bc417 Fix bug #57151.
* attribute.cs (Attribute.GetPositionalValue): New function.
* class.cs (TypeContainer.VerifyMembers): New function.
(TypeContainer.Emit): Use it.
(ClassOrStruct): New base class for Class and Struct.
(ClassOrStruct.ApplyAttributeBuilder): New function.  Note if
StructLayout(LayoutKind.Explicit) was ascribed to the struct or
class.
(ClassOrStruct.VerifyMembers): If the struct is explicitly laid out,
then each non-static field should have a FieldOffset attribute.
Otherwise, none of the fields should have a FieldOffset attribute.
* rootcontext.cs (RootContext.ResolveCore): Resolve StructLayout
and FieldOffset attributes.
* typemanager.cs (TypeManager.struct_layout_attribute_type)
(TypeManager.field_offset_attribute_type): New core types.
(TypeManager.InitCoreTypes): Initialize them.

svn path=/trunk/mcs/; revision=27080
2004-05-11 11:08:10 +00:00
Raja R Harinath d5bc2421b7 * class.cs (Event.RemoveDelegateMethod.DelegateMethodInfo):
Return correct type.
From bug #58270.

svn path=/trunk/mcs/; revision=27079
2004-05-11 11:06:18 +00:00
Raja R Harinath c05298354b New test from #58290.
svn path=/trunk/mcs/; revision=27078
2004-05-11 11:01:31 +00:00
Lluis Sanchez bc4032669c * mini.c: In the thread abort signal handler, if the thread is in the
process of being stoped, don't throw the Abort exception, just stop the
	thread.

svn path=/trunk/mono/; revision=27077
2004-05-11 10:24:36 +00:00
Lluis Sanchez 54d84c22c8 * threads.c: Before aborting a background, set the StopRequested state (this
avoids throwing the Abort exception).
	In mono_thread_manage, don't continue with the shutdown until all aborted
	threads have actually stopped.

svn path=/trunk/mono/; revision=27076
2004-05-11 10:22:48 +00:00
Lluis Sanchez acd8316fc2 * MethodResponse.cs: In the serialization constructor, initialize MethodBase
using the method name and type name.

svn path=/trunk/mcs/; revision=27075
2004-05-11 09:55:54 +00:00
Lluis Sanchez 304ffc273f * RemotingServices.cs: In GetMethodBaseFromMethodMessage, look for
constructors if no method is found.

svn path=/trunk/mcs/; revision=27074
2004-05-11 09:54:26 +00:00
Lluis Sanchez 4180bcf78e * MissingMemberException.cs: Fix in serialization constructor.
svn path=/trunk/mcs/; revision=27073
2004-05-11 09:52:57 +00:00
Paolo Molaro d4589317de Tue May 11 12:15:24 CEST 2004 Paolo Molaro <[email protected]>
* tramp-ppc.c: removed old code.

svn path=/trunk/mono/; revision=27072
2004-05-11 09:33:33 +00:00
Paolo Molaro d6d345ba92 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <[email protected]>
* mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
	do some simple speed optimizations on ppc.

svn path=/trunk/mono/; revision=27071
2004-05-11 09:21:36 +00:00
Raja R Harinath bd7f2f321a (constructor): Remove. Compiler is a static-only
class.

svn path=/trunk/mcs/; revision=27070
2004-05-11 07:53:53 +00:00
Gonzalo Paniagua Javier 6e2298caa6 2004-05-11 Gonzalo Paniagua Javier <[email protected]>
* System.Resources/ResXResourceWriter.cs: implemented.

svn path=/trunk/mcs/; revision=27069
2004-05-11 07:37:19 +00:00
Raja R Harinath 9335a6b796 * Makefile (run-test-local): Run gmcs and multi tests too.
(test-multi-local): Add logging of errors.
* runtest.pl: Change $errors and $warnings to keep track of lines
on which errors are supposed to occur.

svn path=/trunk/mcs/; revision=27068
2004-05-11 07:22:56 +00:00
Atsushi Eno 84976ba908 2004-05-11 Atsushi Enomoto <[email protected]>
* SqlMoney.cs : Handle fixed digits correctly.
	  Round decimal value before casting into other numeric types.
	* SqlInt16.cs,
	  SqlInt32.cs,
	  SqlInt64.cs : Round SqlMoney decimal value before casting into them.
	* SqlDateTime.cs :
	  Added range check.
	  Years and months were ignored in some .ctor().
	  Return invariant culture string in ToString().
	  Return null for operator - when operand is null.

svn path=/trunk/mcs/; revision=27067
2004-05-11 06:48:02 +00:00
Gert Driesen 653eab0b96 * Compiler.cs: marked ctor private to match MS.NET
svn path=/trunk/mcs/; revision=27066
2004-05-11 05:38:10 +00:00
Atsushi Eno 8477a69a08 2004-05-11 Atsushi Enomoto <[email protected]>
* DataSetReadXmlSchemaTest.cs : SingleElementTreatmentDifference() was
	  incorrect. DataSet element is assumed only if there is only one
	  global element.
	* DataSetReadXmlTest.cs : Added error-reported test case.
	* DataSetInferXmlSchemaTest.cs : Modified more tests not to compare
	  Ordinal for non-specified columns (that shouldn't be significant).

svn path=/trunk/mcs/; revision=27065
2004-05-11 05:37:50 +00:00
Gert Driesen 48aec59d1f * SoapFormatter.cs: sealed class and added ComVisible attribute
to FilterLevel property to match MS.NET
* SoapTypeMapper.cs: fixed compiler warnings

svn path=/trunk/mcs/; revision=27064
2004-05-11 05:31:18 +00:00
Ravindra 8627dfa65b Implemented AdjustableArrowCap.cs and CustomLineCap.cs.
svn path=/trunk/mcs/; revision=27063
2004-05-11 05:22:47 +00:00
Ravindra 5316acffbb Implementing AdjustableArrowCap.cs. Added P/Invokes for the same.
svn path=/trunk/mcs/; revision=27062
2004-05-11 05:16:37 +00:00
Gert Driesen 878827c788 * DataTable: marked initStatus enum internal
svn path=/trunk/mcs/; revision=27061
2004-05-11 05:15:45 +00:00
Miguel de Icaza 4357d08d30 Flush
svn path=/trunk/mono/; revision=27058
2004-05-11 01:14:34 +00:00
Miguel de Icaza 13b1f2b04b New hacker for the Hall of Fame
svn path=/trunk/mono/; revision=27056
2004-05-10 23:05:36 +00:00
Miguel de Icaza cdcb8fe9c6 Flush
svn path=/trunk/mono/; revision=27053
2004-05-10 21:12:25 +00:00
Duncan Mak 90c1d4396e Add link to packagers page.
svn path=/trunk/mono/; revision=27047
2004-05-10 20:32:40 +00:00
Jackson Harper d6fc20c125 * locales.c: Remove the modifier from culture names.
svn path=/trunk/mono/; revision=27032
2004-05-10 15:21:00 +00:00
Gonzalo Paniagua Javier 7929d278ea 2004-05-10 Gonzalo Paniagua Javier <[email protected]>
* io.c:
	(SetFileAttributes): don't the the exec bit if the corresponding read
	bit is not set.

svn path=/trunk/mono/; revision=27031
2004-05-10 15:16:17 +00:00
Paolo Molaro 5ebcdc8f3c Prettify and include s390 sources.
svn path=/trunk/mono/; revision=27030
2004-05-10 15:06:25 +00:00
Paolo Molaro 68609a3dca Mon May 10 17:21:00 CEST 2004 Paolo Molaro <[email protected]>
* mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
	and large offsets in load/store.

svn path=/trunk/mono/; revision=27029
2004-05-10 14:40:13 +00:00
Paolo Molaro 7327191f71 Fix macros.
svn path=/trunk/mono/; revision=27028
2004-05-10 14:37:42 +00:00
Marek Safar ce8edc448d 2004-05-10 Marek Safar <[email protected]>
* cs0577-2, cs0577-3,
	* cs1618.cs: 3 new error tests.

svn path=/trunk/mcs/; revision=27027
2004-05-10 13:49:22 +00:00
Zoltan Varga 167ec58d39 2004-05-10 Zoltan Varga <[email protected]>
* io.c (FindFirstFile): Fix invalid free.

svn path=/trunk/mono/; revision=27026
2004-05-10 13:16:14 +00:00
Ravindra 7cf355e3fe Implementing CustomLineCap. Added P/Invokes for the same. Added few related P/Invokes for Pen also.
svn path=/trunk/mcs/; revision=27025
2004-05-10 12:39:16 +00:00
Gert Driesen 832bb7e90f * AssemblyBuilder.cs: fixed warning
* MethodRental.cs: added private default ctror to match MS.NET

svn path=/trunk/mcs/; revision=27024
2004-05-10 12:31:44 +00:00
Radek Doulik 3b63097d93 2004-05-10 Radek Doulik <[email protected]>
* Mono.Cairo/Graphics.cs: fixed typo, pass x2, y2 to
	cairo_curve_to instead of passing x2, x2

svn path=/trunk/mcs/; revision=27023
2004-05-10 09:58:39 +00:00
Atsushi Eno a4c0443c27 2004-05-10 Atsushi Enomoto <[email protected]>
* XmlNodeReader.cs : renamed ownerElement to ownerLinkedNode (text
	  node can be it as well) and added check for Attributes existence
	  in GetAttribute() and MoveTo*Attribute().

svn path=/trunk/mcs/; revision=27022
2004-05-10 09:56:16 +00:00
Anirban Bhattacharjee 21e5b6e8dd * mb-parser.jay: Support added for attaching Attributes in methods
svn path=/trunk/mcs/; revision=27021
2004-05-10 09:52:10 +00:00
Gert Driesen 4dc6b21ef5 * Hashtable.cs: marked EnumeratorMode private
* SortedList.cs: marked EnumeratorMode private

svn path=/trunk/mcs/; revision=27020
2004-05-10 08:59:50 +00:00
Raja R Harinath 4c9ff5ff2b Don't mention 'fullbuild'. Mention 'bootstrap'
instead.  Update instructions for 'monocharge'.

svn path=/trunk/mcs/; revision=27019
2004-05-10 07:54:35 +00:00
Gonzalo Paniagua Javier 247fb79d80 2004-05-10 Gonzalo Paniagua Javier <[email protected]>
* HttpSoapWebServiceHandler.cs: finish the request after serializing
	the fault message.

svn path=/trunk/mcs/; revision=27018
2004-05-10 06:00:42 +00:00
Atsushi Eno 8cf3257586 2004-05-10 Atsushi Enomoto <[email protected]>
* XmlTextWriter.cs : comment not in the content state is indented.
	  This fixes bug #58247.

svn path=/trunk/mcs/; revision=27017
2004-05-10 04:47:41 +00:00
Miguel de Icaza d0326ac905 Flush
svn path=/trunk/mono/; revision=27016
2004-05-10 04:10:53 +00:00
Raja R Harinath 9c6c9ea44b (tmpinst-dir): Always add $tmpinst/lib to MONO_PATH.
Fix quoting of commands.

svn path=/trunk/mono/; revision=27015
2004-05-10 03:51:55 +00:00
Raja R Harinath 9c60361ba8 (corlib_net_2_0_bootstrap): Remove extraneous copying.
svn path=/trunk/mcs/; revision=27014
2004-05-10 03:49:29 +00:00
Raja R Harinath e1c0137381 Add back lost 'chomp'.
svn path=/trunk/mcs/; revision=27013
2004-05-10 03:47:14 +00:00
Raja R Harinath 9798870e15 (install-local,test-local,run-test-local,clean-local):
Make cyclic-dependency safe.

svn path=/trunk/mcs/; revision=27012
2004-05-10 03:26:50 +00:00
Gonzalo Paniagua Javier feecc7b0d3 2004-05-10 Gonzalo Paniagua Javier <[email protected]>
* Makefile.am: monosn is not installed any more. It has been deprecated
	in favor of sn.

svn path=/trunk/mono/; revision=27011
2004-05-10 03:13:24 +00:00
Gonzalo Paniagua Javier 627b96733d 2004-05-10 Gonzalo Paniagua Javier <[email protected]>
* Environment.cs: GetGacPath return value is resolved at runtime on
	windows.

svn path=/trunk/mcs/; revision=27010
2004-05-10 01:19:21 +00:00
Francisco Figueiredo Jr. aaee641fbb 2004-05-09 Francisco Figueiredo Jr. <[email protected]>
* HashAlgorithm.cs,
        NpgsqlAsciiRow.cs,
        NpgsqlBinaryRow.cs,
        NpgsqlClosedState.cs,
        NpgsqlCommand.cs,
        NpgsqlCommandBuilder.cs,
        NpgsqlConnection.cs,
        NpgsqlDataReader.cs,
        NpgsqlException.cs,
        NpgsqlParameterCollection.cs,
        NpgsqlReadyState.cs,
        NpgsqlTransaction.cs: Improved exception handling. Now Npgsql throws mor
e meaningful exceptions instead of throw NpgsqlException which are now exclusive
ly to sign server errors. Thanks Glen Parker ([email protected]) for the patch.

svn path=/trunk/mcs/; revision=27009
2004-05-09 22:28:00 +00:00
Francisco Figueiredo Jr. f99302f41a 2004-05-09 Francisco Figueiredo Jr. <[email protected]>
* HashAlgorithm.cs,
	NpgsqlAsciiRow.cs,
	NpgsqlBinaryRow.cs,
	NpgsqlClosedState.cs,
	NpgsqlCommand.cs,
	NpgsqlCommandBuilder.cs,
	NpgsqlConnection.cs,
	NpgsqlDataReader.cs,
	NpgsqlException.cs,
	NpgsqlParameterCollection.cs,
	NpgsqlReadyState.cs,
	NpgsqlTransaction.cs: Improved exception handling. Now Npgsql throws more meaningful exceptions instead of throw NpgsqlException which are now exclusively to sign server errors. Thanks Glen Parker ([email protected]) for the patch.

svn path=/trunk/mcs/; revision=27008
2004-05-09 22:27:14 +00:00
John Luke d8741ce2ea 2004-05-09 John Luke <[email protected]>
* monop.cs: seperate assembly loading into .GetAssembly method,
        fail gracefully, and support loading assemblies from absolute and
        relative paths
        support /r: as well as -r:

svn path=/trunk/mcs/; revision=27007
2004-05-09 18:34:51 +00:00
Miguel de Icaza 69c222394d 2004-05-09 Miguel de Icaza <[email protected]>
* expression.cs (Binary.DoNumericPromotions): 0 long constant can
	be implicitly converted to ulong.

svn path=/trunk/mcs/; revision=27006
2004-05-09 18:24:23 +00:00
Miguel de Icaza 34ee5ffb5a Update test
svn path=/trunk/mcs/; revision=27005
2004-05-09 18:23:29 +00:00
Miguel de Icaza 0ffbd7592c The logic was wrong here, it worked because of a codepath not covered, fixes #57895
svn path=/trunk/mcs/; revision=27004
2004-05-09 18:17:20 +00:00
Miguel de Icaza 6766f8ae59 2004-05-09 Miguel de Icaza <[email protected]>
* class.cs: Applied patch from [email protected] Iain McCoy to
	allow volatile fields to be reference types.

svn path=/trunk/mcs/; revision=27003
2004-05-09 18:02:06 +00:00
Miguel de Icaza 2950fcece1 Add new tests
svn path=/trunk/mcs/; revision=27002
2004-05-09 18:01:03 +00:00
Miguel de Icaza 7f0d49eaf3 Add new test
svn path=/trunk/mcs/; revision=27001
2004-05-09 18:00:13 +00:00
Gert Driesen 082cd2bb14 * DataTable.cs: removed TypeConverterAttribute, marked RowsExist
methods internal
* DataRowView.cs: removed extra Error property
* DataRow.cs: reduced accessibility of CollectionChanged method
to private
* DataColumnPropertyDescriptor.cs: made class internal
* DataColumn.cs: removed extra TypeConvertorAttribute
* ConstrainCollection.cs: marked PostEndInit method internal

svn path=/trunk/mcs/; revision=27000
2004-05-09 17:35:45 +00:00
Miguel de Icaza 1e5575e9a9 Fix Build
svn path=/trunk/mcs/; revision=26999
2004-05-09 17:32:35 +00:00
Gert Driesen 0b16822db1 * ComparerFactory.cs: marked internal
svn path=/trunk/mcs/; revision=26998
2004-05-09 17:10:55 +00:00
Atsushi Eno 1b9cbdb49e 2004-05-09 Atsushi Enomoto <[email protected]>
* FileSystemWatcher.cs : csc build fix. Duplicate name between class
	  field and local variable. (already filed in bugzilla #47991).

svn path=/trunk/mcs/; revision=26997
2004-05-09 17:10:32 +00:00
Gert Driesen 2a4777e37a * OleDbCommand.cs: removed setter for Parameters property to
match MS.NET
* OleDbCommandBuilder.cs: fixed GetUpdatetCommand typo
* OleDbErrorCollection: added default internal ctor to match
MS.NET
* OleDbInfoMessageEventArgs.cs: added default internal ctor
to match MS.NET
* OleDbParameter.cs: added setter for IsNullable
* OleDbParameterCollection: added default internal ctor to
match MS.NET
* OleDbPermission.cs: removed extra IsSubsetOf method

svn path=/trunk/mcs/; revision=26996
2004-05-09 17:07:58 +00:00
Gert Driesen 93b9996139 * OdbcDataReader.cs : added HasRows stub
svn path=/trunk/mcs/; revision=26995
2004-05-09 16:54:02 +00:00
Gert Driesen 438cca69ac * SqlString.cs: changed accessibility of CompareOptions property
to private, commented out unreachable code

svn path=/trunk/mcs/; revision=26994
2004-05-09 16:48:38 +00:00
Gert Driesen 1b8b3f6321 * OdbcException.cs : removed ErrorCode property, fixing signature
* OdbcErrorCollection.cs : added internal ctor, reduced
accessibility of Add method to internal
* OdbcCommand.cs: marked hstmt field private, remove setters for
Parameters property
* OdbcDataReader.cs: Added GetDate method, renamed GetTimeSpan to
GetTime to match MS.NET, added HasRows stub

svn path=/trunk/mcs/; revision=26993
2004-05-09 16:38:22 +00:00
Gert Driesen 0a7f465e82 * OdbcError.cs:
* OdbcErrorCollection.cs:
* OdbcException.cs: fixed linefeeds to DOS to match other
sources in System.Data.Odbc

svn path=/trunk/mcs/; revision=26992
2004-05-09 16:20:30 +00:00
Gert Driesen 2005bd3e3d * OdbcCommand.cs: No longer use OdbcConnection.Datareader, in order
to fix signature of OdbcConnection
* OdbcDataReader.cs: No longer use ODbcConnection.Datareader, in
order to fix signature of OdbcConnection
* OdbcConnection.cs: Signature fixes: removed DataReader property,
added setter for ConnectionTimeout, made transaction internal
* OdbcParameter.cs: reduced accessibility of Bind method to
internal, added setter for IsNullable
* OdbcParameterCollection.cs: made default ctor and Bind method
internal

svn path=/trunk/mcs/; revision=26991
2004-05-09 16:15:17 +00:00
Gert Driesen e47651fa06 * OdbcCommand: fixed linefeeds to DOS to match other sources
in System.Data.Odbc

svn path=/trunk/mcs/; revision=26990
2004-05-09 15:51:54 +00:00
Atsushi Eno a49547bbef 2004-05-09 Atsushi Enomoto <[email protected]>
* Manager.cs : Added comment.
	* Handler.cs : Added missing euc-jp support.

svn path=/trunk/mcs/; revision=26989
2004-05-09 15:41:43 +00:00
Atsushi Eno d37d409d7b 2004-05-09 Atsushi Enomoto <[email protected]>
* Added CP51932.cs.
	* I18N.CJK.dll.sources : added it.

svn path=/trunk/mcs/; revision=26988
2004-05-09 15:38:55 +00:00
Gert Driesen def3354f3b * OdbcTransaction.cs: fixed signature to match MS.NET
svn path=/trunk/mcs/; revision=26987
2004-05-09 15:20:35 +00:00
Gert Driesen bdfd6d7584 * OdbcType.cs: fixed typo UniqueIndetifier
* OdbcColumn.cs : fixed typo UniqueIndetifier

svn path=/trunk/mcs/; revision=26986
2004-05-09 15:02:39 +00:00
Gert Driesen 530f7968ec * OdbcType.cs : fixed linefeeds to DOS to match other sources
in System.Data.Odbc

svn path=/trunk/mcs/; revision=26985
2004-05-09 14:54:33 +00:00
Gert Driesen 64c5bf5b67 * Parameter.cs:
* SqlDataSourceCommandEventArgs:
* XmlDataSource.cs : removed temporary workarounds for CLS
compliance as System.Data is now CLS compliant

svn path=/trunk/mcs/; revision=26983
2004-05-09 11:34:35 +00:00
Carlos Guzmán Álvarez 1e0d4468ae 2004-05-09 Carlos Guzman Alvarez <[email protected]>
* Mono.Security.Protocol.Tls/Alert.cs:
	* Mono.Security.Protocol.Tls/CipherSuite.cs:
	* Mono.Security.Protocol.Tls/CipherSuiteCollection.cs:
	* Mono.Security.Protocol.Tls/ClientRecordProtocol.cs:
	* Mono.Security.Protocol.Tls/Context.cs:
	* Mono.Security.Protocol.Tls/RecordProtocol.cs:
	* Mono.Security.Protocol.Tls/SecurityCompressionType.cs:
	* Mono.Security.Protocol.Tls/ServerRecordProtocol.cs:
	* Mono.Security.Protocol.Tls/SslServerStream.cs:
	* Mono.Security.Protocol.Tls/TlsClientSettings.cs:

		- Changes for fix FxCop Rules.

		- Reworked CipherSuiteCollection class.

	* Mono.Security.Protocol.Tls.Handshake/HandshakeMessage.cs:

		- Changes for fix FxCop Rules.

	* Mono.Security.Protocol.Tls/DebugHelper.cs:

		- New class.

	* Mono.Security.Protocol.Tls/ClientRecordProtocol.cs:
	* Mono.Security.Protocol.Tls/RecordProtocol.cs:
	* Mono.Security.Protocol.Tls/Context.cs:
	* Mono.Security.Protocol.Tls/Context.cs:
	* Mono.Security.Protocol.Tls/SslCipherSuite.cs:
	* Mono.Security.Protocol.Tls/TlsCipherSuite.cs:
	* Mono.Security.Protocol.Tls/SslClientStream.cs:

		- Added debug capabilities.

	* Mono.Security.Protocol.Tls/ServerContext.cs:

		- Added initialization of requested CertificateTypes and CA's

	* Mono.Security.Protocol.Tls.Handshake.Client/TlsClientCertificate.cs:
	* Mono.Security.Protocol.Tls.Handshake.Client/TlsClientCertificateVerify.cs:
	* Mono.Security.Protocol.Tls.Handshake.Client/TlsServerCertificate.cs:
	* Mono.Security.Protocol.Tls.Handshake.Client/TlsServerHello.cs:
	* Mono.Security.Protocol.Tls.Handshake.Client/TlsServerFinished.cs:

		- Modfied exception handling

		- Added debug capabilities.

	* Mono.Security.Protocol.Tls.Handshake.Client/TlsServerCertificateRequest.cs:

		- Modify SSL implementation.

	* Mono.Security.Protocol.Tls.Handshake.Server/TlsServerCertificateRequest.cs:

		- Initial implementation.

	* Mono.Security.Protocol.Tls.Handshake.Server/TlsClientCertificateVerify.cs:
	* Mono.Security.Protocol.Tls.Handshake.Server/TlsClientFinished.cs:
	* Mono.Security.Protocol.Tls.Handshake.Server/TlsClientHello.cs:

		- Modfied exception handling

svn path=/trunk/mcs/; revision=26982
2004-05-09 09:48:56 +00:00
Atsushi Eno ce89d39da9 2004-05-09 Atsushi Enomoto <[email protected]>
* RncParser.jay :
	  Added static Parse () methods.
	  Converted all CRLF to LF, since jay automatically inserts LF lines.

svn path=/trunk/mcs/; revision=26981
2004-05-09 07:49:48 +00:00
Gert Driesen e8f0695f21 * Assembly/AssemblyInfo.cs: Added
* Assembly/Consts.cs : Added
* Assembly/Locale.cs : Added
* Assembly/ChangeLog: Added
* monoresgen.cs : use Assembly.Load with fullly qualified assembly
name for loading swf assembly
* monoresgen.exe.sources : added AssemblyInfo.cs, Consts.cs,
Locale.cs

svn path=/trunk/mcs/; revision=26980
2004-05-09 07:31:57 +00:00
Gonzalo Paniagua Javier fd208f62c0 2004-05-09 Gonzalo Paniagua Javier <[email protected]>
* io.c: translate from GFileError to errno codes and don't free
	variables right after calling mono_io_scandir, as we may overwrite
	errno value.

svn path=/trunk/mono/; revision=26979
2004-05-09 03:47:59 +00:00
Gonzalo Paniagua Javier fec76c733b 2004-05-09 Gonzalo Paniagua Javier <[email protected]>
* DefaultWatcher.cs:
	* FAMWatcher.cs: use MangledFilter instead of Filter.

	* FileSystemWatcher.cs: added MangledFilter and finalizer.

	* SearchPattern.cs: fixed the case when the pattern is "*".

svn path=/trunk/mcs/; revision=26978
2004-05-09 03:31:54 +00:00
Miguel de Icaza ecbfd40701 Flush
svn path=/trunk/mono/; revision=26971
2004-05-08 16:24:15 +00:00
Gonzalo Paniagua Javier 6661988d1e 2004-05-08 Gonzalo Paniagua Javier <[email protected]>
* io.c: g_dir_open return ENOENT for directories on which we don't have
	read/execute permission, while returning EPERM for anything below those.
	So, change ENOENT by EPERM if the directory exists.

svn path=/trunk/mono/; revision=26970
2004-05-08 11:57:37 +00:00
Gonzalo Paniagua Javier 1914aee116 2004-05-08 Gonzalo Paniagua Javier <[email protected]>
* monowiz.win32.nsi: some changes i made to build the 0.91 win32 setup
	file.

svn path=/trunk/mono/; revision=26969
2004-05-08 05:31:08 +00:00
Gonzalo Paniagua Javier dc331eebe0 2004-05-08 Gonzalo Paniagua Javier <[email protected]>
* Makefile: build NUnit if the dll is not found when running
	'make test'. Use INTERNAL_MCS to build the tests as csc fails miserably
	to compile them.

svn path=/trunk/mcs/; revision=26968
2004-05-08 05:18:36 +00:00
Gonzalo Paniagua Javier 8632a5f443 2004-05-08 Gonzalo Paniagua Javier <[email protected]>
* library.make: build NUnit if we try to run 'make test' and the dll
	is not found.

svn path=/trunk/mcs/; revision=26967
2004-05-08 05:17:07 +00:00
Gonzalo Paniagua Javier 7ce3ee29ed 2004-05-08 Gonzalo Paniagua Javier <[email protected]>
* RelaxngValidatingReaderTests.cs: this compiled with mcs but fails with
	csc. Filed as bug #58222.

svn path=/trunk/mcs/; revision=26966
2004-05-08 05:04:11 +00:00
Bernie Solomon 71a62410c3 2004-05-07 Bernie Solomon <[email protected]>
* man/mono.1: mention MONO_EGD_SOCKET

svn path=/trunk/mono/; revision=26959
2004-05-08 01:37:06 +00:00
Bernie Solomon ce2e9e97de 2004-05-07 Bernie Solomon <[email protected]>
* ppc/ppc-codegen.h: remove GCC-ism in ppc_emit32

svn path=/trunk/mono/; revision=26957
2004-05-08 01:03:26 +00:00
Pawel Rozanski fe7b586dba add Bash completion fuction for monop
svn path=/trunk/mcs/; revision=26956
2004-05-08 01:00:46 +00:00
Ben Maurer e43a8bde3a 2004-05-07 Ben Maurer <[email protected]>
* monop.cs: Helpers for completion.

svn path=/trunk/mcs/; revision=26955
2004-05-07 23:31:28 +00:00
Miguel de Icaza d8e4354936 Typo fix
svn path=/trunk/mcs/; revision=26953
2004-05-07 22:38:18 +00:00
Miguel de Icaza 6654adf626 2004-05-07 Miguel de Icaza <[email protected]>
* driver.cs: Add support for /debug-

svn path=/trunk/mcs/; revision=26952
2004-05-07 22:29:09 +00:00
Gonzalo Paniagua Javier 020945f624 2004-05-07 Gonzalo Paniagua Javier <[email protected]>
* System.Web.dll.sources: removed 2 unused files in system.Web.Utils.

	* System.Web/HttpRequest.cs:
	* System.Web/HttpResponse.cs:
	* System.Web/HttpRuntime.cs:
	* System.Web/HttpServerUtility.cs:
	* System.Web/HttpUnhandledException.cs:
	* System.Web.Compilation/CachingCompiler.cs:
	* System.Web.Configuration/AuthenticationConfigHandler.cs:
	* System.Web.Configuration/CompilationConfiguration.cs:
	* System.Web.Configuration/MachineKeyConfigHandler.cs:
	* System.Web.UI/Page.cs:
	* System.Web.UI.WebControls/Calendar.cs:
	* System.Web.UI.WebControls/FontInfo.cs:
	* System.Web.UI.WebControls/WebControl.cs: removed TODOs.

	* System.Web.UI/ApplicationFileParser.cs: add file dependencies.
	* System.Web.UI/Control.cs: removed TODOs and some ^M.

	* System.Web.Util/ApacheVersionInfo.cs: removed.
	* System.Web.Util/IISVersionInfo.cs: removed.

svn path=/trunk/mcs/; revision=26947
2004-05-07 20:24:19 +00:00
Neale Ferguson ac63a01b09 Remove debugging printfs
svn path=/trunk/mono/; revision=26945
2004-05-07 20:21:19 +00:00
Neale Ferguson ba14487a65 Bring s390 JIT up to date.
svn path=/trunk/mono/; revision=26943
2004-05-07 19:53:40 +00:00
Zoltan Varga 812a0bced4 2004-05-07 Zoltan Varga <[email protected]>
* mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
	it causes regressions.

svn path=/trunk/mono/; revision=26936
2004-05-07 17:45:31 +00:00
Sebastien Pouliot 203e626531 2004-05-07 Sebastien Pouliot <[email protected]>
* DSACryptoServiceProvider.cs: Fixed SignData to hash data before
	signing it (thanks to Jens Thiel for spotting this).

svn path=/trunk/mcs/; revision=26932
2004-05-07 16:51:34 +00:00
Sebastien Pouliot 2cc5bc406c 2004-05-07 Sebastien Pouliot <[email protected]>
* DSACryptoServiceProviderTest.cs: Added a new unit test for SignData
	(was badly tested) and simplified test to reduce key pair generations.

svn path=/trunk/mcs/; revision=26931
2004-05-07 16:29:21 +00:00
Atsushi Eno afb2738e0e 2004-05-07 Atsushi Enomoto <[email protected]>
* DataSet.cs :
	  In WriteXmlSchema(), when complex type contains simple type content
	  attributes must not added to XmlSchemaComplexType directly. It
	  causes schema compilation error.
	  DataRelation should not be output when related columns are hidden.

svn path=/trunk/mcs/; revision=26930
2004-05-07 16:14:51 +00:00
Jordi Mas i Hernandez d96eab6652 rotate tests
svn path=/trunk/mcs/; revision=26927
2004-05-07 15:05:15 +00:00
Atsushi Eno faa091e5be 2004-05-07 Atsushi Enomoto <[email protected]>
* NewMonoXSD.cs : Previous change broke default C# code generation.
	  XML schema inference output path fix.

svn path=/trunk/mcs/; revision=26924
2004-05-07 14:33:56 +00:00
Sebastien Pouliot ac839a262f 2004-05-07 Sebastien Pouliot <[email protected]>
* RSACryptoServiceProvider.cs: Fixed OID related exception in SignData.

svn path=/trunk/mcs/; revision=26923
2004-05-07 14:28:41 +00:00
Jackson Harper a9c8c3860d * locales.c
(ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
	Fix array construction, add bailout if the length is 0.

svn path=/trunk/mono/; revision=26922
2004-05-07 14:25:26 +00:00
Sebastien Pouliot 2b7558c4f7 2004-05-07 Sebastien Pouliot <[email protected]>
* RSACryptoServiceProviderTest.cs: Oops wrong exception for SignHashNullOID.

svn path=/trunk/mcs/; revision=26921
2004-05-07 14:23:46 +00:00
Sebastien Pouliot a6aa68e2f6 2004-05-07 Sebastien Pouliot <[email protected]>
* PasswordDerivceBytesTest.cs: Added new tests to complete
	coverage.
	* RSACryptoServiceProviderTest.cs: Added new tests to complete
	coverage.

svn path=/trunk/mcs/; revision=26919
2004-05-07 14:01:55 +00:00
Dick Porter 5127e49742 2004-05-07 Dick Porter <[email protected]>
* io.c (SetFileAttributes): Don't have failed chmod()s cause a
	"file not found" error.  Fixes bug 54032.

svn path=/trunk/mono/; revision=26914
2004-05-07 13:35:15 +00:00
Zoltan Varga 0609d6aaf3 2004-05-07 Zoltan Varga <[email protected]>
* mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
	support.

svn path=/trunk/mono/; revision=26913
2004-05-07 13:29:50 +00:00
Dick Porter 3f5302cdb6 2004-05-07 Dick Porter <[email protected]>
* io.c (FindFirstFile): Comment out a windows-compatibility check
	that breaks when directories have metachars in their names.
	Workaround for bug 58116.

svn path=/trunk/mono/; revision=26912
2004-05-07 13:21:27 +00:00
Sebastien Pouliot 0c98b10471 2004-05-07 Sebastien Pouliot <[email protected]>
* ToBase64Transform.cs: Input block may be smaller than a full block
	when calling TransformFinalBlock (fix 2 CryptoStream unit tests).

svn path=/trunk/mcs/; revision=26911
2004-05-07 13:02:24 +00:00
Sebastien Pouliot 06d2660b3e 2004-05-07 Sebastien Pouliot <[email protected]>
* ToBase64TransformTest.cs: Added a (legal) test where the final
	transform receive data smaller than it's input block (padding).

svn path=/trunk/mcs/; revision=26910
2004-05-07 12:59:28 +00:00
Lluis Sanchez f90024c138 * XmlTextWriter.cs: In WriteStartAttribute, when the prefix is xmlns and
the name is empty, convert it to a xmlns attribute.

svn path=/trunk/mcs/; revision=26909
2004-05-07 12:16:06 +00:00
Dick Porter a62a1024f3 2004-05-07 Dick Porter <[email protected]>
* socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
	machine doesn't have a DNS entry.  Patch by Urs Muff
	([email protected]), fixes bug 57928.

svn path=/trunk/mono/; revision=26908
2004-05-07 12:14:05 +00:00
Sebastien Pouliot f40db6fe6c 2004-05-07 Sebastien Pouliot <[email protected]>
* CipherMode.cs: Moved XML comments to monodoc.
	* CryptoConfig.cs: Changed Array.Copy to Buffer.BlockCopy.
	* CryptoStream.cs: Changed Array.Copy to Buffer.BlockCopy.
	* DSA.cs: Changed Array.Copy to Buffer.BlockCopy.
	* ICryptoTransform.cs: Moved XML comments to monodoc.
	* PasswordDeriveBytes.cs: Changed Array.Copy to Buffer.BlockCopy.
	* FromBase64Transform.cs: Moved XML comments to monodoc.

svn path=/trunk/mcs/; revision=26907
2004-05-07 11:35:22 +00:00
Sebastien Pouliot be7c2ce94c 2004-05-07 Sebastien Pouliot <[email protected]>
* Convert.cs: ToBase64CharArray method was depending on a bug in
	S.S.C.ToBase64Transform class to work. Added an internal method to
	provide the same functionality (multiple block processing).

svn path=/trunk/mcs/; revision=26906
2004-05-07 11:32:06 +00:00
Sebastien Pouliot 7e68c254c8 2004-05-07 Sebastien Pouliot <[email protected]>
* SequentialSearchPrimeGeneratorBase.cs: In sync with
	Mono.Security.dll version.

svn path=/trunk/mcs/; revision=26905
2004-05-07 11:27:12 +00:00
Sebastien Pouliot 0014e1ad65 2004-05-07 Sebastien Pouliot <[email protected]>
* PrimalityTests.cs: In sync with Mono.Security.dll version.

svn path=/trunk/mcs/; revision=26904
2004-05-07 11:25:12 +00:00
Sebastien Pouliot 8a54113a0d 2004-05-07 Sebastien Pouliot <[email protected]>
* BigInteger.cs: In sync with Mono.Security.dll version.

svn path=/trunk/mcs/; revision=26903
2004-05-07 11:23:52 +00:00
Sebastien Pouliot 1e5e8d4172 2005-05-07 Sebastien Pouliot <[email protected]>
* SequentialSearchPrimeGeneratorBase.cs: Start the smallPrime vector at
	10 (not 9) as 29 was just tested (more for correctness than speed gain).

svn path=/trunk/mcs/; revision=26902
2004-05-07 11:10:01 +00:00
Sebastien Pouliot c5540d48c0 2004-05-07 Sebastien Pouliot <[email protected]>
* PrimalityTests.cs: Applying optimization from HAC section 4.50
	(base == 2) for a 30% gain in primality testing (medium confidence).

svn path=/trunk/mcs/; revision=26901
2004-05-07 11:09:20 +00:00
Sebastien Pouliot 66c031d6aa 2005-05-07 Sebastien Pouliot <[email protected]>
* BigInteger.cs: Faster scan of smallPrimes in IsProbablePrime.
	Commented the methods OddModTwoPow and EvenModTwoPow as they are broken
	in some cases (well tested primes test case).

svn path=/trunk/mcs/; revision=26900
2004-05-07 11:08:26 +00:00
Raja R Harinath 1b5ee8c867 * attribute.cs (Attribute.CheckAttributeType, Attribute.ResolveType):
Add a 'complain' parameter to silence errors.
(Attribute.Resolve): Update to changes.  Put in sanity check to catch
silently overlooked type-resolutions.
(Attribute.ScanForIndexerName, Attribute.DefinePInvokeMethod): Update
to reflect changes.
(Attributes.Search): New function.
(Attributes.Contains, Attributes.GetClsCompliantAttribute): Use Search.
(Attributes.GetAttributeFullName): Remove hack.
* class.cs (MethodCore.LabelParameters, MethodData.ApplyAttributes):
Update to reflect changes.
* codegen.cs (CommonAssemblyModulClass.GetClsCompliantAttribute):
Use Attributes.Search instead of nested loops.

svn path=/trunk/mcs/; revision=26899
2004-05-07 11:00:44 +00:00
Raja R Harinath 6a2b24f38b Simplify sed expression.
svn path=/trunk/mcs/; revision=26898
2004-05-07 10:59:05 +00:00
Paolo Molaro e325a3f84d Fri May 7 13:25:50 CEST 2004 Paolo Molaro <[email protected]>
* jit-icalls.c: remove warnings.
	* inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
	speedups for unsafe code.

svn path=/trunk/mono/; revision=26897
2004-05-07 10:53:57 +00:00
Lluis Sanchez 52de36e0df * SoapWriter.cs: Fixed string formatting.
svn path=/trunk/mcs/; revision=26896
2004-05-07 10:51:40 +00:00
Lluis Sanchez 47296304eb * SoapServices.cs: Support encoded namespace names in
DecodeXmlNamespaceForClrTypeNamespace. Thanks to George Kodinov.

svn path=/trunk/mcs/; revision=26895
2004-05-07 10:43:32 +00:00
Atsushi Eno 2d0f1a15b9 2004-05-07 Atsushi Enomoto <[email protected]>
* System.Data.dll.sources : added XmlDataInferenceLoader.cs and
	  XmlDataReader.cs.

svn path=/trunk/mcs/; revision=26894
2004-05-07 10:21:58 +00:00
Lluis Sanchez b37ee973a1 * XmlReflectionImporter.cs: Don't reset the internal tables at every
ImportMembersMapping call. This fixes bug #58112. The problem is that
	  it imported two different arrays (only different in the array item
	  namespace) with the same name. Not sure what was this Reset needed for,
	  everyting seems to work without it.

svn path=/trunk/mcs/; revision=26893
2004-05-07 10:18:23 +00:00
Raja R Harinath 56974f2ad0 New tests.
svn path=/trunk/mcs/; revision=26892
2004-05-07 10:08:33 +00:00
Raja R Harinath 7d07cb3c6c (all-local) [SECOND_PASS]: Rewrite to use 'make' itself
to determine out-of-date-ness.  (This fixes an unlogged change.)
(install-local,test-local,run-test-local,clean-local): Collapse
near-identical rules.

svn path=/trunk/mcs/; revision=26891
2004-05-07 10:02:42 +00:00
Marek Safar 13c581d5cf 2004-05-07 Marek Safar <[email protected]>
* cs0579-4.cs, CS0579-4-1.cs,
	* cs0579-5.cs,
	* cs0657.cs,
	* cs3015-2.cs,
	* cs3019.cs,
	* cs3019-2.cs: 6 new error tests.

svn path=/trunk/mcs/; revision=26890
2004-05-07 09:24:40 +00:00
Atsushi Eno 1fab1be621 2004-05-07 Atsushi Enomoto <[email protected]>
* XmlDataInferenceReader.cs : Added. It does InferXmlSchema() (it is
	  also expected to do ReadXml(), but I will remove that feature and
	  support column reordering).
	* XmlSchemaDataImporter.cs : Always initialize dataset name.
	  Always set Nested and primary key for parent table.
	* XmlDataReader.cs : Now it is used.
	  Top level element might not match to dataset name nor any table
	  name, but still possible to read content tables.
	  Handle empty element correctly in some places.
	  Handle Fragment mode (read up XmlReader to the end).
	* DataSet.cs : Modified InferXmlSchema() and ReadXml() to use
	  XmlDataInferenceLoader and XmlDataReader.

svn path=/trunk/mcs/; revision=26889
2004-05-07 09:16:57 +00:00
Marek Safar d0a522f722 2004-05-07 Marek Safar <[email protected]>
* decl.cs:
	(MemberCore.Flags): Extended for caching presence of CLSCompliantAttribute.
	(MemberCore.VerifyClsCompliance): Implemented CS3019 error report.
	(DeclSpace.GetClsCompliantAttributeValue): Returns simple bool.

	* report.cs: (Report.Warning): Renamed to Warning_T because of
	parameter collision.

svn path=/trunk/mcs/; revision=26888
2004-05-07 07:57:24 +00:00
Gonzalo Paniagua Javier 6b97495b1d 2004-05-07 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: fixed Connect for non-blocking sockets. Closes bug #58169.

svn path=/trunk/mcs/; revision=26887
2004-05-07 07:47:23 +00:00
Sanja Gupta 9c44d8e19f ChangeLog: Updated ChangeLog
ImageAnimator.cs: Corrected implementation of CanAnimate() method.

svn path=/trunk/mcs/; revision=26886
2004-05-07 06:56:05 +00:00
Raja R Harinath 495c35c8d8 Goodbye 'fullbuild', hello 'bootstrap'.
* Makefile.am (bootstrap): New target for building from CVS.  New
improved version of 'fullbuild' -- does not install any files.
(fullbuild): Obsolete target.  Bootstraps and installs tree.
(mcs-tree-safe-build,xinstall-runtime,mcs-rest,remove-binaries):
Removed.
(stage1,stage1-mcs,stage1-mono,stage2,stage3)
(tmpinst-dir,tmpinst-runtime): New targets used to implement a
two-stage bootstrap.

svn path=/trunk/mono/; revision=26884
2004-05-07 05:05:57 +00:00
Gonzalo Paniagua Javier 33b511cc18 0.91.99.0
svn path=/trunk/mcs/; revision=26883
2004-05-07 04:55:31 +00:00
Gonzalo Paniagua Javier eb14e783aa 0.91.99
svn path=/trunk/mono/; revision=26882
2004-05-07 04:54:45 +00:00
Gonzalo Paniagua Javier 45f6a29944 Attempt to fix cyclic dependency issues.
svn path=/trunk/mcs/; revision=26881
2004-05-07 04:14:54 +00:00
Ben Maurer 65753f5535 2004-05-07 Ben Maurer <[email protected]>
* inssel.brg: Optimize Stind.[ui][12]. r=zoltan.

svn path=/trunk/mono/; revision=26880
2004-05-07 04:11:31 +00:00
Duncan Mak 02cfa4928f Sync from web site
svn path=/trunk/mono/; revision=26879
2004-05-07 03:19:29 +00:00
Raja R Harinath 284a843cb7 (AssemblyDelaySign, AssemblyKeyFile): Disable
with BOOTSTRAP_WITH_OLDLIB.  Mono 0.31 runtime crashes on this.

svn path=/trunk/mcs/; revision=26878
2004-05-07 03:08:25 +00:00
Raja R Harinath 1b5d33ae8b (corlib_net_2_0_bootstrap): Copy System.dll and
System.Xml.dll from 'default' profile build.
($(gmcs)): Always go to 'gmcs' directory.

svn path=/trunk/mcs/; revision=26877
2004-05-07 03:07:36 +00:00
Raja R Harinath a404df78f4 (AssemblyDelaySign, AssemblyKeyFile): Disable
for BOOTSTRAP_WITH_OLDLIB.  Mono 0.31 runtime crashes with them.

svn path=/trunk/mcs/; revision=26876
2004-05-07 03:06:56 +00:00
Raja R Harinath 8749e7b04d (all-local): Built first pass with BOOT_COMPILE.
svn path=/trunk/mcs/; revision=26875
2004-05-07 03:06:19 +00:00
Raja R Harinath db8a554985 (SUBDIRS): Build 'corlib' and first pass of 'System'
before anything else.  Remove duplicated Novell.Directory.Ldap.

svn path=/trunk/mcs/; revision=26874
2004-05-07 03:05:24 +00:00
Sebastien Pouliot d4fcff3e3e 2004-05-06 Sebastien Pouliot <[email protected]>
* README: Updated to match the new version and public token for the
	assembly. Also changed my email address.

svn path=/trunk/mcs/; revision=26873
2004-05-07 00:24:37 +00:00
Sebastien Pouliot 90c4678ede 2004-05-06 Sebastien Pouliot <[email protected]>
* SignatureDescriptionTest.cs: Misspelled [SetUp] attribute.

svn path=/trunk/mcs/; revision=26871
2004-05-07 00:08:33 +00:00
Sebastien Pouliot 56d9b6e86e 2004-05-06 Sebastien Pouliot <[email protected]>
* SignatureDescriptionTest.cs: Removed unimplemented constructor from
	tests. Converted to NUnit2.

svn path=/trunk/mcs/; revision=26870
2004-05-07 00:02:53 +00:00
Sebastien Pouliot 1dc0861ecf 2004-05-06 Jesper Pedersen <[email protected]>
* PKCS12.cs: Fixed synchronization with X509CertificateCollection in
	GetBytes ().

svn path=/trunk/mcs/; revision=26867
2004-05-06 23:16:03 +00:00
Jean-Marc Andre 2db3c39529 2004-05-06: Jean-Marc Andr�� <[email protected]>
* SoapTypeMapper.cs: small fix

svn path=/trunk/mcs/; revision=26866
2004-05-06 22:47:13 +00:00
Sebastien Pouliot 3d0fa96491 2004-05-06 Sebastien Pouliot <[email protected]>
* RSAOAEPKeyExchangeDeformatter.cs: Fixed wrt completed unit tests.
	* RSAOAEPKeyExchangeFormatter.cs: Fixed wrt completed unit tests.
	* RSAPKCS1KeyExchangeDeformatter.cs: Fixed wrt completed unit tests.
	Added globalization to exceptions.
	* RSAPKCS1KeyExchangeFormatter.cs: Fixed wrt completed unit tests.
	* RSAPKCS1SignatureDeformatter.cs: Fixed wrt completed unit tests.
	Added globalization to exceptions.
	* RSAPKCS1SignatureFormatter.cs: Fixed wrt completed unit tests.
	Added globalization to exceptions.

svn path=/trunk/mcs/; revision=26862
2004-05-06 19:51:45 +00:00
Jackson Harper f7ee0cbe92 * reflection.c: Handle null PublicTokens properly. alloc mem for
assembly names culture so we dont crash when freeing it.

svn path=/trunk/mono/; revision=26861
2004-05-06 19:46:27 +00:00
Sebastien Pouliot 77d0dd9c47 2004-05-06 Sebastien Pouliot <[email protected]>
* RSAOAEPKeyExchangeDeformatterTest.cs: Updated unit tests to complete
	coverage.
	* RSAOAEPKeyExchangeFormatterTest.cs: Updated unit tests to complete
	coverage.
	* RSAPKCS1KeyExchangeDeformatterTest.cs: Updated unit tests to
	complete coverage.
	* RSAPKCS1KeyExchangeFormatterTest.cs: Updated unit tests to complete
	coverage.
	* RSAPKCS1SignatureDeformatterTest.cs: Updated unit tests to complete
	coverage.
	* RSAPKCS1SignatureFormatterTest.cs: Updated unit tests to complete
	coverage.

svn path=/trunk/mcs/; revision=26860
2004-05-06 19:28:52 +00:00
Jaroslaw Kowalski 2d475bf13b fix for loading I18N.*.dll assemblies from the GAC
svn path=/trunk/mcs/; revision=26859
2004-05-06 19:14:31 +00:00
Jackson Harper 784eeba55e * assembly.c: Check the usergac when loading with
partial names.

svn path=/trunk/mono/; revision=26858
2004-05-06 18:50:28 +00:00
Gonzalo Paniagua Javier ffbd7f9d99 2004-05-06 Gonzalo Paniagua Javier <[email protected]>
* Directory.cs: use the real wildcard for file names as it is supported
	now in io-layer. SearhPattern is not needed now.

svn path=/trunk/mcs/; revision=26856
2004-05-06 17:48:31 +00:00
Gonzalo Paniagua Javier ad0b5f7489 removed obsolete comment
svn path=/trunk/mono/; revision=26855
2004-05-06 17:43:33 +00:00
Gonzalo Paniagua Javier 5638a610ac 2004-05-06 Gonzalo Paniagua Javier <[email protected]>
* io.c: fixed for FindFirstFile for empty directories. Closes
	bug #58147.

svn path=/trunk/mono/; revision=26854
2004-05-06 17:21:00 +00:00
Jackson Harper f827d032d1 * Assembly.cs: remove TODO, this is done.
svn path=/trunk/mcs/; revision=26853
2004-05-06 16:51:09 +00:00
Jackson Harper 5eb7fdb6d8 * Environment.cs: Make $HOME the personal directory.
svn path=/trunk/mcs/; revision=26852
2004-05-06 16:45:01 +00:00
Atsushi Eno e55051f004 2004-05-06 Atsushi Enomoto <[email protected]>
* xml-classes : updates

svn path=/trunk/mono/; revision=26851
2004-05-06 16:38:08 +00:00
Sebastien Pouliot f4149bac0c 2004-05-06 Sebastien Pouliot <[email protected]>
* Convert.cs: ToBase64String method was depending on a bug in
	S.S.C.ToBase64Transform class to work. Added an internal method to
	provide the same functionality (multiple block processing).

svn path=/trunk/mcs/; revision=26850
2004-05-06 16:37:34 +00:00
Sebastien Pouliot 9d7ae50253 2004-05-06 Sebastien Pouliot <[email protected]>
* Rijndael.cs: Source clean up.
	* RijndaelManaged.cs: Moved XML comments to monodoc. Added
	globalization to exceptions.

svn path=/trunk/mcs/; revision=26849
2004-05-06 16:34:41 +00:00
Sebastien Pouliot e7cc9f30bc 2004-05-06 Sebastien Pouliot <[email protected]>
* RNGCryptoServiceProvider.cs: Removed TODO and documented them in
	mono doc. Now call runtime when a seed is provided.
	* RSA.cs: Added globalization to exceptions. Removed check for
	<RSAKeyValue> as it is not checked by MS implementation.
	* SignatureDescription.cs: Moved XML comments to monodoc. Added
	globalization to exceptions. Removed TODO and added notes to monodoc.
	* SymmetricAlgorithm.cs: Moved XML comments to monodoc. Added
	globalization to exceptions.
	* ToBase64Tranform.cs: Added missing exception handling. Moved XML
	comments to monodoc.

svn path=/trunk/mcs/; revision=26848
2004-05-06 16:31:52 +00:00
Gonzalo Paniagua Javier 581c069a2a ordered last 'In the news' by date
svn path=/trunk/mono/; revision=26847
2004-05-06 16:27:25 +00:00
Sebastien Pouliot 5b3e334040 2004-05-06 Sebastien Pouliot <[email protected]>
* TripleDES.cs: Added globalization to exceptions.
	* TripleDESCryptoServiceProvider.cs: Changed Array.Copy to
	Buffer.BlockCopy. Zeroize decrypted data.

svn path=/trunk/mcs/; revision=26846
2004-05-06 16:27:14 +00:00
Sebastien Pouliot e6dd3a1022 2004-05-06 Sebastien Pouliot <[email protected]>
* SHA1.cs: Moved XML comments to monodoc.
	* SHA1CryptoServiceProvider.cs: Moved XML comments to monodoc. Removed CLSCompliance
	attributes from	private fields.
	* SHA256.cs: Moved XML comments to monodoc.
	* SHA256Managed.cs: Moved XML comments to monodoc. Removed CLSCompliance
	attributes from	private fields.
	* SHA384.cs: Moved XML comments to monodoc.
	* SHA512.cs: Moved XML comments to monodoc.

svn path=/trunk/mcs/; revision=26845
2004-05-06 16:24:33 +00:00
Sebastien Pouliot 340663a90a 2004-05-06 Sebastien Pouliot <[email protected]>
* RC2.cs: Fixed KeySize to change it's value and the EffectiveKeySize
	when the key is changed.
	* RC2CryptoServiceProvider.cs: Added globalization to exceptions.
	Fixed the KeySize must be equal with EffectiveKeySize to match MS
	implementation.

svn path=/trunk/mcs/; revision=26844
2004-05-06 16:19:57 +00:00
Ravindra f550dce7c5 * RectangleConverter.cs: Implemented GetProperties () method.
* SizeConverter.cs: Implemented GetProperties () method.
	* PointConverter.cs: Implemented GetProperties () method.
	* FontConverter.cs: Implemented some of the methods.

svn path=/trunk/mcs/; revision=26841
2004-05-06 15:47:50 +00:00
Zoltan Varga 7cd4db061f 2004-05-06 Zoltan Varga <[email protected]>
* basic-calls.cs: Add new regression test.

svn path=/trunk/mono/; revision=26840
2004-05-06 15:20:19 +00:00
Zoltan Varga 0a04f6676f 2004-05-06 Zoltan Varga <[email protected]>
* mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
	more portable.

	* mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.

svn path=/trunk/mono/; revision=26839
2004-05-06 15:12:34 +00:00
Bernie Solomon ee4f51092b 2004-05-06 Bernie Solomon <[email protected]>
* dump.c:
	* get.c:
	* main.c:
	* util.c:
	* util.h: rename map_t dis_map_t to avoid AIX symbol clash

svn path=/trunk/mono/; revision=26838
2004-05-06 15:10:48 +00:00
Erik Dasque 9b38e544e3 added two "In the news" items. Don't know where to put images for now
svn path=/trunk/mono/; revision=26837
2004-05-06 15:09:11 +00:00
Lluis Sanchez 304353fc3f * SerializationCodeGenerator.cs, XmlSerializationReaderInterpreter.cs:
When deserializing an encoded method response, if the return type of the
	  method is Object, assign to it the first element of the message, whatever
	  it is.
	* XmlSerializationReader.cs:
	* SoapReflectionImporter.cs, XmlReflectionImporter.cs: Set IsReturnValue of
	  the imported member.
	* TypeTranslator.cs: Added method to safely get a primitive TypeData.
	* XmlSerializationReader.cs: Don't throw an exception when the CLR type for
	  a given xsi type is not found. Just read it as primitive type.
	* XmlTypeMapMember.cs: Added IsReturnValue property.
	* XmlTypeMapping.cs: Added ReturnMember property.
	* XmlSerializer.cs: Reference System.Data when compiling the serializer.

svn path=/trunk/mcs/; revision=26836
2004-05-06 15:08:58 +00:00
Sebastien Pouliot f105478081 2004-05-06 Sebastien Pouliot <[email protected]>
* corlib_test.dll.sources: Added SymmetricAlgorithm2Test,
	ToBaseTransformTest, TripleDESTest unit tests to the build.

svn path=/trunk/mcs/; revision=26834
2004-05-06 14:56:32 +00:00
Sebastien Pouliot 2403373982 2004-05-06 Sebastien Pouliot <[email protected]>
* RNGCryptoServiceProviderTest.cs: Updated unit tests for exception
	testing.
	* RSATest.cs: Updated unit tests for importing XML key pairs.
	* SymmetricAlgorithm2Test.cs: New. Non generated unit test for better
	coverage (like exception testing).
	* ToBase64TransformTest.cs: New. Unit tests to complete coverage of
	ToBase64Transform.
	* TripleDESTest.cs: New. Unit tests to complete coverage of TripleDES.

svn path=/trunk/mcs/; revision=26833
2004-05-06 14:53:05 +00:00
Atsushi Eno ef60eaba14 2004-05-06 Atsushi Enomoto <[email protected]>
* DataSet.cs :
	  Eliminated CRLF injection.
	  More clear message in Clear().
	  Updates reflecting XmlSchemaDataImporter change.
	  Added duplicate check for XmlSerializerNamespaces in BuildSchema().
	  Don't use xmlns attribute for UnhandledAttributes (its not mandatory
	  but that depends on different behavior from ms.net).
	  Set locale also for DataTable.
	  Add xs:element only when target namespace matches to the
	  element's namespace. Otherwise, add xs:import for external namespace.
	  Put xs:sequence for dataset element's particle _only when_ actual
	  contents exist.

svn path=/trunk/mcs/; revision=26832
2004-05-06 14:44:29 +00:00
Ravindra 058b008a9e * Color.cs: Fixed Name property.
* ColorTranslator.cs: Fixed the existing methods and implemented
	the missing methods.
	* ColorConverter.cs: Fixed the existing methods and implemented
	the missing methods. Also, fixed coding style.

svn path=/trunk/mcs/; revision=26831
2004-05-06 14:40:20 +00:00
Sebastien Pouliot 108f7f003d 2004-05-06 Sebastien Pouliot <[email protected]>
* RC2Test.cs: Converted to NUnit 2. Uncommented some tests that throw
	exceptions to test exception handling (and get more coverage).
	* SHA256Test.cs: Corrected Setup attribtue (was [Test]).

svn path=/trunk/mcs/; revision=26830
2004-05-06 14:36:21 +00:00
Atsushi Eno 51b3c2a98a 2004-05-06 Atsushi Enomoto <[email protected]>
* XmlDataReader.cs : Added. This class will work better when our
	  schema inference and schema read engine gets improved. (It contains
	  standalone testable Driver class.)

svn path=/trunk/mcs/; revision=26829
2004-05-06 14:29:36 +00:00
Nick Drochak 721c5efbdc 2004-05-07 Nick Drochak <[email protected]>
* Makefile (plattest_flags): Add /unsafe.

svn path=/trunk/mcs/; revision=26827
2004-05-06 14:24:45 +00:00
Miguel de Icaza 15e93cd6d7 Fix
svn path=/trunk/mono/; revision=26826
2004-05-06 14:04:46 +00:00
Miguel de Icaza 0e41c30ad3 Fix
svn path=/trunk/mono/; revision=26825
2004-05-06 14:02:31 +00:00
Atsushi Eno 4697c5210b 2004-05-06 Atsushi Enomoto <[email protected]>
* ForeignKeyConstraint.cs : Check step change. Existence then column
	  validity. just for tests.
	* XmlSchemaDataImporter.cs : code simplification. reduced extraneous
	  fields.

svn path=/trunk/mcs/; revision=26824
2004-05-06 13:59:00 +00:00
Atsushi Eno 52ba29c687 2004-05-06 Atsushi Enomoto <[email protected]>
* ConstraintCollectionTest.cs : Table name should not be the same as
	  for the purpose of this test.
	* DataSetReadXmlSchemaTest.cs : Added more tests based on schema files.
	* DataSetTest.cs : Reordered attributes to pass test in
	  WriteDifferentNamespaceSchema().

svn path=/trunk/mcs/; revision=26822
2004-05-06 13:52:23 +00:00
Atsushi Eno 13b282d1fb 2004-05-06 Atsushi Enomoto <[email protected]>
* New directory.
	  Added test001.xsd - test011.xsd, test101.xsd, test102.xsd

svn path=/trunk/mcs/; revision=26820
2004-05-06 13:48:39 +00:00
Zoltan Varga 6bb7c6244c 2004-05-06 Zoltan Varga <[email protected]>
* Makefile.am: Only disable thread6.exe on x86.

svn path=/trunk/mono/; revision=26819
2004-05-06 13:17:40 +00:00
Zoltan Varga acc71ac3a9 2004-05-06 Zoltan Varga <[email protected]>
* Makefile.am: Disable thread6.exe since it might hang. Fix check for
	failed tests.

svn path=/trunk/mono/; revision=26818
2004-05-06 12:34:18 +00:00
Alon Gazit 6eb1ccb667 fixed LoadViewState() and SaveViewState() in WebControl.
Before the change the Enabled property wasn't updated when a postback
event was raised.
fixed SelectedIndex property implementation in ListControl.
Prevents throwing ArgumentOutOfRangeException (that should not be thrown),
when the list is empty.

svn path=/trunk/mcs/; revision=26817
2004-05-06 12:18:22 +00:00
Atsushi Eno 3f7b10da20 2004-05-06 Atsushi Enomoto <[email protected]>
* ManagedXslTransform.cs : For Stream input, use StreamWriter for
	  input to GenericOutputter. Passing XmlWriter causes unexpected
	  xml declaration output.

svn path=/trunk/mcs/; revision=26816
2004-05-06 12:10:24 +00:00
Zoltan Varga 33ce44982c 2004-05-06 Zoltan Varga <[email protected]>
* mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
	is no longer used.

svn path=/trunk/mono/; revision=26815
2004-05-06 12:01:45 +00:00
Atsushi Eno 7ce87bf23c 2004-05-06 Atsushi Enomoto <[email protected]>
* NewMonoXSD.cs : Added new /generator:typename(,assemblyfile) option
	  support that enables users to use any CodeDomProvider.
	  Added VB support (/language:VB).

svn path=/trunk/mcs/; revision=26812
2004-05-06 10:11:34 +00:00
Patrik Torstensson ccf08337d7 2004-05-06 Patrik Torstensson
* mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
	long reg allocation in any reg (not only eax:edx) and implemented
	long shl/shr ops in asm instead of helpers.

svn path=/trunk/mono/; revision=26811
2004-05-06 09:33:46 +00:00
Gonzalo Paniagua Javier cbd5ff5515 2004-05-06 Gonzalo Paniagua Javier <[email protected]>
* processes.c: set the start time for the current process. Fixes bug
	#58109.

svn path=/trunk/mono/; revision=26810
2004-05-06 09:07:22 +00:00
Gonzalo Paniagua Javier 6dc115d439 2004-05-06 Gonzalo Paniagua Javier <[email protected]>
* Assembly.cs: ToString () returns the same as GetName ().ToString ().
	Fixes bug #58104.

svn path=/trunk/mcs/; revision=26809
2004-05-06 06:33:39 +00:00
Gonzalo Paniagua Javier 02767b6e8d <pre> 12px
svn path=/trunk/mono/; revision=26808
2004-05-06 05:40:35 +00:00
Mike Shaver bc92af0f5e Implement StringToCoTaskMem{Ansi,Uni} (bug 58102).
svn path=/trunk/mcs/; revision=26806
2004-05-06 04:03:57 +00:00
Gonzalo Paniagua Javier 6414e56caa 2004-05-05 Gonzalo Paniagua Javier <[email protected]>
* configure.in: scandir check is no longer needed.

svn path=/trunk/mono/; revision=26803
2004-05-06 02:19:33 +00:00
Sebastien Pouliot 93dcf1663c 2004-05-05 Sebastien Pouliot <[email protected]>
* rand.c|h: Added new icall for (optionally) seeding the PRNG. This
	does nothing for now (not required for Linux/Windows) but the class
	library can call it (and a newer or modified runtime could need it).
	* icall.c: Registred icall.

svn path=/trunk/mono/; revision=26802
2004-05-06 02:18:47 +00:00
Gonzalo Paniagua Javier 5c7e358321 2004-05-06 Gonzalo Paniagua Javier <[email protected]>
* io-private.h: 'namelist' is now a gchar ** in _WapiHandlePrivate_find.
	* io.c: implemented scandir using glib functions.

svn path=/trunk/mono/; revision=26801
2004-05-06 02:18:19 +00:00
Gonzalo Paniagua Javier 19bb38456b update MONO_DEBUG
svn path=/trunk/mono/; revision=26800
2004-05-06 01:07:16 +00:00
Gonzalo Paniagua Javier ee201ca3c4 2004-05-06 Gonzalo Paniagua Javier <[email protected]>
* loader.c: prints a message on module loading error we set MONO_DEBUG
	environment variable.

svn path=/trunk/mono/; revision=26799
2004-05-06 00:58:01 +00:00
Gonzalo Paniagua Javier c2cf85f5fa 2004-05-06 Gonzalo Paniagua Javier <[email protected]>
* AspParser.cs: indent a few lines.
	* AspTokenizer.cs: added ungetc() used when we read a '/' in an unquoted
	attribute value. This way we can simulate reading 2 characters ahead
	(one in ungetc and the other in Peek) and work with values like
	text/javascript. Fixes bug #57302.

svn path=/trunk/mcs/; revision=26798
2004-05-06 00:39:36 +00:00
Gonzalo Paniagua Javier 24a8232adc 2004-05-06 Gonzalo Paniagua Javier <[email protected]>
* WebConfigurationSettings.cs: fixed loading of external files. Closes
	bug #57244.

svn path=/trunk/mcs/; revision=26794
2004-05-06 00:11:28 +00:00
Gonzalo Paniagua Javier e193340b0f 2004-05-06 Gonzalo Paniagua Javier <[email protected]>
* ConfigXmlDocument.cs: removed method that was supposed to be internal.

	* ConfigurationSettings.cs: instead of calling the overload that doesn't
	exist in MS, use what we have when loading an external file.

svn path=/trunk/mcs/; revision=26793
2004-05-06 00:10:42 +00:00
Miguel de Icaza d2c3741000 Update CVS
svn path=/trunk/mono/; revision=26792
2004-05-05 23:56:10 +00:00
Gonzalo Paniagua Javier 8231f0a5ba 2004-05-06 Gonzalo Paniagua Javier <[email protected]>
* AspParser.cs: ignore whitespace after directives. Fixes bug #58057.

svn path=/trunk/mcs/; revision=26790
2004-05-05 23:18:53 +00:00
Bernie Solomon b547e31639 2004-05-05 Bernie Solomon <[email protected]>
* configure.in: set LIBC on HPUX

svn path=/trunk/mono/; revision=26788
2004-05-05 21:11:47 +00:00
Atsushi Eno bb5d2e9138 2004-05-05 Atsushi Enomoto <[email protected]>
* ForeignKeyConstraintTest.cs : Made tests pass under MS.NET 1.1.
	  Don't catch every kind of exception. That does nothing but keep us
	  away from the exact error location.
	* DataSetTest.cs : Make sure that we read schema correctly, before
	  testing WriteXmlSchema.

svn path=/trunk/mcs/; revision=26786
2004-05-05 19:53:23 +00:00
Jackson Harper 8832b6ba54 * appdomain.c: Handle PublicKeyToken=null properly.
svn path=/trunk/mono/; revision=26785
2004-05-05 19:34:41 +00:00
Atsushi Eno 6daf503610 2004-05-05 Atsushi Enomoto <[email protected]>
* DataSet.cs : Ignore empty content only when output type is diffgram.

svn path=/trunk/mcs/; revision=26784
2004-05-05 19:00:10 +00:00
Gonzalo Paniagua Javier 1332cad5c2 2004-05-05 Gonzalo Paniagua Javier <[email protected]>
* Makefile:
	* Npgsql.dll.resources: all the resources command line options are now
	in a separate response file.

svn path=/trunk/mcs/; revision=26783
2004-05-05 18:55:26 +00:00
Gonzalo Paniagua Javier 3e0dca1db9 2004-05-05 Gonzalo Paniagua Javier <[email protected]>
* System.Web.Services.dll.sources: removed HttpGetWebServiceHandler and
	HttpPostWebServiceHandler.

	* System.Web.Services.Protocols/HttpGetWebServiceHandler.cs:
	* System.Web.Services.Protocols/HttpPostWebServiceHandler.cs: removed.

	* System.Web.Services.Protocols/HttpSimpleWebServiceHandler.cs: changed
	ctor parameters and added EnableSession property.

	* System.Web.Services.Protocols/WebServiceHandler.cs: added EnableSession
	virtual property.

	* System.Web.Services.Protocols/WebServiceHandlerFactory.cs: added a new
	handler that implements IRequiresSessionState used for HttpGet and
	HttpPost.
	(GetHandler): for HttpGet and HttpPost check if the method requires to
	have a Session object and use the new SimpleSyncSessionHandler in that
	case.

	Still missing proper session handler for SOAP requests.

svn path=/trunk/mcs/; revision=26782
2004-05-05 18:51:00 +00:00
Gonzalo Paniagua Javier 36879b3188 2004-05-05 Gonzalo Paniagua Javier <[email protected]>
* HttpSessionState.cs: added Clone (), which makes and exact copy but
	with a cloned SessionDictionary. When EnableSessionState is set to
	ReadOnly, we can modify the collection, but changes are not propagated.

	* ISessionHandler.cs: changed signature of UpdateContext().

	* SessionDictionary.cs: added Clone.

	* SessionInProcHandler.cs:
	* SessionSQLServerHandler.cs:
	* SessionStateServerHandler.cs: don't create a new session if the handler
	do not require it. UpdateContext() now returns an HttpSessionState to
	the module.

	* SessionStateModule.cs: removed IsReadOnly as it is now passed as a
	parameter to the session handler. If the session is read-only, clone
	it so that it can be changed but changes are not kept.

	In short, we don't create session objects when not required and we
	honor the ReadOnly sessions.

svn path=/trunk/mcs/; revision=26781
2004-05-05 18:45:08 +00:00
Jackson Harper 6f97ab8d8f * ILParser.jay: Handle endian issues when converting numeric
types.

svn path=/trunk/mcs/; revision=26779
2004-05-05 18:34:06 +00:00
Sebastien Pouliot ff4f6876ba 2004-05-05 Sebastien Pouliot <[email protected]>
* Environment.cs: Completed OSVersion property.
 	* Version.cs: Added internal CreateFromString() to "try" to build the
 	best version number form the specified string.

svn path=/trunk/mcs/; revision=26777
2004-05-05 18:20:02 +00:00
Sebastien Pouliot 219613bdad 2004-05-05 Sebastien Pouliot <[email protected]>
* environment.c|h: Added icall ves_icall_System_Environment_
	GetOSVersionString to get the current OS version as a string.
	* icall.c: Registred icall.

svn path=/trunk/mono/; revision=26776
2004-05-05 18:18:58 +00:00
Atsushi Eno e32685b887 2004-05-05 Atsushi Enomoto <[email protected]>
* CustomDataClassGenerator.cs : Modified that DataSet contains each
	  DataTable field so that each table property can access them directly.
	  (plus, modified standalone code driver code: shouldn't affect)

svn path=/trunk/mcs/; revision=26775
2004-05-05 18:03:58 +00:00
Atsushi Eno f1b7456d4a 2004-05-05 Atsushi Enomoto <[email protected]>
* DataColumnCollectionTest.cs : catch only specific exception. Don't
	  rely on localizable error message.
	* DataSetTest.cs : Attribute orders should not be significant, so
	  just hacked to match current implementation's order.
	  Added WriteNestedTableXml().

svn path=/trunk/mcs/; revision=26774
2004-05-05 17:48:54 +00:00
Sebastien Pouliot dc581bf25d 2004-05-05 Sebastien Pouliot <[email protected]>
* HashAlgorithm.cs: Moved XML comments to monodoc. Added globalization
	to exceptions.
	* KeyedHashAlgorithm.cs: Added globalization to exceptions.
	* KeySizes.cs: Moved XML comments to monodoc.
	* MaskGenerationMethod.cs: Source clean up.
	* MD5.cs: Moved XML comments to monodoc.
	* MD5CryptoServiceProvider.cs: Removed CLSCompliance attributes from
	private fields. Changed constants from enum to array. Zeroize data on
	Dispose.
	* PaddingMode.cs: Moved XML comments to monodoc.
	* PasswordDeriveBytes.cs: Added globalization to exceptions. Removed
	TODO and documented as "not supported" in MonoDoc.
	* RandomNumberGenerator.cs: Source clean up.

svn path=/trunk/mcs/; revision=26773
2004-05-05 17:40:22 +00:00
Lluis Sanchez 5850916c3c * object.c: in mono_object_get_virtual_method(), take into account that
non-virtual methods don't have a slot in the vtable. Check needed when
	the object is a proxy.

svn path=/trunk/mono/; revision=26772
2004-05-05 17:27:48 +00:00
Lluis Sanchez 158becb0c3 * BooleanConverter.cs: Improved ConverFrom method.
svn path=/trunk/mcs/; revision=26771
2004-05-05 17:05:53 +00:00
Zoltan Varga 881f005dfd 2004-05-05 Zoltan Varga <[email protected]>
* mini-sparc.h: Fix warnings.

	* exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
	stack.

	* mini-exceptions.c (mono_handle_exception): Call the filter in a
	separate statement for clarity.

svn path=/trunk/mono/; revision=26770
2004-05-05 17:02:52 +00:00
Rafael Teixeira e4289f8c21 2004/04/07 Rafael Teixeira <[email protected]>
* AssemblyInfo.cs : Correcting information and version number

svn path=/trunk/mcs/; revision=26768
2004-05-05 15:37:17 +00:00
Jordi Mas i Hernandez eb6166abf0 Let GDI+ to calculate the strides
svn path=/trunk/mcs/; revision=26767
2004-05-05 15:26:37 +00:00
Jaroslaw Kowalski 7afbf82c34 NpgsqlDataReader.RecordsAffected fix
svn path=/trunk/mcs/; revision=26765
2004-05-05 14:59:16 +00:00
Sebastien Pouliot 85d5a4d1f0 2004-05-05 Sebastien Pouliot <[email protected]>
* DSACryptoServiceProvider.cs: Added globalization to exceptions.
	* HMACSHA1.cs: Cleanup.
	* SHA1CryptoServiceProvider.cs: Removed unused private methods.
	* SHA1Managed.cs: Removed unused private methods.
	* SHA384Managed.cs: Don't zeroize buffer on first initialization.
	* SHA512Managed.cs: Don't zeroize buffer on first initialization.

svn path=/trunk/mcs/; revision=26763
2004-05-05 14:14:26 +00:00
Lluis Sanchez fb9c1efbf0 * SerializationCodeGenerator.cs, XmlSerializationReaderInterpreter.cs:
When reading an object using the typeof(object) map, an emty xsi:type
	  means that it has to read the contents into an XmlNode[].
	* TypeData.cs: Return the correct full name for inner classes.
	* XmlSchemaImporter.cs: Improved detection of types that represent
	  "anyType", and must be mapped to XmlElement, XmlNode or Object.
	* XmlSerializationReader.cs: In GetXsiType(), find the type attribute using
	  the correct namespace.
	  In ReadTypedPrimitive(), read the element as XmlNode[] if the type is
	  not known.

svn path=/trunk/mcs/; revision=26761
2004-05-05 13:32:08 +00:00
Sebastien Pouliot 58b47ca476 2004-05-05 Sebastien Pouliot <[email protected]>
* corlib.dll.sources: Added SHAConstants to the build.

svn path=/trunk/mcs/; revision=26760
2004-05-05 13:28:10 +00:00
Sebastien Pouliot 81f86a80e8 2004-05-05 Sebastien Pouliot <[email protected]>
* SHA256Managed.cs: Updated to use shared constants.
	* SHA384Managed.cs: Updated to use shared constants.
	* SHA512Managed.cs: Updated to use shared constants.
	* SHAConstants.cs: New. Shared constants for SHA implementations.

svn path=/trunk/mcs/; revision=26759
2004-05-05 13:27:12 +00:00
Zoltan Varga fd85c965b3 2004-05-05 Zoltan Varga <[email protected]>
* mini-sparc.c: Update status.

svn path=/trunk/mono/; revision=26758
2004-05-05 13:13:54 +00:00
Gonzalo Paniagua Javier 5cc63db76a removed ^Ms
svn path=/trunk/mcs/; revision=26757
2004-05-05 13:12:40 +00:00
Sebastien Pouliot e7c5c21986 2004-05-05 Jesper Pedersen <[email protected]>
* PKCS12.cs: Added support for SafeBag attributes. Added support for
	Clone() (ICloneable), Equals and GetHashCode. New methods:
	- AddCertificate (X509Certificate cert)
	- AddCertificate (X509Certificate cert, IDictionary attributes)
	- RemoveCertificate (X509Certificate cert)
	- RemoveCertificate (X509Certificate cert, IDictionary attributes)
	- AddPkcs8ShroudedKeyBag (AsymmetricAlgorithm aa)
	- AddPkcs8ShroudedKeyBag (AsymmetricAlgorithm aa, IDictionary attributes)
	- RemovePkcs8ShroudedKeyBag (AsymmetricAlgorithm aa)
	- AddKeyBag (AsymmetricAlgorithm aa)
	- AddKeyBag (AsymmetricAlgorithm aa, IDictionary attributes)
	- RemoveKeyBag (AsymmetricAlgorithm aa)
	- AsymmetricAlgorithm GetAsymmetricAlgorithm (IDictionary attrs)
	- X509Certificate GetCertificate (IDictionary attrs)
	- IDictionary GetAttributes (AsymmetricAlgorithm aa)
	- IDictionary GetAttributes (X509Certificate cert)

svn path=/trunk/mcs/; revision=26756
2004-05-05 13:11:57 +00:00
Zoltan Varga 96a0804643 2004-05-05 Zoltan Varga <[email protected]>
* mono-jni.c: Implement some missing JNI functions.

svn path=/trunk/mono/; revision=26755
2004-05-05 13:08:34 +00:00
Sebastien Pouliot 3099aafc6f 2004-05-05 Sebastien Pouliot <[email protected]>
* corlib.dll.sources: Added Base64Constants to the build.

svn path=/trunk/mcs/; revision=26754
2004-05-05 12:48:11 +00:00
Sebastien Pouliot e57fe275fc 2004-05-05 Sebastien Pouliot <[email protected]>
* Base64Constants.cs: New. Convert code into tables for better base64
	performance.
	* FromBase64Transform.cs: Updated to use the new tables. Source code
	cleanup.
	* ToBase64Transform.cs: Updated to use the new tables. Added
	globalization. Commented finalizer as it isn't required in this case.

svn path=/trunk/mcs/; revision=26753
2004-05-05 12:46:44 +00:00
Boris Kirzner 2797c8f00d * DataView.cs , DataRowView.cs : Added implementation to basic methods and properties.
svn path=/trunk/mcs/; revision=26752
2004-05-05 12:19:07 +00:00
Raja R Harinath 9d7ffb37f5 testcases for bug 57151
svn path=/trunk/mcs/; revision=26751
2004-05-05 11:06:41 +00:00
Zoltan Varga b92d0b7e63 2004-05-05 Zoltan Varga <[email protected]>
* MarshalTest.cs: Add test for UnsafeAddrOfPinnedArrayElement.

svn path=/trunk/mcs/; revision=26750
2004-05-05 11:04:42 +00:00
Zoltan Varga 35d646caeb 2004-05-05 Zoltan Varga <[email protected]>
* Makefile (test_flags): Add /unsafe.

svn path=/trunk/mcs/; revision=26749
2004-05-05 11:03:44 +00:00
Zoltan Varga 8310dc4160 2004-05-05 Zoltan Varga <[email protected]>
* Marshal.cs: Applied patch from [email protected] (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.

svn path=/trunk/mcs/; revision=26748
2004-05-05 11:02:41 +00:00
Zoltan Varga ea46e43b38 2004-05-05 Zoltan Varga <[email protected]>
* marshal.h marshal.c icall.c: Applied patch from [email protected] (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.

svn path=/trunk/mono/; revision=26747
2004-05-05 11:01:24 +00:00
Raja R Harinath 5d805e2561 test for bug #57151
svn path=/trunk/mcs/; revision=26746
2004-05-05 11:01:22 +00:00
Zoltan Varga c36e12ba54 2004-05-05 Zoltan Varga <[email protected]>
* configure.in: Detect JNI headers in GNU classpath sources as well.

svn path=/trunk/mono/; revision=26745
2004-05-05 10:36:41 +00:00
Raja R Harinath e6064df91a revert log for uncommitted part.
svn path=/trunk/mono/; revision=26743
2004-05-05 10:11:18 +00:00
Raja R Harinath c0b5da8923 (install-data-local, uninstall-local):
Only disable this if INSTALL_2_0 is disabled.

svn path=/trunk/mono/; revision=26742
2004-05-05 10:10:28 +00:00
Zoltan Varga f6645dec47 2004-05-05 Zoltan Varga <[email protected]>
* object.c (mono_class_compute_gc_descriptor): Fix warning.

	* object.c (mono_runtime_invoke_array): Add an assert so null cannot be
	passed when a valuetype is expected.

	* object.c (mono_unhandled_exception): Only set the exit code if the
	exception happens in the main thread. Fixes thread5.exe.

svn path=/trunk/mono/; revision=26741
2004-05-05 09:54:12 +00:00
Zoltan Varga d66f74de02 2004-05-05 Zoltan Varga <[email protected]>
* appdomain.c (get_info_from_assembly_name): Fix infinite loop on
	invalid names. Fixes #58047.

svn path=/trunk/mono/; revision=26740
2004-05-05 09:19:34 +00:00
Raja R Harinath be37528cc3 * expression.cs (MemberAccess.ResolveMemberAccess):
Exit with non-zero status after Report.Error.
* rootcontext.cs (RootContext.BootstrapCorlib_ResolveDelegate):
Likewise.
* typemanager.cs (TypeManager.CoreLookupType): Likewise.

svn path=/trunk/mcs/; revision=26739
2004-05-05 08:49:33 +00:00
Atsushi Eno 6b9acee880 2004-05-05 Atsushi Enomoto <[email protected]>
* BuiltInDatatype.cs : trivia fix

svn path=/trunk/mcs/; revision=26738
2004-05-05 04:56:09 +00:00
Atsushi Eno b13d1c2c41 2004-05-05 Atsushi Enomoto <[email protected]>
* BuiltInDatatype.cs : added BUGGY_MS_COMPLIANT condition and that
	  handles ms-compatible properties.
	* XmlSchemaComplexType.cs : ditto for ContentTypeParticle of xs:anyType.
	  Make sure ContentType for xs:anyType is Mixed.
	* XmlSchemaUtil.cs : ditto for <xs:attribute use="prohibited" ..>

svn path=/trunk/mcs/; revision=26737
2004-05-05 04:44:49 +00:00
Atsushi Eno 622f40ad6d 2004-05-05 Atsushi Enomoto <[email protected]>
* XmlSerializationWriter.cs : It do not have to handle schema
	  namespace as special one.

svn path=/trunk/mcs/; revision=26736
2004-05-05 04:28:54 +00:00
Atsushi Eno c381e2e366 2004-05-05 Atsushi Enomoto <[email protected]>
* XmlSchema.cs : Write() handles schema namespace for xmlserializer
	  (it does not look to be handled inside xmlserializer).

svn path=/trunk/mcs/; revision=26735
2004-05-05 04:27:22 +00:00
Atsushi Eno 2b323defa8 2004-05-05 Atsushi Enomoto <[email protected]>
* XmlSchemaTests.cs : Added TestWriteNamespaces().

svn path=/trunk/mcs/; revision=26734
2004-05-05 04:25:02 +00:00
Atsushi Eno 9e692caa42 2004-05-05 Atsushi Enomoto <[email protected]>
* XmlDsigBase64Transform.cs : LoadInputAsXmlNodeList() is testable.
	* XmlDsigC14NTransformTest.cs : Ignore LoadInputAsXmlNodeList(); that
	  test premises incorrect namespace handling.
	* XmlDsigXPathTransformTest.cs : Removed some FIXMEs (counting node
	  will give more expected results),
	  plus some noise on FunctionHereObsolete().

svn path=/trunk/mcs/; revision=26732
2004-05-05 03:51:51 +00:00
Atsushi Eno 461b2e57a5 2004-05-05 Atsushi Enomoto <[email protected]>
* SignedXml.cs,
	  Transform.cs : code cleanup. #if !NET_1_0 -> #if NET_1_1.
	* XmlDsigBase64Transform.cs : Should not output the content of the
	  selected element nodes. Put text content only those text nodes are
	  in the node list.
	* XmlDsigEnvelopedSignatureTransform.cs : removed MonoTODO.
	* XmlDsigXsltTransform.cs : Use XmlResolver to load document and
	  to transform. Throw null reference exception explicitly when
	  the input was not loaded.

svn path=/trunk/mcs/; revision=26731
2004-05-05 03:45:49 +00:00
Atsushi Eno 792d4a585f 2004-05-05 Atsushi Enomoto <[email protected]>
* XmlSchemaDataImporter.cs :
	  SimpleContent column support.
	  Annotated relation support.
	  Top-level element is counted only when its type is complex.
	  xs:anyType is no longer treated as complex type.
	  dataset existence is mandatory now.
	  Improved DataType and DefaultValue support.
	  Attribute namespace is properly handled now.
	  Prohibited attribute is now treated as hidden column.
	  Reject list or union simple type.

	  Still incomplete 1) to read relationship in some cases, 2) to
	  determine whether an element is dataset or table, 3) thus to
	  exclude extraneous column, 4) to remove extraneous *_Id column.

svn path=/trunk/mcs/; revision=26730
2004-05-05 03:32:02 +00:00
Atsushi Eno 3180468065 2004-05-05 Atsushi Enomoto <[email protected]>
* DataTable.cs :
	  We had better reuse DataSet's ReadXmlSchema() and ReadXml() in
	  serialization .ctor() (thus schema read/inference should be easier).
	  DataRowSorter should consider Table's Locale.

svn path=/trunk/mcs/; revision=26729
2004-05-05 03:20:44 +00:00
Atsushi Eno 6981b2a7a7 2004-05-05 Atsushi Enomoto <[email protected]>
* DataColumnCollection.cs : We already had AutoIncrementValue(), so
	  use it instead of duplicating logic.

svn path=/trunk/mcs/; revision=26728
2004-05-05 03:11:57 +00:00
Atsushi Eno 551ac66cd4 2004-05-05 Atsushi Enomoto <[email protected]>
* ConstraintCollection.cs :
	  Use Table.CaseSensitive and Table.Locale to compare strings.
	  Duplicate constraint name exception does not occur under .NET 1.1.

svn path=/trunk/mcs/; revision=26727
2004-05-05 03:09:47 +00:00
Atsushi Eno 9b717ebc15 2004-05-05 Atsushi Enomoto <[email protected]>
* ConstraintCollectionTest.cs : uncommented some tests that should be
	  implemented until mono 1.0.
	* ConstraintTest.cs : use ExpectedException. Don't expect localizable
	  error message.
	* DataColumnTest.cs,
	  DataRelationTest.cs,
	  DataRowCollectionTest.cs : catch only specific type exception.
	  Don't rely on (test) localizable messages.
	* DataSetAssertion.cs : We shouldn't expect exact column ordinals
	  when infering/reading the structures from documents/schemas.

svn path=/trunk/mcs/; revision=26726
2004-05-05 02:59:48 +00:00
Atsushi Eno 5b732c062a 2004-05-05 Atsushi Enomoto <[email protected]>
* ArithmeticExpressions.cs: avoid null exception on add operation.

svn path=/trunk/mcs/; revision=26725
2004-05-05 02:45:02 +00:00
Ben Maurer f16bf50d6d shhhhh
svn path=/trunk/mcs/; revision=26724
2004-05-05 02:35:09 +00:00
Gonzalo Paniagua Javier a162b3ef2f 2004-05-05 Gonzalo Paniagua Javier <[email protected]>
* monop.cs: use assembly.LoadWithPartialName.

svn path=/trunk/mcs/; revision=26723
2004-05-05 02:29:39 +00:00
Gonzalo Paniagua Javier 1056209871 2004-05-05 Gonzalo Paniagua Javier <[email protected]>
* System.Web.Services/WebService.cs: added a HttpSessionState field
	and a setter method. Session now returns null if EnableSession is not
	set for the method invoked.

	* System.Web.Services.Protocols/HttpSimpleWebServiceHandler.cs:
	* System.Web.Services.Protocols/HttpSoapWebServiceHandler.cs:  use
	the session if the method has EnableSession set.

	* System.Web.Services.Protocols/LogicalMethodInfo.cs: added
	EnableSession property.

	* System.Web.Services.Protocols/WebServiceHandler.cs: set the Session
	object of the WebService.

	Fixes bug #57905 (needs the latest DefaultWsdlHelpGenerator.aspx).

svn path=/trunk/mcs/; revision=26722
2004-05-05 02:25:10 +00:00
Gonzalo Paniagua Javier 0618c232f9 2004-05-05 Gonzalo Paniagua Javier <[email protected]>
* data/DefaultWsdlHelpGenerator.aspx: add any cookie in the request to
	the request we do for the actual web service.

svn path=/trunk/mono/; revision=26721
2004-05-05 02:19:07 +00:00
Lluis Sanchez 2eba3b227e * support.cs: Don't hang when the file is empty.
svn path=/trunk/mcs/; revision=26720
2004-05-04 23:59:21 +00:00
Jordi Mas i Hernandez f63772fa3c rawformat should be handled by GDI+
svn path=/trunk/mcs/; revision=26719
2004-05-04 22:39:44 +00:00
Vladimir Vukicevic 840e2f96ba * BitmapData.cs: re-synchronized with libgdiplus; also
removed memory deallocs here (as the data is always owned
by libgdiplus)

svn path=/trunk/mcs/; revision=26718
2004-05-04 22:19:34 +00:00
Paolo Molaro 13a7c7d3bb Add inssel.h to the sources.
svn path=/trunk/mono/; revision=26717
2004-05-04 21:23:28 +00:00
Paolo Molaro 15694a95ca Fix Miguel's last minute breakage.
svn path=/trunk/mono/; revision=26716
2004-05-04 20:38:32 +00:00
Miguel de Icaza 58be6972de Remove gtk#
svn path=/trunk/mono/; revision=26715
2004-05-04 19:43:18 +00:00
Miguel de Icaza 2de4a59cd2 Map our internal codes to the C# codes
svn path=/trunk/mcs/; revision=26714
2004-05-04 19:23:48 +00:00
Miguel de Icaza 85f380edab For the Beta1, we will fix later
svn path=/trunk/mono/; revision=26712
2004-05-04 19:20:51 +00:00
Atsushi Eno 6f4a74d971 2004-05-04 Atsushi Enomoto <[email protected]>
* net_1_1/Makefile.am,
	  net_2_0/Makefile.am : replace gacutil -i with gacutil /i.

svn path=/trunk/mono/; revision=26711
2004-05-04 19:12:57 +00:00
Lluis Sanchez cd7ea36139 * support.cs: In SeekableStreamReader, compute the preamble size of the
underlying stream. Position changes should take into account that initial
	  count of bytes.

svn path=/trunk/mcs/; revision=26709
2004-05-04 19:01:17 +00:00
Jackson Harper 278eaf8351 * gacutil.cs: We need to overwrite existing libraries if they
already exist in the package directory on windows. Also made the
	code somewhat readable with 80 cols.

svn path=/trunk/mcs/; revision=26705
2004-05-04 17:04:53 +00:00
Dick Porter 9d0125942b 2004-05-04 Dick Porter <[email protected]>
* daemon.c (read_message): Return FALSE on error so the GSource
	callback itself can return FALSE.  Cures the infinite loop poll()
	warning on MacosX.
	* shared.c: Fix some daemon startup race conditions.

svn path=/trunk/mono/; revision=26704
2004-05-04 16:20:16 +00:00
Lluis Sanchez 6292505861 * XmlSchemaDataImporter.cs: Added little type check.
svn path=/trunk/mcs/; revision=26702
2004-05-04 15:08:03 +00:00
Ravindra b91fbf25a1 Minor change to make sample output little better with a white background and black color text.
svn path=/trunk/mcs/; revision=26701
2004-05-04 14:43:12 +00:00
Miguel de Icaza fdb156fd3b Update to include echos
svn path=/trunk/mono/; revision=26700
2004-05-04 14:34:43 +00:00
Ravindra 668a50ae10 Fixed Transform property in LinearGradientBrush.cs.
svn path=/trunk/mcs/; revision=26699
2004-05-04 14:16:33 +00:00
Gonzalo Paniagua Javier b5d55265c2 2004-05-04 Gonzalo Paniagua Javier <[email protected]>
* WebConfigurationSettings.cs: now it defaults to 'web.config' and if
	not found, 'Web.config'. Don't throw exception if both exists. Thanks
	to urs and dru for bugging me about this.

svn path=/trunk/mcs/; revision=26698
2004-05-04 14:16:12 +00:00
Ravindra 238da299bc * Pen.cs: Modified exception message. Fixed Transform, DashPattern,
and DashCap properties. Implementing CoumpoundArray, StartCap, EndCap
	properties and SetLineCap method. In constructors use IntPtr instead
	of int.
	* SolidBrush.cs: Modified exception message.
	* TextureBrush.cs: Fixed Transform property.
	* gdipFunctions.cs: Fixed P/Invokes for Pen.cs, TextureBrush.cs and
	LinearGradientBrush.cs.

svn path=/trunk/mcs/; revision=26697
2004-05-04 14:11:34 +00:00
Paolo Molaro a75d2e4a41 This may help with threads in FreeBSD.
svn path=/trunk/mono/; revision=26695
2004-05-04 14:02:07 +00:00
Jordi Mas i Hernandez 13e610d13e ImageRotateFlip sample
svn path=/trunk/mcs/; revision=26694
2004-05-04 13:57:58 +00:00
Lluis Sanchez f9d0715287 * DataSet.cs: Implemented support for runtime serialization. Fixed support
for xml serialization.
	* XmlDiffLoader.cs: Skip diffgram element when it is empty.

svn path=/trunk/mcs/; revision=26692
2004-05-04 12:11:44 +00:00
Zoltan Varga 2695c6169e 2004-05-04 Zoltan Varga <[email protected]>
* mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
	here.

svn path=/trunk/mono/; revision=26691
2004-05-04 12:11:13 +00:00
Gonzalo Paniagua Javier af9bb14dd7 2004-05-04 Gonzalo Paniagua Javier <[email protected]>
* configure.in: check for SIGEV_THREAD being defined before checking
	for AIO support. Fixes compilation under FreeBSD.

svn path=/trunk/mono/; revision=26690
2004-05-04 12:04:03 +00:00
Zoltan Varga bf3f31ae02 2004-05-04 Zoltan Varga <[email protected]>
* interp.c (ves_exec_method_with_context): Disable explicit assignment
	of 'esi' to the ip variable, since it causes register allocation errors
	on some versions of gcc. Fixes #58010.

svn path=/trunk/mono/; revision=26689
2004-05-04 11:47:19 +00:00
Lluis Sanchez c3c02a50b3 Added version to the ASMX handler type name
svn path=/trunk/mono/; revision=26687
2004-05-04 10:01:42 +00:00
Sanja Gupta c67423f29b ChangeLog: Updated ChangeLog
Image.cs: Implemented FrameDimensionsList property

svn path=/trunk/mcs/; revision=26686
2004-05-04 07:46:16 +00:00
Raja R Harinath 465c6f4ab4 * runtime/net_1_1/Makefile.am (mono_runtime): Use USE_JIT, not
JIT_SUPPORTED.
(install-data-local, uninstall-data-local): Run runtime with
libtool.
* runtime/net_2_0/Makefile.am: Likewise.
Report from Urs C Muff <[email protected]>.

svn path=/trunk/mono/; revision=26685
2004-05-04 07:38:05 +00:00
2044 changed files with 105877 additions and 45055 deletions

No files matched your search

+1
View File
@@ -20,3 +20,4 @@ mono.spec
autom4te.cache
mint.pc
stamp-h1
config.h.in
+185
View File
@@ -1,3 +1,188 @@
2004-05-31 Gonzalo Paniagua Javier <[email protected]>
* configure.in: fixlets for windows.
2004-05-29 Zoltan Varga <[email protected]>
* configure.in: export CC instead of passing it to libgc/configure.
2004-05-28 Duncan Mak <[email protected]>
* runtime/Makefile.am:
* scripts/Makefile.am: Include mono-find-provides and
mono-find-requires.
* scripts/mono-find-provides.in:
* scripts/mono-find-requires.in: New wrapper scripts.
2004-05-27 Zoltan Varga <[email protected]>
* configure.in: Pass CC to libgc configure.
2004-05-27 Gert Driesen ([email protected])
* monowiz.win32.nsi: normalized line-endings to unix (LF)
2004-05-27 Gert Driesen ([email protected])
* monowiz.win32.nsi: do not include mono subdirectory in
MonoConfigDir registry key, to match batch files
2004-05-26 Gonzalo Paniagua Javier <[email protected]>
* data/DefaultWsdlHelpGenerator.aspx: fixed querystring attribute
values. Now they are URlEncoded.
* data/browscap.ini.gz: updated.
2004-05-26 Raja R Harinath <[email protected]>
* Makefile.am (mcs-do-basic-build): No need to set MCS here.
* runtime/net_1_1/Makefile.am (gac_assemblies_list): Update to
reflect new names for nunit.util and nunit.framework. Add
nunit.core.
* runtime/net_2_0/Makefile.am (gac_assemblies_list): Likewise.
2004-05-25 Ben Maurer <[email protected]>
* config.h.in: remove
2004-05-25 18:30 CET Patrik Torstensson <[email protected]>
* configure.in: Check for trunc instead of truncl (HAVE_TRUNC)
2004-05-21 Gonzalo Paniagua Javier <[email protected]>
* Makefile.am:
* monowiz.win32.nsi: improved windows installer script.
2004-05-21 Raja R Harinath <[email protected]>
* README: Update to include instructions for the various new
bootstrap-like targets.
2004-05-20 Raja R Harinath <[email protected]>
* Makefile.am (get-monolite-latest, monolite-bootstrap):
New bootstrap targets to build from monolite.
Based on idea from Jaroslaw Kowalski <[email protected]>.
2004-05-20 Raja R Harinath <[email protected]>
* configure.in (AC_OUTPUT): Add tools/Makefile and
tools/locale-builder/Makefile.
* Makefile.am (SUBDIRS): Remove tools.
(DIST_SUBDIRS): Add 'tools'.
(bootstrap): Rewrite so that we get two new targets.
(faststrap): New two-stage build.
(fasterstrap): New one-stage build.
2004-05-19 Jackson Harper <[email protected]>
* tools/
* tools/Makefile.am: Add tools directory
* tools/locale-builder: Add the locale-builder tool, this tool is
not built by default as it is only needed by people that wish to
moidify culture data.
* Makefile.am: Add tools to build
Wed May 19 13:22:19 EDT 2004 Paolo Molaro <[email protected]>
* configure.in: make MacOSX default to use the included libgc.
2004-05-18 Zoltan Varga <[email protected]>
* configure.in: Get rid of -DMONO_USE_EXC_TABLES.
2004-05-19 Raja R Harinath <[email protected]>
* configure.in: Use proper autoconf idiom to pass additional
arguments to libgc/configure.
(PLATFORM_WIN32, NEED_LINK_UNLINK): Use three-argument AC_DEFINE.
* acconfig.h: Update to reflect changes.
2004-05-17 Raja R Harinath <[email protected]>
* Makefile.am (tmpinst-dir): Creates _tmpinst tree if
necessary. Move body ...
(tmpinst-dir.stamp): ... here.
(stage3): Don't remove _tmpinst tree.
(bootstrap-clean, bootstrap-check): New rules. They run the
corresponding rules in the mcs/ tree.
2004-05-14 Raja R Harinath <[email protected]>
* Makefile.am: Revert unlogged unexplained changes.
(stage3): Make 'all-profiles' since the mono source tarball
carries all the net_2_0 preview dlls.
2004-05-11 Jackson Harper <[email protected]>
* runtime/net_1_1/Makefile.am:
* runtime/net_2_0/Makefile.am: cscompmgd.dll is lowercase now.
2004-05-10 Raja R Harinath <[email protected]>
* Makefile.am (tmpinst-dir): Always add $tmpinst/lib to MONO_PATH.
Fix quoting of commands.
2004-05-08 Gonzalo Paniagua Javier <[email protected]>
* monowiz.win32.nsi: some changes i made to build the 0.91 win32 setup
file.
2004-05-07 Bernie Solomon <[email protected]>
* man/mono.1: mention MONO_EGD_SOCKET
2004-05-07 Raja R Harinath <[email protected]>
Goodbye 'fullbuild', hello 'bootstrap'.
* Makefile.am (bootstrap): New target for building from CVS. New
improved version of 'fullbuild' -- does not install any files.
(fullbuild): Obsolete target. Bootstraps and installs tree.
(mcs-tree-safe-build,xinstall-runtime,mcs-rest,remove-binaries):
Removed.
(stage1,stage1-mcs,stage1-mono,stage2,stage3)
(tmpinst-dir,tmpinst-runtime): New targets used to implement a
two-stage bootstrap.
2004-05-05 Gonzalo Paniagua Javier <[email protected]>
* configure.in: scandir check is no longer needed.
2004-05-05 Bernie Solomon <[email protected]>
* configure.in: set LIBC on HPUX
2004-05-05 Zoltan Varga <[email protected]>
* configure.in: Detect JNI headers in GNU classpath sources as well.
2004-05-05 Raja R Harinath <[email protected]>
* runtime/net_2_0/Makefile.am (install-data-local, uninstall-local):
Only disable this if INSTALL_2_0 is disabled.
2004-05-05 Gonzalo Paniagua Javier <[email protected]>
* data/DefaultWsdlHelpGenerator.aspx: add any cookie in the request to
the request we do for the actual web service.
2004-05-04 Gonzalo Paniagua Javier <[email protected]>
* configure.in: check for SIGEV_THREAD being defined before checking
for AIO support. Fixes compilation under FreeBSD.
2004-05-04 Raja R Harinath <[email protected]>
* runtime/net_1_1/Makefile.am (mono_runtime): Use USE_JIT, not
JIT_SUPPORTED.
(install-data-local, uninstall-data-local): Run runtime with
libtool.
* runtime/net_2_0/Makefile.am: Likewise.
Report from Urs C Muff <[email protected]>.
2004-05-03 Jackson Harper <[email protected]>
* man/gacutil.1: Basic man page for gacutil. This doesn't include
+126 -28
View File
@@ -1,11 +1,10 @@
AUTOMAKE_OPTIONS = foreign
SUBDIRS = @libgc_dir@ mono @ikvm_jni_dir@ docs runtime scripts man data samples support web
SUBDIRS = @libgc_dir@ mono @ikvm_jni_dir@ docs runtime scripts man data samples support web
# Keep in sync with SUBDIRS
DIST_SUBDIRS = libgc mono ikvm-jni docs runtime scripts man data samples support web
# EXTRA_SUBDIRS = libgc
## 'tools' is not normally built
DIST_SUBDIRS = libgc mono ikvm-jni docs runtime scripts man data samples support web tools
EXTRA_DIST= mono.pc.in mono.spec.in mint.pc.in
@@ -25,31 +24,136 @@ DISTCLEANFILES= mono.pc mint.pc
mcs_topdir=$(top_srcdir)/../mcs
.PHONY: fullbuild remove-binaries mcs-tree-safe-build xinstall-runtime mcs-rest
.PHONY: tmpinst-dir tmpinst-basic-build tmpinst-short-build tmpinst-full-build
.PHONY: bootstrap faststrap fasterstrap one-stage-strap two-stage-strap three-stage-strap bootstrap-clean bootstrap-check
.PHONY: mono-do-basic-build mcs-do-basic-build mcs-do-short-build mcs-do-full-build mcs-do-clean-profiles mcs-do-run-test
fullbuild: mcs-rest
if USE_JIT
mono_runtime = mono/mini/mono
else
mono_runtime = mono/interpreter/mint
endif
bootstrap: three-stage-strap
faststrap: mono-do-basic-build
$(MAKE) two-stage-strap
fasterstrap: mono-do-basic-build
$(MAKE) one-stage-strap
three-stage-strap: tmpinst-basic-build
$(MAKE) two-stage-strap
two-stage-strap: tmpinst-short-build
$(MAKE) one-stage-strap
one-stage-strap: tmpinst-full-build
rm -f $(top_srcdir)/runtime/*/*.dll $(top_srcdir)/runtime/*.exe
$(MAKE)
$(MAKE) install
mcs-tree-safe-build: remove-binaries
bootstrap-clean: clean mcs-do-clean-profiles
bootstrap-check: check mcs-do-run-test
# (takes advantage of 'make -j': independent subtasks are separate dependencies)
tmpinst-basic-build: mcs-do-basic-build mono-do-basic-build tmpinst-dir
mv -f $(mcs_topdir)/mcs/mcs.exe \
$(mcs_topdir)/class/lib/default/mscorlib.dll \
$(mcs_topdir)/class/lib/default/System.dll \
_tmpinst/lib
tmpinst-short-build: mcs-do-short-build
mv -f $(mcs_topdir)/mcs/mcs.exe \
$(mcs_topdir)/class/lib/default/mscorlib.dll \
$(mcs_topdir)/class/lib/default/System.dll \
$(mcs_topdir)/class/lib/default/System.Xml.dll \
$(mcs_topdir)/class/lib/default/Mono.CSharp.Debugger.dll \
_tmpinst/lib
tmpinst-full-build: mcs-do-full-build
cp -f $(mcs_topdir)/mcs/mcs.exe \
$(mcs_topdir)/class/lib/default/mscorlib.dll \
$(mcs_topdir)/class/lib/default/System.dll \
$(mcs_topdir)/class/lib/default/System.Xml.dll \
$(mcs_topdir)/class/lib/default/Mono.CSharp.Debugger.dll \
_tmpinst/lib
# Build enough of 'mono' to run the stage1 mcs.exe
mono-do-basic-build: $(CONFIG_HEADER)
if test -z "$(libgc_dir)"; then :; else cd libgc && $(MAKE) ; fi
cd mono && $(MAKE)
# Build stripped down versions of 'mcs', 'mscorlib.dll' and 'System.dll' with installed 'mcs'
## remove System.Xml.dll since it's a soft-dependency of System.dll
mcs-do-basic-build:
rm -f $(mcs_topdir)/mcs/mcs.exe $(mcs_topdir)/class/lib/default/mscorlib.dll
rm -f $(mcs_topdir)/class/lib/default/System.dll $(mcs_topdir)/class/lib/default/System.Xml.dll
cd $(mcs_topdir)/jay && $(MAKE)
cd $(mcs_topdir)/mcs && $(MAKE) MCS=mcs BOOTSTRAP_MCS=mcs PROFILE=default
cd $(mcs_topdir)/class/corlib && $(MAKE) MCS=mcs BOOTSTRAP_MCS=mcs PROFILE=default
cp $(mcs_topdir)/class/lib/default/mscorlib.dll $(top_srcdir)/runtime/net_1_1
cp $(mcs_topdir)/mcs/mcs.exe $(top_srcdir)/runtime
cd $(mcs_topdir)/mcs && $(MAKE) PROFILE=default BOOTSTRAP_MCS="mcs -d:BOOTSTRAP_WITH_OLDLIB"
cd $(mcs_topdir)/class/corlib && $(MAKE) PROFILE=default BOOTSTRAP_MCS="mcs -d:BOOTSTRAP_WITH_OLDLIB"
cd $(mcs_topdir)/class/System && $(MAKE) PROFILE=default BOOTSTRAP_MCS="mcs -d:BOOTSTRAP_WITH_OLDLIB"
xinstall-runtime: mcs-tree-safe-build $(CONFIG_HEADER)
if test -z "$(libgc_dir)"; then :; else cd libgc && $(MAKE) && $(MAKE) install ; fi
cd mono && $(MAKE) && $(MAKE) install
cd runtime && $(MAKE) dist_monobins_DATA=mcs.exe install-dist_monobinsDATA
cd runtime/net_1_1 && $(MAKE) install-dist_corlibDATA
mcs-do-short-build:
tmpinst=`cd _tmpinst && pwd` ; \
PATH=$$tmpinst/bin:$$PATH; export PATH ; \
for dir in jay mcs class/corlib class/System class/System.XML class/System class/Mono.CSharp.Debugger; do \
(cd $(mcs_topdir)/$$dir && $(MAKE) PROFILE=default) || exit 1 ; \
done
mcs-rest: xinstall-runtime
cd $(mcs_topdir) && $(MAKE)
mcs-do-full-build:
tmpinst=`cd _tmpinst && pwd` ; \
PATH=$$tmpinst/bin:$$PATH ; export PATH ; \
cd $(mcs_topdir) && $(MAKE) all-profiles
remove-binaries:
rm -f $(mcs_topdir)/class/lib/default/mscorlib.dll $(mcs_topdir)/mcs/mcs.exe $(top_srcdir)/runtime/*/*.dll $(top_srcdir)/runtime/*.exe
mcs-do-clean-profiles:
cd $(mcs_topdir) && $(MAKE) clean-profiles
mcs-do-run-test: tmpinst-dir
tmpinst=`cd _tmpinst && pwd` ; \
PATH=$$tmpinst/bin:$$PATH ; export PATH ; \
cd $(mcs_topdir) && $(MAKE) PROFILE=default run-test
tmpinst-dir.stamp: Makefile.am
set -e ; \
rootme=`pwd`; tmpinst=$$rootme/_tmpinst ; \
mkdir -p $$tmpinst $$tmpinst/bin $$tmpinst/lib ; \
echo '#! /bin/sh' > $$tmpinst/bin/mono ; \
echo 'if test -z "$$MONO_PATH" ; then MONO_PATH="'"$$tmpinst/lib"'"' >> $$tmpinst/bin/mono ; \
echo 'else MONO_PATH=$${MONO_PATH}:"'"$$tmpinst/lib"'" ; fi' >> $$tmpinst/bin/mono ; \
echo 'export MONO_PATH' >> $$tmpinst/bin/mono ; \
echo 'exec "'"$$rootme/libtool"'" --mode=execute "'"$$rootme/$(mono_runtime)"'" "$$@"' >> $$tmpinst/bin/mono ; \
echo '#! /bin/sh' > $$tmpinst/bin/mcs ; \
echo 'exec "'"$$tmpinst/bin/mono"'" "'"$$tmpinst/lib/mcs.exe"'" "$$@"' >> $$tmpinst/bin/mcs ; \
chmod +x $$tmpinst/bin/mono $$tmpinst/bin/mcs
echo "stamp" > $@
tmpinst-dir: tmpinst-dir.stamp
@if test -d _tmpinst; then :; else rm -f tmpinst-dir.stamp; $(MAKE) tmpinst-dir.stamp; fi
# building with monolite
get-monolite-latest:
wget -O $(srcdir)/../monolite-latest.tar.gz http://www.go-mono.com/daily/monolite-latest.tar.gz
tmpinst-monolite: tmpinst-dir
-rm -f _tmpinst/lib/mcs.exe _tmpinst/lib/*.dll
-rm -fr _tmpinst/monolite-*
srcdir=`cd $(srcdir) && pwd` && cd _tmpinst && ( gzip -d -c $$srcdir/../monolite-latest.tar.gz | tar xf - )
mv -f _tmpinst/monolite-*/mcs.exe _tmpinst/monolite-*/*.dll _tmpinst/lib
rm -fr _tmpinst/monolite-*
monolite-bootstrap: tmpinst-monolite mono-do-basic-build
rm -f $(mcs_topdir)/mcs/mcs.exe $(mcs_topdir)/class/lib/default/mscorlib.dll
rm -f $(mcs_topdir)/class/lib/default/System.dll $(mcs_topdir)/class/lib/default/System.Xml.dll Mono.CSharp.Debugger.dll
$(MAKE) two-stage-strap
# Obsolete target -- don't use.
.PHONY: fullbuild
fullbuild: bootstrap
$(MAKE) install
echo "*** 'fullbuild' is an obsolete target. Use 'make bootstrap && make install'."
exit 1
win32getdeps:
wget http://www.go-mono.com/archive/pkgconfig-0.11-20020310.zip
@@ -68,10 +172,4 @@ win32getdeps:
unzip -n -d / nsis4cygwin.zip
win32setup:
cp /usr/lib/libglib-2.0-0.dll @prefix@/lib
cp /usr/lib/iconv.dll @prefix@/lib
cp /usr/lib/libgmodule-2.0-0.dll @prefix@/lib
cp /usr/lib/libgobject-2.0-0.dll @prefix@/lib
cp /usr/lib/libgthread-2.0-0.dll @prefix@/lib
cp /usr/lib/libintl-1.dll @prefix@/lib
makensis /DMILESTONE=@VERSION@ /DSOURCE_INSTALL_DIR=`cygpath -a -w @prefix@`\\* monowiz.win32.nsi
makensis /DMILESTONE=$(VERSION) /DSOURCE_INSTALL_DIR=$(SOURCE_INSTALL_DIR) /DBUILDNUM=$(BUILDNUM) monowiz.win32.nsi
+92 -14
View File
@@ -59,14 +59,31 @@ This is Mono.
tar xzf mcs-XXXX.tar.gz
tar xzf mono-XXXX.tar.gz
cd mono-XXXX
mv mono-XXX mono
mv mcs-XXX mcs
cd mono
./autogen.sh --prefix=/usr/local
make fullbuild
make bootstrap
c. Upgrade from CVS
-------------------
c. Building the software from CVS
---------------------------------
If you are building the software from CVS, make sure that you
have up-to-date mcs and mono sources:
cvs co mono mcs
Then, go into the mono directory, and configure:
cd mono
./autogen.sh --prefix=/usr/local
Depending on whether you have an existing Mono installation or
not, you can try the following:
i. If you have an existing Mono installation
-----------------------------------------
If you are upgrading from CVS you will need an existing Mono installation.
First verify that you have a working installation:
echo 'class X { static void Main () { System.Console.Write("OK");}}' > x.cs
@@ -79,25 +96,86 @@ This is Mono.
mono x.exe
If you get the output `OK' and no errors, you are ready to start your CVS upgrade.
If you get the output `OK' and no errors, and you have mono
version 0.31 or later, continue. Otherwise, you can try option
(ii) below.
First, make sure that you have up-to-date mcs and mono sources:
You are ready to start your CVS upgrade. Compile with
cvs co mono mcs
make bootstrap
Then, go into the mono directory, and configure:
This will automatically go into the mcs/ tree and build the
binaries there, and copy them into the appropriate
sub-directories of mono/runtime/.
cd mono
./autogen.sh --prefix=/usr/local
Now, go to step (iii) below.
Then compile using the special target `fullbuild':
ii. If you don't have a working Mono installation
---------------------------------------------
make fullbuild
If you don't have a working Mono installation, an obvious choice
is to install the latest released packages of 'mono' for your
distribution and go back to step (i).
This step will compile and install at the same time.
You can also try a slightly more risky approach that should work
almost all the time.
This works by first getting the latest version of the 'monolite'
distribution, which contains just enough to run the 'mcs'
compiler. You do this by
make get-monolite-latest
This should place a monolite-latest.tar.gz in the parent
directory of the 'mono' source tree. You can then run:
make monolite-bootstrap
This will automatically gunzip and untar the tarball, place the
files appropriately, and then complete the bootstrap.
iii. Testing and Installation
------------------------
You can run the mono and mcs testsuites with the command:
make -k bootstrap-check
Expect to find several testsuite failures, especially in the
mcs/ tree. As a sanity check, you can compare the failures you
got with
http://go-mono.com/tests/displayTestResults.php
You can now install it:
make install
Failure to follow these steps will result in a broken installation.
iv. Other useful "bootstrap"-like facilities
----------------------------------------
If you have a CVS snapshot that you keep updating periodically,
and/or do your development in, you may try using a couple of
specialty make targets that may be slightly faster than a
"make bootstrap".
You can try a two-stage bootstrap with:
make faststrap
This assumes that you have already run a "make bootstrap" on the
tree before.
If you want to avoid waiting even for that, you can try the
riskier one-stage build:
make fasterstrap
This should be attempted only if you're sure that the sources of
the mcs compiler itself and the sources of the libraries used by
it have not been changed.
2. Using Mono
=============
-2
View File
@@ -10,7 +10,6 @@
#undef HAVE_PTHREAD_MUTEX_TIMEDLOCK
#undef USE_MONO_MUTEX
#undef HAVE_LARGE_FILE_SUPPORT
#undef PLATFORM_WIN32
#undef HAVE_NEW_ICONV
#undef NAME_DEV_RANDOM
#undef HAVE_CRYPT_RNG
@@ -21,7 +20,6 @@
#undef HAVE_TM_GMTOFF
#undef MONO_SIZEOF_SUNPATH
#undef MONO_ZERO_ARRAY_LENGTH
#undef NEED_LINK_UNLINK
#undef PTHREAD_POINTER_ID
#undef HAVE_GC_H
#undef HAVE_GC_GCJ_MALLOC
-189
View File
@@ -1,189 +0,0 @@
/* config.h.in. Generated from configure.in by autoheader. */
#undef HAVE_INET_PTON
#undef HAVE_INET_ATON
#undef HAVE_MSG_NOSIGNAL
#undef HAVE_SOL_IP
#undef HAVE_SOL_TCP
#undef HAVE_SOL_IPV6
#undef HAVE_IP_PKTINFO
#undef HAVE_STRUCT_IP_MREQN
#undef HAVE_STRUCT_IP_MREQ
#undef HAVE_PTHREAD_MUTEX_TIMEDLOCK
#undef USE_MONO_MUTEX
#undef HAVE_LARGE_FILE_SUPPORT
#undef PLATFORM_WIN32
#undef HAVE_NEW_ICONV
#undef NAME_DEV_RANDOM
#undef HAVE_CRYPT_RNG
#undef HAVE_BOEHM_GC
#undef USE_INCLUDED_LIBGC
#undef DISABLE_SHARED_HANDLES
#undef HAVE_TIMEZONE
#undef HAVE_TM_GMTOFF
#undef MONO_SIZEOF_SUNPATH
#undef MONO_ZERO_ARRAY_LENGTH
#undef NEED_LINK_UNLINK
#undef PTHREAD_POINTER_ID
#undef HAVE_GC_H
#undef HAVE_GC_GCJ_MALLOC
#undef HAVE_GC_ENABLE
#undef WITH_BUNDLE
#undef HAVE_GETHOSTBYNAME2_R
#undef HAVE_ICU
#undef HAVE_KW_THREAD
#undef HAVE_SIGNBIT
#undef USE_MACH_SEMA
#undef HAVE_SOCKLEN_T
#undef HAVE_TRUNCL
#undef HAVE_AINTL
#undef HAVE_WORKING_SIGALTSTACK
/* Define to 1 if you have the <aio.h> header file. */
#undef HAVE_AIO_H
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the <elf.h> header file. */
#undef HAVE_ELF_H
/* Define to 1 if you have the `finite' function. */
#undef HAVE_FINITE
/* Define to 1 if you have the <gc/gc.h> header file. */
#undef HAVE_GC_GC_H
/* Define to 1 if you have the <gc.h> header file. */
#undef HAVE_GC_H
/* Define to 1 if you have the `getgrgid_r' function. */
#undef HAVE_GETGRGID_R
/* Define to 1 if you have the `getgrnam_r' function. */
#undef HAVE_GETGRNAM_R
/* Define to 1 if you have the `getpwnam_r' function. */
#undef HAVE_GETPWNAM_R
/* Define to 1 if you have the `getpwuid_r' function. */
#undef HAVE_GETPWUID_R
/* Define to 1 if you have the `getresuid' function. */
#undef HAVE_GETRESUID
/* Define to 1 if you have the `inet_aton' function. */
#undef HAVE_INET_ATON
/* Define to 1 if you have the `inet_pton' function. */
#undef HAVE_INET_PTON
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the `isfinite' function. */
#undef HAVE_ISFINITE
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <netdb.h> header file. */
#undef HAVE_NETDB_H
/* Define to 1 if you have the `poll' function. */
#undef HAVE_POLL
/* Define to 1 if you have the `pthread_attr_get_np' function. */
#undef HAVE_PTHREAD_ATTR_GET_NP
/* Define to 1 if you have the `pthread_attr_setstacksize' function. */
#undef HAVE_PTHREAD_ATTR_SETSTACKSIZE
/* Define to 1 if you have the `pthread_getattr_np' function. */
#undef HAVE_PTHREAD_GETATTR_NP
/* Define to 1 if you have the <pthread.h> header file. */
#undef HAVE_PTHREAD_H
/* Define to 1 if you have the `pthread_mutex_timedlock' function. */
#undef HAVE_PTHREAD_MUTEX_TIMEDLOCK
/* Define to 1 if you have the <semaphore.h> header file. */
#undef HAVE_SEMAPHORE_H
/* Define to 1 if you have the `setresuid' function. */
#undef HAVE_SETRESUID
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <sys/aio.h> header file. */
#undef HAVE_SYS_AIO_H
/* Define to 1 if you have the <sys/filio.h> header file. */
#undef HAVE_SYS_FILIO_H
/* Define to 1 if you have the <sys/sockio.h> header file. */
#undef HAVE_SYS_SOCKIO_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <sys/un.h> header file. */
#undef HAVE_SYS_UN_H
/* Define to 1 if you have the `truncl' function. */
#undef HAVE_TRUNCL
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to 1 if you have the <utime.h> header file. */
#undef HAVE_UTIME_H
/* Define to 1 if you have the <valgrind/memcheck.h> header file. */
#undef HAVE_VALGRIND_MEMCHECK_H
/* Define to 1 if you have the <wchar.h> header file. */
#undef HAVE_WCHAR_H
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Pointer field name in 'union sigval' */
#undef SIGVAL_PTR
/* The size of a `void *', as computed by sizeof. */
#undef SIZEOF_VOID_P
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Version number of package */
#undef VERSION
+73 -40
View File
@@ -1,7 +1,7 @@
AC_INIT(README)
AC_CANONICAL_SYSTEM
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(mono,0.91)
AM_INIT_AUTOMAKE(mono,0.95)
AM_MAINTAINER_MODE
dnl
@@ -30,21 +30,29 @@ AC_SUBST(libmono_ldflags)
dnl if linker handles the version script
no_version_script=no
# Set to yes if Unix sockets cannot be created in an anonymous namespace
need_link_unlink=no
# Thread configuration inspired by sleepycat's db
AC_MSG_CHECKING([host platform characteristics])
libgc_threads=no
case "$host" in
*-*-mingw*|*-*-cygwin*)
platform_win32=yes
AC_DEFINE(PLATFORM_WIN32)
AC_DEFINE(PLATFORM_WIN32,1,[Platform is Win32])
CC="gcc -mno-cygwin"
HOST_CC="gcc"
# So libgc configure gets -mno-cygwin
export CC
# latest libgc already defines GC_WIN32_THREADS
# CPPFLAGS="$CPPFLAGS -DGC_WIN32_THREADS -DWIN32_THREADS"
CPPFLAGS="$CPPFLAGS -DWIN32_THREADS"
libdl=
libgc_threads=win32
gc_default=boehm
with_nptl=no
with_sigaltstack=no
;;
*-*-*netbsd*)
platform_win32=no
@@ -52,25 +60,25 @@ case "$host" in
libmono_cflags="-D_REENTRANT"
LDFLAGS="$LDFLAGS -pthread"
libmono_ldflags="-pthread"
AC_DEFINE(NEED_LINK_UNLINK)
need_link_unlink=yes
libdl=
libgc_threads=pthreads
libgc_threads=no
;;
*-*-*freebsd*|*-*-*openbsd*)
platform_win32=no
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE -DGC_FREEBSD_THREADS"
libmono_cflags="-D_THREAD_SAFE"
LDFLAGS="$LDFLAGS -pthread"
libmono_ldflags="-pthread"
AC_DEFINE(NEED_LINK_UNLINK)
need_link_unlink=yes
AC_DEFINE(PTHREAD_POINTER_ID)
libdl=
libgc_threads=pthreads
;;
*-*-linux*)
platform_win32=no
CPPFLAGS="$CPPFLAGS -DGC_LINUX_THREADS -DMONO_USE_EXC_TABLES -D_GNU_SOURCE -D_REENTRANT -fexceptions"
libmono_cflags="-DMONO_USE_EXC_TABLES -fexceptions -D_REENTRANT"
CPPFLAGS="$CPPFLAGS -DGC_LINUX_THREADS -D_GNU_SOURCE -D_REENTRANT"
libmono_cflags="-D_REENTRANT"
libmono_ldflags="-lpthread"
libdl="-ldl"
libgc_threads=pthreads
@@ -83,12 +91,12 @@ case "$host" in
libmono_cflags="-D_REENTRANT"
libmono_ldflags="-lpthread"
libgc_threads=pthreads
AC_DEFINE(NEED_LINK_UNLINK)
need_link_unlink=yes
;;
*-*-solaris*)
platform_win32=no
CPPFLAGS="$CPPFLAGS -DGC_SOLARIS_THREADS -DGC_SOLARIS_PTHREADS -D_REENTRANT"
AC_DEFINE(NEED_LINK_UNLINK)
need_link_unlink=yes
libmono_cflags="-D_REENTRANT"
libgc_threads=pthreads
;;
@@ -98,13 +106,12 @@ case "$host" in
libmono_cflags="-D_THREAD_SAFE"
LDFLAGS="$LDFLAGS -pthread"
libmono_ldflags="-pthread"
AC_DEFINE(NEED_LINK_UNLINK)
need_link_unlink=yes
AC_DEFINE(PTHREAD_POINTER_ID)
AC_DEFINE(USE_MACH_SEMA)
no_version_script=yes
libdl=
libgc_threads=no
gc_default=none
libgc_threads=pthreads
;;
*)
AC_MSG_WARN([*** Please add $host to configure.in checks!])
@@ -113,6 +120,11 @@ case "$host" in
;;
esac
AC_MSG_RESULT(ok)
if test x$need_link_unlink = xyes; then
AC_DEFINE(NEED_LINK_UNLINK, 1, [Define if Unix sockets cannot be created in an anonymous namespace])
fi
AM_CONDITIONAL(PLATFORM_WIN32, test x$platform_win32 = xyes)
AC_CHECK_TOOL(CC, gcc, gcc)
@@ -308,9 +320,9 @@ case "x$gc" in
;;
esac
we_are_embedded_in_mono=yes
export we_are_embedded_in_mono
export libgc_threads
# tell libgc/configure about what we want
ac_configure_args="$ac_configure_args --disable-embed-check --with-libgc-threads=$libgc_threads"
AM_CONDITIONAL(INCLUDED_LIBGC, test x$use_included_gc = xyes)
AC_SUBST(LIBGC_CFLAGS)
@@ -349,10 +361,15 @@ if test x$platform_win32 = xno; then
else
if test -d $with_jdk_dir/include/solaris; then
jdk_platform=solaris
else
if test -f $with_jdk_dir/include/jni_md.h; then
# GNU Classpath sources
jdk_platform=
else
jdk_headers_found=no
fi
fi
fi
else
jdk_headers_found=no
fi
@@ -849,30 +866,42 @@ if test x$platform_win32 = xno; then
AC_MSG_RESULT(no)
])
dnl *********************
dnl * Check for scandir *
dnl *********************
AC_CHECK_FUNCS(scandir)
dnl *********************
dnl *** Check for AIO ***
dnl *********************
AC_CHECK_HEADERS(aio.h sys/aio.h)
AC_CHECK_LIB(rt, aio_read, [ LIBS="$LIBS -lrt" ],)
SIGVAL_PTR="undefined"
if test "$ac_cv_header_aio_h" = "yes" -o "$ac_cv_header_sys_aio_h" = "yes" ; then
AC_CHECK_MEMBER(union sigval.sigval_ptr,SIGVAL_PTR="sigval_ptr",, [
#include <sys/signal.h>
])
AC_CHECK_MEMBER(union sigval.sival_ptr,SIGVAL_PTR="sival_ptr",, [
#include <sys/signal.h>
])
if test "$SIGVAL_PTR" = "undefined" ; then
AC_MSG_ERROR([Unable to detect field name in 'union sigval'])
AC_MSG_CHECKING([for SIGEV_THREAD definition])
dnl Some systems (FreeBSD at least) may have aio_read
dnl but don't support/define SIGEV_THREAD.
AC_TRY_COMPILE([
#include <sys/signal.h>
],[
int x = SIGEV_THREAD;
],[
ac_cv_c_sigev_thread=yes
AC_MSG_RESULT(yes)
],[
AC_MSG_RESULT(no)
])
if test "$ac_cv_c_sigev_thread" = "yes" ; then
AC_CHECK_HEADERS(aio.h sys/aio.h)
AC_CHECK_LIB(rt, aio_read, [ LIBS="$LIBS -lrt" ],)
SIGVAL_PTR="undefined"
if test "$ac_cv_header_aio_h" = "yes" -o "$ac_cv_header_sys_aio_h" = "yes" ; then
AC_CHECK_MEMBER(union sigval.sigval_ptr,SIGVAL_PTR="sigval_ptr",, [
#include <sys/signal.h>
])
AC_CHECK_MEMBER(union sigval.sival_ptr,SIGVAL_PTR="sival_ptr",, [
#include <sys/signal.h>
])
if test "$SIGVAL_PTR" = "undefined" ; then
AC_MSG_ERROR([Unable to detect field name in 'union sigval'])
fi
fi
AC_DEFINE_UNQUOTED(SIGVAL_PTR,$SIGVAL_PTR,[Pointer field name in 'union sigval'])
fi
AC_DEFINE_UNQUOTED(SIGVAL_PTR,$SIGVAL_PTR,[Pointer field name in 'union sigval'])
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?))
fi
@@ -892,13 +921,13 @@ ac_cv_c_socklen_t=yes
AC_MSG_RESULT(no)
])
AC_CHECK_FUNCS(truncl, , AC_MSG_CHECKING(for truncl in math.h)
AC_CHECK_FUNCS(trunc, , AC_MSG_CHECKING(for trunc in math.h)
AC_TRY_LINK([#include <math.h>],
[ truncl(0.0); ],
[ trunc(0.0); ],
[
AC_DEFINE(HAVE_TRUNCL)
AC_DEFINE(HAVE_TRUNC)
AC_MSG_RESULT(yes)
ac_cv_truncl=yes
ac_cv_trunc=yes
],
AC_MSG_RESULT(no)))
@@ -924,7 +953,7 @@ case "{$target}" in
dnl Win32 does not have /dev/random, they have their own method...
*-*-mingw*|*-*-cygwin*)
ac_cv_have_dev_random = no
ac_cv_have_dev_random=no
;;
dnl Everywhere else, it's /dev/random
@@ -1038,6 +1067,7 @@ case "$host" in
arch_target=sparc;
JIT_SUPPORTED=yes
ACCESS_UNALIGNED="no"
LIBC="libc.so"
jit_wanted=true
;;
# alpha*-*-linux* | alpha*-*-osf*)
@@ -1060,6 +1090,7 @@ case "$host" in
hppa2.0w-hp-hpux11.00 | hppa64-hp-hpux11.00)
TARGET=HPPA;
arch_target=hppa;
LIBC="libc.sl"
ACCESS_UNALIGNED="no"
;;
macppc-*-openbsd* | powerpc-*-linux* | powerpc-*-openbsd* | \
@@ -1068,7 +1099,6 @@ case "$host" in
arch_target=ppc;
JIT_SUPPORTED=yes
jit_wanted=true
LIBC="libc.dylib"
;;
arm-*-linux-* | armv4l-*-linux-*)
TARGET=ARM;
@@ -1106,6 +1136,7 @@ libsuffix=".so"
case "$host" in
powerpc-*-darwin*)
libsuffix=".dylib"
LIBC="libc.dylib"
;;
esac
AC_SUBST(libsuffix)
@@ -1213,6 +1244,8 @@ samples/Makefile
support/Makefile
data/config
mono.spec
tools/Makefile
tools/locale-builder/Makefile
])
echo "
+12 -1
View File
@@ -316,7 +316,7 @@ string GetTestResult ()
{
if (fill) {
if (qs != "") qs += "&";
qs += Request.QueryString.GetKey(n) + "=" + Request.QueryString [n];
qs += Request.QueryString.GetKey(n) + "=" + Server.UrlEncode (Request.QueryString [n]);
}
if (Request.QueryString.GetKey(n) == "ext") fill = true;
}
@@ -338,6 +338,17 @@ string GetTestResult ()
try
{
WebRequest req = WebRequest.Create (location + "/" + CurrentOperationName + "?" + qs);
HttpCookieCollection cookies = Request.Cookies;
int last = cookies.Count;
if (last > 0) {
CookieContainer container = new CookieContainer ();
for (int i = 0; i < last; i++) {
HttpCookie hcookie = cookies [i];
Cookie cookie = new Cookie (hcookie.Name, hcookie.Value, hcookie.Path, hcookie.Domain);
container.Add (cookie);
}
((HttpWebRequest) req).CookieContainer = container;
}
WebResponse resp = req.GetResponse();
StreamReader sr = new StreamReader (resp.GetResponseStream());
string s = sr.ReadToEnd ();
Binary file not shown.
-11
View File
@@ -4,17 +4,6 @@
<dllmap dll="libxslt.dll" target="libxslt@libsuffix@" />
<dllmap dll="libmySQL.dll" target="libmysqlclient@libsuffix@" />
<dllmap dll="odbc32.dll" target="libodbc@libsuffix@" />
<dllmap dll="libglib-2.0-0.dll" target="libglib-2.0@libsuffix@" />
<dllmap dll="libgobject-2.0-0.dll" target="libgobject-2.0@libsuffix@" />
<dllmap dll="libgthread-2.0-0.dll" target="libgthread-2.0@libsuffix@" />
<dllmap dll="libpango-1.0-0.dll" target="libpango-1.0@libsuffix@" />
<dllmap dll="libatk-1.0-0.dll" target="libatk-1.0@libsuffix@" />
<dllmap dll="libgdk-win32-2.0-0.dll" target="libgdk-x11-2.0@libsuffix@" />
<dllmap dll="libgdk_pixbuf-2.0-0.dll" target="libgdk_pixbuf-2.0@libsuffix@" />
<dllmap dll="libgtk-win32-2.0-0.dll" target="libgtk-x11-2.0@libsuffix@" />
<dllmap dll="libglade-2.0-0.dll" target="libglade-2.0@libsuffix@" />
<dllmap dll="oci" target="clntsh" />
<dllmap dll="gtkhtml-3.0" target="libgtkhtml-3.0@libsuffix@" />
<dllmap dll="db2cli" target="libdb2_36@libsuffix@"/>
<dllmap dll="gstreamer" target="libgstreamer-0.6@libsuffix@" />
</configuration>
+1 -2
View File
@@ -77,8 +77,7 @@
<httpHandlers>
<add verb="*" path="Trace.axd" type="System.Web.Handlers.TraceHandler, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.aspx" type="System.Web.UI.PageHandlerFactory, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.asmx" validate="false"
type="System.Web.Services.Protocols.WebServiceHandlerFactory, System.Web.Services" />
<add verb="*" path="*.asmx" validate="false" type="System.Web.Services.Protocols.WebServiceHandlerFactory, System.Web.Services, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.ashx" type="System.Web.UI.SimpleHandlerFactory, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="GET" path="WebResource.axd" type="System.Web.Handlers.AssemblyResourceLoader, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.asax" type="System.Web.HttpForbiddenHandler, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
-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
+525
View File
@@ -0,0 +1,525 @@
Here "abc" stays for "array bounds check", or "array bound checks", or
some combination of the two...
------------------------------------------------------------------------------
USAGE
Simply use the "abcrem" optimization invoking mono.
To see if bound checks are actually removed, use "mono -v" and grep for
"ARRAY-ACCESS" in the output, there should be a message for each check
that has been removed.
To trace the algorithm execution, use "-v -v -v", and be prepared to be
totally submersed by debugging messages...
------------------------------------------------------------------------------
EFFECTIVENESS
The abc removal code can now always remove bound checks from "clean"
array scans in loops, and generally anyway there are clear conditions that
already state that the index is "safe".
To be clearer, and give an idea of what the algorithm can and cannot do
without describing it in detail... keep in mind that only "redunant" checks
cannot be removed. By "redundant", I mean "already explicitly checked" in
the method code.
Unfortunately, analyzing complex expressions is not so easy (see below for
details), so the capabilities of this "abc remover" are limited.
These are simple guidelines:
- Only simple comparisons between variables are understood.
- Only increment-decrement operations are handled.
- "switch" statements are not yet handled.
This means that code like this will be handled well:
for (int i = 0; i < a.Length; i++) {
a [i] = .....
}
The "i" variable could be declared out of the "for", the "for" could be a
"while", and maybe even implemented with "goto", the array could be scanned
in reverse order, and everything would still work.
I could have a temporary variable storing the array length, and check on
it inside the loop, and the abc removal would still occurr, like this:
int i = 0;
int l = a.Length;
while ( i < l ) {
a [i] ......
}
or this:
int l = a.Length;
for (int i = l; i > 0; i--) {
a [i] = .....
}
But just something like this
for (int i = 0; i < (a.Length -1); i++) .....
or like this
for (int i = 0; i < a.Length; i += 2) .....
would not work, the check would stay there, sorry :-(
Just to make you understand how things are tricky... this would work!
int limit = a.Length - 1;
for (int i = 0; i < limit; i++) {
a [i] = .....
}
A detailed explanation of the reason why things are done like this is given
below...
All in all, the compiling phase is generally non so fast, and the abc removed
are so few, that there is hardly a performance gain in using the "abcrem"
flag in the compiling options for short programs like the ones I tried.
Anyway, various bound checks *are* removed, and this is good :-)
------------------------------------------------------------------------------
THE ALGORITHM
Unfortunately, this time google has not been my friend, and I did not
find an algorithm I could reasonably implement in the time frame I had,
so I had to invent one. The two cleasses of algorithms I found were either
simply an analisys of variable ranges (which is not very different from
what I'm doing), or they were based on type systems richer than the .NET
one (particularly, they required integer types to have an explicit range,
which could be related to array ranges). By the way, it seems that the
gcj people do not have an array bound check removal optimization (they
just have a compiler flag that unconditionally removes all the checks,
but this is not what we want).
This array bound check removal (abc removal) algorithm is based on
symbolic execution concepts. I handle the removal like an "unreachable
code elimination" (and in fact the optimization could be extended to remove
also other unreachable sections of code, due to branches that "always go the
same way").
In symbolic execution, variables do not have actual (numeric) values, but
instead symbolic expressions (like "a", or "x+y").
Also, branch conditions are handled like symbolic conditions (like "i<k"),
which state relations between variable values.
The SSA representation inside mini is somewhat close to a symbolic
representation of the execution of the compiled method.
Particularly, the representation of variable values is exactly a symbolic
one. It is enough to find all CEE_STIND_* instructions which store to a
local variable, and their second argument is exactly the variable value.
Actually, "cfg->vars [<variable-index>]->def" should contain exactly
those store instructions, and the "get_variable_value_from_ssa_store"
function extracts the variable value from there.
On the other hand, the conditions under which each basic block is
executed are not made fully explicit.
However, it is not difficult to make them so.
Each BB that has more than one exit BB, in practice must end either with
a conditional branch instruction or with a switch instruction.
In the first case, the BB has exactly two exit BBs, and their execution
conditions are easy to get from the condition of the branch (see the
"get_relation_from_branch_instruction" function, and expecially the end of
"analyze_block" in abcremoval.c.
If there is a switch, the jump condition of every exit BB is the equality
of the switch argument with the particular index associated with its case
(but the current implementation does not handle switch statements yet).
These individual conditions are in practice associated to each arc that
connects BBs in the CFG (with the simple case that unconditional branches
have a "TRUE" condition, because they always happen).
So, for each BB, its *proper* entry condition is the union of all the
conditions associated to arcs that enter the BB. The "union" is like a
logical "or", in the sense that either of the condition could be true,
they are not necessarily all true. This means that if I can enter a BB
in two ways, and in one case I know that "x>0", and in the other that
"x==0", actually in the BB I know that "x>=0", which is a weaker
condition (the union of the two).
Also, the *complete* entry condition for a BB is the "intersection" of all
the entry conditions of its dominators. This is true because each dominator
is the only way to reach the BB, so the entry condition of each dominator
must be true if the control flow reached the BB. This translates to the
logical "and" of all the "proper" conditions of the BBs met walking up in the
dominator tree. So, if one says "x>0", and another "x==1", then I know
that "x==1", which is a stronger condition (the intersection of the two).
Note that, if the two conditions were "x>0" and "x==0", then the block would
be unreachable (the intersection is empty), because some branch is impossible.
Another observation is that, inside each BB, every variable is subject to the
complete entry condition of that very same BB, and not the one in which it is
defined (with the "complete entry condition" being the thing I defined before,
sorry if these terms "proper" and "complete" are strange, I found nothing
better).
This happens because the branch conditions are related to the control flow.
I can define "i=a", and if I am in a BB where "a>0", then "i>0", but not
otherwise.
So, intuitively, if the available conditions say "i>=0", and i is used as an
index in an array access, then the lower bound check can be omitted.
If the condition also says "(i>=0)&&(i<array.length)", the abc removal can
occur.
So, a complete solution to the problem of abc removal would be the following:
for each array access, build a system of equations containing:
[1] all the symbolic variable definitions
[2] the complete entry condition of the BB in which the array access occurs
[3] the two "goal functions" ("index >=0" and "index < array.length")
If the system is valid for *each possible* variable value, then the goal
functions are always true, and the abc can be removed.
All this discussion is useful to give a precise specification to the problem
we are trying to solve.
The trouble is that, in the general case, the resulting system of equations
is like a predicate in first order logic, which is semi-decidable, and its
general solution is anyway too complex to be attempted in a JIT compiler
(which should not contain a full fledged theorem prover).
Therefore, we must cut some corner.
By the way, there is also another big problem, which is caused by "recursive"
symbolic definitions. These definition can (and generally do) happen every
time there is a loop. For instance, in the following piece of code
for ( int i = 0; i < array.length; i++ ) {
Console.WriteLine( "array [i] = " + array [i] );
}
one of the definitions of i is a PHI that can be either 0 or "i + 1".
Now, we know that mathematically "i = i + 1" does not make sense, and in
fact symbolic values are not "equations", they are "symbolic definitions".
The symbolic value of i is a generic "n", where "n" is the number of
iterations of the loop, but this is terrible to handle (and in more complex
examples the symbolic definition of i simply cannot be written, because i is
calculated in an iterative way).
However, the definition "i = i + 1" tells us something about i: it tells us
that i "grows". So (from the PHI definition) we know that i is either 0, or
"grows". This is enough to tell that "i>=0", which is what we want!
It is important to note that recursive definitions can only occurr inside
PHI definitions, because actually a variable cannot be defined *only* in terms
of itself!
At this point, I can explain which corners I want to cut to make the
problem solvable. It will not remove all the abc that could theoretically
be removed, but at least it will work.
The easiest way to cut corners is to only handle expressions which are
"reasonably simple", and ignore the rest.
Keep in mind that ignoring an expression is not harmful in itself.
The algorithm will be simply "less powerful", because it will ignore
conditions that could have caused to the removal of an abc, but will
not remove checks "by mistake" (so the resulting code will be in any case
correct).
In a first attempt, we can consider only conditions that have the simple
possible form, which is "(compare simpleExpression simpleExpression)",
where "simpleExpression" is either "(ldind.* local[*])" or
"(ldlen (ldind.ref local[*]))" (or a constant, of course).
We can also "summarize" variable definitions, keeping only what is relevant
to know: if they are greater or smaller than zero or other variables.
One particular note on PHI functions: they work (obviously) like the logical
"or" of their definitions, and therefore are equivalent to the "logical or"
of the summarization of their definitions.
About recursive definitions (which, believe me, are the worst thing in all
this mess), we handle only "monotonic" ones. That is, we try to understand
if the recursive definition (which, as we said above, must happen because
of a loop) always "grows" or "gets smaller". In all other cases, we decide
we cannot handle it.
So, the algorithm to optimize one method could be something like:
[1] Build the SSA representation.
[2] Analyze each BB. Particularly, do the following:
[2a] summarize its exit conditions
[2b] summarize all the variable definitions occurring in the BB
[2c] check if it contains array accesses (only as optimization, so that
step 3 will be performed only when necessary)
[3] Perform the removal. For each BB that contains array accesses, do:
[3a] build an evaluation area where for each variable we keep track
of its relations with zero and with each other variable.
[3b] populate the evaluation area with the initial data (the variable
definitions and the complete entry condition of the BB)
[3c] propagate the relations between variables (so that from "a<b" and
"b<c" we know that "a<c") in the evaluation area
[3d] for each array access in the BB, use the evaluation area to "match
conditions", to see if the goal functions are satisfied
------------------------------------------------------------------------------
LOW LEVEL DESIGN DECISIONS
One of the problems I had to solve was the representation of the relations
between symbolic values.
The "canonical" solution would be to have a complex, potentially recursive
data structure, somewhat similar to MonoInst, and use it all the time (maybe
MonoInst could be used "as is").
The problem is that, at this point, the software would have to "play" with
these structures, for instance to deduce "b < a-1" from "a > b+1", because we
are interested in what value b has, and not a. And maybe the software should
be able to do this without modifying the original condition, because it was
used elsewhere (or could be reused).
Then, the software should also be able to apply logical relations to
conditions (like "(a>0)||(c<1)"), and manipulate them, too.
In my opinion, an optimizer written in this way risks to be too complex, and
its performance not acceptable in a JIT compiler.
Therefore, I decided to represent values in a "summarized" way.
For instance, "x = a + 1" becomes "x > a" (and, by the way, "x = x + 1"
would look like "x > x", which means that "x grows").
So, each variable value is simply a "relation" of the variable with other
variables or constants. Anything more complex is ignored.
Relations are represented with flags (EQ, LT and GT), so that it is easy
to combine them logically (it is enough to perform the bitwise operations
on the flags). The condition (EQ|LT|GT) means we know nothing special, any
value is possible. The empty condition would mean an unreachable statement
(because no value is acceptable).
There is still the problem of identifying variables, and where to store all
these relations. After some thinking, I decided that a "brute force" approach
is the easier, and probably also the fastest. In practice, I keep in memory
an array of "variable relations", where for each variable I record its
relation with the constants 0 and 1 and an array of its relations with all
other variables. The evaluation area, therefore, looks like a square matrix
as large as the number of variables. I *know* that the matrix is rather sparse
(in the sense that only few of its cells are significant), but I decided that
this data structure was the simplest and more efficient anyway. After all,
each cell takes just one byte, and any other data structure must be some
kind of associative array (like a g_hash_table). Such a data structue is
difficult to use with a MonoMemPool, and in the end is slower than a plain
array, and has the storage overhead of all the pointers... in the end, maybe
the full matrix is not a waste at all.
<note>
After a few benchmarks, I clearly see that the matrix works well if the
variables are not too much, otherwise it gets "too sparse", and much time
is wasted in the propagation phase. Maybe the data structure could be changed
after a more careful evaluation of the problem...
</note>
With these assumptions, all the memory used to represent values, conditions
and the evaluation area can be allocated in advance (from a MonoMemPool), and
used for all the analysis of one method. Moreover, the performance of logical
operations is high (they are simple bitwise operations on bytes).
<note>
For the propagation phase, there was a function I could not easily code
with bitwise operations. As that phase is a real pain for the performance
(the complexity is quadratic, and it must be executed iteratively until
nothing changes), I decided to code it in perl, and generate a precomputed
table then used by the C code (just 64 bytes). I think this is faster than
all those branches... Really, I could think again to phases 3c and 3d (see
above), maybe there is a better way to do them.
</note>
Of course not all expressions can be handled by the summarization, so the
optimizer is not as effective as a full blown theorem prover...
Another thing related to design... the implementation is as less intrusive
as possible.
I "patched" the main files to add an option for abc removal, and handle it
just like any other option, and then wrote all the relevant code in two
separated files (one header for data structures, and a C file for the code).
If the patch turns out to be useful also for other pourposes (like a more
generic "unreachable code elimination", that detects branches that will never
be taken using the analysis of variable values), it will not be difficult
to integrate the branch summarizations into the BasicBlock data structures,
and so on.
One last thing... in some places, I knowingly coded in an inefficient way.
For instance, "remove_abc_from_block" does something only if the flag
"has_array_access_instructions" is true, but I call it anyway, letting it
do nothing (calling it conditionally would be better). There are several
things like this in the code, but I was in a hurry, and preferred to make
the code more readable (it is already difficult to understand as it is).
------------------------------------------------------------------------------
WHEN IS ABC REMOVAL POSSIBLE? WHEN IS IT USEFUL?
Warning! Random ideas ahead!
In general, managed code should be safe, so abc removal is possible only if
there already is some branch in the method that does the check.
So, one check on the index is "mandatory", the abc removal can only avoid a
second one (which is useless *because* of the first one).
If in the code there is not a conditional branch that "avoids" to access
an array out of its bounds, in general the abc removal cannot occur.
It could happen, however, that one method is called from another one, and
the check on the index is performed in the caller.
For instance:
void
caller( int[] a, int n ) {
if ( n <= a.Length ) {
for ( int i = 0; i < n; i++ ) {
callee( a, i );
}
}
}
void callee( int[] a, int i ) {
Console.WriteLine( "a [i] = " + a [i] );
}
In this case, it should be possible to have two versions of the callee, one
without checks, to be called from methods that do the check themselves, and
another to be called otherwise.
This kind of optimization could be profile driven: if one method is executed
several times, wastes CPU time for bound checks, and is mostly called from
another one, it could make sense to analyze the situation in detail.
However, one simple way to perform this optimization would be to inline
the callee (so that the abc removal algorithm can see both methods at once).
The biggest benefits of abc removal can be seen for array accesses that
occur "often", like the ones inside inner loops. This is why I tried to
handle "recursive" variable definitions, because without them you cannot
optimize inside loops, which is also where you need it most.
Another possible optimization (alwais related to loops) is the following:
void method( int[] a, int n ) {
for ( int i = 0; i < n; i++ ) {
Console.WriteLine( "a [i] = " + a [i] );
}
}
In this case, the check on n is missing, so the abc could not be removed.
However, this would mean that i will be checked twice at each loop iteration,
one against n, and the other against a.Length. The code could be transformed
like this:
void method( int[] a, int n ) {
if ( n < a.Length ) {
for ( int i = 0; i < n; i++ ) {
Console.WriteLine( "a [i] = " + a [i] ); // Remove abc
}
} else {
for ( int i = 0; i < n; i++ ) {
Console.WriteLine( "a [i] = " + a [i] ); // Leave abc
}
}
}
This could result in performance improvements (again, probably this
optimization should be profile driven).
------------------------------------------------------------------------------
OPEN ISSUES
There are several issues that should still be addressed...
One is related to aliasing. For now, I decided to operate only on local
variables, and ignore aliasing problems (and alias analisys has not yet
been implemented anyway).
Actually, I identified the local arrays with their length, because I
totally ignore the contents of arrays (and objects in general).
Also, in several places in the code I only handle some cases, and ignore
other more complex ones, which could anyway work (there are comments where
this happens). Anyway, this is not harmful (the code is not as effective
as it could be).
Another possible improvement is the explicit handling of all constants.
For now, code like
void
method () {
int[] a = new int [16];
for ( int i = 0; i < 16; i++ ) {
a [i] = i;
}
}
is not handled, because the two constants "16" are lost when variable
relations are summarized (actually they are not lost, they are stored in the
summarized values, but they are not yet used correctly).
The worst thing, anyway, is that for now I fail completely in distinguishing
between signed and unsigned variables/operations/conditions, and between
different integer sizes (in bytes). I did this on pourpose, just for lack of
time, but this can turn out to be terribly wrong.
The problem is caused by the fact that I handle arithmetical operations and
conditions as "ideal" operations, but actually they can overflow and/or
underflow, giving "surprising" results.
For instance, look at the following two methods:
public static void testSignedOverflow()
{
Console.WriteLine( "Testing signed overflow..." );
int[] ia = new int[70000];
int i = 1;
while ( i <ia.Length )
{
try
{
Console.WriteLine( " i = " + i );
ia[i] = i;
}
catch ( IndexOutOfRangeException e )
{
Console.WriteLine( "Yes, we had an overflow (i = " + i + ")" );
}
i *= 60000;
}
Console.WriteLine( "Testing signed overflow done." );
}
public static void testUnsignedOverflow()
{
Console.WriteLine( "Testing unsigned overflow..." );
int[] ia = new int[70000];
uint i = 1;
while ( i <ia.Length )
{
try
{
Console.WriteLine( " i = " + i );
ia[i] = (int) i;
}
catch ( IndexOutOfRangeException e )
{
Console.WriteLine( "Yes, we had an overflow (i = " + i + ")" );
}
i *= 60000;
}
Console.WriteLine( "Testing unsigned overflow done." );
}
In the "testSignedOverflow" method, the exception will be thrown, while
in the "testUnsignedOverflow" everything will go on smoothly.
The problem is that the test "i <ia.Length" is a signed comparison in the
first case, and will not exit from the loop if the index is negative.
Therefore, in the first method, the abc should not be removed.
In practice, the abc removal code should try to predict if any given
expression could over/under-flow, and act accordingly.
For now, I made so that the only accepted expressions are plain increments
and decrements of variables (which cannot over/under-flow without being
trapped by the existing conditions). Anyway, this issue should be analyzed
better.
By the way, in summarizations there is a field that keeps track of the
relation with "1", which I planned to use exactly to summarize products and
quotients, but it is never used (as I said, only increment and decrement
operations are properly summarized).
+173
View File
@@ -0,0 +1,173 @@
Rules for opening shared files
==============================
File is already open, with share set to none:
Can not open again
File is already open for reading, with read share:
Can open for reading only, share must include read (can have write too)
File is already open for reading, with write share:
Can open for writing only, share must include read (can have write too)
File is already open for reading, with read + write share:
Can open for read, writing or both, share must include read (can have write too)
File is already open for writing, with read share:
Can open for reading only, share must include write (can have read too)
File is already open for writing, with write share:
Can open for writing only, share must include write (can have read too)
File is already open for writing, with read + write share:
Can open for reading, writing or both, share must include write (can have read too)
File is already open for reading + writing, with read share:
Can open for reading only, share must be read + write
File is already open for reading + writing, with write share:
Can open for for writing only, share must be read + write
File is already open for reading + writing, with read + write share:
Can open for read, writing or both, share must be read + write
Executive Summary
-----------------
Second open must have access within first share, must set second share to at least first access
Documenting code
----------------
#include <stdio.h>
#include <windows.h>
int access[] = {
GENERIC_READ,
GENERIC_WRITE,
GENERIC_READ | GENERIC_WRITE
};
char *access_names[] = {
"G_READ",
"G_WRITE",
"G_READ|G_WRITE"
};
int share[] = {
FILE_SHARE_READ,
FILE_SHARE_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE
};
char *share_names[] = {
"SHARE_READ",
"SHARE_WRITE",
"SHARE_READ|SHARE_WRITE"
};
void lockfiles(int access1, int share1, int access2, int share2)
{
HANDLE h1, h2;
BOOL ret;
if (access2 == 0 && share2 == 0) {
printf("\n");
printf("%22.22s\n%22.22s", access_names[access1], share_names[share1]);
}
h1 = CreateFile("lockedfile",
access[access1],
share[share1],
NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (h1 == INVALID_HANDLE_VALUE) {
printf("Open1 failed: %d\n", GetLastError());
return;
}
h2 = CreateFile("lockedfile",
access[access2],
share[share2],
NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (h2 == INVALID_HANDLE_VALUE) {
printf(" %4.4s", "");
} else {
printf(" %4.4s", "OK");
CloseHandle(h2);
}
CloseHandle(h1);
}
int main(int argc, char **argv)
{
int i, j, k, l;
printf("\t\t\t\t\t\t\tSecond Open\n");
printf("%22.22s G_RE G_RE G_RE G_WR G_WR G_WR G_RW G_RW G_RW\n", "");
printf("%22.22s S_RE S_WR S_RW S_RE S_WR S_RW S_RE S_WR S_RW", "First open --v ");
for (i = 0; i < 3; i++) {
for (j = 0; j < 3; j++) {
for (k = 0; k < 3; k++) {
for (l = 0; l < 3; l++) {
lockfiles(i, j, k, l);
}
}
}
}
return(0);
}
Code output
-----------
Second Open
G_RE G_RE G_RE G_WR G_WR G_WR G_RW G_RW G_RW
First open --v S_RE S_WR S_RW S_RE S_WR S_RW S_RE S_WR S_RW
G_READ
SHARE_READ OK OK
G_READ
SHARE_WRITE OK OK
G_READ
SHARE_READ|SHARE_WRITE OK OK OK OK OK OK
G_WRITE
SHARE_READ OK OK
G_WRITE
SHARE_WRITE OK OK
G_WRITE
SHARE_READ|SHARE_WRITE OK OK OK OK OK OK
G_READ|G_WRITE
SHARE_READ OK
G_READ|G_WRITE
SHARE_WRITE OK
G_READ|G_WRITE
SHARE_READ|SHARE_WRITE OK OK OK
+16
View File
@@ -0,0 +1,16 @@
<h1>Mono 1.0 Release Notes</h1>
<h2>What does Mono Include</h2>
<h2>Missing functionality</h2>
<p>COM support.
<p>EnterpriseServices are non-existant.
<p>Windows.Forms is only available as a preview, it is not
completed nor stable.
<h3>Assembly: System.Drawing</h3>
<p>System.Drawing.Printing is not supported.
+4
View File
@@ -1,3 +1,7 @@
2004-05-05 Zoltan Varga <[email protected]>
* mono-jni.c: Implement some missing JNI functions.
2004-04-13 Zoltan Varga <[email protected]>
* mono-jni.c: Use <stdarg.h> instead of <varargs.h>.
+44 -25
View File
@@ -35,7 +35,8 @@ void mono_jni_jnienv_init (
void *invokemethod_func,
void *getmethodarglist_func,
void *findclass_func,
void *getjnienv_func);
void *getjnienv_func,
void *allocobject_func);
void* mono_jni_get_func_table (void);
@@ -74,6 +75,7 @@ typedef struct MonoJniFunctions {
void * (*GetMethodArgList) (void *cookie);
void * (*FindClass) (void *name);
void * (*GetJniEnv) (void);
void * (*AllocObject) (void *klass);
} MonoJniFunctions;
static MonoJniFunctions jniFuncs;
@@ -95,7 +97,8 @@ mono_jni_jnienv_init (
void *invokemethod_func,
void *getmethodarglist_func,
void *findclass_func,
void *getjnienv_func)
void *getjnienv_func,
void *allocobject_func)
{
jniFuncs.MakeLocalRef = makelocalref_func;
jniFuncs.UnwrapRef = unwrap_func;
@@ -113,6 +116,7 @@ mono_jni_jnienv_init (
jniFuncs.GetMethodArgList = getmethodarglist_func;
jniFuncs.FindClass = findclass_func;
jniFuncs.GetJniEnv = getjnienv_func;
jniFuncs.AllocObject = allocobject_func;
}
static void *jni_func_table[256];
@@ -241,7 +245,7 @@ static jboolean JNICALL IsSameObject (JNIEnv *env, jobject obj1, jobject obj2) {
static jobject JNICALL NewLocalRef (JNIEnv *env, jobject ref) { printf ("JNI Function NewLocalRef is not implemented.\n"); g_assert_not_reached (); return 0; }
static jint JNICALL EnsureLocalCapacity (JNIEnv *env, jint capacity) { printf ("JNI Function EnsureLocalCapacity is not implemented.\n"); g_assert_not_reached (); return 0; }
static jobject JNICALL AllocObject (JNIEnv *env, jclass clazz) { printf ("JNI Function AllocObject is not implemented.\n"); g_assert_not_reached (); return 0; }
static jobject JNICALL AllocObject (JNIEnv *env, jclass clazz) { printf ("JNI Function EnsureLocalCapacity is not implemented.\n"); g_assert_not_reached (); return 0; }
static jclass JNICALL GetObjectClass (JNIEnv *env, jobject obj)
{
@@ -832,6 +836,18 @@ static type* JNICALL Get##Type##ArrayElements(JNIEnv *env, type##Array array, jb
static void JNICALL Release##Type##ArrayElements(JNIEnv *env, type##Array array, type *elems, jint mode)\
{\
return; \
} \
static void JNICALL Get##Type##ArrayRegion (JNIEnv *env, type##Array array, jsize start, jsize l, type *buf) \
{\
MonoArray *obj; \
obj = jniFuncs.UnwrapRef (env, (void*)array); \
memcpy (buf, mono_array_addr (obj, sizeof (type), start), (sizeof (type) * l)); \
} \
static void JNICALL Set##Type##ArrayRegion (JNIEnv *env, type##Array array, jsize start, jsize l, type *buf) \
{ \
MonoArray *obj; \
obj = jniFuncs.UnwrapRef (env, (void*)array); \
memcpy (mono_array_addr (obj, sizeof (type), start), buf, (sizeof (type) * l)); \
}
GET_SET_ARRAY_ELEMENTS(Boolean,jboolean,gboolean)
@@ -843,23 +859,32 @@ GET_SET_ARRAY_ELEMENTS(Long,jlong,glong)
GET_SET_ARRAY_ELEMENTS(Float,jfloat,float)
GET_SET_ARRAY_ELEMENTS(Double,jdouble,double)
static void JNICALL GetBooleanArrayRegion (JNIEnv *env, jbooleanArray array, jsize start, jsize l, jboolean *buf) { printf ("JNI Function GetBooleanArrayRegion is not implemented.\n"); g_assert_not_reached (); }
static void JNICALL GetByteArrayRegion (JNIEnv *env, jbyteArray array, jsize start, jsize len, jbyte *buf) { printf ("JNI Function GetByteArrayRegion is not implemented.\n"); g_assert_not_reached (); }
static void JNICALL GetCharArrayRegion (JNIEnv *env, jcharArray array, jsize start, jsize len, jchar *buf) { printf ("JNI Function GetCharArrayRegion is not implemented.\n"); g_assert_not_reached (); }
static void JNICALL GetShortArrayRegion (JNIEnv *env, jshortArray array, jsize start, jsize len, jshort *buf) { printf ("JNI Function GetShortArrayRegion is not implemented.\n"); g_assert_not_reached (); }
static void JNICALL GetIntArrayRegion (JNIEnv *env, jintArray array, jsize start, jsize len, jint *buf) { printf ("JNI Function GetIntArrayRegion is not implemented.\n"); g_assert_not_reached (); }
static void JNICALL GetLongArrayRegion (JNIEnv *env, jlongArray array, jsize start, jsize len, jlong *buf) { printf ("JNI Function GetLongArrayRegion is not implemented.\n"); g_assert_not_reached (); }
static void JNICALL GetFloatArrayRegion (JNIEnv *env, jfloatArray array, jsize start, jsize len, jfloat *buf) { printf ("JNI Function GetFloatArrayRegion is not implemented.\n"); g_assert_not_reached (); }
static void JNICALL GetDoubleArrayRegion (JNIEnv *env, jdoubleArray array, jsize start, jsize len, jdouble *buf) { printf ("JNI Function GetDoubleArrayRegion is not implemented.\n"); g_assert_not_reached (); }
static void * JNICALL GetPrimitiveArrayCritical (JNIEnv *env, jarray array, jboolean *isCopy) {
MonoArray *obj;
static void JNICALL SetBooleanArrayRegion (JNIEnv *env, jbooleanArray array, jsize start, jsize l, jboolean *buf) { printf ("JNI Function SetBooleanArrayRegion is not implemented.\n"); g_assert_not_reached (); }
static void JNICALL SetByteArrayRegion (JNIEnv *env, jbyteArray array, jsize start, jsize len, jbyte *buf) { printf ("JNI Function SetByteArrayRegion is not implemented.\n"); g_assert_not_reached (); }
static void JNICALL SetCharArrayRegion (JNIEnv *env, jcharArray array, jsize start, jsize len, jchar *buf) { printf ("JNI Function SetCharArrayRegion is not implemented.\n"); g_assert_not_reached (); }
static void JNICALL SetShortArrayRegion (JNIEnv *env, jshortArray array, jsize start, jsize len, jshort *buf) { printf ("JNI Function SetShortArrayRegion is not implemented.\n"); g_assert_not_reached (); }
static void JNICALL SetIntArrayRegion (JNIEnv *env, jintArray array, jsize start, jsize len, jint *buf) { printf ("JNI Function SetIntArrayRegion is not implemented.\n"); g_assert_not_reached (); }
static void JNICALL SetLongArrayRegion (JNIEnv *env, jlongArray array, jsize start, jsize len, jlong *buf) { printf ("JNI Function SetLongArrayRegion is not implemented.\n"); g_assert_not_reached (); }
static void JNICALL SetFloatArrayRegion (JNIEnv *env, jfloatArray array, jsize start, jsize len, jfloat *buf) { printf ("JNI Function SetFloatArrayRegion is not implemented.\n"); g_assert_not_reached (); }
static void JNICALL SetDoubleArrayRegion (JNIEnv *env, jdoubleArray array, jsize start, jsize len, jdouble *buf) { printf ("JNI Function SetDoubleArrayRegion is not implemented.\n"); g_assert_not_reached (); }
obj = jniFuncs.UnwrapRef (env, (void*)array);
if (isCopy)
*isCopy = JNI_FALSE;
return mono_array_addr (obj, void*, 0);
}
static void JNICALL ReleasePrimitiveArrayCritical (JNIEnv *env, jarray array, void *carray, jint mode) {
}
static const jchar * JNICALL GetStringCritical (JNIEnv *env, jstring string, jboolean *isCopy) {
MonoString *obj;
obj = jniFuncs.UnwrapRef (env, (void*)string);
if (isCopy)
*isCopy = JNI_FALSE;
return mono_string_chars (obj);
}
static void JNICALL ReleaseStringCritical (JNIEnv *env, jstring string, const jchar *cstring)
{
}
static jobject JNICALL NewObjectA (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args)
{
@@ -933,12 +958,6 @@ jint JNICALL GetJavaVM (JNIEnv *env, JavaVM **vm)
static void JNICALL GetStringRegion (JNIEnv *env, jstring str, jsize start, jsize len, jchar *buf) { printf ("JNI Function GetStringRegion is not implemented.\n"); g_assert_not_reached (); }
static void JNICALL GetStringUTFRegion (JNIEnv *env, jstring str, jsize start, jsize len, char *buf) { printf ("JNI Function GetStringUTFRegion is not implemented.\n"); g_assert_not_reached (); }
static void * JNICALL GetPrimitiveArrayCritical (JNIEnv *env, jarray array, jboolean *isCopy) { printf ("JNI Function GetPrimitiveArrayCritical is not implemented.\n"); g_assert_not_reached (); return NULL; }
static void JNICALL ReleasePrimitiveArrayCritical (JNIEnv *env, jarray array, void *carray, jint mode) { printf ("JNI Function ReleasePrimitiveArrayCritical is not implemented.\n"); g_assert_not_reached (); }
static const jchar * JNICALL GetStringCritical (JNIEnv *env, jstring string, jboolean *isCopy) { printf ("JNI Function GetStringCritical is not implemented.\n"); g_assert_not_reached (); return NULL; }
static void JNICALL ReleaseStringCritical (JNIEnv *env, jstring string, const jchar *cstring) { printf ("JNI Function ReleaseStringCritical is not implemented.\n"); g_assert_not_reached (); }
static jweak JNICALL NewWeakGlobalRef (JNIEnv *env, jobject obj) { printf ("JNI Function NewWeakGlobalRef is not implemented.\n"); g_assert_not_reached (); return 0; }
static void JNICALL DeleteWeakGlobalRef (JNIEnv *env, jweak ref) { printf ("JNI Function DeleteWeakGlobalRef is not implemented.\n"); g_assert_not_reached (); }
+15 -5
View File
@@ -108,10 +108,6 @@ key containers. The option is equivalent to including [assembly:
AssemblyKeyName ("CONTAINER")] in your source code. Compiler option
takes precedence over the attributes.
.TP
.I \-\-stacktrace
Generates a stack trace at the time the error is reported, useful for
debugging the compiler.
.TP
.I -lib:PATHLIST
Each path specified in the comma-separated list will direct the
compiler to look for libraries in that specified path.
@@ -142,6 +138,16 @@ Names the output file to be generated.
.I \-\-parse
Used for benchmarking. The compiler will only parse its input files.
.TP
.I \-pkg:package1[,packageN]
The compiler will invoke pkg-config --libs on the set of packages
specified on the command line to obtain libraries and directories to
compile the code.
.PP
This is typically used with third party components, like this:
.nf
$ mcs -pkg:gtk-sharp demo.cs
.fi
.TP
.I -resource:RESOURCE[,ID]
Embeds to the given resource file. The optional ID can be used to
give a different name to the resource. If not specified, the resource
@@ -165,9 +171,13 @@ Does recursive compilation using the specified pattern. In Unix the
shell will perform globbing, so you migth want to use it like this:
.PP
.nf
bash$ mcs -recurse:'*.cs'
$ mcs -recurse:'*.cs'
.fi
.TP
.I \-\-stacktrace
Generates a stack trace at the time the error is reported, useful for
debugging the compiler.
.TP
.I \-target:KIND, \-t:KIND
Used to specify the desired target. The possible values are: exe
(plain executable), winexe (Windows.Forms executable), library
+9 -2
View File
@@ -254,8 +254,10 @@ environment variable.
.TP
.I "MONO_DEBUG"
If set, enables some features of the runtime useful for debugging.
Currently it only makes the runtime display the stack traces for all the
threads running and exit. It may not exit cleanly. Use at your own risk.
It makes the runtime display the stack traces for all the threads
running and exit when mono is interrupted (Ctrl-C) and print some
additional messages on error conditions. It may not exit cleanly. Use at
your own risk.
.TP
.I "MONO_DISABLE_AIO"
If set, tells mono NOT to attempt using native asynchronous I/O services. In
@@ -304,6 +306,11 @@ managed implementation on error.
.I "MONO_CODEDOM_NODELETE"
If set to any value, the C# CodeDom compiler will not remove the temporary
source files generated.
.TP
.I "MONO_EGD_SOCKET"
For platforms that do not otherwise have a way of obtaining random bytes
this can be set to the name of a file system socket on which an egd or
prngd daemon is listening.
.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
+3
View File
@@ -49,6 +49,9 @@ Specifies the namespace of the XML schema element for which a class or a dataset
.I "/language:name" "/l:name"
Specifies the programming language to use for the generated code. The only supported languages are CS (C#) and VB (Visual Basic.NET).
.TP
.I "/generator:type,assembly" "/g:type,assembly"
Indicates xsd.exe to use custom CodeDomProvider to generate code. Type name must be full name. Assembly name is file name that xsd.exe tries to load.
.TP
.I "/outputdir:path" "/o:path"
Specifies the directory where to generate the code or schemas.
.TP
+70 -33
View File
@@ -1,3 +1,40 @@
2004-05-26 Raja R Harinath <[email protected]>
* nunit20/util/Makefile (EXTRA_DISTFILES): Remove
Transform.resources.
($(the_lib)): Make Transform.resources using internal resgen.
* nunit20/util/Transform.resources: Rebuild.
2004-05-25 Sebastien Pouliot <[email protected]>
* nunit.key: New. NUnit private key. Due to build issues the key
must be present in this directory.
2004-05-20 Raja R Harinath <[email protected]>
* Makefile (SUBDIRS): Move 'monoresgen' ahead of 'class'.
2004-05-17 Raja R Harinath <[email protected]>
* Makefile (all, clean): Remove indirection.
(clean-profiles): New.
2004-05-13 Jackson Harper <[email protected]>
* Makefile: default build is no longer the multi profile build. Do
build both 1.1 and 2.0 profiles use the all-profiles target.
2004-05-12 Gonzalo Paniagua Javier <[email protected]>
* Makefile: disable net_2_0 on windows. It doesn't build. Don't
try to build net_1_0 and net_2_0 if we provide a PROFILE=xxx in the
command line.
2004-05-10 Raja R Harinath <[email protected]>
* INSTALL.txt: Don't mention 'fullbuild'. Mention 'bootstrap'
instead. Update instructions for 'monocharge'.
2004-04-30 Raja R Harinath <[email protected]>
* Makefile (SUBDIRS): Remove 'gmcs' for now.
@@ -147,41 +184,41 @@
which includes a MySQL ADO.NET Provider.
Contributed by Reggie Burnett <[email protected]>
from ByteFX, Inc.
ByteFX.Data 0.6.5 is Copyright 2002-2003, ByteFX, Inc.
Added the following files and directories:
ByteFX.Data 0.6.5 is Copyright 2002-2003, ByteFX, Inc.
Added the following files and directories:
class/ByteFX.Data/AssemblyInfo.cs
class/ByteFX.Data/list
class/ByteFX.Data/ByteFX.Data.build
class/ByteFX.Data/makefile.gnu
class/ByteFX.Data/ChangeLog.txt
class/ByteFX.Data/readme.txt
class/ByteFX.Data/lgpl.txt: new files
BitStream.cs
Connection.cs
Field.cs
Inflater.cs
ConnectionString.cs
HuffmanTree.cs
NamedPipeStream.cs
class/ByteFX.Data/Common: added files to new directory
Driver.cs
command.resx
todo.txt
CommandBuilder.cs
Exception.cs
dataadapter.cs
transcaction.cs
Connection.cs
Field.cs
datareader.cs
Connection.resx
MysqlDefs.cs
class/ByteFX.Data/AssemblyInfo.cs
class/ByteFX.Data/list
class/ByteFX.Data/ByteFX.Data.build
class/ByteFX.Data/makefile.gnu
class/ByteFX.Data/ChangeLog.txt
class/ByteFX.Data/readme.txt
class/ByteFX.Data/lgpl.txt: new files
BitStream.cs
Connection.cs
Field.cs
Inflater.cs
ConnectionString.cs
HuffmanTree.cs
NamedPipeStream.cs
class/ByteFX.Data/Common: added files to new directory
Driver.cs
command.resx
todo.txt
CommandBuilder.cs
Exception.cs
dataadapter.cs
transcaction.cs
Connection.cs
Field.cs
datareader.cs
Connection.resx
MysqlDefs.cs
parameter.cs
class/ByteFX.Data/mysqlclient: added files to new directory
class/ByteFX.Data/mysqlclient: added files to new directory
command.cs
parameter_collection.cs
+17 -15
View File
@@ -25,15 +25,15 @@ compilers and tools.
If you only want to build a snapshot or a fresh CVS checkout of the
sources, you should go into the `mono' sibling directory and issue the
make fullbuild command, like this:
make bootstrap command, like this:
cd ../mono
./autogen.sh --prefix=/usr/local
make fullbuild
make bootstrap
make install
That will build and install the code in a single pass. The
compilation is bundled with the build due to dependencies on the class
libraries on the runtime.
The compilation is bundled with the build due to dependencies on the
class libraries on the runtime.
Build Features for Developers of Mono.
======================================
@@ -73,17 +73,19 @@ The difference between the two modes is explained farther down.
Troubleshooting
===============
Occasionally, something in the compiler or runtime changes enough that
an existing installation cannot complete a full build from cvs. In this case,
go to http://go-mono.com/daily and download a monocharge or monolite tarball.
Unpack and copy the .dlls to $prefix/lib and .exes to $prefix/bin/. Then
you should be able to complete the build normally (i.e. using make fullbuild).
We try to maintain the CVS tree such that it is bootstrapable from the
latest released version of mono and mcs. Occasionally, something in the
compiler or runtime changes enough that an existing installation cannot
complete a bootstrap from cvs. In this case, go to
http://go-mono.com/daily and download a monocharge or monolite tarball.
Unpack and copy the .dlls to $prefix/lib and .exes to $prefix/bin/.
Then you should be able to complete the build normally (i.e. using make
bootstrap).
wget http://go-mono.com/daily/monolite-20031028.tar.gz
tar -zxvf monolite-20031028.tar.gz
cd monolite-20031028
cp *.exe /usr/local/bin/.
cp *.dll /usr/local/lib/.
wget http://go-mono.com/daily/monolite-20040505.tar.gz
tar -zxvf monolite-20040505.tar.gz
cd monolite-20040505
env prefix=/usr/local sh recharge.sh
Monocharges
===========
+12 -10
View File
@@ -1,5 +1,5 @@
thisdir := .
SUBDIRS := build jay mcs class mbas nunit20 monoresgen ilasm tools tests errors docs
SUBDIRS := build jay mcs monoresgen class mbas nunit20 ilasm tools tests errors docs
OVERRIDE_BARE_TARGETS = hells yeah
include build/rules.make
@@ -7,15 +7,9 @@ include build/rules.make
#all: platform-check profile-check all-recursive #all-local
all:
$(MAKE) PROFILE=default all-profile
$(MAKE) PROFILE=net_2_0 all-profile
.PHONY: all clean all-profiles clean-profiles install uninstall test run-test testcorlib
clean:
$(MAKE) PROFILE=default clean-profile
$(MAKE) PROFILE=net_2_0 clean-profile
all-profile: platform-check profile-check all-recursive
all: platform-check profile-check all-recursive
install: platform-check profile-check install-recursive #install-local
@@ -25,10 +19,18 @@ test: platform-check profile-check test-recursive #test-local
run-test: run-test-recursive #run-test-local
clean-profile: clean-recursive #clean-local
clean: clean-recursive #clean-local
# fun specialty targets
all-profiles:
$(MAKE) PROFILE=default all || exit 1 ; \
$(MAKE) PROFILE=net_2_0 all || exit 1 ;
clean-profiles:
$(MAKE) PROFILE=default clean || exit 1 ; \
$(MAKE) PROFILE=net_2_0 clean || exit 1 ;
testcorlib:
@cd class/corlib && $(MAKE) test run-test
+3
View File
@@ -1,3 +1,6 @@
2004-05-15 Rafael Teixeira ([email protected])
* Makefile: corrected /libpath: compiler flag (parameter) to point to ../class/lib/default/ the new location of libraries
2004-03-16 Rafael Teixeira ([email protected])
* Test1.vb: corrected mispelling in keyword
* Test.Sources: no misc1.vb or CharacterLiteralsA.vb sources
+3
View File
@@ -1,3 +1,6 @@
2004-05-15 Rafael Teixeira ([email protected])
* Makefile: corrected /libpath: compiler flag (parameter) to point to ../class/lib/default/ the new location of libraries
2004-03-16 Rafael Teixeira ([email protected])
* Test1.vb: corrected mispelling in keyword
* Test.Sources: no misc1.vb or CharacterLiteralsA.vb sources
+1 -1
View File
@@ -1,7 +1,7 @@
thisdir = btests
SUBDIRS =
TEST_RUNTIME = mono
COMPILER_FLAGS = /libpath:../class/lib /imports:System
COMPILER_FLAGS = /libpath:../class/lib/default/ /imports:System
INTERNAL_MBAS = $(TEST_RUNTIME) --debug ../mbas/mbas.exe --stacktrace $(COMPILER_FLAGS)
#INTERNAL_MBAS = vbc $(COMPILER_FLAGS)
all: test-compiler-jit
+20
View File
@@ -0,0 +1,20 @@
Module M
private i as integer
public Property p() as Integer
GET
return i
END GET
SET (ByVal val as Integer)
i = val
End SET
End Property
Sub Main()
p = 10
System.Console.WriteLine(p)
End Sub
End Module
+21
View File
@@ -0,0 +1,21 @@
IMPORTS SYSTEM
Module M
private i as integer
public Property p() as Integer
GET
return i
END GET
SET
i = Value
End SET
End Property
Sub Main()
p = 10
Console.WriteLine(p)
End Sub
End Module
+22
View File
@@ -0,0 +1,22 @@
Imports system
Module M
private i as integer
public Property p(ByVal x as Integer) as Integer
GET
return i
END GET
SET (ByVal val as Integer)
i = val
End SET
End Property
Sub Main()
p(5) = 10
'Console.WriteLine(p)
End Sub
End Module
+22
View File
@@ -0,0 +1,22 @@
Imports system
Module M
private i as integer
public Property p() as Integer
GET
return i
END GET
SET (ByRef val as Integer)
i = val
End SET
End Property
Sub Main()
p = 10
Console.WriteLine(p)
End Sub
End Module
+18
View File
@@ -0,0 +1,18 @@
Imports system
Module M
private i as integer
public Property p() as Integer
GET
END GET
SET (ByVal val as string)
End SET
End Property
Sub Main()
End Sub
End Module
+17
View File
@@ -0,0 +1,17 @@
Imports system
Module M
private i as integer
public Property p() as Integer
Get
return i
END Get
End Property
Sub Main()
p = 10
Console.WriteLine(p)
End Sub
End Module
+19
View File
@@ -0,0 +1,19 @@
Imports system
Module M
private i as integer
public Property p() as Integer
'GET
' return i
'END GET
SET (ByVal val as Integer)
i = val
End SET
End Property
Sub Main()
End Sub
End Module
+22
View File
@@ -0,0 +1,22 @@
Imports system
Module M
private i as integer
public WriteOnly Property p() as Integer
SET (ByVal val as Integer)
i = val
End SET
End Property
public ReadOnly Property p1() as Integer
GET
return i
END GET
End Property
Sub Main()
End Sub
End Module
+29
View File
@@ -0,0 +1,29 @@
Imports system
MustInherit Class C1
public MustOverride Property p() as Integer
End Class
Class C2
Inherits C1
private i as integer
public shadows Property p() as Integer
SET (ByVal val as Integer)
i = val
End SET
GET
return i
END GET
End Property
End Class
Module M
Sub Main()
End Sub
End Module
+11 -3
View File
@@ -127,8 +127,12 @@ ArrayA \
ArrayB \
ArrayC \
ArrayD \
EnumA
EnumA \
PropertyA \
PropertyB \
PropertyC \
PropertyD \
PropertyE
# All negetive test cases which should
# fail during compilation goes here
@@ -273,7 +277,11 @@ EnumC3 \
EnumC4 \
EnumC5 \
EnumC6 \
EnumC7
EnumC7 \
PropertyC1 \
PropertyC2 \
PropertyC3 \
PropertyC4
# All negetive test cases which should fail at
# runtime goes here
+61
View File
@@ -1,3 +1,64 @@
2004-05-30 Jackson Harper <[email protected]>
* library.make: Install to 2.0 package if building with the
net_2_0 profile.
2004-05-26 Gonzalo Paniagua Javier <[email protected]>
* library.make: reference nunti.core.dll and nunit.util.dll when
building tests.
2004-05-26 Raja R Harinath <[email protected]>
* library.make (clean-local): Add $(CLEAN_FILES) too.
2004-05-25 Sebastien Pouliot <[email protected]>
* library.make: changed case on nunit.framework.dll (lowercase)
2004-05-24 Raja R Harinath <[email protected]>
* library.make (LIBRARY_COMPILE): New define.
($(the_lib)): Use $(LIBRARY_COMPILE) to compile $(the_lib).
* executable.make (PROGRAM_INSTALL_DIR): Allow makefile to specify
a different directory for installation.
(install-local, uninstall-local): Use it.
2004-05-20 Raja R Harinath <[email protected]>
* profiles/default.make (TEST_RUNTIME): Look in class/lib/default
for library to be tested.
* rules.make (INTERNAL_RESGEN): New Define.
* library.make (run-test-local): Move commands to run-test-lib.
Preparartion for allowing creation of addition test dll with .vb
testcases.
* executable.make (PROGRAM_COMPILE): New define.
($(PROGRAM)): Use PROGRAM_COMPILE to compile PROGRAM.
2004-05-14 Jackson Harper <[email protected]>
* library.make: Install package files. Get params in magical
correct order.
2004-05-11 Jackson Harper <[email protected]>
* platforms/linux.make:
* platforms/win32.make: Define a PLATFORM_PATH_SEPARATOR used for
separating paths in env vars. (ie MONO_PATH).
* profiles/net_2_0.make: Always use gmcs for building the 2.0
libraries. corlib is the first lib built and it will build gmcs.
2004-05-11 Jackson Harper <[email protected]>
* library.make: Allow assembly names to be different then their
.sources file names.
2004-05-08 Gonzalo Paniagua Javier <[email protected]>
* library.make: build NUnit if we try to run 'make test' and the dll
is not found.
2004-04-29 Jackson Harper <[email protected]>
* library.make: Fix uninstall
+12 -4
View File
@@ -17,14 +17,18 @@ stampfile = $(depsdir)/$(base_prog).stamp
makefrag = $(depsdir)/$(base_prog).makefrag
pdb = $(patsubst %.exe,%.pdb,$(PROGRAM))
ifndef PROGRAM_INSTALL_DIR
PROGRAM_INSTALL_DIR = $(prefix)/bin
endif
all-local: $(PROGRAM)
install-local: $(PROGRAM)
$(MKINSTALLDIRS) $(DESTDIR)$(prefix)/bin
$(INSTALL_BIN) $(PROGRAM) $(DESTDIR)$(prefix)/bin
$(MKINSTALLDIRS) $(DESTDIR)$(PROGRAM_INSTALL_DIR)
$(INSTALL_BIN) $(PROGRAM) $(DESTDIR)$(PROGRAM_INSTALL_DIR)
uninstall-local:
-rm -f $(DESTDIR)$(prefix)/bin/$(base_prog)
-rm -f $(DESTDIR)$(PROGRAM_INSTALL_DIR)/$(base_prog)
clean-local:
-rm -f *.exe $(BUILT_SOURCES) $(CLEAN_FILES) $(pdb) $(stampfile) $(makefrag)
@@ -49,8 +53,12 @@ dist-local: dist-default
# Changing makefile probably means changing the
# sources, so let's be safe and add a Makefile dep
ifndef PROGRAM_COMPILE
PROGRAM_COMPILE = $(CSCOMPILE)
endif
$(PROGRAM): $(makefrag) $(response) $(stampfile)
$(CSCOMPILE) /target:exe /out:$@ $(BUILT_SOURCES) @$(response)
$(PROGRAM_COMPILE) /target:exe /out:$@ $(BUILT_SOURCES) @$(response)
# warning: embedded tab in the 'echo touch' line
$(makefrag): $(sourcefile)
+31 -7
View File
@@ -14,9 +14,14 @@ response = $(depsdir)/$(PROFILE)_$(LIBRARY).response
else
response = $(sourcefile)
endif
ifndef LIBRARY_NAME
LIBRARY_NAME = $(LIBRARY)
endif
makefrag = $(depsdir)/$(PROFILE)_$(LIBRARY).makefrag
stampfile = $(depsdir)/$(PROFILE)_$(LIBRARY).stamp
the_lib = $(topdir)/class/lib/$(PROFILE)/$(LIBRARY)
the_lib = $(topdir)/class/lib/$(PROFILE)/$(LIBRARY_NAME)
the_pdb = $(patsubst %.dll,%.pdb,$(the_lib))
ifndef NO_TEST
@@ -26,15 +31,25 @@ test_sourcefile = $(test_lib).sources
test_response = $(depsdir)/$(PROFILE)_$(test_lib).response
test_makefrag = $(depsdir)/$(PROFILE)_$(test_lib).makefrag
test_stampfile = $(depsdir)/$(PROFILE)_$(test_lib).stamp
test_flags = /r:$(the_lib) /r:$(topdir)/class/lib/$(PROFILE)/NUnit.Framework.dll $(TEST_MCS_FLAGS)
test_nunitfw = $(topdir)/class/lib/$(PROFILE)/nunit.framework.dll
test_nunitcore = $(topdir)/class/lib/$(PROFILE)/nunit.core.dll
test_nunitutil = $(topdir)/class/lib/$(PROFILE)/nunit.util.dll
test_nunit_ref = -r:$(test_nunitfw) -r:$(test_nunitcore) -r:$(test_nunitutil)
test_flags = /r:$(the_lib) $(test_nunit_ref) $(TEST_MCS_FLAGS)
endif
gacutil = $(topdir)/tools/gacutil/gacutil.exe
PACKAGE = 1.0
ifeq ($(PROFILE), net_2_0)
PACKAGE = 2.0
endif
all-local: $(the_lib)
install-local: $(the_lib) $(gacutil)
$(RUNTIME) $(gacutil) -i $(the_lib) -f /root $(DESTDIR)$(prefix)/lib || exit 1 ; \
$(RUNTIME) $(gacutil) /i $(the_lib) /f /root $(DESTDIR)$(prefix)/lib /package $(PACKAGE)
uninstall-local: $(gacutil)
$(RUNTIME) $(gacutil) /u $$(basename $(the_lib) .dll) ; \
@@ -46,16 +61,21 @@ clean-local:
-rm -f $(the_lib) $(makefrag) $(test_lib) \
$(test_makefrag) $(test_response) \
$(stampfile) $(test_stampfile) \
$(the_pdb) $(test_pdb) \
$(the_pdb) $(test_pdb) $(CLEAN_FILES) \
TestResult.xml
ifdef PLATFORM_CHANGE_SEPARATOR_CMD
-rm -rf $(response)
endif
ifndef NO_TEST
test-local: $(the_lib) $(test_lib)
$(test_nunitfw):
(cd ${topdir}/nunit20 && make)
run-test-local:
test-local: $(test_nunitfw) $(the_lib) $(test_lib)
run-test-local: run-test-lib
run-test-lib: test-local
$(TEST_RUNTIME) $(TEST_HARNESS) $(test_lib)
else
@@ -78,10 +98,14 @@ dist-local: dist-default
$(MKINSTALLDIRS) $$dest && cp $$f $$dest || exit 1 ; \
done
ifndef LIBRARY_COMPILE
LIBRARY_COMPILE = $(CSCOMPILE)
endif
# Fun with dependency tracking
$(the_lib): $(makefrag) $(stampfile) $(response)
$(CSCOMPILE) $(LIBRARY_FLAGS) $(LIB_MCS_FLAGS) /target:library /out:$@ @$(response)
$(LIBRARY_COMPILE) $(LIBRARY_FLAGS) $(LIB_MCS_FLAGS) /target:library /out:$@ @$(response)
# warning: embedded tab in the 'echo touch' line
$(makefrag): $(sourcefile)
+3 -1
View File
@@ -11,6 +11,8 @@ PLATFORM_CORLIB = mscorlib.dll
BOOTSTRAP_MCS = mcs
RESGEN = monoresgen
PLATFORM_PATH_SEPARATOR = :
# Define this if this ever will work on Linux
# PLATFORM_MAKE_CORLIB_CMP = yes
@@ -29,7 +31,7 @@ hidden_suffix =
platform-check:
@if ! type $(BOOTSTRAP_MCS) >/dev/null 2>&1 ; then \
echo "*** You need a C# compiler installed to build MCS." ; \
echo "*** You need a C# compiler installed to build MCS. (make sure mcs works from the command line)" ; \
echo "*** Read INSTALL.txt for information on how to bootstrap" ; \
echo "*** a Mono installation." ; \
exit 1 ; \
+1
View File
@@ -15,6 +15,7 @@ RESGEN = resgen.exe
PLATFORM_MAKE_CORLIB_CMP = yes
PLATFORM_TWEAK_CORLIB_SOURCES=cat - corlib.dll.win32-excludes |sort |uniq -u
PLATFORM_CHANGE_SEPARATOR_CMD=tr '/' '\\\\'
PLATFORM_PATH_SEPARATOR = ;
hidden_prefix =
hidden_suffix = .tmp
+1 -1
View File
@@ -16,7 +16,7 @@
ifdef PLATFORM_MONO_NATIVE
MCS = MONO_PATH="$(topdir)/class/lib/$(PROFILE):$$MONO_PATH" $(INTERNAL_MCS)
TEST_RUNTIME = MONO_PATH=".:$$MONO_PATH" $(RUNTIME) --debug
TEST_RUNTIME = MONO_PATH="$(topdir)/class/lib/$(PROFILE):$$MONO_PATH" $(RUNTIME) --debug
else
MCS = $(PLATFORM_RUNTIME) $(BOOTSTRAP_MCS) /lib:$(topdir)/class/lib/$(PROFILE)
endif
+1 -3
View File
@@ -14,11 +14,9 @@
# run the compiler; /r: flags are by default loaded from whatever's
# in the MONO_PATH too).
MCS = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
ifdef PLATFORM_MONO_NATIVE
MCS = MONO_PATH="$(topdir)/class/lib/$(PROFILE):$$MONO_PATH" $(INTERNAL_GMCS)
TEST_RUNTIME = MONO_PATH=".:$$MONO_PATH" $(RUNTIME) --debug
else
MCS = $(PLATFORM_RUNTIME) $(BOOTSTRAP_MCS) /lib:$(topdir)/class/lib/$(PROFILE)
endif
# nuttzing!
+2 -1
View File
@@ -13,7 +13,7 @@
dots := $(shell echo $(thisdir) |sed -e 's,[^./][^/]*,..,g')
topdir := $(dots)
VERSION = 0.30.99
VERSION = 0.93
USE_MCS_FLAGS = $(LOCAL_MCS_FLAGS) $(PLATFORM_MCS_FLAGS) $(PROFILE_MCS_FLAGS) $(MCS_FLAGS)
USE_CFLAGS = $(LOCAL_CFLAGS) $(CFLAGS)
@@ -27,6 +27,7 @@ MKINSTALLDIRS = $(SHELL) $(topdir)/mkinstalldirs
INTERNAL_MCS = $(RUNTIME) $(topdir)/mcs/mcs.exe
INTERNAL_GMCS = $(RUNTIME) $(topdir)/gmcs/gmcs.exe
INTERNAL_ILASM = $(RUNTIME) $(topdir)/ilasm/ilasm.exe
INTERNAL_RESGEN = $(RUNTIME) $(topdir)/monoresgen/monoresgen.exe
corlib = mscorlib.dll
depsdir = $(topdir)/build/deps
+3 -3
View File
@@ -27,11 +27,11 @@ using System.Runtime.CompilerServices;
// by using the '*' as shown below:
#if (NET_2_0)
[assembly: AssemblyVersion ("0.7.4.2")]
[assembly: AssemblyVersion ("0.7.6.2")]
#elif (NET_1_1)
[assembly: AssemblyVersion ("0.7.4.1")]
[assembly: AssemblyVersion ("0.7.6.1")]
#else
[assembly: AssemblyVersion ("0.7.4.0")]
[assembly: AssemblyVersion ("0.7.6.0")]
#endif
[assembly: AssemblyDelaySign (true)]
+16 -8
View File
@@ -1,35 +1,43 @@
./AssemblyInfo.cs
./Common/BitStream.cs
./Common/Connection.cs
./Common/ConnectionString.cs
./Common/DBConnectionString.cs
./Common/DBParametersEditor.cs
./Common/Field.cs
./Common/HuffmanTree.cs
./Common/Inflater.cs
./Common/MultiHostStream.cs
./Common/NamedPipeStream.cs
./Common/Platform.cs
./Common/Security.cs
./Common/SqlCommandEditorDlg.cs
./Common/SqlCommandTextEditor.cs
./Common/StreamCreator.cs
./Common/StringUtility.cs
./Common/Version.cs
./Common/MultiHostStream.cs
./mysqlclient/CharSetMap.cs
./mysqlclient/CommandBuilder.cs
./mysqlclient/command.cs
./mysqlclient/CommandResult.cs
./mysqlclient/CompressedStream.cs
./mysqlclient/Connection.cs
./mysqlclient/ConnectionInternal.cs
./mysqlclient/ConnectionString.cs
./mysqlclient/dataadapter.cs
./mysqlclient/datareader.cs
./mysqlclient/Designers/EditConnectionString.cs
./mysqlclient/Designers/MySqlConnectionDesign.cs
./mysqlclient/Driver.cs
./mysqlclient/Exception.cs
./mysqlclient/Field.cs
./mysqlclient/MysqlDefs.cs
./mysqlclient/MySqlError.cs
./mysqlclient/MySqlHelper.cs
./mysqlclient/MySqlPool.cs
./mysqlclient/MySqlPoolManager.cs
./mysqlclient/MySqlStream.cs
./mysqlclient/MysqlDefs.cs
./mysqlclient/Packet.cs
./mysqlclient/command.cs
./mysqlclient/dataadapter.cs
./mysqlclient/datareader.cs
./mysqlclient/parameter.cs
./mysqlclient/parameter_collection.cs
./mysqlclient/transcaction.cs
./mysqlclient/Designers/EditConnectionString.cs
./mysqlclient/Designers/MySqlConnectionDesign.cs
./mysqlclient/transaction.cs
+37
View File
@@ -1,3 +1,40 @@
2004-05-18 Duncan Mak <[email protected]>
* AssemblyInfo.cs: Gonzalo reminded me that I need to update the
version number as well. We're at 0.7.6 now.
* Common/StreamCreator.cs (CreateUnixSocketStream): Instead of
hostList [0], which is a char, use hostList directly. This fixes
the build.
2004-05-18 Duncan Mak <[email protected]>
* Makefile: Add reference to Mono.Posix.dll.
* ByteFX.Data.dll.sources: Update to latest listing of source
files.
* AssemblyInfo.cs: Revert back to the previous version, because we
don't have bytefx.snk.
* mysqlclient/transcaction.cs: Removed, replaced by the new
transaction.cs.
2004-05-18 Duncan Mak <[email protected]>
* Update to the latest version:
http://www.bytefx.com/releases/ByteFX.MySqlClient.76.src.zip
* Common/Connection.cs:
* Common/ConnectionString.cs:
* Common/Inflater.cs:
* Common/Platform.cs:
* Common/StreamCreater.cs:
* Common/CommandResult.cs:
* Common/CompressedStream.cs:
* mysqlclient/MySqlError.cs:
* mysqlclient/transaction.cs: New source files.
2003-10-06 Nick Drochak <[email protected]>
* AssemblyInfo.cs: Fix the build by ignoring assembly signing for now.
+386 -288
View File
@@ -1,288 +1,386 @@
11/30/2003
MySql - Fixed ConnectionSTring editor dialog (thanks marco p (pomarc))
Common - UserId now supported in connection strings (thanks Jeff Neeley)
MySql - Attempting to create a parameter that is not input throws an exception (thanks Ryan Gregg)
11/29/2003
MySql - Added much documentation
11/26/2003
MySql - checked in new MultiHostStream capability. Big thanks to Dan Guisinger for this. he originally submitted the code and idea of supporting multiple machines on the connect string.
11/25/2003
MySql - Added alot of documentation. Still alot to do.
11/24/2003
MySql - Fixed speed issue with 0.73
11/14/2003
MySql - changed to Thread.Sleep(0) in MySqlDataStream to help optimize the case where it doesn't need to wait (thanks Todd German)
11/1/2003
MySql - Prepopulating the idlepools to MinPoolSize
10/31/2003
MySql - Fixed MySqlPool deadlock condition as well as stupid bug where CreateNewPooledConnection
was not ever adding new connections to the pool.
Also fixed MySqlStream.ReadBytes and ReadByte to not use TicksPerSecond which does not appear
to always be right.
(thanks Matthew J. Peddlesden)
MySql - Fix for precision and scale (thanks Matthew J. Peddlesden)
10/28/2003
MySql - Added Thread.Sleep(1) to stream reading methods to be more cpu friendly (thanks Sean McGinnis)
10/24/2003
MySql - Fixed problem where ExecuteReader would sometime return null (thanks Lloyd Dupont )
10/17/2003
MySql - Fixed major bug with null field handling (thanks Naucki)
10/15/2003
MySql - enclosed queries for max_allowed_packet and characterset inside try catch (and set defaults)
MySql - fixed problem where socket was not getting closed properly (thanks Steve!)
10/14/2003
MySql - Fixed problem where ExecuteNonQuery was not always returning the right value
10/13/2003
MySql - Fixed InternalConnection to not use @@session.max_allowed_packet but use @@max_allowed_packet. (Thanks Miguel)
10/12/2003
MySql - Added many new XML doc lines
10/10/2003
MySql - Fixed sql parsing to not send empty queries (thanks Rory)
MySql - Fixed problem where the reader was not unpeeking the packet on close
MySql - Fixed problem where user variables were not being handled (thanks Sami Vaaraniemi)
MySql - Fixed loop checking in the MySqlPool (thanks Steve M. Brown)
10/7/2003
MySql - Fixed ParameterCollection.Add method to match SqlClient (thanks Joshua Mouch)
Common & MySql - Fixed ConnectionSTring parsing to handle no and yes for boolean and not lowercase values (thanks Naucki)
10/3/2003
MySql - Added InternalConnection class, changes to pooling
Common - Implemented Persist Security Info
9/26/2003
Common - Added security.cs and version.cs to project
9/25/2003
MySql - Fixed DateTime handling in Parameter.cs (thanks Burkhard Perkens-Golomb)
MySql - Fixed parameter serialization where some types would throw a cast exception
MySql - Fixed DataReader to convert all returned values to prevent casting errors (thanks Keith Murray)
MySql - Added code to Command.ExecuteReader to return null if the initial SQL command throws an exception (thanks Burkhard Perkens-Golomb)
9/24/2003
MySql - Fixed ExecuteScalar bug introduced with restructure
9/23/2003
MySql - Restructure to allow for LOCAL DATA INFILE and better sequencing of packets
MySql - Fixed several bugs related to restructure.
9/10/2003
MySql - Early work done to support more secure passwords in Mysql 4.1. Old passwords in 4.1 not supported yet
8/22/2003
MySql- Parameters appearing after system parameters are now handled correctly (Adam M. (adammil))
MySql - strings can now be assigned directly to blob fields (Adam M.)
8/20/2003
MySql - Fixed float parameters (thanks Pent)
8/7/2003
MySql - Improved Parameter ctor and ParameterCollection.Add methods to better match SqlClient (thx Joshua Mouch )
MySql - Corrected Connection.CreateCommand to return a MySqlCommand type
MySql - Fixed connection string designer dialog box problem (thanks Abraham Guyt)
7/24/2003
MySql - Fixed problem with sending commands not always reading the response packet (thanks Joshua Mouch )
MySql - Fixed parameter serialization where some blobs types were not being handled (thanks Sean McGinnis )
7/22/2003
MySql - Removed spurious MessageBox.show from DataReader code (thanks Joshua Mouch )
7/17/2003
MySql - Fixed a nasty bug in the split sql code (thanks everyone! :-) )
*************Released 0.71***********************
7/15/2003
MySql - Fixed bug in MySqlStream where too much data could attempt to be read (thanks Peter Belbin)
7/11/2003
MySql - Implemented HasRows (thanks Nash Pherson)
MySql - Fixed bug where tables with more than 252 columns cause an exception ( thanks Joshua Kessler )
MySql - Fixed bug where SQL statements ending in ; would cause a problem ( thanks Shane Krueger )
MySql - Fixed bug in driver where error messsages were getting truncated by 1 character (thanks Shane Krueger)
7/6/2003
========MySql===============
* Made MySqlException serializable (thanks Mathias Hasselmann)
========PgSql===============
* Made PgSqlException serializable (thanks Mathias Hasselmann)
***********Released 0.70*********************
6/25/2003
========MySql===============
* Updated some of the character code pages to be more accurate
* Fixed problem where readers could be opened on connections that had readers open
* Release of 0.70
6/20/2003
========MySql===============
* Moved test to separate assembly MySqlClientTests
6/19/2003
========MySql===============
* Fixed stupid problem in driver with sequence out of order (Thanks Peter Belbin)
6/18/2003
========MySql===============
* Added some pipe tests
* Increased default max pool size to 50
* Compiles with Mono 0-24
6/17/2003
========MySql===============
* Fixed connection and data reader dispose problems
* Added String datatype handling to parameter serialization
6/13/2003
========MySql===============
* Fixed sequence problem in driver that occured after thrown exception
(thanks Burkhard Perkens-Golomb)
6/10/2003
========MySql===============
* Added support for CommandBehavior.SingleRow to DataReader
* Fixed command sql processing so quotes are better handled (thanks Theo Spears)
6/9/2003
========MySQL===============
* Fixed parsing of double, single, and decimal values to account for non-English separators.
You still have to use the right syntax if you using hard coded sql, but if you use parameters
the code will convert floating point types to use '.' appropriately internal both into the server
and out.
[ Thanks anonymous ]
* Added MySqlStream class to simplify timeOuts and driver coding.
* Fixed DataReader so that it is closed properly when the associated connection is closed.
[thanks smishra]
* Made client more SqlClient compliant so that DataReaders have to be closed before the connection
can be used to run another command
* Improved DBNull.Value handling in the fields
* Added several unit tests
* Fixed MySqlException so that the base class is actually called :-o
* Improved driver coding
=============PgSql=================
* Too many changes to document. Still basic structuring of driver. Driver not really usable yet.
5/28/2003
* Fixed bug where NextResult was returning false on the last resultset
* Added more tests for MySQL
* Improved casting problems by equating unsigned 32bit values to Int64 and usigned 16bit values to Int32, etc
5/6/2003
* Added new ctor for MySqlParameter for (name, type, size, srccol)
* Fixed bug in MySqlDataReader where it didn't check for null fieldlist before returning field count
4/23/2003
* Started adding MySqlClient unit tests (added MySqlClient/Tests folder and some test cases)
* Fixed some things in Connection String handling
4/7/2003
* Moved INIT_DB to MySqlPool. I may move it again, this is in preparation of the conference.
4/6/2003
* Fixed bug inside CommandBuilder that prevented inserts from happening properly
* Reworked some of the internals so that all three execute methods of Command worked properly
* FIxed many small bugs found during benchmarking
4/5/2003
* The first cut of CoonectionPooling is working. "min pool size" and "max pool size" are respected.
4/3/2003
* Work to enable multiple resultsets to be returned
* Character sets are handled much more intelligently now. The driver queries MySQL at startup for the default character set.
That character set is then used for conversions if that code page can be loaded. If not, then the default code
page for the current OS is used.
3/31/2003
* Added code to save the inferred type in the name,value ctor of Parameter
* Also, inferred type if value of null parameter is changed using Value property
* Converted all files to use proper Camel case. MySQL is now MySql in all files. PgSQL is now PgSql
* Added attribute to PgSql code to prevent designer from trying to show
3/17/2003
* Added MySQLDbType property to Parameter object and added proper conversion code to convert from DbType to MySQLDbType)
* Removed unused ObjectToString method from MySQLParameter.cs
* Fixed Add(..) method in ParameterCollection so that it doesn't use Add(name, value) instead.
* Fixed IndexOf and Contains in ParameterCollection to be aware that parameter names are now stored without @
* Fixed Command.ConvertSQLToBytes so it only allows characters that can be in MySQL variable names
* Fixed DataReader and Field so that blob fields read their data from Field.cs and GetBytes works right
* Added simple query builder editor to CommandText property of MySQLCommand
* Fixed CommandBuilder and Parameter serialization to account for Parameters not storing @ in their names
* Removed MySQLFieldType enum from Field.cs. Now using MySQLDbType enum
3/15/2003
* Added Designer attribute to several classes to prevent designer view when using VS.Net
3/13/2003
* Fixed Initial catalog typo in ConnectionString designer
* Removed 3 parameter ctor for MySQLParameter that conflicted with (name, type, value)
* changed MySQLParameter so paramName is now stored without leading @ (this fixed null inserts when using designer)
* Changed TypeConverter for MySQLParameter to use the ctor with all properties
0.68
========================================================================
Note that this build has not been checked out with Mono.
3/10/2003
* Fixed sequence issue in driver
3/9/2003
* Added DbParametersEditor to make parameter editing more like SqlClient
* Fixed Command class so that parameters can be edited using the designer
3/7/2003
* Update connection string designer to support Use Compression flag
2/15/2003
* Fixed string encoding so that European characters like ä will work correctly
2/9/2003
* Creating base classes to aid in building new data providers
* Added support for UID key in connection string
2/10/2003
* Field, parameter, command now using DBNull.Value instead of null
* CommandBuilder using DBNull.Value
* CommandBuilder now builds insert command correctly when an auto_insert field is not present
* Field now uses typeof keyword to return System.Types (performance)
0.65
====================
* MySQLCommandBuilder now implemented
* Transaction support now implemented (not all table types support this)
* GetSchemaTable fixed to not use xsd (for Mono)
* Driver is now Mono-compatible!!
* TIME data type now supported
* More work to improve Timestamp data type handling
* Changed signatures of all classes to match corresponding SqlClient classes
0.60
======================
* Protocol compression using SharpZipLib (www.icsharpcode.net)
* Named pipes on Windows now working properly
* Work done to improve Timestamp data type handling
* Implemented IEnumerable on DataReader so DataGrid would work
0.50
======================
* Speed increased dramatically by removing bugging network sync code
* Driver no longer buffers rows of data (more ADO.Net compliant)
* Conversion bugs related to TIMESTAMP and DATETIME fields fixed
3/11/2004
MySql - Changed command editor to point to MySqlClient.Design
3/4/2004
Common - Fixed bug in Version.isAtLeast
Common - Changed DBConnectionString to support changes done to MySqlConnectionString
Common - Removed SqlCommandEditor and DataAdapterPreviewDialog
3/3/2004
MySql - Using new long return values in many places
MySql - Integrated new CompressedStream class
3/2/2004
MySql - Changed ConnectionString and added attributes to allow it to be used in MySqlClient.Design
MySql - Changed packet.cs to support newer lengths in ReadLenInteger
MySql - changed other classes to use new properties and fields of MySqlConnectionString
MySql - ConnectionInternal is now using PING to see if the server is alive
3/1/2004
MySql - Moved toolbox bitmaps into resource/
MySql - Changed field.cs to allow values to come directly from row buffer
2/25/2004
MySql - Changed to use the new driver.Send syntax
MySql - Using a new packet queueing system
MySql - started work handling the "broken" compression packet handling
2/20/2004
Common - Fixed bug in StreamCreator where failure to connect to a host would continue
to loop infinitly (thanks Kevin Casella)
2/8/2004
MySql - Improved connectstring handling
MySql - Moved designers into Pro product
2/4/2004
MySql - Removed some old commented out code from command.cs
MySql - Fixed a problem with compression
2/2/2004
MySql - Fixed connection object where an exception throw prior to the connection opening would not leave
the connection in the connecting state (thanks Chris Cline )
1/31/2004
MySql - Added GUID support
MySql - Fixed sequence out of order bug (thanks Mark Reay)
1/26/2004
MySql - Enum values now supported as parameter values (thanks Philipp Sumi)
1/22/2004
MySql - Year datatype now supported
1/21/2004
MySql - fixed compression
1/20/2004
MySql - Fixed bug where a parameter with a TimeSpan as the value would not serialize properly
MySql,Common - Fixed bug where default ctor would not set default connection string values
MySql - Added some XML comments to some members
MySql - Work to fix/improve compression handling
1/13/2004
MySql,Common - Improved ConnectionString handling so that it better matches the standard set by SqlClient.
MySql - A MySqlException is now thrown if a username is not included in the connection string
MySql- Localhost is now used as the default if not specified on the connection string
MySql - An exception is now thrown if an attempt is made to set the connection string while the connection is open
MySql - Small changes to ConnectionString docs
MySql,common - Removed MultiHostStream and MySqlStream. Replaced it with Common/StreamCreator
MySql - Added support for Use Pipe connection string value
MySql - Added Platform class for easier access to platform utility functions
MySql - Fixed small pooling bug where new connection was not getting created after IsAlive fails
Common - Added Platform.cs and StreamCreator.cs
12/30/2003
MySql - Fixed Field.cs to properly handle 4.1 style timestamps
MySql - Changed Common.Version to Common.DBVersion to avoid name conflict
12/29/2003
MySql - Fixed field.cs so that text columns return the right field type (thanks [email protected]et)
12/22/2003
MySql - Added MySqlError class to provide some reference for error codes (thanks Geert Veenstra)
------------0.74 ------------------------
12/6/2003
MySql - Added Unix socket support (thanks Mohammad DAMT [[email protected]])
12/4/2003
MySql - only calling Thread.Sleep when no data is available
MySql - improved escaping of quote characters in parameter data
MySql - removed misleading comments from parameter.cs
12/1/2003
Mysql -fixed pooling bug
MySql - same pooling bug fixed again!! ;-)
11/30/2003
MySql - Fixed ConnectionSTring editor dialog (thanks marco p (pomarc))
Common - UserId now supported in connection strings (thanks Jeff Neeley)
MySql - Attempting to create a parameter that is not input throws an exception (thanks Ryan Gregg)
11/29/2003
MySql - Added much documentation
11/26/2003
MySql - checked in new MultiHostStream capability. Big thanks to Dan Guisinger for this. he originally submitted the code and idea of supporting multiple machines on the connect string.
11/25/2003
MySql - Added alot of documentation. Still alot to do.
11/24/2003
MySql - Fixed speed issue with 0.73
11/14/2003
MySql - changed to Thread.Sleep(0) in MySqlDataStream to help optimize the case where it doesn't need to wait (thanks Todd German)
11/1/2003
MySql - Prepopulating the idlepools to MinPoolSize
10/31/2003
MySql - Fixed MySqlPool deadlock condition as well as stupid bug where CreateNewPooledConnection
was not ever adding new connections to the pool.
Also fixed MySqlStream.ReadBytes and ReadByte to not use TicksPerSecond which does not appear
to always be right.
(thanks Matthew J. Peddlesden)
MySql - Fix for precision and scale (thanks Matthew J. Peddlesden)
10/28/2003
MySql - Added Thread.Sleep(1) to stream reading methods to be more cpu friendly (thanks Sean McGinnis)
10/24/2003
MySql - Fixed problem where ExecuteReader would sometime return null (thanks Lloyd Dupont )
10/17/2003
MySql - Fixed major bug with null field handling (thanks Naucki)
10/15/2003
MySql - enclosed queries for max_allowed_packet and characterset inside try catch (and set defaults)
MySql - fixed problem where socket was not getting closed properly (thanks Steve!)
10/14/2003
MySql - Fixed problem where ExecuteNonQuery was not always returning the right value
10/13/2003
MySql - Fixed InternalConnection to not use @@session.max_allowed_packet but use @@max_allowed_packet. (Thanks Miguel)
10/12/2003
MySql - Added many new XML doc lines
10/10/2003
MySql - Fixed sql parsing to not send empty queries (thanks Rory)
MySql - Fixed problem where the reader was not unpeeking the packet on close
MySql - Fixed problem where user variables were not being handled (thanks Sami Vaaraniemi)
MySql - Fixed loop checking in the MySqlPool (thanks Steve M. Brown)
10/7/2003
MySql - Fixed ParameterCollection.Add method to match SqlClient (thanks Joshua Mouch)
Common & MySql - Fixed ConnectionSTring parsing to handle no and yes for boolean and not lowercase values (thanks Naucki)
10/3/2003
MySql - Added InternalConnection class, changes to pooling
Common - Implemented Persist Security Info
9/26/2003
Common - Added security.cs and version.cs to project
9/25/2003
MySql - Fixed DateTime handling in Parameter.cs (thanks Burkhard Perkens-Golomb)
MySql - Fixed parameter serialization where some types would throw a cast exception
MySql - Fixed DataReader to convert all returned values to prevent casting errors (thanks Keith Murray)
MySql - Added code to Command.ExecuteReader to return null if the initial SQL command throws an exception (thanks Burkhard Perkens-Golomb)
9/24/2003
MySql - Fixed ExecuteScalar bug introduced with restructure
9/23/2003
MySql - Restructure to allow for LOCAL DATA INFILE and better sequencing of packets
MySql - Fixed several bugs related to restructure.
9/10/2003
MySql - Early work done to support more secure passwords in Mysql 4.1. Old passwords in 4.1 not supported yet
8/22/2003
MySql- Parameters appearing after system parameters are now handled correctly (Adam M. (adammil))
MySql - strings can now be assigned directly to blob fields (Adam M.)
8/20/2003
MySql - Fixed float parameters (thanks Pent)
8/7/2003
MySql - Improved Parameter ctor and ParameterCollection.Add methods to better match SqlClient (thx Joshua Mouch )
MySql - Corrected Connection.CreateCommand to return a MySqlCommand type
MySql - Fixed connection string designer dialog box problem (thanks Abraham Guyt)
7/24/2003
MySql - Fixed problem with sending commands not always reading the response packet (thanks Joshua Mouch )
MySql - Fixed parameter serialization where some blobs types were not being handled (thanks Sean McGinnis )
7/22/2003
MySql - Removed spurious MessageBox.show from DataReader code (thanks Joshua Mouch )
7/17/2003
MySql - Fixed a nasty bug in the split sql code (thanks everyone! :-) )
*************Released 0.71***********************
7/15/2003
MySql - Fixed bug in MySqlStream where too much data could attempt to be read (thanks Peter Belbin)
7/11/2003
MySql - Implemented HasRows (thanks Nash Pherson)
MySql - Fixed bug where tables with more than 252 columns cause an exception ( thanks Joshua Kessler )
MySql - Fixed bug where SQL statements ending in ; would cause a problem ( thanks Shane Krueger )
MySql - Fixed bug in driver where error messsages were getting truncated by 1 character (thanks Shane Krueger)
7/6/2003
========MySql===============
* Made MySqlException serializable (thanks Mathias Hasselmann)
========PgSql===============
* Made PgSqlException serializable (thanks Mathias Hasselmann)
***********Released 0.70*********************
6/25/2003
========MySql===============
* Updated some of the character code pages to be more accurate
* Fixed problem where readers could be opened on connections that had readers open
* Release of 0.70
6/20/2003
========MySql===============
* Moved test to separate assembly MySqlClientTests
6/19/2003
========MySql===============
* Fixed stupid problem in driver with sequence out of order (Thanks Peter Belbin)
6/18/2003
========MySql===============
* Added some pipe tests
* Increased default max pool size to 50
* Compiles with Mono 0-24
6/17/2003
========MySql===============
* Fixed connection and data reader dispose problems
* Added String datatype handling to parameter serialization
6/13/2003
========MySql===============
* Fixed sequence problem in driver that occured after thrown exception
(thanks Burkhard Perkens-Golomb)
6/10/2003
========MySql===============
* Added support for CommandBehavior.SingleRow to DataReader
* Fixed command sql processing so quotes are better handled (thanks Theo Spears)
6/9/2003
========MySQL===============
* Fixed parsing of double, single, and decimal values to account for non-English separators.
You still have to use the right syntax if you using hard coded sql, but if you use parameters
the code will convert floating point types to use '.' appropriately internal both into the server
and out.
[ Thanks anonymous ]
* Added MySqlStream class to simplify timeOuts and driver coding.
* Fixed DataReader so that it is closed properly when the associated connection is closed.
[thanks smishra]
* Made client more SqlClient compliant so that DataReaders have to be closed before the connection
can be used to run another command
* Improved DBNull.Value handling in the fields
* Added several unit tests
* Fixed MySqlException so that the base class is actually called :-o
* Improved driver coding
=============PgSql=================
* Too many changes to document. Still basic structuring of driver. Driver not really usable yet.
5/28/2003
* Fixed bug where NextResult was returning false on the last resultset
* Added more tests for MySQL
* Improved casting problems by equating unsigned 32bit values to Int64 and usigned 16bit values to Int32, etc
5/6/2003
* Added new ctor for MySqlParameter for (name, type, size, srccol)
* Fixed bug in MySqlDataReader where it didn't check for null fieldlist before returning field count
4/23/2003
* Started adding MySqlClient unit tests (added MySqlClient/Tests folder and some test cases)
* Fixed some things in Connection String handling
4/7/2003
* Moved INIT_DB to MySqlPool. I may move it again, this is in preparation of the conference.
4/6/2003
* Fixed bug inside CommandBuilder that prevented inserts from happening properly
* Reworked some of the internals so that all three execute methods of Command worked properly
* FIxed many small bugs found during benchmarking
4/5/2003
* The first cut of CoonectionPooling is working. "min pool size" and "max pool size" are respected.
4/3/2003
* Work to enable multiple resultsets to be returned
* Character sets are handled much more intelligently now. The driver queries MySQL at startup for the default character set.
That character set is then used for conversions if that code page can be loaded. If not, then the default code
page for the current OS is used.
3/31/2003
* Added code to save the inferred type in the name,value ctor of Parameter
* Also, inferred type if value of null parameter is changed using Value property
* Converted all files to use proper Camel case. MySQL is now MySql in all files. PgSQL is now PgSql
* Added attribute to PgSql code to prevent designer from trying to show
3/17/2003
* Added MySQLDbType property to Parameter object and added proper conversion code to convert from DbType to MySQLDbType)
* Removed unused ObjectToString method from MySQLParameter.cs
* Fixed Add(..) method in ParameterCollection so that it doesn't use Add(name, value) instead.
* Fixed IndexOf and Contains in ParameterCollection to be aware that parameter names are now stored without @
* Fixed Command.ConvertSQLToBytes so it only allows characters that can be in MySQL variable names
* Fixed DataReader and Field so that blob fields read their data from Field.cs and GetBytes works right
* Added simple query builder editor to CommandText property of MySQLCommand
* Fixed CommandBuilder and Parameter serialization to account for Parameters not storing @ in their names
* Removed MySQLFieldType enum from Field.cs. Now using MySQLDbType enum
3/15/2003
* Added Designer attribute to several classes to prevent designer view when using VS.Net
3/13/2003
* Fixed Initial catalog typo in ConnectionString designer
* Removed 3 parameter ctor for MySQLParameter that conflicted with (name, type, value)
* changed MySQLParameter so paramName is now stored without leading @ (this fixed null inserts when using designer)
* Changed TypeConverter for MySQLParameter to use the ctor with all properties
0.68
========================================================================
Note that this build has not been checked out with Mono.
3/10/2003
* Fixed sequence issue in driver
3/9/2003
* Added DbParametersEditor to make parameter editing more like SqlClient
* Fixed Command class so that parameters can be edited using the designer
3/7/2003
* Update connection string designer to support Use Compression flag
2/15/2003
* Fixed string encoding so that European characters like ä will work correctly
2/9/2003
* Creating base classes to aid in building new data providers
* Added support for UID key in connection string
2/10/2003
* Field, parameter, command now using DBNull.Value instead of null
* CommandBuilder using DBNull.Value
* CommandBuilder now builds insert command correctly when an auto_insert field is not present
* Field now uses typeof keyword to return System.Types (performance)
0.65
====================
* MySQLCommandBuilder now implemented
* Transaction support now implemented (not all table types support this)
* GetSchemaTable fixed to not use xsd (for Mono)
* Driver is now Mono-compatible!!
* TIME data type now supported
* More work to improve Timestamp data type handling
* Changed signatures of all classes to match corresponding SqlClient classes
0.60
======================
* Protocol compression using SharpZipLib (www.icsharpcode.net)
* Named pipes on Windows now working properly
* Work done to improve Timestamp data type handling
* Implemented IEnumerable on DataReader so DataGrid would work
0.50
======================
* Speed increased dramatically by removing bugging network sync code
* Driver no longer buffers rows of data (more ADO.Net compliant)
* Conversion bugs related to TIMESTAMP and DATETIME fields fixed
+53 -53
View File
@@ -1,53 +1,53 @@
using System;
using System.IO;
namespace ByteFX.Data.Common
{
/// <summary>
/// Summary description for BitStream.
/// </summary>
public class BitStream : MemoryStream
{
private byte[] _input;
private int _start;
private int _end;
private int _bitindex;
private uint _bitbuffer;
private int _bits_in_buffer;
public BitStream(byte[] input, int index, int len)
{
_bitindex = 0;
_bitbuffer = 0;
_bits_in_buffer = 0;
_input = input;
_start = index;
_end = _start + len;
}
public int GetBits(int numbits)
{
return 0;
}
public int PeekBits(int numbits)
{
int val=0;
int index=_start;
while (numbits > 0)
{
val = (val << 8) | _input[index++];
numbits -= 8;
}
while (_bits_in_buffer < numbits)
{
if (_start == _end)
throw new Exception("Out of bits");
byte b = _input[_start++];
}
return 0;
}
}
}
using System;
using System.IO;
namespace ByteFX.Data.Common
{
/// <summary>
/// Summary description for BitStream.
/// </summary>
public class BitStream : MemoryStream
{
private byte[] _input;
private int _start;
private int _end;
private int _bitindex;
private uint _bitbuffer;
private int _bits_in_buffer;
public BitStream(byte[] input, int index, int len)
{
_bitindex = 0;
_bitbuffer = 0;
_bits_in_buffer = 0;
_input = input;
_start = index;
_end = _start + len;
}
public int GetBits(int numbits)
{
return 0;
}
public int PeekBits(int numbits)
{
int val=0;
int index=_start;
while (numbits > 0)
{
val = (val << 8) | _input[index++];
numbits -= 8;
}
while (_bits_in_buffer < numbits)
{
if (_start == _end)
throw new Exception("Out of bits");
byte b = _input[_start++];
}
return 0;
}
}
}
+129 -129
View File
@@ -1,129 +1,129 @@
// ByteFX.Data data access components for .Net
// Copyright (C) 2002-2003 ByteFX, Inc.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
using System;
using System.ComponentModel;
using System.Collections.Specialized;
using System.Data;
namespace ByteFX.Data.Common
{
/// <summary>
/// Summary description for Connection.
/// </summary>
[ToolboxItem(false)]
[System.ComponentModel.DesignerCategory("Code")]
public class Connection : Component
{
internal ConnectionString connString;
internal ConnectionState state;
internal IDataReader reader = null;
public Connection(System.ComponentModel.IContainer container)
{
/// <summary>
/// Required for Windows.Forms Class Composition Designer support
/// </summary>
container.Add(this);
Init();
}
public Connection()
{
Init();
}
protected void Init()
{
state = ConnectionState.Closed;
}
[Browsable(true)]
public string DataSource
{
get
{
String s = connString["data source"];
if (s == null || s.Length == 0)
return "localhost";
return s;
}
}
[Browsable(false)]
public string User
{
get
{
string s = connString["user id"];
if (s == null)
s = "";
return s;
}
}
[Browsable(false)]
public string Password
{
get
{
string pwd = connString["password"];
if (pwd == null)
pwd = "";
return pwd;
}
}
[Browsable(true)]
public int ConnectionTimeout
{
get
{
// Returns the connection time-out value set in the connection
// string. Zero indicates an indefinite time-out period.
if (connString == null)
return 30;
return connString.GetIntOption("connection timeout", 30);
}
}
[Browsable(true)]
public string Database
{
get
{
// Returns an initial database as set in the connection string.
// An empty string indicates not set - do not return a null reference.
return connString["database"];
}
}
[Browsable(false)]
public ConnectionState State
{
get { return state; }
}
internal IDataReader Reader
{
get { return reader; }
set { reader = value; }
}
}
}
// ByteFX.Data data access components for .Net
// Copyright (C) 2002-2003 ByteFX, Inc.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
using System;
using System.ComponentModel;
using System.Collections.Specialized;
using System.Data;
namespace ByteFX.Data.Common
{
/// <summary>
/// Summary description for Connection.
/// </summary>
[ToolboxItem(false)]
[System.ComponentModel.DesignerCategory("Code")]
public class Connection : Component
{
internal ConnectionString connString;
internal ConnectionState state;
internal IDataReader reader = null;
public Connection(System.ComponentModel.IContainer container)
{
/// <summary>
/// Required for Windows.Forms Class Composition Designer support
/// </summary>
container.Add(this);
Init();
}
public Connection()
{
Init();
}
protected void Init()
{
state = ConnectionState.Closed;
}
[Browsable(true)]
public string DataSource
{
get
{
String s = connString["data source"];
if (s == null || s.Length == 0)
return "localhost";
return s;
}
}
[Browsable(false)]
public string User
{
get
{
string s = connString["user id"];
if (s == null)
s = "";
return s;
}
}
[Browsable(false)]
public string Password
{
get
{
string pwd = connString["password"];
if (pwd == null)
pwd = "";
return pwd;
}
}
[Browsable(true)]
public int ConnectionTimeout
{
get
{
// Returns the connection time-out value set in the connection
// string. Zero indicates an indefinite time-out period.
if (connString == null)
return 30;
return connString.GetIntOption("connection timeout", 30);
}
}
[Browsable(true)]
public string Database
{
get
{
// Returns an initial database as set in the connection string.
// An empty string indicates not set - do not return a null reference.
return connString["database"];
}
}
[Browsable(false)]
public ConnectionState State
{
get { return state; }
}
internal IDataReader Reader
{
get { return reader; }
set { reader = value; }
}
}
}
+185 -185
View File
@@ -1,185 +1,185 @@
// ByteFX.Data data access components for .Net
// Copyright (C) 2002-2003 ByteFX, Inc.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
using System;
using System.Collections.Specialized;
namespace ByteFX.Data.Common
{
/// <summary>
/// Summary description for Utility.
/// </summary>
internal class ConnectionString
{
private StringDictionary elements;
private string connString;
public ConnectionString(string connString)
{
this.connString = connString;
elements = new StringDictionary();
Parse( connString );
}
public string Value
{
get { return connString; }
}
public string this[string key]
{
get
{
string val = elements[key];
return val;
}
}
public int GetIntOption( string key, int defaultvalue )
{
string val = this[ key ];
if (null == val) return defaultvalue;
return Convert.ToInt32( val );
}
public bool GetBoolOption( string key, bool defaultvalue )
{
string val = this[ key ];
if (null == val) return defaultvalue;
val = val.ToLower();
if (val == "true" || val == "yes") return true;
return false;
}
public bool Contains( string key )
{
return elements.ContainsKey(key);
}
public bool Equals( ConnectionString obj )
{
foreach (string key in elements.Keys)
{
if (! obj.Contains(key)) return false;
if ( ! this[key].Equals( obj[key] )) return false;
}
return true;
}
/// <summary>
///
/// </summary>
/// <param name="obj"></param>
/// <returns></returns>
public bool PoolingEquals( ConnectionString obj )
{
foreach (string key in elements.Keys)
{
// these connection string elements only affect pooling
// so we don't check them when making sure connection strings
// are alike
if (key.Equals("connection lifetime")) continue;
if (key.Equals("connection reset")) continue;
if (key.Equals("enlist")) continue;
if (key.Equals("max pool size")) continue;
if (key.Equals("min pool size")) continue;
if (key.Equals("pooling")) continue;
if (! obj.Contains(key)) return false;
if ( ! this[key].Equals( obj[key] )) return false;
}
return true;
}
/// <summary>
///
/// </summary>
/// <param name="s"></param>
public void Parse( String s )
{
String[] keyvalues = s.Split( ';' );
String[] newkeyvalues = new String[keyvalues.Length];
int x = 0;
elements.Clear();
// first run through the array and check for any keys that
// have ; in their value
foreach (String keyvalue in keyvalues)
{
// check for trailing ; at the end of the connection string
if (keyvalue.Length == 0) continue;
// this value has an '=' sign so we are ok
if (keyvalue.IndexOf('=') >= 0)
{
newkeyvalues[x++] = keyvalue;
}
else
{
newkeyvalues[x-1] += ";";
newkeyvalues[x-1] += keyvalue;
}
}
// now we run through our normalized key-values, splitting on equals
for (int y=0; y < x; y++)
{
String[] parts = newkeyvalues[y].Split( '=' );
// first trim off any space and lowercase the key
parts[0] = parts[0].Trim().ToLower();
parts[1] = parts[1].Trim();
// normalize the keys going in. We want to support the same synonyms that
// SqlClient supports
switch (parts[0])
{
case "uid": parts[0] = "user id"; break;
case "pwd": parts[0] = "password"; break;
case "user": parts[0] = "user id"; break;
case "initial catalog": parts[0] = "database"; break;
case "server": parts[0] = "data source"; break;
}
// we also want to clear off any quotes
String newvalue = parts[1].Trim( '\'' );
if (newvalue.Length == parts[1].Length)
{
newvalue = parts[1].Trim('"');
}
parts[1] = newvalue;
// make sure we don't get dupliate keys
if (elements.ContainsKey(parts[0]))
{
throw new ArgumentException("Duplicate key in connection string", parts[0]);
}
elements.Add( parts[0], parts[1] );
// now put the correct parsed string into the connection string !! (AG 4/8/2003)
connString="";
foreach(string key in elements.Keys)
{
connString=connString+key+"="+elements[key]+"; ";
}
connString=connString.Substring(0,connString.Length-2);
}
}
}
}
// ByteFX.Data data access components for .Net
// Copyright (C) 2002-2003 ByteFX, Inc.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
using System;
using System.Collections.Specialized;
namespace ByteFX.Data.Common
{
/// <summary>
/// Summary description for Utility.
/// </summary>
internal class ConnectionString
{
private StringDictionary elements;
private string connString;
public ConnectionString(string connString)
{
this.connString = connString;
elements = new StringDictionary();
Parse( connString );
}
public string Value
{
get { return connString; }
}
public string this[string key]
{
get
{
string val = elements[key];
return val;
}
}
public int GetIntOption( string key, int defaultvalue )
{
string val = this[ key ];
if (null == val) return defaultvalue;
return Convert.ToInt32( val );
}
public bool GetBoolOption( string key, bool defaultvalue )
{
string val = this[ key ];
if (null == val) return defaultvalue;
val = val.ToLower();
if (val == "true" || val == "yes") return true;
return false;
}
public bool Contains( string key )
{
return elements.ContainsKey(key);
}
public bool Equals( ConnectionString obj )
{
foreach (string key in elements.Keys)
{
if (! obj.Contains(key)) return false;
if ( ! this[key].Equals( obj[key] )) return false;
}
return true;
}
/// <summary>
///
/// </summary>
/// <param name="obj"></param>
/// <returns></returns>
public bool PoolingEquals( ConnectionString obj )
{
foreach (string key in elements.Keys)
{
// these connection string elements only affect pooling
// so we don't check them when making sure connection strings
// are alike
if (key.Equals("connection lifetime")) continue;
if (key.Equals("connection reset")) continue;
if (key.Equals("enlist")) continue;
if (key.Equals("max pool size")) continue;
if (key.Equals("min pool size")) continue;
if (key.Equals("pooling")) continue;
if (! obj.Contains(key)) return false;
if ( ! this[key].Equals( obj[key] )) return false;
}
return true;
}
/// <summary>
///
/// </summary>
/// <param name="s"></param>
public void Parse( String s )
{
String[] keyvalues = s.Split( ';' );
String[] newkeyvalues = new String[keyvalues.Length];
int x = 0;
elements.Clear();
// first run through the array and check for any keys that
// have ; in their value
foreach (String keyvalue in keyvalues)
{
// check for trailing ; at the end of the connection string
if (keyvalue.Length == 0) continue;
// this value has an '=' sign so we are ok
if (keyvalue.IndexOf('=') >= 0)
{
newkeyvalues[x++] = keyvalue;
}
else
{
newkeyvalues[x-1] += ";";
newkeyvalues[x-1] += keyvalue;
}
}
// now we run through our normalized key-values, splitting on equals
for (int y=0; y < x; y++)
{
String[] parts = newkeyvalues[y].Split( '=' );
// first trim off any space and lowercase the key
parts[0] = parts[0].Trim().ToLower();
parts[1] = parts[1].Trim();
// normalize the keys going in. We want to support the same synonyms that
// SqlClient supports
switch (parts[0])
{
case "uid": parts[0] = "user id"; break;
case "pwd": parts[0] = "password"; break;
case "user": parts[0] = "user id"; break;
case "initial catalog": parts[0] = "database"; break;
case "server": parts[0] = "data source"; break;
}
// we also want to clear off any quotes
String newvalue = parts[1].Trim( '\'' );
if (newvalue.Length == parts[1].Length)
{
newvalue = parts[1].Trim('"');
}
parts[1] = newvalue;
// make sure we don't get dupliate keys
if (elements.ContainsKey(parts[0]))
{
throw new ArgumentException("Duplicate key in connection string", parts[0]);
}
elements.Add( parts[0], parts[1] );
// now put the correct parsed string into the connection string !! (AG 4/8/2003)
connString="";
foreach(string key in elements.Keys)
{
connString=connString+key+"="+elements[key]+"; ";
}
connString=connString.Substring(0,connString.Length-2);
}
}
}
}
+189 -245
View File
@@ -1,245 +1,189 @@
// ByteFX.Data data access components for .Net
// Copyright (C) 2002-2003 ByteFX, Inc.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
using System;
using System.Collections;
using System.Text;
namespace ByteFX.Data.Common
{
/// <summary>
/// Summary description for Utility.
/// </summary>
internal class DBConnectionString
{
protected Hashtable keyValues = new Hashtable();
protected string connectString;
protected string host;
protected string username;
protected string password;
protected string database;
protected int connectTimeout;
protected int port;
protected int maxPoolSize;
protected int minPoolSize;
protected int connectLifetime;
protected bool pooling;
protected bool persistSecurityInfo;
public DBConnectionString()
{
persistSecurityInfo = false;
}
public DBConnectionString(string connectString) : this()
{
this.connectString = connectString;
}
#region Properties
public string Host
{
get { return host; }
}
public string Username
{
get { return username; }
}
public string Password
{
get { return password; }
}
public int ConnectTimeout
{
get { return connectTimeout; }
}
public string Database
{
get { return database; }
}
public int Port
{
get { return port; }
}
public int MaxPoolSize
{
get { return maxPoolSize; }
}
public int MinPoolSize
{
get { return minPoolSize; }
}
public bool Pooling
{
get { return pooling; }
}
public int ConnectionLifetime
{
get { return connectLifetime; }
}
public string ConnectString
{
get { return GetConnectionString(); }
set { connectString = value; Parse(); }
}
#endregion
private string GetConnectionString()
{
StringBuilder str = new StringBuilder();
foreach ( string key in keyValues.Keys)
{
if ((key.ToLower() == "pwd" || key.ToLower() == "password") &&
!persistSecurityInfo) continue;
str.AppendFormat("{0}={1};", key, keyValues[key]);
}
if (str.Length > 0)
str.Remove( str.Length-1, 1 );
return str.ToString();
}
protected virtual void ConnectionParameterParsed(string key, string value)
{
switch (key.ToLower())
{
case "persist security info":
if (value.ToLower() == "no" || value.ToLower() == "false")
persistSecurityInfo = false;
else
persistSecurityInfo = true;
break;
case "uid":
case "username":
case "user id":
case "user name":
case "userid":
username = value;
break;
case "password":
case "pwd":
password = value;
break;
case "host":
case "server":
case "data source":
case "datasource":
case "address":
case "addr":
case "network address":
host = value;
break;
case "initial catalog":
case "database":
database = value;
break;
case "connection timeout":
case "connect timeout":
connectTimeout = Int32.Parse( value );
break;
case "port":
port = Int32.Parse( value );
break;
case "pooling":
if (value.ToLower() == "no" || value.ToLower() == "false")
pooling = false;
else
pooling = true;
break;
case "min pool size":
minPoolSize = Int32.Parse(value);
break;
case "max pool size":
maxPoolSize = Int32.Parse(value);
break;
case "connection lifetime":
connectLifetime = Int32.Parse(value);
break;
}
}
protected void Parse()
{
String[] keyvalues = connectString.Split( ';' );
String[] newkeyvalues = new String[keyvalues.Length];
int x = 0;
// first run through the array and check for any keys that
// have ; in their value
foreach (String keyvalue in keyvalues)
{
// check for trailing ; at the end of the connection string
if (keyvalue.Length == 0) continue;
// this value has an '=' sign so we are ok
if (keyvalue.IndexOf('=') >= 0)
{
newkeyvalues[x++] = keyvalue;
}
else
{
newkeyvalues[x-1] += ";";
newkeyvalues[x-1] += keyvalue;
}
}
keyValues.Clear();
// now we run through our normalized key-values, splitting on equals
for (int y=0; y < x; y++)
{
String[] parts = newkeyvalues[y].Split( '=' );
// first trim off any space and lowercase the key
parts[0] = parts[0].Trim().ToLower();
parts[1] = parts[1].Trim();
// we also want to clear off any quotes
parts[0] = parts[0].Trim('\'', '"');
parts[1] = parts[1].Trim('\'', '"');
ConnectionParameterParsed( parts[0], parts[1] );
keyValues.Add( parts[0], parts[1] );
}
}
}
}
// ByteFX.Data data access components for .Net
// Copyright (C) 2002-2003 ByteFX, Inc.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
using System;
using System.Collections;
using System.Text;
namespace ByteFX.Data.Common
{
/// <summary>
/// Summary description for Utility.
/// </summary>
internal abstract class DBConnectionString
{
protected Hashtable keyValues = new Hashtable();
protected string connectionName = String.Empty;
protected string connectString;
public DBConnectionString()
{
keyValues = GetDefaultValues();
}
public void SetConnectionString(string value)
{
Hashtable ht = Parse( value );
connectString = value;
keyValues = ht;
}
protected string GetString(string name)
{
if (! keyValues.ContainsKey(name)) return String.Empty;
return (keyValues[name] as string);
}
protected int GetInt( string name )
{
return Convert.ToInt32(keyValues[name]);
}
protected bool GetBool( string name )
{
return Convert.ToBoolean(keyValues[name]);
}
protected virtual bool ConnectionParameterParsed(Hashtable hash, string key, string value)
{
switch (key.ToLower())
{
case "persist security info":
hash["persist security info"] =
value.ToLower() == "yes" || value.ToLower() == "true";
return true;
case "uid":
case "username":
case "user id":
case "user name":
case "userid":
hash["user id"] = value;
return true;
case "password":
case "pwd":
hash["password"] = value;
return true;
case "host":
case "server":
case "data source":
case "datasource":
case "address":
case "addr":
case "network address":
hash["host"] = value;
return true;
case "initial catalog":
case "database":
hash["database"] = value;
return true;
case "connection timeout":
case "connect timeout":
hash["connect timeout"] = Int32.Parse( value );
return true;
case "port":
hash["port"] = Int32.Parse( value );
return true;
case "pooling":
hash["pooling"] =
value.ToLower() == "yes" || value.ToLower() == "true";
return true;
case "min pool size":
hash["min pool size"] = Int32.Parse(value);
return true;
case "max pool size":
hash["max pool size"] = Int32.Parse(value);
return true;
case "connection lifetime":
hash["connect lifetime"] = Int32.Parse(value);
return true;
}
return false;
}
protected virtual Hashtable GetDefaultValues()
{
return null;
}
protected Hashtable ParseKeyValuePairs( string src )
{
String[] keyvalues = src.Split( ';' );
String[] newkeyvalues = new String[keyvalues.Length];
int x = 0;
// first run through the array and check for any keys that
// have ; in their value
foreach (String keyvalue in keyvalues)
{
// check for trailing ; at the end of the connection string
if (keyvalue.Length == 0) continue;
// this value has an '=' sign so we are ok
if (keyvalue.IndexOf('=') >= 0)
{
newkeyvalues[x++] = keyvalue;
}
else
{
newkeyvalues[x-1] += ";";
newkeyvalues[x-1] += keyvalue;
}
}
Hashtable hash = new Hashtable();
// now we run through our normalized key-values, splitting on equals
for (int y=0; y < x; y++)
{
String[] parts = newkeyvalues[y].Split( '=' );
// first trim off any space and lowercase the key
parts[0] = parts[0].Trim().ToLower();
parts[1] = parts[1].Trim();
// we also want to clear off any quotes
parts[0] = parts[0].Trim('\'', '"');
parts[1] = parts[1].Trim('\'', '"');
hash.Add( parts[0], parts[1] );
}
return hash;
}
protected virtual Hashtable Parse(string newConnectString)
{
Hashtable hash = ParseKeyValuePairs( newConnectString );
Hashtable newHash = GetDefaultValues();
foreach (object key in hash.Keys)
ConnectionParameterParsed( newHash, (string)key, (string)hash[key] );
return newHash;
}
}
}
@@ -1,59 +1,59 @@
// ByteFX.Data data access components for .Net
// Copyright (C) 2002-2003 ByteFX, Inc.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
using System;
using System.ComponentModel.Design;
using ByteFX.Data.MySqlClient;
namespace ByteFX.Data.Common
{
/// <summary>
/// Summary description for DBParametersEditor.
/// </summary>
internal class DBParametersEditor : CollectionEditor
{
public DBParametersEditor(Type t) : base(t)
{
}
protected override object CreateInstance(Type itemType)
{
object[] items = base.GetItems(null);
int i = 1;
while (true)
{
bool found = false;
foreach (object obj in items)
{
MySqlParameter p = (MySqlParameter)obj;
if (p.ParameterName.Equals( "parameter" + i ))
{
found = true;
break;
}
}
if (! found) break;
i ++;
}
MySqlParameter parm = new MySqlParameter("parameter"+i, MySqlDbType.VarChar);
return parm;
}
}
}
// ByteFX.Data data access components for .Net
// Copyright (C) 2002-2003 ByteFX, Inc.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
using System;
using System.ComponentModel.Design;
using ByteFX.Data.MySqlClient;
namespace ByteFX.Data.Common
{
/// <summary>
/// Summary description for DBParametersEditor.
/// </summary>
internal class DBParametersEditor : CollectionEditor
{
public DBParametersEditor(Type t) : base(t)
{
}
protected override object CreateInstance(Type itemType)
{
object[] items = base.GetItems(null);
int i = 1;
while (true)
{
bool found = false;
foreach (object obj in items)
{
MySqlParameter p = (MySqlParameter)obj;
if (p.ParameterName.Equals( "parameter" + i ))
{
found = true;
break;
}
}
if (! found) break;
i ++;
}
MySqlParameter parm = new MySqlParameter("parameter"+i, MySqlDbType.VarChar);
return parm;
}
}
}
+61 -51
View File
@@ -1,51 +1,61 @@
using System;
using System.Data;
using System.Data.SqlTypes;
namespace ByteFX.Data.Common
{
/// <summary>
/// Summary description for Field.
/// </summary>
internal class Field
{
/* protected SqlByte byteValue;
protected SqlDateTime dateValue;
protected SqlString stringValue;
protected SqlInt32 int32Value;
protected SqlInt64 int64Value;
protected SqlDouble doubleValue;
protected SqlSingle singleValue;
protected SqlMoney moneyValue;
protected SqlDecimal decimalValue;
protected SqlBinary binaryValue;*/
protected object value;
protected string tableName;
protected string colName;
protected int colLen;
protected DbType dbType;
protected bool hasValue;
public Field()
{
hasValue = false;
}
public string ColumnName
{
get { return colName; }
}
public int ColumnLength
{
get { return colLen; }
}
public string TableName
{
get { return tableName; }
}
}
}
using System;
using System.Data;
using System.Data.SqlTypes;
namespace ByteFX.Data.Common
{
/// <summary>
/// Summary description for Field.
/// </summary>
internal class Field
{
/* protected SqlByte byteValue;
protected SqlDateTime dateValue;
protected SqlString stringValue;
protected SqlInt32 int32Value;
protected SqlInt64 int64Value;
protected SqlDouble doubleValue;
protected SqlSingle singleValue;
protected SqlMoney moneyValue;
protected SqlDecimal decimalValue;
protected SqlBinary binaryValue;*/
protected object value;
protected string tableName;
protected string colName;
protected int colLen;
protected string catalogName;
protected DbType dbType;
protected bool hasValue;
public Field()
{
hasValue = false;
}
public string ColumnName
{
get { return colName; }
set { colName = value; }
}
public int ColumnLength
{
get { return colLen; }
set { colLen = value; }
}
public string TableName
{
get { return tableName; }
set { tableName = value; }
}
public string CatalogName
{
get { return catalogName; }
set { catalogName = value; }
}
}
}
+76 -76
View File
@@ -1,76 +1,76 @@
using System;
namespace ByteFX.Data.Common
{
/// <summary>
/// Summary description for HuffmanTree.
/// </summary>
public class HuffmanTree
{
const int MAX_BITS = 15;
int[] codes;
public HuffmanTree(bool lit)
{
if (lit)
BuildLitTree();
else
BuildLenTree();
}
private void BuildLitTree()
{
codes = new int[288];
// fill the code slots with code lengths first
for (int x=0; x < 144; x++)
codes[x] = 8;
for (int x=144; x < 256; x++)
codes[x] = 9;
for (int x=256; x < 280; x++)
codes[x] = 7;
for (int x=280; x < 288; x++)
codes[x] = 8;
BuildTreeCommon();
}
private void BuildLenTree()
{
BuildTreeCommon();
}
private void BuildTreeCommon()
{
int[] codecounts = new int[MAX_BITS];
int[] codebase = new int[MAX_BITS];
for (int i = 0; i < codes.Length; i++)
{
int bit_len = codes[i];
if (bit_len > 0)
codecounts[bit_len]++;
}
// now we compute the intial value for each code length
int code = 0;
codecounts[0] = 0;
for (int bits = 1; bits <= MAX_BITS; bits++)
{
code = (code + codecounts[bits-1]) << 1;
codebase[bits] = code;
}
// next we assign numerical values to each code
for (int x=0; x <= codes.Length; x++)
{
if (codes[x] == 0) continue;
int blen = codes[x];
codes[x] = codebase[ blen ];
codebase[ blen ] ++;
}
}
}
}
using System;
namespace ByteFX.Data.Common
{
/// <summary>
/// Summary description for HuffmanTree.
/// </summary>
public class HuffmanTree
{
const int MAX_BITS = 15;
int[] codes;
public HuffmanTree(bool lit)
{
if (lit)
BuildLitTree();
else
BuildLenTree();
}
private void BuildLitTree()
{
codes = new int[288];
// fill the code slots with code lengths first
for (int x=0; x < 144; x++)
codes[x] = 8;
for (int x=144; x < 256; x++)
codes[x] = 9;
for (int x=256; x < 280; x++)
codes[x] = 7;
for (int x=280; x < 288; x++)
codes[x] = 8;
BuildTreeCommon();
}
private void BuildLenTree()
{
BuildTreeCommon();
}
private void BuildTreeCommon()
{
int[] codecounts = new int[MAX_BITS];
int[] codebase = new int[MAX_BITS];
for (int i = 0; i < codes.Length; i++)
{
int bit_len = codes[i];
if (bit_len > 0)
codecounts[bit_len]++;
}
// now we compute the intial value for each code length
int code = 0;
codecounts[0] = 0;
for (int bits = 1; bits <= MAX_BITS; bits++)
{
code = (code + codecounts[bits-1]) << 1;
codebase[bits] = code;
}
// next we assign numerical values to each code
for (int x=0; x <= codes.Length; x++)
{
if (codes[x] == 0) continue;
int blen = codes[x];
codes[x] = codebase[ blen ];
codebase[ blen ] ++;
}
}
}
}
+37 -37
View File
@@ -1,37 +1,37 @@
using System;
using System.IO;
namespace ByteFX.Data.Common
{
/// <summary>
/// Summary description for Inflater.
/// </summary>
public class Inflater
{
private BitStream _input;
public Inflater()
{
}
public void SetInput(byte[] input, int offset, int len)
{
_input = new BitStream(input, offset, len);
}
public void Inflate(byte[] output, int offset, int size)
{
byte cmf = (byte)_input.GetBits(8);
byte flag = (byte)_input.GetBits(8);
if ((cmf & 0x0f) != 8)
throw new Exception("Only deflate format data is supported");
if (((cmf*256+flag) % 31) != 0)
throw new Exception("Data is not in proper deflate format");
}
}
}
using System;
using System.IO;
namespace ByteFX.Data.Common
{
/// <summary>
/// Summary description for Inflater.
/// </summary>
public class Inflater
{
private BitStream _input;
public Inflater()
{
}
public void SetInput(byte[] input, int offset, int len)
{
_input = new BitStream(input, offset, len);
}
public void Inflate(byte[] output, int offset, int size)
{
byte cmf = (byte)_input.GetBits(8);
byte flag = (byte)_input.GetBits(8);
if ((cmf & 0x0f) != 8)
throw new Exception("Only deflate format data is supported");
if (((cmf*256+flag) % 31) != 0)
throw new Exception("Data is not in proper deflate format");
}
}
}
+212 -194
View File
@@ -1,194 +1,212 @@
using System;
using System.Net;
using System.IO;
using System.Collections;
using System.Threading;
namespace ByteFX.Data.Common
{
internal enum MultiHostStreamErrorType
{
Connecting,
Reading,
Writing
}
/// <summary>
/// Summary description for MultiHostStream.
/// </summary>
internal abstract class MultiHostStream : Stream
{
protected Stream stream;
protected int readTimeOut;
protected Exception baseException;
/// <summary>
/// Constructs a new MultiHostStream object with the given parameters
/// </summary>
/// <param name="hostList"></param>
/// <param name="port"></param>
/// <param name="readTimeOut"></param>
/// <param name="connectTimeOut"></param>
public MultiHostStream(string hostList, int port, int readTimeOut, int connectTimeOut)
{
this.readTimeOut = readTimeOut;
ProcessHosts( hostList, port, connectTimeOut );
}
protected abstract void TimeOut(MultiHostStreamErrorType error);
protected abstract void Error(string msg);
protected abstract bool CreateStream( IPAddress ip, string host, int port );
protected abstract bool DataAvailable
{
get;
}
private void ProcessHosts( string hostList, int port, int connectTimeOut )
{
int startTime = Environment.TickCount;
int toTicks = connectTimeOut * 1000;
//
// Host name can contain multiple hosts, seperated by &.
string [] dnsHosts = hostList.Split('&');
Hashtable ips = new Hashtable();
//
// Each host name specified may contain multiple IP addresses
// Lets look at the DNS entries for each host name
foreach(string h in dnsHosts)
{
IPHostEntry hostAddress = Dns.GetHostByName(h);
foreach (IPAddress addr in hostAddress.AddressList)
ips.Add( addr, hostAddress.HostName );
}
IPAddress[] keys = new IPAddress[ ips.Count ];
ips.Keys.CopyTo( keys, 0 );
if ((Environment.TickCount - startTime) > toTicks)
{
TimeOut(MultiHostStreamErrorType.Connecting);
return;
}
// make sure they gave us at least one host
if (ips.Count == 0)
{
Error("You must specify at least one host");
return;
}
int index = 0;
// now choose a random server if there are more than one
if (ips.Count > 1)
{
System.Random random = new Random((int)DateTime.Now.Ticks);
index = random.Next(ips.Count-1);
}
//
// Lets step through our hosts until we get a connection
for (int i=0; i < ips.Count; i++)
{
if ((Environment.TickCount - startTime) > toTicks)
{
TimeOut(MultiHostStreamErrorType.Connecting);
return;
}
if (CreateStream( (IPAddress)keys[i], (string)ips[keys[i]], port ))
return;
}
}
public override int ReadByte()
{
int start = Environment.TickCount;
int ticks = readTimeOut * 1000;
while ((Environment.TickCount - start) < ticks)
{
if (DataAvailable)
{
int b = stream.ReadByte();
return b;
}
else
Thread.Sleep(1);
}
TimeOut(MultiHostStreamErrorType.Reading);
return -1;
}
public override int Read(byte[] buffer, int offset, int count)
{
int numToRead = count;
int start = Environment.TickCount;
int ticks = readTimeOut * 1000;
while (numToRead > 0 && (Environment.TickCount - start) < ticks)
{
if (DataAvailable)
{
int bytes_read = stream.Read( buffer, offset, numToRead);
if (bytes_read == 0)
return (count - numToRead);
offset += bytes_read;
numToRead -= bytes_read;
}
Thread.Sleep(1);
}
if (numToRead > 0)
TimeOut(MultiHostStreamErrorType.Reading);
return count;
}
public override bool CanRead
{
get { return stream.CanRead; }
}
public override bool CanWrite
{
get { return stream.CanWrite; }
}
public override bool CanSeek
{
get { return stream.CanSeek; }
}
public override long Length
{
get { return stream.Length; }
}
public override long Position
{
get { return stream.Position; }
set { stream.Position = value; }
}
public override void Flush()
{
stream.Flush();
}
public override void SetLength(long length)
{
stream.SetLength( length );
}
public override void Write(byte[] buffer, int offset, int count)
{
stream.Write( buffer, offset, count );
}
public override long Seek( long offset, SeekOrigin origin )
{
return stream.Seek( offset, origin );
}
}
}
using System;
using System.Net;
using System.IO;
using System.Collections;
using System.Threading;
namespace ByteFX.Data.Common
{
internal enum MultiHostStreamErrorType
{
Connecting,
Reading,
Writing
}
/// <summary>
/// Summary description for MultiHostStream.
/// </summary>
internal abstract class MultiHostStream : Stream
{
protected Stream stream;
protected int readTimeOut;
protected Exception baseException;
/// <summary>
/// Constructs a new MultiHostStream object with the given parameters
/// </summary>
/// <param name="hostList"></param>
/// <param name="port"></param>
/// <param name="readTimeOut"></param>
/// <param name="connectTimeOut"></param>
public MultiHostStream(string hostList, int port, int readTimeOut, int connectTimeOut)
{
this.readTimeOut = readTimeOut;
ProcessHosts( hostList, port, connectTimeOut );
}
// abstract members
protected abstract void TimeOut(MultiHostStreamErrorType error);
protected abstract void Error(string msg);
protected abstract bool CreateStream( IPAddress ip, string host, int port );
protected abstract bool CreateStream (string fileName);
protected abstract bool DataAvailable
{
get;
}
private void ProcessHosts( string hostList, int port, int connectTimeOut )
{
int startTime = Environment.TickCount;
int toTicks = connectTimeOut * 1000;
// support Unix sockets
if (hostList.StartsWith ("/"))
{
CreateStream (hostList);
return;
}
//
// Host name can contain multiple hosts, seperated by &.
string [] dnsHosts = hostList.Split('&');
Hashtable ips = new Hashtable();
//
// Each host name specified may contain multiple IP addresses
// Lets look at the DNS entries for each host name
foreach(string h in dnsHosts)
{
IPHostEntry hostAddress = Dns.GetHostByName(h);
foreach (IPAddress addr in hostAddress.AddressList)
ips.Add( addr, hostAddress.HostName );
}
IPAddress[] keys = new IPAddress[ ips.Count ];
ips.Keys.CopyTo( keys, 0 );
if ((Environment.TickCount - startTime) > toTicks)
{
TimeOut(MultiHostStreamErrorType.Connecting);
return;
}
// make sure they gave us at least one host
if (ips.Count == 0)
{
Error("You must specify at least one host");
return;
}
int index = 0;
// now choose a random server if there are more than one
if (ips.Count > 1)
{
System.Random random = new Random((int)DateTime.Now.Ticks);
index = random.Next(ips.Count-1);
}
//
// Lets step through our hosts until we get a connection
for (int i=0; i < ips.Count; i++)
{
if ((Environment.TickCount - startTime) > toTicks)
{
TimeOut(MultiHostStreamErrorType.Connecting);
return;
}
if (CreateStream( (IPAddress)keys[i], (string)ips[keys[i]], port ))
return;
}
}
public override int ReadByte()
{
int start = Environment.TickCount;
int ticks = readTimeOut * 1000;
while ((Environment.TickCount - start) < ticks)
{
if (DataAvailable)
{
int b = stream.ReadByte();
return b;
}
else
Thread.Sleep(0);
}
TimeOut(MultiHostStreamErrorType.Reading);
return -1;
}
public override int Read(byte[] buffer, int offset, int count)
{
int numToRead = count;
int start = Environment.TickCount;
int ticks = readTimeOut * 1000;
try
{
while (numToRead > 0 && (Environment.TickCount - start) < ticks)
{
if (DataAvailable)
{
int bytes_read = stream.Read( buffer, offset, numToRead);
if (bytes_read == 0)
return (count - numToRead);
offset += bytes_read;
numToRead -= bytes_read;
}
else
Thread.Sleep(0);
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
if (numToRead > 0)
TimeOut(MultiHostStreamErrorType.Reading);
return count;
}
public override bool CanRead
{
get { return stream.CanRead; }
}
public override bool CanWrite
{
get { return stream.CanWrite; }
}
public override bool CanSeek
{
get { return stream.CanSeek; }
}
public override long Length
{
get { return stream.Length; }
}
public override long Position
{
get { return stream.Position; }
set { stream.Position = value; }
}
public override void Flush()
{
stream.Flush();
}
public override void SetLength(long length)
{
stream.SetLength( length );
}
public override void Write(byte[] buffer, int offset, int count)
{
stream.Write( buffer, offset, count );
}
public override long Seek( long offset, SeekOrigin origin )
{
return stream.Seek( offset, origin );
}
}
}
+208 -208
View File
@@ -1,208 +1,208 @@
// ByteFX.Data data access components for .Net
// Copyright (C) 2002-2003 ByteFX, Inc.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
using System;
using System.IO;
using System.Runtime.InteropServices;
namespace ByteFX.Data.Common
{
/// <summary>
/// Summary description for API.
/// </summary>
internal class NamedPipeStream : Stream
{
[DllImport("kernel32.dll", EntryPoint="CreateFile", SetLastError=true)]
private static extern IntPtr CreateFile(String lpFileName,
UInt32 dwDesiredAccess, UInt32 dwShareMode,
IntPtr lpSecurityAttributes, UInt32 dwCreationDisposition,
UInt32 dwFlagsAndAttributes,
IntPtr hTemplateFile);
[DllImport("kernel32.dll", EntryPoint="PeekNamedPipe", SetLastError=true)]
private static extern bool PeekNamedPipe( IntPtr handle,
byte[] buffer, uint nBufferSize, ref uint bytesRead,
ref uint bytesAvail, ref uint BytesLeftThisMessage);
[DllImport("kernel32.dll", SetLastError=true)]
private static extern bool ReadFile( IntPtr handle,
byte[] buffer, uint toRead, ref uint read, IntPtr lpOverLapped);
[DllImport("kernel32.dll", SetLastError=true)]
private static extern bool WriteFile( IntPtr handle,
byte[] buffer, uint count, ref uint written, IntPtr lpOverlapped );
[DllImport("kernel32.dll", SetLastError=true)]
private static extern bool CloseHandle( IntPtr handle );
[DllImport("kernel32.dll", SetLastError=true)]
private static extern bool FlushFileBuffers( IntPtr handle );
//Constants for dwDesiredAccess:
private const UInt32 GENERIC_READ = 0x80000000;
private const UInt32 GENERIC_WRITE = 0x40000000;
//Constants for return value:
private const Int32 INVALID_HANDLE_VALUE = -1;
//Constants for dwFlagsAndAttributes:
private const UInt32 FILE_FLAG_OVERLAPPED = 0x40000000;
private const UInt32 FILE_FLAG_NO_BUFFERING = 0x20000000;
//Constants for dwCreationDisposition:
private const UInt32 OPEN_EXISTING = 3;
IntPtr _handle;
FileAccess _mode;
public NamedPipeStream(string host, FileAccess mode)
{
_handle = IntPtr.Zero;
Open(host, mode);
}
public void Open( string host, FileAccess mode )
{
_mode = mode;
uint pipemode = 0;
if ((mode & FileAccess.Read) > 0)
pipemode |= GENERIC_READ;
if ((mode & FileAccess.Write) > 0)
pipemode |= GENERIC_WRITE;
_handle = CreateFile( host, pipemode,
0, IntPtr.Zero, OPEN_EXISTING, 0, IntPtr.Zero );
}
public bool DataAvailable
{
get
{
uint bytesRead=0, avail=0, thismsg=0;
bool result = PeekNamedPipe( _handle,
null, 0, ref bytesRead, ref avail, ref thismsg );
return (result == true && avail > 0);
}
}
public override bool CanRead
{
get { return (_mode & FileAccess.Read) > 0; }
}
public override bool CanWrite
{
get { return (_mode & FileAccess.Write) > 0; }
}
public override bool CanSeek
{
get { throw new NotSupportedException("NamedPipeStream does not support seeking"); }
}
public override long Length
{
get { throw new NotSupportedException("NamedPipeStream does not support seeking"); }
}
public override long Position
{
get { throw new NotSupportedException("NamedPipeStream does not support seeking"); }
set { }
}
public override void Flush()
{
if (_handle == IntPtr.Zero)
throw new ObjectDisposedException("NamedPipeStream", "The stream has already been closed");
FlushFileBuffers(_handle);
}
public override int Read(byte[] buffer, int offset, int count)
{
if (buffer == null)
throw new ArgumentNullException("buffer", "The buffer to read into cannot be null");
if (buffer.Length < (offset + count))
throw new ArgumentException("Buffer is not large enough to hold requested data", "buffer");
if (offset < 0)
throw new ArgumentOutOfRangeException("offset", offset, "Offset cannot be negative");
if (count < 0)
throw new ArgumentOutOfRangeException("count", count, "Count cannot be negative");
if (! CanRead)
throw new NotSupportedException("The stream does not support reading");
if (_handle == IntPtr.Zero)
throw new ObjectDisposedException("NamedPipeStream", "The stream has already been closed");
// first read the data into an internal buffer since ReadFile cannot read into a buf at
// a specified offset
uint read=0;
byte[] buf = new Byte[count];
ReadFile( _handle, buf, (uint)count, ref read, IntPtr.Zero );
for (int x=0; x < read; x++)
{
buffer[offset+x] = buf[x];
}
return (int)read;
}
public override void Close()
{
CloseHandle(_handle);
_handle = IntPtr.Zero;
}
public override void SetLength(long length)
{
throw new NotSupportedException("NamedPipeStream doesn't support SetLength");
}
public override void Write(byte[] buffer, int offset, int count)
{
if (buffer == null)
throw new ArgumentNullException("buffer", "The buffer to write into cannot be null");
if (buffer.Length < (offset + count))
throw new ArgumentException("Buffer does not contain amount of requested data", "buffer");
if (offset < 0)
throw new ArgumentOutOfRangeException("offset", offset, "Offset cannot be negative");
if (count < 0)
throw new ArgumentOutOfRangeException("count", count, "Count cannot be negative");
if (! CanWrite)
throw new NotSupportedException("The stream does not support writing");
if (_handle == IntPtr.Zero)
throw new ObjectDisposedException("NamedPipeStream", "The stream has already been closed");
// copy data to internal buffer to allow writing from a specified offset
byte[] buf = new Byte[count];
for (int x=0; x < count; x++)
{
buf[x] = buffer[offset+x];
}
uint written=0;
bool result = WriteFile( _handle, buf, (uint)count, ref written, IntPtr.Zero );
if (! result)
throw new IOException("Writing to the stream failed");
if (written < count)
throw new IOException("Unable to write entire buffer to stream");
}
public override long Seek( long offset, SeekOrigin origin )
{
throw new NotSupportedException("NamedPipeStream doesn't support seeking");
}
}
}
// ByteFX.Data data access components for .Net
// Copyright (C) 2002-2003 ByteFX, Inc.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
using System;
using System.IO;
using System.Runtime.InteropServices;
namespace ByteFX.Data.Common
{
/// <summary>
/// Summary description for API.
/// </summary>
internal class NamedPipeStream : Stream
{
[DllImport("kernel32.dll", EntryPoint="CreateFile", SetLastError=true)]
private static extern IntPtr CreateFile(String lpFileName,
UInt32 dwDesiredAccess, UInt32 dwShareMode,
IntPtr lpSecurityAttributes, UInt32 dwCreationDisposition,
UInt32 dwFlagsAndAttributes,
IntPtr hTemplateFile);
[DllImport("kernel32.dll", EntryPoint="PeekNamedPipe", SetLastError=true)]
private static extern bool PeekNamedPipe( IntPtr handle,
byte[] buffer, uint nBufferSize, ref uint bytesRead,
ref uint bytesAvail, ref uint BytesLeftThisMessage);
[DllImport("kernel32.dll", SetLastError=true)]
private static extern bool ReadFile( IntPtr handle,
byte[] buffer, uint toRead, ref uint read, IntPtr lpOverLapped);
[DllImport("kernel32.dll", SetLastError=true)]
private static extern bool WriteFile( IntPtr handle,
byte[] buffer, uint count, ref uint written, IntPtr lpOverlapped );
[DllImport("kernel32.dll", SetLastError=true)]
private static extern bool CloseHandle( IntPtr handle );
[DllImport("kernel32.dll", SetLastError=true)]
private static extern bool FlushFileBuffers( IntPtr handle );
//Constants for dwDesiredAccess:
private const UInt32 GENERIC_READ = 0x80000000;
private const UInt32 GENERIC_WRITE = 0x40000000;
//Constants for return value:
private const Int32 INVALID_HANDLE_VALUE = -1;
//Constants for dwFlagsAndAttributes:
private const UInt32 FILE_FLAG_OVERLAPPED = 0x40000000;
private const UInt32 FILE_FLAG_NO_BUFFERING = 0x20000000;
//Constants for dwCreationDisposition:
private const UInt32 OPEN_EXISTING = 3;
IntPtr _handle;
FileAccess _mode;
public NamedPipeStream(string host, FileAccess mode)
{
_handle = IntPtr.Zero;
Open(host, mode);
}
public void Open( string host, FileAccess mode )
{
_mode = mode;
uint pipemode = 0;
if ((mode & FileAccess.Read) > 0)
pipemode |= GENERIC_READ;
if ((mode & FileAccess.Write) > 0)
pipemode |= GENERIC_WRITE;
_handle = CreateFile( host, pipemode,
0, IntPtr.Zero, OPEN_EXISTING, 0, IntPtr.Zero );
}
public bool DataAvailable
{
get
{
uint bytesRead=0, avail=0, thismsg=0;
bool result = PeekNamedPipe( _handle,
null, 0, ref bytesRead, ref avail, ref thismsg );
return (result == true && avail > 0);
}
}
public override bool CanRead
{
get { return (_mode & FileAccess.Read) > 0; }
}
public override bool CanWrite
{
get { return (_mode & FileAccess.Write) > 0; }
}
public override bool CanSeek
{
get { throw new NotSupportedException("NamedPipeStream does not support seeking"); }
}
public override long Length
{
get { throw new NotSupportedException("NamedPipeStream does not support seeking"); }
}
public override long Position
{
get { throw new NotSupportedException("NamedPipeStream does not support seeking"); }
set { }
}
public override void Flush()
{
if (_handle == IntPtr.Zero)
throw new ObjectDisposedException("NamedPipeStream", "The stream has already been closed");
FlushFileBuffers(_handle);
}
public override int Read(byte[] buffer, int offset, int count)
{
if (buffer == null)
throw new ArgumentNullException("buffer", "The buffer to read into cannot be null");
if (buffer.Length < (offset + count))
throw new ArgumentException("Buffer is not large enough to hold requested data", "buffer");
if (offset < 0)
throw new ArgumentOutOfRangeException("offset", offset, "Offset cannot be negative");
if (count < 0)
throw new ArgumentOutOfRangeException("count", count, "Count cannot be negative");
if (! CanRead)
throw new NotSupportedException("The stream does not support reading");
if (_handle == IntPtr.Zero)
throw new ObjectDisposedException("NamedPipeStream", "The stream has already been closed");
// first read the data into an internal buffer since ReadFile cannot read into a buf at
// a specified offset
uint read=0;
byte[] buf = new Byte[count];
ReadFile( _handle, buf, (uint)count, ref read, IntPtr.Zero );
for (int x=0; x < read; x++)
{
buffer[offset+x] = buf[x];
}
return (int)read;
}
public override void Close()
{
CloseHandle(_handle);
_handle = IntPtr.Zero;
}
public override void SetLength(long length)
{
throw new NotSupportedException("NamedPipeStream doesn't support SetLength");
}
public override void Write(byte[] buffer, int offset, int count)
{
if (buffer == null)
throw new ArgumentNullException("buffer", "The buffer to write into cannot be null");
if (buffer.Length < (offset + count))
throw new ArgumentException("Buffer does not contain amount of requested data", "buffer");
if (offset < 0)
throw new ArgumentOutOfRangeException("offset", offset, "Offset cannot be negative");
if (count < 0)
throw new ArgumentOutOfRangeException("count", count, "Count cannot be negative");
if (! CanWrite)
throw new NotSupportedException("The stream does not support writing");
if (_handle == IntPtr.Zero)
throw new ObjectDisposedException("NamedPipeStream", "The stream has already been closed");
// copy data to internal buffer to allow writing from a specified offset
byte[] buf = new Byte[count];
for (int x=0; x < count; x++)
{
buf[x] = buffer[offset+x];
}
uint written=0;
bool result = WriteFile( _handle, buf, (uint)count, ref written, IntPtr.Zero );
if (! result)
throw new IOException("Writing to the stream failed");
if (written < count)
throw new IOException("Unable to write entire buffer to stream");
}
public override long Seek( long offset, SeekOrigin origin )
{
throw new NotSupportedException("NamedPipeStream doesn't support seeking");
}
}
}
+41
View File
@@ -0,0 +1,41 @@
using System;
// ByteFX.Data data access components for .Net
// Copyright (C) 2002-2004 ByteFX, Inc.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
namespace ByteFX.Data.Common
{
/// <summary>
/// Summary description for Platform.
/// </summary>
internal class Platform
{
public static bool IsWindows()
{
OperatingSystem os = Environment.OSVersion;
switch (os.Platform)
{
case PlatformID.Win32NT:
case PlatformID.Win32S:
case PlatformID.Win32Windows:
case PlatformID.WinCE:
return true;
}
return false;
}
}
}
+25 -25
View File
@@ -1,25 +1,25 @@
using System;
namespace ByteFX.Data.Common
{
/// <summary>
/// Summary description for Security.
/// </summary>
internal class Security
{
public Security()
{
}
public static void ArrayCrypt( byte[] src, int srcoff, byte[] dst, int dstoff, byte[] key, int length )
{
int idx = 0;
while ( (idx+srcoff) < src.Length && idx < length )
{
dst[idx+dstoff] = (byte)(src[idx+srcoff] ^ key[idx]);
idx++;
}
}
}
}
using System;
namespace ByteFX.Data.Common
{
/// <summary>
/// Summary description for Security.
/// </summary>
internal class Security
{
public Security()
{
}
public static void ArrayCrypt( byte[] src, int srcoff, byte[] dst, int dstoff, byte[] key, int length )
{
int idx = 0;
while ( (idx+srcoff) < src.Length && idx < length )
{
dst[idx+dstoff] = (byte)(src[idx+srcoff] ^ key[idx]);
idx++;
}
}
}
}
@@ -0,0 +1,148 @@
// ByteFX.Data data access components for .Net
// Copyright (C) 2002-2004 ByteFX, Inc.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
using System;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Collections;
#if __MonoCS__
using Mono.Posix;
#endif
namespace ByteFX.Data.Common
{
/// <summary>
/// Summary description for StreamCreator.
/// </summary>
internal class StreamCreator
{
string hostList;
int port;
string pipeName;
int timeOut;
public StreamCreator( string hosts, int port, string pipeName)
{
hostList = hosts;
this.port = port;
this.pipeName = pipeName;
}
public Stream GetStream(int timeOut)
{
this.timeOut = timeOut;
if (hostList.StartsWith("/"))
return CreateUnixSocketStream();
string [] dnsHosts = hostList.Split('&');
ArrayList ipAddresses = new ArrayList();
ArrayList hostNames = new ArrayList();
//
// Each host name specified may contain multiple IP addresses
// Lets look at the DNS entries for each host name
foreach (string h in dnsHosts)
{
IPHostEntry hostAddress = Dns.GetHostByName(h);
foreach (IPAddress addr in hostAddress.AddressList)
{
ipAddresses.Add( addr );
hostNames.Add( hostAddress.HostName );
}
}
System.Random random = new Random((int)DateTime.Now.Ticks);
int index = random.Next(ipAddresses.Count-1);
bool usePipe = pipeName != String.Empty;
Stream stream = null;
for (int i=0; i < ipAddresses.Count; i++)
{
if (usePipe)
stream = CreateNamedPipeStream( (string)hostNames[index] );
else
stream = CreateSocketStream( (IPAddress)ipAddresses[index], port );
if (stream != null) return stream;
index++;
if (index == ipAddresses.Count) index = 0;
}
return stream;
}
private Stream CreateUnixSocketStream()
{
#if __MonoCS__ && !WINDOWS
Socket socket = new Socket (AddressFamily.Unix, SocketType.Stream, ProtocolType.IP);
try
{
UnixEndPoint endPoint = new UnixEndPoint (hostList);
socket.Connect (endPoint);
return new NetworkStream (socket, true);
}
catch (Exception ex)
{
return null;
}
#else
throw new PlatformNotSupportedException ("Unix sockets are only supported on this platform");
#endif
}
private Stream CreateNamedPipeStream( string hostname )
{
string pipePath;
if (hostname.ToLower().Equals("localhost"))
pipePath = @"\\.\pipe\" + pipeName;
else
pipePath = String.Format(@"\\{0}\pipe\{1}", hostname.ToString(), pipeName);
return new NamedPipeStream(pipePath, FileAccess.ReadWrite);
}
private void ConnectSocketCallback( IAsyncResult iar )
{
}
private Stream CreateSocketStream( IPAddress ip, int port )
{
Socket socket = new Socket(AddressFamily.InterNetwork,
SocketType.Stream, ProtocolType.Tcp);
try
{
//
// Lets try to connect
IPEndPoint endPoint = new IPEndPoint( ip, port);
// IAsyncResult iar = socket.BeginConnect( endPoint,
// new AsyncCallback(ConnectSocketCallback), socket );
socket.Connect(endPoint);
socket.SetSocketOption( SocketOptionLevel.Tcp, SocketOptionName.NoDelay, 1 );
return new NetworkStream( socket, true );
}
catch (Exception)
{
return null;
}
}
}
}
+67 -67
View File
@@ -1,67 +1,67 @@
// ByteFX.Data data access components for .Net
// Copyright (C) 2002-2003 ByteFX, Inc.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
using System;
using System.Text;
using System.Collections;
using System.Collections.Specialized;
namespace ByteFX.Data.Common
{
/// <summary>
/// Summary description for StringUtility.
/// </summary>
public class StringUtility
{
public StringUtility()
{
}
public static string[] Split( string src, char delimiter, params char[] quotedelims )
{
ArrayList strings = new ArrayList();
StringBuilder sb = new StringBuilder();
ArrayList ar = new ArrayList(quotedelims);
char quote_open = Char.MinValue;
foreach (char c in src)
{
if (c == delimiter && quote_open == Char.MinValue)
{
strings.Add( sb.ToString() );
sb.Remove( 0, sb.Length );
}
else if (ar.Contains(c))
{
if (quote_open == Char.MinValue)
quote_open = c;
else if (quote_open == c)
quote_open = Char.MinValue;
sb.Append(c);
}
else
sb.Append( c );
}
if (sb.Length > 0)
strings.Add( sb.ToString());
return (string[])strings.ToArray(typeof(string));
}
}
}
// ByteFX.Data data access components for .Net
// Copyright (C) 2002-2003 ByteFX, Inc.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
using System;
using System.Text;
using System.Collections;
using System.Collections.Specialized;
namespace ByteFX.Data.Common
{
/// <summary>
/// Summary description for StringUtility.
/// </summary>
public class StringUtility
{
public StringUtility()
{
}
public static string[] Split( string src, char delimiter, params char[] quotedelims )
{
ArrayList strings = new ArrayList();
StringBuilder sb = new StringBuilder();
ArrayList ar = new ArrayList(quotedelims);
char quote_open = Char.MinValue;
foreach (char c in src)
{
if (c == delimiter && quote_open == Char.MinValue)
{
strings.Add( sb.ToString() );
sb.Remove( 0, sb.Length );
}
else if (ar.Contains(c))
{
if (quote_open == Char.MinValue)
quote_open = c;
else if (quote_open == c)
quote_open = Char.MinValue;
sb.Append(c);
}
else
sb.Append( c );
}
if (sb.Length > 0)
strings.Add( sb.ToString());
return (string[])strings.ToArray(typeof(string));
}
}
}
+68 -51
View File
@@ -1,51 +1,68 @@
using System;
namespace ByteFX.Data.Common
{
/// <summary>
/// Summary description for Version.
/// </summary>
internal struct Version
{
private int major;
private int minor;
private int build;
public Version( int major, int minor, int build)
{
this.major = major;
this.minor = minor;
this.build = build;
}
public static Version Parse( string versionString )
{
int start = 0;
int index = versionString.IndexOf('.', start);
if (index == -1) throw new Exception("Version string not in acceptable format");
int major = Convert.ToInt32( versionString.Substring(start, index-start).Trim());
start = index+1;
index = versionString.IndexOf('.', start);
if (index == -1) throw new Exception("Version string not in acceptable format");
int minor = Convert.ToInt32( versionString.Substring(start, index-start).Trim());
start = index+1;
int i = start;
while (i < versionString.Length && Char.IsDigit( versionString, i ))
i++;
int build = Convert.ToInt32( versionString.Substring(start, i-start).Trim());
return new Version( major, minor, build );
}
public bool isAtLeast(int major, int minor, int build)
{
if (major > this.major) return false;
if (minor > this.minor) return false;
if (build > this.build) return false;
return true;
}
}
}
// ByteFX.Data data access components for .Net
// Copyright (C) 2002-2004 ByteFX, Inc.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
using System;
namespace ByteFX.Data.Common
{
/// <summary>
/// Summary description for Version.
/// </summary>
internal struct DBVersion
{
private int major;
private int minor;
private int build;
public DBVersion( int major, int minor, int build)
{
this.major = major;
this.minor = minor;
this.build = build;
}
public static DBVersion Parse( string versionString )
{
int start = 0;
int index = versionString.IndexOf('.', start);
if (index == -1) throw new Exception("Version string not in acceptable format");
int major = Convert.ToInt32( versionString.Substring(start, index-start).Trim());
start = index+1;
index = versionString.IndexOf('.', start);
if (index == -1) throw new Exception("Version string not in acceptable format");
int minor = Convert.ToInt32( versionString.Substring(start, index-start).Trim());
start = index+1;
int i = start;
while (i < versionString.Length && Char.IsDigit( versionString, i ))
i++;
int build = Convert.ToInt32( versionString.Substring(start, i-start).Trim());
return new DBVersion( major, minor, build );
}
public bool isAtLeast(int major, int minor, int build)
{
if (this.major > major) return true;
if (this.major == major && this.minor > minor) return true;
if (this.major == major && this.minor == minor && this.build >= build) return true;
return false;
}
}
}
+1
View File
@@ -6,6 +6,7 @@ LIBRARY = ByteFX.Data.dll
LIB_MCS_FLAGS = /r:$(corlib) /r:System.dll /r:System.Xml.dll \
/r:System.Data.dll /r:ICSharpCode.SharpZipLib.dll \
/r:System.Design.dll /r:System.Drawing.dll /r:System.Windows.Forms.dll \
/r:Mono.Posix.dll \
/res:mysqlclient/Designers/command.bmp \
/res:mysqlclient/Designers/connection.bmp \
/res:mysqlclient/Designers/dataadapter.bmp
+339
View File
@@ -0,0 +1,339 @@
<VisualStudioProject>
<CSHARP
ProjectType = "Local"
ProductVersion = "7.10.3077"
SchemaVersion = "2.0"
ProjectGuid = "{5EAEFBC4-8389-4120-BAB3-9B27174F6F6F}"
>
<Build>
<Settings
ApplicationIcon = ""
AssemblyKeyContainerName = ""
AssemblyName = "ByteFX.MySqlClient"
AssemblyOriginatorKeyFile = ""
DefaultClientScript = "JScript"
DefaultHTMLPageLayout = "Grid"
DefaultTargetSchema = "IE50"
DelaySign = "false"
OutputType = "Library"
PreBuildEvent = ""
PostBuildEvent = ""
RootNamespace = "ByteFX.Data.MySqlClient"
RunPostBuildEvent = "OnBuildSuccess"
StartupObject = ""
>
<Config
Name = "Debug"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "DEBUG;TRACE;WINDOWS"
DocumentationFile = "doc.xml"
DebugSymbols = "true"
FileAlignment = "4096"
IncrementalBuild = "true"
NoStdLib = "false"
NoWarn = "1591"
Optimize = "false"
OutputPath = "bin\Debug\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
<Config
Name = "Release"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "TRACE;WINDOWS"
DocumentationFile = "doc.xml"
DebugSymbols = "false"
FileAlignment = "4096"
IncrementalBuild = "false"
NoStdLib = "false"
NoWarn = "1591"
Optimize = "true"
OutputPath = "bin\Release\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
</Settings>
<References>
<Reference
Name = "System"
AssemblyName = "System"
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.dll"
/>
<Reference
Name = "System.Data"
AssemblyName = "System.Data"
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.Data.dll"
/>
<Reference
Name = "System.XML"
AssemblyName = "System.Xml"
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.XML.dll"
/>
<Reference
Name = "System.Design"
AssemblyName = "System.Design"
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Design.dll"
/>
<Reference
Name = "System.Drawing"
AssemblyName = "System.Drawing"
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Drawing.dll"
/>
<Reference
Name = "System.Windows.Forms"
AssemblyName = "System.Windows.Forms"
HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Windows.Forms.dll"
/>
<Reference
Name = "ICSharpCode.SharpZipLib"
AssemblyName = "ICSharpCode.SharpZipLib"
HintPath = "ICSharpCode.SharpZipLib.dll"
/>
</References>
</Build>
<Files>
<Include>
<File
RelPath = "AssemblyInfo.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "ChangeLog.txt"
BuildAction = "Content"
/>
<File
RelPath = "internals.html"
BuildAction = "Content"
/>
<File
RelPath = "Common\DBConnectionString.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "Common\DBParametersEditor.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "Common\Field.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "Common\NamedPipeStream.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "Common\Platform.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "Common\Security.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "Common\StreamCreator.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "Common\Version.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "MySqlClient\CharSetMap.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "MySqlClient\command.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "MySqlClient\command.resx"
DependentUpon = "command.cs"
BuildAction = "EmbeddedResource"
/>
<File
RelPath = "MySqlClient\CommandBuilder.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "MySqlClient\CommandResult.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "MySqlClient\CompressedStream.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "MySqlClient\Connection.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "MySqlClient\Connection.resx"
DependentUpon = "Connection.cs"
BuildAction = "EmbeddedResource"
/>
<File
RelPath = "MySqlClient\ConnectionInternal.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "MySqlClient\ConnectionString.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "MySqlClient\dataadapter.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "MySqlClient\datareader.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "MySqlClient\Driver.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "MySqlClient\Exception.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "MySqlClient\Field.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "MySqlClient\MysqlDefs.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "MySqlClient\MySqlError.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "MySqlClient\MySqlHelper.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "MySqlClient\MySqlPool.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "MySqlClient\MySqlPoolManager.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "MySqlClient\Packet.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "MySqlClient\parameter.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "MySqlClient\parameter_collection.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "MySqlClient\todo.txt"
BuildAction = "Content"
/>
<File
RelPath = "MySqlClient\transaction.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "MySqlClient\docs\MySqlCommand.xml"
BuildAction = "Content"
/>
<File
RelPath = "MySqlClient\docs\MySqlCommandBuilder.xml"
BuildAction = "Content"
/>
<File
RelPath = "MySqlClient\docs\MySqlConnection.xml"
BuildAction = "Content"
/>
<File
RelPath = "MySqlClient\docs\MySqlDataAdapter.xml"
BuildAction = "Content"
/>
<File
RelPath = "MySqlClient\docs\MySqlDataReader.xml"
BuildAction = "Content"
/>
<File
RelPath = "MySqlClient\docs\MySqlException.xml"
BuildAction = "Content"
/>
<File
RelPath = "MySqlClient\docs\MySqlHelper.xml"
BuildAction = "Content"
/>
<File
RelPath = "MySqlClient\docs\MySqlParameter.xml"
BuildAction = "Content"
/>
<File
RelPath = "MySqlClient\docs\MySqlParameterCollection.xml"
BuildAction = "Content"
/>
<File
RelPath = "MySqlClient\docs\MySqlTransaction.xml"
BuildAction = "Content"
/>
<File
RelPath = "MySqlClient\resources\command.bmp"
BuildAction = "EmbeddedResource"
/>
<File
RelPath = "MySqlClient\resources\connection.bmp"
BuildAction = "EmbeddedResource"
/>
<File
RelPath = "MySqlClient\resources\dataadapter.bmp"
BuildAction = "EmbeddedResource"
/>
</Include>
</Files>
</CSHARP>
</VisualStudioProject>
File diff suppressed because it is too large. Load diff
+88 -88
View File
@@ -1,88 +1,88 @@
using System;
using System.Text;
using System.Collections;
namespace ByteFX.Data.MySqlClient
{
/// <summary>
/// Summary description for CharSetMap.
/// </summary>
internal class CharSetMap
{
private static Hashtable mapping;
/// <summary>
///
/// </summary>
/// <param name="MySqlCharSetName"></param>
/// <returns></returns>
public static Encoding GetEncoding( string MySqlCharSetName )
{
if (mapping == null )
InitializeMapping();
try
{
int cpid = (int)mapping[ MySqlCharSetName ];
return Encoding.GetEncoding( cpid );
}
catch (System.NotSupportedException)
{
return Encoding.GetEncoding(0);
}
}
/// <summary>
///
/// </summary>
private static void InitializeMapping()
{
mapping = new Hashtable();
// relatively sure about
mapping.Add( "default", 0 );
mapping.Add( "big5", 950 ); // Traditional Chinese
mapping.Add( "latin1", 28591 ); // Latin alphabet #1
mapping.Add( "utf8", 65001 );
mapping.Add( "ucs2", 1200 );
mapping.Add( "latin2", 28592 );
mapping.Add( "latin4", 28594 );
mapping.Add( "latin3", 28593 );
mapping.Add( "latin5", 1254 );
mapping.Add( "cp1251", 1251 ); // Russian
mapping.Add( "win1251", 1251 );
mapping.Add( "hebrew", 1255 ); // Hebrew
mapping.Add( "greek", 1253 ); // Greek
mapping.Add( "sjis", 932 ); // Shift-JIS
mapping.Add( "gbk", 936 ); // Simplified Chinese
mapping.Add( "cp866", 866 );
mapping.Add( "euc_kr", 949 );
// maybe, maybe not...
mapping.Add( "win1250", 1250 ); // Central Eurpoe
mapping.Add( "win1251ukr", 1251 );
mapping.Add( "latin1_de", 1252 ); // Latin1 German
mapping.Add( "german1", 1252 ); // German
mapping.Add( "danish", 1252 ); // Danish
mapping.Add( "dos", 437 ); // Dos
mapping.Add( "pclatin2", 852 );
mapping.Add( "win1250ch", 1250 );
mapping.Add( "cp1257", 1257 );
mapping.Add( "usa7", 646 );
mapping.Add( "czech", 912 );
mapping.Add( "hungarian", 912 );
mapping.Add( "croat", 912 );
/* ("gb2312", "EUC_CN");
("ujis", "EUC_JP");
("latvian", "ISO8859_13");
("latvian1", "ISO8859_13");
("estonia", "ISO8859_13");
("koi8_ru", "KOI8_R");
("tis620", "TIS620");
("macroman", "MacRoman");
("macce", "MacCentralEurope");
*/
}
}
}
using System;
using System.Text;
using System.Collections;
namespace ByteFX.Data.MySqlClient
{
/// <summary>
/// Summary description for CharSetMap.
/// </summary>
internal class CharSetMap
{
private static Hashtable mapping;
/// <summary>
///
/// </summary>
/// <param name="MySqlCharSetName"></param>
/// <returns></returns>
public static Encoding GetEncoding( string MySqlCharSetName )
{
if (mapping == null )
InitializeMapping();
try
{
int cpid = (int)mapping[ MySqlCharSetName ];
return Encoding.GetEncoding( cpid );
}
catch (System.NotSupportedException)
{
return Encoding.GetEncoding(0);
}
}
/// <summary>
///
/// </summary>
private static void InitializeMapping()
{
mapping = new Hashtable();
// relatively sure about
mapping.Add( "default", 0 );
mapping.Add( "big5", 950 ); // Traditional Chinese
mapping.Add( "latin1", 28591 ); // Latin alphabet #1
mapping.Add( "utf8", 65001 );
mapping.Add( "ucs2", 1200 );
mapping.Add( "latin2", 28592 );
mapping.Add( "latin4", 28594 );
mapping.Add( "latin3", 28593 );
mapping.Add( "latin5", 1254 );
mapping.Add( "cp1251", 1251 ); // Russian
mapping.Add( "win1251", 1251 );
mapping.Add( "hebrew", 1255 ); // Hebrew
mapping.Add( "greek", 1253 ); // Greek
mapping.Add( "sjis", 932 ); // Shift-JIS
mapping.Add( "gbk", 936 ); // Simplified Chinese
mapping.Add( "cp866", 866 );
mapping.Add( "euc_kr", 949 );
// maybe, maybe not...
mapping.Add( "win1250", 1250 ); // Central Eurpoe
mapping.Add( "win1251ukr", 1251 );
mapping.Add( "latin1_de", 1252 ); // Latin1 German
mapping.Add( "german1", 1252 ); // German
mapping.Add( "danish", 1252 ); // Danish
mapping.Add( "dos", 437 ); // Dos
mapping.Add( "pclatin2", 852 );
mapping.Add( "win1250ch", 1250 );
mapping.Add( "cp1257", 1257 );
mapping.Add( "usa7", 646 );
mapping.Add( "czech", 912 );
mapping.Add( "hungarian", 912 );
mapping.Add( "croat", 912 );
/* ("gb2312", "EUC_CN");
("ujis", "EUC_JP");
("latvian", "ISO8859_13");
("latvian1", "ISO8859_13");
("estonia", "ISO8859_13");
("koi8_ru", "KOI8_R");
("tis620", "TIS620");
("macroman", "MacRoman");
("macce", "MacCentralEurope");
*/
}
}
}
@@ -1,420 +1,420 @@
// ByteFX.Data data access components for .Net
// Copyright (C) 2002-2003 ByteFX, Inc.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
using System;
using System.ComponentModel;
using System.Data;
using System.Text;
namespace ByteFX.Data.MySqlClient
{
/// <summary>
/// Automatically generates single-table commands used to reconcile changes made to a DataSet with the associated MySQL database. This class cannot be inherited.
/// </summary>
/// <include file='docs/MySqlCommandBuilder.xml' path='MyDocs/MyMembers[@name="Class"]/*'/>
[ToolboxItem(false)]
[System.ComponentModel.DesignerCategory("Code")]
public sealed class MySqlCommandBuilder : Component
{
private MySqlDataAdapter _adapter;
private string _QuotePrefix;
private string _QuoteSuffix;
private DataTable _schema;
private string _tableName;
private MySqlCommand _updateCmd;
private MySqlCommand _insertCmd;
private MySqlCommand _deleteCmd;
#region Constructors
/// <summary>
/// Overloaded. Initializes a new instance of the SqlCommandBuilder class.
/// </summary>
public MySqlCommandBuilder()
{
}
/// <summary>
/// Overloaded. Initializes a new instance of the SqlCommandBuilder class.
/// </summary>
public MySqlCommandBuilder( MySqlDataAdapter adapter )
{
_adapter = adapter;
_adapter.RowUpdating += new MySqlRowUpdatingEventHandler( OnRowUpdating );
}
#endregion
#region Properties
/// <summary>
/// Gets or sets a MySqlDataAdapter object for which SQL statements are automatically generated.
/// </summary>
public MySqlDataAdapter DataAdapter
{
get { return _adapter; }
set
{
if (_adapter != null)
{
_adapter.RowUpdating -= new MySqlRowUpdatingEventHandler( OnRowUpdating );
}
_adapter = value;
}
}
/// <summary>
/// Gets or sets the beginning character or characters to use when specifying MySql database objects (for example, tables or columns) whose names contain characters such as spaces or reserved tokens.
/// </summary>
public string QuotePrefix
{
get { return _QuotePrefix; }
set { _QuotePrefix = value; }
}
/// <summary>
/// Gets or sets the ending character or characters to use when specifying MySql database objects (for example, tables or columns) whose names contain characters such as spaces or reserved tokens.
/// </summary>
public string QuoteSuffix
{
get { return _QuoteSuffix; }
set { _QuoteSuffix = value; }
}
#endregion
#region Public Methods
/// <summary>
/// Retrieves parameter information from the stored procedure specified in the MySqlCommand and populates the Parameters collection of the specified MySqlCommand object.
/// This method is not currently supported since stored procedures are not available in MySql.
/// </summary>
/// <param name="command">The MySqlCommand referencing the stored procedure from which the parameter information is to be derived. The derived parameters are added to the Parameters collection of the MySqlCommand.</param>
/// <exception cref="InvalidOperationException">The command text is not a valid stored procedure name.</exception>
public static void DeriveParameters(MySqlCommand command)
{
throw new MySqlException("DeriveParameters is not supported (due to MySql not supporting SP)");
}
/// <summary>
/// Gets the automatically generated MySqlCommand object required to perform deletions on the database.
/// </summary>
/// <returns></returns>
public MySqlCommand GetDeleteCommand()
{
if (_schema == null)
GenerateSchema();
return CreateDeleteCommand();
}
/// <summary>
/// Gets the automatically generated MySqlCommand object required to perform insertions on the database.
/// </summary>
/// <returns></returns>
public MySqlCommand GetInsertCommand()
{
if (_schema == null)
GenerateSchema();
return CreateInsertCommand();
}
/// <summary>
/// Gets the automatically generated MySqlCommand object required to perform updates on the database.
/// </summary>
/// <returns></returns>
public MySqlCommand GetUpdateCommand()
{
if (_schema == null)
GenerateSchema();
return CreateUpdateCommand();
}
/// <summary>
/// Refreshes the database schema information used to generate INSERT, UPDATE, or DELETE statements.
/// </summary>
public void RefreshSchema()
{
_schema = null;
_insertCmd = null;
_deleteCmd = null;
_updateCmd = null;
}
#endregion
#region Private Methods
private void GenerateSchema()
{
if (_adapter == null)
throw new MySqlException("Improper MySqlCommandBuilder state: adapter is null");
if (_adapter.SelectCommand == null)
throw new MySqlException("Improper MySqlCommandBuilder state: adapter's SelectCommand is null");
MySqlDataReader dr = _adapter.SelectCommand.ExecuteReader(CommandBehavior.SchemaOnly | CommandBehavior.KeyInfo);
_schema = dr.GetSchemaTable();
dr.Close();
// make sure we got at least one unique or key field and count base table names
bool hasKeyOrUnique=false;
foreach (DataRow row in _schema.Rows)
{
if (true == (bool)row["IsKey"] || true == (bool)row["IsUnique"])
hasKeyOrUnique=true;
if (_tableName == null)
_tableName = (string)row["BaseTableName"];
else if (_tableName != (string)row["BaseTableName"])
throw new InvalidOperationException("MySqlCommandBuilder does not support multi-table statements");
}
if (! hasKeyOrUnique)
throw new InvalidOperationException("MySqlCommandBuilder cannot operate on tables with no unique or key columns");
}
private string Quote(string table_or_column)
{
if (_QuotePrefix == null || _QuoteSuffix == null)
return table_or_column;
return _QuotePrefix + table_or_column + _QuoteSuffix;
}
private MySqlParameter CreateParameter(DataRow row, bool Original)
{
MySqlParameter p;
if (Original)
p = new MySqlParameter( "@Original_" + (string)row["ColumnName"], (MySqlDbType)row["ProviderType"],
ParameterDirection.Input, (string)row["ColumnName"], DataRowVersion.Original, DBNull.Value );
else
p = new MySqlParameter( "@" + (string)row["ColumnName"], (MySqlDbType)row["ProviderType"],
ParameterDirection.Input, (string)row["ColumnName"], DataRowVersion.Current, DBNull.Value );
return p;
}
private MySqlCommand CreateBaseCommand()
{
MySqlCommand cmd = new MySqlCommand();
cmd.Connection = _adapter.SelectCommand.Connection;
cmd.CommandTimeout = _adapter.SelectCommand.CommandTimeout;
cmd.Transaction = _adapter.SelectCommand.Transaction;
return cmd;
}
private MySqlCommand CreateDeleteCommand()
{
if (_deleteCmd != null) return _deleteCmd;
MySqlCommand cmd = CreateBaseCommand();
cmd.CommandText = "DELETE FROM " + Quote(_tableName) +
" WHERE " + CreateOriginalWhere(cmd);
_deleteCmd = cmd;
return cmd;
}
private string CreateFinalSelect(bool forinsert)
{
StringBuilder sel = new StringBuilder();
StringBuilder where = new StringBuilder();
foreach (DataRow row in _schema.Rows)
{
string colname = (string)row["ColumnName"];
if (sel.Length > 0)
sel.Append(", ");
sel.Append( colname );
if ((bool)row["IsKey"] == false) continue;
if (where.Length > 0)
where.Append(" AND ");
where.Append( "(" + colname + "=" );
if (forinsert)
{
if ((bool)row["IsAutoIncrement"])
where.Append("last_insert_id()");
else if ((bool)row["IsKey"])
where.Append("@" + colname);
}
else
{
where.Append("@Original_" + colname);
}
where.Append(")");
}
return "SELECT " + sel.ToString() + " FROM " + Quote(_tableName) +
" WHERE " + where.ToString();
}
private string CreateOriginalWhere(MySqlCommand cmd)
{
StringBuilder wherestr = new StringBuilder();
foreach (DataRow row in _schema.Rows)
{
if (! IncludedInWhereClause(row)) continue;
// first update the where clause since it will contain all parameters
if (wherestr.Length > 0)
wherestr.Append(" AND ");
string colname = Quote((string)row["ColumnName"]);
MySqlParameter op = CreateParameter(row, true);
cmd.Parameters.Add(op);
wherestr.Append( "(" + colname + "=@" + op.ParameterName);
if ((bool)row["AllowDBNull"] == true)
wherestr.Append( " or (" + colname + " IS NULL and @" + op.ParameterName + " IS NULL)");
wherestr.Append(")");
}
return wherestr.ToString();
}
private MySqlCommand CreateUpdateCommand()
{
if (_updateCmd != null) return _updateCmd;
MySqlCommand cmd = CreateBaseCommand();
StringBuilder setstr = new StringBuilder();
foreach (DataRow schemaRow in _schema.Rows)
{
string colname = Quote((string)schemaRow["ColumnName"]);
if (! IncludedInUpdate(schemaRow)) continue;
if (setstr.Length > 0)
setstr.Append(", ");
MySqlParameter p = CreateParameter(schemaRow, false);
cmd.Parameters.Add(p);
setstr.Append( colname + "=@" + p.ParameterName );
}
cmd.CommandText = "UPDATE " + Quote(_tableName) + " SET " + setstr.ToString() +
" WHERE " + CreateOriginalWhere(cmd);
cmd.CommandText += "; " + CreateFinalSelect(false);
_updateCmd = cmd;
return cmd;
}
private MySqlCommand CreateInsertCommand()
{
if (_insertCmd != null) return _insertCmd;
MySqlCommand cmd = CreateBaseCommand();
StringBuilder setstr = new StringBuilder();
StringBuilder valstr = new StringBuilder();
foreach (DataRow schemaRow in _schema.Rows)
{
string colname = Quote((string)schemaRow["ColumnName"]);
if (!IncludedInInsert(schemaRow)) continue;
if (setstr.Length > 0)
{
setstr.Append(", ");
valstr.Append(", ");
}
MySqlParameter p = CreateParameter(schemaRow, false);
cmd.Parameters.Add(p);
setstr.Append( colname );
valstr.Append( "@" + p.ParameterName );
}
cmd.CommandText = "INSERT INTO " + Quote(_tableName) + " (" + setstr.ToString() + ") " +
" VALUES (" + valstr.ToString() + ")";
cmd.CommandText += "; " + CreateFinalSelect(true);
_insertCmd = cmd;
return cmd;
}
private bool IncludedInInsert (DataRow schemaRow)
{
// If the parameter has one of these properties, then we don't include it in the insert:
// AutoIncrement, Hidden, Expression, RowVersion, ReadOnly
if ((bool) schemaRow ["IsAutoIncrement"])
return false;
/* if ((bool) schemaRow ["IsHidden"])
return false;
if ((bool) schemaRow ["IsExpression"])
return false;*/
if ((bool) schemaRow ["IsRowVersion"])
return false;
if ((bool) schemaRow ["IsReadOnly"])
return false;
return true;
}
private bool IncludedInUpdate (DataRow schemaRow)
{
// If the parameter has one of these properties, then we don't include it in the insert:
// AutoIncrement, Hidden, RowVersion
if ((bool) schemaRow ["IsAutoIncrement"])
return false;
// if ((bool) schemaRow ["IsHidden"])
// return false;
if ((bool) schemaRow ["IsRowVersion"])
return false;
return true;
}
private bool IncludedInWhereClause (DataRow schemaRow)
{
// if ((bool) schemaRow ["IsLong"])
// return false;
return true;
}
private void SetParameterValues(MySqlCommand cmd, DataRow dataRow)
{
foreach (MySqlParameter p in cmd.Parameters)
{
if (p.ParameterName.Length >= 8 && p.ParameterName.Substring(0, 8).Equals("Original"))
p.Value = dataRow[ p.SourceColumn, DataRowVersion.Original ];
else
p.Value = dataRow[ p.SourceColumn, DataRowVersion.Current ];
}
}
private void OnRowUpdating(object sender, MySqlRowUpdatingEventArgs args)
{
// make sure we are still to proceed
if (args.Status != UpdateStatus.Continue) return;
if (_schema == null)
GenerateSchema();
if (StatementType.Delete == args.StatementType)
args.Command = CreateDeleteCommand();
else if (StatementType.Update == args.StatementType)
args.Command = CreateUpdateCommand();
else if (StatementType.Insert == args.StatementType)
args.Command = CreateInsertCommand();
else if (StatementType.Select == args.StatementType)
return;
SetParameterValues(args.Command, args.Row);
}
#endregion
}
}
// ByteFX.Data data access components for .Net
// Copyright (C) 2002-2003 ByteFX, Inc.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
using System;
using System.ComponentModel;
using System.Data;
using System.Text;
namespace ByteFX.Data.MySqlClient
{
/// <summary>
/// Automatically generates single-table commands used to reconcile changes made to a DataSet with the associated MySQL database. This class cannot be inherited.
/// </summary>
/// <include file='docs/MySqlCommandBuilder.xml' path='MyDocs/MyMembers[@name="Class"]/*'/>
[ToolboxItem(false)]
[System.ComponentModel.DesignerCategory("Code")]
public sealed class MySqlCommandBuilder : Component
{
private MySqlDataAdapter _adapter;
private string _QuotePrefix;
private string _QuoteSuffix;
private DataTable _schema;
private string _tableName;
private MySqlCommand _updateCmd;
private MySqlCommand _insertCmd;
private MySqlCommand _deleteCmd;
#region Constructors
/// <summary>
/// Overloaded. Initializes a new instance of the SqlCommandBuilder class.
/// </summary>
public MySqlCommandBuilder()
{
}
/// <summary>
/// Overloaded. Initializes a new instance of the SqlCommandBuilder class.
/// </summary>
public MySqlCommandBuilder( MySqlDataAdapter adapter )
{
_adapter = adapter;
_adapter.RowUpdating += new MySqlRowUpdatingEventHandler( OnRowUpdating );
}
#endregion
#region Properties
/// <summary>
/// Gets or sets a MySqlDataAdapter object for which SQL statements are automatically generated.
/// </summary>
public MySqlDataAdapter DataAdapter
{
get { return _adapter; }
set
{
if (_adapter != null)
{
_adapter.RowUpdating -= new MySqlRowUpdatingEventHandler( OnRowUpdating );
}
_adapter = value;
}
}
/// <summary>
/// Gets or sets the beginning character or characters to use when specifying MySql database objects (for example, tables or columns) whose names contain characters such as spaces or reserved tokens.
/// </summary>
public string QuotePrefix
{
get { return _QuotePrefix; }
set { _QuotePrefix = value; }
}
/// <summary>
/// Gets or sets the ending character or characters to use when specifying MySql database objects (for example, tables or columns) whose names contain characters such as spaces or reserved tokens.
/// </summary>
public string QuoteSuffix
{
get { return _QuoteSuffix; }
set { _QuoteSuffix = value; }
}
#endregion
#region Public Methods
/// <summary>
/// Retrieves parameter information from the stored procedure specified in the MySqlCommand and populates the Parameters collection of the specified MySqlCommand object.
/// This method is not currently supported since stored procedures are not available in MySql.
/// </summary>
/// <param name="command">The MySqlCommand referencing the stored procedure from which the parameter information is to be derived. The derived parameters are added to the Parameters collection of the MySqlCommand.</param>
/// <exception cref="InvalidOperationException">The command text is not a valid stored procedure name.</exception>
public static void DeriveParameters(MySqlCommand command)
{
throw new MySqlException("DeriveParameters is not supported (due to MySql not supporting SP)");
}
/// <summary>
/// Gets the automatically generated MySqlCommand object required to perform deletions on the database.
/// </summary>
/// <returns></returns>
public MySqlCommand GetDeleteCommand()
{
if (_schema == null)
GenerateSchema();
return CreateDeleteCommand();
}
/// <summary>
/// Gets the automatically generated MySqlCommand object required to perform insertions on the database.
/// </summary>
/// <returns></returns>
public MySqlCommand GetInsertCommand()
{
if (_schema == null)
GenerateSchema();
return CreateInsertCommand();
}
/// <summary>
/// Gets the automatically generated MySqlCommand object required to perform updates on the database.
/// </summary>
/// <returns></returns>
public MySqlCommand GetUpdateCommand()
{
if (_schema == null)
GenerateSchema();
return CreateUpdateCommand();
}
/// <summary>
/// Refreshes the database schema information used to generate INSERT, UPDATE, or DELETE statements.
/// </summary>
public void RefreshSchema()
{
_schema = null;
_insertCmd = null;
_deleteCmd = null;
_updateCmd = null;
}
#endregion
#region Private Methods
private void GenerateSchema()
{
if (_adapter == null)
throw new MySqlException("Improper MySqlCommandBuilder state: adapter is null");
if (_adapter.SelectCommand == null)
throw new MySqlException("Improper MySqlCommandBuilder state: adapter's SelectCommand is null");
MySqlDataReader dr = _adapter.SelectCommand.ExecuteReader(CommandBehavior.SchemaOnly | CommandBehavior.KeyInfo);
_schema = dr.GetSchemaTable();
dr.Close();
// make sure we got at least one unique or key field and count base table names
bool hasKeyOrUnique=false;
foreach (DataRow row in _schema.Rows)
{
if (true == (bool)row["IsKey"] || true == (bool)row["IsUnique"])
hasKeyOrUnique=true;
if (_tableName == null)
_tableName = (string)row["BaseTableName"];
else if (_tableName != (string)row["BaseTableName"])
throw new InvalidOperationException("MySqlCommandBuilder does not support multi-table statements");
}
if (! hasKeyOrUnique)
throw new InvalidOperationException("MySqlCommandBuilder cannot operate on tables with no unique or key columns");
}
private string Quote(string table_or_column)
{
if (_QuotePrefix == null || _QuoteSuffix == null)
return table_or_column;
return _QuotePrefix + table_or_column + _QuoteSuffix;
}
private MySqlParameter CreateParameter(DataRow row, bool Original)
{
MySqlParameter p;
if (Original)
p = new MySqlParameter( "@Original_" + (string)row["ColumnName"], (MySqlDbType)row["ProviderType"],
ParameterDirection.Input, (string)row["ColumnName"], DataRowVersion.Original, DBNull.Value );
else
p = new MySqlParameter( "@" + (string)row["ColumnName"], (MySqlDbType)row["ProviderType"],
ParameterDirection.Input, (string)row["ColumnName"], DataRowVersion.Current, DBNull.Value );
return p;
}
private MySqlCommand CreateBaseCommand()
{
MySqlCommand cmd = new MySqlCommand();
cmd.Connection = _adapter.SelectCommand.Connection;
cmd.CommandTimeout = _adapter.SelectCommand.CommandTimeout;
cmd.Transaction = _adapter.SelectCommand.Transaction;
return cmd;
}
private MySqlCommand CreateDeleteCommand()
{
if (_deleteCmd != null) return _deleteCmd;
MySqlCommand cmd = CreateBaseCommand();
cmd.CommandText = "DELETE FROM " + Quote(_tableName) +
" WHERE " + CreateOriginalWhere(cmd);
_deleteCmd = cmd;
return cmd;
}
private string CreateFinalSelect(bool forinsert)
{
StringBuilder sel = new StringBuilder();
StringBuilder where = new StringBuilder();
foreach (DataRow row in _schema.Rows)
{
string colname = (string)row["ColumnName"];
if (sel.Length > 0)
sel.Append(", ");
sel.Append( colname );
if ((bool)row["IsKey"] == false) continue;
if (where.Length > 0)
where.Append(" AND ");
where.Append( "(" + colname + "=" );
if (forinsert)
{
if ((bool)row["IsAutoIncrement"])
where.Append("last_insert_id()");
else if ((bool)row["IsKey"])
where.Append("@" + colname);
}
else
{
where.Append("@Original_" + colname);
}
where.Append(")");
}
return "SELECT " + sel.ToString() + " FROM " + Quote(_tableName) +
" WHERE " + where.ToString();
}
private string CreateOriginalWhere(MySqlCommand cmd)
{
StringBuilder wherestr = new StringBuilder();
foreach (DataRow row in _schema.Rows)
{
if (! IncludedInWhereClause(row)) continue;
// first update the where clause since it will contain all parameters
if (wherestr.Length > 0)
wherestr.Append(" AND ");
string colname = Quote((string)row["ColumnName"]);
MySqlParameter op = CreateParameter(row, true);
cmd.Parameters.Add(op);
wherestr.Append( "(" + colname + "=@" + op.ParameterName);
if ((bool)row["AllowDBNull"] == true)
wherestr.Append( " or (" + colname + " IS NULL and @" + op.ParameterName + " IS NULL)");
wherestr.Append(")");
}
return wherestr.ToString();
}
private MySqlCommand CreateUpdateCommand()
{
if (_updateCmd != null) return _updateCmd;
MySqlCommand cmd = CreateBaseCommand();
StringBuilder setstr = new StringBuilder();
foreach (DataRow schemaRow in _schema.Rows)
{
string colname = Quote((string)schemaRow["ColumnName"]);
if (! IncludedInUpdate(schemaRow)) continue;
if (setstr.Length > 0)
setstr.Append(", ");
MySqlParameter p = CreateParameter(schemaRow, false);
cmd.Parameters.Add(p);
setstr.Append( colname + "=@" + p.ParameterName );
}
cmd.CommandText = "UPDATE " + Quote(_tableName) + " SET " + setstr.ToString() +
" WHERE " + CreateOriginalWhere(cmd);
cmd.CommandText += "; " + CreateFinalSelect(false);
_updateCmd = cmd;
return cmd;
}
private MySqlCommand CreateInsertCommand()
{
if (_insertCmd != null) return _insertCmd;
MySqlCommand cmd = CreateBaseCommand();
StringBuilder setstr = new StringBuilder();
StringBuilder valstr = new StringBuilder();
foreach (DataRow schemaRow in _schema.Rows)
{
string colname = Quote((string)schemaRow["ColumnName"]);
if (!IncludedInInsert(schemaRow)) continue;
if (setstr.Length > 0)
{
setstr.Append(", ");
valstr.Append(", ");
}
MySqlParameter p = CreateParameter(schemaRow, false);
cmd.Parameters.Add(p);
setstr.Append( colname );
valstr.Append( "@" + p.ParameterName );
}
cmd.CommandText = "INSERT INTO " + Quote(_tableName) + " (" + setstr.ToString() + ") " +
" VALUES (" + valstr.ToString() + ")";
cmd.CommandText += "; " + CreateFinalSelect(true);
_insertCmd = cmd;
return cmd;
}
private bool IncludedInInsert (DataRow schemaRow)
{
// If the parameter has one of these properties, then we don't include it in the insert:
// AutoIncrement, Hidden, Expression, RowVersion, ReadOnly
if ((bool) schemaRow ["IsAutoIncrement"])
return false;
/* if ((bool) schemaRow ["IsHidden"])
return false;
if ((bool) schemaRow ["IsExpression"])
return false;*/
if ((bool) schemaRow ["IsRowVersion"])
return false;
if ((bool) schemaRow ["IsReadOnly"])
return false;
return true;
}
private bool IncludedInUpdate (DataRow schemaRow)
{
// If the parameter has one of these properties, then we don't include it in the insert:
// AutoIncrement, Hidden, RowVersion
if ((bool) schemaRow ["IsAutoIncrement"])
return false;
// if ((bool) schemaRow ["IsHidden"])
// return false;
if ((bool) schemaRow ["IsRowVersion"])
return false;
return true;
}
private bool IncludedInWhereClause (DataRow schemaRow)
{
// if ((bool) schemaRow ["IsLong"])
// return false;
return true;
}
private void SetParameterValues(MySqlCommand cmd, DataRow dataRow)
{
foreach (MySqlParameter p in cmd.Parameters)
{
if (p.ParameterName.Length >= 8 && p.ParameterName.Substring(0, 8).Equals("Original"))
p.Value = dataRow[ p.SourceColumn, DataRowVersion.Original ];
else
p.Value = dataRow[ p.SourceColumn, DataRowVersion.Current ];
}
}
private void OnRowUpdating(object sender, MySqlRowUpdatingEventArgs args)
{
// make sure we are still to proceed
if (args.Status != UpdateStatus.Continue) return;
if (_schema == null)
GenerateSchema();
if (StatementType.Delete == args.StatementType)
args.Command = CreateDeleteCommand();
else if (StatementType.Update == args.StatementType)
args.Command = CreateUpdateCommand();
else if (StatementType.Insert == args.StatementType)
args.Command = CreateInsertCommand();
else if (StatementType.Select == args.StatementType)
return;
SetParameterValues(args.Command, args.Row);
}
#endregion
}
}
@@ -0,0 +1,141 @@
using System;
namespace ByteFX.Data.MySqlClient
{
/// <summary>
/// Summary description for CommandResult.
/// </summary>
internal class CommandResult
{
private Driver driver;
private Packet packet;
private int affectedRows = -1;
private int fieldCount = -1;
private int fieldsRead = 0;
private long fieldLength = 0;
private bool readSchema = false;
private bool readRows = false;
public CommandResult(Packet p, Driver d)
{
driver = d;
packet = p;
fieldCount = (int)p.ReadLenInteger();
if (fieldCount == 0)
affectedRows =(int)p.ReadLenInteger();
}
#region Properties
public bool IsResultSet
{
get { return fieldCount > 0; }
}
public int ColumnCount
{
get { return fieldCount; }
}
public int RowsAffected
{
get { return affectedRows; }
}
#endregion
public MySqlField GetField()
{
MySqlField f = new MySqlField( driver.Encoding );
packet = driver.ReadPacket();
f.TableName = packet.ReadLenString();
f.ColumnName = packet.ReadLenString();
f.ColumnLength = (int)packet.ReadNBytes();
f.Type = (MySqlDbType)packet.ReadNBytes();
packet.ReadByte(); // this is apparently 2 -- not sure what it is for
f.Flags = (ColumnFlags)packet.ReadInteger(2); //(short)(d.ReadByte() & 0xff);
f.NumericScale = packet.ReadByte();
fieldsRead++;
return f;
}
public byte[] GetFieldBuffer()
{
return packet.GetBuffer();
}
public int GetFieldIndex()
{
return (int)packet.Position;
}
public long GetFieldLength()
{
return fieldLength;
}
public bool NextField()
{
if (fieldLength >= 0)
packet.Position += fieldLength;
if (! packet.HasMoreData) return false;
fieldLength = packet.ReadLenInteger();
fieldsRead++;
return true;
}
/// <summary>
/// Checks to see if there are any row packets coming
/// </summary>
/// <returns>True if there are row packets available, false if not</returns>
public bool CheckForRows()
{
// first read off any unread field defs
while (fieldsRead < fieldCount)
GetField();
// read off the end of schema packet
packet = driver.ReadPacket();
if ( ! packet.IsLastPacket())
throw new MySqlException("Expected end of schema packet");
readSchema = true;
packet = driver.PeekPacket();
return ! packet.IsLastPacket();
}
public bool ReadDataRow()
{
packet = driver.ReadPacket();
if (packet.IsLastPacket())
{
readRows = true;
return false;
}
fieldsRead = 0;
fieldLength = 0;
NextField();
return true;
}
public void Clear()
{
Packet p;
if (! readSchema)
{
do
{
p = driver.ReadPacket();
} while (! p.IsLastPacket());
}
if (! readRows)
do
{
p = driver.ReadPacket();
} while (! p.IsLastPacket());
}
}
}
@@ -0,0 +1,155 @@
using System;
using System.IO;
using ICSharpCode.SharpZipLib.Zip.Compression.Streams;
namespace ByteFX.Data.MySqlClient
{
/// <summary>
/// Summary description for CompressedStream.
/// </summary>
internal class CompressedStream : Stream
{
private Stream srcStream;
private byte[] buffer;
private int index;
public CompressedStream( Stream src )
{
srcStream = src;
index = 0;
buffer = new byte[0];
}
#region Properties
public override bool CanRead
{
get { return srcStream.CanRead; }
}
public override bool CanWrite
{
get { return srcStream.CanWrite; }
}
public override bool CanSeek
{
get { return srcStream.CanSeek; }
}
public override long Length
{
get { return srcStream.Length; }
}
public override long Position
{
get { return srcStream.Position; }
set { srcStream.Position = value; }
}
#endregion
public override void Close()
{
srcStream.Close();
base.Close ();
}
public override void Flush()
{
srcStream.Flush();
}
public override void SetLength(long value)
{
srcStream.SetLength( value );
}
public override int ReadByte()
{
EnsureData(1);
return (int)buffer[index++];
}
public override int Read(byte[] buffer, int offset, int count)
{
if (buffer == null)
throw new ArgumentNullException( "buffer", "Buffer must not be null" );
if (offset < 0 || offset >= buffer.Length)
throw new ArgumentOutOfRangeException( "Offset must be a valid position in buffer" );
if ((offset + count) > buffer.Length)
throw new ArgumentException( "Buffer is not large enough to complete operation" );
EnsureData( count );
for (int i=0; i < count; i++)
buffer[offset+i] = this.buffer[index++];
return count;
}
public override void Write(byte[] buffer, int offset, int count)
{
srcStream.Write( buffer, offset, count );
}
public override long Seek(long offset, SeekOrigin origin)
{
return srcStream.Seek( offset, origin );
}
private void ReadBuffer( Stream s, byte[] buf, int offset, int length )
{
while (length > 0)
{
int amountRead = s.Read( buf, offset, length );
if (amountRead == 0)
throw new MySqlException("Unexpected end of data encountered");
length -= amountRead;
offset += amountRead;
}
}
private void ReadNextPacket()
{
// read off the uncompressed and compressed lengths
int compressedLen = srcStream.ReadByte() + (srcStream.ReadByte() << 8) +
(srcStream.ReadByte() << 16);
byte seq = (byte)srcStream.ReadByte();
int unCompressedLen = srcStream.ReadByte() + (srcStream.ReadByte() << 8) +
(srcStream.ReadByte() << 16);
// if the data is in fact compressed, then uncompress it
byte[] unCompressedBuffer = null;
if (unCompressedLen > 0)
{
unCompressedBuffer = new byte[ unCompressedLen ];
InflaterInputStream iis = new InflaterInputStream( srcStream );
ReadBuffer( iis, unCompressedBuffer, 0, unCompressedLen );
}
else
{
unCompressedBuffer = new byte[ compressedLen ];
ReadBuffer( srcStream, unCompressedBuffer, 0, compressedLen );
}
// now join this buffer to our existing one
int left = buffer.Length - index;
byte[] newBuffer = new byte[ left + unCompressedBuffer.Length ];
int newIndex = 0;
// first copy in the rest of the original
for (int i=index; i < buffer.Length; i++)
newBuffer[newIndex++] = buffer[i];
unCompressedBuffer.CopyTo( newBuffer, newIndex );
buffer = newBuffer;
index = 0;
}
private void EnsureData( int size )
{
while ((buffer.Length - index) < size)
ReadNextPacket();
}
}
}
+386 -372
View File
@@ -1,372 +1,386 @@
// ByteFX.Data data access components for .Net
// Copyright (C) 2002-2003 ByteFX, Inc.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
using System;
using System.Data;
using System.Collections.Specialized;
using System.Text;
using System.ComponentModel;
using System.Globalization;
using ByteFX.Data.Common;
namespace ByteFX.Data.MySqlClient
{
/// <summary>
/// Represents an open connection to a MySQL Server database. This class cannot be inherited.
/// </summary>
/// <include file='docs/MySqlConnection.xml' path='MyDocs/MyMembers[@name="Class"]/*'/>
[System.Drawing.ToolboxBitmap( typeof(MySqlConnection), "Designers.connection.bmp")]
[System.ComponentModel.DesignerCategory("Code")]
[ToolboxItem(true)]
public sealed class MySqlConnection : Component, IDbConnection, ICloneable
{
internal ConnectionState state;
private MySqlInternalConnection internalConnection;
private MySqlDataReader dataReader;
private NumberFormatInfo numberFormat;
private MySqlConnectionString settings;
/// <summary>
/// Occurs when the state of the connection changes.
/// </summary>
public event StateChangeEventHandler StateChange;
/// <summary>
/// Creates a new connection
/// </summary>
public MySqlConnection()
{
settings = new MySqlConnectionString();
}
/// <summary>
/// Creates a new connection
/// </summary>
/// <param name="container"></param>
public MySqlConnection(System.ComponentModel.IContainer container)
{
settings = new MySqlConnectionString();
}
// Have a constructor that takes a connection string.
/// <summary>
/// Creates a new connection using the specified connection string.
/// </summary>
/// <param name="connectString"></param>
public MySqlConnection(string connectString)
{
settings = new MySqlConnectionString(connectString);
}
/// <summary>
/// Gets the name of the MySQL server to which to connect.
/// </summary>
#region Properties
[Browsable(true)]
public string DataSource
{
get { return settings.Host; }
}
/// <summary>
/// Gets the time to wait while trying to establish a connection before terminating the attempt and generating an error.
/// </summary>
/// <include file='docs/MySqlConnection.xml' path='MyDocs/MyMembers[@name="ConnectionTimeout"]/*'/>
[Browsable(true)]
public int ConnectionTimeout
{
get { return settings.ConnectTimeout; }
}
/// <summary>
/// Gets the name of the current database or the database to be used after a connection is opened.
/// </summary>
[Browsable(true)]
public string Database
{
get { return settings.Database; }
}
/// <summary>
/// Indicates if this connection should use compression when communicating with the server.
/// </summary>
[Browsable(false)]
public bool UseCompression
{
get { return settings.UseCompression; }
}
/// <summary>
/// Gets the current state of the connection.
/// </summary>
[Browsable(false)]
public ConnectionState State
{
get { return state; }
}
internal MySqlDataReader Reader
{
get { return dataReader; }
set { dataReader = value; }
}
internal MySqlInternalConnection InternalConnection
{
get { return internalConnection; }
}
internal NumberFormatInfo NumberFormat
{
get
{
if (numberFormat == null)
{
numberFormat = new NumberFormatInfo();
numberFormat = (NumberFormatInfo)NumberFormatInfo.InvariantInfo.Clone();
numberFormat.NumberDecimalSeparator = ".";
}
return numberFormat;
}
}
/// <summary>
/// Gets a string containing the version of the MySQL server to which the client is connected.
/// </summary>
[Browsable(false)]
public string ServerVersion
{
get { return internalConnection.Driver.Version; }
}
internal Encoding Encoding
{
get
{
if (internalConnection == null)
return System.Text.Encoding.Default;
else
return internalConnection.Driver.Encoding;
}
}
/// <summary>
/// Gets or sets the string used to connect to a MySQL Server database.
/// </summary>
/// <include file='docs/MySqlConnection.xml' path='MyDocs/MyMembers[@name="ConnectionString"]/*'/>
#if WINDOWS
[Editor(typeof(Designers.ConnectionStringEditor), typeof(System.Drawing.Design.UITypeEditor))]
#endif
[Browsable(true)]
[Category("Data")]
public string ConnectionString
{
get
{
// Always return exactly what the user set.
// Security-sensitive information may be removed.
return settings.ConnectString;
}
set
{
settings.ConnectString = value;
if (internalConnection != null)
internalConnection.Settings = settings;
}
}
#endregion
#region Transactions
/// <summary>
/// Begins a database transaction.
/// </summary>
/// <returns></returns>
public MySqlTransaction BeginTransaction()
{
if (state != ConnectionState.Open)
throw new MySqlException("Invalid operation: The connection is closed");
MySqlTransaction t = new MySqlTransaction();
t.Connection = this;
InternalConnection.Driver.SendCommand( DBCmd.QUERY, "BEGIN");
return t;
}
/// <summary>
///
/// </summary>
IDbTransaction IDbConnection.BeginTransaction()
{
return BeginTransaction();
}
/// <summary>
///
/// </summary>
/// <param name="level"></param>
/// <returns></returns>
public MySqlTransaction BeginTransaction(IsolationLevel level)
{
if (state != ConnectionState.Open)
throw new MySqlException("Invalid operation: The connection is closed");
MySqlTransaction t = new MySqlTransaction();
t.Connection = this;
t.IsolationLevel = level;
string cmd = "SET SESSION TRANSACTION ISOLATION LEVEL ";
switch (level)
{
case IsolationLevel.ReadCommitted:
cmd += "READ COMMITTED"; break;
case IsolationLevel.ReadUncommitted:
cmd += "READ UNCOMMITTED"; break;
case IsolationLevel.RepeatableRead:
cmd += "REPEATABLE READ"; break;
case IsolationLevel.Serializable:
cmd += "SERIALIZABLE"; break;
case IsolationLevel.Chaos:
throw new NotSupportedException("Chaos isolation level is not supported");
}
InternalConnection.Driver.SendCommand( DBCmd.QUERY, cmd );
InternalConnection.Driver.SendCommand( DBCmd.QUERY, "BEGIN");
return t;
}
/// <summary>
///
/// </summary>
/// <param name="level"></param>
/// <returns></returns>
IDbTransaction IDbConnection.BeginTransaction(IsolationLevel level)
{
return BeginTransaction(level);
}
#endregion
/// <summary>
/// Changes the current database for an open MySqlConnection.
/// </summary>
/// <param name="dbName"></param>
public void ChangeDatabase(string dbName)
{
if (state != ConnectionState.Open)
throw new MySqlException("Invalid operation: The connection is closed");
//TODOinternalConnection.ChangeDatabase( dbName );
InternalConnection.Driver.SendCommand( DBCmd.INIT_DB, dbName );
}
internal void SetState( ConnectionState newState )
{
ConnectionState oldState = state;
state = newState;
if (this.StateChange != null)
StateChange(this, new StateChangeEventArgs( oldState, newState ));
}
/// <summary>
/// Opens a database connection with the property settings specified by the ConnectionString.
/// </summary>
public void Open()
{
if (state == ConnectionState.Open)
throw new MySqlException("error connecting: The connection is already Open (state=Open).");
SetState( ConnectionState.Connecting );
if (settings.Pooling)
{
internalConnection = MySqlPoolManager.GetConnection( settings );
}
else
{
internalConnection = new MySqlInternalConnection( settings );
internalConnection.Open();
}
SetState( ConnectionState.Open );
internalConnection.SetServerVariables(this);
ChangeDatabase( settings.Database );
}
/// <summary>
/// Closes the connection to the database. This is the preferred method of closing any open connection.
/// </summary>
public void Close()
{
if (state == ConnectionState.Closed) return;
if (dataReader != null)
dataReader.Close();
if (settings.Pooling)
MySqlPoolManager.ReleaseConnection( internalConnection );
else
internalConnection.Close();
SetState( ConnectionState.Closed );
}
IDbCommand IDbConnection.CreateCommand()
{
return CreateCommand();
}
/// <summary>
/// Creates and returns a MySqlCommand object associated with the MySqlConnection.
/// </summary>
/// <returns></returns>
public MySqlCommand CreateCommand()
{
// Return a new instance of a command object.
MySqlCommand c = new MySqlCommand();
c.Connection = this;
return c;
}
#region ICloneable
/// <summary>
/// Creates a new MySqlConnection object with the exact same ConnectionString value
/// </summary>
/// <returns>A cloned MySqlConnection object</returns>
object ICloneable.Clone()
{
MySqlConnection clone = new MySqlConnection();
clone.ConnectionString = this.ConnectionString;
//TODO: how deep should this go?
return clone;
}
#endregion
#region IDisposeable
/// <summary>
/// Releases the resources used by the MySqlConnection.
/// </summary>
public new void Dispose()
{
if (State == ConnectionState.Open)
Close();
base.Dispose();
}
#endregion
}
}
// ByteFX.Data data access components for .Net
// Copyright (C) 2002-2003 ByteFX, Inc.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
using System;
using System.Data;
using System.Collections.Specialized;
using System.Text;
using System.ComponentModel;
using System.Globalization;
using ByteFX.Data.Common;
namespace ByteFX.Data.MySqlClient
{
/// <summary>
/// Represents an open connection to a MySQL Server database. This class cannot be inherited.
/// </summary>
/// <include file='docs/MySqlConnection.xml' path='MyDocs/MyMembers[@name="Class"]/*'/>
[System.Drawing.ToolboxBitmap( typeof(MySqlConnection), "MySqlClient.resources.connection.bmp")]
[System.ComponentModel.DesignerCategory("Code")]
[ToolboxItem(true)]
public sealed class MySqlConnection : Component, IDbConnection, ICloneable
{
internal ConnectionState state;
private MySqlInternalConnection internalConnection;
private MySqlDataReader dataReader;
private NumberFormatInfo numberFormat;
private MySqlConnectionString settings;
/// <summary>
/// Occurs when the state of the connection changes.
/// </summary>
public event StateChangeEventHandler StateChange;
/// <summary>
/// Creates a new connection
/// </summary>
public MySqlConnection()
{
settings = new MySqlConnectionString("server=localhost");
}
/// <summary>
/// Creates a new connection
/// </summary>
/// <param name="container"></param>
public MySqlConnection(System.ComponentModel.IContainer container)
{
settings = new MySqlConnectionString();
}
// Have a constructor that takes a connection string.
/// <summary>
/// Creates a new connection using the specified connection string.
/// </summary>
/// <param name="connectString"></param>
public MySqlConnection(string connectString)
{
settings = new MySqlConnectionString(connectString);
}
/// <summary>
/// Gets the name of the MySQL server to which to connect.
/// </summary>
#region Properties
[Browsable(true)]
public string DataSource
{
get { return settings.Server; }
}
/// <summary>
/// Gets the time to wait while trying to establish a connection before terminating the attempt and generating an error.
/// </summary>
/// <include file='docs/MySqlConnection.xml' path='MyDocs/MyMembers[@name="ConnectionTimeout"]/*'/>
[Browsable(true)]
public int ConnectionTimeout
{
get { return settings.ConnectionTimeout; }
}
/// <summary>
/// Gets the name of the current database or the database to be used after a connection is opened.
/// </summary>
[Browsable(true)]
public string Database
{
get { return settings.Database; }
}
/// <summary>
/// Indicates if this connection should use compression when communicating with the server.
/// </summary>
[Browsable(false)]
public bool UseCompression
{
get { return settings.UseCompression; }
}
/// <summary>
/// Gets the current state of the connection.
/// </summary>
[Browsable(false)]
public ConnectionState State
{
get { return state; }
}
internal MySqlDataReader Reader
{
get { return dataReader; }
set { dataReader = value; }
}
internal MySqlInternalConnection InternalConnection
{
get { return internalConnection; }
}
internal NumberFormatInfo NumberFormat
{
get
{
if (numberFormat == null)
{
numberFormat = new NumberFormatInfo();
numberFormat = (NumberFormatInfo)NumberFormatInfo.InvariantInfo.Clone();
numberFormat.NumberDecimalSeparator = ".";
}
return numberFormat;
}
}
/// <summary>
/// Gets a string containing the version of the MySQL server to which the client is connected.
/// </summary>
[Browsable(false)]
public string ServerVersion
{
get { return internalConnection.Driver.VersionString; }
}
internal Encoding Encoding
{
get
{
if (internalConnection == null)
return System.Text.Encoding.Default;
else
return internalConnection.Driver.Encoding;
}
}
/// <summary>
/// Gets or sets the string used to connect to a MySQL Server database.
/// </summary>
/// <include file='docs/MySqlConnection.xml' path='MyDocs/MyMembers[@name="ConnectionString"]/*'/>
#if WINDOWS
[Editor("ByteFX.Data.MySqlClient.Design.ConnectionStringTypeEditor,MySqlClient.Design", typeof(System.Drawing.Design.UITypeEditor))]
#endif
[Browsable(true)]
[Category("Data")]
[Description("Information used to connect to a DataSource, such as 'Server=xxx;UserId=yyy;Password=zzz;Database=dbdb'.")]
public string ConnectionString
{
get
{
// Always return exactly what the user set.
// Security-sensitive information may be removed.
return settings.GetConnectionString();
}
set
{
if (this.State != ConnectionState.Closed)
throw new MySqlException("Not allowed to change the 'ConnectionString' property while the connection (state=" + State + ").");
settings.SetConnectionString(value);
if (internalConnection != null)
internalConnection.Settings = settings;
}
}
#endregion
#region Transactions
/// <summary>
/// Begins a database transaction.
/// </summary>
/// <returns></returns>
public MySqlTransaction BeginTransaction()
{
if (state != ConnectionState.Open)
throw new MySqlException("Invalid operation: The connection is closed");
MySqlTransaction t = new MySqlTransaction();
t.Connection = this;
InternalConnection.Driver.Send( DBCmd.QUERY, "BEGIN");
return t;
}
/// <summary>
///
/// </summary>
IDbTransaction IDbConnection.BeginTransaction()
{
return BeginTransaction();
}
/// <summary>
///
/// </summary>
/// <param name="level"></param>
/// <returns></returns>
public MySqlTransaction BeginTransaction(IsolationLevel level)
{
if (state != ConnectionState.Open)
throw new MySqlException("Invalid operation: The connection is closed");
MySqlTransaction t = new MySqlTransaction();
t.Connection = this;
t.IsolationLevel = level;
string cmd = "SET SESSION TRANSACTION ISOLATION LEVEL ";
switch (level)
{
case IsolationLevel.ReadCommitted:
cmd += "READ COMMITTED"; break;
case IsolationLevel.ReadUncommitted:
cmd += "READ UNCOMMITTED"; break;
case IsolationLevel.RepeatableRead:
cmd += "REPEATABLE READ"; break;
case IsolationLevel.Serializable:
cmd += "SERIALIZABLE"; break;
case IsolationLevel.Chaos:
throw new NotSupportedException("Chaos isolation level is not supported");
}
InternalConnection.Driver.Send( DBCmd.QUERY, cmd );
InternalConnection.Driver.Send( DBCmd.QUERY, "BEGIN");
return t;
}
/// <summary>
///
/// </summary>
/// <param name="level"></param>
/// <returns></returns>
IDbTransaction IDbConnection.BeginTransaction(IsolationLevel level)
{
return BeginTransaction(level);
}
#endregion
/// <summary>
/// Changes the current database for an open MySqlConnection.
/// </summary>
/// <param name="dbName"></param>
public void ChangeDatabase(string dbName)
{
if (state != ConnectionState.Open)
throw new MySqlException("Invalid operation: The connection is closed");
//TODOinternalConnection.ChangeDatabase( dbName );
InternalConnection.Driver.Send( DBCmd.INIT_DB, dbName );
}
internal void SetState( ConnectionState newState )
{
ConnectionState oldState = state;
state = newState;
if (this.StateChange != null)
StateChange(this, new StateChangeEventArgs( oldState, newState ));
}
/// <summary>
/// Opens a database connection with the property settings specified by the ConnectionString.
/// </summary>
public void Open()
{
if (state == ConnectionState.Open)
throw new MySqlException("error connecting: The connection is already Open (state=Open).");
SetState( ConnectionState.Connecting );
try
{
if (settings.Pooling)
{
internalConnection = MySqlPoolManager.GetConnection( settings );
}
else
{
internalConnection = new MySqlInternalConnection( settings );
internalConnection.Open();
}
}
catch (Exception ex)
{
SetState( ConnectionState.Closed );
throw ex;
}
SetState( ConnectionState.Open );
internalConnection.SetServerVariables(this);
if (settings.Database != null && settings.Database != String.Empty)
ChangeDatabase( settings.Database );
}
/// <summary>
/// Closes the connection to the database. This is the preferred method of closing any open connection.
/// </summary>
public void Close()
{
if (state == ConnectionState.Closed) return;
if (dataReader != null)
dataReader.Close();
if (settings.Pooling)
MySqlPoolManager.ReleaseConnection( internalConnection );
else
internalConnection.Close();
SetState( ConnectionState.Closed );
}
IDbCommand IDbConnection.CreateCommand()
{
return CreateCommand();
}
/// <summary>
/// Creates and returns a MySqlCommand object associated with the MySqlConnection.
/// </summary>
/// <returns></returns>
public MySqlCommand CreateCommand()
{
// Return a new instance of a command object.
MySqlCommand c = new MySqlCommand();
c.Connection = this;
return c;
}
#region ICloneable
/// <summary>
/// Creates a new MySqlConnection object with the exact same ConnectionString value
/// </summary>
/// <returns>A cloned MySqlConnection object</returns>
object ICloneable.Clone()
{
MySqlConnection clone = new MySqlConnection();
clone.ConnectionString = this.ConnectionString;
//TODO: how deep should this go?
return clone;
}
#endregion
#region IDisposeable
/// <summary>
/// Releases the resources used by the MySqlConnection.
/// </summary>
public new void Dispose()
{
if (State == ConnectionState.Open)
Close();
base.Dispose();
}
#endregion
}
}
@@ -1,42 +1,42 @@
<?xml version="1.0" encoding="utf-8" ?>
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="ResMimeType">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="Version">
<value>1.0.0.0</value>
</resheader>
<resheader name="Reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.3102.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="Writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.3102.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
<?xml version="1.0" encoding="utf-8" ?>
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="ResMimeType">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="Version">
<value>1.0.0.0</value>
</resheader>
<resheader name="Reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.3102.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="Writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.3102.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
@@ -1,129 +1,117 @@
using System;
using ByteFX.Data.Common;
namespace ByteFX.Data.MySqlClient
{
/// <summary>
///
/// </summary>
internal sealed class MySqlInternalConnection
{
MySqlConnectionString settings;
Driver driver;
DateTime createTime;
bool serverVariablesSet;
public MySqlInternalConnection( MySqlConnectionString connectString )
{
settings = connectString;
serverVariablesSet = false;
}
#region Properties
public MySqlConnectionString Settings
{
get { return settings; }
set { settings = value; }
}
internal Driver Driver
{
get { return driver; }
}
#endregion
#region Methods
public bool IsAlive()
{
Packet packet;
try
{
byte[] bytes = driver.Encoding.GetBytes("select connection_id();");
packet = driver.SendSql( bytes );
// we have to read for two last packets since MySql sends
// us a last packet after schema and again after rows
// I will likely change this later to have the driver just
// return schema in one very large packet.
while (! packet.IsLastPacket())
packet = driver.ReadPacket();
// now read off the resultset
packet = driver.ReadPacket();
while (! packet.IsLastPacket())
packet = driver.ReadPacket();
return true;
}
catch (Exception ex)
{
return false;
}
}
public bool IsTooOld()
{
TimeSpan ts = DateTime.Now.Subtract( createTime );
if (ts.Seconds > settings.ConnectionLifetime)
return true;
return false;
}
/// <summary>
/// I don't like this setup but can't think of a better way of doing
/// right now.
/// </summary>
/// <param name="connection"></param>
public void SetServerVariables(MySqlConnection connection)
{
if (serverVariablesSet) return;
// retrieve the encoding that should be used for character data
MySqlCommand cmd = new MySqlCommand("show variables like 'max_allowed_packet'", connection);
try
{
MySqlDataReader reader = cmd.ExecuteReader();
reader.Read();
driver.MaxPacketSize = reader.GetInt64( 1 );
reader.Close();
}
catch
{
driver.MaxPacketSize = 1047552;
}
cmd.CommandText = "show variables like 'character_set'";
driver.Encoding = System.Text.Encoding.Default;
try
{
MySqlDataReader reader = cmd.ExecuteReader();
if (reader.Read())
driver.Encoding = CharSetMap.GetEncoding( reader.GetString(1) );
reader.Close();
}
catch
{
throw new MySqlException("Failure to initialize connection");
}
serverVariablesSet = true;
}
public void Open()
{
driver = new Driver();
driver.Open( settings );
createTime = DateTime.Now;
}
public void Close()
{
driver.Close();
}
#endregion
}
}
using System;
using ByteFX.Data.Common;
namespace ByteFX.Data.MySqlClient
{
/// <summary>
///
/// </summary>
internal sealed class MySqlInternalConnection
{
MySqlConnectionString settings;
Driver driver;
DateTime createTime;
bool serverVariablesSet;
public MySqlInternalConnection( MySqlConnectionString connectString )
{
settings = connectString;
serverVariablesSet = false;
}
#region Properties
public MySqlConnectionString Settings
{
get { return settings; }
set { settings = value; }
}
internal Driver Driver
{
get { return driver; }
}
#endregion
#region Methods
public bool IsAlive()
{
try
{
CommandResult result = driver.Send( DBCmd.PING, (byte[])null );
// we don't care about the result. The fact that it responded is enough
return true;
}
catch (Exception)
{
return false;
}
}
public bool IsTooOld()
{
TimeSpan ts = DateTime.Now.Subtract( createTime );
if (ts.Seconds > settings.ConnectionLifetime)
return true;
return false;
}
/// <summary>
/// I don't like this setup but can't think of a better way of doing
/// right now.
/// </summary>
/// <param name="connection"></param>
public void SetServerVariables(MySqlConnection connection)
{
if (serverVariablesSet) return;
// retrieve the encoding that should be used for character data
MySqlCommand cmd = new MySqlCommand("show variables like 'max_allowed_packet'", connection);
try
{
MySqlDataReader reader = cmd.ExecuteReader();
reader.Read();
driver.MaxPacketSize = reader.GetInt64( 1 );
reader.Close();
}
catch (Exception)
{
driver.MaxPacketSize = 1047552;
}
cmd.CommandText = "show variables like 'character_set'";
driver.Encoding = System.Text.Encoding.Default;
try
{
MySqlDataReader reader = cmd.ExecuteReader();
if (reader.Read())
driver.Encoding = CharSetMap.GetEncoding( reader.GetString(1) );
reader.Close();
}
catch
{
throw new MySqlException("Failure to initialize connection");
}
serverVariablesSet = true;
}
public void Open()
{
driver = new Driver();
driver.Open( settings );
createTime = DateTime.Now;
}
public void Close()
{
driver.Close();
}
#endregion
}
}
@@ -1,58 +1,286 @@
using System;
using ByteFX.Data.Common;
namespace ByteFX.Data.MySqlClient
{
/// <summary>
/// Summary description for MySqlConnectionString.
/// </summary>
internal sealed class MySqlConnectionString : DBConnectionString
{
private bool useCompression = false;
public MySqlConnectionString()
{
connectLifetime = 0;
pooling = true;
minPoolSize = 0;
maxPoolSize = 100;
connectTimeout = 15;
port = 3306;
}
public MySqlConnectionString(string connectString) : base(connectString)
{
connectLifetime = 0;
pooling = true;
minPoolSize = 0;
maxPoolSize = 100;
connectTimeout = 15;
port = 3306;
Parse();
}
#region Properties
public bool UseCompression
{
get { return useCompression; }
}
#endregion
protected override void ConnectionParameterParsed(string key, string value)
{
switch (key.ToLower())
{
case "use compression":
case "compress":
if (value.ToLower() == "no" || value.ToLower() == "false")
useCompression = false;
else
useCompression = true;
break;
}
base.ConnectionParameterParsed(key, value);
}
}
}
using System;
using System.Collections;
using System.ComponentModel;
using System.Text;
using ByteFX.Data.Common;
namespace ByteFX.Data.MySqlClient
{
internal enum ConnectionProtocol
{
Sockets, NamedPipe, UnixSocket
}
/// <summary>
/// Summary description for MySqlConnectionString.
/// </summary>
internal sealed class MySqlConnectionString : DBConnectionString
{
private Hashtable defaults;
public MySqlConnectionString() : base()
{
}
public MySqlConnectionString(string connectString) : this()
{
SetConnectionString( connectString );
}
#region Server Properties
[Browsable(false)]
public string Name
{
get { return connectionName; }
set { connectionName = value; }
}
[Category("Connection")]
[Description("The name or IP address of the server to use")]
public string Server
{
get { return GetString("host"); }
set { keyValues["host"] = value; }
}
[Category("Connection")]
[Description("Port to use when connecting with sockets")]
[DefaultValue(3306)]
public int Port
{
get { return GetInt("port"); }
set { keyValues["port"] = value; }
}
[Category("Connection")]
[Description("Protocol to use for connection to MySQL")]
[DefaultValue(ConnectionProtocol.Sockets)]
public ConnectionProtocol Protocol
{
get { return (ConnectionProtocol)keyValues["protocol"]; }
set { keyValues["protocol"] = value; }
}
[Category("Connection")]
[Description("Name of pipe to use when connecting with named pipes (Win32 only)")]
public string PipeName
{
get { return GetString("use pipe"); }
set { keyValues["use pipe"] = value; }
}
[Category("Connection")]
[Description("Should the connection ues compression")]
[DefaultValue(false)]
public bool UseCompression
{
get { return GetBool("compress"); }
set { keyValues["compress"] = value; }
}
[Category("Connection")]
[Description("Database to use initially")]
[Editor("ByteFX.Data.MySqlClient.Design.DatabaseTypeEditor,MySqlClient.Design", typeof(System.Drawing.Design.UITypeEditor))]
public string Database
{
get { return GetString("database"); }
set { keyValues["database"] = value; }
}
[Category("Connection")]
[Description("Number of seconds to wait for the connection to succeed")]
[DefaultValue(15)]
public int ConnectionTimeout
{
get { return GetInt("connect timeout"); }
set { keyValues["connect timeout"] = value; }
}
#endregion
#region Authentication Properties
[Category("Authentication")]
[Description("The username to connect as")]
public string UserId
{
get { return GetString("user id"); }
set { keyValues["user id"] = value; }
}
[Category("Authentication")]
[Description("The password to use for authentication")]
public string Password
{
get { return GetString("password"); }
set { keyValues["password"] = value; }
}
[Category("Authentication")]
[Description("Should the connection use SSL. This currently has no effect.")]
[DefaultValue(false)]
public bool UseSSL
{
get { return GetBool("use ssl"); }
set { keyValues["use ssl"] = value; }
}
[Category("Authentication")]
[Description("Show user password in connection string")]
[DefaultValue(false)]
public bool PersistSecurityInfo
{
get { return GetBool("persist security info"); }
set { keyValues["persist security info"] = value; }
}
#endregion
#region Pooling Properties
[Category("Pooling")]
[Description("Should the connection support pooling")]
[DefaultValue(true)]
public bool Pooling
{
get { return GetBool("pooling"); }
set { keyValues["pooling"] = value; }
}
[Category("Pooling")]
[Description("Minimum number of connections to have in this pool")]
[DefaultValue(0)]
public int MinPoolSize
{
get { return GetInt("min pool size"); }
set { keyValues["min pool size"] = value; }
}
[Category("Pooling")]
[Description("Maximum number of connections to have in this pool")]
[DefaultValue(100)]
public int MaxPoolSize
{
get { return GetInt("max pool size"); }
set { keyValues["max pool size"] = value; }
}
[Category("Pooling")]
[Description("Maximum number of seconds a connection should live. This is checked when a connection is returned to the pool.")]
[DefaultValue(0)]
public int ConnectionLifetime
{
get { return GetInt("connection lifetime"); }
set { keyValues["connection lifetime"] = value; }
}
#endregion
/// <summary>
/// Takes a given connection string and returns it, possible
/// stripping out the password info
/// </summary>
/// <returns></returns>
public string GetConnectionString()
{
if (connectString == null) return CreateConnectionString();
StringBuilder str = new StringBuilder();
Hashtable ht = ParseKeyValuePairs( connectString );
if (! PersistSecurityInfo)
ht.Remove("password");
foreach( string key in ht.Keys)
str.AppendFormat("{0}={1};", key, ht[key]);
if (str.Length > 0)
str.Remove( str.Length-1, 1 );
return str.ToString();
}
/// <summary>
/// Uses the values in the keyValues hash to create a
/// connection string
/// </summary>
/// <returns></returns>
public string CreateConnectionString()
{
string cStr = String.Empty;
Hashtable values = (Hashtable)keyValues.Clone();
Hashtable defaultValues = GetDefaultValues();
if (!PersistSecurityInfo && values.Contains("password") )
values.Remove( "password" );
// we always return the server key. It's not needed but
// seems weird for it not to be there.
cStr = "server=" + values["host"] + ";";
values.Remove("server");
foreach (string key in values.Keys)
{
if (!values[key].Equals( defaultValues[key]))
cStr += key + "=" + values[key] + ";";
}
return cStr;
}
protected override Hashtable GetDefaultValues()
{
defaults = base.GetDefaultValues();
if (defaults == null)
{
defaults = new Hashtable();
defaults["host"] = "localhost";
defaults["connect lifetime"] = 0;
defaults["user id"] = String.Empty;
defaults["password"] = String.Empty;
defaults["pooling"] = true;
defaults["min pool size"] = 0;
defaults["protocol"] = ConnectionProtocol.Sockets;
defaults["max pool size"] = 100;
defaults["connect timeout"] = 15;
defaults["port"] = 3306;
defaults["useSSL"] = false;
defaults["compress"] = false;
defaults["persist Security Info"] = false;
}
return (Hashtable)defaults.Clone();
}
protected override bool ConnectionParameterParsed(Hashtable hash, string key, string value)
{
switch (key.ToLower())
{
case "use compression":
case "compress":
hash["compress"] =
value.ToLower() == "yes" || value.ToLower() == "true";
return true;
case "protocol":
if (value == "socket" || value == "tcp")
hash["protocol"] = ConnectionProtocol.Sockets;
else if (value == "pipe")
hash["protocol"] = ConnectionProtocol.NamedPipe;
else if (value == "unix")
hash["protocol"] = ConnectionProtocol.UnixSocket;
return true;
case "use pipe":
case "pipe":
hash["use pipe"] = value;
return true;
}
if (! base.ConnectionParameterParsed(hash, key, value))
throw new ArgumentException("Keyword not supported: '" + key + "'");
return true;
}
}
}
File diff suppressed because it is too large. Load diff
+63 -53
View File
@@ -1,53 +1,63 @@
// ByteFX.Data data access components for .Net
// Copyright (C) 2002-2003 ByteFX, Inc.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
using System;
using System.Runtime.Serialization;
namespace ByteFX.Data.MySqlClient
{
/// <summary>
/// The exception that is thrown when MySQL returns an error. This class cannot be inherited.
/// </summary>
/// <include file='docs/MySqlException.xml' path='MyDocs/MyMembers[@name="Class"]/*'/>
[Serializable]
public sealed class MySqlException : SystemException
{
internal MySqlException(string msg) : base(msg)
{
}
internal MySqlException( string msg, Exception ex ) : base(msg, ex)
{
}
internal MySqlException()
{
}
internal MySqlException(string msg, int errno) : base(msg)
{
}
internal MySqlException(SerializationInfo info,
StreamingContext context) : base(info, context)
{
}
}
}
// ByteFX.Data data access components for .Net
// Copyright (C) 2002-2003 ByteFX, Inc.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
using System;
using System.Runtime.Serialization;
namespace ByteFX.Data.MySqlClient
{
/// <summary>
/// The exception that is thrown when MySQL returns an error. This class cannot be inherited.
/// </summary>
/// <include file='docs/MySqlException.xml' path='MyDocs/MyMembers[@name="Class"]/*'/>
[Serializable]
public sealed class MySqlException : SystemException
{
private int errorCode;
internal MySqlException(string msg) : base(msg)
{
}
internal MySqlException( string msg, Exception ex ) : base(msg, ex)
{
}
internal MySqlException()
{
}
internal MySqlException(string msg, int errno) : base(msg)
{
errorCode = errno;
}
internal MySqlException(SerializationInfo info,
StreamingContext context) : base(info, context)
{
}
/// <summary>
/// Gets a number that identifies the type of error.
/// </summary>
public int Number
{
get { return errorCode; }
}
}
}
+463 -397
View File
@@ -1,397 +1,463 @@
// ByteFX.Data data access components for .Net
// Copyright (C) 2002-2003 ByteFX, Inc.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
using System;
using System.Data;
using System.Data.SqlTypes;
using System.Globalization;
using System.Text;
namespace ByteFX.Data.MySqlClient
{
internal enum ColFlags : int
{
NOT_NULL = 1,
PRIMARY_KEY = 2,
UNIQUE_KEY = 4,
MULTIPLE_KEY = 8,
BLOB = 16,
UNSIGNED = 32,
ZERO_FILL = 64,
BINARY = 128,
ENUM = 256,
AUTO_INCREMENT = 512,
TIMESTAMP = 1024,
SET = 2048,
NUMBER = 32768
};
/// <summary>
/// Summary description for Field.
/// </summary>
internal class MySqlField : Common.Field
{
MySqlDbType colType;
public ColFlags colFlags;
public int colDecimals;
// System.Text.Encoding encoding;
private static NumberFormatInfo numberFormat = null;
public MySqlField()
{
// this.encoding = encoding;
if (numberFormat == null)
{
numberFormat = (NumberFormatInfo)NumberFormatInfo.InvariantInfo.Clone();
numberFormat.NumberDecimalSeparator = ".";
}
}
public void ReadSchemaInfo( Packet packet )
{
tableName = packet.ReadLenString();
colName = packet.ReadLenString();
colLen = (int)packet.ReadNBytes();
colType = (MySqlDbType)packet.ReadNBytes();
packet.ReadByte(); // this is apparently 2 -- not sure what it is for
colFlags = (ColFlags)packet.ReadInteger(2); //(short)(d.ReadByte() & 0xff);
colDecimals = packet.ReadByte();
}
public object GetValue()
{
return value;
}
public int NumericPrecision()
{
if (colType == MySqlDbType.Decimal)
return colLen;
return -1;
}
public int NumericScale()
{
if (colType == MySqlDbType.Decimal)
return colDecimals;
return -1;
}
public bool IsAutoIncrement()
{
return (colFlags & ColFlags.AUTO_INCREMENT) > 0;
}
public bool IsNumeric()
{
return (colFlags & ColFlags.NUMBER) > 0;
}
public bool AllowsNull()
{
return (colFlags & ColFlags.NOT_NULL) == 0;
}
public bool IsUnique()
{
return (colFlags & ColFlags.UNIQUE_KEY) > 0;
}
public bool IsPrimaryKey()
{
return (colFlags & ColFlags.PRIMARY_KEY) > 0;
}
public bool IsBlob()
{
return (colFlags & ColFlags.BLOB) > 0;
}
public bool IsBinary()
{
return (colFlags & ColFlags.BINARY) > 0;
}
public bool IsUnsigned()
{
return (colFlags & ColFlags.UNSIGNED) > 0;
}
public void SetValueData( Packet p, Encoding encoding )
{
int len = p.ReadLenInteger();
if (len == -1)
{
value = DBNull.Value;
return;
}
// read in the data
byte[] data = new byte[ len ];
p.Read( data, 0, len );
// if it is a blob and binary, then GetBytes is the way to go
if ( IsBlob() && IsBinary() )
{
dbType = DbType.Binary;
value = data;
return;
}
string sValue = encoding.GetString( data );//Chars(data, offset, count );
//string sValue = new string(_Chars);
switch(colType)
{
case MySqlDbType.Byte:
if (IsUnsigned())
value = Byte.Parse( sValue );
else
value = SByte.Parse( sValue );
break;
case MySqlDbType.Short:
if (IsUnsigned())
value = UInt16.Parse( sValue );
else
value = Int16.Parse( sValue );
break;
case MySqlDbType.Int :
case MySqlDbType.Int24:
if (IsUnsigned())
value = UInt32.Parse( sValue );
else
value = Int32.Parse( sValue );
break;
case MySqlDbType.BigInt:
if (IsUnsigned())
value = UInt64.Parse( sValue );
else
value = Int64.Parse( sValue );
break;
case MySqlDbType.Decimal:
value = Decimal.Parse( sValue , numberFormat );
break;
case MySqlDbType.Float:
value = Convert.ToSingle( sValue, numberFormat );
break;
case MySqlDbType.Double:
value = Convert.ToDouble( sValue, numberFormat );
break;
case MySqlDbType.Date:
ParseDateValue( "0000-00-00", "yyyy-MM-dd", sValue );
break;
case MySqlDbType.Datetime:
ParseDateValue( "0000-00-00 00:00:00", "yyyy-MM-dd HH:mm:ss", sValue );
break;
case MySqlDbType.Time:
if (sValue.Equals("00:00:00"))
value = DBNull.Value;
else
value = TimeSpan.Parse(sValue);
break;
case MySqlDbType.Timestamp:
string pattern;
string null_value = "00000000000000";
switch (ColumnLength)
{
case 2: pattern = "yy"; break;
case 4: pattern = "yyMM"; break;
case 6: pattern = "yyMMdd"; break;
case 8: pattern = "yyyyMMdd"; break;
case 10: pattern = "yyMMddHHmm"; break;
case 12: pattern = "yyMMddHHmmss"; break;
case 14:
default: pattern = "yyyyMMddHHmmss"; break;
}
if (ColumnLength > 2 && sValue.Equals( null_value.Substring(0, ColumnLength)))
value = DBNull.Value;
else
value = DateTime.ParseExact( sValue, pattern, new System.Globalization.DateTimeFormatInfo());
break;
case MySqlDbType.String:
case MySqlDbType.VarChar:
case MySqlDbType.Blob:
case MySqlDbType.TinyBlob:
case MySqlDbType.LongBlob:
case MySqlDbType.MediumBlob:
value = sValue;
break;
default:
throw new NotSupportedException();
}
}
protected void ParseDateValue( string nullpattern, string pattern, string data )
{
if ( data.Equals (nullpattern) )
value = DBNull.Value;
else
value = DateTime.ParseExact( data, pattern, new System.Globalization.DateTimeFormatInfo());
}
public string GetFieldTypeName()
{
switch (colType)
{
case MySqlDbType.Decimal: return "DECIMAL";
case MySqlDbType.Byte: return "TINY";
case MySqlDbType.Short: return "SHORT";
case MySqlDbType.Int: return "INTEGER";
case MySqlDbType.Float: return "FLOAT";
case MySqlDbType.Double: return "DOUBLE";
case MySqlDbType.Null: return "NULL";
case MySqlDbType.Timestamp: return "TIMESTAMP";
case MySqlDbType.BigInt: return "BIGINT";
case MySqlDbType.Int24: return "INT24";
case MySqlDbType.Date: return "DATE";
case MySqlDbType.Time: return "TIME";
case MySqlDbType.Datetime: return "DATETIME";
case MySqlDbType.Year: return "YEAR";
case MySqlDbType.Newdate: return "NEWDATE";
case MySqlDbType.Enum: return "ENUM";
case MySqlDbType.Set: return "SET";
case MySqlDbType.TinyBlob: return "TINY_BLOB";
case MySqlDbType.MediumBlob: return "MEDIUM_BLOB";
case MySqlDbType.LongBlob: return "LONG_BLOB";
case MySqlDbType.Blob: return "BLOB";
case MySqlDbType.VarChar: return "VAR_STRING";
case MySqlDbType.String: return "STRING";
}
return "Unknown typeid";
}
public Type GetFieldType()
{
switch (colType)
{
case MySqlDbType.Byte: return IsUnsigned() ? typeof(System.Byte) : typeof(System.SByte);
case MySqlDbType.Short: return IsUnsigned() ? typeof(System.UInt16) : typeof(System.Int16);
case MySqlDbType.Int:
case MySqlDbType.Int24: return IsUnsigned() ? typeof(System.UInt32) : typeof(System.Int32);
case MySqlDbType.BigInt: return IsUnsigned() ? typeof(System.UInt64) : typeof(System.Int64);
case MySqlDbType.Float: return typeof(System.Single);
case MySqlDbType.Double: return typeof(System.Double);
case MySqlDbType.Time: return typeof(System.TimeSpan);
case MySqlDbType.Date:
case MySqlDbType.Datetime:
case MySqlDbType.Timestamp: return typeof(System.DateTime);
case MySqlDbType.Decimal: return typeof(System.Decimal);
case MySqlDbType.VarChar:
case MySqlDbType.String: return typeof(System.String);
case MySqlDbType.TinyBlob:
case MySqlDbType.MediumBlob:
case MySqlDbType.LongBlob:
case MySqlDbType.Blob: return typeof(System.Array);
default:
case MySqlDbType.Null: return typeof(System.DBNull);
}
}
public MySqlDbType GetMySqlDbType()
{
return colType;
}
public DbType GetDbType()
{
switch (colType)
{
case MySqlDbType.Decimal: return DbType.Decimal;
case MySqlDbType.Byte: return DbType.Byte;
case MySqlDbType.Short:
if (IsUnsigned())
return DbType.UInt16;
else
return DbType.Int16;
case MySqlDbType.Int:
if (IsUnsigned())
return DbType.UInt32;
else
return DbType.Int32;
case MySqlDbType.Float: return DbType.Single;
case MySqlDbType.Double: return DbType.Double;
case MySqlDbType.Null: return DbType.Object;
case MySqlDbType.BigInt:
if (IsUnsigned())
return DbType.UInt64;
else
return DbType.Int64;
case MySqlDbType.Int24:
if (IsUnsigned())
return DbType.UInt32;
else
return DbType.Int32;
case MySqlDbType.Date:
case MySqlDbType.Year:
case MySqlDbType.Newdate:
return DbType.Date;
case MySqlDbType.Time:
return DbType.Time;
case MySqlDbType.Datetime:
case MySqlDbType.Timestamp:
return DbType.DateTime;
case MySqlDbType.Enum: return DbType.UInt32;
case MySqlDbType.Set: return DbType.Object;
case MySqlDbType.TinyBlob:
case MySqlDbType.MediumBlob:
case MySqlDbType.LongBlob:
case MySqlDbType.Blob:
if (IsBinary()) return DbType.Binary;
return DbType.String;
case MySqlDbType.VarChar:
return DbType.String;
case MySqlDbType.String:
return DbType.StringFixedLength;
}
throw new Exception("unknown MySqlDbType");
}
}
}
// ByteFX.Data data access components for .Net
// Copyright (C) 2002-2003 ByteFX, Inc.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
using System;
using System.Data;
using System.Data.SqlTypes;
using System.Globalization;
using System.Text;
using ByteFX.Data.Common;
namespace ByteFX.Data.MySqlClient
{
internal enum ColumnFlags : int
{
NOT_NULL = 1,
PRIMARY_KEY = 2,
UNIQUE_KEY = 4,
MULTIPLE_KEY = 8,
BLOB = 16,
UNSIGNED = 32,
ZERO_FILL = 64,
BINARY = 128,
ENUM = 256,
AUTO_INCREMENT = 512,
TIMESTAMP = 1024,
SET = 2048,
NUMBER = 32768
};
/// <summary>
/// Summary description for Field.
/// </summary>
internal class MySqlField : Common.Field
{
protected MySqlDbType colType;
protected ColumnFlags colFlags;
protected int colDecimals;
protected Encoding encoding;
private static NumberFormatInfo numberFormat = null;
protected byte[] buffer;
protected long bufIndex;
protected long bufLength;
public MySqlField(Encoding encoding)
{
this.encoding = encoding;
if (numberFormat == null)
{
numberFormat = (NumberFormatInfo)NumberFormatInfo.InvariantInfo.Clone();
numberFormat.NumberDecimalSeparator = ".";
}
}
public byte[] Buffer
{
get { return buffer; }
}
public long BufferIndex
{
get { return bufIndex; }
}
public long BufferLength
{
get { return bufLength; }
}
/// <summary>
/// CopyBuffer makes a copy of the byte buffer given to us while
/// the rowset was being read
/// </summary>
private void CopyBuffer()
{
byte[] newbuf = new byte[ bufLength ];
long oldIndex = bufIndex;
for (long i=0; i < bufLength; i++)
newbuf[i] = buffer[ oldIndex++ ];
bufIndex = 0;
buffer = newbuf;
value = newbuf;
}
/// <summary>
/// GetValue returns an object that represents the value of this field.
/// </summary>
/// <returns></returns>
public object GetValue()
{
// if our value is a byte buffer and we are using only
// a part of that buffer, then we need to make a copy
if (value is byte[] && (bufIndex > 0 || bufLength < buffer.Length))
CopyBuffer();
return value;
}
public MySqlDbType Type
{
get { return colType; }
set { colType = value; }
}
public int NumericPrecision
{
get
{
if (colType == MySqlDbType.Decimal)
return colLen;
return -1;
}
}
public int NumericScale
{
get
{
if (colType == MySqlDbType.Decimal)
return colDecimals;
return -1;
}
set
{
colDecimals = value;
}
}
public ColumnFlags Flags
{
get { return colFlags; }
set { colFlags = value; }
}
public bool IsAutoIncrement()
{
return (colFlags & ColumnFlags.AUTO_INCREMENT) > 0;
}
public bool IsNumeric()
{
return (colFlags & ColumnFlags.NUMBER) > 0;
}
public bool AllowsNull()
{
return (colFlags & ColumnFlags.NOT_NULL) == 0;
}
public bool IsUnique()
{
return (colFlags & ColumnFlags.UNIQUE_KEY) > 0;
}
public bool IsPrimaryKey()
{
return (colFlags & ColumnFlags.PRIMARY_KEY) > 0;
}
public bool IsBlob()
{
return (colFlags & ColumnFlags.BLOB) > 0;
}
public bool IsBinary()
{
return (colFlags & ColumnFlags.BINARY) > 0;
}
public bool IsUnsigned()
{
return (colFlags & ColumnFlags.UNSIGNED) > 0;
}
public void SetValueData( byte[] buf, long index, long len, DBVersion version )
{
if (len == -1)
{
value = DBNull.Value;
buffer = null;
return;
}
buffer = buf;
bufIndex = index;
bufLength = len;
// if it is a blob and binary, then GetBytes is the way to go
if ( IsBlob() && IsBinary() )
{
dbType = DbType.Binary;
value = buffer;
return;
}
string sValue = encoding.GetString( buf, (int)index, (int)len );
switch(colType)
{
case MySqlDbType.Byte:
if (IsUnsigned())
value = Byte.Parse( sValue );
else
value = SByte.Parse( sValue );
break;
case MySqlDbType.Short:
if (IsUnsigned())
value = UInt16.Parse( sValue );
else
value = Int16.Parse( sValue );
break;
case MySqlDbType.Int :
case MySqlDbType.Int24:
if (IsUnsigned())
value = UInt32.Parse( sValue );
else
value = Int32.Parse( sValue );
break;
case MySqlDbType.BigInt:
if (IsUnsigned())
value = UInt64.Parse( sValue );
else
value = Int64.Parse( sValue );
break;
case MySqlDbType.Decimal:
value = Decimal.Parse( sValue , numberFormat );
break;
case MySqlDbType.Float:
value = Convert.ToSingle( sValue, numberFormat );
break;
case MySqlDbType.Double:
value = Convert.ToDouble( sValue, numberFormat );
break;
case MySqlDbType.Year:
value = Int32.Parse( sValue );
break;
case MySqlDbType.Date:
ParseDateValue( "0000-00-00", "yyyy-MM-dd", sValue );
break;
case MySqlDbType.Datetime:
ParseDateValue( "0000-00-00 00:00:00", "yyyy-MM-dd HH:mm:ss", sValue );
break;
case MySqlDbType.Time:
if (sValue.Equals("00:00:00"))
value = DBNull.Value;
else
value = TimeSpan.Parse(sValue);
break;
case MySqlDbType.Timestamp:
// MySql 4.1.0 and later use DateTime format for timestamp
if (version.isAtLeast(4,1,0))
{
ParseDateValue( "0000-00-00 00:00:00", "yyyy-MM-dd HH:mm:ss", sValue );
return;
}
string pattern;
string null_value = "00000000000000";
switch (ColumnLength)
{
case 2: pattern = "yy"; break;
case 4: pattern = "yyMM"; break;
case 6: pattern = "yyMMdd"; break;
case 8: pattern = "yyyyMMdd"; break;
case 10: pattern = "yyMMddHHmm"; break;
case 12: pattern = "yyMMddHHmmss"; break;
case 14:
default: pattern = "yyyyMMddHHmmss"; break;
}
if (ColumnLength > 2 && sValue.Equals( null_value.Substring(0, ColumnLength)))
value = DBNull.Value;
else
value = DateTime.ParseExact( sValue, pattern, new System.Globalization.DateTimeFormatInfo());
break;
case MySqlDbType.String:
case MySqlDbType.VarChar:
case MySqlDbType.Blob:
case MySqlDbType.TinyBlob:
case MySqlDbType.LongBlob:
case MySqlDbType.MediumBlob:
value = sValue;
break;
default:
throw new NotSupportedException();
}
}
protected void ParseDateValue( string nullpattern, string pattern, string data )
{
if ( data.Equals (nullpattern) )
value = DBNull.Value;
else
value = DateTime.ParseExact( data, pattern, new System.Globalization.DateTimeFormatInfo());
}
public string GetFieldTypeName()
{
switch (colType)
{
case MySqlDbType.Decimal: return "DECIMAL";
case MySqlDbType.Byte: return "TINY";
case MySqlDbType.Short: return "SHORT";
case MySqlDbType.Int: return "INTEGER";
case MySqlDbType.Float: return "FLOAT";
case MySqlDbType.Double: return "DOUBLE";
case MySqlDbType.Null: return "NULL";
case MySqlDbType.Timestamp: return "TIMESTAMP";
case MySqlDbType.BigInt: return "BIGINT";
case MySqlDbType.Int24: return "INT24";
case MySqlDbType.Date: return "DATE";
case MySqlDbType.Time: return "TIME";
case MySqlDbType.Datetime: return "DATETIME";
case MySqlDbType.Year: return "YEAR";
case MySqlDbType.Newdate: return "NEWDATE";
case MySqlDbType.Enum: return "ENUM";
case MySqlDbType.Set: return "SET";
case MySqlDbType.TinyBlob: return "TINY_BLOB";
case MySqlDbType.MediumBlob: return "MEDIUM_BLOB";
case MySqlDbType.LongBlob: return "LONG_BLOB";
case MySqlDbType.Blob: return "BLOB";
case MySqlDbType.VarChar: return "VAR_STRING";
case MySqlDbType.String: return "STRING";
}
return "Unknown typeid";
}
public Type GetFieldType()
{
switch (colType)
{
case MySqlDbType.Byte: return IsUnsigned() ? typeof(System.Byte) : typeof(System.SByte);
case MySqlDbType.Short: return IsUnsigned() ? typeof(System.UInt16) : typeof(System.Int16);
case MySqlDbType.Int:
case MySqlDbType.Int24: return IsUnsigned() ? typeof(System.UInt32) : typeof(System.Int32);
case MySqlDbType.BigInt: return IsUnsigned() ? typeof(System.UInt64) : typeof(System.Int64);
case MySqlDbType.Float: return typeof(System.Single);
case MySqlDbType.Double: return typeof(System.Double);
case MySqlDbType.Time: return typeof(System.TimeSpan);
case MySqlDbType.Date:
case MySqlDbType.Datetime:
case MySqlDbType.Timestamp: return typeof(System.DateTime);
case MySqlDbType.Decimal: return typeof(System.Decimal);
case MySqlDbType.VarChar:
case MySqlDbType.String: return typeof(System.String);
case MySqlDbType.TinyBlob:
case MySqlDbType.MediumBlob:
case MySqlDbType.LongBlob:
case MySqlDbType.Blob:
if ((colFlags & ColumnFlags.BINARY) != 0)
return typeof(System.Array);
else
return typeof(System.String);
case MySqlDbType.Year:
return typeof(System.Int32);
default:
case MySqlDbType.Null: return typeof(System.DBNull);
}
}
public DbType GetDbType()
{
switch (colType)
{
case MySqlDbType.Decimal: return DbType.Decimal;
case MySqlDbType.Byte: return DbType.Byte;
case MySqlDbType.Short:
if (IsUnsigned())
return DbType.UInt16;
else
return DbType.Int16;
case MySqlDbType.Int:
if (IsUnsigned())
return DbType.UInt32;
else
return DbType.Int32;
case MySqlDbType.Float: return DbType.Single;
case MySqlDbType.Double: return DbType.Double;
case MySqlDbType.Null: return DbType.Object;
case MySqlDbType.BigInt:
if (IsUnsigned())
return DbType.UInt64;
else
return DbType.Int64;
case MySqlDbType.Int24:
if (IsUnsigned())
return DbType.UInt32;
else
return DbType.Int32;
case MySqlDbType.Date:
case MySqlDbType.Year:
case MySqlDbType.Newdate:
return DbType.Date;
case MySqlDbType.Time:
return DbType.Time;
case MySqlDbType.Datetime:
case MySqlDbType.Timestamp:
return DbType.DateTime;
case MySqlDbType.Enum: return DbType.UInt32;
case MySqlDbType.Set: return DbType.Object;
case MySqlDbType.TinyBlob:
case MySqlDbType.MediumBlob:
case MySqlDbType.LongBlob:
case MySqlDbType.Blob:
if (IsBinary()) return DbType.Binary;
return DbType.String;
case MySqlDbType.VarChar:
return DbType.String;
case MySqlDbType.String:
return DbType.StringFixedLength;
}
throw new Exception("unknown MySqlDbType");
}
}
}
@@ -0,0 +1,250 @@
using System;
namespace ByteFX.Data.MySqlClient
{
public class MySqlError
{
/* ER_HASHCHK=1000,
ER_NISAMCHK=1001,
ER_NO=1002,
ER_YES 1003
ER_CANT_CREATE_FILE 1004
ER_CANT_CREATE_TABLE 1005
ER_CANT_CREATE_DB 1006
ER_DB_CREATE_EXISTS 1007
ER_DB_DROP_EXISTS 1008
ER_DB_DROP_DELETE 1009
ER_DB_DROP_RMDIR 1010
ER_CANT_DELETE_FILE 1011
ER_CANT_FIND_SYSTEM_REC 1012
ER_CANT_GET_STAT 1013
ER_CANT_GET_WD 1014
ER_CANT_LOCK 1015
ER_CANT_OPEN_FILE 1016
ER_FILE_NOT_FOUND 1017
ER_CANT_READ_DIR 1018
ER_CANT_SET_WD 1019
ER_CHECKREAD 1020
ER_DISK_FULL 1021
*/
public static int DuplicateKey = 1022;
/* ER_ERROR_ON_CLOSE 1023
ER_ERROR_ON_READ 1024
ER_ERROR_ON_RENAME 1025
ER_ERROR_ON_WRITE 1026
ER_FILE_USED 1027
ER_FILSORT_ABORT 1028
ER_FORM_NOT_FOUND 1029
ER_GET_ERRNO 1030
ER_ILLEGAL_HA 1031*/
public static int KeyNotFound = 1032;
/* ER_NOT_FORM_FILE 1033
ER_NOT_KEYFILE 1034
ER_OLD_KEYFILE 1035
ER_OPEN_AS_READONLY 1036
ER_OUTOFMEMORY 1037
ER_OUT_OF_SORTMEMORY 1038
ER_UNEXPECTED_EOF 1039
ER_CON_COUNT_ERROR 1040
ER_OUT_OF_RESOURCES 1041
ER_BAD_HOST_ERROR 1042
ER_HANDSHAKE_ERROR 1043
ER_DBACCESS_DENIED_ERROR 1044
ER_ACCESS_DENIED_ERROR 1045
ER_NO_DB_ERROR 1046
ER_UNKNOWN_COM_ERROR 1047
ER_BAD_NULL_ERROR 1048
ER_BAD_DB_ERROR 1049
ER_TABLE_EXISTS_ERROR 1050
ER_BAD_TABLE_ERROR 1051
ER_NON_UNIQ_ERROR 1052
ER_SERVER_SHUTDOWN 1053
ER_BAD_FIELD_ERROR 1054
ER_WRONG_FIELD_WITH_GROUP 1055
ER_WRONG_GROUP_FIELD 1056
ER_WRONG_SUM_SELECT 1057
ER_WRONG_VALUE_COUNT 1058
ER_TOO_LONG_IDENT 1059
ER_DUP_FIELDNAME 1060*/
public static int DuplicateKeyName = 1061;
public static int DuplicateKeyEntry = 1062;
/* ER_WRONG_FIELD_SPEC 1063
ER_PARSE_ERROR 1064
ER_EMPTY_QUERY 1065
ER_NONUNIQ_TABLE 1066
ER_INVALID_DEFAULT 1067
ER_MULTIPLE_PRI_KEY 1068
ER_TOO_MANY_KEYS 1069
ER_TOO_MANY_KEY_PARTS 1070
ER_TOO_LONG_KEY 1071
ER_KEY_COLUMN_DOES_NOT_EXITS 1072
ER_BLOB_USED_AS_KEY 1073
ER_TOO_BIG_FIELDLENGTH 1074
ER_WRONG_AUTO_KEY 1075
ER_READY 1076
ER_NORMAL_SHUTDOWN 1077
ER_GOT_SIGNAL 1078
ER_SHUTDOWN_COMPLETE 1079
ER_FORCING_CLOSE 1080
ER_IPSOCK_ERROR 1081
ER_NO_SUCH_INDEX 1082
ER_WRONG_FIELD_TERMINATORS 1083
ER_BLOBS_AND_NO_TERMINATED 1084
ER_TEXTFILE_NOT_READABLE 1085
ER_FILE_EXISTS_ERROR 1086
ER_LOAD_INFO 1087
ER_ALTER_INFO 1088
ER_WRONG_SUB_KEY 1089
ER_CANT_REMOVE_ALL_FIELDS 1090
ER_CANT_DROP_FIELD_OR_KEY 1091
ER_INSERT_INFO 1092
ER_INSERT_TABLE_USED 1093
ER_NO_SUCH_THREAD 1094
ER_KILL_DENIED_ERROR 1095
ER_NO_TABLES_USED 1096
ER_TOO_BIG_SET 1097
ER_NO_UNIQUE_LOGFILE 1098
ER_TABLE_NOT_LOCKED_FOR_WRITE 1099
ER_TABLE_NOT_LOCKED 1100
ER_BLOB_CANT_HAVE_DEFAULT 1101
ER_WRONG_DB_NAME 1102
ER_WRONG_TABLE_NAME 1103
ER_TOO_BIG_SELECT 1104
ER_UNKNOWN_ERROR 1105
ER_UNKNOWN_PROCEDURE 1106
ER_WRONG_PARAMCOUNT_TO_PROCEDURE 1107
ER_WRONG_PARAMETERS_TO_PROCEDURE 1108
ER_UNKNOWN_TABLE 1109
ER_FIELD_SPECIFIED_TWICE 1110
ER_INVALID_GROUP_FUNC_USE 1111
ER_UNSUPPORTED_EXTENSION 1112
ER_TABLE_MUST_HAVE_COLUMNS 1113
ER_RECORD_FILE_FULL 1114
ER_UNKNOWN_CHARACTER_SET 1115
ER_TOO_MANY_TABLES 1116
ER_TOO_MANY_FIELDS 1117
ER_TOO_BIG_ROWSIZE 1118
ER_STACK_OVERRUN 1119
ER_WRONG_OUTER_JOIN 1120
ER_NULL_COLUMN_IN_INDEX 1121
ER_CANT_FIND_UDF 1122
ER_CANT_INITIALIZE_UDF 1123
ER_UDF_NO_PATHS 1124
ER_UDF_EXISTS 1125
ER_CANT_OPEN_LIBRARY 1126
ER_CANT_FIND_DL_ENTRY 1127
ER_FUNCTION_NOT_DEFINED 1128
ER_HOST_IS_BLOCKED 1129
*/
public static int HostNotPrivileged = 1130;
public static int AnonymousUser = 1131;
public static int PasswordNotAllowed = 1132;
public static int PasswordNoMatch = 1133;
/* ER_UPDATE_INFO 1134
ER_CANT_CREATE_THREAD 1135
ER_WRONG_VALUE_COUNT_ON_ROW 1136
ER_CANT_REOPEN_TABLE 1137
ER_INVALID_USE_OF_NULL 1138
ER_REGEXP_ERROR 1139
ER_MIX_OF_GROUP_FUNC_AND_FIELDS 1140
ER_NONEXISTING_GRANT 1141
ER_TABLEACCESS_DENIED_ERROR 1142
ER_COLUMNACCESS_DENIED_ERROR 1143
ER_ILLEGAL_GRANT_FOR_TABLE 1144
ER_GRANT_WRONG_HOST_OR_USER 1145
ER_NO_SUCH_TABLE 1146
ER_NONEXISTING_TABLE_GRANT 1147
ER_NOT_ALLOWED_COMMAND 1148
ER_SYNTAX_ERROR 1149
ER_DELAYED_CANT_CHANGE_LOCK 1150
ER_TOO_MANY_DELAYED_THREADS 1151
ER_ABORTING_CONNECTION 1152
ER_NET_PACKET_TOO_LARGE 1153
ER_NET_READ_ERROR_FROM_PIPE 1154
ER_NET_FCNTL_ERROR 1155
ER_NET_PACKETS_OUT_OF_ORDER 1156
ER_NET_UNCOMPRESS_ERROR 1157
ER_NET_READ_ERROR 1158
ER_NET_READ_INTERRUPTED 1159
ER_NET_ERROR_ON_WRITE 1160
ER_NET_WRITE_INTERRUPTED 1161
ER_TOO_LONG_STRING 1162
ER_TABLE_CANT_HANDLE_BLOB 1163
ER_TABLE_CANT_HANDLE_AUTO_INCREMENT 1164
ER_DELAYED_INSERT_TABLE_LOCKED 1165
ER_WRONG_COLUMN_NAME 1166
ER_WRONG_KEY_COLUMN 1167
ER_WRONG_MRG_TABLE 1168
ER_DUP_UNIQUE 1169
ER_BLOB_KEY_WITHOUT_LENGTH 1170
ER_PRIMARY_CANT_HAVE_NULL 1171
ER_TOO_MANY_ROWS 1172
ER_REQUIRES_PRIMARY_KEY 1173
ER_NO_RAID_COMPILED 1174
ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE 1175
ER_KEY_DOES_NOT_EXITS 1176
ER_CHECK_NO_SUCH_TABLE 1177
ER_CHECK_NOT_IMPLEMENTED 1178
ER_CANT_DO_THIS_DURING_AN_TRANSACTION 1179
ER_ERROR_DURING_COMMIT 1180
ER_ERROR_DURING_ROLLBACK 1181
ER_ERROR_DURING_FLUSH_LOGS 1182
ER_ERROR_DURING_CHECKPOINT 1183
ER_NEW_ABORTING_CONNECTION 1184
ER_DUMP_NOT_IMPLEMENTED 1185
ER_FLUSH_MASTER_BINLOG_CLOSED 1186
ER_INDEX_REBUILD 1187
ER_MASTER 1188
ER_MASTER_NET_READ 1189
ER_MASTER_NET_WRITE 1190
ER_FT_MATCHING_KEY_NOT_FOUND 1191
ER_LOCK_OR_ACTIVE_TRANSACTION 1192
ER_UNKNOWN_SYSTEM_VARIABLE 1193
ER_CRASHED_ON_USAGE 1194
ER_CRASHED_ON_REPAIR 1195
ER_WARNING_NOT_COMPLETE_ROLLBACK 1196
ER_TRANS_CACHE_FULL 1197
ER_SLAVE_MUST_STOP 1198
ER_SLAVE_NOT_RUNNING 1199
ER_BAD_SLAVE 1200
ER_MASTER_INFO 1201
ER_SLAVE_THREAD 1202
ER_TOO_MANY_USER_CONNECTIONS 1203
ER_SET_CONSTANTS_ONLY 1204
ER_LOCK_WAIT_TIMEOUT 1205
ER_LOCK_TABLE_FULL 1206
ER_READ_ONLY_TRANSACTION 1207
ER_DROP_DB_WITH_READ_LOCK 1208
ER_CREATE_DB_WITH_READ_LOCK 1209
ER_WRONG_ARGUMENTS 1210
ER_NO_PERMISSION_TO_CREATE_USER 1211
ER_UNION_TABLES_IN_DIFFERENT_DIR 1212
ER_LOCK_DEADLOCK 1213
ER_TABLE_CANT_HANDLE_FULLTEXT 1214
ER_CANNOT_ADD_FOREIGN 1215
ER_NO_REFERENCED_ROW 1216
ER_ROW_IS_REFERENCED 1217
ER_CONNECT_TO_MASTER 1218
ER_QUERY_ON_MASTER 1219
ER_ERROR_WHEN_EXECUTING_COMMAND 1220
ER_WRONG_USAGE 1221
ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT 1222
ER_CANT_UPDATE_WITH_READLOCK 1223
ER_MIXING_NOT_ALLOWED 1224
ER_DUP_ARGUMENT 1225
ER_USER_LIMIT_REACHED 1226
ER_SPECIFIC_ACCESS_DENIED_ERROR 1227
ER_LOCAL_VARIABLE 1228
ER_GLOBAL_VARIABLE 1229
ER_NO_DEFAULT 1230
ER_WRONG_VALUE_FOR_VAR 1231
ER_WRONG_TYPE_FOR_VAR 1232
ER_VAR_CANT_BE_READ 1233
ER_CANT_USE_OPTION_HERE 1234
ER_NOT_SUPPORTED_YET 1235
ER_MASTER_FATAL_ERROR_READING_BINLOG 1236
ER_SLAVE_IGNORED_TABLE 1237 // only the slave SQL thread can be sent this
ER_ERROR_MESSAGES 238*/
};
}
+343 -343
View File
@@ -1,343 +1,343 @@
using System;
using System.Data;
using ByteFX.Data.MySqlClient;
namespace ByteFX.Data.MySqlClient
{
/// <summary>
/// Helper class that makes it easier to work with the provider.
/// </summary>
public sealed class MySqlHelper
{
// this class provides only static methods
private MySqlHelper()
{
}
#region ExecuteNonQuery
/// <summary>
/// Executes a single command against a MySQL database. The <see cref="MySqlConnection"/> is assumed to be
/// open when the method is called and remains open after the method completes.
/// </summary>
/// <param name="connection"><see cref="MySqlConnection"/> object to use</param>
/// <param name="commandText">SQL command to be executed</param>
/// <param name="commandParameters">Array of <see cref="MySqlParameter"/> objects to use with the command.</param>
/// <returns></returns>
public static int ExecuteNonQuery( MySqlConnection connection, string commandText, params MySqlParameter[] commandParameters )
{
//create a command and prepare it for execution
MySqlCommand cmd = new MySqlCommand();
cmd.Connection = connection;
cmd.CommandText = commandText;
cmd.CommandType = CommandType.Text;
if (commandParameters != null)
foreach (MySqlParameter p in commandParameters)
cmd.Parameters.Add( p );
int result = cmd.ExecuteNonQuery();
cmd.Parameters.Clear();
return result;
}
/// <summary>
/// Executes a single command against a MySQL database. A new <see cref="MySqlConnection"/> is created
/// using the <see cref="MySqlConnection.ConnectionString"/> given.
/// </summary>
/// <param name="connectionString"><see cref="MySqlConnection.ConnectionString"/> to use</param>
/// <param name="commandText">SQL command to be executed</param>
/// <param name="parms">Array of <see cref="MySqlParameter"/> objects to use with the command.</param>
/// <returns></returns>
public static int ExecuteNonQuery( string connectionString, string commandText, params MySqlParameter[] parms )
{
//create & open a SqlConnection, and dispose of it after we are done.
using (MySqlConnection cn = new MySqlConnection(connectionString))
{
cn.Open();
//call the overload that takes a connection in place of the connection string
return ExecuteNonQuery(cn, commandText, parms );
}
}
#endregion
#region ExecuteDataSet
/// <summary>
/// Executes a single SQL command and returns the first row of the resultset. A new MySqlConnection object
/// is created, opened, and closed during this method.
/// </summary>
/// <param name="connectionString">Settings to be used for the connection</param>
/// <param name="commandText">Command to execute</param>
/// <param name="parms">Parameters to use for the command</param>
/// <returns>DataRow containing the first row of the resultset</returns>
public static DataRow ExecuteDatarow( string connectionString, string commandText, params MySqlParameter[] parms )
{
DataSet ds = ExecuteDataset( connectionString, commandText, parms );
if (ds == null) return null;
if (ds.Tables.Count == 0) return null;
if (ds.Tables[0].Rows.Count == 0) return null;
return ds.Tables[0].Rows[0];
}
/// <summary>
/// Executes a single SQL command and returns the resultset in a <see cref="DataSet"/>.
/// A new MySqlConnection object is created, opened, and closed during this method.
/// </summary>
/// <param name="connectionString">Settings to be used for the connection</param>
/// <param name="commandText">Command to execute</param>
/// <returns><see cref="DataSet"/> containing the resultset</returns>
public static DataSet ExecuteDataset(string connectionString, string commandText)
{
//pass through the call providing null for the set of SqlParameters
return ExecuteDataset(connectionString, commandText, (MySqlParameter[])null);
}
/// <summary>
/// Executes a single SQL command and returns the resultset in a <see cref="DataSet"/>.
/// A new MySqlConnection object is created, opened, and closed during this method.
/// </summary>
/// <param name="connectionString">Settings to be used for the connection</param>
/// <param name="commandText">Command to execute</param>
/// <param name="commandParameters">Parameters to use for the command</param>
/// <returns><see cref="DataSet"/> containing the resultset</returns>
public static DataSet ExecuteDataset(string connectionString, string commandText, params MySqlParameter[] commandParameters)
{
//create & open a SqlConnection, and dispose of it after we are done.
using (MySqlConnection cn = new MySqlConnection(connectionString))
{
cn.Open();
//call the overload that takes a connection in place of the connection string
return ExecuteDataset(cn, commandText, commandParameters);
}
}
/// <summary>
/// Executes a single SQL command and returns the resultset in a <see cref="DataSet"/>.
/// The state of the <see cref="MySqlConnection"/> object remains unchanged after execution
/// of this method.
/// </summary>
/// <param name="connection"><see cref="MySqlConnection"/> object to use</param>
/// <param name="commandText">Command to execute</param>
/// <returns><see cref="DataSet"/> containing the resultset</returns>
public static DataSet ExecuteDataset(MySqlConnection connection, string commandText)
{
//pass through the call providing null for the set of SqlParameters
return ExecuteDataset(connection, commandText, (MySqlParameter[])null);
}
/// <summary>
/// Executes a single SQL command and returns the resultset in a <see cref="DataSet"/>.
/// The state of the <see cref="MySqlConnection"/> object remains unchanged after execution
/// of this method.
/// </summary>
/// <param name="connection"><see cref="MySqlConnection"/> object to use</param>
/// <param name="commandText">Command to execute</param>
/// <param name="commandParameters">Parameters to use for the command</param>
/// <returns><see cref="DataSet"/> containing the resultset</returns>
public static DataSet ExecuteDataset(MySqlConnection connection, string commandText, params MySqlParameter[] commandParameters)
{
//create a command and prepare it for execution
MySqlCommand cmd = new MySqlCommand();
cmd.Connection = connection;
cmd.CommandText = commandText;
cmd.CommandType = CommandType.Text;
if (commandParameters != null)
foreach (MySqlParameter p in commandParameters)
cmd.Parameters.Add( p );
//create the DataAdapter & DataSet
MySqlDataAdapter da = new MySqlDataAdapter(cmd);
DataSet ds = new DataSet();
//fill the DataSet using default values for DataTable names, etc.
da.Fill(ds);
// detach the MySqlParameters from the command object, so they can be used again.
cmd.Parameters.Clear();
//return the dataset
return ds;
}
/// <summary>
/// Updates the given table with data from the given <see cref="DataSet"/>
/// </summary>
/// <param name="connectionString">Settings to use for the update</param>
/// <param name="commandText">Command text to use for the update</param>
/// <param name="ds"><see cref="DataSet"/> containing the new data to use in the update</param>
/// <param name="tablename">Tablename in the dataset to update</param>
public static void UpdateDataSet( string connectionString, string commandText, DataSet ds, string tablename )
{
MySqlConnection cn = new MySqlConnection( connectionString );
cn.Open();
MySqlDataAdapter da = new MySqlDataAdapter( commandText, cn );
MySqlCommandBuilder cb = new MySqlCommandBuilder( da );
da.Update( ds, tablename );
cn.Close();
}
#endregion
#region ExecuteDataReader
/// <summary>
/// Executes a single command against a MySQL database, possibly inside an existing transaction.
/// </summary>
/// <param name="connection"><see cref="MySqlConnection"/> object to use for the command</param>
/// <param name="transaction"><see cref="MySqlTransaction"/> object to use for the command</param>
/// <param name="commandText">Command text to use</param>
/// <param name="commandParameters">Array of <see cref="MySqlParameter"/> objects to use with the command</param>
/// <param name="ExternalConn">True if the connection should be preserved, false if not</param>
/// <returns><see cref="MySqlDataReader"/> object ready to read the results of the command</returns>
private static MySqlDataReader ExecuteReader(MySqlConnection connection, MySqlTransaction transaction, string commandText, MySqlParameter[] commandParameters, bool ExternalConn )
{
//create a command and prepare it for execution
MySqlCommand cmd = new MySqlCommand();
cmd.Connection = connection;
cmd.Transaction = transaction;
cmd.CommandText = commandText;
cmd.CommandType = CommandType.Text;
if (commandParameters != null)
foreach (MySqlParameter p in commandParameters)
cmd.Parameters.Add( p );
//create a reader
MySqlDataReader dr;
// call ExecuteReader with the appropriate CommandBehavior
if (ExternalConn)
{
dr = cmd.ExecuteReader();
}
else
{
dr = cmd.ExecuteReader(CommandBehavior.CloseConnection);
}
// detach the SqlParameters from the command object, so they can be used again.
cmd.Parameters.Clear();
return dr;
}
/// <summary>
/// Executes a single command against a MySQL database.
/// </summary>
/// <param name="connectionString">Settings to use for this command</param>
/// <param name="commandText">Command text to use</param>
/// <returns><see cref="MySqlDataReader"/> object ready to read the results of the command</returns>
public static MySqlDataReader ExecuteReader(string connectionString, string commandText)
{
//pass through the call providing null for the set of SqlParameters
return ExecuteReader(connectionString, commandText, (MySqlParameter[])null);
}
/// <summary>
/// Executes a single command against a MySQL database.
/// </summary>
/// <param name="connectionString">Settings to use for this command</param>
/// <param name="commandText">Command text to use</param>
/// <param name="commandParameters">Array of <see cref="MySqlParameter"/> objects to use with the command</param>
/// <returns><see cref="MySqlDataReader"/> object ready to read the results of the command</returns>
public static MySqlDataReader ExecuteReader(string connectionString, string commandText, params MySqlParameter[] commandParameters)
{
//create & open a SqlConnection
MySqlConnection cn = new MySqlConnection(connectionString);
cn.Open();
try
{
//call the private overload that takes an internally owned connection in place of the connection string
return ExecuteReader(cn, null, commandText, commandParameters, false );
}
catch
{
//if we fail to return the SqlDatReader, we need to close the connection ourselves
cn.Close();
throw;
}
}
#endregion
#region ExecuteScalar
/// <summary>
/// Execute a single command against a MySQL database.
/// </summary>
/// <param name="connectionString">Settings to use for the update</param>
/// <param name="commandText">Command text to use for the update</param>
/// <returns>The first column of the first row in the result set, or a null reference if the result set is empty.</returns>
public static object ExecuteScalar(string connectionString, string commandText)
{
//pass through the call providing null for the set of MySqlParameters
return ExecuteScalar(connectionString, commandText, (MySqlParameter[])null);
}
/// <summary>
/// Execute a single command against a MySQL database.
/// </summary>
/// <param name="connectionString">Settings to use for the command</param>
/// <param name="commandText">Command text to use for the command</param>
/// <param name="commandParameters">Parameters to use for the command</param>
/// <returns>The first column of the first row in the result set, or a null reference if the result set is empty.</returns>
public static object ExecuteScalar(string connectionString, string commandText, params MySqlParameter[] commandParameters)
{
//create & open a SqlConnection, and dispose of it after we are done.
using (MySqlConnection cn = new MySqlConnection(connectionString))
{
cn.Open();
//call the overload that takes a connection in place of the connection string
return ExecuteScalar(cn, commandText, commandParameters);
}
}
/// <summary>
/// Execute a single command against a MySQL database.
/// </summary>
/// <param name="connection"><see cref="MySqlConnection"/> object to use</param>
/// <param name="commandText">Command text to use for the command</param>
/// <returns>The first column of the first row in the result set, or a null reference if the result set is empty.</returns>
public static object ExecuteScalar(MySqlConnection connection, string commandText)
{
//pass through the call providing null for the set of MySqlParameters
return ExecuteScalar(connection, commandText, (MySqlParameter[])null);
}
/// <summary>
/// Execute a single command against a MySQL database.
/// </summary>
/// <param name="connection"><see cref="MySqlConnection"/> object to use</param>
/// <param name="commandText">Command text to use for the command</param>
/// <param name="commandParameters">Parameters to use for the command</param>
/// <returns>The first column of the first row in the result set, or a null reference if the result set is empty.</returns>
public static object ExecuteScalar(MySqlConnection connection, string commandText, params MySqlParameter[] commandParameters)
{
//create a command and prepare it for execution
MySqlCommand cmd = new MySqlCommand();
cmd.Connection = connection;
cmd.CommandText = commandText;
cmd.CommandType = CommandType.Text;
if (commandParameters != null)
foreach (MySqlParameter p in commandParameters)
cmd.Parameters.Add( p );
//execute the command & return the results
object retval = cmd.ExecuteScalar();
// detach the SqlParameters from the command object, so they can be used again.
cmd.Parameters.Clear();
return retval;
}
#endregion
}
}
using System;
using System.Data;
using ByteFX.Data.MySqlClient;
namespace ByteFX.Data.MySqlClient
{
/// <summary>
/// Helper class that makes it easier to work with the provider.
/// </summary>
public sealed class MySqlHelper
{
// this class provides only static methods
private MySqlHelper()
{
}
#region ExecuteNonQuery
/// <summary>
/// Executes a single command against a MySQL database. The <see cref="MySqlConnection"/> is assumed to be
/// open when the method is called and remains open after the method completes.
/// </summary>
/// <param name="connection"><see cref="MySqlConnection"/> object to use</param>
/// <param name="commandText">SQL command to be executed</param>
/// <param name="commandParameters">Array of <see cref="MySqlParameter"/> objects to use with the command.</param>
/// <returns></returns>
public static int ExecuteNonQuery( MySqlConnection connection, string commandText, params MySqlParameter[] commandParameters )
{
//create a command and prepare it for execution
MySqlCommand cmd = new MySqlCommand();
cmd.Connection = connection;
cmd.CommandText = commandText;
cmd.CommandType = CommandType.Text;
if (commandParameters != null)
foreach (MySqlParameter p in commandParameters)
cmd.Parameters.Add( p );
int result = cmd.ExecuteNonQuery();
cmd.Parameters.Clear();
return result;
}
/// <summary>
/// Executes a single command against a MySQL database. A new <see cref="MySqlConnection"/> is created
/// using the <see cref="MySqlConnection.ConnectionString"/> given.
/// </summary>
/// <param name="connectionString"><see cref="MySqlConnection.ConnectionString"/> to use</param>
/// <param name="commandText">SQL command to be executed</param>
/// <param name="parms">Array of <see cref="MySqlParameter"/> objects to use with the command.</param>
/// <returns></returns>
public static int ExecuteNonQuery( string connectionString, string commandText, params MySqlParameter[] parms )
{
//create & open a SqlConnection, and dispose of it after we are done.
using (MySqlConnection cn = new MySqlConnection(connectionString))
{
cn.Open();
//call the overload that takes a connection in place of the connection string
return ExecuteNonQuery(cn, commandText, parms );
}
}
#endregion
#region ExecuteDataSet
/// <summary>
/// Executes a single SQL command and returns the first row of the resultset. A new MySqlConnection object
/// is created, opened, and closed during this method.
/// </summary>
/// <param name="connectionString">Settings to be used for the connection</param>
/// <param name="commandText">Command to execute</param>
/// <param name="parms">Parameters to use for the command</param>
/// <returns>DataRow containing the first row of the resultset</returns>
public static DataRow ExecuteDatarow( string connectionString, string commandText, params MySqlParameter[] parms )
{
DataSet ds = ExecuteDataset( connectionString, commandText, parms );
if (ds == null) return null;
if (ds.Tables.Count == 0) return null;
if (ds.Tables[0].Rows.Count == 0) return null;
return ds.Tables[0].Rows[0];
}
/// <summary>
/// Executes a single SQL command and returns the resultset in a <see cref="DataSet"/>.
/// A new MySqlConnection object is created, opened, and closed during this method.
/// </summary>
/// <param name="connectionString">Settings to be used for the connection</param>
/// <param name="commandText">Command to execute</param>
/// <returns><see cref="DataSet"/> containing the resultset</returns>
public static DataSet ExecuteDataset(string connectionString, string commandText)
{
//pass through the call providing null for the set of SqlParameters
return ExecuteDataset(connectionString, commandText, (MySqlParameter[])null);
}
/// <summary>
/// Executes a single SQL command and returns the resultset in a <see cref="DataSet"/>.
/// A new MySqlConnection object is created, opened, and closed during this method.
/// </summary>
/// <param name="connectionString">Settings to be used for the connection</param>
/// <param name="commandText">Command to execute</param>
/// <param name="commandParameters">Parameters to use for the command</param>
/// <returns><see cref="DataSet"/> containing the resultset</returns>
public static DataSet ExecuteDataset(string connectionString, string commandText, params MySqlParameter[] commandParameters)
{
//create & open a SqlConnection, and dispose of it after we are done.
using (MySqlConnection cn = new MySqlConnection(connectionString))
{
cn.Open();
//call the overload that takes a connection in place of the connection string
return ExecuteDataset(cn, commandText, commandParameters);
}
}
/// <summary>
/// Executes a single SQL command and returns the resultset in a <see cref="DataSet"/>.
/// The state of the <see cref="MySqlConnection"/> object remains unchanged after execution
/// of this method.
/// </summary>
/// <param name="connection"><see cref="MySqlConnection"/> object to use</param>
/// <param name="commandText">Command to execute</param>
/// <returns><see cref="DataSet"/> containing the resultset</returns>
public static DataSet ExecuteDataset(MySqlConnection connection, string commandText)
{
//pass through the call providing null for the set of SqlParameters
return ExecuteDataset(connection, commandText, (MySqlParameter[])null);
}
/// <summary>
/// Executes a single SQL command and returns the resultset in a <see cref="DataSet"/>.
/// The state of the <see cref="MySqlConnection"/> object remains unchanged after execution
/// of this method.
/// </summary>
/// <param name="connection"><see cref="MySqlConnection"/> object to use</param>
/// <param name="commandText">Command to execute</param>
/// <param name="commandParameters">Parameters to use for the command</param>
/// <returns><see cref="DataSet"/> containing the resultset</returns>
public static DataSet ExecuteDataset(MySqlConnection connection, string commandText, params MySqlParameter[] commandParameters)
{
//create a command and prepare it for execution
MySqlCommand cmd = new MySqlCommand();
cmd.Connection = connection;
cmd.CommandText = commandText;
cmd.CommandType = CommandType.Text;
if (commandParameters != null)
foreach (MySqlParameter p in commandParameters)
cmd.Parameters.Add( p );
//create the DataAdapter & DataSet
MySqlDataAdapter da = new MySqlDataAdapter(cmd);
DataSet ds = new DataSet();
//fill the DataSet using default values for DataTable names, etc.
da.Fill(ds);
// detach the MySqlParameters from the command object, so they can be used again.
cmd.Parameters.Clear();
//return the dataset
return ds;
}
/// <summary>
/// Updates the given table with data from the given <see cref="DataSet"/>
/// </summary>
/// <param name="connectionString">Settings to use for the update</param>
/// <param name="commandText">Command text to use for the update</param>
/// <param name="ds"><see cref="DataSet"/> containing the new data to use in the update</param>
/// <param name="tablename">Tablename in the dataset to update</param>
public static void UpdateDataSet( string connectionString, string commandText, DataSet ds, string tablename )
{
MySqlConnection cn = new MySqlConnection( connectionString );
cn.Open();
MySqlDataAdapter da = new MySqlDataAdapter( commandText, cn );
MySqlCommandBuilder cb = new MySqlCommandBuilder( da );
da.Update( ds, tablename );
cn.Close();
}
#endregion
#region ExecuteDataReader
/// <summary>
/// Executes a single command against a MySQL database, possibly inside an existing transaction.
/// </summary>
/// <param name="connection"><see cref="MySqlConnection"/> object to use for the command</param>
/// <param name="transaction"><see cref="MySqlTransaction"/> object to use for the command</param>
/// <param name="commandText">Command text to use</param>
/// <param name="commandParameters">Array of <see cref="MySqlParameter"/> objects to use with the command</param>
/// <param name="ExternalConn">True if the connection should be preserved, false if not</param>
/// <returns><see cref="MySqlDataReader"/> object ready to read the results of the command</returns>
private static MySqlDataReader ExecuteReader(MySqlConnection connection, MySqlTransaction transaction, string commandText, MySqlParameter[] commandParameters, bool ExternalConn )
{
//create a command and prepare it for execution
MySqlCommand cmd = new MySqlCommand();
cmd.Connection = connection;
cmd.Transaction = transaction;
cmd.CommandText = commandText;
cmd.CommandType = CommandType.Text;
if (commandParameters != null)
foreach (MySqlParameter p in commandParameters)
cmd.Parameters.Add( p );
//create a reader
MySqlDataReader dr;
// call ExecuteReader with the appropriate CommandBehavior
if (ExternalConn)
{
dr = cmd.ExecuteReader();
}
else
{
dr = cmd.ExecuteReader(CommandBehavior.CloseConnection);
}
// detach the SqlParameters from the command object, so they can be used again.
cmd.Parameters.Clear();
return dr;
}
/// <summary>
/// Executes a single command against a MySQL database.
/// </summary>
/// <param name="connectionString">Settings to use for this command</param>
/// <param name="commandText">Command text to use</param>
/// <returns><see cref="MySqlDataReader"/> object ready to read the results of the command</returns>
public static MySqlDataReader ExecuteReader(string connectionString, string commandText)
{
//pass through the call providing null for the set of SqlParameters
return ExecuteReader(connectionString, commandText, (MySqlParameter[])null);
}
/// <summary>
/// Executes a single command against a MySQL database.
/// </summary>
/// <param name="connectionString">Settings to use for this command</param>
/// <param name="commandText">Command text to use</param>
/// <param name="commandParameters">Array of <see cref="MySqlParameter"/> objects to use with the command</param>
/// <returns><see cref="MySqlDataReader"/> object ready to read the results of the command</returns>
public static MySqlDataReader ExecuteReader(string connectionString, string commandText, params MySqlParameter[] commandParameters)
{
//create & open a SqlConnection
MySqlConnection cn = new MySqlConnection(connectionString);
cn.Open();
try
{
//call the private overload that takes an internally owned connection in place of the connection string
return ExecuteReader(cn, null, commandText, commandParameters, false );
}
catch
{
//if we fail to return the SqlDatReader, we need to close the connection ourselves
cn.Close();
throw;
}
}
#endregion
#region ExecuteScalar
/// <summary>
/// Execute a single command against a MySQL database.
/// </summary>
/// <param name="connectionString">Settings to use for the update</param>
/// <param name="commandText">Command text to use for the update</param>
/// <returns>The first column of the first row in the result set, or a null reference if the result set is empty.</returns>
public static object ExecuteScalar(string connectionString, string commandText)
{
//pass through the call providing null for the set of MySqlParameters
return ExecuteScalar(connectionString, commandText, (MySqlParameter[])null);
}
/// <summary>
/// Execute a single command against a MySQL database.
/// </summary>
/// <param name="connectionString">Settings to use for the command</param>
/// <param name="commandText">Command text to use for the command</param>
/// <param name="commandParameters">Parameters to use for the command</param>
/// <returns>The first column of the first row in the result set, or a null reference if the result set is empty.</returns>
public static object ExecuteScalar(string connectionString, string commandText, params MySqlParameter[] commandParameters)
{
//create & open a SqlConnection, and dispose of it after we are done.
using (MySqlConnection cn = new MySqlConnection(connectionString))
{
cn.Open();
//call the overload that takes a connection in place of the connection string
return ExecuteScalar(cn, commandText, commandParameters);
}
}
/// <summary>
/// Execute a single command against a MySQL database.
/// </summary>
/// <param name="connection"><see cref="MySqlConnection"/> object to use</param>
/// <param name="commandText">Command text to use for the command</param>
/// <returns>The first column of the first row in the result set, or a null reference if the result set is empty.</returns>
public static object ExecuteScalar(MySqlConnection connection, string commandText)
{
//pass through the call providing null for the set of MySqlParameters
return ExecuteScalar(connection, commandText, (MySqlParameter[])null);
}
/// <summary>
/// Execute a single command against a MySQL database.
/// </summary>
/// <param name="connection"><see cref="MySqlConnection"/> object to use</param>
/// <param name="commandText">Command text to use for the command</param>
/// <param name="commandParameters">Parameters to use for the command</param>
/// <returns>The first column of the first row in the result set, or a null reference if the result set is empty.</returns>
public static object ExecuteScalar(MySqlConnection connection, string commandText, params MySqlParameter[] commandParameters)
{
//create a command and prepare it for execution
MySqlCommand cmd = new MySqlCommand();
cmd.Connection = connection;
cmd.CommandText = commandText;
cmd.CommandType = CommandType.Text;
if (commandParameters != null)
foreach (MySqlParameter p in commandParameters)
cmd.Parameters.Add( p );
//execute the command & return the results
object retval = cmd.ExecuteScalar();
// detach the SqlParameters from the command object, so they can be used again.
cmd.Parameters.Clear();
return retval;
}
#endregion
}
}
+135 -134
View File
@@ -1,134 +1,135 @@
using System;
using ByteFX.Data.Common;
using System.Collections;
namespace ByteFX.Data.MySqlClient
{
/// <summary>
/// Summary description for MySqlPool.
/// </summary>
internal sealed class MySqlPool
{
private ArrayList inUsePool;
private ArrayList idlePool;
private MySqlConnectionString settings;
private int minSize;
private int maxSize;
public MySqlPool(MySqlConnectionString settings)
{
minSize = settings.MinPoolSize;
maxSize = settings.MaxPoolSize;
this.settings = settings;
inUsePool =new ArrayList();
idlePool = new ArrayList( settings.MinPoolSize );
// prepopulate the idle pool to minSize
for (int i=0; i < minSize; i++)
CreateNewPooledConnection();
}
private void CheckOutConnection(MySqlInternalConnection conn)
{
}
private MySqlInternalConnection GetPooledConnection()
{
MySqlInternalConnection conn = null;
// if there are no idle connections and the in use pool is full
// then return null to indicate that we cannot provide a connection
// at this time.
if (idlePool.Count == 0 && inUsePool.Count == maxSize) return null;
lock (idlePool.SyncRoot)
{
for (int i=idlePool.Count-1; i >=0; i--)
{
conn = (idlePool[i] as MySqlInternalConnection);
if (conn.IsAlive())
{
lock (inUsePool)
{
inUsePool.Add( conn );
}
idlePool.RemoveAt( i );
return conn;
}
else
{
conn.Close();
idlePool.RemoveAt(i);
}
}
}
// if we couldn't get a pooled connection and there is still room
// make a new one
if (conn == null && (idlePool.Count+inUsePool.Count) < maxSize)
{
conn = CreateNewPooledConnection();
if (conn == null) return null;
lock (idlePool.SyncRoot)
lock (inUsePool.SyncRoot)
{
idlePool.Remove( conn );
inUsePool.Add( conn );
}
}
return conn;
}
private MySqlInternalConnection CreateNewPooledConnection()
{
lock(idlePool.SyncRoot)
lock (inUsePool.SyncRoot)
{
// first we check if we are allowed to create another
if ((inUsePool.Count + idlePool.Count) == maxSize) return null;
MySqlInternalConnection conn = new MySqlInternalConnection( settings );
conn.Open();
idlePool.Add( conn );
return conn;
}
}
public void ReleaseConnection( MySqlInternalConnection connection )
{
lock (idlePool.SyncRoot)
lock (inUsePool.SyncRoot)
{
inUsePool.Remove( connection );
if (connection.Settings.ConnectionLifetime != 0 && connection.IsTooOld())
connection.Close();
else
idlePool.Add( connection );
}
}
public MySqlInternalConnection GetConnection()
{
MySqlInternalConnection conn = null;
int start = Environment.TickCount;
int ticks = settings.ConnectTimeout * 1000;
// wait timeOut seconds at most to get a connection
while (conn == null && (Environment.TickCount - start) < ticks)
conn = GetPooledConnection();
// if pool size is at maximum, then we must have reached our timeout so we simply
// throw our exception
if (conn == null)
throw new MySqlException("error connecting: Timeout expired. The timeout period elapsed " +
"prior to obtaining a connection from the pool. This may have occurred because all " +
"pooled connections were in use and max pool size was reached.");
return conn;
}
}
}
using System;
using ByteFX.Data.Common;
using System.Collections;
namespace ByteFX.Data.MySqlClient
{
/// <summary>
/// Summary description for MySqlPool.
/// </summary>
internal sealed class MySqlPool
{
private ArrayList inUsePool;
private ArrayList idlePool;
private MySqlConnectionString settings;
private int minSize;
private int maxSize;
public MySqlPool(MySqlConnectionString settings)
{
minSize = settings.MinPoolSize;
maxSize = settings.MaxPoolSize;
this.settings = settings;
inUsePool =new ArrayList();
idlePool = new ArrayList( settings.MinPoolSize );
// prepopulate the idle pool to minSize
for (int i=0; i < minSize; i++)
CreateNewPooledConnection();
}
private void CheckOutConnection(MySqlInternalConnection conn)
{
}
private MySqlInternalConnection GetPooledConnection()
{
MySqlInternalConnection conn = null;
// if there are no idle connections and the in use pool is full
// then return null to indicate that we cannot provide a connection
// at this time.
if (idlePool.Count == 0 && inUsePool.Count == maxSize) return null;
lock (idlePool.SyncRoot)
{
for (int i=idlePool.Count-1; i >=0; i--)
{
conn = (idlePool[i] as MySqlInternalConnection);
if (conn.IsAlive())
{
lock (inUsePool)
{
inUsePool.Add( conn );
}
idlePool.RemoveAt( i );
return conn;
}
else
{
conn.Close();
idlePool.RemoveAt(i);
conn = null;
}
}
}
// if we couldn't get a pooled connection and there is still room
// make a new one
if (conn == null && (idlePool.Count+inUsePool.Count) < maxSize)
{
conn = CreateNewPooledConnection();
if (conn == null) return null;
lock (idlePool.SyncRoot)
lock (inUsePool.SyncRoot)
{
idlePool.Remove( conn );
inUsePool.Add( conn );
}
}
return conn;
}
private MySqlInternalConnection CreateNewPooledConnection()
{
lock(idlePool.SyncRoot)
lock (inUsePool.SyncRoot)
{
// first we check if we are allowed to create another
if ((inUsePool.Count + idlePool.Count) == maxSize) return null;
MySqlInternalConnection conn = new MySqlInternalConnection( settings );
conn.Open();
idlePool.Add( conn );
return conn;
}
}
public void ReleaseConnection( MySqlInternalConnection connection )
{
lock (idlePool.SyncRoot)
lock (inUsePool.SyncRoot)
{
inUsePool.Remove( connection );
if (connection.Settings.ConnectionLifetime != 0 && connection.IsTooOld())
connection.Close();
else
idlePool.Add( connection );
}
}
public MySqlInternalConnection GetConnection()
{
MySqlInternalConnection conn = null;
int start = Environment.TickCount;
int ticks = settings.ConnectionTimeout * 1000;
// wait timeOut seconds at most to get a connection
while (conn == null && (Environment.TickCount - start) < ticks)
conn = GetPooledConnection();
// if pool size is at maximum, then we must have reached our timeout so we simply
// throw our exception
if (conn == null)
throw new MySqlException("error connecting: Timeout expired. The timeout period elapsed " +
"prior to obtaining a connection from the pool. This may have occurred because all " +
"pooled connections were in use and max pool size was reached.");
return conn;
}
}
}
@@ -1,63 +1,63 @@
using System;
using ByteFX.Data.Common;
using System.Collections;
namespace ByteFX.Data.MySqlClient
{
/// <summary>
/// Summary description for MySqlPoolManager.
/// </summary>
internal sealed class MySqlPoolManager
{
private static Hashtable pools;
public MySqlPoolManager()
{
}
/// <summary>
///
/// </summary>
private static void Initialize()
{
pools = new Hashtable();
}
public static MySqlInternalConnection GetConnection( MySqlConnectionString settings )
{
// make sure the manager is initialized
if (MySqlPoolManager.pools == null)
MySqlPoolManager.Initialize();
string text = settings.ConnectString;
lock( pools.SyncRoot )
{
MySqlPool pool;
if (!pools.Contains( text ))
{
pool = new MySqlPool( settings );
pools.Add( text, pool );
}
else
{
pool = (pools[text] as MySqlPool);
}
return pool.GetConnection();
}
}
public static void ReleaseConnection( MySqlInternalConnection connection )
{
lock (pools.SyncRoot)
{
string key = connection.Settings.ConnectString;
MySqlPool pool = (MySqlPool)pools[ key ];
if (pool == null)
throw new MySqlException("Pooling exception: Unable to find original pool for connection");
pool.ReleaseConnection(connection);
}
}
}
}
using System;
using ByteFX.Data.Common;
using System.Collections;
namespace ByteFX.Data.MySqlClient
{
/// <summary>
/// Summary description for MySqlPoolManager.
/// </summary>
internal sealed class MySqlPoolManager
{
private static Hashtable pools;
public MySqlPoolManager()
{
}
/// <summary>
///
/// </summary>
private static void Initialize()
{
pools = new Hashtable();
}
public static MySqlInternalConnection GetConnection( MySqlConnectionString settings )
{
// make sure the manager is initialized
if (MySqlPoolManager.pools == null)
MySqlPoolManager.Initialize();
string text = settings.GetConnectionString();
lock( pools.SyncRoot )
{
MySqlPool pool;
if (!pools.Contains( text ))
{
pool = new MySqlPool( settings );
pools.Add( text, pool );
}
else
{
pool = (pools[text] as MySqlPool);
}
return pool.GetConnection();
}
}
public static void ReleaseConnection( MySqlInternalConnection connection )
{
lock (pools.SyncRoot)
{
string key = connection.Settings.GetConnectionString();
MySqlPool pool = (MySqlPool)pools[ key ];
if (pool == null)
throw new MySqlException("Pooling exception: Unable to find original pool for connection");
pool.ReleaseConnection(connection);
}
}
}
}
+165 -130
View File
@@ -1,130 +1,165 @@
// ByteFX.Data data access components for .Net
// Copyright (C) 2002-2003 ByteFX, Inc.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
using System;
using System.IO;
using System.Net;
using System.Net.Sockets;
using ByteFX.Data.Common;
using System.Threading;
namespace ByteFX.Data.MySqlClient
{
/// <summary>
/// Summary description for API.
/// </summary>
internal class MySqlStream : MultiHostStream
{
public MySqlStream( string hostList, int port, int readTimeOut, int connectTimeOut ) :
base( hostList, port, readTimeOut, connectTimeOut )
{
}
protected override void Error(string msg)
{
throw new MySqlException( msg, baseException );
}
protected override void TimeOut(MultiHostStreamErrorType error)
{
switch (error)
{
case MultiHostStreamErrorType.Connecting:
throw new MySqlException("Timed out creating a new MySqlConnection");
case MultiHostStreamErrorType.Reading:
throw new MySqlException("Timed out reading from MySql");
}
}
protected override bool CreateStream( IPAddress ip, string hostname, int port )
{
if (port == -1)
return CreatePipeStream(ip, hostname);
else
return CreateSocketStream(ip, port);
}
private bool CreatePipeStream( IPAddress ip, string hostname )
{
string pipeName;
if (hostname.ToLower().Equals("localhost"))
pipeName = @"\\.\pipe\MySql";
else
pipeName = String.Format(@"\\{0}\pipe\MySql", ip.ToString());
try
{
stream = new NamedPipeStream(pipeName, FileAccess.ReadWrite);
return true;
}
catch (Exception ex)
{
baseException = ex;
return false;
}
}
private bool CreateSocketStream( IPAddress ip, int port )
{
Socket socket = new Socket(AddressFamily.InterNetwork,
SocketType.Stream, ProtocolType.Tcp);
try
{
//
// Lets try to connect
IPEndPoint endPoint = new IPEndPoint( ip, port);
socket.Connect(endPoint);
socket.SetSocketOption( SocketOptionLevel.Tcp, SocketOptionName.NoDelay, 1 );
stream = new NetworkStream( socket, true );
return true;
}
catch (Exception ex)
{
baseException = ex;
return false;
}
}
protected override bool DataAvailable
{
get
{
if (stream is NetworkStream)
return ((NetworkStream)stream).DataAvailable;
else return (stream as NamedPipeStream).DataAvailable;
}
}
public int ReadInt24()
{
byte[] bytes = new byte[3];
Read( bytes, 0, 3 );
return (bytes[0] + (bytes[1]*256) + (bytes[2]*256*256));
}
public override void Close()
{
stream.Close();
}
}
}
// ByteFX.Data data access components for .Net
// Copyright (C) 2002-2003 ByteFX, Inc.
// Copyright (C) 2003 PT Cakram Datalingga Duaribu (http://www.cdl2000.com)
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
using System;
using System.IO;
using System.Net;
using System.Net.Sockets;
using ByteFX.Data.Common;
using System.Threading;
#if __MonoCS__
using Mono.Posix;
#endif
namespace ByteFX.Data.MySqlClient
{
/// <summary>
/// Summary description for API.
/// </summary>
internal class MySqlStream : MultiHostStream
{
private Socket socket;
public MySqlStream( string hostList, int port, int readTimeOut, int connectTimeOut ) :
base( hostList, port, readTimeOut, connectTimeOut )
{
}
protected override void Error(string msg)
{
throw new MySqlException( msg, baseException );
}
protected override void TimeOut(MultiHostStreamErrorType error)
{
switch (error)
{
case MultiHostStreamErrorType.Connecting:
throw new MySqlException("Timed out creating a new MySqlConnection");
case MultiHostStreamErrorType.Reading:
throw new MySqlException("Timed out reading from MySql");
}
}
protected override bool CreateStream( IPAddress ip, string hostname, int port )
{
if (port == -1)
return CreatePipeStream(ip, hostname);
else
return CreateSocketStream(ip, port);
}
protected override bool CreateStream (string filename)
{
return CreateUnixSocketStream (filename);
}
private bool CreatePipeStream( IPAddress ip, string hostname )
{
string pipeName;
if (hostname.ToLower().Equals("localhost"))
pipeName = @"\\.\pipe\MySql";
else
pipeName = String.Format(@"\\{0}\pipe\MySql", ip.ToString());
try
{
stream = new NamedPipeStream(pipeName, FileAccess.ReadWrite);
return true;
}
catch (Exception ex)
{
baseException = ex;
return false;
}
}
private bool CreateSocketStream( IPAddress ip, int port )
{
socket = new Socket(AddressFamily.InterNetwork,
SocketType.Stream, ProtocolType.Tcp);
try
{
//
// Lets try to connect
IPEndPoint endPoint = new IPEndPoint( ip, port);
socket.Connect(endPoint);
socket.SetSocketOption( SocketOptionLevel.Tcp, SocketOptionName.NoDelay, 1 );
stream = new NetworkStream( socket, true );
socket.Blocking = false;
return true;
}
catch (Exception ex)
{
baseException = ex;
return false;
}
}
private bool CreateUnixSocketStream(string socketName)
{
#if __MonoCS__ && !WINDOWS
Socket socket = new Socket (AddressFamily.Unix, SocketType.Stream, ProtocolType.IP);
try
{
UnixEndPoint endPoint = new UnixEndPoint (socketName);
socket.Connect (endPoint);
stream = new NetworkStream (socket, true);
return true;
}
catch (Exception ex)
{
baseException = ex;
return false;
}
#else
baseException = new PlatformNotSupportedException ("This is not a Unix");
return false;
#endif
}
protected override bool DataAvailable
{
get
{
if (stream is NetworkStream)
return ((NetworkStream)stream).DataAvailable;
else return (stream as NamedPipeStream).DataAvailable;
}
}
public int ReadInt24()
{
byte[] bytes = new byte[3];
Read( bytes, 0, 3 );
return (bytes[0] + (bytes[1]*256) + (bytes[2]*256*256));
}
public override void Close()
{
stream.Close();
}
}
}
+158 -158
View File
@@ -1,158 +1,158 @@
// ByteFX.Data data access components for .Net
// Copyright (C) 2002-2003 ByteFX, Inc.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
using System;
namespace ByteFX.Data.MySqlClient
{
/// <summary>
/// Summary description for ClientParam.
/// </summary>
[Flags()]
internal enum ClientParam
{
CLIENT_LONG_PASSWORD = 1, // new more secure passwords
CLIENT_FOUND_ROWS = 2, // found instead of affected rows
CLIENT_LONG_FLAG = 4, // Get all column flags
CLIENT_CONNECT_WITH_DB = 8, // One can specify db on connect
CLIENT_NO_SCHEMA = 16, // Don't allow db.table.column
CLIENT_COMPRESS = 32, // Client can use compression protocol
CLIENT_ODBC = 64, // ODBC client
CLIENT_LOCAL_FILES = 128, // Can use LOAD DATA LOCAL
CLIENT_IGNORE_SPACE = 256, // Ignore spaces before '('
CLIENT_CHANGE_USER = 512, // Support the mysql_change_user()
CLIENT_INTERACTIVE = 1024, // This is an interactive client
CLIENT_SSL = 2048, // Switch to SSL after handshake
CLIENT_IGNORE_SIGPIPE = 4096, // IGNORE sigpipes
CLIENT_TRANSACTIONS = 8192, // Client knows about transactions
CLIENT_PROTOCOL_41 = 16384,
CLIENT_SECURE_CONNECTION = 32768
}
/// <summary>
/// DB Operations Code
/// </summary>
internal enum DBCmd : byte
{
SLEEP = 0,
QUIT = 1,
INIT_DB = 2,
QUERY = 3,
FIELD_LIST = 4,
CREATE_DB = 5,
DROP_DB = 6,
RELOAD = 7,
SHUTDOWN = 8,
STATISTICS = 9,
PROCESS_INFO = 10,
CONNECT = 11,
PROCESS_KILL = 12,
DEBUG = 13,
PING = 14,
TIME = 15,
DELAYED_INSERT = 16,
CHANGE_USER = 17,
}
/// <summary>
/// Specifies MySQL specific data type of a field, property, for use in a <see cref="MySqlParameter"/>.
/// </summary>
public enum MySqlDbType
{
/// <summary> <see cref="Decimal"/><para>A fixed precision and scale numeric value between -1038 -1 and 10 38 -1.</para></summary>
Decimal = 0,
/// <summary> <see cref="Byte"/><para>The signed range is -128 to 127. The unsigned range is 0 to 255.</para></summary>
Byte = 1,
/// <summary><see cref="Int16"/><para>A 16-bit signed or unsigned integer. The signed range is -32768 to 32767. The unsigned range is 0 to 65535</para></summary>
Short = 2,
/// <summary><see cref="Int32"/><para>A 32-bit signed or unsigned integer</para></summary>
Int = 3,
/// <summary><b>Obsolete</b> Please use Int for 32 bit values</summary>
[Obsolete("Long is no longer the correct way of specifying a 32 bit value. Use Int")]
Long = 3,
/// <summary><see cref="Single"/><para>A small (single-precision) floating-point number. Allowable values are -3.402823466E+38 to -1.175494351E-38, 0, and 1.175494351E-38 to 3.402823466E+38.</para></summary>
Float = 4,
/// <summary><see cref="Double"/><para>A normal-size (double-precision) floating-point number. Allowable values are -1.7976931348623157E+308 to -2.2250738585072014E-308, 0, and 2.2250738585072014E-308 to 1.7976931348623157E+308.</para></summary>
Double = 5,
/// <summary>Specifies a null value</summary>
Null = 6,
/// <summary>A timestamp. The range is '1970-01-01 00:00:00' to sometime in the year 2037</summary>
Timestamp = 7,
/// <summary><see cref="Int64"/><para>A 64-bit signed or unsigned integer.</para></summary>
BigInt = 8,
/// <summary><b>Obsolete</b> Please use BigInt for 64 bit values</summary>
[Obsolete("LongLong is no longer the correct way of specifying a 64 bit value. Use BigInt")]
LongLong = 8,
/// <summary>Specifies a 24 (3 byte) signed or unsigned value.</summary>
Int24 = 9,
///<summary>Date The supported range is '1000-01-01' to '9999-12-31'.</summary>
Date = 10,
/// <summary> Time <para>The range is '-838:59:59' to '838:59:59'.</para></summary>
Time = 11,
///<summary>DateTime The supported range is '1000-01-01 00:00:00' to '9999-12-31 23:59:59'.</summary>
Datetime = 12,
/// <summary>A year in 2- or 4-digit format (default is 4-digit). The allowable values are 1901 to 2155, 0000 in the 4-digit year format, and 1970-2069 if you use the 2-digit format (70-69)</summary>
Year = 13,
/// <summary><b>Obsolete</b> Use Datetime or Date type</summary>
Newdate = 14,
/// <summary>An enumeration. A string object that can have only one value, chosen from the list of values 'value1', 'value2', ..., NULL or the special "" error value. An ENUM can have a maximum of 65535 distinct values</summary>
Enum = 247,
/// <summary>A set. A string object that can have zero or more values, each of which must be chosen from the list of values 'value1', 'value2', ... A SET can have a maximum of 64 members.</summary>
Set = 248,
/// <summary>A BLOB or TEXT column with a maximum length of 255 (2^8 - 1) characters</summary>
TinyBlob = 249,
/// <summary>A BLOB or TEXT column with a maximum length of 16777215 (2^24 - 1) characters</summary>
MediumBlob = 250,
/// <summary>A BLOB or TEXT column with a maximum length of 4294967295 or 4G (2^32 - 1) characters</summary>
LongBlob = 251,
/// <summary>A BLOB or TEXT column with a maximum length of 65535 (2^16 - 1) characters</summary>
Blob = 252,
/// <summary>A variable-length string containing 0 to 255 characters</summary>
VarChar = 253,
/// <summary><b>Obsolete</b> Use VarChar type</summary>
String = 254
};
enum Field_Type : byte
{
DECIMAL =0,
BYTE =1,
SHORT =2,
LONG =3,
FLOAT =4,
DOUBLE =5,
NULL =6,
TIMESTAMP =7,
LONGLONG =8,
INT24 =9,
DATE =10,
TIME =11,
DATETIME =12,
YEAR =13,
NEWDATE =14,
ENUM =247,
SET =248,
TINY_BLOB =249,
MEDIUM_BLOB =250,
LONG_BLOB =251,
BLOB =252,
VAR_STRING =253,
STRING =254,
}
}
// ByteFX.Data data access components for .Net
// Copyright (C) 2002-2003 ByteFX, Inc.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
using System;
namespace ByteFX.Data.MySqlClient
{
/// <summary>
/// Summary description for ClientParam.
/// </summary>
[Flags()]
internal enum ClientParam
{
CLIENT_LONG_PASSWORD = 1, // new more secure passwords
CLIENT_FOUND_ROWS = 2, // found instead of affected rows
CLIENT_LONG_FLAG = 4, // Get all column flags
CLIENT_CONNECT_WITH_DB = 8, // One can specify db on connect
CLIENT_NO_SCHEMA = 16, // Don't allow db.table.column
CLIENT_COMPRESS = 32, // Client can use compression protocol
CLIENT_ODBC = 64, // ODBC client
CLIENT_LOCAL_FILES = 128, // Can use LOAD DATA LOCAL
CLIENT_IGNORE_SPACE = 256, // Ignore spaces before '('
CLIENT_CHANGE_USER = 512, // Support the mysql_change_user()
CLIENT_INTERACTIVE = 1024, // This is an interactive client
CLIENT_SSL = 2048, // Switch to SSL after handshake
CLIENT_IGNORE_SIGPIPE = 4096, // IGNORE sigpipes
CLIENT_TRANSACTIONS = 8192, // Client knows about transactions
CLIENT_PROTOCOL_41 = 16384,
CLIENT_SECURE_CONNECTION = 32768
}
/// <summary>
/// DB Operations Code
/// </summary>
internal enum DBCmd : byte
{
SLEEP = 0,
QUIT = 1,
INIT_DB = 2,
QUERY = 3,
FIELD_LIST = 4,
CREATE_DB = 5,
DROP_DB = 6,
RELOAD = 7,
SHUTDOWN = 8,
STATISTICS = 9,
PROCESS_INFO = 10,
CONNECT = 11,
PROCESS_KILL = 12,
DEBUG = 13,
PING = 14,
TIME = 15,
DELAYED_INSERT = 16,
CHANGE_USER = 17,
}
/// <summary>
/// Specifies MySQL specific data type of a field, property, for use in a <see cref="MySqlParameter"/>.
/// </summary>
public enum MySqlDbType
{
/// <summary> <see cref="Decimal"/><para>A fixed precision and scale numeric value between -1038 -1 and 10 38 -1.</para></summary>
Decimal = 0,
/// <summary> <see cref="Byte"/><para>The signed range is -128 to 127. The unsigned range is 0 to 255.</para></summary>
Byte = 1,
/// <summary><see cref="Int16"/><para>A 16-bit signed or unsigned integer. The signed range is -32768 to 32767. The unsigned range is 0 to 65535</para></summary>
Short = 2,
/// <summary><see cref="Int32"/><para>A 32-bit signed or unsigned integer</para></summary>
Int = 3,
/// <summary><b>Obsolete</b> Please use Int for 32 bit values</summary>
[Obsolete("Long is no longer the correct way of specifying a 32 bit value. Use Int")]
Long = 3,
/// <summary><see cref="Single"/><para>A small (single-precision) floating-point number. Allowable values are -3.402823466E+38 to -1.175494351E-38, 0, and 1.175494351E-38 to 3.402823466E+38.</para></summary>
Float = 4,
/// <summary><see cref="Double"/><para>A normal-size (double-precision) floating-point number. Allowable values are -1.7976931348623157E+308 to -2.2250738585072014E-308, 0, and 2.2250738585072014E-308 to 1.7976931348623157E+308.</para></summary>
Double = 5,
/// <summary>Specifies a null value</summary>
Null = 6,
/// <summary>A timestamp. The range is '1970-01-01 00:00:00' to sometime in the year 2037</summary>
Timestamp = 7,
/// <summary><see cref="Int64"/><para>A 64-bit signed or unsigned integer.</para></summary>
BigInt = 8,
/// <summary><b>Obsolete</b> Please use BigInt for 64 bit values</summary>
[Obsolete("LongLong is no longer the correct way of specifying a 64 bit value. Use BigInt")]
LongLong = 8,
/// <summary>Specifies a 24 (3 byte) signed or unsigned value.</summary>
Int24 = 9,
///<summary>Date The supported range is '1000-01-01' to '9999-12-31'.</summary>
Date = 10,
/// <summary> Time <para>The range is '-838:59:59' to '838:59:59'.</para></summary>
Time = 11,
///<summary>DateTime The supported range is '1000-01-01 00:00:00' to '9999-12-31 23:59:59'.</summary>
Datetime = 12,
/// <summary>A year in 2- or 4-digit format (default is 4-digit). The allowable values are 1901 to 2155, 0000 in the 4-digit year format, and 1970-2069 if you use the 2-digit format (70-69)</summary>
Year = 13,
/// <summary><b>Obsolete</b> Use Datetime or Date type</summary>
Newdate = 14,
/// <summary>An enumeration. A string object that can have only one value, chosen from the list of values 'value1', 'value2', ..., NULL or the special "" error value. An ENUM can have a maximum of 65535 distinct values</summary>
Enum = 247,
/// <summary>A set. A string object that can have zero or more values, each of which must be chosen from the list of values 'value1', 'value2', ... A SET can have a maximum of 64 members.</summary>
Set = 248,
/// <summary>A BLOB or TEXT column with a maximum length of 255 (2^8 - 1) characters</summary>
TinyBlob = 249,
/// <summary>A BLOB or TEXT column with a maximum length of 16777215 (2^24 - 1) characters</summary>
MediumBlob = 250,
/// <summary>A BLOB or TEXT column with a maximum length of 4294967295 or 4G (2^32 - 1) characters</summary>
LongBlob = 251,
/// <summary>A BLOB or TEXT column with a maximum length of 65535 (2^16 - 1) characters</summary>
Blob = 252,
/// <summary>A variable-length string containing 0 to 255 characters</summary>
VarChar = 253,
/// <summary><b>Obsolete</b> Use VarChar type</summary>
String = 254
};
enum Field_Type : byte
{
DECIMAL =0,
BYTE =1,
SHORT =2,
LONG =3,
FLOAT =4,
DOUBLE =5,
NULL =6,
TIMESTAMP =7,
LONGLONG =8,
INT24 =9,
DATE =10,
TIME =11,
DATETIME =12,
YEAR =13,
NEWDATE =14,
ENUM =247,
SET =248,
TINY_BLOB =249,
MEDIUM_BLOB =250,
LONG_BLOB =251,
BLOB =252,
VAR_STRING =253,
STRING =254,
}
}
+223 -181
View File
@@ -1,181 +1,223 @@
using System;
using System.IO;
using System.Text;
namespace ByteFX.Data.MySqlClient
{
/* internal enum PacketType
{
None,
UpdateOrOk,
ResultSchema,
Last,
Auth,
Error,
LoadDataLocal,
Other
}*/
/// <summary>
/// Summary description for Packet.
/// </summary>
internal class Packet : MemoryStream
{
Encoding encoding;
private static int HEADER_LEN = 7;
public Packet() : base(256+HEADER_LEN)
{
Position = HEADER_LEN;
}
public Packet(int len) : base(len+HEADER_LEN)
{
Position = HEADER_LEN;
}
public Packet(byte[] bytes) : base(bytes, 0, bytes.Length, true, true)
{
}
public Encoding Encoding
{
set { encoding = value; }
get { return encoding; }
}
public byte this[int index]
{
get { return GetBuffer()[index]; }
}
public new int Length
{
get { return (int)base.Length; }
}
public bool IsLastPacket()
{
if (Length == 1 && this[0] == 0xfe) return true;
return false;
}
public byte[] GetBytes( byte packetSeq )
{
long oldPos = Position;
Position = 3;
WriteInteger( Length-HEADER_LEN, 3 );
WriteByte( packetSeq );
Position = oldPos;
return GetBuffer();
}
public int ReadNBytes()
{
byte c = (byte)ReadByte();
if (c < 1 || c > 4) throw new MySqlException("Unexpected byte count received");
return ReadInteger((int)c);
}
public string ReadLenString()
{
int len = ReadLenInteger();
byte[] buffer = new Byte[len];
Read(buffer, 0, len);
return encoding.GetString( buffer, 0, len);
}
/// <summary>
/// WriteInteger
/// </summary>
/// <param name="v"></param>
/// <param name="numbytes"></param>
public void WriteInteger( int v, int numbytes )
{
int val = v;
if (numbytes < 1 || numbytes > 4)
throw new ArgumentOutOfRangeException("Wrong byte count for WriteInteger");
for (int x=0; x < numbytes; x++)
{
WriteByte( (byte)(val&0xff) );
val >>= 8;
}
}
/// <summary>
///
/// </summary>
/// <param name="numbytes"></param>
/// <returns></returns>
public int ReadInteger(int numbytes)
{
int val = 0;
int raise = 1;
for (int x=0; x < numbytes; x++)
{
int b = ReadByte();
val += (b*raise);
raise *= 256;
}
return val;
}
/// <summary>
///
/// </summary>
/// <returns></returns>
public int ReadLenInteger()
{
byte c = (byte)ReadByte();
switch(c)
{
case 251 : return -1;
case 252 : return ReadInteger(2);
case 253 : return ReadInteger(3);
case 254 : return ReadInteger(4);
default : return c;
}
}
public bool HasMoreData
{
get { return Position < Length; }
}
#region String Functions
public string ReadString()
{
System.Text.StringBuilder sb = new System.Text.StringBuilder();
while ( HasMoreData )
{
byte b = (byte)ReadByte();
if (b == 0) break;
sb.Append( Convert.ToChar( b ));
}
return sb.ToString();
}
public void WriteString(string v, Encoding encoding)
{
WriteStringNoNull(v, encoding);
WriteByte(0);
}
public void WriteStringNoNull(string v, Encoding encoding)
{
byte[] bytes = encoding.GetBytes(v);
Write(bytes, 0, bytes.Length);
}
#endregion
}
}
using System;
using System.IO;
using System.Text;
namespace ByteFX.Data.MySqlClient
{
/// <summary>
/// Summary description for Packet.
/// </summary>
internal class Packet : MemoryStream
{
Encoding encoding;
byte sequence;
int completeLen;
public static int NULL_LEN=-1;
private int shortLen = 2;
private int intLen = 3;
private int longLen = 4;
private bool longInts = false;
public Packet(bool longInts) : base()
{
LongInts = longInts;
}
public Packet(byte[] bytes, bool longInts) : base(bytes.Length)
{
this.Write( bytes, 0, bytes.Length );
Position = 0;
LongInts = longInts;
}
public bool LongInts
{
get { return longInts; }
set
{
longInts = value;
if (longInts)
{
intLen = 4;
longLen = 8;
}
}
}
public int CompleteLength
{
get { return completeLen; }
set { completeLen = value; }
}
public byte Sequence
{
get { return sequence; }
set { sequence = value; }
}
public Encoding Encoding
{
set { encoding = value; }
get { return encoding; }
}
public void Clear()
{
Position = 0;
this.SetLength(0);
}
public byte this[int index]
{
get
{
long pos = Position;
Position = index;
byte b = (byte)ReadByte();
Position = pos;
return b;
}
}
public new int Length
{
get { return (int)base.Length; }
}
public bool IsLastPacket()
{
return (Length == 1 && this[0] == 0xfe);
}
public void Append( Packet p )
{
long oldPos = Position;
Position = Length;
this.Write( p.GetBuffer(), 0, p.Length );
Position = oldPos;
}
public Packet ReadPacket()
{
if (! HasMoreData) return null;
int len = this.ReadInteger(3);
byte seq = (byte)this.ReadByte();
byte[] buf = new byte[ len ];
this.Read( buf, 0, len );
Packet p = new Packet( buf, LongInts );
p.Sequence = seq;
p.Encoding = this.Encoding;
return p;
}
public int ReadNBytes()
{
byte c = (byte)ReadByte();
if (c < 1 || c > 4) throw new MySqlException("Unexpected byte count received");
return ReadInteger((int)c);
}
public string ReadLenString()
{
long len = ReadLenInteger();
byte[] buffer = new Byte[len];
Read(buffer, 0, (int)len);
return encoding.GetString( buffer, 0, (int)len);
}
/// <summary>
/// WriteInteger
/// </summary>
/// <param name="v"></param>
/// <param name="numbytes"></param>
public void WriteInteger( int v, int numbytes )
{
int val = v;
if (numbytes < 1 || numbytes > 4)
throw new ArgumentOutOfRangeException("Wrong byte count for WriteInteger");
for (int x=0; x < numbytes; x++)
{
WriteByte( (byte)(val&0xff) );
val >>= 8;
}
}
/// <summary>
///
/// </summary>
/// <param name="numbytes"></param>
/// <returns></returns>
public int ReadInteger(int numbytes)
{
int val = 0;
int raise = 1;
for (int x=0; x < numbytes; x++)
{
int b = ReadByte();
val += (b*raise);
raise *= 256;
}
return val;
}
/// <summary>
///
/// </summary>
/// <returns></returns>
public long ReadLenInteger()
{
byte c = (byte)ReadByte();
switch(c)
{
case 251 : return NULL_LEN;
case 252 : return ReadInteger(shortLen);
case 253 : return ReadInteger(intLen);
case 254 : return ReadInteger(longLen);
default : return c;
}
}
public bool HasMoreData
{
get { return Position < Length; }
}
#region String Functions
public string ReadString()
{
System.Text.StringBuilder sb = new System.Text.StringBuilder();
while ( HasMoreData )
{
byte b = (byte)ReadByte();
if (b == 0) break;
sb.Append( Convert.ToChar( b ));
}
return sb.ToString();
}
public void WriteString(string v, Encoding encoding)
{
WriteStringNoNull(v, encoding);
WriteByte(0);
}
public void WriteStringNoNull(string v, Encoding encoding)
{
byte[] bytes = encoding.GetBytes(v);
Write(bytes, 0, bytes.Length);
}
#endregion
}
}
File diff suppressed because it is too large. Load diff
+42 -42
View File
@@ -1,42 +1,42 @@
<?xml version="1.0" encoding="utf-8" ?>
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="ResMimeType">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="Version">
<value>1.0.0.0</value>
</resheader>
<resheader name="Reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.3102.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="Writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.3102.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
<?xml version="1.0" encoding="utf-8" ?>
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="ResMimeType">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="Version">
<value>1.0.0.0</value>
</resheader>
<resheader name="Reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.3102.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="Writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.3102.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
+289 -288
View File
@@ -1,288 +1,289 @@
// ByteFX.Data data access components for .Net
// Copyright (C) 2002-2003 ByteFX, Inc.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
using System.Data;
using System.Data.Common;
using System.ComponentModel;
namespace ByteFX.Data.MySqlClient
{
/// <summary>
/// Represents a set of data commands and a database connection that are used to fill a dataset and update a MySQL database. This class cannot be inherited.
/// </summary>
/// <include file='docs/MySqlDataAdapter.xml' path='MyDocs/MyMembers[@name="Class"]/*'/>
[System.Drawing.ToolboxBitmap( typeof(MySqlDataAdapter), "Designers.dataadapter.bmp")]
[System.ComponentModel.DesignerCategory("Code")]
public sealed class MySqlDataAdapter : DbDataAdapter, IDbDataAdapter
{
private MySqlCommand m_selectCommand;
private MySqlCommand m_insertCommand;
private MySqlCommand m_updateCommand;
private MySqlCommand m_deleteCommand;
/*
* Inherit from Component through DbDataAdapter. The event
* mechanism is designed to work with the Component.Events
* property. These variables are the keys used to find the
* events in the components list of events.
*/
static private readonly object EventRowUpdated = new object();
static private readonly object EventRowUpdating = new object();
/// <summary>
/// Initializes a new instance of the MySqlDataAdapter class.
/// </summary>
public MySqlDataAdapter()
{
}
/// <summary>
/// Initializes a new instance of the MySqlDataAdapter class with the specified MySqlCommand as the SelectCommand property.
/// </summary>
/// <param name="selectCommand"></param>
public MySqlDataAdapter( MySqlCommand selectCommand )
{
SelectCommand = selectCommand;
}
/// <summary>
/// Initializes a new instance of the MySqlDataAdapter class with a SelectCommand and a MySqlConnection object.
/// </summary>
/// <param name="selectCommandText"></param>
/// <param name="conn"></param>
public MySqlDataAdapter( string selectCommandText, MySqlConnection conn)
{
SelectCommand = new MySqlCommand( selectCommandText, conn );
}
/// <summary>
/// Initializes a new instance of the MySqlDataAdapter class with a SelectCommand and a connection string.
/// </summary>
/// <param name="selectCommandText"></param>
/// <param name="selectConnString"></param>
public MySqlDataAdapter( string selectCommandText, string selectConnString)
{
SelectCommand = new MySqlCommand( selectCommandText,
new MySqlConnection(selectConnString) );
}
#region Properties
/// <summary>
/// Gets or sets a SQL statement to delete records from the data set.
/// </summary>
[DataSysDescription("Used during Update for deleted rows in Dataset.")]
public MySqlCommand DeleteCommand
{
get { return m_deleteCommand; }
set { m_deleteCommand = value; }
}
IDbCommand IDbDataAdapter.DeleteCommand
{
get { return m_deleteCommand; }
set { m_deleteCommand = (MySqlCommand)value; }
}
/// <summary>
/// Gets or sets a SQL statement to insert new records into the data source.
/// </summary>
[DataSysDescription("Used during Update for new rows in Dataset.")]
public MySqlCommand InsertCommand
{
get { return m_insertCommand; }
set { m_insertCommand = value; }
}
IDbCommand IDbDataAdapter.InsertCommand
{
get { return m_insertCommand; }
set { m_insertCommand = (MySqlCommand)value; }
}
/// <summary>
/// Gets or sets a SQL statement used to select records in the data source.
/// </summary>
[DataSysDescription("Used during Fill/FillSchema")]
[Category("Fill")]
public MySqlCommand SelectCommand
{
get { return m_selectCommand; }
set { m_selectCommand = value; }
}
IDbCommand IDbDataAdapter.SelectCommand
{
get { return m_selectCommand; }
set { m_selectCommand = (MySqlCommand)value; }
}
/// <summary>
/// Gets or sets a SQL statement used to update records in the data source.
/// </summary>
[DataSysDescription("Used during Update for modified rows in Dataset.")]
public MySqlCommand UpdateCommand
{
get { return m_updateCommand; }
set { m_updateCommand = value; }
}
IDbCommand IDbDataAdapter.UpdateCommand
{
get { return m_updateCommand; }
set { m_updateCommand = (MySqlCommand)value; }
}
#endregion
/*
* Implement abstract methods inherited from DbDataAdapter.
*/
/// <summary>
/// Overridden. See <see cref="DbDataAdapter.CreateRowUpdatedEvent"/>.
/// </summary>
/// <param name="dataRow"></param>
/// <param name="command"></param>
/// <param name="statementType"></param>
/// <param name="tableMapping"></param>
/// <returns></returns>
override protected RowUpdatedEventArgs CreateRowUpdatedEvent(DataRow dataRow, IDbCommand command, StatementType statementType, DataTableMapping tableMapping)
{
return new MySqlRowUpdatedEventArgs(dataRow, command, statementType, tableMapping);
}
/// <summary>
/// Overridden. See <see cref="DbDataAdapter.CreateRowUpdatingEvent"/>.
/// </summary>
/// <param name="dataRow"></param>
/// <param name="command"></param>
/// <param name="statementType"></param>
/// <param name="tableMapping"></param>
/// <returns></returns>
override protected RowUpdatingEventArgs CreateRowUpdatingEvent(DataRow dataRow, IDbCommand command, StatementType statementType, DataTableMapping tableMapping)
{
return new MySqlRowUpdatingEventArgs(dataRow, command, statementType, tableMapping);
}
/// <summary>
/// Overridden. Raises the RowUpdating event.
/// </summary>
/// <param name="value">A MySqlRowUpdatingEventArgs that contains the event data.</param>
override protected void OnRowUpdating(RowUpdatingEventArgs value)
{
MySqlRowUpdatingEventHandler handler = (MySqlRowUpdatingEventHandler) Events[EventRowUpdating];
if ((null != handler) && (value is MySqlRowUpdatingEventArgs))
{
handler(this, (MySqlRowUpdatingEventArgs) value);
}
}
/// <summary>
/// Overridden. Raises the RowUpdated event.
/// </summary>
/// <param name="value">A MySqlRowUpdatedEventArgs that contains the event data. </param>
override protected void OnRowUpdated(RowUpdatedEventArgs value)
{
MySqlRowUpdatedEventHandler handler = (MySqlRowUpdatedEventHandler) Events[EventRowUpdated];
if ((null != handler) && (value is MySqlRowUpdatedEventArgs))
{
handler(this, (MySqlRowUpdatedEventArgs) value);
}
}
/// <summary>
/// Occurs during Update before a command is executed against the data source. The attempt to update is made, so the event fires.
/// </summary>
public event MySqlRowUpdatingEventHandler RowUpdating
{
add { Events.AddHandler(EventRowUpdating, value); }
remove { Events.RemoveHandler(EventRowUpdating, value); }
}
/// <summary>
/// Occurs during Update after a command is executed against the data source. The attempt to update is made, so the event fires.
/// </summary>
public event MySqlRowUpdatedEventHandler RowUpdated
{
add { Events.AddHandler(EventRowUpdated, value); }
remove { Events.RemoveHandler(EventRowUpdated, value); }
}
}
/// <summary>
/// Represents the method that will handle the <see cref="MySqlDataAdapter.RowUpdating"/> event of a <see cref="MySqlDataAdapter"/>.
/// </summary>
public delegate void MySqlRowUpdatingEventHandler(object sender, MySqlRowUpdatingEventArgs e);
/// <summary>
/// Represents the method that will handle the <see cref="MySqlDataAdapter.RowUpdated"/> event of a <see cref="MySqlDataAdapter"/>.
/// </summary>
public delegate void MySqlRowUpdatedEventHandler(object sender, MySqlRowUpdatedEventArgs e);
/// <summary>
/// Provides data for the RowUpdating event. This class cannot be inherited.
/// </summary>
public sealed class MySqlRowUpdatingEventArgs : RowUpdatingEventArgs
{
/// <summary>
/// Initializes a new instance of the MySqlRowUpdatingEventArgs class.
/// </summary>
/// <param name="row">The <see cref="DataRow"/> to <see cref="DbDataAdapter.Update"/>.</param>
/// <param name="command">The <see cref="IDbCommand"/> to execute during <see cref="DbDataAdapter.Update"/>.</param>
/// <param name="statementType">One of the <see cref="StatementType"/> values that specifies the type of query executed.</param>
/// <param name="tableMapping">The <see cref="DataTableMapping"/> sent through an <see cref="DbDataAdapter.Update"/>.</param>
public MySqlRowUpdatingEventArgs(DataRow row, IDbCommand command, StatementType statementType, DataTableMapping tableMapping)
: base(row, command, statementType, tableMapping)
{
}
/// <summary>
/// Gets or sets the MySqlCommand to execute when performing the Update.
/// </summary>
new public MySqlCommand Command
{
get { return (MySqlCommand)base.Command; }
set { base.Command = value; }
}
}
/// <summary>
/// Provides data for the RowUpdated event. This class cannot be inherited.
/// </summary>
public sealed class MySqlRowUpdatedEventArgs : RowUpdatedEventArgs
{
/// <summary>
/// Initializes a new instance of the MySqlRowUpdatedEventArgs class.
/// </summary>
/// <param name="row">The <see cref="DataRow"/> sent through an <see cref="DbDataAdapter.Update"/>.</param>
/// <param name="command">The <see cref="IDbCommand"/> executed when <see cref="DbDataAdapter.Update"/> is called.</param>
/// <param name="statementType">One of the <see cref="StatementType"/> values that specifies the type of query executed.</param>
/// <param name="tableMapping">The <see cref="DataTableMapping"/> sent through an <see cref="DbDataAdapter.Update"/>.</param>
public MySqlRowUpdatedEventArgs(DataRow row, IDbCommand command, StatementType statementType, DataTableMapping tableMapping)
: base(row, command, statementType, tableMapping)
{
}
/// <summary>
/// Gets or sets the MySqlCommand executed when Update is called.
/// </summary>
new public MySqlCommand Command
{
get { return (MySqlCommand)base.Command; }
}
}
}
// ByteFX.Data data access components for .Net
// Copyright (C) 2002-2003 ByteFX, Inc.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
using System.Data;
using System.Data.Common;
using System.ComponentModel;
namespace ByteFX.Data.MySqlClient
{
/// <summary>
/// Represents a set of data commands and a database connection that are used to fill a dataset and update a MySQL database. This class cannot be inherited.
/// </summary>
/// <include file='docs/MySqlDataAdapter.xml' path='MyDocs/MyMembers[@name="Class"]/*'/>
[System.Drawing.ToolboxBitmap( typeof(MySqlDataAdapter), "MySqlClient.resources.dataadapter.bmp")]
[System.ComponentModel.DesignerCategory("Code")]
[Designer("ByteFX.Data.MySqlClient.Design.MySqlDataAdapterDesigner,MySqlClient.Design")]
public sealed class MySqlDataAdapter : DbDataAdapter, IDbDataAdapter
{
private MySqlCommand m_selectCommand;
private MySqlCommand m_insertCommand;
private MySqlCommand m_updateCommand;
private MySqlCommand m_deleteCommand;
/*
* Inherit from Component through DbDataAdapter. The event
* mechanism is designed to work with the Component.Events
* property. These variables are the keys used to find the
* events in the components list of events.
*/
static private readonly object EventRowUpdated = new object();
static private readonly object EventRowUpdating = new object();
/// <summary>
/// Initializes a new instance of the MySqlDataAdapter class.
/// </summary>
public MySqlDataAdapter()
{
}
/// <summary>
/// Initializes a new instance of the MySqlDataAdapter class with the specified MySqlCommand as the SelectCommand property.
/// </summary>
/// <param name="selectCommand"></param>
public MySqlDataAdapter( MySqlCommand selectCommand )
{
SelectCommand = selectCommand;
}
/// <summary>
/// Initializes a new instance of the MySqlDataAdapter class with a SelectCommand and a MySqlConnection object.
/// </summary>
/// <param name="selectCommandText"></param>
/// <param name="conn"></param>
public MySqlDataAdapter( string selectCommandText, MySqlConnection conn)
{
SelectCommand = new MySqlCommand( selectCommandText, conn );
}
/// <summary>
/// Initializes a new instance of the MySqlDataAdapter class with a SelectCommand and a connection string.
/// </summary>
/// <param name="selectCommandText"></param>
/// <param name="selectConnString"></param>
public MySqlDataAdapter( string selectCommandText, string selectConnString)
{
SelectCommand = new MySqlCommand( selectCommandText,
new MySqlConnection(selectConnString) );
}
#region Properties
/// <summary>
/// Gets or sets a SQL statement to delete records from the data set.
/// </summary>
[Description("Used during Update for deleted rows in Dataset.")]
public MySqlCommand DeleteCommand
{
get { return m_deleteCommand; }
set { m_deleteCommand = value; }
}
IDbCommand IDbDataAdapter.DeleteCommand
{
get { return m_deleteCommand; }
set { m_deleteCommand = (MySqlCommand)value; }
}
/// <summary>
/// Gets or sets a SQL statement to insert new records into the data source.
/// </summary>
[Description("Used during Update for new rows in Dataset.")]
public MySqlCommand InsertCommand
{
get { return m_insertCommand; }
set { m_insertCommand = value; }
}
IDbCommand IDbDataAdapter.InsertCommand
{
get { return m_insertCommand; }
set { m_insertCommand = (MySqlCommand)value; }
}
/// <summary>
/// Gets or sets a SQL statement used to select records in the data source.
/// </summary>
[Description("Used during Fill/FillSchema")]
[Category("Fill")]
public MySqlCommand SelectCommand
{
get { return m_selectCommand; }
set { m_selectCommand = value; }
}
IDbCommand IDbDataAdapter.SelectCommand
{
get { return m_selectCommand; }
set { m_selectCommand = (MySqlCommand)value; }
}
/// <summary>
/// Gets or sets a SQL statement used to update records in the data source.
/// </summary>
[Description("Used during Update for modified rows in Dataset.")]
public MySqlCommand UpdateCommand
{
get { return m_updateCommand; }
set { m_updateCommand = value; }
}
IDbCommand IDbDataAdapter.UpdateCommand
{
get { return m_updateCommand; }
set { m_updateCommand = (MySqlCommand)value; }
}
#endregion
/*
* Implement abstract methods inherited from DbDataAdapter.
*/
/// <summary>
/// Overridden. See <see cref="DbDataAdapter.CreateRowUpdatedEvent"/>.
/// </summary>
/// <param name="dataRow"></param>
/// <param name="command"></param>
/// <param name="statementType"></param>
/// <param name="tableMapping"></param>
/// <returns></returns>
override protected RowUpdatedEventArgs CreateRowUpdatedEvent(DataRow dataRow, IDbCommand command, StatementType statementType, DataTableMapping tableMapping)
{
return new MySqlRowUpdatedEventArgs(dataRow, command, statementType, tableMapping);
}
/// <summary>
/// Overridden. See <see cref="DbDataAdapter.CreateRowUpdatingEvent"/>.
/// </summary>
/// <param name="dataRow"></param>
/// <param name="command"></param>
/// <param name="statementType"></param>
/// <param name="tableMapping"></param>
/// <returns></returns>
override protected RowUpdatingEventArgs CreateRowUpdatingEvent(DataRow dataRow, IDbCommand command, StatementType statementType, DataTableMapping tableMapping)
{
return new MySqlRowUpdatingEventArgs(dataRow, command, statementType, tableMapping);
}
/// <summary>
/// Overridden. Raises the RowUpdating event.
/// </summary>
/// <param name="value">A MySqlRowUpdatingEventArgs that contains the event data.</param>
override protected void OnRowUpdating(RowUpdatingEventArgs value)
{
MySqlRowUpdatingEventHandler handler = (MySqlRowUpdatingEventHandler) Events[EventRowUpdating];
if ((null != handler) && (value is MySqlRowUpdatingEventArgs))
{
handler(this, (MySqlRowUpdatingEventArgs) value);
}
}
/// <summary>
/// Overridden. Raises the RowUpdated event.
/// </summary>
/// <param name="value">A MySqlRowUpdatedEventArgs that contains the event data. </param>
override protected void OnRowUpdated(RowUpdatedEventArgs value)
{
MySqlRowUpdatedEventHandler handler = (MySqlRowUpdatedEventHandler) Events[EventRowUpdated];
if ((null != handler) && (value is MySqlRowUpdatedEventArgs))
{
handler(this, (MySqlRowUpdatedEventArgs) value);
}
}
/// <summary>
/// Occurs during Update before a command is executed against the data source. The attempt to update is made, so the event fires.
/// </summary>
public event MySqlRowUpdatingEventHandler RowUpdating
{
add { Events.AddHandler(EventRowUpdating, value); }
remove { Events.RemoveHandler(EventRowUpdating, value); }
}
/// <summary>
/// Occurs during Update after a command is executed against the data source. The attempt to update is made, so the event fires.
/// </summary>
public event MySqlRowUpdatedEventHandler RowUpdated
{
add { Events.AddHandler(EventRowUpdated, value); }
remove { Events.RemoveHandler(EventRowUpdated, value); }
}
}
/// <summary>
/// Represents the method that will handle the <see cref="MySqlDataAdapter.RowUpdating"/> event of a <see cref="MySqlDataAdapter"/>.
/// </summary>
public delegate void MySqlRowUpdatingEventHandler(object sender, MySqlRowUpdatingEventArgs e);
/// <summary>
/// Represents the method that will handle the <see cref="MySqlDataAdapter.RowUpdated"/> event of a <see cref="MySqlDataAdapter"/>.
/// </summary>
public delegate void MySqlRowUpdatedEventHandler(object sender, MySqlRowUpdatedEventArgs e);
/// <summary>
/// Provides data for the RowUpdating event. This class cannot be inherited.
/// </summary>
public sealed class MySqlRowUpdatingEventArgs : RowUpdatingEventArgs
{
/// <summary>
/// Initializes a new instance of the MySqlRowUpdatingEventArgs class.
/// </summary>
/// <param name="row">The <see cref="DataRow"/> to <see cref="DbDataAdapter.Update"/>.</param>
/// <param name="command">The <see cref="IDbCommand"/> to execute during <see cref="DbDataAdapter.Update"/>.</param>
/// <param name="statementType">One of the <see cref="StatementType"/> values that specifies the type of query executed.</param>
/// <param name="tableMapping">The <see cref="DataTableMapping"/> sent through an <see cref="DbDataAdapter.Update"/>.</param>
public MySqlRowUpdatingEventArgs(DataRow row, IDbCommand command, StatementType statementType, DataTableMapping tableMapping)
: base(row, command, statementType, tableMapping)
{
}
/// <summary>
/// Gets or sets the MySqlCommand to execute when performing the Update.
/// </summary>
new public MySqlCommand Command
{
get { return (MySqlCommand)base.Command; }
set { base.Command = value; }
}
}
/// <summary>
/// Provides data for the RowUpdated event. This class cannot be inherited.
/// </summary>
public sealed class MySqlRowUpdatedEventArgs : RowUpdatedEventArgs
{
/// <summary>
/// Initializes a new instance of the MySqlRowUpdatedEventArgs class.
/// </summary>
/// <param name="row">The <see cref="DataRow"/> sent through an <see cref="DbDataAdapter.Update"/>.</param>
/// <param name="command">The <see cref="IDbCommand"/> executed when <see cref="DbDataAdapter.Update"/> is called.</param>
/// <param name="statementType">One of the <see cref="StatementType"/> values that specifies the type of query executed.</param>
/// <param name="tableMapping">The <see cref="DataTableMapping"/> sent through an <see cref="DbDataAdapter.Update"/>.</param>
public MySqlRowUpdatedEventArgs(DataRow row, IDbCommand command, StatementType statementType, DataTableMapping tableMapping)
: base(row, command, statementType, tableMapping)
{
}
/// <summary>
/// Gets or sets the MySqlCommand executed when Update is called.
/// </summary>
new public MySqlCommand Command
{
get { return (MySqlCommand)base.Command; }
}
}
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,106 @@
<MyDocs>
<MyMembers name="Class">
<remarks>
<B>MySqlCommand</B> features the following methods for executing commands at a MySQL database:
<list type="table">
<listheader><term>Item</term><term>Description</term></listheader>
<item>
<term><a href="ByteFX.Data.MySqlClient.MySqlCommand.ExecuteReader_overloads.html">ExecuteReader</a></term>
<description>Executes commands that return rows.</description>
</item>
<item>
<term><a href="ByteFX.Data.MySqlClient.MySqlCommand.ExecuteNonQuery.html">ExecuteNonQuery</a></term>
<description>Executes commands such as SQL INSERT, DELETE, and UPDATE statements.</description>
</item>
<item>
<term><a href="ByteFX.Data.MySqlClient.MySqlCommand.ExecuteScalar.html">ExecuteScalar</a></term>
<description>Retrieves a single value (for example, an aggregate value) from a database.</description>
</item>
</list>
You can reset the <B>CommandText</B> property and reuse the <B>MySqlCommand</B>
object. However, you must close the <A
href="ByteFX.Data.MySqlClient.MySqlDataReader.html">MySqlDataReader</A>
before you can execute a new or previous command.
If a <A href="ByteFX.Data.MySqlClient.MySqlException.html">MySqlException</A> is
generated by the method executing a <B>MySqlCommand</B>, the <A
href="ByteFX.Data.MySqlClient.MySqlConnection.html">MySqlConnection</A>
remains open. It is the responsibility of the programmer to close the connection.
</remarks>
<example>
The following example creates a <A href="frlrfsystemdatasqlclientsqlcommandclasstopic.htm">MySqlCommand</A> and
a <B>MySqlConnection</B>. The <B>MySqlConnection</B> is opened and set as the <A
href="frlrfsystemdatasqlclientsqlcommandclassconnectiontopic.htm">Connection</A>
for the <B>MySqlCommand</B>. The example then calls <A
href="frlrfsystemdatasqlclientsqlcommandclassexecutenonquerytopic.htm">ExecuteNonQuery</A>,
and closes the connection. To accomplish this, the <B>ExecuteNonQuery</B> is
passed a connection string and a query string that is a SQL INSERT
statement.
<code lang="Visual Basic">
Public Sub InsertRow(myConnectionString As String)
' If the connection string is null, use a default.
If myConnectionString = "" Then
myConnectionString = "Database=Test;Data Source=localhost;User Id=username;Password=pass"
End If
Dim myConnection As New MySqlConnection(myConnectionString)
Dim myInsertQuery As String = "INSERT INTO Orders (id, customerId, amount) Values(1001, 23, 30.66)"
Dim myCommand As New MySqlCommand(myInsertQuery)
myCommand.Connection = myConnection
myConnection.Open()
myCommand.ExecuteNonQuery()
myCommand.Connection.Close()
End Sub
</code>
<code lang="C#">
public void InsertRow(string myConnectionString)
{
// If the connection string is null, use a default.
if(myConnectionString == "")
{
myConnectionString = "Database=Test;Data Source=localhost;User Id=username;Password=pass";
}
MySqlConnection myConnection = new MySqlConnection(myConnectionString);
string myInsertQuery = "INSERT INTO Orders (id, customerId, amount) Values(1001, 23, 30.66)";
MySqlCommand myCommand = new MySqlCommand(myInsertQuery);
myCommand.Connection = myConnection;
myConnection.Open();
myCommand.ExecuteNonQuery();
myCommand.Connection.Close();
}
</code>
</example>
</MyMembers>
<MyMembers name="ConnectionTimeout">
<exception cref="System.ArgumentException">The value set is less than 0.</exception>
<remarks>
A value of 0 indicates no limit, and should be avoided in a
<a href="ByteFX.Data.MySqlClient.MySqlConnection.ConnectionString.html">ConnectionString</a>
because an attempt to connect will wait indefinitely.
</remarks>
<example>
The following example creates a MySqlConnection
and sets some of its properties in the connection string.
<code lang="Visual Basic"><c>
Public Sub CreateSqlConnection()
Dim myConnection As New MySqlConnection()
myConnection.ConnectionString = "Persist Security Info=False;Username=user;Password=pass;database=test1;server=localhost;Connect Timeout=30"
myConnection.Open()
End Sub
</c></code>
<code lang="C#"><c>
public void CreateSqlConnection()
{
MySqlConnection myConnection = new MySqlConnection();
myConnection.ConnectionString = "Persist Security Info=False;Username=user;Password=pass;database=test1;server=localhost;Connect Timeout=30";
myConnection.Open();
}
</c></code>
</example>
</MyMembers>
</MyDocs>
@@ -0,0 +1,138 @@
<MyDocs>
<MyMembers name="Class">
<remarks>
<p>The <A href="frlrfsystemdatasqlclientsqldataadapterclasstopic.htm">MySqlDataAdapter</A>
does not automatically generate the SQL statements required to
reconcile changes made to a <A href="frlrfsystemdatadatasetclasstopic.htm">DataSet</A> with the associated
instance of MySQL. However, you can create a <B>MySqlCommandBuilder</B>
object to automatically generate SQL statements for single-table
updates if you set the <A href="frlrfsystemdatasqlclientsqldataadapterclassselectcommandtopic.htm">SelectCommand</A>
property of the <B>MySqlDataAdapter</B>. Then, any additional SQL
statements that you do not set are generated by the
<B>MySqlCommandBuilder</B>.</p>
<P>The <B>MySqlCommandBuilder</B> registers itself as a listener for <A
href="frlrfsystemdatasqlclientsqldataadapterclassrowupdatingtopic.htm">RowUpdating</A>
events whenever you set the <A
href="frlrfsystemdatasqlclientsqlcommandbuilderclassdataadaptertopic.htm">DataAdapter</A>
property. You can only associate one <B>MySqlDataAdapter</B> or
<B>MySqlCommandBuilder</B> object with each other at one time.</P>
<P>To generate INSERT, UPDATE, or DELETE statements, the
<B>MySqlCommandBuilder</B> uses the <B>SelectCommand</B> property to retrieve a
required set of metadata automatically. If you change the <B>SelectCommand</B>
after the metadata has is retrieved (for example, after the first update), you
should call the <A
href="frlrfsystemdatasqlclientsqlcommandbuilderclassrefreshschematopic.htm">RefreshSchema</A>
method to update the metadata.</P>
<P>The <B>SelectCommand</B> must also return at least one primary key or unique
column. If none are present, an <I>InvalidOperation</I> exception is generated,
and the commands are not generated.</P>
<P>The <B>MySqlCommandBuilder</B> also uses the <A
href="frlrfsystemdatasqlclientsqlcommandclassconnectiontopic.htm">Connection</A>,
<A
href="frlrfsystemdatasqlclientsqlcommandclasscommandtimeouttopic.htm">CommandTimeout</A>,
and <A
href="frlrfsystemdatasqlclientsqlcommandclasstransactiontopic.htm">Transaction</A>
properties referenced by the <B>SelectCommand</B>. The user should call
<B>RefreshSchema</B> if any of these properties are modified, or if the
<B>SelectCommand</B> itself is replaced. Otherwise the <A
href="frlrfsystemdatasqlclientsqldataadapterclassinsertcommandtopic.htm">InsertCommand</A>,
<A
href="frlrfsystemdatasqlclientsqldataadapterclassupdatecommandtopic.htm">UpdateCommand</A>,
and <A
href="frlrfsystemdatasqlclientsqldataadapterclassdeletecommandtopic.htm">DeleteCommand</A>
properties retain their previous values.</P>
<P>If you call <A
href="frlrfsystemcomponentmodelcomponentclassdisposetopic.htm">Dispose</A>, the
<B>MySqlCommandBuilder</B> is disassociated from the <B>MySqlDataAdapter</B>, and
the generated commands are no longer used.</P>
</remarks>
<example>
The following example uses the <A
href="frlrfsystemdatasqlclientsqlcommandclasstopic.htm">MySqlCommand</A>, along <A
href="frlrfsystemdatasqlclientsqldataadapterclasstopic.htm">MySqlDataAdapter</A>
and <A
href="frlrfsystemdatasqlclientsqlconnectionclasstopic.htm">MySqlConnection</A>, to
select rows from a data source. The example is passed an initialized <A
href="frlrfsystemdatadatasetclasstopic.htm">DataSet</A>, a connection string, a
query string that is a SQL SELECT statement, and a string that is the
name of the database table. The example then creates a <B>MySqlCommandBuilder</B>.
<code lang="Visual Basic">
Public Shared Function SelectRows(myConnection As String, mySelectQuery As String, myTableName As String) As DataSet
Dim myConn As New MySqlConnection(myConnection)
Dim myDataAdapter As New MySqlDataAdapter()
myDataAdapter.SelectCommand = New MySqlCommand(mySelectQuery, myConn)
Dim cb As SqlCommandBuilder = New MySqlCommandBuilder(myDataAdapter)
myConn.Open()
Dim ds As DataSet = New DataSet
myDataAdapter.Fill(ds, myTableName)
' Code to modify data in DataSet here
' Without the MySqlCommandBuilder this line would fail.
myDataAdapter.Update(ds, myTableName)
myConn.Close()
End Function 'SelectRows
</code>
<code lang="C#">
public static DataSet SelectRows(string myConnection, string mySelectQuery, string myTableName)
{
MySqlConnection myConn = new MySqlConnection(myConnection);
MySqlDataAdapter myDataAdapter = new MySqlDataAdapter();
myDataAdapter.SelectCommand = new MySqlCommand(mySelectQuery, myConn);
MySqlCommandBuilder cb = new MySqlCommandBuilder(myDataAdapter);
myConn.Open();
DataSet ds = new DataSet();
myDataAdapter.Fill(ds, myTableName);
//code to modify data in DataSet here
//Without the MySqlCommandBuilder this line would fail
myDataAdapter.Update(ds, myTableName);
myConn.Close();
return ds;
}
</code>
</example>
</MyMembers>
<MyMembers name="ConnectionTimeout">
<exception cref="System.ArgumentException">The value set is less than 0.</exception>
<remarks>
A value of 0 indicates no limit, and should be avoided in a
<a href="ByteFX.Data.MySqlClient.MySqlConnection.ConnectionString.html">ConnectionString</a>
because an attempt to connect will wait indefinitely.
</remarks>
<example>
The following example creates a MySqlConnection
and sets some of its properties in the connection string.
<code lang="Visual Basic"><c>
Public Sub CreateSqlConnection()
Dim myConnection As New MySqlConnection()
myConnection.ConnectionString = "Persist Security Info=False;Username=user;Password=pass;database=test1;server=localhost;Connect Timeout=30"
myConnection.Open()
End Sub
</c></code>
<code lang="C#"><c>
public void CreateSqlConnection()
{
MySqlConnection myConnection = new MySqlConnection();
myConnection.ConnectionString = "Persist Security Info=False;Username=user;Password=pass;database=test1;server=localhost;Connect Timeout=30";
myConnection.Open();
}
</c></code>
</example>
</MyMembers>
</MyDocs>
@@ -0,0 +1,312 @@
<MyDocs>
<MyMembers name="Class">
<remarks>
<para>
A <b>MySqlConnection</b> object represents a session to a MySQL Server
data source. When you create an instance of <B>MySqlConnection</B>, all
properties are set to their initial values. For a list of these values, see the
<B>MySqlConnection</B> constructor.
</para>
<para>
If the <B>MySqlConnection</B> goes out of scope, it is not closed. Therefore,
you must explicitly close the connection by calling <see cref="MySqlConnection.Close"/>
or <see cref="MySqlConnection.Dispose"/>.
</para>
</remarks>
<example>
The following example creates a <see cref="MySqlCommand"/> and
a <B>MySqlConnection</B>. The <B>MySqlConnection</B> is opened and set as the
<see cref="MySqlCommand.Connection"/> for the <B>MySqlCommand</B>. The example then calls
<see cref="MySqlCommand.ExecuteNonQuery"/>, and closes the connection. To accomplish this, the <B>ExecuteNonQuery</B> is
passed a connection string and a query string that is a SQL INSERT
statement.
<code lang="Visual Basic">
<c>
Public Sub InsertRow(myConnectionString As String)
' If the connection string is null, use a default.
If myConnectionString = "" Then
myConnectionString = "Database=Test;Data Source=localhost;User Id=username;Password=pass"
End If
Dim myConnection As New MySqlConnection(myConnectionString)
Dim myInsertQuery As String = "INSERT INTO Orders (id, customerId, amount) Values(1001, 23, 30.66)"
Dim myCommand As New MySqlCommand(myInsertQuery)
myCommand.Connection = myConnection
myConnection.Open()
myCommand.ExecuteNonQuery()
myCommand.Connection.Close()
End Sub
</c>
</code>
<code lang="C#">
<c>
public void InsertRow(string myConnectionString)
{
// If the connection string is null, use a default.
if(myConnectionString == "")
{
myConnectionString = "Database=Test;Data Source=localhost;User Id=username;Password=pass";
}
MySqlConnection myConnection = new MySqlConnection(myConnectionString);
string myInsertQuery = "INSERT INTO Orders (id, customerId, amount) Values(1001, 23, 30.66)";
MySqlCommand myCommand = new MySqlCommand(myInsertQuery);
myCommand.Connection = myConnection;
myConnection.Open();
myCommand.ExecuteNonQuery();
myCommand.Connection.Close();
}
</c>
</code>
</example>
</MyMembers>
<MyMembers name="ConnectionTimeout">
<exception cref="System.ArgumentException">The value set is less than 0.</exception>
<remarks>
A value of 0 indicates no limit, and should be avoided in a
<see cref="MySqlConnection.ConnectionString"/> because an attempt to connect
will wait indefinitely.
</remarks>
<example>
The following example creates a MySqlConnection
and sets some of its properties in the connection string.
<code lang="Visual Basic">
Public Sub CreateSqlConnection()
Dim myConnection As New MySqlConnection()
myConnection.ConnectionString = "Persist Security Info=False;Username=user;Password=pass;database=test1;server=localhost;Connect Timeout=30"
myConnection.Open()
End Sub
</code>
<code lang="C#">
public void CreateSqlConnection()
{
MySqlConnection myConnection = new MySqlConnection();
myConnection.ConnectionString = "Persist Security Info=False;Username=user;Password=pass;database=test1;server=localhost;Connect Timeout=30";
myConnection.Open();
}
</code>
</example>
</MyMembers>
<MyMembers name="ConnectionString">
<remarks>
<para>The <B>ConnectionString</B> returned may not be exactly like what was originally
set but will be indentical in terms of keyword/value pairs. Security information
will not be included unless the Persist Security Info value is set to true.
</para>
<para>You can use the <B>ConnectionString</B> property to connect to a database.
The following example illustrates a typical connection string.</para>
<c>"Persist Security Info=False;database=MyDB;server=MySqlServer;user id=myUser;Password=myPass"</c>
<para>The <B>ConnectionString</B> property can be set only when the connection is
closed. Many of the connection string values have corresponding read-only
properties. When the connection string is set, all of these properties are
updated, except when an error is detected. In this case, none of the properties
are updated. <see cref="MySqlConnection"/> properties return only those settings contained in the
<B>ConnectionString</B>.</para>
<para>To connect to a local machine, specify "localhost" for the server. If you do not
specify a server, localhost is assumed.</para>
<para>Resetting the <B>ConnectionString</B> on a closed connection resets all
connection string values (and related properties) including the password. For
example, if you set a connection string that includes "Database= MyDb", and
then reset the connection string to "Data Source=myserver;User Id=myUser;Password=myPass",
the <see cref="MySqlConnection.Database"/> property is no longer set to MyDb.</para>
<para>The connection string is parsed immediately after being set. If errors in
syntax are found when parsing, a runtime exception, such as <see cref="ArgumentException"/>,
is generated. Other errors can be found only when an attempt is made to open the
connection.</para>
<para>The basic format of a connection string consists of a series of keyword/value
pairs separated by semicolons. The equal sign (=) connects each keyword and its
value. To include values that contain a semicolon, single-quote character, or
double-quote character, the value must be enclosed in double quotes. If the
value contains both a semicolon and a double-quote character, the value can be
enclosed in single quotes. The single quote is also useful if the value begins
with a double-quote character. Conversely, the double quote can be used if the
value begins with a single quote. If the value contains both single-quote and
double-quote characters, the quote character used to enclose the value must be
doubled each time it occurs within the value.</para>
<para>To include preceding or trailing spaces in the string value, the value must
be enclosed in either single quotes or double quotes. Any leading or trailing
spaces around integer, Boolean, or enumerated values are ignored, even if
enclosed in quotes. However, spaces within a string literal keyword or value are
preserved. Using .NET Framework version 1.1, single or double quotes may be used
within a connection string without using delimiters (for example, Data Source=
my'Server or Data Source= my"Server), unless a quote character is the first or
last character in the value.</para>
<para>To include an equal sign (=) in a keyword or value, it must be preceded by
another equal sign. For example, in the hypothetical connection string</para>
<c>"key==word=value"</c>
<para></para>
<para>the keyword is "key=word" and the value is "value".</para>
<para>If a specific keyword in a keyword= value pair occurs multiple times in a
connection string, the last occurrence listed is used in the value set.</para>
<para>Keywords are not case sensitive.</para>
<para>The following table lists the valid names for keyword values within the
<B>ConnectionString</B>.</para>
<div class="tablediv"><table class="dtTABLE" cellspacing="0"><tr valign="top">
<th width="33%">Name</th>
<th width="33%">Default</th>
<th width="33%">Description</th>
</tr>
<tr>
<td>Connect Timeout<para> -or- </para>Connection Timeout</td>
<td>15</td>
<td>The length of time (in seconds) to wait for a connection to the server before
terminating the attempt and generating an error.</td>
</tr>
<tr>
<td>
Host<para> -or- </para>Server<para> -or- </para>Data Source<para> -or- </para>
DataSource<para> -or- </para>Address<para> -or- </para>Addr<para> -or- </para>
Network Address
</td>
<td>localhost</td>
<td><para>The name or network address of the instance of MySQL to which to connect. Multiple hosts can be
specified separated by &amp;. This can be useful where multiple MySQL servers are configured for replication
and you are not concerned about the precise server you are connecting to. No attempt is made by the provider to
synchronize writes to the database so care should be taken when using this option.
</para>
<para>
In Unix environment with Mono, this can be a fully qualified path to MySQL socket filename. With this configuration, the Unix socket will be used instead of TCP/IP socket.
Currently only a single socket name can be given so accessing MySQL in a replicated environment using Unix sockets is not currently supported.
</para>
</td>
</tr>
<tr>
<td>Port</td>
<td>3306</td>
<td>The port MySQL is using to listen for connections. Specify -1 for this value to use a
named pipe connection (Windows only). This value is ignored if Unix socket is used.</td>
</tr>
<tr>
<td>Encrypt</td>
<td>false</td>
<td>When <B>true</B>, SSL encryption is used for all data sent between the
client and server if the server has a certificate installed. Recognized values
are <B>true</B>, <B>false</B>, <B>yes</B>, and <B>no</B>.<para><b>Note</b> This parameter currently has no
effect.</para></td>
</tr>
<tr>
<td>Initial Catalog<para> -or- </para>Database</td>
<td></td>
<td>The name of the database to use intially</td>
</tr>
<tr>
<td>Password<para> -or- </para>pwd</td>
<td></td>
<td>The password for the MySQL account being used.</td>
</tr>
<tr>
<td>Persist Security Info</td>
<td>false</td>
<td>When set to <B>false</B> or <B>no</B> (strongly recommended), security-sensitive
information, such as the password, is not returned as part of the connection if
the connection is open or has ever been in an open state. Resetting the
connection string resets all connection string values including the password.
Recognized values are <B>true</B>, <B>false</B>, <B>yes</B>, and <B>no</B>.</td>
</tr>
<tr>
<td>User Id<para> -or- </para>Username<para> -or- </para>Uid<para> -or- </para>User name</td>
<td></td>
<td>The MySQL login account being used.</td>
</tr>
</table>
</div>
<para>
The following table lists the valid names for connection pooling values within
the <B>ConnectionString</B>. For more information about connection pooling, see
Connection Pooling for the ByteFX Data Provider for MySQL.</para>
<div class="tablediv"><table class="dtTABLE" cellspacing="0"><tr valign="top">
<th width="33%">Name</th>
<th width="33%">Default</th>
<th width="33%">Description</th>
</tr>
<tr>
<td>Connection Lifetime</td>
<td>0</td>
<td>When a connection is returned to the pool, its creation time is compared with
the current time, and the connection is destroyed if that time span (in seconds)
exceeds the value specified by <B>Connection Lifetime</B>. This is useful in
clustered configurations to force load balancing between a running server and a
server just brought online.
<para>A value of zero (0) causes pooled connections to have the maximum connection
timeout.</para></td>
</tr>
<tr>
<td>Max Pool Size</td>
<td>100</td>
<td>The maximum number of connections allowed in the pool.</td>
</tr>
<tr>
<td>Min Pool Size</td>
<td>0</td>
<td>The minimum number of connections allowed in the pool.</td>
</tr>
<tr>
<td>Pooling</td>
<td>true</td>
<td>When <B>true</B>, the <B>MySqlConnection</B> object is drawn from the appropriate
pool, or if necessary, is created and added to the appropriate pool. Recognized
values are <B>true</B>, <B>false</B>, <B>yes</B>, and <B>no</B>.</td>
</tr>
<tr>
<td>Use Pipe<para> -or- </para>Pipe</td>
<td></td>
<td>When set to the name of a named pipe, the <B>MySqlConnection</B> will attempt to connect to MySQL
on that named pipe.<br/><br/>This settings only applies to the Windows platform.</td>
</tr>
</table></div>
<para>When setting keyword or connection pooling values that require a Boolean
value, you can use 'yes' instead of 'true', and 'no' instead of 'false'.</para>
<para><B>Note</B> The ByteFX Data Provider for MySQL uses the native socket protocol to
communicate with MySQL. Therefore, it does not support the use of an ODBC data source name (DSN) when
connecting to MySQL because it does not add an ODBC layer.</para>
<para><B>CAUTION</B> In this release, the application should use caution when constructing a
connection string based on user input (for example when retrieving user ID and password information from a
dialog box, and appending it to the connection string). The application should
ensure that a user cannot embed extra connection string parameters in these
values (for example, entering a password as "validpassword;database=somedb" in
an attempt to attach to a different database).</para>
</remarks>
<example>
The following example creates a <see cref="MySqlConnection"/> and sets some of its properties
<code lang="Visual Basic">
Public Sub CreateConnection()
Dim myConnection As New MySqlConnection()
myConnection.ConnectionString = "Persist Security Info=False;database=myDB;server=myHost;Connect Timeout=30;user id=myUser; pwd=myPass"
myConnection.Open()
End Sub 'CreateConnection
</code>
<code lang="C#">
public void CreateConnection()
{
MySqlConnection myConnection = new MySqlConnection();
myConnection.ConnectionString = "Persist Security Info=False;database=myDB;server=myHost;Connect Timeout=30;user id=myUser; pwd=myPass";
myConnection.Open();
}
</code>
</example>
<example>
The following example creates a <see cref="MySqlConnection"/> in Unix environment with Mono installed. MySQL socket filename used in this example is "/var/lib/mysql/mysql.sock". The actual filename depends on your MySQL configuration.
<code lang="Visual Basic">
Public Sub CreateConnection()
Dim myConnection As New MySqlConnection()
myConnection.ConnectionString = "database=myDB;server=/var/lib/mysql/mysql.sock;user id=myUser; pwd=myPass"
myConnection.Open()
End Sub 'CreateConnection
</code>
<code lang="C#">
public void CreateConnection()
{
MySqlConnection myConnection = new MySqlConnection();
myConnection.ConnectionString = "database=myDB;server=/var/lib/mysql/mysql.sock;user id=myUser; pwd=myPass";
myConnection.Open();
}
</code>
</example>
</MyMembers>
</MyDocs>
@@ -0,0 +1,90 @@
<MyDocs>
<MyMembers name="Class">
<remarks>
<para>
The <B>MySQLDataAdapter</B>, serves as a bridge between a <see cref="System.Data.DataSet"/>
and MySQL for retrieving and saving data. The <B>MySQLDataAdapter</B> provides this
bridge by mapping <see cref="DbDataAdapter.Fill"/>, which changes the data in the
<B>DataSet</B> to match the data in the data source, and <see cref="DbDataAdapter.Update"/>,
which changes the data in the data source to match the data in the <B>DataSet</B>,
using the appropriate SQL statements against the data source.
</para>
<para>
When the <B>MySQLDataAdapter</B> fills a <B>DataSet</B>, it will create the necessary
tables and columns for the returned data if they do not already exist. However, primary
key information will not be included in the implicitly created schema unless the
<see cref="System.Data.MissingSchemaAction"/> property is set to <see cref="System.Data.MissingSchemaAction.AddWithKey"/>.
You may also have the <B>MySQLDataAdapter</B> create the schema of the <B>DataSet</B>,
including primary key information, before filling it with data using <see cref="System.Data.Common.DbDataAdapter.FillSchema"/>.
</para>
<para><B>MySQLDataAdapter</B> is used in conjunction with <see cref="MySqlConnection"/>
and <see cref="MySqlCommand"/> to increase performance when connecting to a MySQL database.
</para>
<para>The <B>MySQLDataAdapter</B> also includes the <see cref="MySqlDataAdapter.SelectCommand"/>,
<see cref="MySqlDataAdapter.InsertCommand"/>, <see cref="MySqlDataAdapter.DeleteCommand"/>,
<see cref="MySqlDataAdapter.UpdateCommand"/>, and <see cref="DataAdapter.TableMappings"/>
properties to facilitate the loading and updating of data.
</para>
<para>When an instance of <B>MySQLDataAdapter</B> is created, the read/write properties
are set to initial values. For a list of these values, see the <B>MySQLDataAdapter</B>
constructor.
</para>
</remarks>
<example>
The following example creates a <see cref="MySqlCommand"/> and a <see cref="MySqlConnection"/>.
The <B>MySqlConnection</B> is opened and set as the <see cref="MySqlCommand.Connection"/> for the
<B>MySqlCommand</B>. The example then calls <see cref="MySqlCommand.ExecuteNonQuery"/>, and closes
the connection. To accomplish this, the <B>ExecuteNonQuery</B> is
passed a connection string and a query string that is a SQL INSERT
statement.
<code lang="Visual Basic">
Public Function SelectRows(dataSet As DataSet, connection As String, query As String) As DataSet
Dim conn As New MySqlConnection(connection)
Dim adapter As New MySqlDataAdapter()
adapter.SelectCommand = new MySqlCommand(query, conn)
adapter.Fill(dataset)
Return dataset
End Function
</code>
<code lang="C#">
public DataSet SelectRows(DataSet dataset,string connection,string query)
{
MySqlConnection conn = new MySqlConnection(connection);
MySqlDataAdapter adapter = new MySqlDataAdapter();
adapter.SelectCommand = new MySqlCommand(query, conn);
adapter.Fill(dataset);
return dataset;
}
</code>
</example>
</MyMembers>
<MyMembers name="ConnectionTimeout">
<exception cref="System.ArgumentException">The value set is less than 0.</exception>
<remarks>
A value of 0 indicates no limit, and should be avoided in a <see cref="MySqlConnection.ConnectionString"/>
because an attempt to connect will wait indefinitely.
</remarks>
<example>
The following example creates a MySqlConnection
and sets some of its properties in the connection string.
<code lang="Visual Basic"><c>
Public Sub CreateSqlConnection()
Dim myConnection As New MySqlConnection()
myConnection.ConnectionString = "Persist Security Info=False;Username=user;Password=pass;database=test1;server=localhost;Connect Timeout=30"
myConnection.Open()
End Sub
</c></code>
<code lang="C#"><c>
public void CreateSqlConnection()
{
MySqlConnection myConnection = new MySqlConnection();
myConnection.ConnectionString = "Persist Security Info=False;Username=user;Password=pass;database=test1;server=localhost;Connect Timeout=30";
myConnection.Open();
}
</c></code>
</example>
</MyMembers>
</MyDocs>
@@ -0,0 +1,78 @@
<MyDocs>
<MyMembers name="Class">
<remarks>
<para>To create a <B>MySQLDataReader</B>, you must call the <see cref="MySqlCommand.ExecuteReader"/>
method of the <see cref="MySqlCommand"/> object, rather than directly using a constructor.
</para>
<para>While the <B>MySqlDataReader</B> is in use, the associated <see cref="MySqlConnection"/>
is busy serving the <B>MySqlDataReader</B>, and no other operations can be performed
on the <B>MySqlConnection</B> other than closing it. This is the case until the
<see cref="MySqlDataReader.Close"/> method of the <B>MySqlDataReader</B> is called.
</para>
<para>Changes made to a resultset by another process or thread while data is being
read may be visible to the user of the <B>MySqlDataReader</B>. However, the
precise behavior is timing dependent.
</para>
<para><see cref="MySqlDataReader.IsClosed"/> and <see cref="MySqlDataReader.RecordsAffected"/>
are the only properties that you can call after the <B>MySqlDataReader</B> is
closed. Though the <B>RecordsAffected</B> property may be accessed at any time
while the <B>MySqlDataReader</B> exists, always call <B>Close</B> before returning
the value of <B>RecordsAffected</B> to ensure an accurate return value.
</para>
<para>For optimal performance, <B>MySqlDataReader</B> avoids creating
unnecessary objects or making unnecessary copies of data. As a result, multiple calls
to methods such as <see cref="MySqlDataReader.GetValue"/> return a reference to the
same object. Use caution if you are modifying the underlying value of the objects
returned by methods such as <B>GetValue</B>.
</para>
</remarks>
<example>
The following example creates a <see cref="MySqlConnection"/>,
a <see cref="MySqlCommand"/>, and a <B>MySqlDataReader</B>. The example reads through
the data, writing it out to the console. Finally, the example closes the <B>MySqlDataReader</B>, then the
<B>MySqlConnection</B>.
<code lang="Visual Basic">
Public Sub ReadMyData(myConnString As String)
Dim mySelectQuery As String = "SELECT OrderID, CustomerID FROM Orders"
Dim myConnection As New MySqlConnection(myConnString)
Dim myCommand As New MySqlCommand(mySelectQuery, myConnection)
myConnection.Open()
Dim myReader As MySqlDataReader
myReader = myCommand.ExecuteReader()
' Always call Read before accessing data.
While myReader.Read()
Console.WriteLine((myReader.GetInt32(0) &amp; ", " &amp; myReader.GetString(1)))
End While
' always call Close when done reading.
myReader.Close()
' Close the connection when done with it.
myConnection.Close()
End Sub 'ReadMyData
</code>
<code lang="C#">
public void ReadMyData(string myConnString) {
string mySelectQuery = "SELECT OrderID, CustomerID FROM Orders";
MySqlConnection myConnection = new MySqlConnection(myConnString);
MySqlCommand myCommand = new MySqlCommand(mySelectQuery,myConnection);
myConnection.Open();
MySqlDataReader myReader;
myReader = myCommand.ExecuteReader();
// Always call Read before accessing data.
while (myReader.Read()) {
Console.WriteLine(myReader.GetInt32(0) + ", " + myReader.GetString(1));
}
// always call Close when done reading.
myReader.Close();
// Close the connection when done with it.
myConnection.Close();
}
</code>
</example>
</MyMembers>
</MyDocs>
@@ -0,0 +1,54 @@
<MyDocs>
<MyMembers name="Class">
<remarks>
<para>
This class is created whenever the ByteFX Data Provider for MySQL
encounters an error generated from the server.
</para>
<para>
Any open connections are not automatically closed when an exception is thrown. If
the client application determines that the exception is fatal, it should close any open
<see cref="MySqlDataReader"/> objects or <see cref="MySqlConnection"/> objects.
</para>
</remarks>
<example>
The following example generates a <B>MySqlException</B> due to a missing server,
and then displays the exception.
<code lang="Visual Basic">
Public Sub ShowException()
Dim mySelectQuery As String = "SELECT column1 FROM table1"
Dim myConnection As New MySqlConnection ("Data Source=localhost;Database=Sample;")
Dim myCommand As New MySqlCommand(mySelectQuery, myConnection)
Try
myCommand.Connection.Open()
Catch e As MySqlException
MessageBox.Show( e.Message )
End Try
End Sub
</code>
<code lang="C#">
public void ShowException()
{
string mySelectQuery = "SELECT column1 FROM table1";
MySqlConnection myConnection =
new MySqlConnection("Data Source=localhost;Database=Sample;");
MySqlCommand myCommand = new MySqlCommand(mySelectQuery,myConnection);
try
{
myCommand.Connection.Open();
}
catch (MySqlException e)
{
MessageBox.Show( e.Message );
}
}
</code>
</example>
</MyMembers>
</MyDocs>
@@ -0,0 +1,54 @@
<MyDocs>
<MyMembers name="Class">
<remarks>
<para>
This class is created whenever the ByteFX Data Provider for MySQL
encounters an error generated from the server.
</para>
<para>
Any open connections are not automatically closed when an exception is thrown. If
the client application determines that the exception is fatal, it should close any open
<see cref="MySqlDataReader"/> objects or <see cref="MySqlConnection"/> objects.
</para>
</remarks>
<example>
The following example generates a <B>MySqlException</B> due to a missing server,
and then displays the exception.
<code lang="Visual Basic">
Public Sub ShowException()
Dim mySelectQuery As String = "SELECT column1 FROM table1"
Dim myConnection As New MySqlConnection ("Data Source=localhost;Database=Sample;")
Dim myCommand As New MySqlCommand(mySelectQuery, myConnection)
Try
myCommand.Connection.Open()
Catch e As MySqlException
MessageBox.Show( e.Message )
End Try
End Sub
</code>
<code lang="C#">
public void ShowException()
{
string mySelectQuery = "SELECT column1 FROM table1";
MySqlConnection myConnection =
new MySqlConnection("Data Source=localhost;Database=Sample;");
MySqlCommand myCommand = new MySqlCommand(mySelectQuery,myConnection);
try
{
myCommand.Connection.Open();
}
catch (MySqlException e)
{
MessageBox.Show( e.Message );
}
}
</code>
</example>
</MyMembers>
</MyDocs>
@@ -0,0 +1,45 @@
<MyDocs>
<MyMembers name="Class">
<remarks>
Parameter names are not case sensitive.
</remarks>
<example>
The following example creates multiple instances of <B>MySqlParameter</B> through the
<see cref="MySqlParameterCollection"/> collection within the <see cref="MySqlDataAdapter"/>.
These parameters are used to select data from the data source and place the data
in the <see cref="DataSet"/>. This example assumes that a <B>DataSet</B> and a
<B>MySqlDataAdapter</B> have already been created with the appropriate schema, commands,
and connection.
<code lang="Visual Basic">
Public Sub AddSqlParameters()
' ...
' create myDataSet and myDataAdapter
' ...
myDataAdapter.SelectCommand.Parameters.Add("@CategoryName", MySqlDbType.VarChar, 80).Value = "toasters"
myDataAdapter.SelectCommand.Parameters.Add("@SerialNum", MySqlDbType.Long).Value = 239
myDataAdapter.Fill(myDataSet)
End Sub 'AddSqlParameters
</code>
<code lang="C#">
public void AddSqlParameters()
{
// ...
// create myDataSet and myDataAdapter
// ...
myDataAdapter.SelectCommand.Parameters.Add("@CategoryName", MySqlDbType.VarChar, 80).Value = "toasters";
myDataAdapter.SelectCommand.Parameters.Add("@SerialNum", MySqlDbType.Long).Value = 239;
myDataAdapter.Fill(myDataSet);
}
</code>
</example>
</MyMembers>
</MyDocs>
@@ -0,0 +1,45 @@
<MyDocs>
<MyMembers name="Class">
<remarks>
The number of the parameters in the collection must be equal to the number of
parameter placeholders within the command text, or an exception will be generated.
</remarks>
<example>
The following example creates multiple instances of <see cref="MySqlParameter"/>
through the <B>MySqlParameterCollection</B> collection within the <see cref="MySqlDataAdapter"/>.
These parameters are used to select data within the data source and place the data in
the <see cref="DataSet"/>. This code assumes that a <B>DataSet</B> and a <B>MySqlDataAdapter</B>
have already been created with the appropriate schema, commands, and connection.
<code lang="Visual Basic">
Public Sub AddParameters()
' ...
' create myDataSet and myDataAdapter
' ...
myDataAdapter.SelectCommand.Parameters.Add("@CategoryName", MySqlDbType.VarChar, 80).Value = "toasters"
myDataAdapter.SelectCommand.Parameters.Add("@SerialNum", MySqlDbType.Long).Value = 239
myDataAdapter.Fill(myDataSet)
End Sub 'AddSqlParameters
</code>
<code lang="C#">
public void AddSqlParameters()
{
// ...
// create myDataSet and myDataAdapter
// ...
myDataAdapter.SelectCommand.Parameters.Add("@CategoryName", MySqlDbType.VarChar, 80).Value = "toasters";
myDataAdapter.SelectCommand.Parameters.Add("@SerialNum", MySqlDbType.Long).Value = 239;
myDataAdapter.Fill(myDataSet);
}
</code>
</example>
</MyMembers>
</MyDocs>
@@ -0,0 +1,111 @@
<MyDocs>
<MyMembers name="Class">
<remarks>
The application creates a <B>MySqlTransaction</B> object by calling <see cref="MySqlConnection.BeginTransaction"/>
on the <see cref="MySqlConnection"/> object. All subsequent operations associated with the
transaction (for example, committing or aborting the transaction), are performed on the
<B>MySqlTransaction</B> object.
</remarks>
<example>
The following example creates a <see cref="MySqlConnection"/> and a <B>MySqlTransaction</B>.
It also demonstrates how to use the <see cref="MySqlConnection.BeginTransaction"/>,
<see cref="MySqlTransaction.Commit"/>, and <see cref="MySqlTransaction.Rollback"/> methods.
<code lang="Visual Basic">
Public Sub RunTransaction(myConnString As String)
Dim myConnection As New MySqlConnection(myConnString)
myConnection.Open()
Dim myCommand As MySqlCommand = myConnection.CreateCommand()
Dim myTrans As MySqlTransaction
' Start a local transaction
myTrans = myConnection.BeginTransaction()
' Must assign both transaction object and connection
' to Command object for a pending local transaction
myCommand.Connection = myConnection
myCommand.Transaction = myTrans
Try
myCommand.CommandText = "Insert into Region (RegionID, RegionDescription) VALUES (100, 'Description')"
myCommand.ExecuteNonQuery()
myCommand.CommandText = "Insert into Region (RegionID, RegionDescription) VALUES (101, 'Description')"
myCommand.ExecuteNonQuery()
myTrans.Commit()
Console.WriteLine("Both records are written to database.")
Catch e As Exception
Try
myTrans.Rollback()
Catch ex As MySqlException
If Not myTrans.Connection Is Nothing Then
Console.WriteLine("An exception of type " &amp; ex.GetType().ToString() &amp; _
" was encountered while attempting to roll back the transaction.")
End If
End Try
Console.WriteLine("An exception of type " &amp; e.GetType().ToString() &amp; _
"was encountered while inserting the data.")
Console.WriteLine("Neither record was written to database.")
Finally
myConnection.Close()
End Try
End Sub 'RunTransaction
</code>
<code lang="C#">
public void RunTransaction(string myConnString)
{
MySqlConnection myConnection = new MySqlConnection(myConnString);
myConnection.Open();
MySqlCommand myCommand = myConnection.CreateCommand();
MySqlTransaction myTrans;
// Start a local transaction
myTrans = myConnection.BeginTransaction();
// Must assign both transaction object and connection
// to Command object for a pending local transaction
myCommand.Connection = myConnection;
myCommand.Transaction = myTrans;
try
{
myCommand.CommandText = "Insert into Region (RegionID, RegionDescription) VALUES (100, 'Description')";
myCommand.ExecuteNonQuery();
myCommand.CommandText = "Insert into Region (RegionID, RegionDescription) VALUES (101, 'Description')";
myCommand.ExecuteNonQuery();
myTrans.Commit();
Console.WriteLine("Both records are written to database.");
}
catch(Exception e)
{
try
{
myTrans.Rollback();
}
catch (MySqlException ex)
{
if (myTrans.Connection != null)
{
Console.WriteLine("An exception of type " + ex.GetType() +
" was encountered while attempting to roll back the transaction.");
}
}
Console.WriteLine("An exception of type " + e.GetType() +
" was encountered while inserting the data.");
Console.WriteLine("Neither record was written to database.");
}
finally
{
myConnection.Close();
}
}
</code>
</example>
</MyMembers>
</MyDocs>
File diff suppressed because it is too large. Load diff
@@ -1,316 +1,316 @@
// ByteFX.Data data access components for .Net
// Copyright (C) 2002-2003 ByteFX, Inc.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
using System;
using System.Data;
using System.Collections;
using System.ComponentModel;
namespace ByteFX.Data.MySqlClient
{
/// <summary>
/// Represents a collection of parameters relevant to a <see cref="MySqlCommand"/> as well as their respective mappings to columns in a <see cref="DataSet"/>. This class cannot be inherited.
/// </summary>
/// <include file='docs/MySqlParameterCollection.xml' path='MyDocs/MyMembers[@name="Class"]/*'/>
[Editor(typeof(ByteFX.Data.Common.DBParametersEditor), typeof(System.Drawing.Design.UITypeEditor))]
[ListBindable(true)]
public sealed class MySqlParameterCollection : MarshalByRefObject, IDataParameterCollection,
IList, ICollection, IEnumerable
{
private ArrayList _parms = new ArrayList();
#region ICollection support
/// <summary>
/// Gets the number of MySqlParameter objects in the collection.
/// </summary>
public int Count
{
get { return _parms.Count; }
}
/// <summary>
/// Copies MySqlParameter objects from the MySqlParameterCollection to the specified array.
/// </summary>
/// <param name="array"></param>
/// <param name="index"></param>
public void CopyTo( Array array, int index )
{
_parms.CopyTo(array, index);
}
bool ICollection.IsSynchronized
{
get { return _parms.IsSynchronized; }
}
object ICollection.SyncRoot
{
get { return _parms.SyncRoot; }
}
#endregion
#region IList
/// <summary>
/// Removes all items from the collection.
/// </summary>
public void Clear()
{
_parms.Clear();
}
/// <summary>
/// Gets a value indicating whether a MySqlParameter exists in the collection.
/// </summary>
/// <param name="value">The value of the <see cref="MySqlParameter"/> object to find. </param>
/// <returns>true if the collection contains the <see cref="MySqlParameter"/> object; otherwise, false.</returns>
/// <overloads>Gets a value indicating whether a <see cref="MySqlParameter"/> exists in the collection.</overloads>
public bool Contains(object value)
{
return _parms.Contains(value);
}
/// <summary>
/// Gets the location of a <see cref="MySqlParameter"/> in the collection.
/// </summary>
/// <param name="value">The <see cref="MySqlParameter"/> object to locate. </param>
/// <returns>The zero-based location of the <see cref="MySqlParameter"/> in the collection.</returns>
/// <overloads>Gets the location of a <see cref="MySqlParameter"/> in the collection.</overloads>
public int IndexOf(object value)
{
return _parms.IndexOf(value);
}
/// <summary>
/// Inserts a MySqlParameter into the collection at the specified index.
/// </summary>
/// <param name="index"></param>
/// <param name="value"></param>
public void Insert(int index, object value)
{
_parms.Insert( index, value );
}
bool IList.IsFixedSize
{
get { return _parms.IsFixedSize; }
}
bool IList.IsReadOnly
{
get { return _parms.IsReadOnly; }
}
/// <summary>
/// Removes the specified MySqlParameter from the collection.
/// </summary>
/// <param name="value"></param>
public void Remove( object value )
{
_parms.Remove( value );
}
/// <summary>
/// Removes the specified <see cref="MySqlParameter"/> from the collection using a specific index.
/// </summary>
/// <param name="index">The zero-based index of the parameter. </param>
/// <overloads>Removes the specified <see cref="MySqlParameter"/> from the collection.</overloads>
public void RemoveAt( int index )
{
_parms.RemoveAt( index );
}
object IList.this[int index]
{
get { return this[index]; }
set
{
if (! (value is MySqlParameter)) throw new MySqlException("Only MySqlParameter objects may be stored");
this[index] = (MySqlParameter)value;
}
}
/// <summary>
/// Adds the specified <see cref="MySqlParameter"/> object to the <see cref="MySqlParameterCollection"/>.
/// </summary>
/// <param name="value">The <see cref="MySqlParameter"/> to add to the collection.</param>
/// <returns>The index of the new <see cref="MySqlParameter"/> object.</returns>
public int Add( object value )
{
if (! (value is MySqlParameter)) throw new MySqlException("Only MySqlParameter objects may be stored");
MySqlParameter p = (MySqlParameter)value;
if (p.ParameterName == null || p.ParameterName == String.Empty)
throw new MySqlException("Parameters must be named");
return _parms.Add(value);
}
#endregion
#region IDataParameterCollection
/// <summary>
/// Gets a value indicating whether a <see cref="MySqlParameter"/> with the specified parameter name exists in the collection.
/// </summary>
/// <param name="name">The name of the <see cref="MySqlParameter"/> object to find.</param>
/// <returns>true if the collection contains the parameter; otherwise, false.</returns>
public bool Contains(string name)
{
if (name[0] == '@')
name = name.Substring(1, name.Length-1);
foreach (MySqlParameter p in _parms)
{
if (p.ParameterName.ToLower().Equals( name.ToLower() )) return true;
}
return false;
}
/// <summary>
/// Gets the location of the <see cref="MySqlParameter"/> in the collection with a specific parameter name.
/// </summary>
/// <param name="parameterName">The name of the <see cref="MySqlParameter"/> object to retrieve. </param>
/// <returns>The zero-based location of the <see cref="MySqlParameter"/> in the collection.</returns>
public int IndexOf( string parameterName )
{
if (parameterName[0] == '@')
parameterName = parameterName.Substring(1, parameterName.Length-1);
for (int x=0; x < _parms.Count; x++)
{
MySqlParameter p = (MySqlParameter)_parms[x];
if (p.ParameterName.ToLower().Equals( parameterName.ToLower() )) return x;
}
throw new MySqlException("Parameter '" + parameterName + "' not found in collection");
}
/// <summary>
/// Removes the specified <see cref="MySqlParameter"/> from the collection using the parameter name.
/// </summary>
/// <param name="name">The name of the <see cref="MySqlParameter"/> object to retrieve. </param>
public void RemoveAt( string name )
{
int index = IndexOf( name );
_parms.RemoveAt(index);
}
object IDataParameterCollection.this[string name]
{
get { return this[name]; }
set
{
if (! (value is MySqlParameter)) throw new MySqlException("Only MySqlParameter objects may be stored");
this[name] = (MySqlParameter)value;
}
}
#endregion
#region IEnumerable
IEnumerator IEnumerable.GetEnumerator()
{
return ((IEnumerable)_parms).GetEnumerator();
}
#endregion
#region Public Methods
/// <summary>
/// Gets the <see cref="MySqlParameter"/> at the specified index.
/// </summary>
/// <overloads>Gets the <see cref="MySqlParameter"/> with a specified attribute.
/// [C#] In C#, this property is the indexer for the <see cref="MySqlParameterCollection"/> class.
/// </overloads>
public MySqlParameter this[int index]
{
get { return (MySqlParameter)_parms[index]; }
set { _parms[index] = value; }
}
/// <summary>
/// Gets the <see cref="MySqlParameter"/> with the specified name.
/// </summary>
public MySqlParameter this[string name]
{
get { return (MySqlParameter)_parms[ IndexOf( name ) ]; }
set { _parms[ IndexOf( name ) ] = value; }
}
/// <summary>
/// Adds the specified <see cref="MySqlParameter"/> object to the <see cref="MySqlParameterCollection"/>.
/// </summary>
/// <param name="value">The <see cref="MySqlParameter"/> to add to the collection.</param>
/// <returns>The index of the new <see cref="MySqlParameter"/> object.</returns>
public MySqlParameter Add(MySqlParameter value)
{
if ( value.ParameterName == null ) throw new ArgumentException("parameter must be named");
_parms.Add(value);
return value;
}
/// <summary>
/// Adds a <see cref="MySqlParameter"/> to the <see cref="MySqlParameterCollection"/> given the specified parameter name and value.
/// </summary>
/// <param name="parameterName">The name of the parameter.</param>
/// <param name="value">The <see cref="MySqlParameter.Value"/> of the <see cref="MySqlParameter"/> to add to the collection.</param>
/// <returns>The index of the new <see cref="MySqlParameter"/> object.</returns>
public MySqlParameter Add( string parameterName, object value )
{
return Add( new MySqlParameter( parameterName, value ) );
}
/// <summary>
/// Adds a <see cref="MySqlParameter"/> to the <see cref="MySqlParameterCollection"/> given the parameter name and the data type.
/// </summary>
/// <param name="parameterName">The name of the parameter.</param>
/// <param name="dbType">One of the <see cref="MySqlDbType"/> values. </param>
/// <returns>The index of the new <see cref="MySqlParameter"/> object.</returns>
public MySqlParameter Add(string parameterName, MySqlDbType dbType)
{
return Add(new MySqlParameter(parameterName, dbType));
}
/// <summary>
/// Adds a <see cref="MySqlParameter"/> to the <see cref="MySqlParameterCollection"/> with the parameter name, the data type, and the column length.
/// </summary>
/// <param name="parameterName">The name of the parameter.</param>
/// <param name="dbType">One of the <see cref="MySqlDbType"/> values. </param>
/// <param name="size">The length of the column.</param>
/// <returns>The index of the new <see cref="MySqlParameter"/> object.</returns>
public MySqlParameter Add(string parameterName, MySqlDbType dbType, int size)
{
return Add(new MySqlParameter(parameterName, dbType, size ));
}
/// <summary>
/// Adds a <see cref="MySqlParameter"/> to the <see cref="MySqlParameterCollection"/> with the parameter name, the data type, the column length, and the source column name.
/// </summary>
/// <param name="parameterName">The name of the parameter.</param>
/// <param name="dbType">One of the <see cref="MySqlDbType"/> values. </param>
/// <param name="size">The length of the column.</param>
/// <param name="sourceColumn">The name of the source column.</param>
/// <returns>The index of the new <see cref="MySqlParameter"/> object.</returns>
public MySqlParameter Add(string parameterName, MySqlDbType dbType, int size, string sourceColumn)
{
return Add(new MySqlParameter(parameterName, dbType, size, sourceColumn));
}
#endregion
}
}
// ByteFX.Data data access components for .Net
// Copyright (C) 2002-2003 ByteFX, Inc.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
using System;
using System.Data;
using System.Collections;
using System.ComponentModel;
namespace ByteFX.Data.MySqlClient
{
/// <summary>
/// Represents a collection of parameters relevant to a <see cref="MySqlCommand"/> as well as their respective mappings to columns in a <see cref="DataSet"/>. This class cannot be inherited.
/// </summary>
/// <include file='docs/MySqlParameterCollection.xml' path='MyDocs/MyMembers[@name="Class"]/*'/>
[Editor(typeof(ByteFX.Data.Common.DBParametersEditor), typeof(System.Drawing.Design.UITypeEditor))]
[ListBindable(true)]
public sealed class MySqlParameterCollection : MarshalByRefObject, IDataParameterCollection,
IList, ICollection, IEnumerable
{
private ArrayList _parms = new ArrayList();
#region ICollection support
/// <summary>
/// Gets the number of MySqlParameter objects in the collection.
/// </summary>
public int Count
{
get { return _parms.Count; }
}
/// <summary>
/// Copies MySqlParameter objects from the MySqlParameterCollection to the specified array.
/// </summary>
/// <param name="array"></param>
/// <param name="index"></param>
public void CopyTo( Array array, int index )
{
_parms.CopyTo(array, index);
}
bool ICollection.IsSynchronized
{
get { return _parms.IsSynchronized; }
}
object ICollection.SyncRoot
{
get { return _parms.SyncRoot; }
}
#endregion
#region IList
/// <summary>
/// Removes all items from the collection.
/// </summary>
public void Clear()
{
_parms.Clear();
}
/// <summary>
/// Gets a value indicating whether a MySqlParameter exists in the collection.
/// </summary>
/// <param name="value">The value of the <see cref="MySqlParameter"/> object to find. </param>
/// <returns>true if the collection contains the <see cref="MySqlParameter"/> object; otherwise, false.</returns>
/// <overloads>Gets a value indicating whether a <see cref="MySqlParameter"/> exists in the collection.</overloads>
public bool Contains(object value)
{
return _parms.Contains(value);
}
/// <summary>
/// Gets the location of a <see cref="MySqlParameter"/> in the collection.
/// </summary>
/// <param name="value">The <see cref="MySqlParameter"/> object to locate. </param>
/// <returns>The zero-based location of the <see cref="MySqlParameter"/> in the collection.</returns>
/// <overloads>Gets the location of a <see cref="MySqlParameter"/> in the collection.</overloads>
public int IndexOf(object value)
{
return _parms.IndexOf(value);
}
/// <summary>
/// Inserts a MySqlParameter into the collection at the specified index.
/// </summary>
/// <param name="index"></param>
/// <param name="value"></param>
public void Insert(int index, object value)
{
_parms.Insert( index, value );
}
bool IList.IsFixedSize
{
get { return _parms.IsFixedSize; }
}
bool IList.IsReadOnly
{
get { return _parms.IsReadOnly; }
}
/// <summary>
/// Removes the specified MySqlParameter from the collection.
/// </summary>
/// <param name="value"></param>
public void Remove( object value )
{
_parms.Remove( value );
}
/// <summary>
/// Removes the specified <see cref="MySqlParameter"/> from the collection using a specific index.
/// </summary>
/// <param name="index">The zero-based index of the parameter. </param>
/// <overloads>Removes the specified <see cref="MySqlParameter"/> from the collection.</overloads>
public void RemoveAt( int index )
{
_parms.RemoveAt( index );
}
object IList.this[int index]
{
get { return this[index]; }
set
{
if (! (value is MySqlParameter)) throw new MySqlException("Only MySqlParameter objects may be stored");
this[index] = (MySqlParameter)value;
}
}
/// <summary>
/// Adds the specified <see cref="MySqlParameter"/> object to the <see cref="MySqlParameterCollection"/>.
/// </summary>
/// <param name="value">The <see cref="MySqlParameter"/> to add to the collection.</param>
/// <returns>The index of the new <see cref="MySqlParameter"/> object.</returns>
public int Add( object value )
{
if (! (value is MySqlParameter)) throw new MySqlException("Only MySqlParameter objects may be stored");
MySqlParameter p = (MySqlParameter)value;
if (p.ParameterName == null || p.ParameterName == String.Empty)
throw new MySqlException("Parameters must be named");
return _parms.Add(value);
}
#endregion
#region IDataParameterCollection
/// <summary>
/// Gets a value indicating whether a <see cref="MySqlParameter"/> with the specified parameter name exists in the collection.
/// </summary>
/// <param name="name">The name of the <see cref="MySqlParameter"/> object to find.</param>
/// <returns>true if the collection contains the parameter; otherwise, false.</returns>
public bool Contains(string name)
{
if (name[0] == '@')
name = name.Substring(1, name.Length-1);
foreach (MySqlParameter p in _parms)
{
if (p.ParameterName.ToLower().Equals( name.ToLower() )) return true;
}
return false;
}
/// <summary>
/// Gets the location of the <see cref="MySqlParameter"/> in the collection with a specific parameter name.
/// </summary>
/// <param name="parameterName">The name of the <see cref="MySqlParameter"/> object to retrieve. </param>
/// <returns>The zero-based location of the <see cref="MySqlParameter"/> in the collection.</returns>
public int IndexOf( string parameterName )
{
if (parameterName[0] == '@')
parameterName = parameterName.Substring(1, parameterName.Length-1);
for (int x=0; x < _parms.Count; x++)
{
MySqlParameter p = (MySqlParameter)_parms[x];
if (p.ParameterName.ToLower().Equals( parameterName.ToLower() )) return x;
}
throw new MySqlException("Parameter '" + parameterName + "' not found in collection");
}
/// <summary>
/// Removes the specified <see cref="MySqlParameter"/> from the collection using the parameter name.
/// </summary>
/// <param name="name">The name of the <see cref="MySqlParameter"/> object to retrieve. </param>
public void RemoveAt( string name )
{
int index = IndexOf( name );
_parms.RemoveAt(index);
}
object IDataParameterCollection.this[string name]
{
get { return this[name]; }
set
{
if (! (value is MySqlParameter)) throw new MySqlException("Only MySqlParameter objects may be stored");
this[name] = (MySqlParameter)value;
}
}
#endregion
#region IEnumerable
IEnumerator IEnumerable.GetEnumerator()
{
return ((IEnumerable)_parms).GetEnumerator();
}
#endregion
#region Public Methods
/// <summary>
/// Gets the <see cref="MySqlParameter"/> at the specified index.
/// </summary>
/// <overloads>Gets the <see cref="MySqlParameter"/> with a specified attribute.
/// [C#] In C#, this property is the indexer for the <see cref="MySqlParameterCollection"/> class.
/// </overloads>
public MySqlParameter this[int index]
{
get { return (MySqlParameter)_parms[index]; }
set { _parms[index] = value; }
}
/// <summary>
/// Gets the <see cref="MySqlParameter"/> with the specified name.
/// </summary>
public MySqlParameter this[string name]
{
get { return (MySqlParameter)_parms[ IndexOf( name ) ]; }
set { _parms[ IndexOf( name ) ] = value; }
}
/// <summary>
/// Adds the specified <see cref="MySqlParameter"/> object to the <see cref="MySqlParameterCollection"/>.
/// </summary>
/// <param name="value">The <see cref="MySqlParameter"/> to add to the collection.</param>
/// <returns>The index of the new <see cref="MySqlParameter"/> object.</returns>
public MySqlParameter Add(MySqlParameter value)
{
if ( value.ParameterName == null ) throw new ArgumentException("parameter must be named");
_parms.Add(value);
return value;
}
/// <summary>
/// Adds a <see cref="MySqlParameter"/> to the <see cref="MySqlParameterCollection"/> given the specified parameter name and value.
/// </summary>
/// <param name="parameterName">The name of the parameter.</param>
/// <param name="value">The <see cref="MySqlParameter.Value"/> of the <see cref="MySqlParameter"/> to add to the collection.</param>
/// <returns>The index of the new <see cref="MySqlParameter"/> object.</returns>
public MySqlParameter Add( string parameterName, object value )
{
return Add( new MySqlParameter( parameterName, value ) );
}
/// <summary>
/// Adds a <see cref="MySqlParameter"/> to the <see cref="MySqlParameterCollection"/> given the parameter name and the data type.
/// </summary>
/// <param name="parameterName">The name of the parameter.</param>
/// <param name="dbType">One of the <see cref="MySqlDbType"/> values. </param>
/// <returns>The index of the new <see cref="MySqlParameter"/> object.</returns>
public MySqlParameter Add(string parameterName, MySqlDbType dbType)
{
return Add(new MySqlParameter(parameterName, dbType));
}
/// <summary>
/// Adds a <see cref="MySqlParameter"/> to the <see cref="MySqlParameterCollection"/> with the parameter name, the data type, and the column length.
/// </summary>
/// <param name="parameterName">The name of the parameter.</param>
/// <param name="dbType">One of the <see cref="MySqlDbType"/> values. </param>
/// <param name="size">The length of the column.</param>
/// <returns>The index of the new <see cref="MySqlParameter"/> object.</returns>
public MySqlParameter Add(string parameterName, MySqlDbType dbType, int size)
{
return Add(new MySqlParameter(parameterName, dbType, size ));
}
/// <summary>
/// Adds a <see cref="MySqlParameter"/> to the <see cref="MySqlParameterCollection"/> with the parameter name, the data type, the column length, and the source column name.
/// </summary>
/// <param name="parameterName">The name of the parameter.</param>
/// <param name="dbType">One of the <see cref="MySqlDbType"/> values. </param>
/// <param name="size">The length of the column.</param>
/// <param name="sourceColumn">The name of the source column.</param>
/// <returns>The index of the new <see cref="MySqlParameter"/> object.</returns>
public MySqlParameter Add(string parameterName, MySqlDbType dbType, int size, string sourceColumn)
{
return Add(new MySqlParameter(parameterName, dbType, size, sourceColumn));
}
#endregion
}
}
Loaded 100 of 2044 files, more files were not shown because too many files have changed in this diff. Show more