Compare commits

...
132 Commits
Author SHA1 Message Date
nobody 39c87c56fb This commit was manufactured by cvs2svn to create tag 'MCS_0_95'.
svn path=/tags/MCS_0_95/mcs/; revision=28626
2004-06-01 13:30:40 +00:00
Miguel de Icaza afe6148ebd 2004-06-01 Miguel de Icaza <[email protected]>
* String.cs: Flag concat with four arguments internal.

svn path=/trunk/mcs/; revision=28625
2004-06-01 13:30:40 +00:00
Ravindra da34629417 Minor correction in Pen.Dispose and SolidBrush.Dispose
svn path=/trunk/mcs/; revision=28624
2004-06-01 12:09:36 +00:00
Sebastien Pouliot c68c1bd6c0 2004-06-01 Sebastien Pouliot <[email protected]>
* SortedList.cs: Fixed case where the initial capacity was set to 0.

svn path=/trunk/mcs/; revision=28623
2004-06-01 12:09:27 +00:00
Sebastien Pouliot a2d18abb30 2004-06-01 Sebastien Pouliot <[email protected]>
* SortedListTest.cs: Added new test when initial capacity is set to 0
	(so it never returns to default, 16, when Capacity is set to 0) unless
	Clear is called. Cleaned up unused SetUp/TearDown.

svn path=/trunk/mcs/; revision=28622
2004-06-01 12:05:49 +00:00
Marek Safar dd7100cbbd 2004-06-01 Marek Safar <[email protected]>
* cs1555.cs,
	* cs1556.cs,
	* cs3000.cs: 3 new error tests.

svn path=/trunk/mcs/; revision=28621
2004-06-01 11:59:37 +00:00
Raja R Harinath 5a6cb5ce83 (monolite-bootstrap): Update.
svn path=/trunk/mono/; revision=28620
2004-06-01 10:02:34 +00:00
Raja R Harinath a90a8752fa (bootstrap,faststrap,fasterstrap): Refactor.
Fix 'faststrap' to be corlib-version-change-safe.
(one-stage-strap,two-stage-strap,three-stage-strap): Remove.

svn path=/trunk/mono/; revision=28619
2004-06-01 09:50:00 +00:00
Lluis Sanchez 2cf46f9f3a 2004-06-01 Gert Driesen <[email protected]>
* DiscoveryReference.cs: Added missing XmlIgnore attribute.

svn path=/trunk/mcs/; revision=28617
2004-06-01 08:59:06 +00:00
Lluis Sanchez d939457bb9 2004-06-01 Gert Driesen <[email protected]>
* HttpSoapWebServiceHandler.cs: Removed unused variables.
	* SoapHeaderAttribute.cs: Added Obsolete attribute.

svn path=/trunk/mcs/; revision=28616
2004-06-01 08:58:32 +00:00
Lluis Sanchez bc88cf65e9 * Binding.cs: removed extra XmlIgnore attribute on ServiceDescription
* Import.cs: removed extra XmlIgnore attribute on ServiceDescription
	* Message.cs: removed extra XmlIgnore attribute on ServiceDescription
	* MessageBinding.cs: removed extra DefaultValue attribute from Name,
	removed extra XmlIgnoreAttribute from OperationBinding
	* MessagePart.cs: removed extra XmlIgnore attribute on Message
	* MimeContentBinding.cs: removed extra DefaultValue attribute on Part
	* Operation.cs: removed extra XmlIgnore attribute on PortType
	* OperationBinding.cs: removed extra XmlIgnore attribute on Binding
	* OperationMessage.cs: removed extra XmlIgnore attribute on Operation
	* Port.cs: removed extra XmlIgnore attribute on Service
	* PortType.cs: removed extra XmlIgnore on ServiceDescription
	* Service.cs: removed extra XmlIgnore on ServiceDescription
	* ServiceDescriptionFormatExtension.cs: removed extra XmlIgnore
	  attribute on Parent
	* SoapHeaderBinding.cs: added XmlElement attribute on Fault
	* HttpSimpleProtocolImporter.cs: removed unused variable
	* ServiceDescriptionImporter.cs: removed unused variable
	* SoapProtocolImporter.cs: removed unused variable

svn path=/trunk/mcs/; revision=28615
2004-06-01 08:49:25 +00:00
Lluis Sanchez 11b23d5c2a * WebServicesConfigurationSectionHandler.cs: removed unused variables
svn path=/trunk/mcs/; revision=28614
2004-06-01 08:48:08 +00:00
Ravindra fdeac5a1d2 Patch from Gert Driesen.
svn path=/trunk/mcs/; revision=28613
2004-06-01 08:29:58 +00:00
Anirban Bhattacharjee 99bc5750c0 test cases for Delegate
svn path=/trunk/mcs/; revision=28612
2004-06-01 06:12:41 +00:00
Gonzalo Paniagua Javier f611271a66 2004-06-01 Gonzalo Paniagua Javier <[email protected]>
* HttpWorkerRequest.cs: the hashtables are now case-insensitive. Thanks
	to Markus Kr�utner.

svn path=/trunk/mcs/; revision=28611
2004-06-01 05:47:02 +00:00
Gonzalo Paniagua Javier ab10994d3d 2004-06-01 Gonzalo Paniagua Javier <[email protected]>
* RegexBugs.cs: added CategoryAndNegated test.

svn path=/trunk/mcs/; revision=28610
2004-06-01 05:45:05 +00:00
Gonzalo Paniagua Javier 4d8d5cc311 2004-06-01 Gonzalo Paniagua Javier <[email protected]>
* syntax.cs: re-applied my patch from 2004-05-27 plus a fix which is
	emitting a Category.All if both a category and its negated value are
	present.

svn path=/trunk/mcs/; revision=28609
2004-06-01 05:43:48 +00:00
Ravindra 46eac4f446 Formatting.
svn path=/trunk/mcs/; revision=28608
2004-06-01 05:10:45 +00:00
Ravindra e21f636e8c * Pen.cs: Added a note on Dispose method.
* Brush.cs: Fixed Dispose method.
	* SolidBrush.cs: Fixed Dispose method.

svn path=/trunk/mcs/; revision=28607
2004-06-01 05:00:16 +00:00
Sebastien Pouliot b1b8611ecf 2004-05-31 Sebastien Pouliot <[email protected]>
* ArrayTest.cs: Fixed array used for some tests. Strangely the tests
	didn't fail on MS runtime ?!?! but they should have!

svn path=/trunk/mcs/; revision=28606
2004-06-01 01:42:38 +00:00
Sebastien Pouliot da69c6c63c 2004-05-31 Sebastien Pouliot <[email protected]>
* PathTest.cs: Fixed ChangeExtension_BadExtension to run only on Windows.

svn path=/trunk/mcs/; revision=28605
2004-06-01 01:24:57 +00:00
Gonzalo Paniagua Javier 6e3884f14f 2004-06-01 Gonzalo Paniagua Javier <[email protected]>
* syntax.cs: reverting my previous patch. It causes bigger problems.

svn path=/trunk/mcs/; revision=28604
2004-06-01 01:01:23 +00:00
Sebastien Pouliot 0b06a8ac4c 2004-05-31 Sebastien Pouliot <[email protected]>
* Array.cs: Fixed legal case where value is null.
	* Byte.cs: Fixed ToString when format is an empty string (use "G").

svn path=/trunk/mcs/; revision=28603
2004-06-01 00:49:08 +00:00
Sebastien Pouliot 8b96bfb634 2004-05-31 Sebastien Pouliot <[email protected]>
* Guid.cs: Renamed private fields (and changed some to signed) to
	match MS implementation and allow serialization to work. Fix
	bug #59113.

svn path=/trunk/mcs/; revision=28602
2004-06-01 00:45:29 +00:00
Sebastien Pouliot e2c9c8c0bf 2004-05-31 Sebastien Pouliot <[email protected]>
* Hashtable.cs: Added ArgumentNullException in GetObjectData.

svn path=/trunk/mcs/; revision=28601
2004-06-01 00:44:10 +00:00
Sebastien Pouliot 585d7ffd41 2004-05-31 Sebastien Pouliot <[email protected]>
* ArrayListTest.cs: Added new test for null in BinarySearch.
	* HashtableTest.cs: Added null checking fro GetObjectData.

svn path=/trunk/mcs/; revision=28600
2004-06-01 00:20:08 +00:00
Sebastien Pouliot 93359ce5b4 2004-05-31 Sebastien Pouliot <[email protected]>
* FileTest.cs: Added tests to confirm that Exists never throws
	exceptions even for invalid filenames or for unexisting directories.
	* PathTest.cs: Added windows-specific tests that shows that
	ChangeExtension validate the input patch but doesn't validate the
	resulting path.

svn path=/trunk/mcs/; revision=28599
2004-06-01 00:16:12 +00:00
Sebastien Pouliot de8ffd34ed 2004-05-30 Sebastien Pouliot <[email protected]>
* ArrayTest.cs: Added tests for null values in BinarySearch.
	* Byte.cs: Added test for default ToString format value.

svn path=/trunk/mcs/; revision=28598
2004-06-01 00:11:50 +00:00
Gonzalo Paniagua Javier f82a1f85dd 2004-05-31 Gonzalo Paniagua Javier <[email protected]>
* HttpRequest.cs: nullify _sRequestRootVirtualDir and baseVirtualDir
	when SetFilePath is called. This way the cached values are reset and
	get the right value in case someone (namely SessionStateModule +
	cookieless session) changes the FilePath after the property cached its
	value. Fixes bug #59364.

svn path=/trunk/mcs/; revision=28586
2004-05-31 19:15:56 +00:00
Atsushi Eno e3cfa1cf7c 2004-05-31 Atsushi Enomoto <[email protected]>
* DataSet.cs : Loop-break of the last fix was incorrect.

svn path=/trunk/mcs/; revision=28585
2004-05-31 19:12:07 +00:00
Miguel de Icaza 3343ab394f version
svn path=/trunk/mcs/; revision=28575
2004-05-31 18:22:57 +00:00
Miguel de Icaza 749975515b version
svn path=/trunk/mcs/; revision=28574
2004-05-31 18:22:28 +00:00
Atsushi Eno 29bd87001f 2004-05-31 Atsushi Enomoto <[email protected]>
* DataSet.cs : When a row has no parent row but the table has parent
	  relation(s), that row had been always ignored.

svn path=/trunk/mcs/; revision=28572
2004-05-31 18:16:37 +00:00
Gonzalo Paniagua Javier 1263f41404 tired of those ^M
svn path=/trunk/mcs/; revision=28571
2004-05-31 18:14:08 +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
nobody 4e4824afab This commit was manufactured by cvs2svn to create branch 'SAVANNAH_CVS'.
svn path=/branches/SAVANNAH_CVS/mcs/; revision=6844
2002-08-21 10:08:33 +00:00
125 changed files with 3305 additions and 1793 deletions

No files matched your search

+4
View File
@@ -1,3 +1,7 @@
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.
+6 -2
View File
@@ -1,7 +1,7 @@
AC_INIT(README)
AC_CANONICAL_SYSTEM
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(mono,0.94)
AM_INIT_AUTOMAKE(mono,0.95)
AM_MAINTAINER_MODE
dnl
@@ -50,6 +50,9 @@ case "$host" in
libdl=
libgc_threads=win32
gc_default=boehm
with_nptl=no
with_sigaltstack=no
;;
*-*-*netbsd*)
platform_win32=no
@@ -898,6 +901,7 @@ if test x$platform_win32 = xno; then
AC_DEFINE_UNQUOTED(SIGVAL_PTR,$SIGVAL_PTR,[Pointer field name in 'union sigval'])
fi
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
@@ -949,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
+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.
+5
View File
@@ -1,3 +1,8 @@
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
+2 -2
View File
@@ -43,13 +43,13 @@ gacutil = $(topdir)/tools/gacutil/gacutil.exe
PACKAGE = 1.0
ifeq ($(PROFILE), net_2_0)
PACKAGE = 1.1
PACKAGE = 2.0
endif
all-local: $(the_lib)
install-local: $(the_lib) $(gacutil)
$(RUNTIME) $(gacutil) /i $(the_lib) /f /root $(DESTDIR)$(prefix)/lib /package 1.0
$(RUNTIME) $(gacutil) /i $(the_lib) /f /root $(DESTDIR)$(prefix)/lib /package $(PACKAGE)
uninstall-local: $(gacutil)
$(RUNTIME) $(gacutil) /u $$(basename $(the_lib) .dll) ; \
@@ -1,3 +1,16 @@
2004-05-31 Atsushi Enomoto <[email protected]>
* RncParser.jay : now error output is disabled.
* RncTokenizer.cs : It should not be public class.
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.
2004-05-09 Atsushi Enomoto <[email protected]>
* RncParser.jay :
File diff suppressed because it is too large. Load diff
@@ -16,7 +16,7 @@ using Commons.Xml.Relaxng;
namespace Commons.Xml.Relaxng.Rnc
{
public class RncTokenizer : Commons.Xml.Relaxng.Rnc.yyParser.yyInput
internal class RncTokenizer : Commons.Xml.Relaxng.Rnc.yyParser.yyInput
{
TextReader source;
@@ -1,3 +1,22 @@
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.
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.
2004-03-17 Atsushi Enomoto <[email protected]>
* RelaxngNameClass.cs : Introduced RelaxngNameClassList class.
@@ -14,7 +14,7 @@ using Commons.Xml.Relaxng.Derivative;
namespace Commons.Xml.Relaxng
{
public class Util
internal class Util
{
public static string ResolveUri (string baseUri, string href)
{
@@ -10,9 +10,6 @@
using System;
using System.Xml;
using System.Xml.Schema;
using Commons.Xml.Relaxng.XmlSchema;
using XSchema = System.Xml.Schema.XmlSchema;
namespace Commons.Xml.Relaxng
{
@@ -22,7 +22,7 @@ namespace Commons.Xml.Relaxng
public RelaxngException (string message) : base (message) {}
public RelaxngException (string message, Exception innerException)
: base (message, innerException) {}
public RelaxngException (string message, RdpPattern invalidatedPattern)
internal RelaxngException (string message, RdpPattern invalidatedPattern)
: base (message)
{
debugXml = RdpUtil.DebugRdpPattern (invalidatedPattern, new Hashtable ());
@@ -23,10 +23,10 @@ namespace Commons.Xml.Relaxng
"http://relaxng.org/ns/structure/1.0";
// object model fields
ArrayList starts = new ArrayList ();
ArrayList defs = new ArrayList ();
ArrayList includes = new ArrayList ();
ArrayList divs = new ArrayList ();
RelaxngGrammarContentList starts = new RelaxngGrammarContentList ();
RelaxngGrammarContentList defs = new RelaxngGrammarContentList ();
RelaxngGrammarContentList includes = new RelaxngGrammarContentList ();
RelaxngGrammarContentList divs = new RelaxngGrammarContentList ();
RelaxngDatatypeProvider provider;
@@ -75,19 +75,19 @@ namespace Commons.Xml.Relaxng
get { return RelaxngPatternType.Grammar; }
}
public IList Starts {
public RelaxngGrammarContentList Starts {
get { return starts; }
}
public IList Defines {
public RelaxngGrammarContentList Defines {
get { return defs; }
}
public IList Includes {
public RelaxngGrammarContentList Includes {
get { return includes; }
}
public IList Divs {
public RelaxngGrammarContentList Divs {
get { return divs; }
}
@@ -20,8 +20,10 @@ namespace Commons.Xml.Relaxng
static RelaxngMergedProvider ()
{
RelaxngMergedProvider p = new RelaxngMergedProvider ();
#if !PNET
p ["http://www.w3.org/2001/XMLSchema-datatypes"] = XsdDatatypeProvider.Instance;
p [XSchema.Namespace] = XsdDatatypeProvider.Instance;
#endif
p [String.Empty] = RelaxngNamespaceDatatypeProvider.Instance;
defaultProvider = p;
}
@@ -260,7 +260,6 @@ namespace Commons.Xml.Relaxng
public RelaxngNameClassList Names {
get { return names; }
set { names = value; }
}
public override void Write (XmlWriter writer)
@@ -121,7 +121,11 @@ namespace Commons.Xml.Relaxng
#endregion
#region Grammatical elements
public class RelaxngStart : RelaxngElementBase
public interface IGrammarContent
{
}
public class RelaxngStart : RelaxngElementBase, IGrammarContent
{
RelaxngPattern p;
string combine;
@@ -155,7 +159,7 @@ namespace Commons.Xml.Relaxng
}
}
public class RelaxngDefine : RelaxngElementBase
public class RelaxngDefine : RelaxngElementBase, IGrammarContent
{
string name;
private RelaxngPatternList patterns = new RelaxngPatternList ();
@@ -211,12 +215,12 @@ namespace Commons.Xml.Relaxng
}
}
public class RelaxngInclude : RelaxngElementBase
public class RelaxngInclude : RelaxngElementBase, IGrammarContent
{
string href;
IList starts = new ArrayList ();
IList defines = new ArrayList ();
IList divs = new ArrayList ();
RelaxngGrammarContentList starts = new RelaxngGrammarContentList ();
RelaxngGrammarContentList defines = new RelaxngGrammarContentList ();
RelaxngGrammarContentList divs = new RelaxngGrammarContentList ();
string ns;
public RelaxngInclude ()
@@ -228,15 +232,15 @@ namespace Commons.Xml.Relaxng
set { href = value; }
}
public IList Starts {
public RelaxngGrammarContentList Starts {
get { return starts; }
}
public IList Defines {
public RelaxngGrammarContentList Defines {
get { return defines; }
}
public IList Divs {
public RelaxngGrammarContentList Divs {
get { return divs; }
}
@@ -292,7 +296,7 @@ namespace Commons.Xml.Relaxng
// starts.
if (this.Starts.Count > 0 && g.Starts.Count == 0)
throw new RelaxngException ("When the included grammar does not contain start components, this include component must not contain start components.");
IList appliedStarts = (this.starts.Count > 0) ?
RelaxngGrammarContentList appliedStarts = (this.starts.Count > 0) ?
this.starts : g.Starts;
RelaxngDiv div = new RelaxngDiv ();
@@ -325,30 +329,30 @@ namespace Commons.Xml.Relaxng
}
}
public class RelaxngDiv : RelaxngElementBase
public class RelaxngDiv : RelaxngElementBase, IGrammarContent
{
IList starts = new ArrayList ();
IList defines = new ArrayList ();
IList includes = new ArrayList ();
IList divs = new ArrayList ();
RelaxngGrammarContentList starts = new RelaxngGrammarContentList ();
RelaxngGrammarContentList defines = new RelaxngGrammarContentList ();
RelaxngGrammarContentList includes = new RelaxngGrammarContentList ();
RelaxngGrammarContentList divs = new RelaxngGrammarContentList ();
public RelaxngDiv ()
{
}
public IList Starts {
public RelaxngGrammarContentList Starts {
get { return starts; }
}
public IList Defines {
public RelaxngGrammarContentList Defines {
get { return defines; }
}
public IList Includes {
public RelaxngGrammarContentList Includes {
get { return includes; }
}
public IList Divs {
public RelaxngGrammarContentList Divs {
get { return divs; }
}
@@ -480,6 +484,33 @@ namespace Commons.Xml.Relaxng
}
}
public class RelaxngGrammarContentList : CollectionBase
{
public RelaxngGrammarContentList ()
{
}
public void Add (IGrammarContent p)
{
List.Add (p);
}
public IGrammarContent this [int i] {
get { return this.List [i] as IGrammarContent; }
set { this.List [i] = value; }
}
public void Insert (int pos, IGrammarContent p)
{
List.Insert (pos, p);
}
public void Remove (IGrammarContent p)
{
List.Remove (p);
}
}
// strict to say, it's not a pattern ;)
public class RelaxngNotAllowed : RelaxngPattern
{
@@ -1317,7 +1348,7 @@ namespace Commons.Xml.Relaxng
}
}
public class RelaxngRefPattern
internal class RelaxngRefPattern
{
RelaxngPattern patternRef;
string name;
@@ -36,7 +36,7 @@ namespace Commons.Xml.Relaxng
ZeroOrMore = 17, // no use in derivative
Mixed = 18, // no use in derivative
Optional = 19, // no use in derivative
Include = 20, // no use in derivative
// Include = 20, // no use in derivative
ExternalRef = 21, // no use in derivative
ParentRef = 22, // no use in derivative
}
@@ -1,3 +1,7 @@
2004-05-30 Atsushi Enomoto <[email protected]>
* RncTests.cs : fixed test that got impossible to build anymore.
2004-05-08 Gonzalo Paniagua Javier <[email protected]>
* RelaxngValidatingReaderTests.cs: this compiled with mcs but fails with
@@ -24,7 +24,7 @@ namespace MonoTests.Commons.Xml.Relaxng
{
RncParser parser = new RncParser (new NameTable ());
using (StreamReader sr = new StreamReader ("Test/XmlFiles/relaxng.rnc")) {
RelaxngGrammar g = parser.Parse (sr);
RelaxngPattern g = parser.Parse (sr);
g.Compile ();
}
}
@@ -1,3 +1,10 @@
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.
2004-02-25 Atsushi Enomoto <[email protected]>
* Added README, Makefile, relaxngtest.cs, prep.xsl, copying.html
@@ -1,26 +1,44 @@
RUNTIME = mono
MCS_RUNTIME =
MCS = mcs
TESTS = relax-ng/001/i.rng
TEST_ARCHIVE = testSuite.zip
RNCTESTS = test/RNCTest.xml
RNCTEST_ARCHIVE = anglia-test-suite.zip
all : relaxngtest.exe anglia-test-runner.exe
relaxngtest.exe : relaxngtest.cs $(TESTS)
$(MCS_RUNTIME) $(MCS) relaxngtest.cs -r:Commons.Xml.Relaxng.dll
$(MCS_RUNTIME) $(MCS) -debug+ relaxngtest.cs -r:Commons.Xml.Relaxng.dll
anglia-test-runner.exe : anglia-test-runner.cs $(RNCTESTS)
$(MCS_RUNTIME) $(MCS) -debug+ anglia-test-runner.cs -r:Commons.Xml.Relaxng.dll
$(TESTS) : $(TEST_ARCHIVE) relax-ng
cd relax-ng; unzip -n ../$(TEST_ARCHIVE); \
xsltproc split.xsl spectest.xml; cd ..; \
cp prep.xsl relax-ng
$(RNCTESTS) : $(RNCTEST_ARCHIVE)
unzip -n anglia-test-suite.zip
$(TEST_ARCHIVE) :
wget http://www.thaiopensource.com/relaxng/testSuite.zip
$(RNCTEST_ARCHIVE) :
wget http://www.jeffrafter.com/anglia/anglia-test-suite.zip
relax-ng:
mkdir relax-ng
test :
test : relaxngtest.exe
$(RUNTIME) relaxngtest.exe
anglia-test : anglia-test-runner.exe
$(RUNTIME) anglia-test-runner.exe
# be careful to use it. This removes ALL files in xml-test-suite!
# clean:
# rm -rf xml-test-suite
@@ -1,17 +1,41 @@
* standalone RELAX NG test program for the Test Suite
** Introduction
* Standalone test collection for Commons.Xml.Relaxng.dll
** standalone RELAX NG test program for the Test Suite
It is a test runner for James Clark's test collection.
prep.xsl is included in Jing (a Java implementation of RELAX NG validator).
copying.html is license information for prep.xsl and relaxng.rng.
prep.xsl is originally included in Jing (a Java implementation of RELAX NG
validator). copying.html is license information for prep.xsl and relaxng.rng.
** Usage
To set up test runner, you need xsltproc, which is included in libxslt.
** standalone RELAX NG Compact Syntax test program for the "anglia" test suite
It is a test runner for Jeff Rafter's "anglia" RNC test collection.
** How to build
NOTE: To set up test runner, you need xsltproc, which is included in libxslt.
(Since the stylesheet uses extensions, we cannot use our xslt engine.)
"make" will download the test collection from http://www.thaiopensource.com/relaxng/testSuite.zip , run xsltproc and create test directories and files.
"make" will do the same as "make relaxngtest.exe" and
"make anglia-test-runner.exe".
"make relaxngtest.exe" will download the test collection from
http://www.thaiopensource.com/relaxng/testSuite.zip and then run
xsltproc to split tests and create test directories and files, and finally
will compile relaxngtest.cs.
"make anglia-test-runner.exe" will download the test collection from
http://www.jeffrafter.com/anglia/anglia-test-suite.zip , and then will expand
that archive, and finally will compile anglia-test-runner.cs.
*** How to run
"make test" will run relaxngtest.exe and will output the error cases.
"make anglia-test" will run anglia-test-runner.exe and will output the
error cases.
"make test" will run the test program and will output the error cases.
@@ -0,0 +1,46 @@
using System;
using System.IO;
using System.Xml;
using Commons.Xml.Relaxng;
using Commons.Xml.Relaxng.Rnc;
public class Driver
{
public static void Main ()
{
try {
XmlDocument doc = new XmlDocument ();
doc.Load ("test/RNCTest.xml");
int success = 0;
int failure = 0;
foreach (XmlElement el in doc.SelectNodes ("/RNCTestCases/TestCase")) {
string id = el.GetAttribute ("id");
bool isValid = el.GetAttribute ("legal") == "true";
RncParser p = new RncParser (new NameTable ());
try {
string s = new StreamReader ("test" + Path.DirectorySeparatorChar + el.GetAttribute ("path")).ReadToEnd ();
p.Parse (new StringReader (s));
if (isValid) {
success++;
// Console.Error.WriteLine ("valid " + id);
} else {
failure++;
Console.Error.WriteLine ("INCORRECTLY VALID " + id);
}
} catch (Exception ex) {
if (isValid) {
failure++;
Console.Error.WriteLine ("INCORRECTLY INVALID " + id + " --> " + ex.Message);
} else {
success++;
// Console.Error.WriteLine ("invalid " + id);
}
}
}
Console.Error.WriteLine ("Total success: " + success);
Console.Error.WriteLine ("Total failure: " + failure);
} catch (Exception ex) {
Console.Error.WriteLine ("Unexpected Exception: " + ex);
}
}
}
@@ -1,3 +1,7 @@
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)
2004-04-26 Rafael Teixeira <[email protected]>
* DateAndTime.cs:
Catch FormatException and rethrow as InvalidCastException in:
@@ -8,13 +8,15 @@
//
using System;
using Microsoft.VisualBasic.CompilerServices;
namespace Microsoft.VisualBasic
{
[Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute]
[StandardModule]
sealed public class Financial {
// Declarations
// Constructors
private Financial() {} // prevent public default constructor
// Properties
// Methods
[MonoTODO]
@@ -24,9 +26,9 @@ namespace Microsoft.VisualBasic
[MonoTODO]
public static System.Double IPmt (System.Double Rate, System.Double Per, System.Double NPer, System.Double PV, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(0)] System.Double FV, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(0)] Microsoft.VisualBasic.DueDate Due) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Double IRR (ref System.Double[] ValueArray, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(0.1)] ref System.Double Guess) { throw new NotImplementedException (); }
public static System.Double IRR (ref System.Double[] ValueArray, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(0.1)] System.Double Guess) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Double MIRR (ref System.Double[] ValueArray, ref System.Double FinanceRate, ref System.Double ReinvestRate) { throw new NotImplementedException (); }
public static System.Double MIRR (ref System.Double[] ValueArray, System.Double FinanceRate, System.Double ReinvestRate) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Double NPer (System.Double Rate, System.Double Pmt, System.Double PV, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(0)] System.Double FV, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(0)] Microsoft.VisualBasic.DueDate Due) { throw new NotImplementedException (); }
[MonoTODO]
@@ -1,3 +1,11 @@
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.
2004-04-29 Gonzalo Paniagua Javier <[email protected]>
* Mono.Data.SqliteClient/SqliteCommand.cs: implement LastInsertRowId.
@@ -5,3 +5,4 @@ Mono.Data.SqliteClient/SqliteConnection.cs
Mono.Data.SqliteClient/SqliteDataReader.cs
Mono.Data.SqliteClient/SqliteParameter.cs
Mono.Data.SqliteClient/SqliteParameterCollection.cs
Mono.Data.SqliteClient/SqliteTransaction.cs
@@ -174,8 +174,16 @@ namespace Mono.Data.SqliteClient
}
public IDbTransaction BeginTransaction ()
{
return null;
{
if (state != ConnectionState.Open)
throw new InvalidOperationException("Invalid operation: The connection is close");
SqliteTransaction t = new SqliteTransaction();
t.Connection = this;
SqliteCommand cmd = this.CreateCommand();
cmd.CommandText = "BEGIN";
cmd.ExecuteNonQuery();
return t;
}
public IDbTransaction BeginTransaction (IsolationLevel il)
@@ -0,0 +1,94 @@
// Mono.Data.SqliteClient data access components for .Net
// Derived from ByteFX.Data
// With permission from Reggie Burnett to relicense under MIT/X11
using System;
using System.Data;
namespace Mono.Data.SqliteClient
{
/// <summary>
/// Represents a SQL transaction to be made in a Sqlite database. This class cannot be inherited.
/// </summary>
public sealed class SqliteTransaction : IDbTransaction
{
private IsolationLevel _level;
private SqliteConnection _conn;
private bool _open;
internal SqliteTransaction()
{
_open = true;
}
#region Properties
/// <summary>
/// Gets the <see cref="SqliteConnection"/> object associated with the transaction, or a null reference (Nothing in Visual Basic) if the transaction is no longer valid.
/// </summary>
public IDbConnection Connection
{
get { return _conn; }
set { _conn = (SqliteConnection)value; }
}
/// <summary>
/// Specifies the <see cref="IsolationLevel"/> for this transaction.
/// </summary>
public IsolationLevel IsolationLevel
{
get { return _level; }
set { _level = value; }
}
#endregion
void System.IDisposable.Dispose()
{
}
/// <summary>
/// Commits the database transaction.
/// </summary>
public void Commit()
{
if (_conn == null || _conn.State != ConnectionState.Open)
throw new InvalidOperationException("Connection must be valid and open to commit transaction");
if (!_open)
throw new InvalidOperationException("Transaction has already been committed or is not pending");
try
{
SqliteCommand cmd = _conn.CreateCommand();
cmd.CommandText = "COMMIT";
cmd.ExecuteNonQuery();
_open = false;
}
catch (Exception ex)
{
throw ex;
}
}
/// <summary>
/// Overloaded. Rolls back a transaction from a pending state.
/// </summary>
public void Rollback()
{
if (_conn == null || _conn.State != ConnectionState.Open)
throw new InvalidOperationException("Connection must be valid and open to commit transaction");
if (!_open)
throw new InvalidOperationException("Transaction has already been rolled back or is not pending");
try
{
SqliteCommand cmd = _conn.CreateCommand();
cmd.CommandText = "COMMIT";
cmd.ExecuteNonQuery();
_open = false;
}
catch (Exception ex)
{
throw ex;
}
}
}
}
+7
View File
@@ -1,3 +1,10 @@
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)
2004-05-31 Rafael Teixeira <[email protected]>
* OptionDetails.cs: Assemble an one-line authors' list in about processor (also abandon after about)
2004-04-08 Rafael Teixeira <[email protected]>
* OptionDetails.cs: Implemented Jonathan Pryor request for multiplicity in boolean properties
+20 -29
View File
@@ -28,13 +28,14 @@ namespace Mono.GetOptions
internal class OptionDetails : IComparable
{
public char ShortForm;
public string ShortForm;
public string LongForm;
public string AlternateForm;
public string ShortDescription;
public bool NeedsParameter;
public int MaxOccurs; // negative means there is no limit
public int Occurs;
public bool BooleanOption;
public Options OptionBundle;
public MemberInfo MemberInfo;
public ArrayList Values;
@@ -74,6 +75,7 @@ namespace Mono.GetOptions
// TODO: Yet not that good
string shortPrefix;
string longPrefix;
bool hasLongForm = (this.LongForm != null && this.LongForm != string.Empty);
if(this.OptionBundle.ParsingMode == Mono.GetOptions.OptionsParsingMode.Windows)
{
shortPrefix = "/";
@@ -85,11 +87,11 @@ namespace Mono.GetOptions
longPrefix = "--";
}
optionHelp = " ";
optionHelp += (this.ShortForm != ' ') ? shortPrefix+this.ShortForm+" " : " ";
optionHelp += (this.LongForm != string.Empty && this.LongForm != null) ? longPrefix+this.LongForm : "";
optionHelp += (this.ShortForm != string.Empty) ? shortPrefix+this.ShortForm+" " : " ";
optionHelp += hasLongForm ? longPrefix+this.LongForm : "";
if (NeedsParameter)
{
if (this.LongForm != string.Empty && this.LongForm != null)
if (hasLongForm)
optionHelp += ":";
optionHelp += ParamName;
}
@@ -125,12 +127,13 @@ namespace Mono.GetOptions
public OptionDetails(MemberInfo memberInfo, OptionAttribute option, Options optionBundle)
{
this.ShortForm = option.ShortForm;
this.ShortForm = ("" + option.ShortForm).Trim();
this.LongForm = (option.LongForm == string.Empty)? memberInfo.Name:option.LongForm;
this.AlternateForm = option.AlternateForm;
this.ShortDescription = option.ShortDescription;
this.Occurs = 0;
this.OptionBundle = optionBundle;
this.BooleanOption = false;
this.MemberInfo = memberInfo;
this.NeedsParameter = false;
this.Values = null;
@@ -166,6 +169,7 @@ namespace Mono.GetOptions
}
else
{
this.BooleanOption = true;
if (option.MaxOccurs != 1)
{
if (this.MemberInfo is MethodInfo || this.MemberInfo is PropertyInfo)
@@ -180,7 +184,7 @@ namespace Mono.GetOptions
internal string Key
{
get { return ((this.ShortForm != ' ') ? this.ShortForm + "" : "") + this.LongForm; }
get { return this.ShortForm + this.LongForm; }
}
int IComparable.CompareTo(object other)
@@ -217,7 +221,7 @@ namespace Mono.GetOptions
throw new IndexOutOfRangeException("Option " + ShortForm + " can be used at most " + MaxOccurs + " times");
}
private void DoIt()
private void DoIt(bool setValue)
{
if (!NeedsParameter)
{
@@ -228,12 +232,12 @@ namespace Mono.GetOptions
if (MemberInfo is FieldInfo)
{
((FieldInfo)MemberInfo).SetValue(OptionBundle, true);
((FieldInfo)MemberInfo).SetValue(OptionBundle, setValue);
return;
}
if (MemberInfo is PropertyInfo)
{
((PropertyInfo)MemberInfo).SetValue(OptionBundle, true, null);
((PropertyInfo)MemberInfo).SetValue(OptionBundle, setValue, null);
return;
}
if ((WhatToDoNext)((MethodInfo)MemberInfo).Invoke(OptionBundle, null) == WhatToDoNext.AbandonProgram)
@@ -287,17 +291,12 @@ namespace Mono.GetOptions
}
}
private bool StartsLikeAnOption(string arg)
{
return (arg != null && arg[0] == '-');
}
private bool IsThisOption(string arg)
{
if (StartsLikeAnOption(arg))
if (arg != null && arg != string.Empty)
{
arg = arg.TrimStart('-');
return (arg == "" + ShortForm || arg == LongForm || arg == AlternateForm);
arg = arg.TrimStart('-', '/');
return (arg == ShortForm || arg == LongForm || arg == AlternateForm);
}
return false;
}
@@ -308,27 +307,19 @@ namespace Mono.GetOptions
{
if (!NeedsParameter)
{
DoIt();
DoIt(true); // in preparation for vbc-like booleans
return OptionProcessingResult.OptionAlone;
}
else
{
if (StartsLikeAnOption(nextArg))
{
DoIt(null);
return OptionProcessingResult.OptionAlone;
}
else
{
DoIt(nextArg);
return OptionProcessingResult.OptionConsumedParameter;
}
DoIt(nextArg);
return OptionProcessingResult.OptionConsumedParameter;
}
}
if (IsThisOption(arg + ":" + nextArg))
{
DoIt();
DoIt(true);
return OptionProcessingResult.OptionConsumedParameter;
}
+29 -31
View File
@@ -10,6 +10,7 @@ using System;
using System.Collections;
using System.IO;
using System.Reflection;
using System.Text;
namespace Mono.GetOptions
{
@@ -48,6 +49,12 @@ namespace Mono.GetOptions
private ArrayList argumentsTail = new ArrayList();
private MethodInfo argumentProcessor = null;
internal bool MaybeAnOption(string arg)
{
return ((parsingMode & OptionsParsingMode.Windows) > 0 && arg[0] == '/') ||
((parsingMode & OptionsParsingMode.Linux) > 0 && arg[0] == '-');
}
public string Usage
{
get
@@ -189,10 +196,17 @@ namespace Mono.GetOptions
{
ShowTitleLines();
Console.WriteLine(appAboutDetails);
Console.WriteLine();
Console.WriteLine("Authors:");
StringBuilder sb = new StringBuilder("Authors: ");
bool first = true;
foreach(string s in appAuthors)
Console.WriteLine ("\t" + s);
{
if (first)
first = false;
else
sb.Append(", ");
sb.Append(s);
}
Console.WriteLine(sb.ToString());
}
private void ShowHelp()
@@ -209,7 +223,7 @@ namespace Mono.GetOptions
Console.WriteLine(Usage);
Console.Write("Short Options: ");
foreach (OptionDetails option in list)
Console.Write((option.ShortForm != ' ') ? option.ShortForm.ToString() : "");
Console.Write(option.ShortForm.Trim());
Console.WriteLine();
}
@@ -229,7 +243,7 @@ namespace Mono.GetOptions
internal WhatToDoNext DoAbout()
{
ShowAbout();
return WhatToDoNext.GoAhead;
return WhatToDoNext.AbandonProgram;
}
internal WhatToDoNext DoHelp()
@@ -296,35 +310,19 @@ namespace Mono.GetOptions
continue;
}
if (arg[0] == '/')
if ((parsingMode & OptionsParsingMode.Linux) > 0 &&
arg[0] == '-' && arg[1] != '-' &&
breakSingleDashManyLettersIntoManyOptions)
{
if ((parsingMode & OptionsParsingMode.Windows) > 0)
{
string newArg = '-' + arg.TrimStart('/');
result.AddRange(newArg.Split(':'));
continue;
}
foreach(char c in arg.Substring(1)) // many single-letter options
result.Add("-" + c); // expand into individualized options
continue;
}
if ((parsingMode & OptionsParsingMode.Linux) > 0)
if (MaybeAnOption(arg))
{
if ((arg[0] == '-') && (arg[1] != '-'))
{
if (breakSingleDashManyLettersIntoManyOptions)
{
foreach(char c in arg.Substring(1)) // many single-letter options
result.Add("-" + c); // expand into individualized options
}
else
result.Add(arg);
continue;
}
if (arg.StartsWith("--"))
{
result.AddRange(arg.Split('=')); // put in the same form of one-letter options with a parameter
continue;
}
result.AddRange(arg.Split(':','='));
continue;
}
}
else
@@ -364,7 +362,7 @@ namespace Mono.GetOptions
OptionWasProcessed = false;
if (arg.StartsWith("-"))
if (arg.StartsWith("-") || arg.StartsWith("/"))
{
foreach(OptionDetails option in list)
{
@@ -30,7 +30,11 @@ namespace System.Data.Common {
[Obsolete ("use DBDataPermission (PermissionState.None)", true)]
#endif
protected DBDataPermission ()
#if NET_2_0
: this (PermissionState.None)
#else
: this (PermissionState.None, false)
#endif
{
}
@@ -30,7 +30,11 @@ namespace System.Data.SqlClient {
[Obsolete ("Use SqlClientPermission(PermissionState.None)", true)]
public SqlClientPermission ()
#if NET_2_0
: this (PermissionState.None)
#else
// : this (PermissionState.None, false)
#endif
{
}
@@ -41,6 +45,9 @@ namespace System.Data.SqlClient {
[Obsolete ("Use SqlClientPermission(PermissionState.None)", true)]
public SqlClientPermission (PermissionState state, bool allowBlankPassword)
#if NET_2_0
: this (state)
#endif
{
AllowBlankPassword = allowBlankPassword;
}
@@ -1,3 +1,32 @@
2004-05-31 Atsushi Enomoto <[email protected]>
* DataSet.cs : Loop-break of the last fix was incorrect.
2004-05-31 Atsushi Enomoto <[email protected]>
* DataSet.cs : When a row has no parent row but the table has parent
relation(s), that row had been always ignored.
2004-05-31 Atsushi Enomoto <[email protected]>
* XmlDataInferenceLoader.cs : Fixed GetMappedTable() that incorrectly
rejected same-named tables in different hierarchy. Thanks to Boris.
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.
2004-05-31 Atsushi Enomoto <[email protected]>
* XmlDataInferenceLoader.cs : XmlSchema elements should not be infered.
Thanks to Boris for this fix.
2004-05-30 Atsushi Enomoto <[email protected]>
* DataTable.cs : serialization .ctor() should use XmlReadMode.DiffGram
for ReadXml(). Thanks to Boris.
2004-05-27 Boris Kirzner <[email protected]>
* DataRow.cs :
- CheckReadOnlyStatus : use typed (and faster comparing).
+24 -1
View File
@@ -1117,13 +1117,14 @@ namespace System.Data {
//part of another table structure via a nested parent relationship
foreach (DataTable table in tableCollection) {
bool isTopLevel = true;
/*
foreach (DataRelation rel in table.ParentRelations) {
if (rel.Nested) {
isTopLevel = false;
break;
}
}
*/
if (isTopLevel) {
WriteTable ( writer, table, mode, version);
}
@@ -1150,8 +1151,30 @@ namespace System.Data {
SplitColumns (table, out atts, out elements, out simple);
//sort out the namespacing
string nspc = table.Namespace.Length > 0 ? table.Namespace : Namespace;
int relationCount = table.ParentRelations.Count;
DataRelation oneRel = relationCount == 1 ? table.ParentRelations [0] : null;
foreach (DataRow row in rows) {
// Skip rows that is a child of any tables.
switch (relationCount) {
case 0:
break;
case 1:
if (row.GetParentRow (oneRel) != null)
continue;
break;
case 2:
bool skip = false;
for (int i = 0; i < table.ParentRelations.Count; i++)
if (row.GetParentRow (table.ParentRelations [i]) != null) {
skip = true;
continue;
}
if (skip)
continue;
break;
}
if (!row.HasVersion(version) ||
(mode == XmlWriteMode.DiffGram && row.RowState == DataRowState.Unchanged
&& version == DataRowVersion.Original))
@@ -141,7 +141,7 @@ namespace System.Data {
ds.Tables [0].CopyProperties (this);
ds = new DataSet ();
ds.Tables.Add (this);
ds.ReadXml (new StringReader (data), XmlReadMode.IgnoreSchema);
ds.ReadXml (new StringReader (data), XmlReadMode.DiffGram);
ds.Tables.Remove (this);
/* keeping for a while. With the change above, we shouldn't have to consider
* DataTable mode in schema inference/read.
@@ -15,6 +15,7 @@ using System.Data;
using System.IO; // for Driver
using System.Text; // for Driver
using System.Xml;
using System.Xml.Schema;
using System.Xml.Serialization;
namespace System.Data
@@ -165,9 +166,12 @@ namespace System.Data
dataset.DataSetName = localName;
dataset.Namespace = el.NamespaceURI;
dataset.Prefix = el.Prefix;
foreach (XmlNode n in el.ChildNodes)
foreach (XmlNode n in el.ChildNodes) {
if (n.NamespaceURI == XmlSchema.Namespace)
continue;
if (n.NodeType == XmlNodeType.Element)
InferTopLevelTable (n as XmlElement);
}
}
foreach (TableMapping map in tables) {
@@ -374,7 +378,7 @@ namespace System.Data
{
TableMapping map = tables [tableName];
if (map != null) {
if (map.ParentTable != parent)
if (parent != null && map.ParentTable != null && map.ParentTable != parent)
throw new DataException (String.Format ("The table {0} is already allocated as another table's child table.", tableName));
} else {
map = new TableMapping (tableName, ns);
@@ -93,8 +93,10 @@ namespace System.Data {
private void LoadCurrent (XmlReader reader)
{
if (reader.IsEmptyElement) return;
if (reader.IsEmptyElement) {
reader.Skip ();
return;
}
reader.ReadStartElement (); // Dataset root
reader.MoveToContent ();
@@ -122,8 +124,10 @@ namespace System.Data {
private void LoadBefore (XmlReader reader)
{
if (reader.IsEmptyElement) return;
if (reader.IsEmptyElement) {
reader.Skip ();
return;
}
reader.ReadStartElement ();
reader.MoveToContent ();
@@ -147,8 +151,10 @@ namespace System.Data {
private void LoadErrors (XmlReader reader)
{
if (reader.IsEmptyElement) return;
if (reader.IsEmptyElement) {
reader.Skip ();
return;
}
reader.ReadStartElement ();
reader.MoveToContent ();
@@ -184,8 +190,10 @@ namespace System.Data {
private void LoadColumns (DataTable Table, DataRow Row, XmlReader reader, DataRowVersion loadType)
{
if (reader.IsEmptyElement) return;
if (reader.IsEmptyElement) {
reader.Skip ();
return;
}
reader.ReadStartElement ();
reader.MoveToContent ();
@@ -1,3 +1,9 @@
2004-05-31 Atsushi Enomoto <[email protected]>
* DataTableTest.cs : Added test for serialization by Boris Kirzner.
* DataSetInferXmlSchemaTest.cs : Added test for schema element skip
by Boris Kirzner.
2004-05-27 Nick Drochak <[email protected]>
* DataRelationCollectionTest.cs: Fixed build when using csc.
@@ -475,5 +475,35 @@ namespace MonoTests.System.Data
// a:foo is ignored
AssertDataTable ("dt", ds.Tables [0], "root", 1, 0, 0, 0, 0, 0);
}
[Test]
public void ContainsSchema ()
{
DataSet ds = new DataSet();
DataTable dt1 = new DataTable();
ds.Tables.Add(dt1);
DataColumn dc1 = new DataColumn("Col1");
dt1.Columns.Add(dc1);
dt1.Rows.Add(new string[] { "aaa" } );
DataTable dt2 = new DataTable();
ds.Tables.Add(dt2);
DataColumn dc2 = new DataColumn("Col2");
dt2.Columns.Add(dc2);
dt2.Rows.Add(new string[] { "bbb" } );
DataRelation rel = new DataRelation("Rel1",dc1,dc2,false);
ds.Relations.Add(rel);
StringWriter sw = new StringWriter ();
ds.WriteXml(sw, XmlWriteMode.WriteSchema);
ds = new DataSet();
ds.ReadXml(new StringReader (sw.ToString ()));
sw = new StringWriter ();
ds.WriteXml(sw);
XmlDocument doc = new XmlDocument ();
doc.LoadXml (sw.ToString ());
AssertEquals (2, doc.DocumentElement.ChildNodes.Count);
}
}
}
@@ -12,6 +12,9 @@ using NUnit.Framework;
using System;
using System.Data;
using System.Globalization;
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
using System.Xml;
namespace MonoTests.System.Data
{
@@ -1169,5 +1172,54 @@ namespace MonoTests.System.Data
#endif
AssertEquals ("#A05", 0, table.ChildRelations.Count);
}
[Test]
public void Serialize ()
{
MemoryStream fs = new MemoryStream ();
// Construct a BinaryFormatter and use it
// to serialize the data to the stream.
BinaryFormatter formatter = new BinaryFormatter();
// Create an array with multiple elements refering to
// the one Singleton object.
DataTable dt = new DataTable();
dt.Columns.Add(new DataColumn("Id", typeof(string)));
dt.Columns.Add(new DataColumn("ContactName", typeof(string)));
dt.Columns.Add(new DataColumn("ContactTitle", typeof(string)));
dt.Columns.Add(new DataColumn("ContactAreaCode", typeof(string)));
dt.Columns.Add(new DataColumn("ContactPhone", typeof(string)));
DataRow loRowToAdd;
loRowToAdd = dt.NewRow();
loRowToAdd[0] = "a";
loRowToAdd[1] = "b";
loRowToAdd[2] = "c";
loRowToAdd[3] = "d";
loRowToAdd[4] = "e";
dt.Rows.Add(loRowToAdd);
DataTable[] dtarr = new DataTable[] {dt};
// Serialize the array elements.
formatter.Serialize(fs, dtarr);
// Deserialize the array elements.
fs.Position = 0;
DataTable[] a2 = (DataTable[]) formatter.Deserialize(fs);
DataSet ds = new DataSet();
ds.Tables.Add(a2[0]);
StringWriter sw = new StringWriter ();
ds.WriteXml(sw);
XmlDocument doc = new XmlDocument ();
doc.LoadXml (sw.ToString ());
AssertEquals (5, doc.DocumentElement.FirstChild.ChildNodes.Count);
}
}
}
@@ -1,3 +1,9 @@
2004-05-31 Ravindra <[email protected]>
* 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.
2004-05-04 Ravindra <[email protected]>
* ImageRotateFlip.cs: Changed text color from white to
@@ -17,7 +17,7 @@ public class graphicsUI
public static void Main ()
{
Bitmap bmp = new Bitmap (300, 300);
Bitmap bmp = new Bitmap (400, 600);
Graphics dc = Graphics.FromImage (bmp);
// Clears and set the background color to red
@@ -28,34 +28,44 @@ public class graphicsUI
SolidBrush yellowBrush = new SolidBrush (Color.Yellow);
SolidBrush whiteBrush = new SolidBrush (Color.White);
Pen bluePen = new Pen (Color.Blue);
Rectangle rect1 = new Rectangle (0,0, 75, 75);
dc.DrawPie (bluePen, rect1, 10, 60);
Rectangle rect2 = new Rectangle (100,100, 75, 75);
dc.DrawPie (bluePen, rect2, 100, 75);
Rectangle rect2a = new Rectangle (100, 200, 75, 75);
dc.DrawPie (bluePen, rect2a, 100, 400);
// We have a column starting at x=50 for Draw operations
// and another column starting at x=200 for Fill operations.
// Both the columns grow downwards.
// Column 1
Rectangle rect11 = new Rectangle (50, 0, 75, 75);
dc.DrawPie (bluePen, rect11, 10, 60);
Rectangle rect3 = new Rectangle (100, 0, 75, 75);
dc.FillPie (yellowBrush, rect3, 0, 300);
Rectangle rect12 = new Rectangle (50,100, 75, 75);
dc.DrawPie (bluePen, rect12, 100, 75);
Rectangle rect13 = new Rectangle (50, 200, 75, 75);
dc.DrawPie (bluePen, rect13, 100, 400);
Rectangle rect14 = new Rectangle (50, 300, 75, 75);
dc.DrawPie (bluePen, rect14, 0, 0);
// Column 2
Rectangle rect21 = new Rectangle (200, 0, 75, 75);
dc.FillPie (yellowBrush, rect21, 0, 300);
Rectangle rect4 = new Rectangle (0, 100, 75, 75);
dc.FillPie (whiteBrush, rect4, 200, 30);
Rectangle rect22 = new Rectangle (200, 100, 75, 75);
dc.FillPie (whiteBrush, rect22, 200, 30);
Rectangle rect4a = new Rectangle (0, 100, 75, 75);
dc.FillPie (whiteBrush, rect4a, 200, 400);
Rectangle rect23 = new Rectangle (200, 200, 75, 75);
dc.FillPie (whiteBrush, rect23, 200, 400);
Rectangle rect5 = new Rectangle (200, 0, 75, 75);
dc.FillPie (yellowBrush, rect5, 190, 300);
Rectangle rect24 = new Rectangle (200, 300, 75, 75);
dc.FillPie (yellowBrush, rect24, 190, 300);
Rectangle rect6 = new Rectangle (200, 100, 75, 75);
dc.FillPie (whiteBrush, rect6, 200, 20);
Rectangle rect25 = new Rectangle (200, 400, 75, 75);
dc.FillPie (whiteBrush, rect25, 200, 20);
bmp.Save("fillpie.png", ImageFormat.Png); 
}
Rectangle rect26 = new Rectangle (200, 500, 75, 75);
dc.FillPie (yellowBrush, rect26, 50, 0);
bmp.Save("fillpie.png", ImageFormat.Png);
}
}
@@ -1,3 +1,8 @@
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.
2004-05-13 Sebastien Pouliot <[email protected]>
* SignedXml.cs: Update TODO informations.
@@ -315,9 +315,10 @@ namespace System.Security.Cryptography.Xml {
continue;
if (attr.LocalName == "xml")
continue;
if (attr.Prefix == el.Prefix)
continue;
attr.WriteTo (xtw);
}
foreach (XmlNode attr in el.Attributes)
attr.WriteTo (xtw);
foreach (XmlNode n in el.ChildNodes)
@@ -1,3 +1,11 @@
2004-05-31 Gonzalo Paniagua Javier <[email protected]>
* HttpRequest.cs: nullify _sRequestRootVirtualDir and baseVirtualDir
when SetFilePath is called. This way the cached values are reset and
get the right value in case someone (namely SessionStateModule +
cookieless session) changes the FilePath after the property cached its
value. Fixes bug #59364.
2004-05-27 Patrik Torstensson <[email protected]>
* HttpApplicationFactory.cs: Added SignalError (still todo)
File diff suppressed because it is too large. Load diff
@@ -1,3 +1,8 @@
2004-05-30 Atsushi Enomoto <[email protected]>
* XmlTextReader.cs : Fixed version mismatch; ProhibitDtd should be
NET_2_0.
2004-05-29 Gert Driesen ([email protected])
* XmlTextReader.cs: Added ProhibitDtd property for NET 1.1 to match
@@ -252,7 +252,7 @@ namespace System.Xml
get { return cursorToken.Prefix; }
}
#if NET_1_1
#if NET_2_0
[MonoTODO ("Not documented in .NET SDK")]
public bool ProhibitDtd {
@@ -955,7 +955,7 @@ namespace System.Xml
private WhitespaceHandling whitespaceHandling = WhitespaceHandling.All;
private XmlResolver resolver = new XmlUrlResolver ();
private bool normalization = false;
#if NET_1_1
#if NET_2_0
private bool prohibitDtd = false;
#endif
@@ -1,3 +1,7 @@
2004-06-01 Gonzalo Paniagua Javier <[email protected]>
* syntax.cs: reverting my previous patch. It causes bigger problems.
2004-05-27 Gonzalo Paniagua Javier <[email protected]>
* category.cs: added LastValue field to mark the end of enum Category.
@@ -773,9 +773,14 @@ namespace System.Text.RegularExpressions.Syntax {
// initialize pos/neg category arrays
int cat_size = (int) Category.LastValue;
pos_cats = new BitArray (cat_size);
neg_cats = new BitArray (cat_size);
Array cat_values = Enum.GetValues (typeof (Category));
int cat_size = (int)(Category)cat_values.GetValue (cat_values.Length - 1) + 1;
pos_cats = new bool[cat_size];
neg_cats = new bool[cat_size];
for (int i = 0; i < cat_size; ++ i) {
pos_cats[i] = false;
neg_cats[i] = false;
}
}
public CharacterClass (Category cat, bool negate) : this (false, false) {
@@ -796,8 +801,15 @@ namespace System.Text.RegularExpressions.Syntax {
int n = (int)cat;
if (negate) {
if (pos_cats[n])
pos_cats[n] = false;
neg_cats[n] = true;
} else {
}
else {
if (neg_cats[n])
neg_cats[n] = false;
pos_cats[n] = true;
}
}
@@ -926,7 +938,7 @@ namespace System.Text.RegularExpressions.Syntax {
private static Interval upper_case_characters = new Interval ((char)65, (char)90);
private const int distance_between_upper_and_lower_case = 32;
private bool negate, ignore;
private BitArray pos_cats, neg_cats;
private bool[] pos_cats, neg_cats;
private IntervalCollection intervals;
}
+2 -6
View File
@@ -44,9 +44,5 @@ using System.Runtime.InteropServices;
[assembly: AllowPartiallyTrustedCallers]
[assembly: Guid("BED7F4EA-1A96-11D2-8F08-00A0C9A6186D")]
#if ! NET_2_0 && ! BOOTSTRAP_NET_2_0
#if ! BOOTSTRAP_WITH_OLDLIB
[assembly: AssemblyDelaySign(true)]
[assembly: AssemblyKeyFile("../ecma.pub")]
#endif
#endif
[assembly: AssemblyDelaySign(true)]
[assembly: AssemblyKeyFile("../ecma.pub")]
+4
View File
@@ -1,3 +1,7 @@
2004-05-29 Jackson Harper <[email protected]>
* AssemblyInfo.cs: Sign corlib for net_2_0 now too.
2004-05-26 Jordi Mas <[email protected]>
* AssemblyInfo.cs: fixes CS1024: Preprocessor directive expected
+5
View File
@@ -1,3 +1,8 @@
2004-05-30 Martin Baulig <[email protected]>
* Makefile (net_2_0_dir): New variable; also use the correct
directory here.
2004-05-29 Gert Driesen ([email protected])
* corlib.dll.sources: added SetWin32ContextInIDispatchAttribute
+8 -6
View File
@@ -38,6 +38,8 @@ stampfile = $(depsdir)/$(PROFILE)_corlib.dll.stamp
#corlib_flags = /unsafe /nostdlib /d:INSIDE_CORLIB
corlib_flags = /unsafe /nostdlib
net_2_0_dir = $(DESTDIR)$(prefix)/lib/mono/2.0
net_2_0_bootstrap_response = $(depsdir)/corlib_net_2_0_bootstrap.dll.response
net_2_0_bootstrap_makefrag = $(depsdir)/corlib_net_2_0_bootstrap.dll.makefrag
net_2_0_bootstrap_stampfile = $(depsdir)/corlib_net_2_0_bootstrap.dll.stamp
@@ -75,10 +77,10 @@ all-local: $(corlib)
install-local: $(corlib) $(makefrag)
@if test $(PROFILE) = "net_2_0" ; then \
echo $(MKINSTALLDIRS) $(DESTDIR)$(prefix)/lib/net_2_0 ; \
$(MKINSTALLDIRS) $(DESTDIR)$(prefix)/lib/net_2_0 ; \
echo $(INSTALL_LIB) $(corlib) $(DESTDIR)$(prefix)/lib/net_2_0 ; \
$(INSTALL_LIB) $(corlib) $(DESTDIR)$(prefix)/lib/net_2_0 ; \
echo $(MKINSTALLDIRS) $(net_2_0_dir) ; \
$(MKINSTALLDIRS) $(net_2_0_dir) ; \
echo $(INSTALL_LIB) $(corlib) $(net_2_0_dir) ; \
$(INSTALL_LIB) $(corlib) $(net_2_0_dir) ; \
else \
echo $(MKINSTALLDIRS) $(DESTDIR)$(prefix)/lib ; \
$(MKINSTALLDIRS) $(DESTDIR)$(prefix)/lib ; \
@@ -88,9 +90,9 @@ install-local: $(corlib) $(makefrag)
uninstall-local:
@if test $(PROFILE) = "net_2_0" ; then \
-rm -f $(DESTDIR)$(prefix)/lib/net_2_0/corlib.dll
-rm -f $(net_2_0_dir)/mscorlib.dll
else \
-rm -f $(DESTDIR)$(prefix)/lib/corlib.dll
-rm -f $(DESTDIR)$(prefix)/lib/mscorlib.dll
fi
clean-local:
+12 -10
View File
@@ -62,10 +62,12 @@ namespace System.IO {
Dispose (true);
}
protected virtual void FillBuffer(int bytes) {
if(m_stream==null) {
protected virtual void FillBuffer (int bytes)
{
if (m_disposed)
throw new ObjectDisposedException ("BinaryReader", "Cannot read from a closed BinaryReader.");
if (m_stream==null)
throw new IOException("Stream is invalid");
}
CheckBuffer(bytes);
@@ -96,7 +98,7 @@ namespace System.IO {
return -1;
}
char[] result = new char[1];
char[] result = new char[1];
byte[] bytes;
int bcount;
@@ -139,15 +141,15 @@ namespace System.IO {
if (buffer == null) {
throw new ArgumentNullException("buffer is null");
}
if (buffer.Length - index < count) {
throw new ArgumentException("buffer is too small");
}
if (index < 0) {
throw new ArgumentOutOfRangeException("index is less than 0");
}
if (count < 0) {
throw new ArgumentOutOfRangeException("count is less than 0");
}
if (buffer.Length - index < count) {
throw new ArgumentException("buffer is too small");
}
int bytes_read=m_stream.Read(buffer, index, count);
@@ -167,15 +169,15 @@ namespace System.IO {
if (buffer == null) {
throw new ArgumentNullException("buffer is null");
}
if (buffer.Length - index < count) {
throw new ArgumentException("buffer is too small");
}
if (index < 0) {
throw new ArgumentOutOfRangeException("index is less than 0");
}
if (count < 0) {
throw new ArgumentOutOfRangeException("count is less than 0");
}
if (buffer.Length - index < count) {
throw new ArgumentException("buffer is too small");
}
int bytes_read;
byte[] bytes;
+10 -2
View File
@@ -112,13 +112,21 @@ namespace System.IO {
public override long Seek (long offset, SeekOrigin origin)
{
Flush();
return m_stream.Seek(offset, origin);
CheckObjectDisposedException ();
if (!CanSeek) {
throw new NotSupportedException (
Locale.GetText ("Non seekable stream."));
}
Flush ();
return m_stream.Seek (offset, origin);
}
public override void SetLength (long value)
{
CheckObjectDisposedException ();
m_stream.SetLength(value);
if (Position > value)
Position = value;
}
public override int ReadByte ()
+14
View File
@@ -1,3 +1,17 @@
2004-05-31 Atsushi Enomoto <[email protected]>
* Directory.cs, File.cs : Fixed Exists() that raised
DirectoryNotFoundException. Quick fix for bug #59354.
2004-05-30 Sebastien Pouliot <[email protected]>
* BinaryReader.cs: Added missing disposed check for most methods.
Reordered some exceptions to match MS implementation.
* 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. Added
missing validations.
2004-05-27 Dick Porter <[email protected]>
* FileSystemInfo.cs: Take out the error checking in Refresh(), it
+14 -10
View File
@@ -131,19 +131,23 @@ namespace System.IO
public static bool Exists (string path)
{
if (path == null)
return false;
try {
if (path == null)
return false;
MonoIOError error;
bool exists;
MonoIOError error;
bool exists;
exists = MonoIO.ExistsDirectory (path, out error);
if (error != MonoIOError.ERROR_SUCCESS &&
error != MonoIOError.ERROR_PATH_NOT_FOUND) {
throw MonoIO.GetException (path, error);
}
exists = MonoIO.ExistsDirectory (path, out error);
if (error != MonoIOError.ERROR_SUCCESS &&
error != MonoIOError.ERROR_PATH_NOT_FOUND) {
throw MonoIO.GetException (path, error);
}
return(exists);
return(exists);
} catch (Exception) {
return false;
}
}
public static DateTime GetLastAccessTime (string path)
+22 -18
View File
@@ -129,26 +129,30 @@ namespace System.IO
public static bool Exists (string path)
{
// For security reasons no exceptions are
// thrown, only false is returned if there is
// any problem with the path or permissions.
// Minimizes what information can be
// discovered by using this method.
if (null == path || String.Empty == path.Trim()
|| path.IndexOfAny(Path.InvalidPathChars) >= 0) {
try {
// For security reasons no exceptions are
// thrown, only false is returned if there is
// any problem with the path or permissions.
// Minimizes what information can be
// discovered by using this method.
if (null == path || String.Empty == path.Trim()
|| path.IndexOfAny(Path.InvalidPathChars) >= 0) {
return false;
}
MonoIOError error;
bool exists;
exists = MonoIO.ExistsFile (path, out error);
if (error != MonoIOError.ERROR_SUCCESS &&
error != MonoIOError.ERROR_FILE_NOT_FOUND) {
throw MonoIO.GetException (path, error);
}
return(exists);
} catch (Exception) {
return false;
}
MonoIOError error;
bool exists;
exists = MonoIO.ExistsFile (path, out error);
if (error != MonoIOError.ERROR_SUCCESS &&
error != MonoIOError.ERROR_FILE_NOT_FOUND) {
throw MonoIO.GetException (path, error);
}
return(exists);
}
public static FileAttributes GetAttributes (string path)
+30 -3
View File
@@ -12,6 +12,7 @@
using System;
using System.Collections;
using System.Globalization;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Remoting.Messaging;
@@ -38,6 +39,8 @@ namespace System.IO
internal FileStream (IntPtr handle, FileAccess access, bool ownsHandle, int bufferSize, bool isAsync, bool noBuffering)
{
this.handle = MonoIO.InvalidHandle;
if (handle == this.handle)
throw new ArgumentException ("handle", Locale.GetText ("Invalid."));
if (access < FileAccess.Read || access > FileAccess.ReadWrite)
throw new ArgumentOutOfRangeException ("access");
@@ -251,6 +254,9 @@ namespace System.IO
return(buf_start + buf_offset);
}
set {
if (handle == MonoIO.InvalidHandle)
throw new ObjectDisposedException ("Stream has been closed");
if(CanSeek == false) {
throw new NotSupportedException("The stream does not support seeking");
}
@@ -321,8 +327,10 @@ namespace System.IO
if (!CanRead)
throw new NotSupportedException ("Stream does not support reading");
int len = dest.Length;
if (dest_offset < 0 || count < 0)
throw new ArgumentException ("dest or count is negative");
if (dest_offset < 0)
throw new ArgumentOutOfRangeException ("dest_offset", "< 0");
if (count < 0)
throw new ArgumentOutOfRangeException ("count", "< 0");
if (dest_offset > len)
throw new ArgumentException ("destination offset is beyond array size");
// reordered to avoid possible integer overflow
@@ -383,6 +391,9 @@ namespace System.IO
public override IAsyncResult BeginRead (byte [] buffer, int offset, int count,
AsyncCallback cback, object state)
{
if (handle == MonoIO.InvalidHandle)
throw new ObjectDisposedException ("Stream has been closed");
if (!CanRead)
throw new NotSupportedException ("This stream does not support reading");
@@ -528,6 +539,9 @@ namespace System.IO
public override IAsyncResult BeginWrite (byte [] buffer, int offset, int count,
AsyncCallback cback, object state)
{
if (handle == MonoIO.InvalidHandle)
throw new ObjectDisposedException ("Stream has been closed");
if (!CanWrite)
throw new NotSupportedException ("This stream does not support writing");
@@ -650,9 +664,12 @@ namespace System.IO
pos = Position + offset;
break;
case SeekOrigin.Begin: default:
case SeekOrigin.Begin:
pos = offset;
break;
default:
throw new ArgumentException ("origin", "Invalid SeekOrigin");
}
if (pos < 0) {
@@ -692,6 +709,9 @@ namespace System.IO
public override void SetLength (long length)
{
if (handle == MonoIO.InvalidHandle)
throw new ObjectDisposedException ("Stream has been closed");
if(CanSeek == false) {
throw new NotSupportedException("The stream does not support seeking");
}
@@ -712,6 +732,9 @@ namespace System.IO
if (error != MonoIOError.ERROR_SUCCESS) {
throw MonoIO.GetException (name, error);
}
if (Position > length)
Position = length;
}
public override void Flush ()
@@ -736,6 +759,8 @@ namespace System.IO
public virtual void Lock (long position, long length)
{
if (handle == MonoIO.InvalidHandle)
throw new ObjectDisposedException ("Stream has been closed");
if (position < 0) {
throw new ArgumentOutOfRangeException ("position must not be negative");
}
@@ -756,6 +781,8 @@ namespace System.IO
public virtual void Unlock (long position, long length)
{
if (handle == MonoIO.InvalidHandle)
throw new ObjectDisposedException ("Stream has been closed");
if (position < 0) {
throw new ArgumentOutOfRangeException ("position must not be negative");
}
@@ -1,25 +0,0 @@
Assembly.cs
AssemblyNameFlags.cs
BindingFlags.cs
CallingConventions.cs
ConstructorInfo.cs
DefaultMemberAttribute.cs
EventAttributes.cs
EventInfo.cs
FieldAttributes.cs
FieldInfo.cs
ICustomAttributeProvider.cs
MemberFilter.cs
MemberInfo.cs
MemberTypes.cs
MethodAttributes.cs
MethodBase.cs
MethodImplAttributes.cs
MethodInfo.cs
Module.cs
ParameterAttributes.cs
PropertyAttributes.cs
PropertyInfo.cs
ResourceAttributes.cs
ResourceLocation.cs
TypeAttributes.cs
@@ -1,3 +1,9 @@
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
2004-05-29 Gert Driesen ([email protected])
* SetWin32ContextInIDispatchAttribute.cs: added
@@ -7,6 +7,8 @@
// (C) Novell, Inc. http://www.ximian.com
//
#if NET_2_0
using System;
namespace System.Runtime.InteropServices
@@ -20,3 +22,4 @@ namespace System.Runtime.InteropServices
}
}
#endif
@@ -7,6 +7,8 @@
// (C) Novell, Inc. http://www.ximian.com
//
#if NET_2_0
namespace System.Runtime.InteropServices
{
public sealed class VariantWrapper
@@ -27,3 +29,5 @@ namespace System.Runtime.InteropServices
}
}
}
#endif
+6 -3
View File
@@ -485,6 +485,9 @@ namespace System
if (array == null)
throw new ArgumentNullException ("array");
if (value == null)
return -1;
if (array.Rank > 1)
throw new RankException (Locale.GetText ("Only single dimension arrays are supported."));
@@ -502,7 +505,7 @@ namespace System
if (array.Rank > 1)
throw new RankException (Locale.GetText ("Only single dimension arrays are supported."));
if ((comparer == null) && !(value is IComparable))
if ((comparer == null) && (value != null) && !(value is IComparable))
throw new ArgumentException (Locale.GetText (
"comparer is null and value does not support IComparable."));
@@ -527,7 +530,7 @@ namespace System
if (index > array.GetLowerBound (0) + array.GetLength (0) - length)
throw new ArgumentException (Locale.GetText (
"index and length do not specify a valid range in array."));
if (!(value is IComparable))
if ((value != null) && (!(value is IComparable)))
throw new ArgumentException (Locale.GetText (
"value does not support IComparable"));
@@ -553,7 +556,7 @@ namespace System
throw new ArgumentException (Locale.GetText (
"index and length do not specify a valid range in array."));
if ((comparer == null) && !(value is IComparable))
if ((comparer == null) && (value != null) && !(value is IComparable))
throw new ArgumentException (Locale.GetText (
"comparer is null and value does not support IComparable."));
+2 -1
View File
@@ -157,7 +157,8 @@ namespace System
{
NumberFormatInfo nfi = NumberFormatInfo.GetInstance (provider);
if (format == null)
// null or empty ("")
if ((format == null) || (format.Length == 0))
format = "G";
return IntegerFormatter.NumberToString (format, nfi, m_value);
+30
View File
@@ -1,3 +1,33 @@
2004-06-01 Miguel de Icaza <[email protected]>
* String.cs: Flag concat with four arguments internal.
2004-05-31 Sebastien Pouliot <[email protected]>
* Array.cs: Fixed legal case where value is null.
* Byte.cs: Fixed ToString when format is an empty string (use "G").
* Guid.cs: Renamed private fields (and changed some to signed) to
match MS implementation and allow serialization to work. Fix
bug #59113.
2004-05-30 Gonzalo Paniagua Javier <[email protected]>
* DateTime.cs: adjust milliseconds for fraction specifier ('f').
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.
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. Fixed ChangeTo where null could
be misinterpreted between null and Empty.
2004-05-28 Sebastien Pouliot <[email protected]>
* Convert.cs: Fixed integer parsing for special cases (0x, 0X for base
+1 -2
View File
@@ -327,8 +327,7 @@ namespace System
}
[CLSCompliant (false)]
[MonoTODO ("Arglist is missing")]
public static void WriteLine (string format, object arg0, object arg1, object arg2, object arg3)
internal static void WriteLine (string format, object arg0, object arg1, object arg2, object arg3)
{
stdout.WriteLine (String.Format (format, arg0, arg1, arg2, arg3));
}
+8 -4
View File
@@ -1469,7 +1469,7 @@ namespace System {
public static sbyte ToSByte (string value, IFormatProvider provider)
{
if (value == null)
return 0; // LAMESPEC: Spec says throw ArgumentNullException
throw new ArgumentNullException ("value");
return SByte.Parse (value, provider);
}
@@ -2326,7 +2326,9 @@ namespace System {
// ========== Conversion / Helper Functions ========== //
public static object ChangeType (object value, Type conversionType)
{
{
if ((value != null) && (conversionType == null))
throw new ArgumentNullException ("conversionType");
CultureInfo ci = CultureInfo.CurrentCulture;
NumberFormatInfo number = ci.NumberFormat;
return ToType (value, conversionType, number);
@@ -2342,6 +2344,8 @@ namespace System {
public static object ChangeType (object value, Type conversionType, IFormatProvider provider)
{
if ((value != null) && (conversionType == null))
throw new ArgumentNullException ("conversionType");
return ToType (value, conversionType, provider);
}
@@ -2394,7 +2398,7 @@ namespace System {
i+=2;
}
if (len == i) {
throw new OverflowException (
throw new FormatException (
Locale.GetText ("Missing number after prefix"));
}
}
@@ -2560,7 +2564,7 @@ namespace System {
return null;
if (conversionType == null)
throw new ArgumentNullException ("convertionType");
throw new InvalidCastException ("Cannot cast to destination type.");
if (value.GetType () == conversionType)
return value;
+19 -7
View File
@@ -957,14 +957,26 @@ namespace System
return false;
break;
case 'f':
if (millisecond != -1)
return false;
num = Math.Min (num, 6);
case 'f':
if (millisecond != -1)
return false;
num = Math.Min (num, 6);
millisecond = _ParseNumber (s, num+1, true, sloppy_parsing, next_not_digit, out num_parsed);
if (millisecond >= 1000)
return false;
break;
if (num_parsed == -1)
return false;
if (num_parsed != 3) {
int k;
if (num_parsed > 3) {
for (k = num_parsed; k > 3; k--)
millisecond /= 10;
} else {
for (k = num_parsed; k < 3; k++) {
millisecond *= 10;
}
}
}
break;
case 't':
if (ampm != -1)
return false;
+112 -112
View File
@@ -23,17 +23,17 @@ namespace System
[StructLayout (LayoutKind.Sequential)]
public struct Guid : IFormattable, IComparable
{
private uint _timeLow;
private ushort _timeMid;
private ushort _timeHighAndVersion;
private byte _clockSeqHiAndReserved;
private byte _clockSeqLow;
private byte _node0;
private byte _node1;
private byte _node2;
private byte _node3;
private byte _node4;
private byte _node5;
private int _a; //_timeLow;
private short _b; //_timeMid;
private short _c; //_timeHighAndVersion;
private byte _d; //_clockSeqHiAndReserved;
private byte _e; //_clockSeqLow;
private byte _f; //_node0;
private byte _g; //_node1;
private byte _h; //_node2;
private byte _i; //_node3;
private byte _j; //_node4;
private byte _k; //_node5;
internal class GuidParser
{
@@ -242,17 +242,17 @@ namespace System
public Guid (byte[] b)
{
CheckArray (b, 16);
_timeLow = System.BitConverter.ToUInt32 (b, 0);
_timeMid = System.BitConverter.ToUInt16 (b, 4);
_timeHighAndVersion = System.BitConverter.ToUInt16 (b, 6);
_clockSeqHiAndReserved = b[8];
_clockSeqLow = b[9];
_node0 = b[10];
_node1 = b[11];
_node2 = b[12];
_node3 = b[13];
_node4 = b[14];
_node5 = b[15];
_a = System.BitConverter.ToInt32 (b, 0);
_b = System.BitConverter.ToInt16 (b, 4);
_c = System.BitConverter.ToInt16 (b, 6);
_d = b [8];
_e = b [9];
_f = b [10];
_g = b [11];
_h = b [12];
_i = b [13];
_j = b [14];
_k = b [15];
}
public Guid (string g)
@@ -267,44 +267,44 @@ namespace System
public Guid (int a, short b, short c, byte[] d)
{
CheckArray(d, 8);
_timeLow = (uint) a;
_timeMid = (ushort) b;
_timeHighAndVersion = (ushort) c;
_clockSeqHiAndReserved = d[0];
_clockSeqLow = d[1];
_node0 = d[2];
_node1 = d[3];
_node2 = d[4];
_node3 = d[5];
_node4 = d[6];
_node5 = d[7];
CheckArray (d, 8);
_a = (int) a;
_b = (short) b;
_c = (short) c;
_d = d [0];
_e = d [1];
_f = d [2];
_g = d [3];
_h = d [4];
_i = d [5];
_j = d [6];
_k = d [7];
}
public Guid (int a, short b, short c, byte d, byte e, byte f, byte g, byte h, byte i, byte j, byte k)
: this((uint) a, (ushort) b, (ushort) c, d, e, f, g, h, i, j, k)
{
_a = a;
_b = b;
_c = c;
_d = d;
_e = e;
_f = f;
_g = g;
_h = h;
_i = i;
_j = j;
_k = k;
}
[CLSCompliant (false)]
public Guid (uint a, ushort b, ushort c, byte d, byte e, byte f, byte g, byte h, byte i, byte j, byte k)
: this((int) a, (short) b, (short) c, d, e, f, g, h, i, j, k)
{
_timeLow = a;
_timeMid = b;
_timeHighAndVersion = c;
_clockSeqHiAndReserved = d;
_clockSeqLow = e;
_node0 = f;
_node1 = g;
_node2 = h;
_node3 = i;
_node4 = j;
_node5 = k;
}
public static readonly Guid Empty = new Guid (0,0,0,0,0,0,0,0,0,0,0);
private static int Compare (uint x, uint y)
private static int Compare (int x, int y)
{
if (x < y) {
return -1;
@@ -314,7 +314,7 @@ namespace System
}
}
public int CompareTo (object value )
public int CompareTo (object value)
{
if (value == null)
return 1;
@@ -326,38 +326,38 @@ namespace System
Guid v = (Guid) value;
if (_timeLow != v._timeLow ) {
return Compare(_timeLow, v._timeLow);
if (_a != v._a) {
return Compare (_a, v._a);
}
else if (_timeMid != v._timeMid) {
return Compare(_timeMid, v._timeMid);
else if (_b != v._b) {
return Compare (_b, v._b);
}
else if (_timeHighAndVersion != v._timeHighAndVersion) {
return Compare(_timeHighAndVersion, v._timeHighAndVersion);
else if (_c != v._c) {
return Compare (_c, v._c);
}
else if (_clockSeqHiAndReserved != v._clockSeqHiAndReserved) {
return Compare(_clockSeqHiAndReserved, v._clockSeqHiAndReserved);
else if (_d != v._d) {
return Compare (_d, v._d);
}
else if (_clockSeqLow != v._clockSeqLow) {
return Compare(_clockSeqLow, v._clockSeqLow);
else if (_e != v._e) {
return Compare (_e, v._e);
}
else if (_node0 != v._node0) {
return Compare(_node0, v._node0);
else if (_f != v._f) {
return Compare (_f, v._f);
}
else if (_node1 != v._node1) {
return Compare(_node1, v._node1);
else if (_g != v._g) {
return Compare (_g, v._g);
}
else if (_node2 != v._node2) {
return Compare(_node2, v._node2);
else if (_h != v._h) {
return Compare (_h, v._h);
}
else if (_node3 != v._node3) {
return Compare(_node3, v._node3);
else if (_i != v._i) {
return Compare (_i, v._i);
}
else if (_node4 != v._node4) {
return Compare(_node4, v._node4);
else if (_j != v._j) {
return Compare (_j, v._j);
}
else if (_node5 != v._node5) {
return Compare(_node5, v._node5);
else if (_k != v._k) {
return Compare (_k, v._k);
}
return 0;
}
@@ -376,16 +376,16 @@ namespace System
{
int res;
res = (int) _timeLow;
res = res ^ ((int) _timeMid << 16 | _timeHighAndVersion);
res = res ^ ((int) _clockSeqHiAndReserved << 24);
res = res ^ ((int) _clockSeqLow << 16);
res = res ^ ((int) _node0 << 8);
res = res ^ ((int) _node1);
res = res ^ ((int) _node2 << 24);
res = res ^ ((int) _node3 << 16);
res = res ^ ((int) _node4 << 8);
res = res ^ ((int) _node5);
res = (int) _a;
res = res ^ ((int) _b << 16 | _c);
res = res ^ ((int) _d << 24);
res = res ^ ((int) _e << 16);
res = res ^ ((int) _f << 8);
res = res ^ ((int) _g);
res = res ^ ((int) _h << 24);
res = res ^ ((int) _i << 16);
res = res ^ ((int) _j << 8);
res = res ^ ((int) _k);
return res;
}
@@ -413,9 +413,9 @@ namespace System
Guid res = new Guid (b);
// Mask in Variant 1-0 in Bit[7..6]
res._clockSeqHiAndReserved = (byte) ((res._clockSeqHiAndReserved & 0x3fu) | 0x80u);
res._d = (byte) ((res._d & 0x3fu) | 0x80u);
// Mask in Version 4 (random based Guid) in Bits[15..13]
res._timeHighAndVersion = (ushort) ((res._timeHighAndVersion & 0x0fffu) | 0x4000u);
res._c = (short) ((res._c & 0x0fffu) | 0x4000u);
return res;
}
@@ -452,29 +452,29 @@ namespace System
int d = 0;
int s;
tmp = BitConverter.GetBytes(_timeLow);
tmp = BitConverter.GetBytes(_a);
for (s=0; s<4; ++s) {
res[d++] = tmp[s];
}
tmp = BitConverter.GetBytes(_timeMid);
tmp = BitConverter.GetBytes(_b);
for (s=0; s<2; ++s) {
res[d++] = tmp[s];
}
tmp = BitConverter.GetBytes(_timeHighAndVersion);
tmp = BitConverter.GetBytes(_c);
for (s=0; s<2; ++s) {
res[d++] = tmp[s];
}
res[8] = _clockSeqHiAndReserved;
res[9] = _clockSeqLow;
res[10] = _node0;
res[11] = _node1;
res[12] = _node2;
res[13] = _node3;
res[14] = _node4;
res[15] = _node5;
res[8] = _d;
res[9] = _e;
res[10] = _f;
res[11] = _g;
res[12] = _h;
res[13] = _i;
res[14] = _j;
res[15] = _k;
return res;
}
@@ -489,24 +489,24 @@ namespace System
res.Append ('{');
}
res.Append (_timeLow.ToString ("x8"));
res.Append (_a.ToString ("x8"));
if (h) {
res.Append ('-');
}
res.Append (_timeMid.ToString ("x4"));
res.Append (_b.ToString ("x4"));
if (h) {
res.Append ('-');
}
res.Append (_timeHighAndVersion.ToString ("x4"));
res.Append (_c.ToString ("x4"));
if (h) {
res.Append ('-');
}
char[] vals1 = {
ToHex((_clockSeqHiAndReserved >> 4) & 0xf),
ToHex(_clockSeqHiAndReserved & 0xf),
ToHex((_clockSeqLow >> 4) & 0xf),
ToHex(_clockSeqLow & 0xf)
ToHex((_d >> 4) & 0xf),
ToHex(_d & 0xf),
ToHex((_e >> 4) & 0xf),
ToHex(_e & 0xf)
};
res.Append (vals1);
@@ -516,18 +516,18 @@ namespace System
}
char[] vals2 = {
ToHex((_node0 >> 4) & 0xf),
ToHex(_node0 & 0xf),
ToHex((_node1 >> 4) & 0xf),
ToHex(_node1 & 0xf),
ToHex((_node2 >> 4) & 0xf),
ToHex(_node2 & 0xf),
ToHex((_node3 >> 4) & 0xf),
ToHex(_node3 & 0xf),
ToHex((_node4 >> 4) & 0xf),
ToHex(_node4 & 0xf),
ToHex((_node5 >> 4) & 0xf),
ToHex(_node5 & 0xf)
ToHex((_f >> 4) & 0xf),
ToHex(_f & 0xf),
ToHex((_g >> 4) & 0xf),
ToHex(_g & 0xf),
ToHex((_h >> 4) & 0xf),
ToHex(_h & 0xf),
ToHex((_i >> 4) & 0xf),
ToHex(_i & 0xf),
ToHex((_j >> 4) & 0xf),
ToHex(_j & 0xf),
ToHex((_k >> 4) & 0xf),
ToHex(_k & 0xf)
};
res.Append (vals2);
+4 -1
View File
@@ -967,7 +967,10 @@ namespace System
return Concat (s1, s2, s3);
}
public static String Concat (Object obj1, Object obj2, Object obj3, Object obj4)
//
// Do *not* remove `internal' from that method
//
internal static String Concat (Object obj1, Object obj2, Object obj3, Object obj4)
{
string s1, s2, s3, s4;
@@ -1,3 +1,9 @@
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.
2003-10-07 Nick Drochak <[email protected]>
* StackFrameTest.cs: Get tests to pass on .NET 1.1.
@@ -145,6 +145,7 @@ namespace MonoTests.System.Diagnostics {
/// <summary>
/// Tests whether getting file line number works.
/// </summary>
[Ignore ("Bug 45730 - Incorrect line numbers returned")]
public void TestGetFileLineNumber() {
AssertEquals("Line number (1)",
0,
@@ -162,6 +163,7 @@ namespace MonoTests.System.Diagnostics {
/// <summary>
/// Tests whether getting file column number works.
/// </summary>
[Ignore ("Bug 45730 - Column numbers always zero")]
public void TestGetFileColumnNumber() {
AssertEquals("Column number (1)",
0,
@@ -267,6 +269,7 @@ namespace MonoTests.System.Diagnostics {
/// <summary>
/// Tests whether getting file line number works.
/// </summary>
[Ignore ("Bug 45730 - Incorrect line numbers returned")]
public void TestGetFileLineNumber() {
AssertEquals("Line number (1)",
0,
@@ -280,6 +283,7 @@ namespace MonoTests.System.Diagnostics {
/// <summary>
/// Tests whether getting file column number works.
/// </summary>
[Ignore ("Bug 45730 - Column numbers always zero")]
public void TestGetFileColumnNumber() {
AssertEquals("Column number (1)",
0,
@@ -4,7 +4,9 @@
//
// (C) Eduardo Garcia Cebollero.
// (C) Ximian, Inc. http://www.ximian.com
// Copyright (C) 2004 Novell (http://www.novell.com)
//
using NUnit.Framework;
using System;
using System.IO;
@@ -30,7 +32,6 @@ namespace MonoTests.System.IO
[TearDown]
public void TearDown ()
{
if (Directory.Exists (TempFolder))
Directory.Delete (TempFolder, true);
}
@@ -550,7 +551,87 @@ namespace MonoTests.System.IO
stream.Close ();
}
}
[Test]
[ExpectedException (typeof (ArgumentNullException))]
public void Read_Bytes_BufferNull ()
{
byte[] b = null;
new BinaryReader (new MemoryStream ()).Read (b, 0, 1);
}
[Test]
[ExpectedException (typeof (ArgumentOutOfRangeException))]
public void Read_Bytes_IndexNegative ()
{
byte[] array = new byte [8];
new BinaryReader (new MemoryStream ()).Read (array, -1, array.Length);
}
[Test]
[ExpectedException (typeof (ArgumentException))]
public void Read_Bytes_IndexOverflow ()
{
byte[] array = new byte [8];
new BinaryReader (new MemoryStream ()).Read (array, Int32.MaxValue, array.Length);
}
[Test]
[ExpectedException (typeof (ArgumentOutOfRangeException))]
public void Read_Bytes_CountNegative ()
{
byte[] array = new byte [8];
new BinaryReader (new MemoryStream ()).Read (array, 0, -1);
}
[Test]
[ExpectedException (typeof (ArgumentException))]
public void Read_Bytes_CountOverflow ()
{
byte[] array = new byte [8];
new BinaryReader (new MemoryStream ()).Read (array, 0, Int32.MaxValue);
}
[Test]
[ExpectedException (typeof (ArgumentNullException))]
public void Read_Chars_BufferNull ()
{
char[] c = null;
new BinaryReader (new MemoryStream ()).Read (c, 0, 1);
}
[Test]
[ExpectedException (typeof (ArgumentOutOfRangeException))]
public void Read_Chars_IndexNegative ()
{
char[] array = new char [8];
new BinaryReader (new MemoryStream ()).Read (array, -1, array.Length);
}
[Test]
[ExpectedException (typeof (ArgumentException))]
public void Read_Chars_IndexOverflow ()
{
char[] array = new char [8];
new BinaryReader (new MemoryStream ()).Read (array, Int32.MaxValue, array.Length);
}
[Test]
[ExpectedException (typeof (ArgumentOutOfRangeException))]
public void Read_Chars_CountNegative ()
{
char[] array = new char [8];
new BinaryReader (new MemoryStream ()).Read (array, 0, -1);
}
[Test]
[ExpectedException (typeof (ArgumentException))]
public void Read_Chars_CountOverflow ()
{
char[] array = new char [8];
new BinaryReader (new MemoryStream ()).Read (array, 0, Int32.MaxValue);
}
[Test]
public void PeakChar ()
{
@@ -535,5 +535,43 @@ public class BufferedStreamTest : Assertion {
AssertEquals ("test#01", 9, stream.Position);
AssertEquals ("test#02", 9, stream.ReadByte ());
}
[Test]
public void PositionAfterSetLength ()
{
BufferedStream stream = new BufferedStream (new MemoryStream ());
stream.SetLength (32);
stream.Position = 32;
stream.SetLength (16);
AssertEquals ("Position==16", 16, stream.Position);
}
[Test]
[ExpectedException (typeof (ObjectDisposedException))]
public void SetLength_Disposed ()
{
BufferedStream stream = new BufferedStream (new MemoryStream ());
stream.Close ();
stream.SetLength (16);
}
[Test]
[ExpectedException (typeof (NotSupportedException))]
public void Seek_ClosedMemoryStream ()
{
MemoryStream ms = new MemoryStream ();
BufferedStream stream = new BufferedStream (ms);
ms.Close ();
stream.Seek (0, SeekOrigin.Begin);
}
[Test]
[ExpectedException (typeof (ObjectDisposedException))]
public void Seek_ClosedBufferedStream ()
{
BufferedStream stream = new BufferedStream (new MemoryStream ());
stream.Close ();
stream.Seek (0, SeekOrigin.Begin);
}
}
}
+15 -1
View File
@@ -1,4 +1,18 @@
2003-05-26 Atsushi Enomoto <atsushi@ximian.com>
2004-05-30 Sebastien Pouliot <sebastien@ximian.com>
* 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. Lots of
new tests for exception handling (negatives, disposed) and test
reading a byte ast the end of the stream.
* MemoryStream.cs: Added test for Seek after Close.
2004-05-29 Sebastien Pouliot <[email protected]>
* BinaryReader.cs: Added new cases to check exceptions thrown by Read
methods.
2004-05-26 Atsushi Enomoto <[email protected]>
* FileInfoTest.cs : more incorrect \ fix.
@@ -769,6 +769,18 @@ namespace MonoTests.System.IO
if (File.Exists (path))
File.Delete (path);
}
[Test]
[ExpectedException (typeof (ArgumentOutOfRangeException))]
public void Read_OffsetNegative ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "temp";
DeleteFile (path);
using (FileStream stream = new FileStream (path, FileMode.OpenOrCreate, FileAccess.Read)) {
stream.Read (new byte[0], -1, 1);
}
}
[Test]
[ExpectedException (typeof (ArgumentException))]
@@ -782,6 +794,18 @@ namespace MonoTests.System.IO
}
}
[Test]
[ExpectedException (typeof (ArgumentOutOfRangeException))]
public void Read_CountNegative ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "temp";
DeleteFile (path);
using (FileStream stream = new FileStream (path, FileMode.OpenOrCreate, FileAccess.Read)) {
stream.Read (new byte[0], 1, -1);
}
}
[Test]
[ExpectedException (typeof (ArgumentException))]
public void Read_CountOverflow ()
@@ -794,6 +818,18 @@ namespace MonoTests.System.IO
}
}
[Test]
[ExpectedException (typeof (ArgumentOutOfRangeException))]
public void Write_OffsetNegative ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "temp";
DeleteFile (path);
using (FileStream stream = new FileStream (path, FileMode.OpenOrCreate, FileAccess.Write)) {
stream.Write (new byte[0], -1, 1);
}
}
[Test]
[ExpectedException (typeof (ArgumentException))]
public void Write_OffsetOverflow ()
@@ -806,6 +842,18 @@ namespace MonoTests.System.IO
}
}
[Test]
[ExpectedException (typeof (ArgumentOutOfRangeException))]
public void Write_CountNegative ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "temp";
DeleteFile (path);
using (FileStream stream = new FileStream (path, FileMode.OpenOrCreate, FileAccess.Write)) {
stream.Write (new byte[0], 1, -1);
}
}
[Test]
[ExpectedException (typeof (ArgumentException))]
public void Write_CountOverflow ()
@@ -817,6 +865,117 @@ namespace MonoTests.System.IO
stream.Write (new byte[0], 1, Int32.MaxValue);
}
}
[Test]
[ExpectedException (typeof (ArgumentException))]
public void Seek_InvalidSeekOrigin ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "temp";
DeleteFile (path);
using (FileStream stream = new FileStream (path, FileMode.OpenOrCreate, FileAccess.Read)) {
stream.Seek (0, (SeekOrigin) (-1));
}
}
[Test]
[ExpectedException (typeof (ArgumentException))]
public void Constructor_InvalidFileHandle ()
{
new FileStream ((IntPtr)(-1), FileAccess.Read);
}
[Test]
public void PositionAfterSetLength ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "temp";
DeleteFile (path);
using (FileStream stream = new FileStream (path, FileMode.OpenOrCreate, FileAccess.Write)) {
stream.SetLength (32);
stream.Position = 32;
stream.SetLength (16);
AssertEquals ("Position==16", 16, stream.Position);
}
}
[Test]
[ExpectedException (typeof (ObjectDisposedException))]
public void SetLength_Disposed ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "temp";
DeleteFile (path);
FileStream stream = new FileStream (path, FileMode.OpenOrCreate, FileAccess.Write);
stream.Close ();
stream.SetLength (16);
}
[Test]
[ExpectedException (typeof (ObjectDisposedException))]
public void Position_Disposed ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "temp";
DeleteFile (path);
FileStream stream = new FileStream (path, FileMode.OpenOrCreate, FileAccess.Read);
stream.Close ();
stream.Position = 0;
}
[Test]
[ExpectedException (typeof (ObjectDisposedException))]
public void BeginRead_Disposed ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "temp";
DeleteFile (path);
FileStream stream = new FileStream (path, FileMode.OpenOrCreate, FileAccess.Read);
stream.Close ();
stream.EndRead (stream.BeginRead (new byte[8], 0, 8, null, null));
}
[Test]
[ExpectedException (typeof (ObjectDisposedException))]
public void BeginWrite_Disposed ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "temp";
DeleteFile (path);
FileStream stream = new FileStream (path, FileMode.OpenOrCreate, FileAccess.Write);
stream.Close ();
stream.EndWrite (stream.BeginWrite (new byte[8], 0, 8, null, null));
}
[Test]
[ExpectedException (typeof (ObjectDisposedException))]
public void Lock_Disposed ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "temp";
DeleteFile (path);
FileStream stream = new FileStream (path, FileMode.OpenOrCreate, FileAccess.Write);
stream.Close ();
stream.Lock (0,1);
}
[Test]
[ExpectedException (typeof (ObjectDisposedException))]
public void Unlock_Disposed ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "temp";
DeleteFile (path);
FileStream stream = new FileStream (path, FileMode.OpenOrCreate, FileAccess.Write);
stream.Close ();
stream.Unlock (0,1);
}
[Test]
public void ReadBytePastEndOfStream ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "temp";
DeleteFile (path);
using (FileStream stream = new FileStream (path, FileMode.OpenOrCreate, FileAccess.Read)) {
stream.Seek (0, SeekOrigin.End);
AssertEquals ("ReadByte", -1, stream.ReadByte ());
stream.Close ();
}
}
}
}
@@ -419,6 +419,15 @@ namespace MonoTests.System.IO
AssertEquals ("#08", 769, ms.Position);
}
[Test]
[ExpectedException (typeof (ObjectDisposedException))]
public void Seek_Disposed ()
{
MemoryStream ms = new MemoryStream ();
ms.Close ();
ms.Seek (0, SeekOrigin.Begin);
}
[Test]
public void SetLength ()
{
+7 -1
View File
@@ -1,7 +1,13 @@
2004-05-30 David Sheldon <[email protected]>
* DecimalTest.cs: Moved the rounding test that fails due to
bug 37744 into its own test, and annotated it as ignored until
the bug is fixed.
2004-05-29 Sebastien Pouliot <[email protected]>
* ConvertTest.cs: Added new parsing tests including special case for
Convert.ToSByte.
Convert.ToSByte. Added test to ChangeType to Empty.
* Int64Test.cs: Added new test cases for overflows.
2004-05-28 Sebastien Pouliot <[email protected]>
@@ -3468,5 +3468,12 @@ namespace MonoTests.System {
AssertEquals ("ToUInt32", 0, Convert.ToUInt32 (s, fp));
AssertEquals ("ToUInt64", 0, Convert.ToUInt64 (s, fp));
}
[Test]
[ExpectedException (typeof (InvalidCastException))]
public void ChangeTypeToTypeCodeEmpty ()
{
Convert.ChangeType (true, TypeCode.Empty);
}
}
}
+22 -2
View File
@@ -859,12 +859,12 @@ namespace MonoTests.System {
}
}
public void TestRound()
public void TestRound()
{
decimal[,] dtab = {
{1m, 0, 1m}, {1.234567890m, 1, 1.2m},
{1.234567890m, 2, 1.23m}, {1.23450000001m, 3, 1.235m},
{1.2345m, 3, 1.234m}, {1.2355m, 3, 1.236m},
{1.2355m, 3, 1.236m},
{1.234567890m, 4, 1.2346m}, {1.23567890m, 2, 1.24m},
{47893764694.4578563236436621m, 7, 47893764694.4578563m},
{-47893764694.4578563236436621m, 9, -47893764694.457856324m},
@@ -882,6 +882,26 @@ namespace MonoTests.System {
}
}
}
[Ignore ("Bug 37744 - Bankers rounding not implemented")]
// When this bug is fixed, this case can be reinserted into the above test.
public void TestRoundFailures()
{
decimal[,] dtab = {
{1.2345m, 3, 1.234m}
};
decimal d;
for (int i = 0; i < dtab.GetLength(0); i++)
{
d = Decimal.Round(dtab[i,0], (int)dtab[i,1]);
if (d != dtab[i,2])
{
Fail("FailRound: Round(" + dtab[i,0] + "," + (int)dtab[i,1] + ") != " + d);
}
}
}
[Test]
public void ParseInt64 ()
+4
View File
@@ -1,3 +1,7 @@
2004-05-30 Marek Safar <[email protected]>
* cs1017.cs: New test.
2004-05-19 Marek Safar <[email protected]>
* cs0579-6.cs: New test for bug #58688.
+14
View File
@@ -0,0 +1,14 @@
// CS0176: cant access static field via instance reference. qualify w/ type name -- #59324
// Line: 12
using System;
class A {
public static int X;
}
class T {
static void Main () {
A T = new A ();
System.Console.WriteLine (T.X);
}
}
+19 -6
View File
@@ -1,9 +1,22 @@
// cs0202.cs: GetEnumerator cant return a pointer, only an instance.
// Line: 6
// cs0202.cs: The call to GetEnumerator must return a class or a struct, not 'Foo.P*'
// Line: 18
// Compiler options: -unsafe
public class Foo
public unsafe class Foo
{
int P* GetEnumerator ()
{
}
public class P
{
public P* GetEnumerator ()
{
return null;
}
}
public static void Main ()
{
P o = new P ();
foreach (P p in o)
{
}
}
}
+10
View File
@@ -0,0 +1,10 @@
// cs1017.cs: Try statement already has an empty catch block
// Line: 8
class ClassMain {
public static void Main() {
try { }
catch {}
catch (System.Exception) { }
}
}
+43
View File
@@ -1,3 +1,46 @@
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.
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.
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.
2004-05-20 Martin Baulig <[email protected]>
* delegate.cs: Convert this file to Unix mode - like the original
+30 -5
View File
@@ -1091,18 +1091,27 @@ namespace Mono.CSharp {
object r;
error = false;
int p = name.LastIndexOf ('.');
if (dh.Lookup (ns, name, out r))
return (Type) r;
else {
//
// If the type is not a nested type, we do not need `LookupType's processing.
// If the @name does not have a `.' in it, this cant be a nested type.
//
if (ns != ""){
if (Namespace.IsNamespace (ns)){
string fullname = (ns != "") ? ns + "." + name : name;
t = TypeManager.LookupType (fullname);
if (Namespace.IsNamespace (ns)) {
if (p != -1)
t = TypeManager.LookupType (ns + "." + name);
else
t = TypeManager.LookupTypeDirect (ns + "." + name);
} else
t = null;
} else
} else if (p != -1)
t = TypeManager.LookupType (name);
else
t = TypeManager.LookupTypeDirect (name);
}
if (t != null) {
@@ -1113,7 +1122,7 @@ namespace Mono.CSharp {
//
// In case we are fed a composite name, normalize it.
//
int p = name.LastIndexOf ('.');
if (p != -1){
ns = MakeFQN (ns, name.Substring (0, p));
name = name.Substring (p+1);
@@ -2255,6 +2264,22 @@ namespace Mono.CSharp {
return copy;
}
// find the nested type @name in @this.
public Type FindNestedType (string name)
{
ArrayList applicable = (ArrayList) member_hash [name];
if (applicable == null)
return null;
for (int i = applicable.Count-1; i >= 0; i--) {
CacheEntry entry = (CacheEntry) applicable [i];
if ((entry.EntryType & EntryType.NestedType & EntryType.MaskType) != 0)
return (Type) entry.Member;
}
return null;
}
//
// This finds the method or property for us to override. invocationType is the type where
// the override is going to be declared, name is the name of the method/property, and
+21 -27
View File
@@ -4754,7 +4754,7 @@ namespace Mono.CSharp {
//
// false is normal form, true is expanded form
//
Hashtable candidate_to_form = new PtrHashtable ();
Hashtable candidate_to_form = null;
//
@@ -4794,14 +4794,16 @@ namespace Mono.CSharp {
candidates.Add (candidate);
applicable_type = candidate.DeclaringType;
found_applicable = true;
candidate_to_form [candidate] = false;
} else if (IsParamsMethodApplicable (ec, me, Arguments, ref methods [i])) {
if (candidate_to_form == null)
candidate_to_form = new PtrHashtable ();
// Candidate is applicable in expanded form
MethodBase candidate = methods [i];
MethodBase candidate = methods [i];
candidates.Add (candidate);
applicable_type = candidate.DeclaringType;
found_applicable = true;
candidate_to_form [candidate] = true;
candidate_to_form [candidate] = candidate;
}
}
@@ -4817,11 +4819,11 @@ namespace Mono.CSharp {
for (int ix = 0; ix < candidate_top; ix++){
MethodBase candidate = (MethodBase) candidates [ix];
bool cand_params = (bool) candidate_to_form [candidate];
bool cand_params = candidate_to_form != null && candidate_to_form.Contains (candidate);
bool method_params = false;
if (method != null)
method_params = (bool) candidate_to_form [method];
method_params = candidate_to_form != null && candidate_to_form.Contains (method);
int x = BetterFunction (ec, Arguments,
candidate, cand_params,
@@ -4896,7 +4898,7 @@ namespace Mono.CSharp {
// Now check that there are no ambiguities i.e the selected method
// should be better than all the others
//
bool best_params = (bool) candidate_to_form [method];
bool best_params = candidate_to_form != null && candidate_to_form.Contains (method);
for (int ix = 0; ix < candidate_top; ix++){
MethodBase candidate = (MethodBase) candidates [ix];
@@ -4916,7 +4918,7 @@ namespace Mono.CSharp {
// IsApplicable (ec, Arguments, method)))
// continue;
bool cand_params = (bool) candidate_to_form [candidate];
bool cand_params = candidate_to_form != null && candidate_to_form.Contains (candidate);
int x = BetterFunction (ec, Arguments,
method, best_params,
candidate, cand_params,
@@ -7117,23 +7119,15 @@ namespace Mono.CSharp {
"type name instead");
}
static bool IdenticalNameAndTypeName (EmitContext ec, Expression left_original, Location loc)
static bool IdenticalNameAndTypeName (EmitContext ec, Expression left_original, Expression left, Location loc)
{
if (left_original == null)
SimpleName sn = left_original as SimpleName;
if (sn == null || left == null || left.Type.Name != sn.Name)
return false;
if (!(left_original is SimpleName))
return false;
SimpleName sn = (SimpleName) left_original;
TypeExpr t = RootContext.LookupType (ec.DeclSpace, sn.Name, true, loc);
if (t != null)
return true;
return false;
return RootContext.LookupType (ec.DeclSpace, sn.Name, true, loc) != null;
}
public static Expression ResolveMemberAccess (EmitContext ec, Expression member_lookup,
Expression left, Location loc,
Expression left_original)
@@ -7185,7 +7179,7 @@ namespace Mono.CSharp {
if (decl_type.IsSubclassOf (TypeManager.enum_type)) {
if (left_is_explicit && !left_is_type &&
!IdenticalNameAndTypeName (ec, left_original, loc)) {
!IdenticalNameAndTypeName (ec, left_original, member_lookup, loc)) {
error176 (loc, fe.FieldInfo.Name);
return null;
}
@@ -7266,23 +7260,23 @@ namespace Mono.CSharp {
if (!me.IsStatic){
if ((ec.IsFieldInitializer || ec.IsStatic) &&
IdenticalNameAndTypeName (ec, left_original, loc))
IdenticalNameAndTypeName (ec, left_original, member_lookup, loc))
return member_lookup;
SimpleName.Error_ObjectRefRequired (ec, loc, me.Name);
return null;
}
} else {
if (!me.IsInstance){
if (IdenticalNameAndTypeName (ec, left_original, loc))
if (!me.IsInstance) {
if (IdenticalNameAndTypeName (ec, left_original, left, loc))
return member_lookup;
if (left_is_explicit) {
error176 (loc, me.Name);
return null;
}
}
}
//
// Since we can not check for instance objects in SimpleName,
+4 -1
View File
@@ -105,7 +105,10 @@ namespace Mono.CSharp {
if (ns != null)
return ns;
t = TypeManager.LookupType (DeclSpace.MakeFQN (fullname, name));
//
// The type is not a nested type here
//
t = TypeManager.LookupTypeDirect (DeclSpace.MakeFQN (fullname, name));
if ((t == null) || ((ds != null) && !ds.CheckAccessLevel (t)))
return null;
+23 -10
View File
@@ -487,7 +487,7 @@ namespace Mono.CSharp {
}
static TypeExpr NamespaceLookup (DeclSpace ds, string name,
int num_type_args, Location loc)
int num_type_args, bool silent, Location loc)
{
//
// Try in the current namespace and all its implicit parents
@@ -528,8 +528,6 @@ namespace Mono.CSharp {
if (ds.Cache.Contains (name)){
t = (TypeExpr) ds.Cache [name];
if (t != null)
return t;
} else {
//
// For the case the type we are looking for is nested within this one
@@ -537,9 +535,26 @@ namespace Mono.CSharp {
//
DeclSpace containing_ds = ds;
while (containing_ds != null){
// if the member cache has been created, lets use it.
// the member cache is MUCH faster.
if (containing_ds.MemberCache != null) {
Type type = containing_ds.MemberCache.FindNestedType (name);
if (type == null) {
containing_ds = containing_ds.Parent;
continue;
}
t = new TypeExpression (type, loc);
ds.Cache [name] = t;
return t;
}
// no member cache. Do it the hard way -- reflection
Type current_type = containing_ds.TypeBuilder;
while (current_type != null) {
while (current_type != null &&
current_type != TypeManager.object_type) {
//
// nested class
//
@@ -556,17 +571,15 @@ namespace Mono.CSharp {
containing_ds = containing_ds.Parent;
}
t = NamespaceLookup (ds, name, num_type_params, loc);
if (t != null){
t = NamespaceLookup (ds, name, num_type_params, silent, loc);
if (!silent)
ds.Cache [name] = t;
return t;
}
}
if (!silent)
if (t == null && !silent)
Report.Error (246, loc, "Cannot find type `"+name+"'");
return null;
return t;
}
// <summary>
+10 -5
View File
@@ -690,12 +690,17 @@ public class TypeManager {
Type t = (Type) types [name];
if (t != null)
return t;
t = LookupTypeReflection (name);
if (t == null)
if (negative_hits.Contains (name))
return null;
types [name] = t;
t = LookupTypeReflection (name);
if (t == null)
negative_hits [name] = null;
else
types [name] = t;
return t;
}
+1
View File
@@ -28,6 +28,7 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: Mono.Author("Anirban Bhattacharjee")]
[assembly: Mono.Author("Martin Baulig")]
[assembly: Mono.Author("Marco Ridoni")]
[assembly: Mono.Author("Rafael Teixeira")]
+3
View File
@@ -1,3 +1,6 @@
2004/05/31 Rafael Teixeira <[email protected]>
* AssemblyInfo.cs : Anirban is and author too
2004-05-27 Anirban Bhattacharjee <[email protected]>
* delegate.cs:
* expression.cs:
+2 -2
View File
@@ -26,8 +26,8 @@ mb-parser.cs: mb-parser.jay
verbose: mbas.exe
$(TEST_RUNTIME) ./mbas.exe --verbosegetoptions --verbose --stacktrace /libpath:../class/lib/$(PROFILE) /r:Mono.GetOptions /r:System.Data,System.Windows.Forms --main WriteOK testmbas/WriteOK.vb testmbas/WriteOK2.mbs
testmbas/WriteOK.exe: mbas.exe testmbas/*.vb testmbas/*.mbs
$(TEST_RUNTIME) ./mbas.exe --stacktrace --verbosegetoptions /libpath:../class/lib/$(PROFILE) /r:Mono.GetOptions /r:System.Data,System.Windows.Forms --main WriteOK testmbas/WriteOK.vb testmbas/WriteOK2.mbs
testmbas/WriteOK.exe: Makefile mbas.exe testmbas/*.vb testmbas/*.mbs
$(TEST_RUNTIME) ./mbas.exe --verbosegetoptions --stacktrace /libpath:../class/lib/$(PROFILE) --reference=Mono.GetOptions -r:System.Data,System.Messaging --main WriteOK testmbas/WriteOK.vb testmbas/WriteOK2.mbs
test-aspx: mbas.exe testmbas/aspx_temp.vb
$(TEST_RUNTIME) --debug ./mbas.exe --stacktrace --verbosegetoptions /libpath:../class/lib/$(PROFILE) /target:library /r:"System.dll" /r:"System.Xml.dll" /r:"System.Data.dll" /r:"System.Web.dll" /r:"System.Web.Services.dll" /r:"System.Drawing.dll" -- testmbas/aspx_temp.vb
+3 -1
View File
@@ -867,7 +867,9 @@ namespace Mono.Languages
/// </summary>
int MainDriver(string [] args)
{
Console.WriteLine ("THIS IS ALPHA AND UNSUPPORTED SOFTWARE, USE AT YOUR OWN RISK.");
Console.WriteLine ("--------");
Console.WriteLine ("MonoBASIC: THIS IS STILL ALPHA AND UNSUPPORTED SOFTWARE, USE AT YOUR OWN RISK.");
Console.WriteLine ("--------");
SetupDefaultDefines();
SetupDefaultImports();
+1 -1
View File
@@ -1,7 +1,7 @@
using System.Reflection;
using System.Runtime.CompilerServices;
[assembly: AssemblyVersion("0.94")]
[assembly: AssemblyVersion("0.95")]
[assembly: AssemblyTitle ("Mono C# Compiler")]
[assembly: AssemblyDescription ("Mono C# Compiler")]
[assembly: AssemblyCopyright ("2001, 2002, 2003 Ximian, Inc.")]
+81
View File
@@ -1,3 +1,84 @@
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.
2004-05-31 Martin Baulig <[email protected]>
MCS is now frozen for beta 2.
2004-05-30 Ben Maurer <[email protected]>
* convert.cs: add a trivial cache for overload operator resolution.
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.
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.
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.
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.
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.
2004-05-29 Martin Baulig <[email protected]>
* class.cs (ConstructorInitializer.GetOverloadedConstructor):
Added support for `params' parameters. Fixes #59267.
2004-05-29 Martin Baulig <[email protected]>
* literal.cs (NullPointer): Provide a private .ctor which sets
Loaded 100 of 125 files, more files were not shown because too many files have changed in this diff. Show more