Compare commits

...
418 Commits
Author SHA1 Message Date
nobody af150fc45b This commit was manufactured by cvs2svn to create tag 'MCS_0_14'.
svn path=/tags/MCS_0_14/mcs/; revision=6680
2002-08-16 16:54:02 +00:00
Gonzalo Paniagua Javier 074dd116b5 2002-08-16 Gonzalo Paniagua Javier <[email protected]>
* FormatterServices.cs:a implemented GetSerializableMembers ().

svn path=/trunk/mcs/; revision=6679
2002-08-16 16:54:02 +00:00
Jaime Anguiano Olarra 39bf505fc8 Reordered. Updated. New links.
svn path=/trunk/mono/; revision=6678
2002-08-16 16:52:10 +00:00
Gonzalo Paniagua Javier 7fa479a7be 2002-08-16 Gonzalo Paniagua Javier <[email protected]>
* FormatterServices.cs: New file with some implementation.

svn path=/trunk/mcs/; revision=6677
2002-08-16 15:35:10 +00:00
Duncan Mak 0e72616dce Various serialization patches from Cesar.
2002-08-14  Cesar Octavio Lopez Nataren <[email protected]>

	* regex.cs: Added the ctr for ISerializable implementation and
	implemented the GetObjectData function.

2002-08-14  Cesar Octavio Lopez Nataren <[email protected]>

	* SoapFault.cs: Added the ctr for ISerializable implementation and
	implemented GetObjectData.

2002-08-14  Cesar Octavio Lopez Nataren <[email protected]>

	* WeakReference.cs: Changed the constructor and GetObjectData
	method needed for ISerializable implementation in order to be
	compatible with SOAP generated by MS.

svn path=/trunk/mcs/; revision=6676
2002-08-16 14:39:31 +00:00
Dietmar Maurer 62fe7b089e 2002-08-16 Dietmar Maurer <[email protected]>
* appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
	to the right domain.

svn path=/trunk/mono/; revision=6674
2002-08-16 12:59:28 +00:00
Dietmar Maurer 8e26f9cfaa 2002-08-16 Dietmar Maurer <[email protected]>
* SerializationInfo.cs: special case for null values.
	use the converter everywhere.

svn path=/trunk/mcs/; revision=6673
2002-08-16 12:54:45 +00:00
Dietmar Maurer 50cf0a1d10 use Directory.GetCurrentDirectory () to make it work on windows
svn path=/trunk/mono/; revision=6672
2002-08-16 09:57:30 +00:00
Jaime Anguiano Olarra 633d211e5f Added the Mono Beginning Windows section to the web. Now going to add links
to the documents from mono-beginning.

svn path=/trunk/mono/; revision=6671
2002-08-16 09:40:49 +00:00
Dietmar Maurer 39fe36ae8c only added a comment
svn path=/trunk/mono/; revision=6670
2002-08-16 07:37:34 +00:00
John Sohn 567c035fb3 Initial version of code necessary to get the Form class operating under WINELib including Form (base classes up to and including Control class) and Application classes. Also including a mostly complete version of NativeWindow class which is being used to implement the Control class.
svn path=/trunk/mcs/; revision=6669
2002-08-16 06:55:53 +00:00
Gonzalo Paniagua Javier 922dfc4b3d 2002-08-16 Gonzalo Paniagua Javier <[email protected]>
* System.Web.Compilation/AspElements.cs:
	* System.Web.Compilation/AspParser.cs:
	* System.Web.Compilation/AspTokenizer.cs:
	* System.Web.Compilation/ChangeLog:
	* System.Web.Compilation/PageCompiler.cs:
	* System.Web.Compilation/TemplateFactory.cs:
	* System.Web.UI/ApplicationFileParser.cs:
	* System.Web.UI/BaseParser.cs:
	* System.Web.UI/PageParser.cs:
	* System.Web.UI/TemplateControl.cs:
	* System.Web.UI/TemplateControlParser.cs:
	* System.Web.UI/TemplateParser.cs: first steps to move xsp into
	System.Web.

svn path=/trunk/mcs/; revision=6668
2002-08-16 05:36:06 +00:00
Nick Drochak 467d6874aa oops. here's the file
svn path=/trunk/mono/; revision=6666
2002-08-16 04:48:02 +00:00
Nick Drochak ed65e24aa2 2002-08-16 Nick Drochak <[email protected]>
* x86.brg (mono_llmult_ovf): Flip ALL the bits, dummy. Now negative
	numbers	work.

svn path=/trunk/mono/; revision=6665
2002-08-16 04:44:17 +00:00
Miguel de Icaza a0b63a3a2b Make it do what Arturo needs
svn path=/trunk/mcs/; revision=6664
2002-08-16 02:56:04 +00:00
Miguel de Icaza 2a71fad59b Add dist target
svn path=/trunk/mcs/; revision=6663
2002-08-16 02:41:38 +00:00
Rodrigo Moya 533db1f6d6 2002-08-16 Rodrigo Moya <[email protected]>
* System.Data.OleDb/libgda.cs: added new needed libgda functions.

	* System.Data.OleDb/OleDbDataReader.cs (GetBoolean): throw exceptions
	when there are errors.
	(GetByte, GetChar, GetDataTypeName, GetValue, Read): implemented.

	* System.Data.OleDb/TestOleDb.cs: added more testing code for data
	readers.

svn path=/trunk/mcs/; revision=6662
2002-08-16 02:31:27 +00:00
Rodrigo Moya 9a9a2552ee 2002-08-15 Rodrigo Moya <[email protected]>
* System.Data.OleDb/OleDbParameterCollection.cs (GdaParameterList):
	create an empty GdaParameterList.

	* System.Data.OleDb/OleDbCommand.cs (ExecuteReader): check values
	for NULL before passing them to Marshal.PtrToStructure, which issues
	an exception if the value is NULL.

svn path=/trunk/mcs/; revision=6661
2002-08-16 01:36:52 +00:00
Rodrigo Moya 6a793a7e4c 2002-08-15 Rodrigo Moya <[email protected]>
* System.Data.OleDb/OleDbCommand.cs (ExecuteReader): check values
	for NULL before passing them to Marshal.PtrToStructure, which issues
	an exception if the value is NULL.

svn path=/trunk/mcs/; revision=6660
2002-08-16 01:35:51 +00:00
Rodrigo Moya 58da214495 2002-08-15 Rodrigo Moya <[email protected]>
* System.Data/UniqueConstraint.cs (UniqueConstraint): commented
	unreachable code to avoid compiler warning.

	* System.Data.OleDb/libgda.cs (GdaList): added new internal class.

	* System.Data.OleDb/OleDbConnection.cs (DataSource): implemented.
	(OpenReader): removed internal method.

	* System.Data.OleDb/OleDbCommand.cs (ExecuteReader): split correctly
	the list of returned data models.

svn path=/trunk/mcs/; revision=6659
2002-08-16 01:19:29 +00:00
Miguel de Icaza 8a9d0d3a6f use the just built mcs
svn path=/trunk/mcs/; revision=6657
2002-08-16 00:18:12 +00:00
Miguel de Icaza 27429d34b2 2002-08-15 Miguel de Icaza <[email protected]>
* driver.cs (LoadArgs): Support quoting.

svn path=/trunk/mcs/; revision=6656
2002-08-16 00:12:28 +00:00
Miguel de Icaza 8a8571b55a make this the default. we need this for the snapshots
svn path=/trunk/mcs/; revision=6655
2002-08-15 23:41:41 +00:00
Miguel de Icaza 1665b5b5f9 2002-08-15 Miguel de Icaza <[email protected]>
* driver.cs: Show the CSC-like command line arguments.

	Improved a few error messages.

svn path=/trunk/mcs/; revision=6654
2002-08-15 22:57:39 +00:00
Franklin Wise 3ad554ae46 *** empty log message ***
svn path=/trunk/mcs/; revision=6653
2002-08-15 20:31:01 +00:00
Jaime Anguiano Olarra 8b400082cd Added more Q/A pairs, updated one as Jason Diamond suggested (read my reply
to mono-list and to him. Added a section: Mono and ADO.NET with two Q/A.

svn path=/trunk/mono/; revision=6652
2002-08-15 17:33:33 +00:00
Jaime Anguiano Olarra 05d0acdf9c Added Mono Beginning Windows (Another HOWTO)
svn path=/trunk/mono/; revision=6650
2002-08-15 15:18:07 +00:00
Tim Coleman d051a5f14c 2002-08-15 Tim Coleman <[email protected]>
* FaultBindingCollection.cs:
        * ImportCollection.cs:
        * MessageCollection.cs:
        * MessagePartCollection.cs:
        * OperationBindingCollection.cs:
        * OperationCollection.cs:
        * OperationFaultCollection.cs:
        * OperationMessageCollection.cs:
        * PortCollection.cs:
        * PortTypeCollection.cs:
        * ServiceCollection.cs:
        * ServiceDescriptionFormatExtensionCollection.cs:
                Use parent from ServiceDescriptionBaseCollection
        * ServiceDescriptionCollection.cs:
                Use parent from ServiceDescriptionBaseCollection
                Implement SetParent () method
        * ServiceDescriptionBaseCollection.cs:
                Add "parent" object.
                Add SetParent call to OnSet() and OnInsert ()

svn path=/trunk/mcs/; revision=6649
2002-08-15 14:45:16 +00:00
Martin Baulig 1c829a1da6 2002-08-15 Martin Baulig <[email protected]>
* typemanager.cs (IMemberContainer.Type): New property.
	(IMemberContainer.IsInterface): New property.

	The following changes are conditional to BROKEN_RUNTIME, which is
	defined at the top of the file.

	* typemanager.cs (MemberCache.MemberCache): Don't add the base
	class'es members, but add all members from TypeHandle.ObjectType
	if we're an interface.
	(MemberCache.AddMembers): Set the Declared flag if member.DeclaringType
	is the current type.
	(MemberCache.CacheEntry.Container): Removed this field.
	(TypeHandle.GetMembers): Include inherited members.

svn path=/trunk/mcs/; revision=6648
2002-08-15 14:07:16 +00:00
Martin Baulig 38486c66a7 Oooops .....
svn path=/trunk/mcs/; revision=6647
2002-08-15 13:02:54 +00:00
Daniel Morgan f6974a69f0 2002-08-14 Daniel Morgan <[email protected]>
* SqlSharpCli.cs: modified
	  - implemented the following commands:
	    \f FILENAME to read a batch of Sql# commands/queries from file.");
		\o FILENAME to write out the result of Sql# commands executed to file.");
		\load FILENAME to load from file SQL commands into SQL buffer.");
		\save FILENAME to save SQL commands from SQL buffer to file.
		\print - show what's in the SQL buffer now.
	  - can save output of result to an html file or text
	  - entering command "\provider mysql" will dynamically load mysql provider
	    from its assembly Mono.Data.MySql.dll

svn path=/trunk/mcs/; revision=6646
2002-08-15 03:30:57 +00:00
Nick Drochak 054a55eb8a 2002/08/15 Nick Drochak <[email protected]>
* x86.brg (mono_llmult_ovf): Fix so it throws an overflow when result
	will not fit in 64 bits.  Fixes bug #27375.

svn path=/trunk/mono/; revision=6645
2002-08-15 03:00:14 +00:00
Gonzalo Paniagua Javier 64ccedaae1 2002-08-14 Gonzalo Paniagua Javier <[email protected]>
* typemanager.cs: fixed compilation and added a comment on a field that
	is never used.

svn path=/trunk/mcs/; revision=6644
2002-08-15 01:43:26 +00:00
Martin Baulig f30a45aa81 2002-08-15 Martin Baulig <[email protected]>
* class.cs (ConstructorInitializer.Resolve): In the
	Expression.MemberLookup call, use the queried_type as
	invocation_type.

	* typemanager.cs (IMemberContainer.GetMembers): Removed the `bool
	declared' attribute, it's always true.
	(IMemberContainer.Parent, IMemberContainer.Name): New properties.
	(TypeManager.MemberLookup_FindMembers): [FIXME FIXME FIXME] Added
	temporary wrapper for FindMembers which tells MemberLookup whether
	members from the base classes are included in the return value.
	This will go away soon.
	(TypeManager.MemberLookup): Use this temporary hack here; once the
	new MemberCache is completed, we don't need to do the DeclaredOnly
	looping here anymore since the MemberCache will take care of this.
	(TypeManager.IsSubclassOrNestedChildOf): Allow `type == parent'.
	(MemberCache): When creating the MemberCache for a class, get
	members from the current class and all its base classes.
	(MemberCache.CacheEntry.Container): New field.  This is a
	temporary hack until the Mono runtime is fixed to distinguish
	between ReflectedType and DeclaringType.  It allows us to use MCS
	with both the MS runtime and the unfixed Mono runtime without
	problems and without accecting performance.
	(MemberCache.SearchMembers): The DeclaredOnly looping from
	TypeManager.MemberLookup is now done here.

svn path=/trunk/mcs/; revision=6643
2002-08-15 00:53:27 +00:00
Miguel de Icaza f87fdfe28b PPC updates from Carlos Valiente
svn path=/trunk/mono/; revision=6642
2002-08-14 20:09:40 +00:00
Miguel de Icaza 991dcf3052 PPC updates from Carlos Valiente
svn path=/trunk/mono/; revision=6641
2002-08-14 20:09:00 +00:00
Martin Baulig 7fe8800db6 2002-08-14 Martin Baulig <[email protected]>
* statement.cs (MyStructInfo.MyStructInfo): Don't call
	Type.GetFields on dynamic types but get the fields from the
	corresponding TypeContainer.
	(MyStructInfo.GetStructInfo): Added check for enum types.

	* typemanager.cs (MemberList.IsSynchronized): Implemented.
	(MemberList.SyncRoot): Implemented.
	(TypeManager.FilterWithClosure): No need to check permissions if
	closure_start_type == closure_invocation_type, don't crash if
	closure_invocation_type is null.

svn path=/trunk/mcs/; revision=6640
2002-08-14 18:18:01 +00:00
Dietmar Maurer c524434bdd *** empty log message ***
svn path=/trunk/mcs/; revision=6639
2002-08-14 16:11:16 +00:00
Dietmar Maurer 9499c0c0c8 2002-08-14 Dietmar Maurer <[email protected]>
* SerializationInfo.cs: added new function to support the runtime

svn path=/trunk/mcs/; revision=6638
2002-08-14 16:10:32 +00:00
Dietmar Maurer 61653dcf07 2002-08-14 Dietmar Maurer <[email protected]>
* marshal.c (mono_marshal_get_runtime_invoke): unbox value types

	* class.c (class_compute_field_layout): set blittable to false for Strings

	* appdomain.c (mono_domain_transfer_object): added support for ISerializable

svn path=/trunk/mono/; revision=6637
2002-08-14 16:08:11 +00:00
Paolo Molaro 2692004c15 Wed Aug 14 17:37:30 CEST 2002 Paolo Molaro <[email protected]>
* MonoEvent.cs, MonoMethod.cs: implemented ReflectedType.

svn path=/trunk/mcs/; revision=6636
2002-08-14 15:42:41 +00:00
Paolo Molaro c63be4a417 Wed Aug 14 17:38:41 CEST 2002 Paolo Molaro <[email protected]>
* TypeBuilder.cs: ReflectedType and CreateType fixes.

svn path=/trunk/mcs/; revision=6635
2002-08-14 15:41:38 +00:00
Paolo Molaro cee7cd6432 Wed Aug 14 17:31:37 CEST 2002 Paolo Molaro <[email protected]>
* exception.c: updates for API changes in metadata/.

svn path=/trunk/mono/; revision=6634
2002-08-14 15:40:33 +00:00
Paolo Molaro 389d8b96eb Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <[email protected]>
* appdomain.h, reflection.c, icall.c, object.c, reflection.h:
	first chunk of code to create types at runtime. Code to
	handle ReflectedType/DeclaringType. Make reflection handles
	domain specific.

svn path=/trunk/mono/; revision=6633
2002-08-14 15:40:31 +00:00
Paolo Molaro d8e2cf5a68 Wed Aug 14 17:34:07 CEST 2002 Paolo Molaro <[email protected]>
* MonoType.cs, Type.cs: DeclaringType/ReflectedType fixes.

svn path=/trunk/mcs/; revision=6632
2002-08-14 15:40:23 +00:00
Paolo Molaro 22b8e0ef8f Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <[email protected]>
* class.c: set correct name in arrays.

svn path=/trunk/mono/; revision=6631
2002-08-14 15:26:33 +00:00
Tim Coleman c72c36abd3 2002-08-13 Tim Coleman <[email protected]>
* list: new files added to build

svn path=/trunk/mcs/; revision=6630
2002-08-14 13:40:01 +00:00
Tim Coleman faa9aa885a 2002-08-13 Tim Coleman <[email protected]>
* Clerk.cs:
        * Compensator.cs:
                New stubs added.

svn path=/trunk/mcs/; revision=6629
2002-08-14 13:39:25 +00:00
Dick Porter d5365829c9 Update source list
svn path=/trunk/mcs/; revision=6628
2002-08-14 13:29:59 +00:00
Dick Porter 9de46ebb4b 2002-08-14 Dick Porter <[email protected]>
* ResourceSet.cs: Throw the correct exceptions

	* ResourceManager.cs: Implemented all unfinished methods

svn path=/trunk/mcs/; revision=6627
2002-08-14 10:29:20 +00:00
Dick Porter b08ba63e3b 2002-08-14 Dick Porter <[email protected]>
* Assembly.cs: Stub out GetSatelliteAssembly

svn path=/trunk/mcs/; revision=6626
2002-08-14 10:28:02 +00:00
Dick Porter c3ef3b2ace 2002-08-14 Dick Porter <[email protected]>
* Thread.cs: Make CurrentUICulture act the same as CurrentCulture
	for now.

svn path=/trunk/mcs/; revision=6625
2002-08-14 10:06:49 +00:00
Dick Porter ce0b941981 2002-08-14 Dick Porter <[email protected]>
* CultureInfo.cs: Implement Name, stub out all the other missing
	methods.

	* TextInfo.cs: Stubbed out this class

svn path=/trunk/mcs/; revision=6624
2002-08-14 10:04:03 +00:00
Tim Coleman 06ef625369 2002-08-14 Tim Coleman <[email protected]>
* XmlSerializer.cs:
                More reformatting of source code so I can
                better understand what it does.

svn path=/trunk/mcs/; revision=6623
2002-08-14 05:24:03 +00:00
Daniel Morgan e34de2a008 2002-08-13 Daniel Morgan <[email protected]>
* Test/SqlSharpCli.cs: modified
	  - removed dependency on Mono.Data.MySql assembly and classes
	    (if you still want to use Mono.Data.MySql, use \loadextprovider to load it).
	  - added use of provider System.Data.OleDb classes; however, you must
	    have a working libgda.
	  - added dynamic loading of .NET Data Provider's assembly and Connection class
	    which can be loaded via \loadextprovider
	  - renamed providers: postgresclient to postgresql, oracleclient to oracle
	  - add new command \exenonquery to execute non queries
	  - add new command \exescalar to execute and return one row/one column of data
	  - added beginnings of internal variables by adding new commands: \set, \unset, and
	  \variable
	  - add new command \r to reset (clear) the query buffer
	  - if quiting, need to close database connection if still open

svn path=/trunk/mcs/; revision=6622
2002-08-14 03:19:02 +00:00
Daniel Morgan d2ab69888d 2002-08-13 Daniel Morgan <[email protected]>
* Mono.Data.MySql/MySqlCommand.cs: modified
	rowsRetrieved should be rowsAffected in ExecuteNonQuery
	because the number is only to show the rows affected
	by an INSERT, UPDATE, or DELETE; anything else, the
	number is -1

	* Mono.Data.MySql/Test.cs: modified
	enable retrieving the results from a query.  even though
	this still does not work for some reason, i thought
	i would enable it so others could see the problem.

svn path=/trunk/mcs/; revision=6621
2002-08-14 02:53:49 +00:00
Tim Coleman b5443be6ef 2002-08-13 Tim Coleman <[email protected]>
* XmlTextWriter.cs:
                Partial implementation of WriteQualifiedName ().

svn path=/trunk/mcs/; revision=6620
2002-08-14 02:42:16 +00:00
Franklin Wise 9d3742f8a4 *** empty log message ***
svn path=/trunk/mcs/; revision=6619
2002-08-13 21:57:30 +00:00
Martin Baulig e17a1613a0 This indexer was supposed to be public.
svn path=/trunk/mcs/; revision=6618
2002-08-13 19:30:49 +00:00
Martin Baulig 93c137f414 [Conditional] is not valid on classes.
svn path=/trunk/mcs/; revision=6617
2002-08-13 19:29:07 +00:00
Miguel de Icaza a12f24d3c0 Update news
svn path=/trunk/mono/; revision=6616
2002-08-13 19:13:18 +00:00
Martin Baulig e0c104ea39 2002-08-13 Martin Baulig <[email protected]>
Rewrote TypeContainer.FindMembers to use a member cache.  This
	gives us a speed increase of about 35% for the self-hosting MCS
	build and of about 15-20% for the class libs (both on GNU/Linux).

	* report.cs (Timer): New class to get enhanced profiling.  This
	whole class is "TIMER" conditional since it remarkably slows down
	compilation speed.

	* class.cs (MemberList): New class.  This is an IList wrapper
	which we're now using instead of passing MemberInfo[]'s around to
	avoid copying this array unnecessarily.
	(IMemberFinder.FindMember): Return a MemberList, not a MemberInfo [].
	(ICachingMemberFinder, IMemberContainer): New interface.
	(TypeManager.FilterWithClosure): If `criteria' is null, the name
	has already been checked, otherwise use it for the name comparision.
	(TypeManager.FindMembers): Renamed to RealMemberFinder and
	provided wrapper which tries to use ICachingMemberFinder.FindMembers
	if possible.  Returns a MemberList, not a MemberInfo [].
	(TypeHandle): New class, implements IMemberContainer.  We create
	one instance of this class per type, it contains a MemberCache
	which is used to do the member lookups.
	(MemberCache): New class.  Each instance of this class contains
	all members of a type and a name-based hash table.
	(MemberCache.FindMembers): This is our new member lookup
	function.  First, it looks up all members of the requested name in
	the hash table.  Then, it walks this list and sorts out all
	applicable members and returns them.

svn path=/trunk/mcs/; revision=6615
2002-08-13 19:09:39 +00:00
Rodrigo Moya 759613b0ac Added more files
svn path=/trunk/mcs/; revision=6614
2002-08-13 16:14:09 +00:00
Rodrigo Moya 5c890a25c4 2002-08-13 Rodrigo Moya <[email protected]>
* SoapClientFormatterSink.cs:
	* SoapServerFormatterSinkProvider.cs:
	* SinkProviderData.cs: new classes.

svn path=/trunk/mcs/; revision=6613
2002-08-13 16:13:14 +00:00
Rodrigo Moya b23e7d5908 2002-08-13 Rodrigo Moya <[email protected]>
* System.Data.SqlClient/SqlDataAdapter.cs (DeleteCommand,
	InsertCommand, SelectCommand, UpdateCommand): removed 'new' keyword
	to avoid compiler warnings.

svn path=/trunk/mcs/; revision=6612
2002-08-13 15:48:49 +00:00
Rodrigo Moya 424c67c8bb 2002-08-12 Franklin Wise <[email protected]>
* System.Data/Constraint.cs: Implemented

	* System.Data/UniqueConstraint.cs: GetHashCode() &
	special case Ctor. Still need to be implemented. LAMESPEC tags
	added.

	* System.Data/ConstraintCollection.cs: Clear() &
	AddRange() need to be finished. Several LAMESPEC tags.

	* Allow Constraint collection to be created in DataTable.

	* System.Data/ForeignKeyConstraint: Added a couple of
	helper functions.

	* System.Data/DataColumnCollection New/Added DataColumns now have
	Table property set.

svn path=/trunk/mcs/; revision=6611
2002-08-13 15:42:01 +00:00
Dietmar Maurer 63e87414b7 2002-08-13 Dietmar Maurer <[email protected]>
* appdomain.c (mono_domain_transfer_object): make it work with
	valuetypes. bug fixes.

svn path=/trunk/mono/; revision=6609
2002-08-13 13:11:36 +00:00
Dietmar Maurer f44e10dcd8 2002-08-13 Dietmar Maurer <[email protected]>
* jit.c (mono_jit_init): use  ((gpointer)-1) as end_of_stack
	address for the main thread.

svn path=/trunk/mono/; revision=6608
2002-08-13 09:10:38 +00:00
Piers Haken 320677a3a6 2002-08-12 Piers Haken <[email protected]>
* class/library.make: use 'find' to specify source files, instead of static files
	* */makefile.gnu: specify include/exclude patterns for source files

svn path=/trunk/mcs/; revision=6607
2002-08-13 06:45:49 +00:00
Tim Coleman dce63b64e2 2002-08-12 Tim Coleman <[email protected]>
* Operation.cs:
                Fix ParameterOrderString in case ParameterOrder is
                null.

svn path=/trunk/mcs/; revision=6606
2002-08-13 02:11:02 +00:00
Tim Coleman 6869e30046 2002-08-12 Tim Coleman <[email protected]>
* MonoProperty.cs:
	                Allow multiple parameters for GetValue ()

svn path=/trunk/mcs/; revision=6605
2002-08-13 01:20:39 +00:00
Tim Coleman 5bc5019876 2002-08-12 Tim Coleman <[email protected]>
* BindingCollection.cs:
                Remove Table handling on insert/delete/indexer
                because it is handled in base class.

svn path=/trunk/mcs/; revision=6604
2002-08-13 00:54:54 +00:00
Tim Coleman ed209759fd 2002-08-12 Tim Coleman <[email protected]>
* ServiceDescriptionBaseCollection.cs:
                Only add an element to the hashtable if its GetKey ()
                method does not return null.

svn path=/trunk/mcs/; revision=6603
2002-08-13 00:53:03 +00:00
Martin Baulig 934b45908c 2002-08-13 Martin Baulig <[email protected]>
In addition to a nice code cleanup, this gives us a performance
	increase of about 1.4% on GNU/Linux - not much, but it's already
	half a second for the self-hosting MCS compilation.

	* typemanager.cs (IMemberFinder): New interface.  It is used by
	TypeManager.FindMembers to call FindMembers on a TypeContainer,
	Enum, Delegate or Interface.
	(TypeManager.finder_to_member_finder): New PtrHashtable.
	(TypeManager.finder_to_container): Removed.
	(TypeManager.finder_to_delegate): Removed.
	(TypeManager.finder_to_interface): Removed.
	(TypeManager.finder_to_enum): Removed.

	* interface.cs (Interface): Implement IMemberFinder.

	* delegate.cs (Delegate): Implement IMemberFinder.

	* enum.cs (Enum): Implement IMemberFinder.

	* class.cs (TypeContainer): Implement IMemberFinder.

svn path=/trunk/mcs/; revision=6602
2002-08-12 22:40:40 +00:00
Martin Baulig f3e6fb6faa 2002-08-12 Martin Baulig <[email protected]>
* ecore.cs (TypeExpr.DoResolveType): Mark this as virtual.

svn path=/trunk/mcs/; revision=6600
2002-08-12 18:57:15 +00:00
Martin Baulig cbf795e489 Ooops, fixed my last commit.
svn path=/trunk/mcs/; revision=6599
2002-08-12 17:26:18 +00:00
Martin Baulig 609e0fd746 2002-08-12 Martin Baulig <[email protected]>
* ecore.cs (ITypeExpression): New interface for expressions which
	resolve to a type.
	(TypeExpression): Renamed to TypeLookupExpression.
	(Expression.DoResolve): If we're doing a types-only lookup, the
	expression must implement the ITypeExpression interface and we
	call DoResolveType() on it.
	(SimpleName): Implement the new ITypeExpression interface.
	(SimpleName.SimpleNameResolve): Removed the ec.OnlyLookupTypes
	hack, the situation that we're only looking up types can't happen
	anymore when this method is called.  Moved the type lookup code to
	DoResolveType() and call it.
	(SimpleName.DoResolveType): This ITypeExpression interface method
	is now doing the types-only lookup.
	(TypeExpr, TypeLookupExpression): Implement ITypeExpression.
	(ResolveFlags): Added MaskExprClass.

	* expression.cs (MemberAccess): Implement the ITypeExpression
	interface.
	(MemberAccess.DoResolve): Added support for a types-only lookup
	when we're called via ITypeExpression.DoResolveType().
	(ComposedCast): Implement the ITypeExpression interface.

	* codegen.cs (EmitContext.OnlyLookupTypes): Removed.  Call
	Expression.Resolve() with ResolveFlags.Type instead.

svn path=/trunk/mcs/; revision=6598
2002-08-12 17:18:16 +00:00
Rodrigo Moya 791551a1fd 2002-08-11 Rodrigo Moya <[email protected]>
* System.Data.OleDb/libgda.cs: added some GdaValue functions.

	* System.Data.OleDb/OleDbCommand.cs (OpenReader): removed this
	internal method, since we don't need it.
	(ExecuteReader): call SetupGdaCommand before executing the command
	via libgda functions.
	(ExecuteScalar): implemented.

	* System.Data.OleDb/OleDbDateReader.cs (OleDbDataReader): removed call
	to OleDbCommand.OpenReader.
	(GetBoolean): implemented.

svn path=/trunk/mcs/; revision=6597
2002-08-12 15:43:20 +00:00
Dietmar Maurer 30919f6c89 Thread::Abort() support
svn path=/trunk/mono/; revision=6596
2002-08-12 15:43:18 +00:00
Dietmar Maurer e78fe12a71 2002-08-12 Dietmar Maurer <[email protected]>
* Exception.cs (ToString): changed the ouput format.

	* ThreadAbortException.cs: impl. ExceptionState property.

	* Thread.cs: moved all instance variables to the start of the
	class. added support for Thread::Abort()

svn path=/trunk/mcs/; revision=6595
2002-08-12 15:42:02 +00:00
Dick Porter 405da0cfc5 Give the patch author proper credit
svn path=/trunk/mono/; revision=6593
2002-08-12 13:54:09 +00:00
Dick Porter 35993fc816 2002-08-12 Dick Porter <[email protected]>
* atomic.h:
	* object.h: Rename some parameters to avoid c++ keywords

svn path=/trunk/mono/; revision=6592
2002-08-12 13:46:57 +00:00
Martin Baulig 7fb9b61d1c 2002-08-12 Martin Baulig <[email protected]>
* interface.cs (Interface.Define): Apply attributes.

	* attribute.cs (Attribute.ApplyAttributes): Added support for
	interface attributes.

svn path=/trunk/mcs/; revision=6591
2002-08-12 12:34:55 +00:00
Gaurav Vaish 82569adb9a 2002-08-12 Gaurav Vaish <[email protected]>
* DataGrid.cs                 - Added protected method (skeleton)
				CreateColumnSet(PagedDataSource, bool)
				Still trying to know how will it be used
				and what for...

svn path=/trunk/mcs/; revision=6590
2002-08-12 11:59:47 +00:00
Paolo Molaro c8aa8adc77 Updated manpage.
svn path=/trunk/mono/; revision=6589
2002-08-12 11:05:06 +00:00
Dick Porter 2c8ed7e761 2002-08-12 Dick Porter <[email protected]>
* mono.pc.in: Add $includedir to Cflags

	* Don't link libtool convenience libs together before linking them
	  to other stuff (it breaks static builds)

svn path=/trunk/mono/; revision=6588
2002-08-12 10:05:51 +00:00
Martin Baulig cf3230844f 2002-08-11 Martin Baulig <[email protected]>
* error-3.cs: New test.

svn path=/trunk/mcs/; revision=6586
2002-08-11 19:36:12 +00:00
Martin Baulig 625275d351 2002-08-11 Martin Baulig <[email protected]>
* test-162.cs: New test.

svn path=/trunk/mcs/; revision=6585
2002-08-11 19:34:29 +00:00
Martin Baulig f7c08d45f1 2002-08-11 Martin Baulig <[email protected]>
* statement.cs (Block.Emit): Only check the "this" variable if we
	do not always throw an exception.

svn path=/trunk/mcs/; revision=6584
2002-08-11 19:32:20 +00:00
Martin Baulig 400a0fa7f4 2002-08-11 Martin Baulig <[email protected]>
* ecore.cs (PropertyExpr.DoResolveLValue): Implemented, check
	whether the property has a set accessor.

svn path=/trunk/mcs/; revision=6583
2002-08-11 19:27:25 +00:00
Martin Baulig 019038fb65 2002-08-11 Martin Baulig <[email protected]>
Added control flow analysis support for structs.

	* ecore.cs (ResolveFlags): Added `DisableFlowAnalysis' to resolve
	with control flow analysis turned off.
	(IVariable): New interface.
	(SimpleName.SimpleNameResolve): If MemberAccess.ResolveMemberAccess
	returns an IMemberExpr, call DoResolve/DoResolveLValue on it.
	(FieldExpr.DoResolve): Resolve the instance expression with flow
	analysis turned off and do the definite assignment check after the
	resolving when we know what the expression will resolve to.

	* expression.cs (LocalVariableReference, ParameterReference):
	Implement the new IVariable interface, only call the flow analysis
	code if ec.DoFlowAnalysis is true.
	(This): Added constructor which takes a Block argument.  Implement
	the new IVariable interface.
	(MemberAccess.DoResolve, MemberAccess.DoResolveLValue): Call
	DoResolve/DoResolveLValue on the result of ResolveMemberLookup().
	This does the definite assignment checks for struct members.

	* class.cs (Constructor.Emit): If this is a non-static `struct'
	constructor which doesn't have any initializer, call
	Block.AddThisVariable() to tell the flow analysis code that all
	struct elements must be initialized before control returns from
	the constructor.

	* statement.cs (MyStructInfo): New public class.
	(UsageVector.this [VariableInfo vi]): Added `int field_idx'
	argument to this indexer.  If non-zero, check an individual struct
	member, not the whole struct.
	(FlowBranching.CheckOutParameters): Check struct members.
	(FlowBranching.IsVariableAssigned, SetVariableAssigned): Added
	overloaded versions of these methods which take an additional
	`int field_idx' argument to check struct members.
	(FlowBranching.IsParameterAssigned, SetParameterAssigned): Added
	overloaded versions of these methods which take an additional
	`string field_name' argument to check struct member.s
	(VariableInfo): Implement the IVariable interface.
	(VariableInfo.StructInfo): New public property.  Returns the
	MyStructInfo instance of the variable if it's a struct or null.
	(Block.AddThisVariable): New public method.  This is called from
	Constructor.Emit() for non-static `struct' constructor which do
	not have any initializer.  It creates a special variable for the
	"this" instance variable which will be checked by the flow
	analysis code to ensure that all of the struct's fields are
	initialized before control returns from the constructor.
	(UsageVector): Added support for struct members.  If a
	variable/parameter is a struct with N members, we reserve a slot
	in the usage vector for each member.  A struct is considered fully
	initialized if either the struct itself (slot 0) or all its
	members are initialized.

svn path=/trunk/mcs/; revision=6582
2002-08-11 19:08:30 +00:00
Rodrigo Moya 9e4b82f521 Added more files
svn path=/trunk/mcs/; revision=6581
2002-08-11 18:00:51 +00:00
Rodrigo Moya 29b4a0ff4a 2002-08-10 Rodrigo Moya <[email protected]>
* CommonTransportKeys.cs:
	* ServerChannelSinkStack.cs: new classes.

svn path=/trunk/mcs/; revision=6580
2002-08-11 18:00:17 +00:00
Jaime Anguiano Olarra b1ead8f0f2 Faq updated. Fixed the double "Oberon" in the first section. Fixed the Windows.Forms mention in the list of class libraries Mono will implement. (At least by the moment. Since I've noticed that this is causing confusion to some people). Added more Q/A pairs.
svn path=/trunk/mono/; revision=6579
2002-08-11 10:08:28 +00:00
Gonzalo Paniagua Javier d15008ab68 2002-08-10 Gonzalo Paniagua Javier <[email protected]>
* RegistrationHelper.cs: fixed compilation.

svn path=/trunk/mcs/; revision=6575
2002-08-10 19:03:42 +00:00
Gonzalo Paniagua Javier 5db8a0e001 2002-08-10 Gonzalo Paniagua Javier <[email protected]>
* PagedDataSource.cs: fixed compilation.

svn path=/trunk/mcs/; revision=6574
2002-08-10 19:02:29 +00:00
Jason Diamond c47eee4306 * makefile.gnu: Added test target. Please start using it.
svn path=/trunk/mcs/; revision=6573
2002-08-10 18:37:44 +00:00
Jason Diamond d12ea80ba6 * makefile.gnu: Use relative path to NUnitConsole_mono.exe instead of
hardcoding it to /usr/local/bin. Default test suite to AllTests but
allow it to be overridden from the command line.

* XmlTextWriterTests.cs: Split TestWriteString into multiple tests.
Added encoding parameters to all the StreamReaders in
TestBaseConstructorsAndBaseStream. I think this is a bug in Mono's
StreamReader since these aren't required when testing against
Microsoft's.

svn path=/trunk/mcs/; revision=6572
2002-08-10 17:47:08 +00:00
Tim Coleman ea278b331e 2002-08-09 Tim Coleman <[email protected]>
* BindingCollection.cs:
        * ServiceDescriptionCollection.cs:
                Implement Set indexer
        * FaultBindingCollection.cs:
        * MessageCollection.cs:
        * MessagePartCollection.cs:
        * OperationFaultCollection.cs:
        * PortCollection.cs:
        * PortTypeCollection.cs:
        * ServiceCollection.cs:
                Implement Set indexer, code cleanup
        * Message.cs:
                Implement FindPartByName ()
        * OperationMessageCollection.cs:
                Alter OnSet () method
        * ServiceDescriptionBaseCollection.cs:
                Implement some methods.
        * ServiceDescriptionFormatExtensionCollection.cs:
                Implement Find (), FindAll (), OnValidate () methods

svn path=/trunk/mcs/; revision=6571
2002-08-10 08:05:47 +00:00
Peter Williams eccbfed148 2002-08-07 Peter Williams <[email protected]>
* class/library.make (.makefrag): Fix this rule a bit; was using
	$^ instead of $<

svn path=/trunk/mcs/; revision=6570
2002-08-09 19:31:10 +00:00
Tim Coleman 63a3913c54 2002-08-09 Tim Coleman <[email protected]>
* AllTests.cs:
                New test suites added.

svn path=/trunk/mcs/; revision=6568
2002-08-09 16:14:44 +00:00
Tim Coleman b519ef7ce6 2002-08-09 Tim Coleman <[email protected]>
* AllTests.cs:
        * ChangeLog:
        * ContractReferenceTest.cs:
                New files added for test suite.

svn path=/trunk/mcs/; revision=6567
2002-08-09 16:13:56 +00:00
Tim Coleman 519c2ff9d8 2002-08-09 Tim Coleman <[email protected]>
* AllTests.cs:
        * ChangeLog:
        * XmlFormatExtensionAttributeTest.cs:
                New files added for test suite.

svn path=/trunk/mcs/; revision=6566
2002-08-09 16:12:36 +00:00
Tim Coleman cabda218a6 2002-08-09 Tim Coleman <[email protected]>
* RegistrationHelperTx.cs:
                Commit the add of RegistrationHelperTx.cs

svn path=/trunk/mcs/; revision=6565
2002-08-09 16:09:53 +00:00
Nick Drochak 461571d604 2002-08-09 Nick Drochak <[email protected]>
* BinaryReader.cs: added virtual to Dispose(bool).

svn path=/trunk/mcs/; revision=6564
2002-08-09 14:46:08 +00:00
Miguel de Icaza 2f08aa2447 Fixed url
svn path=/trunk/mono/; revision=6563
2002-08-09 12:22:57 +00:00
Nick Drochak c00e025c5f 2002/08/09 Nick Drochak <[email protected]>
* DecimalTest.cs: Add try-catch block to find which one is throwing
	the Overflow.  Also started making each Assert using a unique message
	to differentiate those as well.

	* MulticastDelegate.cs: Disable tests checking the order that delegates
	are executed.  There's a bugzilla entry for this already because we do
	it in reverse order. See:
	http://bugzilla.ximian.com/show_bug.cgi?id=28306

svn path=/trunk/mcs/; revision=6562
2002-08-09 08:23:00 +00:00
Dietmar Maurer 70861f6802 2002-08-08 Dietmar Maurer <[email protected]>
* exception.c (arch_handle_exception): simply return and let the
	libpthread/kernel restore the context. This should work on recent
	versions of linuxthreads.

svn path=/trunk/mono/; revision=6561
2002-08-09 06:55:22 +00:00
Rodrigo Moya a43c7989ec 2002-08-08 Franklin Wise <[email protected]>
* System.Data.IDbComand.cs: IDbCommand now inherits IDisposable

	* System.Data.IDbConnection.cs: IDbConnection now inherits IDisposable

	* System.Data.SqlTypes.SqlCompareOptions.cs: Enum now set to correct
	values.

svn path=/trunk/mcs/; revision=6555
2002-08-08 23:19:06 +00:00
Martin Baulig 9b3b238e80 2002-08-08 Martin Baulig <[email protected]>
* driver.cs (Driver.MainDriver): Only report an error CS5001
	if there were no compilation errors.

	* codegen.cs (EmitContext.EmitContext): Use the DeclSpace's
	`UnsafeContext' property to determine whether the parent is in
	unsafe context rather than checking the parent's ModFlags:
	classes nested in an unsafe class are unsafe as well.

svn path=/trunk/mcs/; revision=6553
2002-08-08 20:26:50 +00:00
Martin Baulig eb1f7e44e4 Ooops, removed debugging stuff.
svn path=/trunk/mcs/; revision=6552
2002-08-08 20:24:52 +00:00
Martin Baulig b3729fc348 Added two more testcases to this test.
svn path=/trunk/mcs/; revision=6551
2002-08-08 20:05:37 +00:00
Martin Baulig bf80ac2e15 2002-08-08 Martin Baulig <[email protected]>
* statement.cs (UsageVector.MergeChildren): Distinguish between
	`Breaks' and `Returns' everywhere, don't set `Breaks' anymore if
	we return.  Added test17() and test18() to test-154.cs.

svn path=/trunk/mcs/; revision=6550
2002-08-08 20:03:33 +00:00
Tim Coleman 63a1712c15 2002-08-08 Tim Coleman <[email protected]>
* list: new files added to build.

svn path=/trunk/mcs/; revision=6549
2002-08-08 18:55:48 +00:00
Martin Baulig b30142248e 2002-08-08 Martin Baulig <[email protected]>
* cs1540.cs: New test.

svn path=/trunk/mcs/; revision=6545
2002-08-08 18:39:00 +00:00
Martin Baulig 71edd83a6b 2002-08-08 Martin Baulig <[email protected]>
* typemanager.cs (TypeManager.FilterWithClosure): If we have
	Family access, make sure the invoking type isn't a subclass of the
	queried type (that'd be a CS1540).

	* ecore.cs (Expression.MemberLookup): Added overloaded version of
	this method which takes an additional `Type invocation_type'.

	* expression.cs (BaseAccess.DoResolve): Use the base type as
	invocation and query type.
	(MemberAccess.DoResolve): If the lookup failed and we're about to
	report a CS0122, try a lookup with the ec.ContainerType - if this
	succeeds, we must report a CS1540.

svn path=/trunk/mcs/; revision=6544
2002-08-08 18:38:28 +00:00
Tim Coleman 7199ee1b4d 2002-08-08 Tim Coleman <[email protected]>
* ISecurityCallContext.cs:
        * ISecurityCallersColl.cs:
        * ISecurityIdentityColl.cs:
        * ISharedProperty.cs:
        * ISharedPropertyGroup.cs:
        * RegistrationHelperTx.cs:
        * ResourcePool.cs:
        * SecureMethodAttribute.cs:
        * SecurityCallContext.cs:
        * SecurityCallers.cs:
        * SecurityIdentity.cs:
        * SecurityRoleAttribute.cs:
        * ServicedComponentException.cs:
        * SharedProperty.cs:
        * SharedPropertyGroup.cs:
        * SharedPropertyGroupManager.cs:
        * SynchronizationAttribute.cs:
        * SynchronizationOption.cs:
        * TransactionAttribute.cs:
        * TransactionIsolationLevel.cs:
                New files added.
        * ContextUtil.cs:
                New internal constructor added, methods added.
        * IRemoteDispatch.cs:
                AutoComplete attributes added to methods
        * TODOAttribute.cs:
                Namespace adjusted.

svn path=/trunk/mcs/; revision=6543
2002-08-08 17:47:46 +00:00
Dick Porter d1e2aa5fdc Shut cvs up
svn path=/trunk/mcs/; revision=6541
2002-08-08 15:09:58 +00:00
Martin Baulig 8bc60e48ee 2002-08-08 Martin Baulig <[email protected]>
* ecore.cs (IMemberExpr): Added `bool IsInstance' property.
	(MethodGroupExpr): Implement the IMemberExpr interface.

	* expression (MemberAccess.ResolveMemberAccess): No need to have
	any special code for MethodGroupExprs anymore, they're now
	IMemberExprs.

svn path=/trunk/mcs/; revision=6540
2002-08-08 14:26:49 +00:00
Martin Baulig f48935593a 2002-08-08 Martin Baulig <[email protected]>
* typemanager.cs (TypeManager.FilterWithClosure): Check Assembly,
	Family, FamANDAssem and FamORAssem permissions.
	(TypeManager.IsSubclassOrNestedChildOf): New public method.

svn path=/trunk/mcs/; revision=6539
2002-08-08 14:04:28 +00:00
Martin Baulig 8e2f430fc2 2002-08-08 Martin Baulig <[email protected]>
* test-154.cs (test16): Added test for bug #28717.

svn path=/trunk/mcs/; revision=6538
2002-08-08 12:08:58 +00:00
Martin Baulig 6a93351136 2002-08-08 Martin Baulig <[email protected]>
* statement.cs (FlowBranchingType): Added LOOP_BLOCK.
	(UsageVector.MergeChildren): `break' breaks unless we're in a switch
	or loop block.

svn path=/trunk/mcs/; revision=6537
2002-08-08 11:57:12 +00:00
Gaurav Vaish cbb727d8dc 2002-08-08 Gaurav Vaish <[email protected]>
* DataGrid.cs                 - Added private method
                                CreatePagedDataSource
                              - Started work on
                                CreateControlHierarchy(bool)
* PagedDataSource.cs          - Bug fixed.
                                CurrentPageIndex is writable.

svn path=/trunk/mcs/; revision=6536
2002-08-08 11:45:30 +00:00
Paolo Molaro 9a5092bbee Thu Aug 8 13:05:44 CEST 2002 Paolo Molaro <[email protected]>
* Assembly.cs: implemented GetFile() and GetFiles().

svn path=/trunk/mcs/; revision=6535
2002-08-08 11:15:35 +00:00
Paolo Molaro 038e5f96d8 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <[email protected]>
* icall.c: added icall to implement Assembly.GetFile*.

svn path=/trunk/mono/; revision=6534
2002-08-08 11:05:28 +00:00
Dietmar Maurer d4be0148c3 2002-08-08 Dietmar Maurer <[email protected]>
* jit.c (mono_runtime_install_handlers): switch back to use
	sigaction from libpthreads. As long as this does not make problems
	we should use this instead of syscall.

svn path=/trunk/mono/; revision=6533
2002-08-08 10:46:52 +00:00
Dietmar Maurer e52326b762 added a comment about sigaction
svn path=/trunk/mono/; revision=6532
2002-08-08 09:18:59 +00:00
Paolo Molaro be4664bfd0 Thu Aug 8 10:28:07 CEST 2002 Paolo Molaro <[email protected]>
* driver.cs: implemented /resource option to embed managed resources.

svn path=/trunk/mcs/; revision=6531
2002-08-08 08:31:10 +00:00
Paolo Molaro f319403eeb Thu Aug 8 10:25:51 CEST 2002 Paolo Molaro <[email protected]>
* AssemblyBuilder.cs: added API to embed managed resources.

svn path=/trunk/mcs/; revision=6530
2002-08-08 08:26:54 +00:00
Paolo Molaro afc3976ea8 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <[email protected]>
* reflection.h, reflection.c: code to embed managed resources.

svn path=/trunk/mono/; revision=6529
2002-08-08 08:25:05 +00:00
Jason Diamond 458fefebb6 Added Kral's new test classes.
svn path=/trunk/mcs/; revision=6528
2002-08-08 07:14:50 +00:00
Kral Ferch 3c16ab8283 Added XmlDocument event firing code.
svn path=/trunk/mcs/; revision=6527
2002-08-08 06:33:43 +00:00
Dennis Hayes 9d016aac59 2002-8-7 DennisHayes <[email protected]>
Check in for  Remco de Jong <[email protected]>

* HorizontalAlignment.cs
* ProgressBar.cs
* ScrollBars.cs
* TextBox.cs
* TextBoxBase.cs
* added new files with some functinality

svn path=/trunk/mcs/; revision=6525
2002-08-08 01:53:30 +00:00
Dennis Hayes f84db0ed75 2002-8-4 DennisHayes <[email protected]>
Checked in for John Sohn <[email protected]

* build.sh
* changelog
* monostart.c
* monostub.c
* monostub.exe.dbg.c
* monostub.exe.spec.c
* Test.cs
* test.sh
* Experiment to get first form working using WINELIB

svn path=/trunk/mcs/; revision=6524
2002-08-08 01:44:56 +00:00
Martin Baulig 4c2f952e2a 2002-08-05 Martin Baulig <[email protected]>
* runtest.pl: This is a perl script which runs a testcase, parses the
	MCS output and checks whether all errors are reported.

	* error-1.cs, error-2.cs: Moved here from ../tests/.

	* README.tests: Added (empty) list of all test cases.

svn path=/trunk/mcs/; revision=6523
2002-08-07 23:06:06 +00:00
Martin Baulig 14f7406846 2002-08-08 Martin Baulig <[email protected]>
* test-161.cs: New test.

svn path=/trunk/mcs/; revision=6522
2002-08-07 23:05:42 +00:00
Martin Baulig 08f452120b 2002-08-07 Martin Baulig <[email protected]>
* class.cs (FieldBase.Initializer): Renamed to `init' and made private.
	(FieldBase.HasFieldInitializer): New public property.
	(FieldBase.GetInitializerExpression): New public method.  Resolves and
	returns the field initializer and makes sure it is only resolved once.
	(TypeContainer.EmitFieldInitializers): Call
	FieldBase.GetInitializerExpression to get the initializer, this ensures
	that it isn't resolved multiple times.

	* codegen.cs (EmitContext): Added `bool IsFieldInitialier'.  This tells
	the resolving process (SimpleName/MemberLookup) that we're currently
	emitting a field initializer (which must not access any instance members,
	this is an error CS0236).

	* ecore.cs (SimpleName.Error_ObjectRefRequired): Added EmitContext
	argument, if the `IsFieldInitializer' flag is set, we must report and
	error CS0236 and not an error CS0120.

svn path=/trunk/mcs/; revision=6521
2002-08-07 23:04:52 +00:00
Tim Coleman 195b057940 2002-08-07 Tim Coleman <[email protected]>
* list: new files added to build.

svn path=/trunk/mcs/; revision=6520
2002-08-07 21:13:04 +00:00
Tim Coleman b38a5247f3 2002-08-07 Tim Coleman <[email protected]>
* CompensatorOptions.cs:
        * LogRecordFlags.cs:
        * TransactionState.cs:
                Changed enum values to agree with .NET
        * LogRecord.cs:
                New stubs added

svn path=/trunk/mcs/; revision=6519
2002-08-07 19:51:13 +00:00
Martin Baulig 802e7403cf 2002-08-07 Martin Baulig <[email protected]>
* test-160.cs: New test for bug #28176.

svn path=/trunk/mcs/; revision=6518
2002-08-07 18:32:51 +00:00
Martin Baulig 468247ced6 Make this actually work.
svn path=/trunk/mcs/; revision=6517
2002-08-07 18:32:33 +00:00
Martin Baulig 274cd4eda7 Updated this a bit.
svn path=/trunk/mcs/; revision=6516
2002-08-07 18:25:55 +00:00
Martin Baulig 5d695895ac 2002-08-07 Martin Baulig <[email protected]>
* ecore.cs (IMemberExpr): New public interface.
	(FieldExpr, PropertyExpr, EventExpr): Implement IMemberExpr.
	(SimpleName.SimpleNameResolve): Call MemberAccess.ResolveMemberAccess
	if the expression is an IMemberExpr.

	* expression.cs (MemberAccess.ResolveMemberAccess): Allow `left'
	to be null, implicitly default to `this' if we're non-static in
	this case.  Simplified the code a lot by using the new IMemberExpr
	interface.  Also fixed bug #28176 here.

svn path=/trunk/mcs/; revision=6515
2002-08-07 18:24:00 +00:00
Tim Coleman 6cb20fa399 2002-08-07 Tim Coleman <[email protected]>
* list: new files added to build.

svn path=/trunk/mcs/; revision=6514
2002-08-07 17:34:43 +00:00
Tim Coleman f19df41f5e 2002-08-07 Tim Coleman <[email protected]>
* RegistrationErrorInfo.cs:
        * RegistrationException.cs:
        * RegistrationHelper.cs:
        * ServicedComponent.cs:
                New stubs added

svn path=/trunk/mcs/; revision=6513
2002-08-07 17:33:47 +00:00
Tim Coleman 367b81aaf4 2002-08-07 Tim Coleman <[email protected]>
* Add System.Web.Services to test and clean builds.

svn path=/trunk/mcs/; revision=6511
2002-08-07 16:41:53 +00:00
Tim Coleman 15a3e9c890 2002-08-07 Tim Coleman <[email protected]>
* System.Web.Services.build:
                Added "test" target to build.
                Added "clean" target to build.
        * Test:
                New test suites added.

svn path=/trunk/mcs/; revision=6510
2002-08-07 16:38:39 +00:00
Tim Coleman 7d92c99513 2002-08-07 Tim Coleman <[email protected]>
* WebMethodAttribute.cs:
                Remove FIXME and reorganize constructors to all
                call this () with the big constructor.
        * WebServiceAttribute.cs:
                Remove FIXME.
        * WebServiceBindingAttribute.cs:
                Remove FIXME, and change ns to be String.Empty by
                default (this is the MS implementation).  Reorganize
                constructors.
        * WebServicesDescriptionAttribute.cs:
                Code reformat.
        * TODOAttribute.cs:
                Changed namespace.

                *** This namespace should now be complete. ***

svn path=/trunk/mcs/; revision=6509
2002-08-07 16:37:52 +00:00
Tim Coleman c594f230cf 2002-08-07 Tim Coleman <[email protected]>
* AllTests.cs:
        * ChangeLog:
        * System.Web.Services:
        * System.Web.Services_test.build:
                New files and directories added for test suite.

svn path=/trunk/mcs/; revision=6508
2002-08-07 16:25:17 +00:00
Tim Coleman ca4f4a397b 2002-08-07 Tim Coleman <[email protected]>
* AllTests.cs:
        * ChangeLog:
        * WebMethodAttributeTest.cs:
        * WebServiceAttributeTest.cs:
                New files and directories added for test suite.

svn path=/trunk/mcs/; revision=6507
2002-08-07 16:24:53 +00:00
Dietmar Maurer b432805a27 (mono_analyze_stack): special case Array::Address()
svn path=/trunk/mono/; revision=6506
2002-08-07 15:57:20 +00:00
Paolo Molaro 018693ef40 Wed Aug 7 15:51:54 CEST 2002 Paolo Molaro <[email protected]>
* monoresgen.cs: added the Mono implementation of resgen.

svn path=/trunk/mcs/; revision=6505
2002-08-07 13:54:22 +00:00
Paolo Molaro b6894a1307 Moved to System.Windows.Forms.
svn path=/trunk/mcs/; revision=6504
2002-08-07 11:28:59 +00:00
Paolo Molaro 9aeafd95af Put in the correct assembly (well, correct as in the same ms uses,
because it makes no sense to have these classes here instead of
System or system.Xml).

svn path=/trunk/mcs/; revision=6503
2002-08-07 11:27:02 +00:00
Paolo Molaro ee06e135c8 Wed Aug 7 12:44:50 CEST 2002 Paolo Molaro <[email protected]>
* ResXResourceReader.cs, ResXResourceWriter.cs: added stubs.

svn path=/trunk/mcs/; revision=6502
2002-08-07 10:47:31 +00:00
Gonzalo Paniagua Javier a04c232b3e 2002-08-07 Gonzalo Paniagua Javier <[email protected]>
* DataGrid.cs: fixed typo.
	* DataGridPagerStyle.cs: added IsPagerOnTop and IsPagerOnBottom.

svn path=/trunk/mcs/; revision=6501
2002-08-07 10:40:36 +00:00
Dietmar Maurer 5d9b5d08bd removed TODO attribute
svn path=/trunk/mcs/; revision=6500
2002-08-07 09:55:52 +00:00
Gaurav Vaish c5f312e69f 2002-08-06 Gaurav Vaish <[email protected]>
* DataGridColumn.cs           - Added internal methods to get the
                            various styles (needed in DataGrid.cs)
* DataGrid.cs                 - Completed the method
                            PrepareControlHierarchy()

svn path=/trunk/mcs/; revision=6499
2002-08-07 09:31:59 +00:00
Dietmar Maurer e8f766b2d0 2002-08-07 Dietmar Maurer <[email protected]>
* jit.c: removed the createdelegate icall

svn path=/trunk/mono/; revision=6498
2002-08-07 09:27:38 +00:00
Dietmar Maurer 339c974710 2002-08-07 Dietmar Maurer <[email protected]>
* MonoType.cs: moved get_method icall to this class, we can
	remove it as soon someone provides a full featured GetMethodImpl.

	* Type.cs: use GetMethodImpl everywhere.

	* Delegate.cs: new CreateDelegate implementations.

svn path=/trunk/mcs/; revision=6497
2002-08-07 09:26:31 +00:00
Dennis Hayes 9acaf39177 2002-8-4 DennisHayes <[email protected]>
*  Started cheanglog

2002-8-4  DennisHayes <[email protected]>

* AnchorEditor.cs
* AxImporter.cs
* ComponentDocumentDesigner.cs
* ComponentEditorForm.cs
* Stubbed out

* ComponentTray.cs
* ControlDesigner.cs
* ComponentEditor.cs
* DocumentDesigner.cs
* EventsTab.cs
* FileNameEditor.cs
* IMenuEditorService.cs
* IUIService.cs
* IWindowsformsEditorService.cs
* MenusCommands.cs
* ParentControlDesigner.cs
* PropertyTab.cs
* ScrollableControlDesigner.cs
* SelectionRules.cs
* UITypeEditor.cs
* Class body defined only. No stubbs done.

* TODOAttribute.cs
* Used to mark unimplemented functions.

* System.Windows.Forms.Design.csproj
* System.Windows.Forms.Design.csproj.user
* AssemblyInfo.cs
* Needed for Visual Studio compile.

svn path=/trunk/mcs/; revision=6490
2002-08-07 02:35:00 +00:00
Dennis Hayes db46d9bb48 2002-8-6 DennisHayes <[email protected]>
* Checked in for Ginandrea Terzi ([email protected])

* MeasureItemEventArgs.cs
* PropertyValueChangedEventArgs.cs
* ScrollEventArgs.cs
* ScrollEventType.cs
* SelectionMode.cs
* Shortcut.cs
* TickStyle.cs
* ToolBarButtonClickEventArgs.cs
* TreeViewAction.cs
* TriangleDirection.cs
* UICues.cs
* UICuesEventArgs.cs
* UpDownBase.cs
* UpDownEventHandler.cs
* Fixed syntax errors and verifier errors

svn path=/trunk/mcs/; revision=6489
2002-08-07 02:28:06 +00:00
Tim Coleman caff4ab4f8 2002-08-06 Tim Coleman <[email protected]>
* ServiceDescription.cs:
                Add namespace definitions when serializing.
        * HttpBinding.cs:
                Change namespace definition (wsdl was spelt wsld)

svn path=/trunk/mcs/; revision=6488
2002-08-07 02:24:20 +00:00
Dennis Hayes d61d2446a4 2002-8-6 DennisHayes <[email protected]>
* PropertyTabChangedEventArgs.cs
* Minor sytax bug fixes.

* System.Windows.Forms.csproj
* System.Windows.Forms.csproj.user
* System.Windows.Forms.sln
* Added support for System.Windows.Forms.Design
* Builds two dlls instead of one.
* Allows compiling for now, but needs to be fixed

svn path=/trunk/mcs/; revision=6487
2002-08-07 02:23:22 +00:00
Tim Coleman 27666e78b5 2002-08-06 Tim Coleman <[email protected]>
* IRegistrationHelper.cs:
        * IRemoteDispatch.cs:
        * IServicedComponentInfo.cs:
        * ITransaction.cs:
                Comment out Guid attribute for now
                because it doesn't build with CSC unless
                you supply a valid Guid.

svn path=/trunk/mcs/; revision=6486
2002-08-07 01:15:49 +00:00
Martin Baulig 9a4aae931c 2002-08-07 Martin Baulig <[email protected]>
* test-158.cs: New test for bug #22119.

svn path=/trunk/mcs/; revision=6485
2002-08-06 22:12:19 +00:00
Martin Baulig 0c3d101ecd 2002-08-06 Martin Baulig <[email protected]>
* cs-parser.jay (SimpleLookup): Removed.  We need to create
	ParameterReferences during semantic analysis so that we can do a
	type-only search when resolving Cast, TypeOf and SizeOf.

	* class.cs (ConstructorInitializer): Added `Parameters parameters'
	argument to the constructor.
	(ConstructorInitializer.Resolve): Create a temporary implicit
	block with the parameters.

	* ecore.cs (SimpleName.SimpleNameResolve): Resolve parameter
	references here if we aren't doing a type-only search.

	* statement.cs (Block): Added constructor which takes a
	`Parameters parameters' argument.
	(Block.Parameters): New public property.

	* support.cs (InternalParameters.Parameters): Renamed `parameters'
	to `Parameters' and made it public readonly.

svn path=/trunk/mcs/; revision=6484
2002-08-06 22:07:42 +00:00
Tim Coleman 7bce180acd 2002-08-06 Tim Coleman <[email protected]>
* ServiceDescription.cs:
                Change the XmlElement name from "type" to "types" for
                the Types object

svn path=/trunk/mcs/; revision=6482
2002-08-06 21:23:42 +00:00
Tim Coleman 54ef5d26ba 2002-08-06 Tim Coleman <[email protected]>
* XmlSerializer.cs:
                Some reformatting of code for readability.
                Modify to correctly serialize ICollection objects
                such as the BindingCollection of a ServiceDescription
                for example.

svn path=/trunk/mcs/; revision=6481
2002-08-06 21:15:39 +00:00
Tim Coleman 5bfe0eb17a 2002-08-06 Tim Coleman <[email protected]>
* list: new files added to build.
        * System.EnterpriseServices.CompensatingResourceManager:
                New directory added

svn path=/trunk/mcs/; revision=6477
2002-08-06 17:46:33 +00:00
Tim Coleman 12333d1f7f 2002-08-06 Tim Coleman <[email protected]>
* ChangeLog.cs:
        * CompensatorOptions.cs:
        * LogRecordFlags.cs:
        * TransactionState.cs:
                New stubs added

svn path=/trunk/mcs/; revision=6476
2002-08-06 17:45:53 +00:00
Tim Coleman c9bf6fa840 2002-08-06 Tim Coleman <[email protected]>
* DescriptionAttribute.cs:
        * EventClassAttribute.cs:
        * EventTrackingEnabledAttribute.cs:
        * ExceptionClassAttribute.cs:
        * IISIntrinsicsAttribute.cs:
        * IRegistrationHelper.cs:
        * IRemoteDispatch.cs:
        * IServicedComponentInfo.cs:
        * ITransaction.cs:
        * InstallationFlags.cs:
        * InterfaceQueuingAttribute.cs:
        * JustInTimeActivationAttribute.cs:
        * LoadBalancingSupportedAttribute.cs:
        * MustRunInClientContextAttribute.cs:
        * ObjectPoolingAttribute.cs:
        * PrivateComponentAttribute.cs:
        * PropertyLockMode.cs:
        * PropertyReleaseMode.cs:
        * XACTTRANSINFO.cs:
                New stubs added.

svn path=/trunk/mcs/; revision=6475
2002-08-06 17:32:16 +00:00
Dietmar Maurer 9bbc6450fc (arch_jit_compile_cfg): use a mempool to store native code. This
improves locality of code.

svn path=/trunk/mono/; revision=6474
2002-08-06 17:16:38 +00:00
Tim Coleman 23febb4ea2 2002-08-06 Tim Coleman <[email protected]>
* MonoType.cs:
                Fix bug #28582.  Now checks parameters for properties
                in GetPropertyImpl.

svn path=/trunk/mcs/; revision=6473
2002-08-06 16:59:01 +00:00
Dietmar Maurer bdbe31026b (arch_jit_compile_cfg): do not waste memory
svn path=/trunk/mono/; revision=6472
2002-08-06 16:31:35 +00:00
Duncan Mak c39d86416b Add missing file to compilation list.
svn path=/trunk/mcs/; revision=6471
2002-08-06 16:25:07 +00:00
Paolo Molaro 5b2bf58553 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <[email protected]>
* class.c: move all the type size stuff into
	class_compute_field_layout().

svn path=/trunk/mono/; revision=6470
2002-08-06 16:01:18 +00:00
Dietmar Maurer fd80f4cdfc 2002-08-06 Dietmar Maurer <[email protected]>
* emit-x86.c (arch_emit_prologue): make the call to
	mono_get_lmf_addr relocatable.

svn path=/trunk/mono/; revision=6468
2002-08-06 15:59:12 +00:00
Martin Baulig 36eaf686cb 2002-08-06 Martin Baulig <[email protected]>
* ecore.cs (Expression.Warning): Made this public as well.

	* report.cs (Report.Debug): Print the contents of collections.

svn path=/trunk/mcs/; revision=6466
2002-08-06 15:41:48 +00:00
Martin Baulig a5cba8a3e3 Ooops, fix the location check in Error and Warning.
svn path=/trunk/mcs/; revision=6465
2002-08-06 15:11:40 +00:00
Martin Baulig c9bc4f563d 2002-08-06 Martin Baulig <[email protected]>
* ecore.cs (Expression.ResolveFlags): New [Flags] enum.  This is
	used to tell Resolve() which kinds of expressions it may return.
	(Expression.Resolve): Added overloaded version of this method which
	takes a `ResolveFlags flags' argument.  This can be used to tell
	Resolve() which kinds of expressions it may return.  Reports a
	CS0118 on error.
	(Expression.ResolveWithSimpleName): Removed, use Resolve() with
	ResolveFlags.SimpleName.
	(Expression.Error118): Added overloaded version of this method which
	takes a `ResolveFlags flags' argument.  It uses the flags to determine
	which kinds of expressions are allowed.

	* expression.cs (Argument.ResolveMethodGroup): New public method.
	Resolves an argument, but allows a MethodGroup to be returned.
	This is used when invoking a delegate.

	* TODO: Updated a bit.

svn path=/trunk/mcs/; revision=6464
2002-08-06 14:16:30 +00:00
Rafael Teixeira 4ca77be3da 2002-08-06 Rafael Teixeira <[email protected]>
* added "test" target to makefile
	* merged assign.cs, attribute.cs, cfold.cs, class.cs, codegen.cs, const.cs, constant.cs,
	  decl.cs, delegate.cs, ecore.cs, enum.cs, expression.cs, interface.cs, modifiers.cs, parameter.cs,
	  pending.cs, report.cs, rootcontext.cs, statement.cs, support.cs and typemanager.cs from mcs/mcs, to resync

svn path=/trunk/mcs/; revision=6463
2002-08-06 14:09:19 +00:00
Tim Coleman 5ef1e904fb 2002-08-06 Tim Coleman <[email protected]>
* ServerProtocol.cs:
                Add new class as implied by class statuc page.
                SoapServerProtocol is derived from this.
        * SoapServerProtocol.cs:
                Change base class to ServerProtocol.  Add some
                properties shown by class status page.
        * SoapClientMethod.cs:
                This class should not be sealed.  Add some
                fields shown by the class status page.

svn path=/trunk/mcs/; revision=6462
2002-08-06 13:51:12 +00:00
Gaurav Vaish b5e6a5d22e 2002-08-06 Gaurav Vaish <[email protected]>
* DataGrid.cs                 - Wokring on PrepareControlHierarchy()
                              - Added private method
      	                     PrepareControlHierarchyForItem()

svn path=/trunk/mcs/; revision=6461
2002-08-06 12:43:43 +00:00
Paolo Molaro a36d71f207 Tue Aug 6 12:40:09 CEST 2002 Paolo Molaro <[email protected]>
* main.c: use mono_image_get_entry_point ().

svn path=/trunk/mono/; revision=6460
2002-08-06 10:40:57 +00:00
Paolo Molaro 61c1751f80 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <[email protected]>
* class.c: ensure enums have always the correct instance size.
	* unicode.c: remove wrong assert.

svn path=/trunk/mono/; revision=6459
2002-08-06 09:22:07 +00:00
Gonzalo Paniagua Javier 4de507decf 2002-08-06 Gonzalo Paniagua Javier <[email protected]>
Fixed compilation with csc.

	* ecore.cs: Expression.Error made public. Is this correct? Should
	Warning be made public too?

	* expression.cs: use ea.Location instead of ea.loc.

	[FIXME:  Filed as bug #28607: MCS must report these errors.]

svn path=/trunk/mcs/; revision=6456
2002-08-06 02:47:34 +00:00
Gonzalo Paniagua Javier 1369850277 flushed
svn path=/trunk/mcs/; revision=6454
2002-08-06 01:39:32 +00:00
Gonzalo Paniagua Javier e7f4a77902 2002-08-06 Gonzalo Paniagua Javier <[email protected]>
* OleDbConnection.cs: little fixes to make it work and don't show
	a warning in Open.

	* TestOleDb.cs: added Close.

svn path=/trunk/mcs/; revision=6453
2002-08-06 01:34:59 +00:00
Martin Baulig 625ea56d71 2002-08-06 Martin Baulig <[email protected]>
* ecore.cs (Expression.loc): Moved the location here instead of
	duplicating it in all derived classes.
	(Expression.Location): New public property.
	(Expression.Error, Expression.Warning): Made them non-static and
	removed the location argument.
	(Expression.Warning): Added overloaded version which takes an
	`int level' argument.
	(Expression.Error118): Make this non-static and removed the
	expression and location arguments.
	(TypeExpr): Added location argument to the constructor.

	* expression.cs (StaticCallExpr): Added location argument to
	the constructor.
	(Indirection, PointerArithmetic): Likewise.
	(CheckedExpr, UnCheckedExpr): Likewise.
	(ArrayAccess, IndexerAccess, UserCast, ArrayPtr): Likewise.
	(StringPtr): Likewise.

svn path=/trunk/mcs/; revision=6452
2002-08-06 01:20:36 +00:00
Rodrigo Moya 4e816d153a 2002-08-05 Rodrigo Moya <[email protected]>
* System.Data.OleDb/OleDbConnection.cs (ConnectionString,
	ConnectionTimeout, ServerVersion, GdaConnection):
	corrected style.
	(OleDbConnection): call libgda.gda_init on constructor.

	* System.Data.OleDb/libgda.cs (libgda): removed static constructor,
	which wasn't been called.

	* System.Data.OleDb/TestOleDb.cs (TestOleDb): updated to really
	make some tests.

svn path=/trunk/mcs/; revision=6450
2002-08-06 00:08:13 +00:00
Rodrigo Moya 29bf951a72 *** empty log message ***
svn path=/trunk/mcs/; revision=6449
2002-08-05 23:20:35 +00:00
Rodrigo Moya 0910896799 2002-08-04 Rodrigo Moya <[email protected]>
* list: added missing System.Data.OleDb and
	System.Data.Common files.

	* System.Data.OleDb/ChangeLog: removed and merged with
	System.Data's ChangeLog.

	* System.Data.OleDb/OleDbDataAdapter.cs:
	* System.Data.OleDb/OleDbPermission.cs: compilation fixes.

        * System.Data.OleDb/TestOleDb.cs (TestOleDb): updated to really
	make some tests.

svn path=/trunk/mcs/; revision=6448
2002-08-05 23:19:38 +00:00
Rodrigo Moya 168b76ca33 Added more files
svn path=/trunk/mcs/; revision=6446
2002-08-05 22:30:46 +00:00
Rodrigo Moya b5ccf16341 2002-08-05 Rodrigo Moya <[email protected]>
* ChannelServices.cs:
	* ChannelDataStore.cs:
	* ClientChannelSinkStack.cs: new classes with some implementation.

svn path=/trunk/mcs/; revision=6445
2002-08-05 22:30:17 +00:00
Martin Baulig 3b01111157 2002-08-05 Martin Baulig <[email protected]>
* expression.cs (BaseAccess.DoResolve): Actually report errors.

svn path=/trunk/mcs/; revision=6444
2002-08-05 20:44:26 +00:00
Martin Baulig 13fb783d5b 2002-08-05 Martin Baulig <[email protected]>
* assign.cs (Assign.DoResolve): Check whether the source
	expression is a value or variable.

	* statement.cs (Try.Resolve): Set ec.InTry/InCatch/InFinally
	while resolving the corresponding blocks.

	* interface.cs (Interface.GetInterfaceTypeByName): Actually report
	an error, don't silently return null.

	* statement.cs (Block.AddVariable): Do the error reporting here
	and distinguish between CS0128 and CS0136.
	(Block.DoResolve): Report all unused labels (warning CS0164).
	(LabeledStatement): Pass the location to the constructor.
	(LabeledStatement.HasBeenReferenced): New property.
	(LabeledStatement.Resolve): Set it to true here.

	* statement.cs (Return.Emit): Return success even after reporting
	a type mismatch error (CS0126 or CS0127), this is what csc does and
	it avoids confusing the users with any consecutive errors.

svn path=/trunk/mcs/; revision=6443
2002-08-05 20:31:19 +00:00
Martin Baulig c266c087a4 Make these tests actually work, they contained other syntax errors than the
ones they were supposed to produce.

svn path=/trunk/mcs/; revision=6442
2002-08-05 20:14:00 +00:00
Martin Baulig ea109a812e Ooops, make this actually work.
svn path=/trunk/mcs/; revision=6441
2002-08-05 20:11:44 +00:00
Martin Baulig 00f5a2eba0 2002-08-05 Martin Baulig <[email protected]>
* statement.cs (Block.AddVariable): Do the error reporting here
	and distinguish between CS0128 and CS0136.
	(Block.DoResolve): Report all unused labels (warning CS0164).
	(LabeledStatement): Pass the location to the constructor.
	(LabeledStatement.HasBeenReferenced): New property.
	(LabeledStatement.Resolve): Set it to true here.

	* statement.cs (Return.Emit): Return success even after reporting
	a type mismatch error (CS0126 or CS0127), this is what csc does and
	it avoids confusing the users with any consecutive errors.

svn path=/trunk/mcs/; revision=6440
2002-08-05 19:39:35 +00:00
Paolo Molaro cdd7bc786f Mon Aug 5 21:19:41 CEST 2002 Paolo Molaro <[email protected]>
* Assembly.cs: implemented EntryPoint and a few
	resource related methods.

svn path=/trunk/mcs/; revision=6439
2002-08-05 19:21:10 +00:00
Paolo Molaro 3149727e48 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <[email protected]>
* assembly.c: fix mem corruption issue.
	* image.h, image.c: added mono_image_get_resource () to access
	managed resources.
	* icall.c: implemented Assembly.EntryPoint property and some
	Managed Resources related internalcalls.

svn path=/trunk/mono/; revision=6438
2002-08-05 17:35:25 +00:00
Martin Baulig c33530bc3b 2002-08-05 Martin Baulig <[email protected]>
* statement.cs (Return.Emit): Return success even after reporting
	a type mismatch error (CS0126 or CS0127), this is what csc does and
	it avoids confusing the users with any consecutive errors.

svn path=/trunk/mcs/; revision=6437
2002-08-05 17:34:52 +00:00
Paolo Molaro 6e78aacf25 Mon Aug 5 19:21:19 CEST 2002 Paolo Molaro <[email protected]>
* x86/tramp.c: fix random memory read in mono_create_method_pointer.

svn path=/trunk/mono/; revision=6436
2002-08-05 17:28:10 +00:00
Martin Baulig f9b6b80ab6 2002-08-05 Martin Baulig <[email protected]>
* enum.cs (Enum.LookupEnumValue): Catch circular definitions.

	* const.cs (Const.LookupConstantValue): Catch circular definitions.

	* expression.cs (MemberAccess.DoResolve): Silently return if an
	error has already been reported.

	* ecore.cs (Expression.MemberLookupFinal): Silently return if an
	error has already been reported.

svn path=/trunk/mcs/; revision=6435
2002-08-05 16:49:16 +00:00
Dietmar Maurer ef2bd985e5 new test
svn path=/trunk/mono/; revision=6434
2002-08-05 16:45:03 +00:00
Sergey Chaban 7696d1e767 x86-codegen.h: fixed bug in x86_memindex_emit, for basereg == EBP && disp == imm32;
svn path=/trunk/mono/; revision=6433
2002-08-05 16:43:06 +00:00
Paolo Molaro 81b702e529 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <[email protected]>
* image.c, image.h: impemented mono_image_get_entry_point ().
	* appdomain.c: use mono_image_get_entry_point.

svn path=/trunk/mono/; revision=6432
2002-08-05 16:19:46 +00:00
Gonzalo Paniagua Javier 6b4b5ae9a5 changed CR/LF by CR and added GlobalizationConfiguration.cs
svn path=/trunk/mcs/; revision=6431
2002-08-05 16:14:41 +00:00
Gonzalo Paniagua Javier 4120192ea8 Fixed typo
svn path=/trunk/mcs/; revision=6430
2002-08-05 15:57:34 +00:00
Gonzalo Paniagua Javier 8f0e2b6836 2002-08-05 Gonzalo Paniagua Javier <[email protected]>
* AppDomainFactory.cs: implemented.
	* ApplicationHost.cs: implemented.
	* SimpleWorkerRequest.cs: a few little fixes and reformatted. It's now
	fully implemented.

svn path=/trunk/mcs/; revision=6429
2002-08-05 15:33:59 +00:00
Martin Baulig 04c71cf0d5 2002-08-05 Martin Baulig <[email protected]>
* test-157.cs: Formerly known as ../errors/cs-20.cs

svn path=/trunk/mcs/; revision=6428
2002-08-05 15:23:30 +00:00
Patrik Torstensson abbbbc7d11 Small fix... :-)
svn path=/trunk/mcs/; revision=6427
2002-08-05 15:22:41 +00:00
Patrik Torstensson 6b4ae03b74 2002-07-24 Tim Coleman <[email protected]>
* list:
		Add System.Web/ApplicationFactory.cs
		Add System.Web/HttpAsyncResult.cs
		Add System.Web.Configuration/GlobalizationConfiguration.cs
		Add System.Web.Configuration/HandlerFactoryConfiguration.cs
		Add System.Web.Configuration/HandlerFactoryProxy.cs
		Add System.Web.Configuration/HandlerItem.cs
		Add System.Web.Configuration/ModuleItem.cs
		Add System.Web.Configuration/ModulesConfiguration.cs

svn path=/trunk/mcs/; revision=6426
2002-08-05 15:16:56 +00:00
Patrik Torstensson 62bc89081e 2002-08-05 Patrik Torstensson <[email protected]>
* HttpApplication.cs: Implemented a state machine to allow handling of HttpModules
								 and HttpHandlers. Implementation of async handlers.

	* HttpApplicationFactory.cs: Factory for creating HttpApplication instances, including caching.

	* HttpRuntime.cs: Usage of the new HttpApplicationFactory to get a application instance to
							 execute requests in and implementation of request execution (still no request queue).

	* HttpAsyncResult.cs: New file to handle async module results.

	* HttpRequest.cs: Change signature of Dispose
	* HttpResponse.cs: new internal method allowing filtering to happen during the request flow in the
					           state machine.

svn path=/trunk/mcs/; revision=6425
2002-08-05 15:15:31 +00:00
Martin Baulig 3eaa5c2d63 2002-08-05 Martin Baulig <[email protected]>
* error-1.cs, error-2.cs: Moved to ../errors.

svn path=/trunk/mcs/; revision=6424
2002-08-05 15:10:03 +00:00
Martin Baulig 1f157cb4ad 2002-08-05 Martin Baulig <[email protected]>
* runtest.pl: This is a perl script which runs a testcase, parses the
	MCS output and checks whether all errors are reported.

	* error-1.cs, error-2.cs: Moved here from ../tests/.

	* README.tests: Added (empty) list of all test cases.

svn path=/trunk/mcs/; revision=6423
2002-08-05 15:09:13 +00:00
Martin Baulig f75a384f70 2002-08-05 Martin Baulig <[email protected]>
* statement.cs (UsageVector): Only initialize the `parameters'
	vector if we actually have any "out" parameters.

svn path=/trunk/mcs/; revision=6422
2002-08-05 15:07:46 +00:00
Gonzalo Paniagua Javier 46d6dfb034 *** empty log message ***
svn path=/trunk/mcs/; revision=6421
2002-08-05 14:45:16 +00:00
Patrik Torstensson 1c2178293d head -8 ChangeLog
svn path=/trunk/mcs/; revision=6420
2002-08-05 14:34:31 +00:00
Patrik Torstensson cb4a85bc52 2002-08-05 Patrik Torstensson <[email protected]>
This is a simple test program for the new HttpRuntime execution system.

svn path=/trunk/mcs/; revision=6419
2002-08-05 14:31:22 +00:00
Paolo Molaro cf9da09578 missing.
svn path=/trunk/mono/; revision=6418
2002-08-05 13:42:32 +00:00
Martin Baulig 700a35e242 2002-08-05 Martin Baulig <[email protected]>
* expression.cs (Binary.ResolveOperator): When combining delegates,
	they must have the same type.

svn path=/trunk/mcs/; revision=6417
2002-08-05 13:40:32 +00:00
Rodrigo Moya db7b2aedae Added new files
svn path=/trunk/mcs/; revision=6416
2002-08-05 12:48:50 +00:00
Rodrigo Moya 3cd14aa403 2002-08-03 Rodrigo Moya <[email protected]>
* BinaryServerFormatterSinkProvider.cs:
	* BinaryClientFormatterSinkProvider.cs: new stubs.

svn path=/trunk/mcs/; revision=6415
2002-08-05 12:48:28 +00:00
Martin Baulig ec9fff9c16 2002-08-05 Martin Baulig <[email protected]>
* typemanager.cs (TypeManager.GetArgumentTypes): Don't call
	PropertyInfo.GetIndexParameters() on dynamic types, this doesn't
	work with the ms runtime and we also don't need it: if we're a
	PropertyBuilder and not in the `indexer_arguments' hash, then we
	are a property and not an indexer.

	* class.cs (TypeContainer.AsAccessible): Use Type.IsArray,
	Type.IsPointer and Type.IsByRef instead of Type.HasElementType
	since the latter one doesn't work with the ms runtime.

svn path=/trunk/mcs/; revision=6414
2002-08-05 12:45:56 +00:00
Martin Baulig e0c265bf13 Added documentation for the flow analysis code.
svn path=/trunk/mcs/; revision=6413
2002-08-05 12:11:47 +00:00
Dietmar Maurer 6066a833df 2002-08-05 Dietmar Maurer <[email protected]>
* threads.c: use fast spinlocks by default

svn path=/trunk/mono/; revision=6412
2002-08-05 11:25:03 +00:00
Paolo Molaro a45fb7d0dd Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <[email protected]>
* reflection.c: support the object type argument when loading
	custom attributes.

svn path=/trunk/mono/; revision=6411
2002-08-05 11:09:35 +00:00
Paolo Molaro 1c42fd434a New test.
svn path=/trunk/mono/; revision=6410
2002-08-05 11:08:07 +00:00
Gaurav Vaish 4859527992 2002-08-05 Gaurav Vaish <[email protected]>
* DataGrid.cs                 - Completed method
	                     OnBubbleEvent(object, EventArgs)

svn path=/trunk/mcs/; revision=6409
2002-08-05 10:21:36 +00:00
Dietmar Maurer b1de14e921 2002-08-05 Dietmar Maurer <[email protected]>
* x86/tramp.c (mono_create_trampoline): fixed stack_size bug

svn path=/trunk/mono/; revision=6408
2002-08-05 09:53:43 +00:00
Paolo Molaro 40ecc595bd Commit to fix compilation.
svn path=/trunk/mcs/; revision=6407
2002-08-05 08:59:42 +00:00
Dietmar Maurer 8812a5324c *** empty log message ***
svn path=/trunk/mono/; revision=6406
2002-08-05 08:45:47 +00:00
Dietmar Maurer 1ebf09aa60 2002-08-05 Dietmar Maurer <[email protected]>
* marshal.c (mono_marshal_get_managed_wrapper): add suppport for
	String as return type.

svn path=/trunk/mono/; revision=6405
2002-08-05 08:19:51 +00:00
Dave Bettin 0286ebabeb o Added atributes and some basic implementation
svn path=/trunk/mcs/; revision=6404
2002-08-05 06:10:27 +00:00
Tim Coleman bf83c44486 2002-08-03 Tim Coleman <[email protected]>
* DiscoveryDocument.cs:
                Added XmlIgnore attribute to References property
        * DiscoveryDocumentReference.cs:
                Implemented Ref/Url properties and added XmlIgnore
                attributes.

svn path=/trunk/mcs/; revision=6403
2002-08-05 05:52:55 +00:00
Tim Coleman 4b65909094 2002-08-03 Tim Coleman <[email protected]>
* SoapProtocolReflector.cs:
                Removed SoapBinding property and made the class
                not sealed to agree with class reference page.

svn path=/trunk/mcs/; revision=6402
2002-08-05 05:40:55 +00:00
Tim Coleman eef3063430 2002-08-03 Tim Coleman <[email protected]>
* list: new files added to build list.

svn path=/trunk/mcs/; revision=6401
2002-08-05 05:19:50 +00:00
Tim Coleman df076b425e 2002-08-03 Tim Coleman <[email protected]>
* AccessChecksLevelOption.cs:
        * ActivationOption.cs:
        * ApplicationAccessControlAttribute.cs:
        * ApplicationActivationAttribute.cs:
        * ApplicationIDAttribute.cs:
        * ApplicationNameAttribute.cs:
        * ApplicationQueuingAttribute.cs:
        * AuthenticationOption.cs:
        * AutoCompleteAttribute.cs:
        * BOID.cs:
        * BYOT.cs:
        * COMTIIntrinsicsAttribute.cs:
        * ComponentAccessControlAttribute.cs:
        * ConstructionEnabledAttribute.cs:
        * ContextUtil.cs:
        * ImpersonationLevelOption.cs:
        * TransactionVote.cs:
                New stubs added

svn path=/trunk/mcs/; revision=6400
2002-08-05 05:18:54 +00:00
Gonzalo Paniagua Javier 38acb564e2 2002-08-04 Gonzalo Paniagua Javier <[email protected]>
* makefile.gnu: make it use the freshly built mcs.

svn path=/trunk/mcs/; revision=6396
2002-08-04 14:58:25 +00:00
Duncan Mak dd293f9286 More fixes from new CorCompare output.
svn path=/trunk/mcs/; revision=6395
2002-08-04 08:08:02 +00:00
Jason Diamond 5183d6ce46 Return Encoding.Unicode from StringWriter.Encoding. XmlTextWriter relies on all writers having that property.
svn path=/trunk/mcs/; revision=6390
2002-08-04 01:32:03 +00:00
Nick Drochak 38a5aa982d 2002-08-04 Nick Drochak <[email protected]>
* Buffer.cs: Throw correct exception in GetByte() and SetByte().

svn path=/trunk/mcs/; revision=6389
2002-08-03 23:51:53 +00:00
Jason Diamond 1fba2759ab Fixed another bug to help get the System.XML tests running on Linux (no more assertions). Added a makefile to build the System.XML tests on Linux.
svn path=/trunk/mcs/; revision=6388
2002-08-03 22:32:10 +00:00
Tim Coleman 701e5820f5 2002-08-03 Tim Coleman <[email protected]>
* XmlSerializer.cs:
                Changed Implements() to check based on name rather
                than FullName.  FullName was never working correctly.

svn path=/trunk/mcs/; revision=6386
2002-08-03 21:09:28 +00:00
Miguel de Icaza b7b157b35f Push
svn path=/trunk/mono/; revision=6385
2002-08-03 19:29:25 +00:00
Gonzalo Paniagua Javier 413ae473a2 2002-08-03 Gonzalo Paniagua Javier <[email protected]>
* StringBuilder.cs: added IndexerName to indexer.

svn path=/trunk/mcs/; revision=6384
2002-08-03 18:25:22 +00:00
Martin Baulig 4952c2784e 2002-08-03 Martin Baulig <[email protected]>
Fixed bugs #27998 and #22735.

svn path=/trunk/mcs/; revision=6383
2002-08-03 18:09:01 +00:00
Martin Baulig d3eb53af10 Ooops, this file had duplicate methods in it.
svn path=/trunk/mcs/; revision=6382
2002-08-03 18:06:09 +00:00
Martin Baulig 0b75ca2f34 2002-08-03 Martin Baulig <[email protected]>
* class.cs (Method.IsOperator): New public field.
	(Method.CheckBase): Report CS0111 if there's already a method
	with the same parameters in the current class.  Report CS0508 when
	attempting to change the return type of an inherited method.
	(MethodData.Emit): Report CS0179 if a method doesn't have a body
	and it's not marked abstract or extern.
	(PropertyBase): New abstract base class for Property and Indexer.
	(PropertyBase.CheckBase): Moved here from Property and made it work
	for indexers.
	(PropertyBase.Emit): Moved here from Property.Emit, Indexer.Emit is
	the same so we can reuse it there.
	(Property, Indexer): Derive from PropertyBase.
	(MethodSignature.inheritable_property_signature_filter): New delegate
	to find properties and indexers.

	* decl.cs (MemberCore.CheckMethodAgainstBase): Added `string name'
	argument and improved error reporting.

	* parameter.cs (Parameters.GetEmptyReadOnlyParameters): Renamed to
	EmptyReadOnlyParameters and made it a property.

	* typemanager.cs (TypeManager.GetArgumentTypes): Added overloaded
	version of this method which takes a `PropertyInfo indexer'.
	(TypeManager.RegisterIndexer): New method.

	* class.cs: Added myself as author of this file :-)

svn path=/trunk/mcs/; revision=6381
2002-08-03 18:05:05 +00:00
Tim Coleman fc29499600 2002-08-03 Tim Coleman <[email protected]>
* ServiceDescriptionBaseCollection.cs:
                Removed some NotImplementedException()'s so that
                it runs.

svn path=/trunk/mcs/; revision=6380
2002-08-03 17:19:27 +00:00
Tim Coleman 46ba39cb3d 2002-08-03 Tim Coleman <[email protected]>
* XmlNamespaceManager.cs:
                .Net allows the empty namespace to be redefined
                at a later point, but the current implementation
                did not.  This fixes a hashtable conflict.

svn path=/trunk/mcs/; revision=6379
2002-08-03 17:17:05 +00:00
Gonzalo Paniagua Javier 8608fd450b 2002-08-03 Gonzalo Paniagua Javier <[email protected]>
* class.cs: fixed compilation on windoze.

svn path=/trunk/mcs/; revision=6378
2002-08-03 03:20:37 +00:00
Gonzalo Paniagua Javier 12c30fc7d0 2002-08-03 Gonzalo Paniagua Javier <[email protected]>
* ZoneIdentityPermission.cs: New file. Implemented.

svn path=/trunk/mcs/; revision=6377
2002-08-03 02:31:02 +00:00
Gonzalo Paniagua Javier d40bf981ff 2002-08-03 Gonzalo Paniagua Javier <[email protected]>
* IBuiltInEvidence.cs: New file.
	* Zone.cs: New file. Implemented.

svn path=/trunk/mcs/; revision=6376
2002-08-03 02:27:10 +00:00
Martin Baulig a5a71e6825 2002-08-03 Martin Baulig <[email protected]>
* TypeBuilder.cs (TypeBuilder.DeclaringType): Implemented.

svn path=/trunk/mcs/; revision=6375
2002-08-03 02:23:22 +00:00
Martin Baulig ef3498561e 2002-08-03 Martin Baulig <[email protected]>
* test-156.cs, error-2.cs: New tests.

svn path=/trunk/mcs/; revision=6374
2002-08-03 02:22:17 +00:00
Martin Baulig 438589918c Improved error handling when the accessibility checks fail.
svn path=/trunk/mcs/; revision=6373
2002-08-03 02:19:04 +00:00
Martin Baulig f28bc624e2 2002-08-03 Martin Baulig <[email protected]>
* class.cs (TypeContainer.GetClassBases): Check whether base types
	are at least as accessible than the current type.
	(TypeContainer.AsAccessible): Implemented and made non-static.
	(MemberBase.CheckParameters): Report a CS0051 if
	TypeContainer.AsAccessible returns false.

	* delegate.cs (Delegate.Delegate): The default visibility is
	internal for top-level types and private for nested types.

	* enum.cs (Enum.Enum): The default visibility is internal for
	top-level types and private for nested types.
	(Enum.DefineType): Compute the correct visibility.

	* modifiers.cs (Modifiers.TypeAttr): Added a version of this
	function which takes a `bool is_toplevel' instead of a TypeContainer.

	* typemanager.cs (TypeManager.IsBuiltinType): `void' is also a
	builtin type.

svn path=/trunk/mcs/; revision=6372
2002-08-03 01:40:29 +00:00
Martin Baulig ade5563df2 Ooops.
svn path=/trunk/mcs/; revision=6371
2002-08-03 01:39:45 +00:00
Miguel de Icaza 713a3e3504 Update man page
svn path=/trunk/mono/; revision=6369
2002-08-02 21:21:10 +00:00
Miguel de Icaza 73cb06b006 Further updates
svn path=/trunk/mono/; revision=6368
2002-08-02 20:32:48 +00:00
Miguel de Icaza cd51bc0dcb Update TODO to reflect all the new improvements
svn path=/trunk/mcs/; revision=6367
2002-08-02 20:31:03 +00:00
Dennis Hayes f41c8f9902 2002-8-2 DennisHayes <[email protected]>
* Checked in for Ginandrea Terzi ([email protected])

* AssemblyInfo.cs
* ColumnClickEventArgs.cs
* ContentsResizedEventArgs.cs
* ControlEventArgs.cs
* ConvertEventArgs.cs
* DateBoldEventArgs.cs
* DateRangeEventArgs.cs
* DragEventArgs.cs
* DrawItemEventArgs.cs
* GiveFeedbackEventArgs.cs
* HelpEventArgs.cs
* InputLanguageChangedEventArgs.cs
* InputLanguageChangingEventArgs.cs
* InvalidateEventArgs.cs
* ItemChangedEventArgs.cs
* ItemCheckEventArgs.cs
* ItemDragEventArgs.cs
* KeyEventArgs.cs
* KeyPressEventArgs.cs
* LabelEditEventArgs.cs
* LayoutEventArgs.cs
* LinkClickedEventArgs.cs
* LinkLabelLinkClickedEventArgs.cs
* logfile.txt
* MeasureItemEventArgs.cs
* MouseEventArgs.cs
* NavigateEventArgs.cs
* NodeLabelEditEventArgs.cs
* PaintEventArgs.cs
* PropertyTabChangedEventArgs.cs
* PropertyValueChangedEventArgs.cs
* QueryAccessibilityHelpEventArgs.cs
* QueryContinueDragEventArgs.cs
* ScrollEventArgs.cs
* SelectedGridItemChangedEventArgs.cs
* SplitterEventArgs.cs
* StatusBarDrawItemEventArgs.cs
* StatusBarPanelClickEventArgs.cs
* ToolBarButtonClickEventArgs.cs
* TreeViewCancelEventArgs.cs
* UICuesEventArgs.cs
* UpDownEventArgs.cs
* Improved ToString functions
* Completed the rest of the *.args classes

svn path=/trunk/mcs/; revision=6366
2002-08-02 20:04:18 +00:00
Paolo Molaro cd2202a560 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <[email protected]>
* reflection.c: fix encoding of named args for custom attrs to match
	the ms implementation. Read them back when instantiating custom
	attributes.

svn path=/trunk/mono/; revision=6365
2002-08-02 19:18:45 +00:00
Radek Doulik a895772503 separated .il and .cs tests
svn path=/trunk/mono/; revision=6364
2002-08-02 18:49:12 +00:00
Radek Doulik 1c5ba012dc more WIP
svn path=/trunk/mono/; revision=6363
2002-08-02 18:34:20 +00:00
Miguel de Icaza fade38c871 Flush web page
svn path=/trunk/mono/; revision=6362
2002-08-02 18:32:28 +00:00
Duncan Mak 04ea508bdc 2002-08-03 Duncan Mak <[email protected]>
* BinaryClientFormatterSink.cs:
	* IClientChannelSink.cs: Fixed signature for AsyncProcessResponse.

	* MethodCall.cs:
	* MethodResponse.cs: More visibility fixes. Hopefully this is the
	last of it.

svn path=/trunk/mcs/; revision=6361
2002-08-02 18:30:58 +00:00
Radek Doulik 28cb278275 more surgery
svn path=/trunk/mono/; revision=6360
2002-08-02 18:13:59 +00:00
Radek Doulik 7b58b1b3bb did quick surgery to update for Dietmar's new code
svn path=/trunk/mono/; revision=6359
2002-08-02 17:55:44 +00:00
Radek Doulik a44b234d20 2002-08-02 Radek Doulik <[email protected]>
* marshal.c (mono_mb_add_data): convert ret value to LE, suggested
	by Dietmar as quick fix
	(mono_marshal_get_delegate_begin_invoke): use sig->param_count +
	16 as stack size, used on more places as quick fix before Dietmar
	will fix it properly

svn path=/trunk/mono/; revision=6358
2002-08-02 17:55:17 +00:00
Dick Porter 8b0f7ee219 2002-08-02 Dick Porter <[email protected]>
* io.c (GetStdHandle): Add a handle reference when returning a
	duplicate console handle.  This fixes the unref_handle errors in
	NUnit.

svn path=/trunk/mono/; revision=6357
2002-08-02 16:28:09 +00:00
Paolo Molaro 9fee09ffac Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <[email protected]>
* object.h, object.c: added accessors for fields and properties.

svn path=/trunk/mono/; revision=6356
2002-08-02 15:49:32 +00:00
Paolo Molaro ee9154981d Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <[email protected]>
* class.c, class.h: made mono_class_get_field_from_name ()
	loop on parent types.
	Added mono_class_get_property_from_name ().

svn path=/trunk/mono/; revision=6355
2002-08-02 15:46:55 +00:00
Dietmar Maurer 3a33b3ba56 some docu about LDFLD/STFLD for transparent proxies
svn path=/trunk/mono/; revision=6354
2002-08-02 15:27:26 +00:00
Dietmar Maurer 1c3dd3b6df 2002-08-02 Dietmar Maurer <[email protected]>
* interp.c (get_virtual_method): support proxies
	(ves_exec_method): impl. LDFLD/STFLD for proxies.

svn path=/trunk/mono/; revision=6353
2002-08-02 14:16:21 +00:00
Paolo Molaro b765c01c73 Remove duplicate property.
svn path=/trunk/mcs/; revision=6352
2002-08-02 11:34:44 +00:00
Paolo Molaro 55d373bf50 Fri Aug 2 13:00:41 CEST 2002 Paolo Molaro <[email protected]>
* interp.c, interp.h: implemented exception trap for runtime_invoke
	and handle exceptions across managed/unmanaged boundaries.

svn path=/trunk/mono/; revision=6351
2002-08-02 11:02:35 +00:00
Paolo Molaro 0634bc55a0 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <[email protected]>
* class.c, class.h: move the code to setup the type vtable in its own
	function so that it can be reused also for types created at runtime.
	Eliminate the "class" identifier from the header file.
	* reflection.c: setup the vtable for enums so that we can create
	objects for use in SetConstant ().

svn path=/trunk/mono/; revision=6350
2002-08-02 09:44:40 +00:00
Alvaro del Castillo f32be9e2a8 Fixes to the correct links in Mono Hispano - acs
svn path=/trunk/mono/; revision=6349
2002-08-02 08:08:13 +00:00
Dietmar Maurer 2333913863 2002-08-02 Dietmar Maurer <[email protected]>
* marshal.c (mono_delegate_to_ftnptr): pass delegate->target
	instead of the delegate itself as this pointer (bug #28383)

svn path=/trunk/mono/; revision=6348
2002-08-02 07:13:54 +00:00
Nick Drochak 095999edf6 2002/08/02 Nick Drochak <[email protected]>
* ConvertTest.cs (TestGetTypeCode): Find out which test is failing on
	linux.

svn path=/trunk/mcs/; revision=6347
2002-08-02 01:54:42 +00:00
Jason Diamond fcb53f7590 Use GetByteCount instead of GetMaxByteCount (which doesn't seem to be implemented correctly for UnicodeEncoding and doesn't make sense anyways--wouldn't you want your byte array to be the correct length?) when converting chars to bytes. This was causing the System.XML tests to crash with an assertion on Linux.
svn path=/trunk/mcs/; revision=6346
2002-08-02 01:05:20 +00:00
Martin Baulig c5c6a46391 2002-08-02 Martin Baulig <[email protected]>
* expression.cs (LocalVariableReferenc): Added constructor which
	takes additional `VariableInfo vi' and `bool is_readonly' arguments.
	(LocalVariableReference.IsReadOnly): New property.
	(LocalVariableReference.DoResolveLValue): Report a CS1604 if the
	variable is readonly, use our own readonly flag to do this; you can
	use the new constructor to get a writable reference to a read-only
	variable.

	* cs-parser.jay (foreach_statement, using_statement): Get a writable
	reference to the local variable.

svn path=/trunk/mcs/; revision=6345
2002-08-02 01:02:23 +00:00
Miguel de Icaza 4cd802dd52 2002-08-01 Miguel de Icaza <[email protected]>
* rootcontext.cs (ResolveCore): Also include System.Exception

svn path=/trunk/mcs/; revision=6344
2002-08-01 23:50:10 +00:00
Miguel de Icaza 3cb83f1d3d 2002-08-01 Miguel de Icaza <[email protected]>
* statement.cs
		(Catch.DoResolve, Throw.DoResolve): Throwing the System.Exception
	is also fine.


	* expression.cs: 	use brtrue/brfalse directly and avoid compares to null.

svn path=/trunk/mcs/; revision=6343
2002-08-01 23:37:24 +00:00
Miguel de Icaza b5f7580177 2002-08-01 Miguel de Icaza <[email protected]>
* statement.cs (Block.Emit): Do not emit the dead-code warnings if
	we reach an EmptyStatement.

svn path=/trunk/mcs/; revision=6342
2002-08-01 23:01:09 +00:00
Miguel de Icaza ac452caaf9 2002-08-01 Miguel de Icaza <[email protected]>
* expression.cs (Binary.ResolveOperator): Check error result in
	two places.

svn path=/trunk/mcs/; revision=6341
2002-08-01 22:55:35 +00:00
Nick Drochak 26d07ded90 2002-08-02 Nick Drochak <[email protected]>
* BufferTest.cs (TestBlockCopy): BlockCopy uses the number of bytes,
	so hard-code some of that info into the test since sizeof() is a very
	unsafe thing to do.

svn path=/trunk/mcs/; revision=6340
2002-08-01 22:46:01 +00:00
Martin Baulig 6fffa82897 2002-08-02 Martin Baulig <[email protected]>
* cs0155.cs, cs0155-2.cs: New tests.

svn path=/trunk/mcs/; revision=6339
2002-08-01 22:32:59 +00:00
Martin Baulig 11e86809aa 2002-08-02 Martin Baulig <[email protected]>
* makefile: Moved test-66.cs to TEST_NOPASS since there's currently
	a bug in the runtime which makes this crash.

	* test-155.cs: New test.

svn path=/trunk/mcs/; revision=6338
2002-08-01 22:31:54 +00:00
Martin Baulig d2956e133a 2002-08-02 Martin Baulig <[email protected]>
* class.cs (TypeContainer.Define): Define all nested interfaces here.
	Fixes bug #28407, added test-155.cs.

svn path=/trunk/mcs/; revision=6337
2002-08-01 22:31:12 +00:00
Rodrigo Moya 8e1db7b828 2002-07-31 Rodrigo Moya <[email protected]>
* unix.args: added new files from System.Runtime.Remoting.Channels.

svn path=/trunk/mcs/; revision=6336
2002-08-01 22:18:54 +00:00
Rodrigo Moya 1a378c36c1 2002-08-01 Rodrigo Moya <[email protected]>
* BinaryClientFormatterSink.cs:
	* BaseChannelWithProperties.cs: new stubs.

svn path=/trunk/mcs/; revision=6335
2002-08-01 22:18:13 +00:00
Dennis Hayes 3679c2cccd 2002-8-1 DennisHayes <[email protected]>
* Checked in for Ginandrea Terzi ([email protected])

* KeyEventArgs.cs
* KeyPressEventArgs.cs
* LabelEditEventArgs.cs
* LayoutEventArgs.cs
* LinkClickedEventArgs.cs
* LinkLabelLinkClickedEventArgs.cs
* MeasureItemEventArgs.cs
* MouseEventArgs.cs
* NavigateEventArgs.cs
* NodeLabelEditEventArgs.cs
* PaintEventArgs.cs
* PropertyTabChangedEventArgs.cs
* PropertyValueChangedEventArgs.cs
* QueryAccessibilityHelpEventArgs.cs
* QueryContinueDragEventArgs.cs
* ScrollEventArgs.cs
* SelectedGridItemChangedEventArgs.cs
* SplitterEventArgs.cs
* StatusBarDrawItemEventArgs.cs
* StatusBarPanelClickEventArgs.cs
* ToolBarButtonClickEventArgs.cs
* TreeViewCancelEventArgs.cs
* UICuesEventArgs.cs
* UpDownEventArgs.cs
* Corrected, cleaned up/ completed some *args.cs classes.
* May break build, but should be easy to fix, will verifiy
*   tonight and check in any needed fixes.

svn path=/trunk/mcs/; revision=6334
2002-08-01 20:11:29 +00:00
Dennis Hayes 32fb04e4db 2002-8-1 DennisHayes <[email protected]>
* MonthCalendar.cs
* ButtonBase.cs
* Form.cs
* MonthCalendar commented out, stubbs need work
* GTK references removed from Buttonbase and form, to make compile easier.
* Replace GTK references as soon as build works on Windows and Linux.
* With this, SWF should compile uder visual studio

svn path=/trunk/mcs/; revision=6333
2002-08-01 20:00:10 +00:00
Martin Baulig 882d73d1ef 2002-08-01 Martin Baulig <[email protected]>
* verify-3.cs: New test.

svn path=/trunk/mcs/; revision=6332
2002-08-01 19:53:56 +00:00
Martin Baulig 3c7955a400 2002-08-01 Martin Baulig <[email protected]>
* class.cs (Event.EmitDefaultMethod): Make this work with static
	events.  Fixes #28311, added verify-3.cs.

svn path=/trunk/mcs/; revision=6331
2002-08-01 19:51:35 +00:00
Dennis Hayes c985d1e78c 2002-8-1 DennisHayes <[email protected]>
* TODOAttribute.cs
* ComVisible.cs
* added so the namespace can compile, remove when replaced with mono equivalents.

svn path=/trunk/mcs/; revision=6330
2002-08-01 19:47:08 +00:00
Dennis Hayes 414efd30f5 2002-8-1 DennisHayes <[email protected]>
* System.Windows.Forms.csproj
* System.Windows.Forms.csproj.user
* System.Windows.Forms.sln
* AssemblyInfo.cs * Not sure if this file is needed. not a part of the namespace, just visual studio
* Added files to compile using visual Studio

svn path=/trunk/mcs/; revision=6329
2002-08-01 19:43:37 +00:00
Martin Baulig f156f9d2ea 2002-08-01 Martin Baulig <[email protected]>
* statement.cs (ForeachHelperMethods): Added `enumerator_type' and
	`is_disposable' fields.
	(Foreach.GetEnumeratorFilter): Set `hm.enumerator_type' and
	`hm.is_disposable' if we're using the collection pattern.
	(Foreach.EmitCollectionForeach): Use the correct type for the
	enumerator's local variable, only emit the try/finally block if
	necessary (fixes #27713).

svn path=/trunk/mcs/; revision=6328
2002-08-01 19:35:04 +00:00
Dennis Hayes 72352ee097 2002-8-1 DennisHayes <[email protected]>
* Getopt.cs
* removed, file contained only trash, not needed.

svn path=/trunk/mcs/; revision=6327
2002-08-01 19:35:01 +00:00
Martin Baulig 164b21a807 2002-08-01 Martin Baulig <[email protected]>
* ecore.cs (Expression.report118): Renamed to Error118 and made
	it public static.

	* statement.cs (Throw.Resolve): Check whether the expression is of
	the correct type (CS0118) and whether the type derives from
	System.Exception (CS0155).
	(Catch.Resolve): New method.  Do the type lookup here and check
	whether it derives from System.Exception (CS0155).
	(Catch.CatchType, Catch.IsGeneral): New public properties.

	* typemanager.cs (TypeManager.exception_type): Added.

svn path=/trunk/mcs/; revision=6326
2002-08-01 19:07:40 +00:00
Duncan Mak 765fac406a More visibility fixes, and revert my previous patch on ContextAttribute.
svn path=/trunk/mcs/; revision=6325
2002-08-01 18:28:49 +00:00
Duncan Mak 7c32d23891 More visibility fixes.
svn path=/trunk/mcs/; revision=6324
2002-08-01 18:20:26 +00:00
Duncan Mak 91bec20178 2002-08-02 Duncan Mak <[email protected]>
* MethodCall.cs:
	* MethodCallMessageWrapper.cs:
	* MethodReturnMessageWrapper.cs: Various visibility fixes.

	* RemotingSurrogateSelector.cs: Added, replaced RemoteSurrogateSelector.

	* ActivatedClientTypeEntry.cs:
	* ActivatedServiceTypeEntry.cs:
	* WellKnownClientTypeEntry.cs:
	* WellKnownServiceTypeEntry.cs: Various visibility fixes.

svn path=/trunk/mcs/; revision=6323
2002-08-01 18:06:30 +00:00
Duncan Mak dbf56967d4 Fix compilation issues.
svn path=/trunk/mcs/; revision=6321
2002-08-01 17:28:49 +00:00
Duncan Mak 9a98ae9f60 2002-08-02 Duncan Mak <[email protected]>
* IChannel.cs:
	* IChannelReceiver.cs:
	* IChannelReceiverHook.cs:
	* IClientChannelSink.cs:
	* IClientChannelSinkStack.cs:
	* IServerChannelSink.cs:
	* IServerChannelSinkProvider.cs:
	* IServerChannelSinkStack.cs: Fixed various typos, cut-n-paste
	errors.

svn path=/trunk/mcs/; revision=6320
2002-08-01 16:51:47 +00:00
Duncan Mak 1df5bfa6af Forgot to commit this for acs last night. sorry.
2002-08-01  Duncan Mak  <[email protected]>

	* IChannel.cs:
	(Parse): Added.

svn path=/trunk/mcs/; revision=6319
2002-08-01 16:15:13 +00:00
Miguel de Icaza dc0069d613 Add new file
svn path=/trunk/mono/; revision=6318
2002-08-01 16:10:58 +00:00
Miguel de Icaza d4230a9e74 Add embedded API document
svn path=/trunk/mono/; revision=6317
2002-08-01 16:07:04 +00:00
Paolo Molaro 8a345b1116 Mono Hackers Hall Of Fame.
svn path=/trunk/mono/; revision=6316
2002-08-01 15:59:54 +00:00
Dietmar Maurer f1b1f7e4ba removed some debugging output
svn path=/trunk/mono/; revision=6315
2002-08-01 15:54:32 +00:00
Dietmar Maurer 8caa7b8d52 2002-08-01 Dietmar Maurer <[email protected]>
* jit.c (mono_analyze_stack): impl. CEE_MONO_RETOBJ

svn path=/trunk/mono/; revision=6314
2002-08-01 15:31:45 +00:00
Miguel de Icaza cbb8889e88 update index
svn path=/trunk/mono/; revision=6313
2002-08-01 15:20:30 +00:00
Dietmar Maurer 5b63c14e0b bug fix
svn path=/trunk/mono/; revision=6312
2002-08-01 14:23:23 +00:00
Dietmar Maurer d5f372534b 2002-08-01 Dietmar Maurer <[email protected]>
* x86/tramp.c (mono_create_trampoline): also push the value type pointer for
	methods returning value types.
	(mono_create_method_pointer): support valuetype returns.

	* interp.c (ves_pinvoke_method): do not call stackval_from_data if the result
	is a value type.

svn path=/trunk/mono/; revision=6311
2002-08-01 14:17:18 +00:00
Dick Porter 1d4958553c 2002-08-01 Dick Porter <[email protected]>
* threads.c: Use atomic spinlocks in TLS functions

	* mono-spinlock.h:
	* Makefile.am: Added mono-spinlock.h

svn path=/trunk/mono/; revision=6310
2002-08-01 12:15:41 +00:00
Gonzalo Paniagua Javier b70d2281fe 2002-08-01 Gonzalo Paniagua Javier <[email protected]>
* String.cs:
	(FormatSpecifier): allow white space between the comman and the width
	specifier.

svn path=/trunk/mcs/; revision=6309
2002-08-01 10:50:32 +00:00
Dietmar Maurer bb6d29529d 2002-08-01 Dietmar Maurer <[email protected]>
* interp.c (stackval_from_data): add pinvoke argument
	(stackval_to_data): add pinvoke argument. We need consider the
	fact that unmanages structures may have different sizes.

	* x86/tramp.c (mono_create_method_pointer): allocate space for
	value types.

svn path=/trunk/mono/; revision=6308
2002-08-01 06:40:11 +00:00
Piers Haken 10173bda94 2002-07-31 Piers Haken <[email protected]>
* XPathDocument.cs: simple, XmlDocument-based implementation

svn path=/trunk/mcs/; revision=6307
2002-08-01 00:40:15 +00:00
Miguel de Icaza f9f59ce84d 2002-07-31 Miguel de Icaza <[email protected]>
* driver.cs: Updated About function.

svn path=/trunk/mcs/; revision=6306
2002-07-31 23:27:45 +00:00
Rodrigo Moya 58ddb1b9ba 2002-07-31 Rodrigo Moya <[email protected]>
* unix.args: added new files from System.Runtime.Remoting.Channels.

svn path=/trunk/mcs/; revision=6305
2002-07-31 22:56:49 +00:00
Rodrigo Moya 847ee2e84e 2002-07-31 Rodrigo Moya <[email protected]>
* BaseChannelSinkWithProperties.cs:
	* BaseChannelObjectWithProperties.cs: new stubs.

svn path=/trunk/mcs/; revision=6304
2002-07-31 22:56:29 +00:00
Rodrigo Moya 5425d7f449 2002-07-31 Rodrigo Moya <[email protected]>
* unix.args: added new files from System.Runtime.Remoting.Channels.

svn path=/trunk/mcs/; revision=6303
2002-07-31 22:49:36 +00:00
Rodrigo Moya b3635f858f 2002-07-31 Rodrigo Moya <[email protected]>
* BaseChannelObjectWithProperties.cs: new stubs.

svn path=/trunk/mcs/; revision=6302
2002-07-31 22:48:18 +00:00
Martin Baulig 92c42d3786 Added myself as author of this file :-)
svn path=/trunk/mcs/; revision=6301
2002-07-31 19:34:42 +00:00
Duncan Mak bdbbb0be53 Committing fix for Juli.
2002-07-30  Juli Mallett  <[email protected]>

	* regex.cs: Fixed bug where the expression would not be
	re-evaluated for grouping purposes when factory caches were
	used, resulting in no groups being recognised after one call
	with a given pattern and no change in options.

svn path=/trunk/mcs/; revision=6299
2002-07-31 16:41:39 +00:00
Duncan Mak 01f32373b8 2002-08-01 Duncan Mak <[email protected]>
* BinaryServerFormatterSink.cs:
	* SoapServerFormatterSink.cs: Fixed typo.

	* IServerChannelSink.cs:
	(ProcessMessage): Fixed definition.

svn path=/trunk/mcs/; revision=6298
2002-07-31 16:23:42 +00:00
Duncan Mak 9480735bae More compilation fixes, sigh.
svn path=/trunk/mcs/; revision=6297
2002-07-31 16:16:33 +00:00
Martin Baulig fd287fd437 Small fix.
svn path=/trunk/mcs/; revision=6296
2002-07-31 16:12:39 +00:00
Martin Baulig 7d9e544016 Make it compile with csc.
svn path=/trunk/mcs/; revision=6295
2002-07-31 16:10:29 +00:00
Duncan Mak cf4a4ffef3 Various compilation fixes.
svn path=/trunk/mcs/; revision=6294
2002-07-31 16:06:49 +00:00
Duncan Mak ba240dad7a 2002-07-31 Duncan Mak <[email protected]>
* BinaryServerFormatterSink.cs:
	* SoapServerFormatterSink.cs: Added.

svn path=/trunk/mcs/; revision=6293
2002-07-31 15:58:34 +00:00
Martin Baulig c8f29d7894 2002-07-31 Martin Baulig <[email protected]>
* test-154.cs: New test for the flow analysis code.

	* error-1.cs: Each method in this test must produce a compiler
	error message.

	* makefile (test-unsafe-mono): New target to compile and run all
	the --unsafe tests wich MCS and the Mono runtime.

svn path=/trunk/mcs/; revision=6292
2002-07-31 15:54:56 +00:00
Martin Baulig 460a3e16d5 2002-07-31 Martin Baulig <[email protected]>
Implemented Control Flow Analysis.

	* codegen.cs (EmitContext.DoFlowAnalysis): New public variable.
	(EmitContext.CurrentBranching): Added.
	(EmitContext.StartFlowBranching): Added.
	(EmitContext.EndFlowBranching): Added.
	(EmitContext.KillFlowBranching): Added.
	(EmitContext.IsVariableAssigned): Added.
	(EmitContext.SetVariableAssigned): Added.
	(EmitContext.IsParameterAssigned): Added.
	(EmitContext.SetParameterAssigned): Added.
	(EmitContext.EmitTopBlock): Added `InternalParameters ip' argument.
	Added control flow analysis stuff here.

	* expression.cs (Unary.DoResolve): If the operator is Oper.AddressOf,
	resolve the expression as lvalue.
	(LocalVariableReference.DoResolve): Check whether the variable has
	already been assigned.
	(ParameterReference.DoResolveLValue): Override lvalue resolve to mark
	the parameter as assigned here.
	(ParameterReference.DoResolve): Check whether the parameter has already
	been assigned.
	(Argument.Resolve): If it's a `ref' or `out' argument, resolve the
	expression as lvalue.

	* statement.cs (FlowBranching): New class for the flow analysis code.
	(Goto): Resolve the label in Resolve, not in Emit; added flow analysis.
	(LabeledStatement.IsDefined): New public property.
	(LabeledStatement.AddUsageVector): New public method to tell flow
	analyis that the label may be reached via a forward jump.
	(GotoCase): Lookup and resolve the label in Resolve, not in Emit; added
	flow analysis.
	(VariableInfo.Number): New public field.  This is used by flow analysis
	to number all locals of a block.
	(Block.CountVariables): New public property.  This is the number of
	local variables in this block (including the locals from all parent
	blocks).
	(Block.EmitMeta): Number all the variables.

	* statement.cs: Added flow analysis support to all classes.

svn path=/trunk/mcs/; revision=6291
2002-07-31 15:51:25 +00:00
Paolo Molaro fca8d10a1b Wed Jul 31 17:47:11 CEST 2002 Paolo Molaro <[email protected]>
* interp.c: simplified some more branch code.

svn path=/trunk/mono/; revision=6290
2002-07-31 15:49:31 +00:00
Martin Baulig 87748c062d 2002-07-31 Martin Baulig <[email protected]>
* driver.cs: Added "--mcs-debug" argument if MCS_DEBUG is defined.
	To get debugging messages, compile mcs with /define:MCS_DEBUG and
	then use this argument.

	* report.cs (Report.Debug): Renamed to conditional to "MCS_DEBUG".

	* makefile.gnu (MCS_FLAGS): Include $(MCS_DEFINES), the user may
	use this to specify /define options.

svn path=/trunk/mcs/; revision=6289
2002-07-31 15:32:44 +00:00
Duncan Mak 5285cef890 2002-07-31 Duncan Mak <[email protected]>
* BinaryServerFormatterSink.Protocol.cs:
	* SoapServerFormatterSink.Protocol.cs: Added.

svn path=/trunk/mcs/; revision=6288
2002-07-31 15:13:50 +00:00
Paolo Molaro 3165e9439e Wed Jul 31 16:50:42 CEST 2002 Paolo Molaro <[email protected]>
* interp.c: fixed indentation, simplified some code.

svn path=/trunk/mono/; revision=6287
2002-07-31 14:53:29 +00:00
Paolo Molaro acf0ef2491 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <[email protected]>
* loader.c: don't set the pinvoke bit on icalls.

svn path=/trunk/mono/; revision=6286
2002-07-31 14:51:36 +00:00
Duncan Mak bc76f237ce 2002-07-31 Duncan Mak <[email protected]>
* IChannelReceiverHook.cs:
	* IClientFormatterSink.cs: Various compilation fixes.

svn path=/trunk/mcs/; revision=6285
2002-07-31 14:28:54 +00:00
Duncan Mak 03ae846ed8 2002-07-31 Duncan Mak <[email protected]>
* unix.args: Added interfaces and enumerations from
	System.Runtime.Remoting.Channels.

	* *.cs: Added all the interfaces in this namespace.

	* ServerProcessing.cs: Added.

svn path=/trunk/mcs/; revision=6284
2002-07-31 14:23:55 +00:00
Paolo Molaro a84ce70f07 Wed Jul 31 14:29:43 CEST 2002 Paolo Molaro <[email protected]>
* interp.c: fix so that mint can at least get to executing Main().

svn path=/trunk/mono/; revision=6283
2002-07-31 12:32:39 +00:00
Duncan Mak 3dcdffa3d3 2002-07-31 Duncan Mak <[email protected]>
* MethodCallMessageWrapper.cs:
	* MethodReturnMessageWrapper.cs: Revert the last patch and made it
	work. Thanks to Gonzalo for reminding me to chain the constructors.

svn path=/trunk/mcs/; revision=6282
2002-07-31 11:58:25 +00:00
Dietmar Maurer 0f13b99cc8 *** empty log message ***
svn path=/trunk/mono/; revision=6281
2002-07-31 11:54:37 +00:00
Dietmar Maurer 6b456c265a 2002-07-31 Dietmar Maurer <[email protected]>
* x86/tramp.c: (mono_create_method_pointer): return method->addr for pinvoke methods

	* interp.c (ves_exec_method): bug fix - directly jump to handle_exception.

svn path=/trunk/mono/; revision=6280
2002-07-31 11:53:19 +00:00
Duncan Mak 9d55c814e2 2002-07-31 Duncan Mak <[email protected]>
* StreamReader.cs:
	(Dispose): Added and implmented.

	* StreamWriter.cs:
	(Dispose): Fixed visibility.
	(Initialize): Fixed visibility, made internal.

	* BinaryReader.cs:
	(Dispose): Fixed visibility.

svn path=/trunk/mcs/; revision=6279
2002-07-31 11:11:54 +00:00
Dietmar Maurer f1e7aca3bd 2002-07-31 Dietmar Maurer <[email protected]>
* interp.c: use the new marshaling code. better delegate/remoting
	support.

	* debug-helpers.c (mono_method_full_name): only print a number to
	indicate wrapper type (so that the output is more readable in traces).

	* x86/tramp.c: remove code to handle PInvoke because this is no
	longer needed.

svn path=/trunk/mono/; revision=6278
2002-07-31 11:00:53 +00:00
Duncan Mak 842d08d4cd 2002-07-31 Duncan Mak <[email protected]>
* MethodCallMessageWrapper.cs:
	* MethodReturnMessageWrapper.cs: Remove reference to
	InternalMessageWrapper. It's probably an MS private class, even
	though it's visible in the documentation.

svn path=/trunk/mcs/; revision=6277
2002-07-31 10:54:19 +00:00
Duncan Mak 1cb4839fba 2002-07-31 Duncan Mak <[email protected]>
* unix.args: Added new classes in
	System.Runtime.Remoting.Contexts.

	* InternalMessageWrapper.cs:
	* MessageSurrogateFilter.cs:
	* MethodCall.cs:
	* MethodCallMessageWrapper.cs:
	* MethodResponse.cs:
	* MethodReturnMessageWrapper.cs:
	* RemoteSurrogateSelector.cs: Added to CVS.

	* MonoMethodMessage.cs:
	* ReturnMessage.cs: Add set in the Uri property.

svn path=/trunk/mcs/; revision=6276
2002-07-31 10:40:33 +00:00
Duncan Mak 55cf73a721 2002-07-31 Duncan Mak <[email protected]>
* unix.args: Added new classes in
	System.Runtime.Remoting.Contexts.

	* SynchronizationAttribute.cs: Added more interfaces, it
	implements them (via CorCompare), but they're not listed in the docs.

	* ContextProperty.cs:
	* CrossContextDelegate.cs: Added to CVS.

	* ContextAttribute.cs: Added missing constructor.

svn path=/trunk/mcs/; revision=6274
2002-07-31 07:51:18 +00:00
Dennis Hayes fda2c0b177 *** empty log message ***
svn path=/trunk/mcs/; revision=6272
2002-07-31 02:02:28 +00:00
Dennis Hayes 7d0dc9454e 2002-7-22 DennisHayes <[email protected]>
* AccessibleNavigation.cs
* AccessibleObject.cs
* AccessibleSelection.cs
* AmbientProperties.cs
* Application.cs
* ApplicationContext.cs
* AxHost.cs
* BaseCollection.cs
* Binding.cs
* BindingContext.cs
* BindingManagerBase.cs
* BindingMemberInfo.cs
* BindingsCollection.cs
* Button.cs
* ButtonBase.cs
* CaptionButton.cs
* CharacterCasing.cs
* CheckBox.cs
* CheckedListBox.cs
* CheckState.cs
* Clipboard.cs
* ColorDialog.cs
* ColumnClickEventArgs.cs
* ColumnClickEventHandler.cs
* ColumnHeader.cs
* ComboBox.cs
* CommonDialog.cs
* ContainerControl.cs
* ContentsResizedEventHandler.cs
* ContextMenu.cs
* Control.cs
* ControlBindingsCollection.cs
* ControlEventArgs.cs
* ControlEventHandler.cs
* ControlPaint.cs
* ConvertEventHandler.cs
* CreateParams.cs
* CurrencyManager.cs
* Cursor.cs
* CursorConverter.cs
* Cursors.cs
* DataFormats.cs
* DataGrid.cs
* DataGridBoolColumn.cs
* DataGridCell.cs
* DataGridColumnStyle.cs
* DataGridParentRowsLabelStyle.cs
* DataGridPreferredColumnWidthTypeConverter.cs
* DataGridTableStyle.cs
* DataGridTextBox.cs
* DataGridTextBoxColumn.cs
* DataObject.cs
* DateBoldEventArgs.cs
* DateRangeEventArgs.cs
* DateRangeEventHandler.cs
* DateTimePicker.cs
* DialogResult.cs
* DockStyle.cs
* DomainUpDown.cs
* DragAction.cs
* DragDropEffects.cs
* DragEventArgs.cs
* DragEventHandler.cs
* DrawItemEventArgs.cs
* DrawItemEventHandler.cs
* DrawItemState.cs
* DrawMode.cs
* ErrorBlinkStyle.cs
* ErrorIconAlignment.cs
* ErrorProvider.cs
* FeatureSupport.cs
* FileDialog.cs
* FlatStyle.cs
* FontDialog.cs
* Form.cs
* FormBorderStyle.cs
* FormStartPosition.cs
* FormWindowState.cs
* FrameStyle.cs
* GiveFeedbackEventHandler.cs
* GridColumnStylesCollection.cs
* GridItemCollection.cs
* GridTableStylesCollection.cs
* GroupBox.cs
* Help.cs
* HelpEventHandler.cs
* HelpProvider.cs
* HScrollBar.cs
* ImageIndexConverter.cs
* ImageList.cs
* ImageListStreamer.cs
* InputLanguage.cs
* InputLanguageChangedEventHandler.cs
* InputLanguageChangingEventHandler.cs
* InputLanguageCollection.cs
* InvalidateEventHandler.cs
* ItemChangedEventArgs.cs
* ItemChangedEventHandler.cs
* ItemCheckEventHandler.cs
* ItemDragEventHandler.cs
* KeyEventHandler.cs
* KeyPressEventArgs.cs
* KeyPressEventHandler.cs
* KeysConverter.cs
* Label.cs
* LabelEditEventHandler.cs
* LayoutEventHandler.cs
* LinkArea.cs
* LinkClickedEventHandler.cs
* LinkLabel.cs
* LinkLabelLinkClickedEventHandler.cs
* ListBindingConverter.cs
* ListBox.cs
* ListControl.cs
* ListView.cs
* ListViewItem.cs
* ListViewItemConverter.cs
* logfile.txt
* MainMenu.cs
* MeasureItemEventHandler.cs
* Menu.cs
* MenuItem.cs
* Message.cs
* MessageBox.cs
* MethodInvoker.cs
* MonthCalendar.cs
* MouseEventHandler.cs
* NativeWindow.cs
* NavigateEventHandler.cs
* NodeLabelEditEventHandler.cs
* NotifyIcon.cs
* NumericUpDown.cs
* OpacityConverter.cs
* OpenFileDialog.cs
* OSFeature.cs
* PageSetupDialog.cs
* PaintEventArgs.cs
* PaintEventHandler.cs
* Panel.cs
* PrintControllerWithStatusDialog.cs
* PrintDialog.cs
* PrintPreviewControl.cs
* PrintPreviewDialog.cs
* ProgressBar.cs
* PropertyGrid.cs
* PropertyManager.cs
* PropertyTabChangedEventArgs.cs
* PropertyTabChangedEventHandler.cs
* PropertyValueChangedEventHandler.cs
* QueryAccessibilityHelpEventHandler.cs
* QueryContinueDragEventHandler.cs
* RadioButton.cs
* RichTextBox.cs
* SaveFileDialog.cs
* Screen.cs
* ScrollableControl.cs
* ScrollBar.cs
* ScrollEventArgs.cs
* ScrollEventHandler.cs
* SelectedGridItemChangedEventHandler.cs
* SelectionRange.cs
* SelectionRangeConverter.cs
* SendKeys.cs
* Splitter.cs
* SplitterEventHandler.cs
* StatusBar.cs
* StatusBarDrawItemEventArgs.cs
* StatusBarDrawItemEventHandler.cs
* StatusBarPanel.cs
* StatusBarPanelClickEventArgs.cs
* StatusBarPanelClickEventHandler.cs
* StatusBarPanelCollection.cs
* SystemInformation.cs
* TabControl.cs
* TabPage.cs
* TextBox.cs
* TextBoxBase.cs
* ThreadExceptionDialog.cs
* Timer.cs
* ToolBar.cs
* ToolBarButton.cs
* ToolBarButtonClickEventHandler.cs
* ToolTip.cs
* TrackBar.cs
* TreeNode.cs
* TreeNodeCollection.cs
* TreeNodeConverter.cs
* TreeView.cs
* TreeViewCancelEventHandler.cs
* TreeViewEventHandler.cs
* TreeViewImageIndexConverter.cs
* UICuesEventArgs.cs
* UICuesEventHandler.cs
* UpDownBase.cs
* UpDownEventHandler.cs
* UserControl.cs
* VScrollBar.cs
* Fixed errors reported by verify.exe, mostly attribute errors.
* Added my name to author's list to files I edited in the last two weeks

svn path=/trunk/mcs/; revision=6271
2002-07-31 02:01:05 +00:00
Gonzalo Paniagua Javier 3d5d039e2b 2002-07-30 Gonzalo Paniagua Javier <[email protected]>
* Xml.cs: implemented document/transform load.

svn path=/trunk/mcs/; revision=6270
2002-07-31 00:08:15 +00:00
Rodrigo Moya b1b2f7650f 2002-07-30 Rodrigo Moya <[email protected]>
* OleDbDataReader.cs (FieldCount): implemented.
	(IsClosed, Item, RecordsAffected): implemented some properties.

	* libgda.cs: added GdaDataModel methods.

svn path=/trunk/mcs/; revision=6266
2002-07-30 23:21:29 +00:00
Gonzalo Paniagua Javier 17e4f87593 2002-07-30 Gonzalo Paniagua Javier <[email protected]>
* Calendar.cs: added myself to the list of authors.
	* DropDownList.cs: fixed a few properties.
	* ListControl.cs: fixed SelectedIndex.

svn path=/trunk/mcs/; revision=6265
2002-07-30 23:10:53 +00:00
Duncan Mak 6fc94963a6 2002-07-31 Duncan Mak <[email protected]>
* unix.args: Added new Exceptions, Interfaces and various
	TypeEntries from System.Runtime.Remoting.

	* TypeEntry.cs:
	* ActivatedClientTypeEntry.cs:
	* ActivatedServiceTypeEntry.cs:
	* WellKnownClientTypeEntry.cs:
	* WellKnownServiceTypeEntry.cs: Added all the classes derived from TypeEntry.

	* RemotingException.cs:
	* RemotingTimeoutException.cs:
	* ServerException.cs: Added missing exceptions.

	* IChannelInfo.cs:
	* IEnvoyInfo.cs:
	* IRemotingTypeInfo.cs: Added missing interfaces.

svn path=/trunk/mcs/; revision=6263
2002-07-30 19:05:13 +00:00
Sergey Chaban d60339354e * x86.brg: LOCALLOC fix for Windows
svn path=/trunk/mono/; revision=6262
2002-07-30 17:55:12 +00:00
Dietmar Maurer 625ea07825 2002-07-30 Dietmar Maurer <[email protected]>
* class.c (mono_class_init): include method override patch from Paolo

svn path=/trunk/mono/; revision=6261
2002-07-30 17:38:51 +00:00
Nick Drochak eef9493170 2002-07-31 Nick Drochak <[email protected]>
* BufferTest.cs: Fixed noisy compiler warnings about unused vars.

svn path=/trunk/mcs/; revision=6260
2002-07-30 17:25:29 +00:00
Paolo Molaro ea20055173 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <[email protected]>
* icall.c: fixed GetTypeCode().

svn path=/trunk/mono/; revision=6259
2002-07-30 13:22:10 +00:00
Gonzalo Paniagua Javier daa29c8628 2002-07-30 Gonzalo Paniagua Javier <[email protected]>
* System.Web.UI/Page.cs: request to render postback script can be
	after form started rendering.

	* System.Web.UI.WebControls/Calendar.cs: lots of fixes. Render days.
	Still left to persist selected days when changing month.

	* System.Web.UI.WebControls/Unit.cs: fixed Percentage and Pixel.

	* System.Web.UI.WebControls/WebControl.cs: a few properties are now
	using ControlStyle instead of ViewState to persist.

svn path=/trunk/mcs/; revision=6258
2002-07-30 09:34:59 +00:00
Dave Bettin 69feb0bc36 o Added Discovery classes to list
o Added Mono.System.Web.Services Visual Studio Project
o Added .cvsignore file

svn path=/trunk/mcs/; revision=6257
2002-07-30 04:49:53 +00:00
Dave Bettin 3b35810755 o Added stubs for Discovery namespace
svn path=/trunk/mcs/; revision=6256
2002-07-30 04:45:27 +00:00
Gonzalo Paniagua Javier 377111edf3 2002-07-29 Gonzalo Paniagua Javier <[email protected]>
* list:
	* list.unix: added EnumConverter.cs

svn path=/trunk/mcs/; revision=6255
2002-07-29 20:12:52 +00:00
Gonzalo Paniagua Javier 8a0143f98d 2002-07-29 Gonzalo Paniagua Javier <[email protected]>
* EnumConverter.cs: new file.

	* TypeConverter.cs: implemented a few simple methods.

	* TypeDescriptor.cs:
	(GetConverter): initial support for converters of well-known types.

svn path=/trunk/mcs/; revision=6254
2002-07-29 20:11:17 +00:00
Martin Baulig 8fff972898 2002-07-29 Martin Baulig <[email protected]>
* statement.cs (Fixed): Moved all code that does variable lookups
	and resolvings from Emit to Resolve.

svn path=/trunk/mcs/; revision=6253
2002-07-29 18:49:26 +00:00
Martin Baulig dbee5b2084 2002-07-29 Martin Baulig <[email protected]>
* statement.cs (For): Moved all code that does variable lookups
	and resolvings from Emit to Resolve.

svn path=/trunk/mcs/; revision=6252
2002-07-29 18:31:16 +00:00
Martin Baulig 49c28c4b9d 2002-07-29 Martin Baulig <[email protected]>
* statement.cs (Using): Moved all code that does variable lookups
	and resolvings from Emit to Resolve.

svn path=/trunk/mcs/; revision=6251
2002-07-29 18:21:14 +00:00
Martin Baulig d0ff840f18 2002-07-29 Martin Baulig <[email protected]>
* attribute.cs (Attribute.Resolve): Explicitly catch a
	System.NullReferenceException when creating the
	CustromAttributeBuilder and report a different warning message.

svn path=/trunk/mcs/; revision=6250
2002-07-29 17:53:45 +00:00
Martin Baulig 832b700015 2002-07-29 Martin Baulig <[email protected]>
* list: Removed, this isn't used anymore and people are already
	getting confused which file to use.

svn path=/trunk/mcs/; revision=6249
2002-07-29 17:28:28 +00:00
Duncan Mak 8deab983f8 2002-07-30 Duncan Mak <[email protected]>
* LeaseState.cs: Fixed namespace.

	* ITrackingHandler.cs: Added to CVS.

	* ServerFault.cs:
	* SoapFault.cs:
	* SoapMessage.cs: Added missing classes.

svn path=/trunk/mcs/; revision=6248
2002-07-29 17:26:43 +00:00
Martin Baulig 0557631ec0 Make this compile with csc.
svn path=/trunk/mcs/; revision=6247
2002-07-29 17:19:10 +00:00
Peter Williams cf61fe51ac 2002-07-29 Peter Williams <[email protected]>
* makefile.gnu: 'make install' wasn't actually working due to $@,
	fix it.

svn path=/trunk/mcs/; revision=6246
2002-07-29 16:40:15 +00:00
Martin Baulig c8ada60ec8 2002-07-29 Martin Baulig <[email protected]>
* support.cs (ParameterData.ParameterName): Added method to
	get the name of a parameter.

	* typemanager.cs (TypeManager.IsValueType): New public method.

svn path=/trunk/mcs/; revision=6245
2002-07-29 14:27:35 +00:00
Dietmar Maurer 8ee5e23537 2002-07-29 Dietmar Maurer <[email protected]>
* interp.c (main): install compile_method handler

svn path=/trunk/mono/; revision=6244
2002-07-29 14:19:37 +00:00
Martin Baulig 8e4f5881fe 2002-07-29 Martin Baulig <[email protected]>
* parameter.cs (Parameter.Modifier): Added `ISBYREF = 8'.  This
	is a flag which specifies that it's either ref or out.
	(Parameter.GetParameterInfo (DeclSpace, int, out bool)): Changed
	the out parameter to `out Parameter.Modifier mod', also set the
	Parameter.Modifier.ISBYREF flag on it if it's either ref or out.

	* support.cs (InternalParameters.ParameterModifier): Distinguish
	between Parameter.Modifier.OUT and Parameter.Modifier.REF, set the
	Parameter.Modifier.ISBYREF flag if it's either ref or out.

	* expression.cs (Argument.GetParameterModifier): Distinguish
	between Parameter.Modifier.OUT and Parameter.Modifier.REF, set the
	Parameter.Modifier.ISBYREF flag if it's either ref or out.

svn path=/trunk/mcs/; revision=6243
2002-07-29 12:58:07 +00:00
Martin Baulig ccc79b094e 2002-07-29 Martin Baulig <[email protected]>
* parameter.cs (Parameter.Modifier): Added `ISBYREF = OUT|REF'.
	(Parameter.GetParameterInfo (DeclSpace, int, out bool)): Changed
	the out parameter to `out Parameter.Modifier mod'.

svn path=/trunk/mcs/; revision=6242
2002-07-29 11:21:42 +00:00
Martin Baulig cff7fa205b *** empty log message ***
svn path=/trunk/mcs/; revision=6241
2002-07-29 11:21:27 +00:00
Martin Baulig 769a3265d6 Reverted this.
2002-07-27  Martin Baulig  <[email protected]>

	These two changes won't give us any performance or code-size
	improvements, but they make my control flow analyis much simpler.

	* statement.cs (While.Emit): Did some loop-inversion here; emit the
	test, then the body of the while and then a jump back to the test.
	(For.Emit): Did some loop-inversion here; emit the initialization,
	then the test, then the body, then the incrementation and then a jump
	back to the test.

svn path=/trunk/mcs/; revision=6240
2002-07-29 11:11:46 +00:00
Martin Baulig eb94ad4da8 2002-07-29 Martin Baulig <[email protected]>
* expression.cs (ParameterReference.ParameterReference): Added
	`Location loc' argument to the constructor.

	* cs-parser.jay: Pass location to ParameterReference.

svn path=/trunk/mcs/; revision=6239
2002-07-29 11:09:09 +00:00
Martin Baulig 4e47010b48 2002-07-29 Martin Baulig <[email protected]>
* makefile: Put back test-152.cs.

	* test-143.cs: Fixed a compilation error in this test.

svn path=/trunk/mcs/; revision=6238
2002-07-29 11:02:38 +00:00
Martin Baulig 0254c244a8 2002-07-29 Martin Baulig <[email protected]>
* makefile.gnu: Don't force people to install.  The default must also
	be `all' and not `install'.

svn path=/trunk/mcs/; revision=6237
2002-07-29 11:01:21 +00:00
Rodrigo Moya 11d169f36a 2002-07-29 Rodrigo Moya <[email protected]>
* OleDbDataReader.cs (OleDbDataReader constructor): changed to receive
	a second argument (ArrayList results).
	(NextResult): implemented.

	* OleDbCommand.cs: don't store the ArrayList of results, since we'll
	pass that to the OleDbDataReader.
	(OleDbCommand constructor): don't create the ArrayList of results.
	(GdaResults): removed property.
	(ExecuteReader): create a temporary ArrayList and pass that to the
	OleDbDataReader constructor.

svn path=/trunk/mcs/; revision=6236
2002-07-29 10:12:21 +00:00
Dietmar Maurer 0b26f57d40 2002-07-29 Dietmar Maurer <[email protected]>
* threads.c (ves_icall_System_Threading_Thread_Thread_internal):
	use real delegate invoke function to make it work with multicast
	delegates (fix bug# 28291).

svn path=/trunk/mono/; revision=6235
2002-07-29 10:06:42 +00:00
Duncan Mak 8bec3c50f3 * IContributeServerContentSink.cs: Removed.
* IContributeServerContextSink.cs: Replaces IContributeServerContentSink.

svn path=/trunk/mcs/; revision=6234
2002-07-29 03:38:28 +00:00
Miguel de Icaza ab2b985693 2002-07-28 Miguel de Icaza <[email protected]>
* statement.cs (Try): Initialize the location.

	* cs-parser.jay: pass location to Try.

	* expression.cs (Unary.Reduce): Change the prototype to return
	whether a constant fold could be performed or not.  The result is
	returned in an out parameters.  In the case of Indirection and
	AddressOf, we want to perform the full tests.

2002-07-26  Miguel de Icaza  <[email protected]>

	* statement.cs (Statement.Emit): Flag dead code.

svn path=/trunk/mcs/; revision=6233
2002-07-29 01:53:47 +00:00
Rodrigo Moya 9e3aae2189 2002-07-28 Rodrigo Moya <[email protected]>
* OleDbCommand.cs (ExecuteReader):
	(CreateParameter): implemented IDbCommand methods.
	(CommandText): don't create many GdaCommand's, only one is needed.
	(ExecuteNonQuery): set up the internal GDA command object.
	(ExecuteReader): use correctly the unique GDA command object.

	* libgda.cs: added new libgda calls.

svn path=/trunk/mcs/; revision=6232
2002-07-28 23:28:55 +00:00
Rodrigo Moya 6d68675285 Wrong changelog
svn path=/trunk/mcs/; revision=6231
2002-07-28 23:27:26 +00:00
Rodrigo Moya 709cc26e5a 2002-07-27 Rodrigo Moya <[email protected]>
* OleDbConnection.cs (CreateCommand):
	(BeginTransaction): implemented IDbConnection methods.

svn path=/trunk/mcs/; revision=6230
2002-07-28 22:55:32 +00:00
Duncan Mak 7a05b14771 2002-07-29 Duncan Mak <[email protected]>
* IContributeServerContentSink.cs: Removed.
	* IContributeServerContextSink.cs: Replaces IContributeServerContentSink.

	* ILease.cs: Add the method part of the interface and renamed the
	CurrentState property to it proper name.

	* SoapAttribute.cs: Fixed typo, renamed ReflectionInfo to ReflectInfo.

	* SoapOption.cs: Fix the namespace.

svn path=/trunk/mcs/; revision=6229
2002-07-28 20:16:23 +00:00
Gonzalo Paniagua Javier 99db2d8223 2002-07-28 Gonzalo Paniagua Javier <[email protected]>
* System.Web/HttpApplication.cs: events were not being initialized.

	* System.Web.Caching/CacheDefinitions.cs: fixed a couple of enums.

	* System.Web.Caching/CacheDependency.cs: the class is sealed.

	* System.Web.UI.WebControls/BaseValidator.cs: it works now.

	* System.Web.UI.WebControls/DataGridColumn.cs: added attribute and
	made it abstract.

	* System.Web.UI.WebControls/RequiredFieldValidator.cs: fixed return
	value in EvaluateIsValid.

svn path=/trunk/mcs/; revision=6225
2002-07-28 18:37:57 +00:00
Gonzalo Paniagua Javier 50f4a53efb 2002-07-28 Gonzalo Paniagua Javier <[email protected]>
* list:
	* list.unix: added DerivedPropertyDescriptor.cs

svn path=/trunk/mcs/; revision=6224
2002-07-28 18:37:31 +00:00
Gonzalo Paniagua Javier a57a294aa8 2002-07-28 Gonzalo Paniagua Javier <[email protected]>
* DerivedPropertyDescriptor.cs: New file.

	* PropertyDescriptorCollection.cs: almost fully implemented.

	* TypeDescriptor.cs: implemented a couple of GetProperties ().

svn path=/trunk/mcs/; revision=6223
2002-07-28 18:36:22 +00:00
Gonzalo Paniagua Javier 46efd171be 2002-07-28 Gonzalo Paniagua Javier <[email protected]>
* ColorTranslator.cs: use Color.Name.

svn path=/trunk/mcs/; revision=6222
2002-07-28 18:29:53 +00:00
Gonzalo Paniagua Javier 8830ff436a 2002-07-28 Gonzalo Paniagua Javier <[email protected]>
* File.cs:
	(Create): allow file names without path.

svn path=/trunk/mcs/; revision=6221
2002-07-28 05:19:09 +00:00
Alp Toker 3f0bdeb968 Force user to specify prefix
svn path=/trunk/mcs/; revision=6220
2002-07-28 04:24:00 +00:00
Miguel de Icaza 949cd9ebff Force user to specify prefix
svn path=/trunk/mcs/; revision=6219
2002-07-28 04:13:29 +00:00
Andrew Birkett 2c58bb85f8 2002-07-27 Andrew Birkett <[email protected]>
* expression.cs (Unary.Reduce): Handle AddressOf and Indirection.

svn path=/trunk/mcs/; revision=6218
2002-07-27 20:31:30 +00:00
Johannes Roith 717d7681b2 update download page
svn path=/trunk/mono/; revision=6217
2002-07-27 17:44:09 +00:00
Martin Baulig 5ab25f7d43 2002-07-27 Martin Baulig <[email protected]>
* class.cs (MethodData.Define): Put back call to
	TypeManager.AddMethod(), accidentally commented this out.

	* report.cs (Debug): New public method to print debugging information,
	this is `[Conditional ("DEBUG")]'.

svn path=/trunk/mcs/; revision=6216
2002-07-27 17:20:03 +00:00
Martin Baulig 4c19878420 Fixed and put back my switch patch:
2002-07-26  Martin Baulig  <[email protected]>

	* cs-parser.jay (CSharpParser): Added `Stack switch_stack'.
	(switch_statement): Push the current_block to the switch_stack and
	pop it again when we're done with the switch.
	(switch_section): The new block is a child of the current_block.
	Fixes bug #24007, added test-152.cs.

svn path=/trunk/mcs/; revision=6215
2002-07-27 17:13:23 +00:00
Martin Baulig 36bc87e690 2002-07-27 Martin Baulig <[email protected]>
These two changes won't give us any performance or code-size
	improvements, but they make my control flow analyis much simpler.

	* statement.cs (While.Emit): Did some loop-inversion here; emit the
	test, then the body of the while and then a jump back to the test.
	(For.Emit): Did some loop-inversion here; emit the initialization,
	then the test, then the body, then the incrementation and then a jump
	back to the test.

svn path=/trunk/mcs/; revision=6213
2002-07-27 14:37:07 +00:00
Martin Baulig 1720d4fdce 2002-07-27 Martin Baulig <[email protected]>
* expression.cs (Invocation.EmitArguments): When calling a varargs
	function with only its fixed arguments, we need to pass an empty
	array.

svn path=/trunk/mcs/; revision=6212
2002-07-27 13:50:38 +00:00
Martin Baulig ba723ab1b1 Added "Mono 0.13 has been released" message so we know later on what has
changed since this release.

svn path=/trunk/mcs/; revision=6211
2002-07-27 13:47:28 +00:00
Martin Baulig 7dee91aaf0 2002-07-27 Martin Baulig <[email protected]>
* test-153.cs.cs: New test.

svn path=/trunk/mcs/; revision=6210
2002-07-27 13:44:33 +00:00
Martin Baulig c5cb8b0cf2 2002-07-27 Martin Baulig <[email protected]>
* test-113.cs: Made this test actually work.

svn path=/trunk/mcs/; revision=6209
2002-07-27 13:39:06 +00:00
Dietmar Maurer eade2d863f update
svn path=/trunk/mono/; revision=6208
2002-07-27 11:12:32 +00:00
Dietmar Maurer c1f7631e75 2002-07-27 Dietmar Maurer <[email protected]>
* jit.c (mono_get_runtime_method): code cleanup

svn path=/trunk/mono/; revision=6207
2002-07-27 10:57:42 +00:00
Dietmar Maurer 0a86ce3801 2002-07-27 Dietmar Maurer <[email protected]>
* x86.brg: we do not need to save EAX/ECX/EDX in stmt:

svn path=/trunk/mono/; revision=6206
2002-07-27 10:50:52 +00:00
Duncan Mak 6a3a172fa9 Forgot about this interface
svn path=/trunk/mcs/; revision=6205
2002-07-27 03:54:47 +00:00
Miguel de Icaza 89b84291ca System.Web.Services/System.Web.Services.Description/ServiceDescription.cs
svn path=/trunk/mcs/; revision=6204
2002-07-26 22:04:55 +00:00
Miguel de Icaza 2bae10d749 0.13
svn path=/trunk/mono/; revision=6203
2002-07-26 21:47:15 +00:00
Martin Baulig 7f0542b133 Importing NUnit 1.11.
svn path=/branches/NUNIT/mcs/; revision=2713
2002-02-27 09:38:21 +00:00
nobody 9f187b5dd0 This commit was manufactured by cvs2svn to create branch 'NUNIT'.
svn path=/branches/NUNIT/mcs/; revision=2712
2002-02-27 09:38:18 +00:00
904 changed files with 65343 additions and 15972 deletions

No files matched your search

+3
View File
@@ -1,3 +1,6 @@
2002-08-12 Dick Porter <[email protected]>
* mono.pc.in: Add $includedir to Cflags
Fri Jul 19 18:38:38 CEST 2002 Paolo Molaro <[email protected]>
+1 -1
View File
@@ -2,7 +2,7 @@
AC_INIT(README)
AC_CANONICAL_SYSTEM
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(mono, 0.12)
AM_INIT_AUTOMAKE(mono, 0.13)
AM_MAINTAINER_MODE
dnl ****************************************
-5
View File
@@ -2,11 +2,6 @@
** Summary
<em>
[This documentation is in progress. Comments to
<a href="mailto:[email protected]">[email protected]</a>.]
</em>
While using inline XML tags to document classes is certainly
convenient, properly verbose documentation quickly overwhelms
the code, making the source quite difficult to read. Furthermore,
+5 -5
View File
@@ -30,18 +30,18 @@
be browsed <a href="http://cvs.hispalinux.es/cgi-bin/cvsweb/?cvsroot=Mono#dirlist">here</a>
<a name="jun-7">
<b>Mono 0.12</b>
<b>Mono 0.13</b>
New packaged versions of the Mono C# compiler and Mono runtime
are now available. The latest version is 0.12.
are now available. The latest version is 0.13.
<ul>
* <a href="archive/mono-0.12">Mono 0.12 release notes</a>
* <a href="archive/mono-0.13">Mono 0.13 release notes</a>
* <a href="archive/mcs-0.12.tar.gz">mcs-0.12.tar.gz</a>
* <a href="archive/mcs-0.13.tar.gz">mcs-0.13.tar.gz</a>
Mono C# compiler with class library source code.
* <a href="archive/mono-0.12.tar.gz">mono-0.12.tar.gz</a>
* <a href="archive/mono-0.13.tar.gz">mono-0.13.tar.gz</a>
Mono runtime.
</ul>
+193 -3
View File
@@ -7,6 +7,7 @@
<a href="#pnpproject">Mono and the Portable.NET Project</a><br>
<a href="#webservices">Web Services</a><br>
<a href="#asp">Mono and ASP.NET</a><br>
<a href="#ado">Mono and ADO.NET</a><br>
<a href="#devel">Development Tools and Issues</a><br>
<a href="#java">Mono and Java</a><br>
<a href="#extending">Extending Mono</a><br>
@@ -66,7 +67,7 @@ A: Mono contains a number of components useful for building new
Windows has compilers that target the virtual machine from <a
href="http://msdn.microsoft.com/net/thirdparty/default.asp#lang">a
number of languages:</a> Managed C++, Java Script, Eiffel,
Component Pascal, APL, Cobol, Oberon, Perl, Python, Scheme,
Component Pascal, APL, Cobol, Perl, Python, Scheme,
Smalltalk, Standard ML, Haskell, Mercury and Oberon.
The CLR and the Common Type System (CTS) enables applications and
@@ -119,13 +120,13 @@ A: Different parts of Mono will achieve usability at different stages,
which contains everything needed to develop applications with the base
class libraries. This should be available at some point during 2002.
Other higher level class libraries (ASP.NET, ADO.NET, Windows.Forms) will
Other higher level class libraries (ASP.NET, ADO.NET) will
be released when they become stable.
Q: What major components will you include in Mono?
A: Hopefully everything that Microsoft ships on their Framework
(ADO.NET, ASP.NET, Windows.Forms), and
(ADO.NET, ASP.NET), and
we encourage third party developers to create reusable components that
work on both Mono and Windows.
@@ -242,6 +243,15 @@ Q: But will I be able to build GNOME applications?
A: Yes, we will enable people to write GNOME applications using Mono.
Q: Do you have C# bindings for GNOME?.
A: Yes, we currently bind libgnome, libgnomecanvas, and libgnomeui --
although I dare say I have no idea how functional the bindings are
outside of what I tested in the sample app. I imagine other libraries
under the GNOME framework will be added on an as-needed (and as-requested)
basis...although a truly good bonobo binding will have to wait on the CORBA
remoting support which has been started recently.
<a name="gui"></a>
** GUI applications
@@ -278,6 +288,17 @@ A: Try: mcs --unsafe -o HelloWorld.exe -r glib-sharp -r pango-sharp -r
atk-sharp -r gdk-sharp -r gtk-sharp -r gdk-imaging-sharp
HelloWorld.cs
Q: Is there any way how to connect DataAdapter to some GTK# controls?
A: There is a sample file called `DbClient' in gtk-sharp/samples that you
might to look at. It is a sample program in Gtk# that adds/updates/deletes
information on a Postgress database. When we have the new table/tree widgets,
I am sure someone would write an adapter for System.Data (in Gtk2 the
tree/list widgets are written using a view/model, so you only need to write
a model that maps to the database). You can have a look at
gtk-sharp/sample/DbClient, where there is a GTK# application that uses
System.Data. It does not use DataAdapter, but DataReader though.
<a name="winforms"></a>
** Mono and WinForms
@@ -417,6 +438,25 @@ A: No, it will not. Microsoft Office is a Windows application. To
learn more about running Windows applications on Intel Unix systems
refer to <a href="http://www.winehq.com">the Wine Project</a>.
Q: Will I be able to compile a Microsoft VB.NET application and execute
the resultant MSIL file under MONO on Linux without converting to C#
and recompiling?
A: Once we have a complete VisualBasic runtime, yes.
Q: Can mono run the WebMatrix ?
A: No. That requires winforms (we don't have).
Q: Does mono have something like Passport ? (ie PassportIdentity class,somewhere
in System.Web ?) . Will mono have a server side Passport/Similar framework
for XSP as well as client classes ?
A: Not yet, but the client side API for authentication is not the problem.
We will likely have a lot of other authentication APIs, like the Liberty
Aliance APIs. The problem is people on the web provider end that might use
this for authentication.
<a name="pnpproject"></a>
** Mono and Portable.NET
@@ -598,6 +638,81 @@ Q: Is there any way I can install a known working copy of mono in /usr,
A: Yes. Just use two installation prefixes.
Q: How should I write tests or a tests suite?
A: If you do a test suite for C#, you might want to keep it
independent of the Mono C# compiler, so that other compiler
implementations can later use it.
Q: Is the current stage the implementation of mono_create_trampoline
function? Hence the sparc-codegen.h is reasonably complete? Is
mono/arch/x86/* the best reference material for this stuff?
A: sparc-codegen.h is basically complete. We may want to add some
convenience macros along the way, but it has all the stuff you need.
And yes, or, the ppc/ dir, since the ppc call convention is more similar
to the sparc one than the x86 one. The current issues with the sparc
code are. roughly:
1) it needs to handle overflowing the out registers (the additional
arguments need to be put on the stack)
2) it needs to flush the icache where the generated code is stored
3) it needs to implement mono_create_method_pointer to get delegates
working
4) it needs a couple of updates (mono_method_pointer_get is no longer
needed, for example)
Q: Would it be too terrible to have another corlib signed as mscorlib?
A: We rename corlib to mscorlib also when saving the PE files, in fact,
the runtime can execute program created by mono just fine.
Q: How do I build corlib under Linux?
A: You can build your own (see the web site on how to get the mcs
project from cvs), but in order to build them using mcs you need a
set of working class libraries. After building the runtime (using
mono-build.sh) get them from the nightly build and put them (and
mcs.exe) in your mono/install/lib directory. Then you should be able
to do: cd mcs, then: make -f makefile.gnu, then: cp mcs/mcs.exe
class/lib/*.dll ../install/lib Also, you should know that you can
either get your dose of DLLs from MonoCharge, or from
http://primates.ximian.com/~miguel/runtime. MonoCharge is updated
automatically, while the later is only updated when Miguel is around
Once you have the DLLs, you can use `make -f makefile.gnu' as described
before to self-host.
Q: Is there a relatively straightforward way to repeat the steps taken
by Paolo to get Mono completely self-hosted on linux?
A: To build the compiler and class libraries in Linux, run:
<ul><li>make -f makefile.gnu. To install them, run: </li>
<li>make -f makefile.gnu install</li>
<li>You can also specify a prefix:</li>
<li>make -f makefile.gnu install prefix=/opt</li>
</ul>
If you want to produce and distribute a monocharge tarball, run:
make -f makefile.gnu dist
Of course you have to run these in the top level mcs directory.
Q: Is it possible to build a C# file to some sort of intermediate format which
can linked into a final module, like the traditional .c -> .o -> .so path?
A: You could do: mcs /target:module file1.cs, mcs /target:module file2.cs,
mcs /target:exe file1.dll file2.dll /out:mybin.exe
Q: Is there any plans for implementing remoting in the near future?, When will
work in System.Runtime.Remoting.dll start?
A: The remoting infrastructure is in place. Some of the channels and
formatters are not.
Q: I'm wondering if there are any plans to start using nant to build the
class lib + test lib. i think that every project neeed/should use an
automated build process and nant + a couple of tools enables this. is
the problem that the compiler can't run nant yet?
A: Maybe well be doing some sort of automated build process + testing when
the summer finish.
<a name="asp">
** Mono and ASP.NET
@@ -612,6 +727,41 @@ A: Yes. The development of the support for ASP.NET comes in various stages,
our sample code with our classes with our runtime. This is the process
we are following. Currently Gonzalo has reached point 5.
Q: Do I need install cygwin to work on ASP.NET in mono or Linux is enough since
it is self host right now.
A: Linux is enough.
Q: Any plan to make ASP.NET in mono works with Apache in linux?.
A: Yes, we have plans to do so, but we need to wait for Patrik's patches to
HttpRuntime. Once that is there, writing a mod_mono should be trivial
(look at mono/samples/embed for a sample embedded application).
<a name="ado">
** Mono and ADO.NET
Q: What is the status of ADO.NET support?. Could I start migrating
applications from MS.NET to Mono?.
A: You could start right now using the ADO.NET support in mono, of course,
if you want to help filling the missing gaps while you develop your app
:-) Well, what I mean is that we're not that far to having full ADO.NET
support in Mono, and we've got a lot of working things, so if we could
get more help, we'd finish it really soon :-)
Q: In developing the data architecture for the application are there and
objects I should stay away from in order to insure the smoothest possible
transition (minimum code rewrite) to Mono's ADO.NET implementation? (For
example, strongly typed datasets versus untyped datasets, etc...)
A: we are implementing all the classes in Microsoft .NET's System.Data, so
you can be sure that things will work the same in Mono as with the MS's
implementation. We'll maybe provide extra classes to fix some things
we've found missing while developing ADO.NET in Mono, but if you keep
using the MS's System.Data classes, things will work out of the box with
no changes (or at least that's the plan :-)
<a name="java">
** Mono and Java
@@ -675,6 +825,12 @@ A: No. It is quite far from the philosophy of the project. The idea of Mono
all prefer Suns original. But for Unix there don't exist a .NET-Framework.
So it is possible, that in the future Mono is the standard .NET for unixes.
Q: Do you plan to implement a Javascript compiler?
A: Yes. Eto Demerzal has started a Rhino port to C#.
After this is completed, we will begin developing
the Javascript compiler.
<a name="extending"></a>
** Extending Mono
@@ -774,6 +930,17 @@ Q: If I were about to start a Mono port to IA-64,would the same lburg code
A: The lburg approach can be use for any processor architecture. But you might
think in another better approach.
Q: Do you plan to port Rhino to C#?.
A: Eto Demerzal has started a Rhino port to C#.
Q: Has anyone succeeded in building a Mac version of the C# environment.
If so can you explain how?
A: You could try to check with the Darwin people, or the Fink people.
Mono/C# is self hosting on Linux/PPC which is the hard part, so it
should be relatively simple to get it to work on macos
<a name="reuse"></a>
** Reusing Existing Code
@@ -989,3 +1156,26 @@ Q: Does mcs support the same command line options as the MS C#
A: The Mono C# compiler on CVS now supports the same command line
arguments as the Microsoft C# compiler does.
Q: I am thinking about making a VS.NET solution and include as
projects both the library and the System.Xml.dll project
file: is that the best way (sure at the beginning, when the
compiler was not self hosting, you made something similar...)?
A: Jason and Krall did check in VS.NET files that you can use
to compile our System.XML and even to run the System.XML tests
(which is way cool, and way simple).
Q: How about getting searchable archives on lists.ximian.com?
A: You mean like http://www.go-mono.com/mailing-lists.html?
Q: I downloaded the lastest snapshot and did a make and make install on
mono which ran normal but when I tried to do the same with mcs it
errored out with a message saying Mono and Runtime out of sync.
A: You need to compile first the class libraries and install them with your
existing compiler and then the runtime.
+23
View File
@@ -0,0 +1,23 @@
* Mono Hackers Hall Of Fame
Without the help, the skills and the time of many passionate developers outside of
the Ximian Mono team, Mono would not be where it is today.
Many of them do it for fun, some do it because they really want a nice CLR they
can hack on, some do it because they need a working solution to some development
issues and mono is the ideal tool for the job.
Some of them may start contributing because they want a mention in the
<b>Mono Hackers Hall Of Fame</b>! Whatever the cause, join us in a big<br>
<h1 align="center">Thank you!</h1>
* Mono Hackers
** Nick Drochak
The first, deserved, entry in the <b>Mono Hackers Hall Of Fame</b> is for
Nick Drochak, who joined us in the first days of Mono and built the testing
infrastructure for the C# assemblies, fixed tons of bugs and even adventured
himself in the lands of the C runtime. His work is invaluable for keeping
Mono on the right track through the daily changes in the codebase.
+186 -45
View File
@@ -80,12 +80,135 @@
</tr>
</table>
<b>Mono at the O'Reilly Open Source Conference (<a
href="http://conferences.oreillynet.com/cs/os2002/view/e_sess/2994">here</a>
and <a
href="http://conferences.oreillynet.com/cs/os2002/view/e_sess/2996">here</a>)</b>
<b>Mono Talks:</b>
@item Jul 23rd, 2002
<b>Valencia</b>: August 8th.
<b>Hong Kong:</b> August 10th. If you live in Hong
Kong, come see Duncan Mak talk about the Mono project.
Details are <a
href="http://linux.org.hk/org/event/200208-talk/">here</a>
<b>San Francisco</b>: August 14th. Linux World Expo.
@item Aug 13th, 2002: MCS news, Gtk# progress, Windows.Forms, ADO.NET
Martin Baulig has been fixing all the known bugs in the C#
compiler and now has moved into improving the compilation
speed and the generated code quality of MCS. Today we got a
50% speedup in the bootstrap of MCS going from 24 seconds to 12 seconds.
Gtk# has been making a lot of progress, some interesting
corner cases are now supported:, you can now create canvas items as
well as using the tree widget. Here is a shot of <a
href="images/mocil.png">MonoCIL</a>.
On the runtime front, focus has been on improving remoting
support, exception handling, as well as completing the support
for structure marshaling.
Patrik is also back in action: the HttpRuntime infrastructure
is rapidly improving, and Gonzalo is working into moving XSP
into our main class library and providing the missing pieces
to integrate with Patrik's code.
Dennis and his team are working on a WineLib-based
implementation of Windows Forms to guarantee that the corner
cases of Windows.Forms can be handled, and we are back on track again.
A lot more work on the ADO.NET and WebServices has also been
checked into CVS.
@item Aug 1st, 2002: Mono Hackers Hall of Fame
The <a href="hackers.html">Mono Hackers Hall Of Fame</a> has been started
to show our appreciation to the excellent contributors that made <b>mono::</b>
a successful free software project.
The first, deserved, entry goes to
Nick Drochak, who joined us in the first days of Mono and built the testing
infrastructure for the C# assemblies, fixed tons of bugs and even adventured
himself in the lands of the C runtime. His work is invaluable for keeping
Mono on the right track through the daily changes in the codebase.
@item Looking for volunteers
We are looking for volunteers to help complete various pieces
of Mono and help move the project forward, we need
contributions to:
<ul>
* More tests to the existing class libraries.
* Finish existing class libraries, check our <a
href="class-status.html">class status</a> pages to see
all the missing things. There are open tasks all over
the place: XML, Database access, enterprise services,
configuration, ASP.NET, Drawing APIs, and more.
* Since we have now ASP.NET running, we would like to
create an ASP.NET application to maintain our class
library documentation.
We have some special needs (read them <a
href="classlib-doc.html">here</a>). There is a
prototype written using Windows.Forms, but we believe
it will be faster to have this done using ASP.NET (and
it is also a nice way of stress testing it).
* Support for the VB runtime: we need contributions
to make our VB runtime mature enough to host
applications compiled with the VB.NET to run with
Mono.
* We need people to help write the documentation: you
can start editing our XML files by hand, and once we
have the ASP.NET tool, upgrade to that.
</ul>
@item July 31st, 2002: Flow Analysis
Martin has checked into CVS the data flow analysis patch for
MCS, this means that we now correctly implement definite
assignment in the C# language.
@item Jul 31st, 2002: Most ASP.NET controls render, Gtk# structs.
Gonzalo <a
href="http://lists.ximian.com/archives/public/mono-list/2002-August/001234.html">posted
an update</a> on the ASP.NET widgets that are still pending. Patrik is back, and he is
working with Gonzalo to streamline the pipeline
Rachel quietly commited to Gtk-Sharp support for marshaling
structures (very important for Gtk#). This uses extensively
the new marshaling code that Dietmar added to the runtime.
Dietmar is also now sharing more code for P/Invoke using his
intermediate representation. Another step to share more code, and
simplify the porting and maintenance process.
@item Jul 27th, 2002: NGEN tool for Mono.
Zoltan <a
href="http://lists.ximian.com/archives/public/mono-list/2002-July/001117.html">announced</a>
the availability of his CIL to C compiler. This allows your Mono assemblies to be pre-compiled
and optimized by GCC in your platform, increasing the speed significantly of your code.
@item Jul 26th, 2002: Mono 0.13 has been released.
<b>Mono 0.13 has been released!</b> (details <a
href="archive/mono-0.13">here</a>). Get
your sources for the <a
href="archive/mono-0.13.tar.gz">runtime</a> and
<a href="archive/mcs-0.13.tar.gz">compiler and class libraries</a>.
<p>
Alp made Debian packages and they are <a
href="http://www.atoker.com/mono/">here</a>. Cristophe made
packages for Red Hat and they are <a
href="http://mono.baselabs.org/software">here</a>.
And Windows packages have been <a href="http://www.superin.formativ.net/mono/mono.htm">contributed</a>
@item Jul 23rd, 2002: Mono Verifier, System.Web.Services, ASP.NET samples.
Mono now has a verifier. It is used by the runtime, or you can invoke it manually to
verify an image by using the `pedump' tool.
@@ -97,15 +220,15 @@
Various samples for ASP.NET have landed in CVS.
@item Jul 20th, 2002
@item Jul 20th, 2002: Spanish Mono Tutorial.
A spanish tutorial on using Mono is <a
href="http://www.es.gnome.org/documentacion/articulos/mono-linux/mono-linux/t1.html">here</a>.
href="http://mono.es.gnome.org/tutoriales/mono-linux/">here</a>.
Also the <a
href="http://www.es.gnome.org/documentacion/articulos/MONO-PUF/MONO-PUF/">FAQ</a>
href="http://mono.es.gnome.org/tutoriales/mono-puf/">FAQ</a>
has been translated as well.
@item Jul 19th, 2002
@item Jul 19th, 2002: File handle redirection, Embeddable Mono and Mono Linux compilation.
Dick's code for file handle redirection is complete and has
now landed on the CVS repository.
@@ -192,41 +315,6 @@
port the JITer to new architectures, and that our trampoline
code is cross platform.
@item Looking for volunteers
We are looking for volunteers to help complete various pieces
of Mono and help move the project forward, we need
contributions to:
<ul>
* More tests to the existing class libraries.
* Finish existing class libraries, check our <a
href="class-status.html">class status</a> pages to see
all the missing things. There are open tasks all over
the place: XML, Database access, enterprise services,
configuration, ASP.NET, Drawing APIs, and more.
* Since we have now ASP.NET running, we would like to
create an ASP.NET application to maintain our class
library documentation.
We have some special needs (read them <a
href="classlib-doc.html">here</a>). There is a
prototype written using Windows.Forms, but we believe
it will be faster to have this done using ASP.NET (and
it is also a nice way of stress testing it).
* Support for the VB runtime: we need contributions
to make our VB runtime mature enough to host
applications compiled with the VB.NET to run with
Mono.
* We need people to help write the documentation: you
can start editing our XML files by hand, and once we
have the ASP.NET tool, upgrade to that.
</ul>
@item Jul 9th, 2002
Ajay was the first to notice <a
@@ -355,10 +443,63 @@
A big thanks goes to Dennis Hayes for getting the
Windows.Forms work together, and commiting so many stubs for Windows.Forms.
@item Jun 25, 2002
I am updating the Mono site from the Unesco offices in
Uruguay, the <a href="http://www.gnome.org/resources/calendar/roadshow/GNOMEenelSur.html">South-America trip</a>
to promote free software is going very well.
Many news in Mono-land this week so far:
Mike Kestner got bindings for GtkHTML last night for Gtk#,
this is using GtkHTML 2.0.
On Monday Piers Haken <a
href="http://lists.ximian.com/archives/public/mono-list/2002-June/000380.html">contributed</a>
the core to support XPath in Mono: most of the w3c spec is
implemented (modulo a few pending bits).
Dick checked in his implementation of the Process classes:
process forking and waiting support committed, with some functions to
query status. This was complex as we had to emulate the Win32
environment, but this is another step to be fully compatible.
This means for example that any process can check on the
status of any other process (without the parent/child relationship)
Of course, those interested
in only the Unix semantics can always P/Invoke the Unix calls.
@item Jun 24, 2002
Duncan has written a few sample <a
href="http://primates.ximian.com/~duncan/Mono">gtk# demo apps</a>..
href="http://primates.ximian.com/~duncan/Mono">Gtk# demo
applications</a> (<a
href="http://primates.ximian.com/~duncan/Mono/img/ImageViewer.png">screen
shot</a>, <a
href="http://primates.ximian.com/~duncan/Mono/img/ImageBrowser.png">another</a>)
Rachel also got the beginning of Gnome bindings (<a
href="http://primates.ximian.com/~tvgm/gnome-hello.png">screenshot</a>).
She also got some <a
href="http://primates.ximian.com/~tvgm/gtk-sharp-docs/">documentation</a>
up now.
@item Jun 22, 2002
Mono's ASP.NET has rendered its first page on Linxu for the
first time (Gonzalo and Paolo).
Also, we are getting close to
self hosting. Paolo posted a <a
href="http://lists.ximian.com/archives/public/mono-list/2002-June/000345.html">list
of pending issues</a> which are now very small.
Steam is picking up in <a
href="http://gtk-sharp.sf.net">Gtk#</a> as the bindings become more
complete and small applications are starting to emerge. Gtk#
now compiles completely on Linux. This uses a lot of the XML
libraries, which is nice to see.
@item Jun 20, 2002
+1 -1
View File
@@ -63,7 +63,7 @@
** Delta Forth
The Delta Forth.NET project: <a
href="http://www.codeproject.com/dotnet/dforthnet.asp">Home
href="www.dataman.ro/dforth">Home
Page</a> and <a href="http://www.dataman.ro/dforth/index.html">more
details here</a>.
+1 -1
View File
@@ -2,7 +2,7 @@
Most of the mailing lists are in english, but there is also
Mono Hispano that has lists in Spanish. <a
href="http://www.es.gnome.org/mailman/listinfo/mono-hispano">Mono Hispano list</a>
href="http://mono.es.gnome.org/mailman/listinfo/mono-hispano">Mono Hispano list</a>
There are a number of mailing lists for Mono in English:
+33 -6
View File
@@ -1,9 +1,36 @@
* Mono for beginners
Hinne Hettema has provided us a beautiful and complete
document on how to obtain, install and test Mono on
a Linux system.
Hinne Hettema and Jaime Anguiano Olarra are providing us with
nice and complete set of documents (HOWTOs) about how to install,
configure, run and test the software developed by the Mono Project.
You can read them online, get PDF versions or get the XML sources.
HTML Format (read it online)
For <a href="mono-beginning/t1.html">RPM Linux based systems</a>
For <a href="mono-beginning-windows/t1.html">Microsoft Windows</a>
PDF Format
For <a href="mono-beginning.pdf">RPM Linux based systems</a>
For <a href="mono-beginning-windows.pdf">Microsoft Windows</a>
XML Source
For <a href="mono-beginning.xml">RPM Linux based systems</a>
For <a href="mono-beginning-windows.xml">Microsoft Windows</a>
Currently Hinne is working on a Mono Tools HOWTO. Which will be
very useful for the hackers that would like to get in touch with
Mono and Jaime is working out a Mono Beginning HOWTO for Debian
users.
You can <a href="mono-beginning/t1.html">Read it online</a>,
download a <a href="mono-beginning.pdf">PDF</a> version, or get the
<a href="mono-beginning.xml">source code</a> for it.
File diff suppressed because it is too large. Load diff
+12 -9
View File
@@ -3,28 +3,31 @@
** Status
It passes and compiles the same amount of mono tests as on the x86 architecture.
It passes and compiles the same amount of mono tests as on the x86 architecture.
mcs is self hosting on Linux/PPC.
** To do
mcs is self hosting on Linux/PPC.
*** Interpreter
Up to date.
Up to date.
*** Jitter
Start the port
Start the port
** Documentation
<B>PowerPC architecture:</B>
*** PowerPC architecture:
<A HREF="http://e-www.motorola.com/brdata/PDFDB/docs/MPCFPE32B.pdf">PowerPC Programming environments manual</A><BR>
<A HREF="http://e-www.motorola.com/brdata/PDFDB/docs/MPC7410UM.pdf">G4 (7410) User's manual</A>
<B>Calling conventions:</B>
There's a very nice introduction to PowerPC assembly language
at <a
href="http://www-106.ibm.com/developerworks/library/l-ppc/">http://www-106.ibm.com/developerworks/library/l-ppc/</a>.
*** Calling conventions:
<a href="http://www.esofta.com/softspecs.html">The PowerPC SystemV ABI specification</a>
&lt;add me&gt;
+1
View File
@@ -18,6 +18,7 @@
1,CVS access,ccvs.html,ccvs.src
1,AnonCVS access,anoncvs.html,anoncvs.src
0,Contributing,contributing.html,contributing.src
1,Hackers,hackers.html,hackers.src
1,Documentation,documentation.html,documentation.src
1,Class Docs,classlib-doc.html,classlib-doc.src
1,Doc format,monodoc-xml.html,monodoc-xml.src
+15 -2
View File
@@ -26,6 +26,7 @@ OBJECTS= \
deploy/download.html \
deploy/faq.html \
deploy/gcc-frontend.html \
deploy/hackers.html \
deploy/index.html \
deploy/ideas.html \
deploy/java.html \
@@ -35,7 +36,6 @@ OBJECTS= \
deploy/languages.html \
deploy/mailing-lists.html \
deploy/mono-beginning.html \
deploy/mono-beginning-xml.html \
deploy/mono-contribution-howto.html \
deploy/monodoc-xml.html \
deploy/papers.html \
@@ -62,9 +62,12 @@ NON_HTML_SOURCES= \
all: $(OBJECTS) deploy/index.rss
perl process.pl commands template.html.in deploy
tutorial: mono-beginning.html.stamp mono-beginning.pdf
tutorial: mono-beginning.html.stamp mono-beginning.pdf
cp -a mono-beginning mono-beginning.xml mono-beginning.pdf deploy
tutorial-windows: mono-beginning-windows.html.stamp mono-beginning-windows.pdf
cp -a mono-beginning-windows.xml mono-beginning-windows.pdf deploy
mono-beginning.html.stamp: mono-beginning.xml
db2html mono-beginning.xml
touch mono-beginning.html.stamp
@@ -75,6 +78,16 @@ mono-beginning.pdf: mono-beginning.xml
mono-beginning.xml: ../mono-beginning.xml
cp ../mono-beginning.xml .
mono-beginning-windows.html.stamp: mono-beginning-windows.xml
db2html mono-beginning-windows.xml
touch mono-beginning-windows.html.stamp
mono-beginning-windows.pdf: mono-beginning-windows.xml
db2pdf mono-beginning-windows.xml
mono-beginning-windows.xml: ../mono-beginning-windows.xml
cp ../mono-beginning-windows.xml .
deploy/index.rss: mono-rss.exe ../index
./mono-rss.exe ../index deploy/index.rss
+1 -1
View File
@@ -1,3 +1,3 @@
EXTRA_DIST = gc-issues jit-thoughts object-layout unmanaged-calls \
exceptions jit-trampolines stack-alignment
exceptions jit-trampolines stack-alignment embedded-api
+227
View File
@@ -0,0 +1,227 @@
Embedding the Mono runtime, preliminary version
Miguel de Icaza, Paolo Molaro.
This document describes how to embed the Mono runtime in your
application, and how to invoke CIL methods from C, and how to
invoke C code from CIL.
* Embedding the runtime.
Embedding the runtime consists of various steps:
* Compiling and linking the Mono runtime
* Initializing the Mono runtime
* Optionally expose C code to the C#/CIL universe.
These are discussed in detail next.
** Compiling and Linking
To embed the runtime, you have to link your code against the
Mono runtime libraries. To do this, you want to pass the
flags returned by pkg-config to your compiler:
pkg-config --cflags --libs mono
Like this:
gcc sample.c `pkg-config --cflags --libs mono`
You can separate the compilation flags from the linking flags, for
instance, you can use the following macros in your makefile:
CFLAGS=`pkg-config --cflags mono`
LDFLAGS=`pkg-config --libs mono`
** Initializing the Mono runtime
To initialize the runtime, call mono_jit_init, like this:
MonoDomain *domain;
domain = mono_jit_init ("domain-name");
That will return a MonoDomain where your code will be
executed. You can create multiple domains. Each domain is
isolated from the other domains and code in one domain will
not interfere with code in other domains. This is useful if
you want to host different applications in your program.
Then you can load an assembly containing code into the domain:
MonoAssembly *assembly;
assembly = mono_domain_assembly_open ("file.dll");
if (!assembly)
error ();
In the above example, the contents of `file.dll' will be
loaded into the domain. This only loads the code, but it will
not execute anything yet. You can replace `file.dll' with
another transport file, like `file.exe'
To start executing code, you must invoke a method in the
assembly, or if you have provided a static Main method (an
entry point), you can use the convenience function:
retval = mono_jit_exec (domain, assembly, argc - 1, argv + 1);
If you want to invoke a different method, look at the
`Invoking Methods in the CIL universe' section later on.
** Shutting down the runtime
To shutdown the Mono runtime, you have to clean up all the
domains that were created, use this function:
mono_jit_cleanup (domain);
* Exposing C code to the CIL universe
The Mono runtime provides two mechanisms to expose C code to
the CIL universe: internal calls and native C code. Internal
calls are tightly integrated with the runtime, and have the
least overhead, as they use the same data types that the
runtime uses.
The other option is to use the Platform Invoke (P/Invoke) to
call C code from the CIL universe, using the standard P/Invoke
mechanisms.
To register an internal call, use this call in the C code:
mono_add_internal_call ("Hello::Sample", sample);
Now, you need to declare this on the C# side:
using System;
using System.Runtime.CompilerServices;
class Hello {
[MethodImplAttribute(MethodImplOptions.InternalCall)]
extern static string Sample ();
}
Since this routine returns a string, here is the C definition:
static MonoString*
Sample ()
{
return mono_string_new (mono_domain_get (), "Hello!");
}
Notice that we have to return a `MonoString', and we use the
`mono_string_new' API call to obtain this from a string.
* Invoking Methods in the CIL universe
Calling a method in the CIL universe from C requires a number of steps:
* Obtaining the MonoMethod handle to the method.
* The method invocation.
** Obtaining a MonoMethod
To get a MonoMethod there are several ways.
You can get a MonoClass (the structure representing a type)
using:
MonoClass *
mono_class_from_name (MonoImage *image, const char* name_space, const char *name);
and then loop in the returned class method array until you get
the one you're looking for. There are examples of such
searches as static functions in several C files in
metadata/*.c: we need to expose one through the API and remove
the duplicates.
The other, simpler, way is to use the functions in
debug-helpers.h: there are examples of their use in monograph,
mint and the jit as well. You basically use a string
description of the method, like:
"System.Object:GetHashCode()"
and create a MonoMethodDesc out of it with:
MonoMethodDesc* mono_method_desc_new (const char *name, gboolean include_namespace);
You can then use:
MonoMethod* mono_method_desc_search_in_class (MonoMethodDesc *desc, MonoClass *klass);
MonoMethod* mono_method_desc_search_in_image (MonoMethodDesc *desc, MonoImage *image);
to search for the method in a class or in an image. You would
tipically do this just once at the start of the program and
store the result for reuse somewhere.
** Invoking a Method
There are two functions to call a managed method:
MonoObject*
mono_runtime_invoke (MonoMethod *method, void *obj, void **params,
MonoObject **exc);
and
MonoObject*
mono_runtime_invoke_array (MonoMethod *method, void *obj, MonoArray *params,
MonoObject **exc);
obj is the 'this' pointer, it should be NULL for static
methods, a MonoObject* for object instances and a pointer to
the value type for value types.
The params array contains the arguments to the method with the
same convention: MonoObject* pointers for object instances and
pointers to the value type otherwise. The _invoke_array
variant takes a C# object[] as the params argument (MonoArray
*params): in this case the value types are boxed inside the
respective reference representation.
From unmanaged code you'll usually use the
mono_runtime_invoke() variant.
Note that this function doesn't handle virtual methods for
you, it will exec the exact method you pass: we still need to
expose a function to lookup the derived class implementation
of a virtual method (there are examples of this in the code,
though).
You can pass NULL as the exc argument if you don't want to
catch exceptions, otherwise, *exc will be set to the exception
thrown, if any. if an exception is thrown, you can't use the
MonoObject* result from the function.
If the method returns a value type, it is boxed in an object
reference.
We have plans for providing an additional method that returns
an unmanaged->managed thunk like this:
void* mono_method_get_unmanaged_thunk (MonoMethod *method);
You'll be able to store the returned pointer in a function
pointer with the proper signature and call that directly from
C:
typedef gint32 (*GetHashCode) (MonoObject *obj);
GetHashCode func = mono_method_get_unmanaged_thunk (System_Object_GetHashCode_method);
gint32 hashvalue = func (myobject);
It may not be possible to manage exceptions in that case,
though. I need to think more about it.
* Samples
See the sample programs inmono/sample/embed for examples of
embedding the Mono runtime in your application.
+26
View File
@@ -0,0 +1,26 @@
Runtime support for Remoting
============================
The runtime supports a special objects called "TransparentProxy". You can
create objects of this type by calling GetTransparentProxy() on a "RealProxy"
object.
LDFLD/STFLD for transparent proxies
===================================
Access to fields must be redirected to the remote object. System.Object has
some special methods for that:
void FieldGetter (string typeName, string fieldName, ref object val);
void FieldSetter (string typeName, string fieldName, object val);
This methods are never called on actual object. The are only used to pack
LDFLD/STFLD operations into method call messages, which are then passed to the
RealProxy::Invoke() method.
There are two helper methods which can be used by the JIT and the interpreter
to convert LDFLD/STFLD operations into messages and then call
RealProxy::Invoke(): mono_store_remote_field() and mono_load_remote_field().
+46 -28
View File
@@ -11,6 +11,13 @@ compiler, and a set of source files. Extra options or arguments can
be provided in a response file. Response files are referenced by
prepending the @ symbol to the response file name.
.PP
The Mono C# compiler accepts the same options than the Microsoft C#
compiler does. Those options can start with a slash or a dash
(/checked is the same as -checked). Additionally to this, the
GNU-like options are supported, those begin with "--". All
MCS-specific flags which are not available in the Microsoft C#
compiler are available only with the GNU-style options.
.PP
C# source files must end with a ".cs" extension. Compilation of C#
source code requires all the files that make up a library, module or
executable to be provided on the command line. There is no support
@@ -29,17 +36,26 @@ Executables are not bound to a specific CPU or operating system.
.I \-\-about
Displays information about the Mono C# compiler
.TP
.I \-\-checked
.I -checked, -checked+
Sets the default compilation mode to `checked'. This makes all
the math operations checked (the default is unchecked).
.TP
.I \-\-define SYMBOL
Defines a symbol named SYMBOL. This can be tested in the source code
by the pre-processor.
.I -checked-
Sets the default compilation mode to `unchecked'. This makes all
the math operations unchecked (this is the default).
.TP
.I \-\-debug or \-g
.I \-define:SYMLIST, -d:SYMLIST
Defines the symbol listed by the semi-colon separeted list SYMLIST
SYMBOL. This can be tested in the source code by the pre-processor,
or can be used by methods that have been tagged with the Conditional
attribute.
.TP
.I \-debug, \-debug+, \-g
Generate debugging information.
.TP
.I \-debug-
Do not generate debugging information.
.TP
.I \-\-fatal
This is used for debugging the compiler. This makes the error emission
generate an exception that can be caught by a debugger.
@@ -48,27 +64,29 @@ generate an exception that can be caught by a debugger.
Generates a stack trace at the time the error is reported, useful for
debugging the compiler.
.TP
.I -lib:PATHLIST
Each path specified in the comma-separated list will direct the
compiler to look for libraries in that specified path.
.TP
.I \-L PATH
Directs the compiler to look for libraries in the specified path.
Multiple paths can be provided.
Multiple paths can be provided by using the option multiple times.
.TP
.I \-\-nostdlib
.I \-nostdlib, -nostdlib+
Use this flag if you want to compile the core library. This makes the
compiler load its internal types from the assembly being compiled.
.TP
.I \-\-noconfig
.I \-noconfig, \-noconfig+
Disables the default compiler configuration to be loaded. The
compiler by default has references to the system assemblies.
.TP
.I \-\-nowarn XXX
Makes the compiler ignore warning XXX.
.I \-nowarn:WARNLIST
Makes the compiler ignore warnings specified in the comma-separeted
list WARNLIST>
.TP
.I \-o FNAME
.I -out:FNAME, -o FNAME
Names the output file to be generated.
.TP
.I \-\-optimize
Turns on optimizations in the compiler.
.TP
.I \-\-parse
Used for benchmarking. The compiler will only parse its input files.
.TP
@@ -76,21 +94,21 @@ Used for benchmarking. The compiler will only parse its input files.
Probes for the code to generate an error named `X' in line `L'. This
is only used by the test suite.
.TP
.I /linkres:RESOURCE
Links to the given resources
.I /resource:RESOURCE
Embeds to the given resource file.
.TP
.I \-\-recurse PATTERN
.I /linkresource:RESOURCE
Links to the given resource file.
.TP
.I \-recurse:PATTERN, --recurse PATTERN
Does recursive compilation using the specified pattern. In Unix the
shell will perform globbing, so you migth want to use it like this:
.PP
.nf
bash$ mcs --recurse '*.cs'
bash$ mcs -recurse:'*.cs'
.fi
.TP
.I \-\-linkres FILE
Links FILE as a resource of the resulting assembly.
.TP
.I \-\-target KIND
.I \-target:KIND, \-t:KIND
Used to specify the desired target. The possible values are: exe,
winexe, library and module.
.TP
@@ -98,17 +116,17 @@ winexe, library and module.
Another debugging flag. Used to display the times at various points
in the compilation process.
.TP
.I \-\-unsafe
.I \-unsafe, -unsafe+
Enables compilation of unsafe code.
.TP
.I \-\-werror
.I \-warnaserror, \-warnaserror+
Treat warnings as errors.
.TP
.I \-\-wlevel LEVEL
.I \-warn:LEVEL
Sets the warning level. 0 is the lowest warning level, and 4 is the
highest. The default is 2.
.TP
.I \-r ASSEMBLY
.I -r:ASSEMBLY, \-r ASSEMBLY
Reference the named assembly. Use this to use classes from the named
assembly in your program. The assembly will be loaded from either the
system directory where all the assemblies live, or from the path
@@ -156,8 +174,8 @@ During compilation the MCS compiler defines the __MonoCS__ symbol,
this can be used by pre-processor instructions to compile Mono C#
compiler specific code.
.SH AUTHORS
The Mono C# Compiler was written by Miguel de Icaza and Ravi Pratap at
Ximian.
The Mono C# Compiler was written by Miguel de Icaza, Ravi Pratap and
Martin Baulig at Ximian.
.PP
.SH LICENSE
The Mono Compiler Suite is released under the terms of the GNU GPL.
+20
View File
@@ -1,3 +1,23 @@
2002-08-12 Piers Haken <[email protected]>
* class/library.make: use 'find' to specify source files, instead of static files
* */makefile.gnu: specify include/exclude patterns for source files
2002-08-07 Peter Williams <[email protected]>
* class/library.make (.makefrag): Fix this rule a bit; was using
$^ instead of $<
2002-07-29 Peter Williams <[email protected]>
* makefile.gnu: 'make install' wasn't actually working due to $@,
fix it.
2002-07-29 Martin Baulig <[email protected]>
* makefile.gnu: Don't force people to install. The default must also
be `all' and not `install'.
2002-07-26 Alp Toker <[email protected]>
* INSTALL: Wrote a guide to mcs installation.
+6 -9
View File
@@ -27,13 +27,10 @@ To build the compiler and class libraries, run:
The libraries will be placed in the directory class/lib/ and the mcs
compiler executable in mcs/.
To install them, run:
To install them, run the following, where prefix identifies where you
want the files installed:
make -f makefile.gnu install
You can also specify a prefix into which the files will be installed:
make -f makefile.gnu install prefix=/opt
make -f makefile.gnu install prefix=/usr/local
If you are tracking Mono's development, you may sometimes need to share
the compiled libraries with others. If you want to produce an easily
@@ -50,7 +47,7 @@ mcs setup. To build the compiler and class libraries, run:
make
The libraries will be placed in the directory class/lib/ and the mcs compiler
executable in mcs/. They can then be copied to /usr/lib and /usr/bin or
wherever desired on the target system.
The libraries will be placed in the directory class/lib/ and the mcs
compiler executable in mcs/. They can then be copied to /usr/lib and
/usr/bin or wherever desired on the target system.
+6 -9
View File
@@ -27,13 +27,10 @@ To build the compiler and class libraries, run:
The libraries will be placed in the directory class/lib/ and the mcs
compiler executable in mcs/.
To install them, run:
To install them, run the following, where prefix identifies where you
want the files installed:
make -f makefile.gnu install
You can also specify a prefix into which the files will be installed:
make -f makefile.gnu install prefix=/opt
make -f makefile.gnu install prefix=/usr/local
If you are tracking Mono's development, you may sometimes need to share
the compiled libraries with others. If you want to produce an easily
@@ -50,7 +47,7 @@ mcs setup. To build the compiler and class libraries, run:
make
The libraries will be placed in the directory class/lib/ and the mcs compiler
executable in mcs/. They can then be copied to /usr/lib and /usr/bin or
wherever desired on the target system.
The libraries will be placed in the directory class/lib/ and the mcs
compiler executable in mcs/. They can then be copied to /usr/lib and
/usr/bin or wherever desired on the target system.
+13
View File
@@ -1,3 +1,16 @@
2002-08-13 Daniel Morgan <[email protected]>
* Mono.Data.MySql/MySqlCommand.cs: modified
rowsRetrieved should be rowsAffected in ExecuteNonQuery
because the number is only to show the rows affected
by an INSERT, UPDATE, or DELETE; anything else, the
number is -1
* Mono.Data.MySql/Test.cs: modified
enable retrieving the results from a query. even though
this still does not work for some reason, i thought
i would enable it so others could see the problem.
2002-05-30 Daniel Morgan <[email protected]>
* Mono.Data.MySql.build: modified
@@ -248,10 +248,10 @@ namespace Mono.Data.MySql {
/// library!
///</para>
///</summary>
//[DllImport("libmySQL",
// CharSet=System.Runtime.InteropServices.CharSet.Ansi,
// EntryPoint="mysql_thread_end", ExactSpelling=true)]
//public static extern void ThreadEnd();
[DllImport("libmySQL",
CharSet=System.Runtime.InteropServices.CharSet.Ansi,
EntryPoint="mysql_thread_end", ExactSpelling=true)]
public static extern void ThreadEnd();
///<summary>
///<para>
@@ -262,9 +262,9 @@ namespace Mono.Data.MySql {
/// This is automatically called by <see cref="Init"/>.
///</para>
///</summary>
//[DllImport("libmySQL",
// CharSet=System.Runtime.InteropServices.CharSet.Ansi,
// EntryPoint="mysql_thread_init", ExactSpelling=true)]
//public static extern void ThreadInit();
[DllImport("libmySQL",
CharSet=System.Runtime.InteropServices.CharSet.Ansi,
EntryPoint="mysql_thread_init", ExactSpelling=true)]
public static extern void ThreadInit();
}
}
@@ -94,7 +94,7 @@ namespace Mono.Data.MySql {
[MonoTODO]
public int ExecuteNonQuery () {
int rowsRetrieved = -1;
int rowsAffected = -1;
//TODO: need to do this correctly
// this is just something quick
// thrown together to see if we can
@@ -110,13 +110,18 @@ namespace Mono.Data.MySql {
Console.Out.Flush();
return 0;
}
return rowsRetrieved;
// TODO: need to return the number of rows affected for an INSERT, UPDATE, or DELETE
// otherwise, it is -1
return rowsAffected;
}
[MonoTODO]
IDataReader IDbCommand.ExecuteReader () {
//return ExecuteReader ();
// FIXME: just a quick hack
ExecuteNonQuery();
return null;
}
/*
@@ -142,7 +147,9 @@ namespace Mono.Data.MySql {
[MonoTODO]
public object ExecuteScalar () {
throw new NotImplementedException();
// FIXME: just a quick hack
ExecuteNonQuery();
return null;
}
[MonoTODO]
@@ -21,10 +21,10 @@
// at http://www.opensource.org/licenses/mit-license.html
//
// define MYSQL_CANDO_QUERY if the runtime can do a query
// #define MYSQL_CANDO_QUERY if the runtime can do a query
// define MYSQL_CANDO_THREADS if the runtime can use mysql_thread_* functions
//#define MYSQL_CANDO_QUERY
//#define MYSQL_CANDO_THREADS
#define MYSQL_CANDO_QUERY
#define MYSQL_CANDO_THREADS
using System;
using System.Runtime.InteropServices;
@@ -60,9 +60,10 @@ public class Test {
public static int Main() {
Console.WriteLine("Test for MySQL C# Bindings started...");
Console.Out.Flush();
int rcq;
string myDb = "test";
string myStmt = "SELECT * FROM db";
string myStmt = "SELECT * FROM sometable";
string insertStmt = "INSERT INTO SOMETABLE (TID,TDESC,AINT) VALUES ('MySQL','Mono.Data',12)";
Console.WriteLine("MySql Init...");
@@ -101,7 +102,7 @@ public class Test {
Console.WriteLine("Insert SQL: "+insertStmt);
Console.Out.Flush();
int rcq = MySql.Query(db, insertStmt);
rcq = MySql.Query(db, insertStmt);
if (rcq != 0) {
Console.WriteLine("Couldn't execute ["+insertStmt+"] on server.");
Console.Out.Flush();
@@ -113,7 +114,7 @@ public class Test {
#if MYSQL_CANDO_QUERY
Console.WriteLine("Query: "+myStmt);
Console.Out.Flush();
int rcq = MySql.Query(db, myStmt);
rcq = MySql.Query(db, myStmt);
if (rcq != 0) {
Console.WriteLine("?Couldn't execute ["+myStmt+"] on server.");
Console.Out.Flush();
@@ -175,7 +176,14 @@ public class Test {
while ((row = MySql.FetchRow(res)) != IntPtr.Zero) {
Console.WriteLine("Record #" + recCnt + ":");
for (int i = 0, j = 1; i < numFields; i++, j++) {
Console.WriteLine(" Going to WriteLine Fld...\n");
Console.Out.Flush();
Console.WriteLine(" theField[[[" + fields[i] + "]]]\n");
Console.Out.Flush();
Console.WriteLine(" after theField... \n");
Console.Out.Flush();
Console.WriteLine(" Fld #"+j+" ("+fields[i]+"): "+rowVal(row, i));
Console.Out.Flush();
}
Console.WriteLine("==============================");
}
@@ -183,10 +191,18 @@ public class Test {
}
static string rowVal(IntPtr res, int index) {
Console.WriteLine("...Marshal.ReadIntPtr() BEFORE...\n");
Console.Out.Flush();
IntPtr str = Marshal.ReadIntPtr(res, index*IntPtr.Size);
Console.WriteLine("...Marshal.ReadIntPtr() AFTER...\n");
Console.Out.Flush();
if (str == IntPtr.Zero)
return "NULL";
Console.WriteLine("...Marshal.PtrToStringAnsi() BEFORE...");
Console.Out.Flush();
string s = Marshal.PtrToStringAnsi(str);
Console.WriteLine("...Marshal.PtrToStringAnsi() AFTER...");
Console.Out.Flush();
return s;
}
@@ -65,24 +65,40 @@ namespace System.Data.SqlClient
#region Properties
public new SqlCommand DeleteCommand {
get { return deleteCommand; }
set { deleteCommand = value; }
public SqlCommand DeleteCommand {
get {
return deleteCommand;
}
set {
deleteCommand = value;
}
}
public new SqlCommand InsertCommand {
get { return insertCommand; }
set { insertCommand = value; }
public SqlCommand InsertCommand {
get {
return insertCommand;
}
set {
insertCommand = value;
}
}
public new SqlCommand SelectCommand {
get { return selectCommand; }
set { selectCommand = value; }
public SqlCommand SelectCommand {
get {
return selectCommand;
}
set {
selectCommand = value;
}
}
public new SqlCommand UpdateCommand {
get { return updateCommand; }
set { updateCommand = value; }
public SqlCommand UpdateCommand {
get {
return updateCommand;
}
set {
updateCommand = value;
}
}
IDbCommand IDbDataAdapter.DeleteCommand {
@@ -65,24 +65,40 @@ namespace System.Data.SqlClient
#region Properties
public new SqlCommand DeleteCommand {
get { return deleteCommand; }
set { deleteCommand = value; }
public SqlCommand DeleteCommand {
get {
return deleteCommand;
}
set {
deleteCommand = value;
}
}
public new SqlCommand InsertCommand {
get { return insertCommand; }
set { insertCommand = value; }
public SqlCommand InsertCommand {
get {
return insertCommand;
}
set {
insertCommand = value;
}
}
public new SqlCommand SelectCommand {
get { return selectCommand; }
set { selectCommand = value; }
public SqlCommand SelectCommand {
get {
return selectCommand;
}
set {
selectCommand = value;
}
}
public new SqlCommand UpdateCommand {
get { return updateCommand; }
set { updateCommand = value; }
public SqlCommand UpdateCommand {
get {
return updateCommand;
}
set {
updateCommand = value;
}
}
IDbCommand IDbDataAdapter.DeleteCommand {
@@ -2,9 +2,12 @@ topdir = ../..
LIBRARY = ../lib/System.Configuration.Install.dll
LIB_LIST = list.unix
LIB_FLAGS = -r corlib
SOURCES_INCLUDE=*.cs
SOURCES_EXCLUDE=\
./Test*
export MONO_PATH_PREFIX = ../lib:
include ../library.make
+2
View File
@@ -1,2 +1,4 @@
.makefrag
.response
System.Data.dll
library-deps.stamp
+230 -19
View File
@@ -1,45 +1,256 @@
2002-08-16 Rodrigo Moya <[email protected]>
* System.Data.OleDb/libgda.cs: added new needed libgda functions.
* System.Data.OleDb/OleDbDataReader.cs (GetBoolean): throw exceptions
when there are errors.
(GetByte, GetChar, GetDataTypeName, GetValue, Read): implemented.
* System.Data.OleDb/TestOleDb.cs: added more testing code for data
readers.
2002-08-15 Rodrigo Moya <[email protected]>
* System.Data.OleDb/libgda.cs: added new needed libgda functions.
* System.Data.OleDb/OleDbParameterCollection.cs (GdaParameterList):
create an empty GdaParameterList.
* System.Data.OleDb/OleDbCommand.cs (ExecuteReader): check values
for NULL before passing them to Marshal.PtrToStructure, which issues
an exception if the value is NULL.
2002-08-15 Rodrigo Moya <[email protected]>
* System.Data/UniqueConstraint.cs (UniqueConstraint): commented
unreachable code to avoid compiler warning.
* System.Data.OleDb/libgda.cs (GdaList): added new internal class.
* System.Data.OleDb/OleDbConnection.cs (DataSource): implemented.
(OpenReader): removed internal method.
* System.Data.OleDb/OleDbCommand.cs (ExecuteReader): split correctly
the list of returned data models.
2002-08-15 Franklin Wise <[email protected]>
* System.Data/Constraint.cs: Added helper virtual functions
* System.Data/ConstraintCollection.cs: Improved constraint removal,
validation. Removed specific knowledge of subclasses of
Constraint.
* System.Data/DataColumn.cs: Added static helper function to compare
if two DataColumn arrays are the same.
* System.Data/ForeignKeyConstraint.cs: Continued to flush out.
* System.Data/UniqueConstraint.cs: Implemented. Still some constraint
validation to do.
2002-08-13 Franklin Wise <[email protected]>
* System.Data/DataRow.cs: Added several fixme tags.
2002-08-13 Rodrigo Moya <[email protected]>
* System.Data.SqlClient/SqlDataAdapter.cs (DeleteCommand,
InsertCommand, SelectCommand, UpdateCommand): removed 'new' keyword
to avoid compiler warnings.
2002-08-12 Franklin Wise <[email protected]>
* System.Data/Constraint.cs: Implemented
* System.Data/UniqueConstraint.cs: GetHashCode() &
special case Ctor. Still need to be implemented. LAMESPEC tags
added.
* System.Data/ConstraintCollection.cs: Clear() &
AddRange() need to be finished. Several LAMESPEC tags.
* Allow Constraint collection to be created in DataTable.
* System.Data/ForeignKeyConstraint: Added a couple of
helper functions.
* System.Data/DataColumnCollection New/Added DataColumns now have
Table property set.
2002-08-11 Rodrigo Moya <[email protected]>
* System.Data.OleDb/libgda.cs: added some GdaValue functions.
* System.Data.OleDb/OleDbCommand.cs (OpenReader): removed this
internal method, since we don't need it.
(ExecuteReader): call SetupGdaCommand before executing the command
via libgda functions.
(ExecuteScalar): implemented.
* System.Data.OleDb/OleDbDateReader.cs (OleDbDataReader): removed call
to OleDbCommand.OpenReader.
(GetBoolean): implemented.
2002-08-08 Franklin Wise <[email protected]>
* System.Data/IDbComand.cs: IDbCommand now inherits IDisposable
* System.Data/IDbConnection.cs: IDbConnection now inherits IDisposable
* System.Data.SqlTypes/SqlCompareOptions.cs: Enum now set to correct
values.
2002-08-06 Gonzalo Paniagua Javier <[email protected]>
* System.Data.OleDb/OleDbConnection.cs: little fixes to make it work
and don't show a warning in Open.
* System.Data.OleDb/TestOleDb.cs: added Close.
2002-08-05 Rodrigo Moya <[email protected]>
* System.Data.OleDb/OleDbConnection.cs (ConnectionString,
ConnectionTimeout, ServerVersion, GdaConnection):
corrected style.
(OleDbConnection): call libgda.gda_init on constructor.
* System.Data.OleDb/libgda.cs (libgda): removed static constructor,
which wasn't been called.
* System.Data.OleDb/TestOleDb.cs (TestOleDb): updated to really
make some tests.
2002-08-04 Rodrigo Moya <[email protected]>
* list: added missing System.Data.OleDb and
System.Data.Common files.
* System.Data.OleDb/ChangeLog: removed and merged with
System.Data's ChangeLog.
* System.Data.OleDb/OleDbDataAdapter.cs:
* System.Data.OleDb/OleDbPermission.cs: compilation fixes.
2002-07-30 Rodrigo Moya <[email protected]>
* System.Data.OleDb/OleDbDataReader.cs (FieldCount): implemented.
(IsClosed, Item, RecordsAffected): implemented some properties.
* libgda.cs: added GdaDataModel methods.
2002-07-29 Rodrigo Moya <[email protected]>
* System.Data.OleDb/OleDbDataReader.cs (OleDbDataReader constructor): changed to receive
a second argument (ArrayList results).
(NextResult): implemented.
* System.Data.OleDb/OleDbCommand.cs: don't store the ArrayList of results, since we'll
pass that to the OleDbDataReader.
(OleDbCommand constructor): don't create the ArrayList of results.
(GdaResults): removed property.
(ExecuteReader): create a temporary ArrayList and pass that to the
OleDbDataReader constructor.
2002-07-28 Rodrigo Moya <[email protected]>
* System.Data.OleDb/OleDbCommand.cs (ExecuteReader):
(CreateParameter): implemented IDbCommand methods.
(CommandText): don't create many GdaCommand's, only one is needed.
(ExecuteNonQuery): set up the internal GDA command object.
(ExecuteReader): use correctly the unique GDA command object.
* System.Data.OleDb/libgda.cs: added new libgda calls.
2002-07-27 Rodrigo Moya <[email protected]>
* System.Data.OleDb/OleDbConnection.cs (CreateCommand):
(BeginTransaction): implemented IDbConnection methods.
2002-07-12 Rodrigo Moya <[email protected]>
* list: added System.Data.OleDb files to file list.
2002-07-11 Rodrigo Moya <[email protected]>
* System.Data.OleDb/libgda.cs: added new libgda functions and some enumerations.
* System.Data.OleDb/OleDbParameter.cs (IsNullable): removed explicit implementation
of the set method for this property.
* System.Data.OleDb/OleDbDataAdapter.cs (MissingMappingAction): implemented.
(MissingSchemaAction): implemented.
2002-07-10 Tim Coleman <[email protected]>
* System.Data.OleDb/OleDbCommandBuilder.cs: Added new methods, properties
* System.Data.OleDb/OleDbConnection.cs: Modified constructor
* System.Data.OleDb/OleDbError.cs: Added stubbs
* System.Data.OleDb/OleDbException.cs: Added stubbs
* System.Data.OleDb/OleDbInfoMessageEventArgs.cs: Added stubbs
* System.Data.OleDb/OleDbInfoMessageEventHandler.cs: style change
* System.Data.OleDb/OleDbParameter.cs: Added conversion from type to OleDbType
* System.Data.OleDb/OleDbPermission.cs: Added stubbs
* System.Data.OleDb/OleDbSchemaGuid.cs: Added stubbs
* System.Data.OleDb/OleDbTransaction.cs: New constructors, changes to methods to
support transaction nesting
* System.Data.OleDb/libgda.cs: Added my name to this file
2002-07-09 Tim Coleman <[email protected]>
* System.Data.OleDb/OleDbCommand.cs: Style changes, added new methods
* System.Data.OleDb/OleDbConnection.cs: Style changes, added new methods
* System.Data.OleDb/OleDbDataAdapter.cs: Implementation
* System.Data.OleDb/OleDbDataReader.cs: Added stubbs
* System.Data.OleDb/OleDbErrorCollection.cs: Added stubbs, some implementation
* System.Data.OleDb/OleDbParameter.cs: Style changes, added new methods
* System.Data.OleDb/OleDbParameterCollection.cs: Style changes, added new methods
* System.Data.OleDb/OleDbPermissionAttribute.cs: Style changes, added new methods
* System.Data.OleDb/OleDbRowUpdatedEventArgs.cs: Added stubbs
* System.Data.OleDb/OleDbRowUpdatingEventArgs.cs: Added stubbs
* System.Data.OleDb/OleDbTransaction.cs: Style changes, added new methods
* System.Data.OleDb/OleDbType.cs: Fixed two typos
* System.Data.OleDb/libgda.cs: Style changes, added new methods
2002-07-09 Tim Coleman <[email protected]>
* System.Data.build: remove restriction on System.Data.OleDb build
2002-06-03 Rodrigo Moya <[email protected]>
* OleDbParameterCollection.cs (GetEnumerator, SyncRoot,
* System.Data.OleDb/OleDbParameterCollection.cs (GetEnumerator, SyncRoot,
IsSynchronized): implemented.
2002-06-02 Rodrigo Moya <[email protected]>
* OleDbTransaction.cs (Dispose): added missing method.
* System.Data.OleDb/OleDbTransaction.cs (Dispose): added missing method.
* OleDbCommand.cs (Clone): added missing methods.
* System.Data.OleDb/OleDbCommand.cs (Clone): added missing methods.
(Parameters, Transaction, Connection): made these overload
IDbCommand's ones.
* OleDbParameterCollection.cs (IndexOf, Remove, RemoveAt):
* System.Data.OleDb/OleDbParameterCollection.cs (IndexOf, Remove, RemoveAt):
call m_list methods, not own ones.
* OleDbParameter.cs: more implementation.
* System.Data.OleDb/OleDbParameter.cs: more implementation.
2002-06-02 Rodrigo Moya <[email protected]>
* OleDbTransaction.cs (Connection, IsolationLevel, Begin,
* System.Data.OleDb/OleDbTransaction.cs (Connection, IsolationLevel, Begin,
Commit, Rollback): implemented.
(GdaConnection): added new internal property.
* OleDbParameter.cs:
* OleDbParameterCollection.cs: implemented some methods and
* System.Data.OleDb/OleDbParameter.cs:
* System.Data.OleDb/OleDbParameterCollection.cs: implemented some methods and
properties.
* libgda.cs: added yet more libgda API functions.
* System.Data.OleDb/libgda.cs: added yet more libgda API functions.
2002-06-01 Rodrigo Moya <[email protected]>
* libgda.cs: added new libgda API functions.
* System.Data.OleDb/libgda.cs: added new libgda API functions.
* OleDbConnection.cs (Provider): implemented.
* System.Data.OleDb/OleDbConnection.cs (Provider): implemented.
(BeginTransaction): made it overload IDbConnection methods.
(ChangeDatabase): new stub, needs some work on libgda for being
implemented.
@@ -51,33 +262,33 @@
strings that represent a GDA data source name. More to come.
(InfoMessage, StateChange): added events.
* TestOleDb.cs: test program for System.Data.OleDb.
* System.Data.OleDb/TestOleDb.cs: test program for System.Data.OleDb.
2002-05-29 Rodrigo Moya <[email protected]>
* libgda.cs: added static constructor.
* System.Data.OleDb/libgda.cs: added static constructor.
(GdaClient): new static property to get the underlying GdaClient
object.
* OleDbConnection.cs: removed GDA initialization, which belongs to
* System.Data.OleDb/OleDbConnection.cs: removed GDA initialization, which belongs to
the static 'libgda' class.
2002-05-29 Rodrigo Moya <[email protected]>
* libgda.cs: static class for libgda API calls.
* System.Data.OleDb/libgda.cs: static class for libgda API calls.
* OleDbConnection.cs: implemented constructors.
* System.Data.OleDb/OleDbConnection.cs: implemented constructors.
(ConnectionString, Connectiontimeout, Database, State):
implemented class properties.
(BeginTransaction): implemented.
* OleDbTransaction.cs: implemented protected constructors.
* System.Data.OleDb/OleDbTransaction.cs: implemented protected constructors.
* TestGDA.cs: simple test for libgda API.
* System.Data.OleDb/TestGDA.cs: simple test for libgda API.
2002-05-27 Rodrigo Moya <[email protected]>
Started System.Data.OleDb provider, based on libgda.
* System.Data.OleDb/*: started System.Data.OleDb provider, based on libgda.
2002-06-06 Rodrigo Moya <[email protected]>
@@ -1,112 +0,0 @@
2002-07-11 Rodrigo Moya <[email protected]>
* libgda.cs: added new libgda functions and some enumerations.
* OleDbParameter.cs (IsNullable): removed explicit implementation
of the set method for this property.
* OleDbDataAdapter.cs (MissingMappingAction): implemented.
(MissingSchemaAction): implemented.
2002-07-10 Tim Coleman <[email protected]>
* OleDbCommandBuilder.cs: Added new methods, properties
* OleDbConnection.cs: Modified constructor
* OleDbError.cs: Added stubbs
* OleDbException.cs: Added stubbs
* OleDbInfoMessageEventArgs.cs: Added stubbs
* OleDbInfoMessageEventHandler.cs: style change
* OleDbParameter.cs: Added conversion from type to OleDbType
* OleDbPermission.cs: Added stubbs
* OleDbSchemaGuid.cs: Added stubbs
* OleDbTransaction.cs: New constructors, changes to methods to
support transaction nesting
* libgda.cs: Added my name to this file
2002-07-09 Tim Coleman <[email protected]>
* OleDbCommand.cs: Style changes, added new methods
* OleDbConnection.cs: Style changes, added new methods
* OleDbDataAdapter.cs: Implementation
* OleDbDataReader.cs: Added stubbs
* OleDbErrorCollection.cs: Added stubbs, some implementation
* OleDbParameter.cs: Style changes, added new methods
* OleDbParameterCollection.cs: Style changes, added new methods
* OleDbPermissionAttribute.cs: Style changes, added new methods
* OleDbRowUpdatedEventArgs.cs: Added stubbs
* OleDbRowUpdatingEventArgs.cs: Added stubbs
* OleDbTransaction.cs: Style changes, added new methods
* OleDbType.cs: Fixed two typos
* libgda.cs: Style changes, added new methods
2002-06-03 Rodrigo Moya <[email protected]>
* OleDbParameterCollection.cs (GetEnumerator, SyncRoot,
IsSynchronized): implemented.
2002-06-02 Rodrigo Moya <[email protected]>
* OleDbTransaction.cs (Dispose): added missing method.
* OleDbCommand.cs (Clone): added missing methods.
(Parameters, Transaction, Connection): made these overload
IDbCommand's ones.
* OleDbParameterCollection.cs (IndexOf, Remove, RemoveAt):
call m_list methods, not own ones.
* OleDbParameter.cs: more implementation.
2002-06-02 Rodrigo Moya <[email protected]>
* OleDbTransaction.cs (Connection, IsolationLevel, Begin,
Commit, Rollback): implemented.
(GdaConnection): added new internal property.
* OleDbParameter.cs:
* OleDbParameterCollection.cs: implemented some methods and
properties.
* libgda.cs: added yet more libgda API functions.
2002-06-01 Rodrigo Moya <[email protected]>
* libgda.cs: added new libgda API functions.
* OleDbConnection.cs (Provider): implemented.
(BeginTransaction): made it overload IDbConnection methods.
(ChangeDatabase): new stub, needs some work on libgda for being
implemented.
(Clone): new stub.
(Close): implemented.
(CreateCommand): implemented.
(GetOleDbSchemaTable): new stub, until I understand what to do here.
(Open): implemented basic stuff, which is just supporting connection
strings that represent a GDA data source name. More to come.
(InfoMessage, StateChange): added events.
* TestOleDb.cs: test program for System.Data.OleDb.
2002-05-29 Rodrigo Moya <[email protected]>
* libgda.cs: added static constructor.
(GdaClient): new static property to get the underlying GdaClient
object.
* OleDbConnection.cs: removed GDA initialization, which belongs to
the static 'libgda' class.
2002-05-29 Rodrigo Moya <[email protected]>
* libgda.cs: static class for libgda API calls.
* OleDbConnection.cs: implemented constructors.
(ConnectionString, Connectiontimeout, Database, State):
implemented class properties.
(BeginTransaction): implemented.
* OleDbTransaction.cs: implemented protected constructors.
* TestGDA.cs: simple test for libgda API.
2002-05-27 Rodrigo Moya <[email protected]>
Started System.Data.OleDb provider, based on libgda.
@@ -13,6 +13,7 @@ using System.ComponentModel;
using System.Data;
using System.Data.Common;
using System.Collections;
using System.Runtime.InteropServices;
namespace System.Data.OleDb
{
@@ -32,8 +33,7 @@ namespace System.Data.OleDb
bool designTimeVisible;
OleDbDataReader dataReader;
CommandBehavior behavior;
ArrayList gdaCommands;
ArrayList gdaResults;
IntPtr gdaCommand;
#endregion // Fields
@@ -50,12 +50,10 @@ namespace System.Data.OleDb
designTimeVisible = false;
dataReader = null;
behavior = CommandBehavior.Default;
gdaCommands = new ArrayList ();
gdaResults = new ArrayList ();
gdaCommand = IntPtr.Zero;
}
public OleDbCommand (string cmdText)
: this ()
public OleDbCommand (string cmdText) : this ()
{
CommandText = cmdText;
}
@@ -66,8 +64,9 @@ namespace System.Data.OleDb
Connection = connection;
}
public OleDbCommand (string cmdText, OleDbConnection connection, OleDbTransaction transaction)
: this (cmdText, connection)
public OleDbCommand (string cmdText,
OleDbConnection connection,
OleDbTransaction transaction) : this (cmdText, connection)
{
this.transaction = transaction;
}
@@ -78,71 +77,101 @@ namespace System.Data.OleDb
public string CommandText
{
get { return commandText; }
get {
return commandText;
}
set {
string[] queries = value.Split (new Char[] {';'});
gdaCommands.Clear ();
foreach (string query in queries)
gdaCommands.Add (libgda.gda_command_new (query, 0, 0));
commandText = value;
commandText = value;
}
}
public int CommandTimeout {
get { return timeout; }
set { timeout = value; }
get {
return timeout;
}
set {
timeout = value;
}
}
public CommandType CommandType {
get { return commandType; }
set { commandType = value; }
get {
return commandType;
}
set {
commandType = value;
}
}
public OleDbConnection Connection {
get { return connection; }
set { connection = value; }
get {
return connection;
}
set {
connection = value;
}
}
public bool DesignTimeVisible {
get { return designTimeVisible; }
set { designTimeVisible = value; }
get {
return designTimeVisible;
}
set {
designTimeVisible = value;
}
}
public OleDbParameterCollection Parameters {
get { return parameters; }
set { parameters = value; }
get {
return parameters;
}
set {
parameters = value;
}
}
public OleDbTransaction Transaction {
get { return transaction; }
set { transaction = value; }
get {
return transaction;
}
set {
transaction = value;
}
}
public UpdateRowSource UpdatedRowSource {
[MonoTODO]
get { throw new NotImplementedException (); }
get {
throw new NotImplementedException ();
}
[MonoTODO]
set { throw new NotImplementedException (); }
set {
throw new NotImplementedException ();
}
}
IDbConnection IDbCommand.Connection {
get { return Connection; }
set { Connection = (OleDbConnection) value; }
get {
return Connection;
}
set {
Connection = (OleDbConnection) value;
}
}
IDataParameterCollection IDbCommand.Parameters {
get { return Parameters; }
get {
return Parameters;
}
}
IDbTransaction IDbCommand.Transaction {
get { return Transaction; }
set { Transaction = (OleDbTransaction) value; }
}
internal ArrayList GdaResults {
get { return gdaResults; }
get {
return Transaction;
}
set {
Transaction = (OleDbTransaction) value;
}
}
#endregion // Properties
@@ -160,12 +189,44 @@ namespace System.Data.OleDb
return new OleDbParameter ();
}
IDbDataParameter IDbCommand.CreateParameter ()
{
return CreateParameter ();
}
[MonoTODO]
protected override void Dispose (bool disposing)
{
throw new NotImplementedException ();
}
private void SetupGdaCommand ()
{
GdaCommandType type;
switch (commandType) {
case CommandType.TableDirect :
type = GdaCommandType.Table;
break;
case CommandType.StoredProcedure :
type = GdaCommandType.Procedure;
break;
case CommandType.Text :
default :
type = GdaCommandType.Sql;
break;
}
if (gdaCommand != IntPtr.Zero) {
libgda.gda_command_set_text (gdaCommand, commandText);
libgda.gda_command_set_command_type (gdaCommand, type);
} else {
gdaCommand = libgda.gda_command_new (commandText, type, 0);
}
//libgda.gda_command_set_transaction
}
public int ExecuteNonQuery ()
{
if (connection == null)
@@ -177,7 +238,10 @@ namespace System.Data.OleDb
IntPtr gdaConnection = connection.GdaConnection;
IntPtr gdaParameterList = parameters.GdaParameterList;
return libgda.gda_connection_execute_non_query (gdaConnection, (IntPtr) gdaCommands[0], gdaParameterList);
SetupGdaCommand ();
return libgda.gda_connection_execute_non_query (gdaConnection,
(IntPtr) gdaCommand,
gdaParameterList);
}
public OleDbDataReader ExecuteReader ()
@@ -185,8 +249,17 @@ namespace System.Data.OleDb
return ExecuteReader (CommandBehavior.Default);
}
IDataReader IDbCommand.ExecuteReader ()
{
return ExecuteReader ();
}
public OleDbDataReader ExecuteReader (CommandBehavior behavior)
{
ArrayList results = new ArrayList ();
IntPtr rs_list;
GdaList glist_node;
if (connection.State != ConnectionState.Open)
throw new InvalidOperationException ();
@@ -195,20 +268,40 @@ namespace System.Data.OleDb
IntPtr gdaConnection = connection.GdaConnection;
IntPtr gdaParameterList = parameters.GdaParameterList;
foreach (IntPtr gdaCommand in gdaCommands)
GdaResults.Add (libgda.gda_connection_execute_single_command (gdaConnection, gdaCommand, gdaParameterList));
/* execute the command */
SetupGdaCommand ();
rs_list = libgda.gda_connection_execute_command (
gdaConnection,
gdaCommand,
gdaParameterList);
if (rs_list != IntPtr.Zero) {
glist_node = (GdaList) Marshal.PtrToStructure (rs_list, typeof (GdaList));
dataReader = new OleDbDataReader (this);
while (glist_node != null) {
results.Add (glist_node.data);
if (glist_node.next == IntPtr.Zero)
break;
dataReader.NextResult ();
glist_node = (GdaList) Marshal.PtrToStructure (glist_node.next,
typeof (GdaList));
}
dataReader = new OleDbDataReader (this, results);
dataReader.NextResult ();
}
return dataReader;
}
[MonoTODO]
IDataReader IDbCommand.ExecuteReader (CommandBehavior behavior)
{
return ExecuteReader (behavior);
}
public object ExecuteScalar ()
{
throw new NotImplementedException ();
SetupGdaCommand ();
OleDbDataReader reader = ExecuteReader ();
return reader.GetValue (0);
}
[MonoTODO]
@@ -217,24 +310,6 @@ namespace System.Data.OleDb
throw new NotImplementedException ();
}
[MonoTODO]
IDbDataParameter IDbCommand.CreateParameter ()
{
throw new NotImplementedException ();
}
[MonoTODO]
IDataReader IDbCommand.ExecuteReader ()
{
throw new NotImplementedException ();
}
[MonoTODO]
IDataReader IDbCommand.ExecuteReader (CommandBehavior behavior)
{
throw new NotImplementedException ();
}
[MonoTODO]
public void Prepare ()
{
@@ -247,17 +322,5 @@ namespace System.Data.OleDb
}
#endregion
#region Internal Methods
// only meant to be used between OleDbConnectioin,
// OleDbCommand, and OleDbDataReader
internal void OpenReader (OleDbDataReader reader)
{
connection.OpenReader (reader);
}
#endregion
}
}
@@ -31,12 +31,13 @@ namespace System.Data.OleDb
public OleDbConnection ()
{
libgda.gda_init ("System.Data.OleDb", "1.0", 0, new string [0]);
gdaConnection = IntPtr.Zero;
connectionTimeout = 15;
connectionString = null;
}
public OleDbConnection (string connectionString)
: this ()
public OleDbConnection (string connectionString) : this ()
{
this.connectionString = connectionString;
}
@@ -46,17 +47,24 @@ namespace System.Data.OleDb
#region Properties
public string ConnectionString {
get { return connectionString; }
set { connectionString = value; }
get {
return connectionString;
}
set {
connectionString = value;
}
}
public int ConnectionTimeout {
get { return connectionTimeout; }
get {
return connectionTimeout;
}
}
public string Database {
get {
if (gdaConnection != IntPtr.Zero && libgda.gda_connection_is_open (gdaConnection)) {
if (gdaConnection != IntPtr.Zero
&& libgda.gda_connection_is_open (gdaConnection)) {
return libgda.gda_connection_get_database (gdaConnection);
}
@@ -65,15 +73,20 @@ namespace System.Data.OleDb
}
public string DataSource {
[MonoTODO]
get {
throw new NotImplementedException ();
if (gdaConnection != IntPtr.Zero
&& libgda.gda_connection_is_open (gdaConnection)) {
return libgda.gda_connection_get_dsn (gdaConnection);
}
return null;
}
}
public string Provider {
get {
if (gdaConnection != IntPtr.Zero && libgda.gda_connection_is_open (gdaConnection)) {
if (gdaConnection != IntPtr.Zero
&& libgda.gda_connection_is_open (gdaConnection)) {
return libgda.gda_connection_get_provider (gdaConnection);
}
@@ -83,7 +96,9 @@ namespace System.Data.OleDb
public string ServerVersion {
[MonoTODO]
get { throw new NotImplementedException (); }
get {
throw new NotImplementedException ();
}
}
public ConnectionState State
@@ -100,7 +115,9 @@ namespace System.Data.OleDb
internal IntPtr GdaConnection
{
get { return gdaConnection; }
get {
return gdaConnection;
}
}
#endregion // Properties
@@ -115,6 +132,11 @@ namespace System.Data.OleDb
return null;
}
IDbTransaction IDbConnection.BeginTransaction ()
{
return BeginTransaction ();
}
public OleDbTransaction BeginTransaction (IsolationLevel level)
{
if (gdaConnection != IntPtr.Zero)
@@ -123,6 +145,11 @@ namespace System.Data.OleDb
return null;
}
IDbTransaction IDbConnection.BeginTransaction (IsolationLevel level)
{
return BeginTransaction (level);
}
public void ChangeDatabase (string name)
{
// FIXME: see http://bugzilla.gnome.org/show_bug.cgi?id=83315
@@ -138,8 +165,9 @@ namespace System.Data.OleDb
public OleDbCommand CreateCommand ()
{
if (gdaConnection != IntPtr.Zero && libgda.gda_connection_is_open (gdaConnection))
return new OleDbCommand ();
if (gdaConnection != IntPtr.Zero
&& libgda.gda_connection_is_open (gdaConnection))
return new OleDbCommand (null, this);
return null;
}
@@ -162,30 +190,19 @@ namespace System.Data.OleDb
throw new NotImplementedException();
}
[MonoTODO]
IDbTransaction IDbConnection.BeginTransaction ()
{
throw new NotImplementedException ();
}
[MonoTODO]
IDbTransaction IDbConnection.BeginTransaction (IsolationLevel level)
{
throw new NotImplementedException ();
}
[MonoTODO]
IDbCommand IDbConnection.CreateCommand ()
{
throw new NotImplementedException ();
return CreateCommand ();
}
public void Open ()
{
if (gdaConnection != IntPtr.Zero || libgda.gda_connection_is_open (gdaConnection))
if (State == ConnectionState.Open)
throw new InvalidOperationException ();
gdaConnection = libgda.gda_client_open_connection (libgda.GdaClient, connectionString, "", "");
gdaConnection = libgda.gda_client_open_connection (libgda.GdaClient,
connectionString,
"", "");
}
[MonoTODO]
@@ -194,28 +211,6 @@ namespace System.Data.OleDb
throw new NotImplementedException ();
}
#endregion
#region Internal Methods
// Used to prevent OleDbConnection
// from doing anything while
// OleDbDataReader is open.
// Open the Reader. (called from OleDbCommand)
internal void OpenReader(OleDbDataReader reader)
{
if(dataReaderOpen == true) {
// TODO: throw exception here?
// because a reader
// is already open
}
else {
dataReader = reader;
dataReaderOpen = true;
}
}
#endregion
#region Events and Delegates
@@ -61,22 +61,22 @@ namespace System.Data.OleDb
#region Properties
public new OleDbCommand DeleteCommand {
public OleDbCommand DeleteCommand {
get { return deleteCommand; }
set { deleteCommand = value; }
}
public new OleDbCommand InsertCommand {
public OleDbCommand InsertCommand {
get { return insertCommand; }
set { insertCommand = value; }
}
public new OleDbCommand SelectCommand {
public OleDbCommand SelectCommand {
get { return selectCommand; }
set { selectCommand = value; }
}
public new OleDbCommand UpdateCommand {
public OleDbCommand UpdateCommand {
get { return updateCommand; }
set { updateCommand = value; }
}
@@ -20,18 +20,26 @@ namespace System.Data.OleDb
{
#region Fields
OleDbCommand command;
bool open;
private OleDbCommand command;
private bool open;
private ArrayList gdaResults;
private int currentResult;
private int currentRow;
#endregion
#region Constructors
internal OleDbDataReader (OleDbCommand command)
internal OleDbDataReader (OleDbCommand command, ArrayList results)
{
this.command = command;
open = true;
command.OpenReader(this);
if (results != null)
gdaResults = results;
else
gdaResults = new ArrayList ();
currentResult = -1;
currentRow = -1;
}
#endregion
@@ -40,32 +48,67 @@ namespace System.Data.OleDb
public int Depth {
[MonoTODO]
get { throw new NotImplementedException (); }
get {
throw new NotImplementedException ();
}
}
public int FieldCount {
[MonoTODO]
get { throw new NotImplementedException (); }
get {
if (currentResult < 0 ||
currentResult >= gdaResults.Count)
return 0;
return libgda.gda_data_model_get_n_columns (
(IntPtr) gdaResults[currentResult]);
}
}
public bool IsClosed {
[MonoTODO]
get { throw new NotImplementedException (); }
get {
return !open;
}
}
public object this[string name] {
[MonoTODO]
get { throw new NotImplementedException (); }
get {
throw new NotImplementedException ();
}
}
public object this[int index] {
[MonoTODO]
get { throw new NotImplementedException (); }
get {
if (currentResult < 0 ||
currentResult >= gdaResults.Count)
return null;
return libgda.gda_data_model_get_value_at (
(IntPtr) gdaResults[currentResult],
index,
currentRow);
}
}
public int RecordsAffected {
[MonoTODO]
get { throw new NotImplementedException (); }
get {
int total_rows;
if (currentResult < 0 ||
currentResult >= gdaResults.Count)
return 0;
total_rows = libgda.gda_data_model_get_n_rows (
(IntPtr) gdaResults[currentResult]);
if (total_rows > 0) {
if (FieldCount > 0) {
// It's a SELECT statement
return -1;
}
}
return FieldCount > 0 ? -1 : total_rows;
}
}
#endregion
@@ -84,16 +127,38 @@ namespace System.Data.OleDb
throw new NotImplementedException ();
}
[MonoTODO]
public bool GetBoolean (int ordinal)
{
throw new NotImplementedException ();
IntPtr value;
if (currentResult == -1)
throw new InvalidCastException ();
value = libgda.gda_data_model_get_value_at ((IntPtr) gdaResults[currentResult],
ordinal, currentRow);
if (value == IntPtr.Zero)
throw new InvalidCastException ();
if (libgda.gda_value_get_vtype (value) != GdaValueType.Boolean)
throw new InvalidCastException ();
return libgda.gda_value_get_boolean (value);
}
[MonoTODO]
public byte GetByte (int ordinal)
{
throw new NotImplementedException ();
IntPtr value;
if (currentResult == -1)
throw new InvalidCastException ();
value = libgda.gda_data_model_get_value_at ((IntPtr) gdaResults[currentResult],
ordinal, currentRow);
if (value == IntPtr.Zero)
throw new InvalidCastException ();
if (libgda.gda_value_get_vtype (value) != GdaValueType.Tinyint)
throw new InvalidCastException ();
return libgda.gda_value_get_tinyint (value);
}
[MonoTODO]
@@ -101,11 +166,22 @@ namespace System.Data.OleDb
{
throw new NotImplementedException ();
}
[MonoTODO]
public char GetChar (int ordinal)
{
throw new NotImplementedException ();
IntPtr value;
if (currentResult == -1)
throw new InvalidCastException ();
value = libgda.gda_data_model_get_value_at ((IntPtr) gdaResults[currentResult],
ordinal, currentRow);
if (value == IntPtr.Zero)
throw new InvalidCastException ();
if (libgda.gda_value_get_vtype (value) != GdaValueType.Tinyint)
throw new InvalidCastException ();
return (char) libgda.gda_value_get_tinyint (value);
}
[MonoTODO]
@@ -120,10 +196,19 @@ namespace System.Data.OleDb
throw new NotImplementedException ();
}
[MonoTODO]
public string GetDataTypeName (int index)
{
throw new NotImplementedException ();
IntPtr value;
if (currentResult == -1)
return "unknown";
value = libgda.gda_data_model_get_value_at ((IntPtr) gdaResults[currentResult],
index, currentRow);
if (value == IntPtr.Zero)
return "unknown";
return libgda.gda_type_to_string (libgda.gda_value_get_vtype (value));
}
[MonoTODO]
@@ -210,10 +295,23 @@ namespace System.Data.OleDb
throw new NotImplementedException ();
}
[MonoTODO]
public object GetValue (int ordinal)
{
throw new NotImplementedException ();
IntPtr value;
GdaValueType type;
if (currentResult == -1)
throw new IndexOutOfRangeException ();
value = libgda.gda_data_model_get_value_at ((IntPtr) gdaResults[currentResult],
ordinal, currentRow);
if (value == IntPtr.Zero)
throw new IndexOutOfRangeException ();
type = libgda.gda_value_get_vtype (value);
// FIXME: return correct type
return (object) libgda.gda_value_stringify (value);
}
[MonoTODO]
@@ -246,16 +344,29 @@ namespace System.Data.OleDb
throw new NotImplementedException ();
}
[MonoTODO]
public bool NextResult ()
{
throw new NotImplementedException ();
int i = currentResult + 1;
if (i >= 0 && i < gdaResults.Count) {
currentResult++;
return true;
}
return false;
}
[MonoTODO]
public bool Read ()
{
throw new NotImplementedException ();
if (currentResult < 0 ||
currentResult >= gdaResults.Count)
return false;
currentRow++;
if (currentRow <
libgda.gda_data_model_get_n_rows ((IntPtr) gdaResults[currentResult]))
return true;
return false;
}
#endregion
@@ -67,16 +67,28 @@ namespace System.Data.OleDb
set { list[index] = value; }
}
object IDataParameterCollection.this[string name] {
object IDataParameterCollection.this[string name]
{
[MonoTODO]
get { throw new NotImplementedException (); }
get {
throw new NotImplementedException ();
}
[MonoTODO]
set { throw new NotImplementedException (); }
set {
throw new NotImplementedException ();
}
}
internal IntPtr GdaParameterList {
[MonoTODO]
get { throw new NotImplementedException (); }
get {
IntPtr param_list;
param_list = libgda.gda_parameter_list_new ();
// FIXME: add parameters to list
return param_list;
}
}
#endregion // Properties
@@ -61,13 +61,13 @@ namespace System.Data.OleDb
get { return connection; }
}
public IsolationLevel IsolationLevel {
get { return isolationLevel; }
}
IDbConnection IDbTransaction.Connection {
get { return connection; }
}
public IsolationLevel IsolationLevel {
get { return isolationLevel; }
}
#endregion // Properties
@@ -10,11 +10,54 @@ namespace System.Data.OleDb.Test
private TestOleDb ()
{
m_cnc = new OleDbConnection ("PostgreSQL");
m_cnc.Open ();
}
void DisplayRow (IDataReader reader)
{
for (int i = 0; i < reader.FieldCount; i++) {
Console.WriteLine (" " + reader.GetDataTypeName (i) + ": " +
reader.GetValue (i).ToString ());
}
}
void TestDataReader ()
{
int i = 0;
string sql = "SELECT * FROM pg_tables";
Console.WriteLine ("Executing command...");
OleDbCommand cmd = new OleDbCommand (sql, m_cnc);
IDataReader reader = cmd.ExecuteReader ();
Console.WriteLine (" Recordset description:");
for (i = 0; i < reader.FieldCount; i++) {
Console.WriteLine (" Field " + i + ": " + reader.GetDataTypeName (i));
}
Console.WriteLine ("Reading data...");
i = 0;
while (reader.Read ()) {
Console.WriteLine ("Row " + i + ":");
DisplayRow (reader);
i++;
}
}
void Close ()
{
m_cnc.Close ();
}
static void Main (string[] args)
{
TestOleDb test = new TestOleDb ();
try {
TestOleDb test = new TestOleDb ();
test.TestDataReader ();
test.Close ();
} catch (Exception e) {
Console.WriteLine ("An error has occured: {0}", e.ToString ());
}
}
}
}
@@ -29,29 +29,83 @@ namespace System.Data.OleDb
Schema = 4,
Invalid = 5
};
internal enum GdaValueType {
Null = 0,
Bigint = 1,
Binary = 2,
Boolean = 3,
Date = 4,
Double = 5,
GeometricPoint = 6,
Integer = 7,
List = 8,
Numeric = 9,
Single = 10,
Smallint = 11,
String = 12,
Time = 13,
Timestamp = 14,
Tinyint = 15,
Type = 16,
Unknown = 17
};
[StructLayout(LayoutKind.Sequential)]
internal class GdaList
{
public IntPtr data;
public IntPtr next;
public IntPtr prev;
}
sealed internal class libgda
{
private static IntPtr m_gdaClient = IntPtr.Zero;
static libgda ()
{
gda_init ("System.Data.OleDb", "0.1", 0, null);
}
private static IntPtr gdaClient = IntPtr.Zero;
public static IntPtr GdaClient
{
get {
if (m_gdaClient == IntPtr.Zero)
m_gdaClient = gda_client_new ();
if (gdaClient == IntPtr.Zero)
gdaClient = gda_client_new ();
return m_gdaClient;
return gdaClient;
}
}
[DllImport("gda-2")]
public static extern void gda_init (string app_id, string version, int nargs, string[] args);
[DllImport("gda-2")]
public static extern GdaValueType gda_value_get_vtype (IntPtr value);
[DllImport("gda-2")]
public static extern bool gda_value_get_boolean (IntPtr value);
[DllImport("gda-2")]
public static extern int gda_value_get_smallint (IntPtr value);
[DllImport("gda-2")]
public static extern byte gda_value_get_tinyint (IntPtr value);
[DllImport("gda-2")]
public static extern string gda_value_stringify (IntPtr value);
[DllImport("gda-2")]
public static extern IntPtr gda_parameter_list_new ();
[DllImport("gda-2")]
public static extern string gda_type_to_string (GdaValueType type);
[DllImport("gda-2")]
public static extern int gda_data_model_get_n_rows (IntPtr model);
[DllImport("gda-2")]
public static extern int gda_data_model_get_n_columns (IntPtr model);
[DllImport("gda-2")]
public static extern IntPtr gda_data_model_get_value_at (IntPtr model, int col, int row);
[DllImport("gda-2")]
public static extern IntPtr gda_client_new ();
@@ -100,6 +154,9 @@ namespace System.Data.OleDb
[DllImport("gda-2")]
public static extern bool gda_connection_rollback_transaction (IntPtr cnc, IntPtr xaction);
[DllImport("gda-2")]
public static extern IntPtr gda_connection_execute_command (IntPtr cnc, IntPtr cmd, IntPtr parameterList);
[DllImport("gda-2")]
public static extern int gda_connection_execute_non_query (IntPtr cnc, IntPtr command, IntPtr parameterList);
@@ -107,6 +164,12 @@ namespace System.Data.OleDb
public static extern IntPtr gda_connection_execute_single_command (IntPtr cnc, IntPtr command, IntPtr parameterList);
[DllImport("gda-2")]
public static extern IntPtr gda_command_new (string text, int type, int options);
public static extern IntPtr gda_command_new (string text, GdaCommandType type, GdaCommandOptions options);
[DllImport("gda-2")]
public static extern void gda_command_set_text (IntPtr cmd, string text);
[DllImport("gda-2")]
public static extern void gda_command_set_command_type (IntPtr cmd, GdaCommandType type);
}
}
@@ -65,24 +65,40 @@ namespace System.Data.SqlClient
#region Properties
public new SqlCommand DeleteCommand {
get { return deleteCommand; }
set { deleteCommand = value; }
public SqlCommand DeleteCommand {
get {
return deleteCommand;
}
set {
deleteCommand = value;
}
}
public new SqlCommand InsertCommand {
get { return insertCommand; }
set { insertCommand = value; }
public SqlCommand InsertCommand {
get {
return insertCommand;
}
set {
insertCommand = value;
}
}
public new SqlCommand SelectCommand {
get { return selectCommand; }
set { selectCommand = value; }
public SqlCommand SelectCommand {
get {
return selectCommand;
}
set {
selectCommand = value;
}
}
public new SqlCommand UpdateCommand {
get { return updateCommand; }
set { updateCommand = value; }
public SqlCommand UpdateCommand {
get {
return updateCommand;
}
set {
updateCommand = value;
}
}
IDbCommand IDbDataAdapter.DeleteCommand {
@@ -11,17 +11,17 @@
namespace System.Data.SqlTypes
{
/// <summary>
/// compare option values for SqlString
/// Specifies the compare option values for a SqlString structure.
/// </summary>
[Flags]
[Serializable]
public enum SqlCompareOptions {
BinarySort,
IgnoreCase,
IgnoreKanaType,
IgnoreNonSpace,
IgnoreWidth,
None
BinarySort = 0x8000,
IgnoreCase = 0x1,
IgnoreKanaType = 0x8,
IgnoreNonSpace = 0x2,
IgnoreWidth = 0x10,
None = 0
}
}
+71 -20
View File
@@ -2,7 +2,9 @@
// System.Data.Constraint.cs
//
// Author:
// Daniel Morgan
// Franklin Wise <[email protected]>
// Daniel Morgan
//
//
// (C) Ximian, Inc. 2002
//
@@ -16,32 +18,49 @@ using System.Runtime.Serialization;
namespace System.Data
{
[Serializable]
public abstract class Constraint {
internal delegate void DelegateConstraintNameChange(object sender,
string newName);
[Serializable]
public abstract class Constraint
{
internal event DelegateConstraintNameChange
BeforeConstraintNameChange;
protected string name = null;
protected PropertyCollection properties = null;
//if constraintName is not set then a name is
//created when it is added to
//the ConstraintCollection
//it can not be set to null, empty or duplicate
//once it has been added to the collection
private string _constraintName = null;
private PropertyCollection _properties = null;
[MonoTODO]
protected Constraint() {
properties = new PropertyCollection();
//Used for membership checking
private ConstraintCollection _constraintCollection;
protected Constraint()
{
_properties = new PropertyCollection();
}
public virtual string ConstraintName {
[MonoTODO]
get{
return name;
return "" + _constraintName;
}
[MonoTODO]
set{
name = value;
//This should only throw an exception when it
//is a member of a ConstraintCollection which
//means we should let the ConstraintCollection
//handle exceptions when this value changes
_onConstraintNameChange(value);
_constraintName = value;
}
}
public PropertyCollection ExtendedProperties {
[MonoTODO]
get {
return properties;
return _properties;
}
}
@@ -49,14 +68,46 @@ namespace System.Data
get;
}
[MonoTODO]
public override string ToString() {
return name;
/// <summary>
/// Gets the ConstraintName, if there is one, as a string.
/// </summary>
public override string ToString()
{
return "" + _constraintName;
}
//[MonoTODO]
//[ClassInterface(ClassInterfaceType.AutoDual)]
//~Constraint() {
//}
internal ConstraintCollection ConstraintCollection {
get{
return _constraintCollection;
}
set{
_constraintCollection = value;
}
}
private void _onConstraintNameChange(string newName)
{
if (null != BeforeConstraintNameChange)
{
BeforeConstraintNameChange(this, newName);
}
}
//call once before adding a constraint to a collection
//will throw an exception to prevent the add if a rule is broken
internal protected abstract void AddToConstraintCollectionSetup(
ConstraintCollection collection);
//call once before removing a constraint to a collection
//can throw an exception to prevent the removal
internal protected abstract void RemoveFromConstraintCollectionCleanup(
ConstraintCollection collection);
//Call to Validate the constraint
//Will throw if constraint is violated
internal abstract void AssertConstraint();
}
}
@@ -2,9 +2,11 @@
// System.Data.ConstraintCollection.cs
//
// Author:
// Franklin Wise <[email protected]>
// Daniel Morgan
//
//
// (C) Ximian, Inc. 2002
// (C) 2002 Franklin Wise
// (C) 2002 Daniel Morgan
//
@@ -14,63 +16,175 @@ using System.ComponentModel;
namespace System.Data
{
[Serializable]
internal delegate void DelegateValidateRemoveConstraint(ConstraintCollection sender,
Constraint constraintToRemove, ref bool fail,ref string failReason);
/// <summary>
/// hold collection of constraints for data table
/// </summary>
public class ConstraintCollection : InternalDataCollectionBase {
[Serializable]
public class ConstraintCollection : InternalDataCollectionBase
{
private bool beginInit = false;
public event CollectionChangeEventHandler CollectionChanged;
internal event DelegateValidateRemoveConstraint ValidateRemoveConstraint;
//Don't allow public instantiation
//Will be instantianted from DataTable
internal ConstraintCollection(){}
public virtual Constraint this[string name] {
[MonoTODO]
get {
throw new NotImplementedException ();
//If the name is not found we just return null
int index = IndexOf(name); //case insensitive
if (-1 == index) return null;
return this[index];
}
}
public virtual Constraint this[int index] {
[MonoTODO]
get {
throw new NotImplementedException ();
if (index < 0 || index >= List.Count)
throw new IndexOutOfRangeException();
return (Constraint)List[index];
}
}
private void _handleBeforeConstraintNameChange(object sender, string newName)
{
//null or empty
if (newName == null || newName == "")
throw new ArgumentException("ConstraintName cannot be set to null or empty " +
" after it has been added to a ConstraintCollection.");
if (_isDuplicateConstraintName(newName,(Constraint)sender))
throw new DuplicateNameException("Constraint name already exists.");
}
private bool _isDuplicateConstraintName(string constraintName, Constraint excludeFromComparison)
{
string cmpr = constraintName.ToUpper();
foreach (Constraint cst in List)
{
//Case insensitive comparision
if ( cmpr.CompareTo(cst.ConstraintName.ToUpper()) == 0 &&
cst != excludeFromComparison)
{
return true;
}
}
return false;
}
//finds an open name slot of ConstraintXX
//where XX is a number
private string _createNewConstraintName()
{
bool loopAgain = false;
int index = 1;
do
{
loopAgain = false;
foreach (Constraint cst in List)
{
//Case insensitive
if (cst.ConstraintName.ToUpper().CompareTo("CONSTRAINT" +
index.ToString()) == 0 )
{
loopAgain = true;
index++;
}
}
} while (loopAgain);
return "Constraint" + index.ToString();
}
// Overloaded Add method (5 of them)
// to add Constraint object to the collection
[MonoTODO]
public void Add(Constraint constraint) {
public void Add(Constraint constraint)
{
//not null
if (null == constraint) throw new ArgumentNullException("Can not add null.");
throw new NotImplementedException ();
//check constraint membership
//can't already exist in this collection or any other
if (this == constraint.ConstraintCollection)
throw new ArgumentException("Constraint already belongs to this collection.");
if (null != constraint.ConstraintCollection)
throw new ArgumentException("Constraint already belongs to another collection.");
//check for duplicate name
if (_isDuplicateConstraintName(constraint.ConstraintName,null) )
throw new DuplicateNameException("Constraint name already exists.");
//Allow constraint to run validation rules and setup
constraint.AddToConstraintCollectionSetup(this); //may throw if it can't setup
//Run Constraint to check existing data in table
constraint.AssertConstraint();
//if name is null or empty give it a name
if (constraint.ConstraintName == null ||
constraint.ConstraintName == "" )
{
constraint.ConstraintName = _createNewConstraintName();
}
//Add event handler for ConstraintName change
constraint.BeforeConstraintNameChange += new DelegateConstraintNameChange(
_handleBeforeConstraintNameChange);
constraint.ConstraintCollection = this;
List.Add(constraint);
OnCollectionChanged( new CollectionChangeEventArgs( CollectionChangeAction.Add, this) );
}
[MonoTODO]
public virtual Constraint Add(string name,
DataColumn column, bool primaryKey) {
throw new NotImplementedException ();
public virtual Constraint Add(string name, DataColumn column, bool primaryKey)
{
UniqueConstraint uc = new UniqueConstraint(name, column, primaryKey);
Add(uc);
return uc;
}
[MonoTODO]
public virtual Constraint Add(string name,
DataColumn primaryKeyColumn,
DataColumn foreignKeyColumn) {
public virtual Constraint Add(string name, DataColumn primaryKeyColumn,
DataColumn foreignKeyColumn)
{
ForeignKeyConstraint fc = new ForeignKeyConstraint(name, primaryKeyColumn,
foreignKeyColumn);
Add(fc);
throw new NotImplementedException ();
return fc;
}
[MonoTODO]
public virtual Constraint Add(string name,
DataColumn[] columns, bool primaryKey) {
public virtual Constraint Add(string name, DataColumn[] columns, bool primaryKey)
{
UniqueConstraint uc = new UniqueConstraint(name, columns, primaryKey);
Add(uc);
throw new NotImplementedException ();
return uc;
}
[MonoTODO]
public virtual Constraint Add(string name,
DataColumn[] primaryKeyColumns,
DataColumn[] foreignKeyColumns) {
public virtual Constraint Add(string name, DataColumn[] primaryKeyColumns,
DataColumn[] foreignKeyColumns)
{
ForeignKeyConstraint fc = new ForeignKeyConstraint(name, primaryKeyColumns,
foreignKeyColumns);
Add(fc);
throw new NotImplementedException ();
return fc;
}
[MonoTODO]
@@ -79,63 +193,152 @@ namespace System.Data
throw new NotImplementedException ();
}
[MonoTODO]
public bool CanRemove(Constraint constraint) {
public bool CanRemove(Constraint constraint)
{
throw new NotImplementedException ();
}
//Rule A UniqueConstraint can't be removed if there is
//a foreign key relationship to that column
[MonoTODO]
public void Clear() {
//not null
//LAMESPEC: MSFT implementation throws and exception here
//spec says nothing about this
if (null == constraint) throw new ArgumentNullException("Constraint can't be null.");
//LAMESPEC: spec says return false (which makes sense) and throw exception for False case (?).
//TODO: I may want to change how this is done
//maybe put a CanRemove on the Constraint class
//and have the Constraint fire this event
//discover if there is a related ForeignKey
string failReason ="";
return _canRemoveConstraint(constraint, ref failReason);
throw new NotImplementedException ();
}
[MonoTODO]
public bool Contains(string name) {
throw new NotImplementedException ();
public void Clear()
{
//CanRemove? See Lamespec below.
//the Constraints have a reference to us
//and we listen to name change events
//we should remove these before clearing
foreach (Constraint con in List)
{
con.ConstraintCollection = null;
con.BeforeConstraintNameChange -= new DelegateConstraintNameChange(
_handleBeforeConstraintNameChange);
}
//LAMESPEC: MSFT implementation allows this
//even when a ForeignKeyConstraint exist for a UniqueConstraint
//thus violating the CanRemove logic
List.Clear(); //Will violate CanRemove rule
OnCollectionChanged( new CollectionChangeEventArgs(CollectionChangeAction.Refresh, this) );
}
[MonoTODO]
public int IndexOf(Constraint constraint) {
throw new NotImplementedException ();
public bool Contains(string name)
{
return (-1 != IndexOf(name));
}
[MonoTODO]
public virtual int IndexOf(string constraintName) {
throw new NotImplementedException ();
public int IndexOf(Constraint constraint)
{
return List.IndexOf(constraint);
}
public virtual int IndexOf(string constraintName)
{
//LAMESPEC: Spec doesn't say case insensitive
//it should to be consistant with the other
//case insensitive comparisons in this class
int index = 0;
foreach (Constraint con in List)
{
if (constraintName.ToUpper().CompareTo( con.ConstraintName.ToUpper() ) == 0)
{
return index;
}
index++;
}
return -1; //not found
}
[MonoTODO]
public void Remove(Constraint constraint) {
throw new NotImplementedException ();
//LAMESPEC: spec doesn't document the ArgumentException the
//will be thrown if the CanRemove rule is violated
//LAMESPEC: spec says an exception will be thrown
//if the element is not in the collection. The implementation
//doesn't throw an exception. ArrayList.Remove doesn't throw if the
//element doesn't exist
//ALSO the overloaded remove in the spec doesn't say it throws any exceptions
//not null
if (null == constraint) throw new ArgumentNullException();
string failReason = "";
if (! _canRemoveConstraint(constraint, ref failReason) )
{
if (failReason != null || failReason != "")
throw new ArgumentException(failReason);
else
throw new ArgumentException("Can't remove constraint.");
}
constraint.RemoveFromConstraintCollectionCleanup(this);
List.Remove(constraint);
OnCollectionChanged( new CollectionChangeEventArgs(CollectionChangeAction.Remove,this));
}
[MonoTODO]
public void Remove(string name) {
throw new NotImplementedException ();
public void Remove(string name)
{
//if doesn't exist fail quietly
int index = IndexOf(name);
if (-1 == index) return;
Remove(this[index]);
}
[MonoTODO]
public void RemoveAt(int index) {
throw new NotImplementedException ();
public void RemoveAt(int index)
{
if (index < 0 || index + 1 > List.Count)
throw new IndexOutOfRangeException("Index out of range, index = "
+ index.ToString() + ".");
this[index].RemoveFromConstraintCollectionCleanup(this);
List.RemoveAt(index);
OnCollectionChanged( new CollectionChangeEventArgs(CollectionChangeAction.Remove,this));
}
[MonoTODO]
public event CollectionChangeEventHandler CollectionChanged;
protected override ArrayList List {
[MonoTODO]
get{
throw new NotImplementedException ();
return base.List;
}
}
[MonoTODO]
protected virtual void OnCollectionChanged(
CollectionChangeEventArgs ccevent) {
protected virtual void OnCollectionChanged( CollectionChangeEventArgs ccevent)
{
if (null != CollectionChanged)
{
CollectionChanged(this, ccevent);
}
}
throw new NotImplementedException ();
private bool _canRemoveConstraint(Constraint constraint, ref string failReason )
{
bool cancel = false;
string tmp = "";
if (null != ValidateRemoveConstraint)
{
ValidateRemoveConstraint(this, constraint, ref cancel, ref tmp);
}
failReason = tmp;
return !cancel;
}
}
}
@@ -16,11 +16,26 @@ using System.ComponentModel;
namespace System.Data
{
internal delegate void DelegateColumnValueChange(DataColumn column,
DataRow row, object proposedValue);
/// <summary>
/// Summary description for DataColumn.
/// </summary>
public class DataColumn : MarshalByValueComponent
{
#region Events
[MonoTODO]
//used for constraint validation
//if an exception is fired during this event the change should be canceled
internal event DelegateColumnValueChange ValidateColumnValueChange;
//used for FK Constraint Cascading rules
internal event DelegateColumnValueChange ColumnValueChanging;
#endregion //Events
#region Fields
private bool allowDBNull = true;
@@ -39,7 +54,7 @@ namespace System.Data
private int ordinal = -1;
private string prefix = null;
private bool readOnly = false;
private DataTable table = null;
private DataTable _table = null;
private bool unique = false;
#endregion // Fields
@@ -269,11 +284,11 @@ namespace System.Data
readOnly = value;
}
}
public DataTable Table
{
get {
return table;
return _table;
}
}
@@ -324,10 +339,36 @@ namespace System.Data
[MonoTODO]
internal void SetTable(DataTable table) {
this.table = table;
// FIXME: this will get called by DataTable
_table = table;
// FIXME: this will get called by DataTable
// and DataColumnCollection
}
// Returns true if all the same collumns are in columnSet and compareSet
internal static bool AreColumnSetsTheSame(DataColumn[] columnSet, DataColumn[] compareSet)
{
if (null == columnSet && null == compareSet) return true;
if (null == columnSet || null == compareSet) return false;
if (columnSet.Length != compareSet.Length) return false;
foreach (DataColumn col in columnSet)
{
bool matchFound = false;
foreach (DataColumn compare in compareSet)
{
if (col == compare)
{
matchFound = true;
}
}
if (! matchFound) return false;
}
return true;
}
#endregion // Methods
}
@@ -84,6 +84,8 @@ namespace System.Data
{
DataColumn column = new DataColumn("Column" + defaultNameIndex.ToString());
CollectionChangeEventArgs e = new CollectionChangeEventArgs(CollectionChangeAction.Add, this);
column.SetTable(parentTable);
base.List.Add(column);
OnCollectionChanged(e);
defaultNameIndex++;
@@ -103,6 +105,8 @@ namespace System.Data
else
{
CollectionChangeEventArgs e = new CollectionChangeEventArgs(CollectionChangeAction.Add, this);
column.SetTable( parentTable);
base.List.Add(column);
OnCollectionChanged(e);
return;
@@ -132,6 +136,7 @@ namespace System.Data
DataColumn column = new DataColumn(columnName);
CollectionChangeEventArgs e = new CollectionChangeEventArgs(CollectionChangeAction.Add, this);
column.SetTable(parentTable);
base.List.Add(column);
OnCollectionChanged(e);
return column;
@@ -160,6 +165,7 @@ namespace System.Data
{
DataColumn column = new DataColumn(columnName, type);
CollectionChangeEventArgs e = new CollectionChangeEventArgs(CollectionChangeAction.Add, this);
column.SetTable(parentTable);
base.List.Add(column);
OnCollectionChanged(e);
return column;
@@ -189,6 +195,7 @@ namespace System.Data
{
DataColumn column = new DataColumn(columnName, type, expression);
CollectionChangeEventArgs e = new CollectionChangeEventArgs(CollectionChangeAction.Add, this);
column.SetTable(parentTable);
base.List.Add(column);
OnCollectionChanged(e);
return column;
+31 -6
View File
@@ -73,7 +73,9 @@ namespace System.Data
/// Gets or sets the data stored in the column specified by name.
/// </summary>
public object this[string columnName] {
[MonoTODO] //FIXME: will return different values depending on DataRowState
get { return this[columnName, DataRowVersion.Current]; }
[MonoTODO]
set {
DataColumn column = table.Columns[columnName];
if (column == null)
@@ -86,7 +88,10 @@ namespace System.Data
/// Gets or sets the data stored in specified DataColumn
/// </summary>
public object this[DataColumn column] {
get { return this[column, DataRowVersion.Current]; }
[MonoTODO] //FIXME: will return different values depending on DataRowState
get { return this[column, DataRowVersion.Current]; }
[MonoTODO]
set {
bool objIsDBNull = value.Equals(DBNull.Value);
if (column == null)
@@ -116,10 +121,12 @@ namespace System.Data
/// Gets or sets the data stored in column specified by index.
/// </summary>
public object this[int columnIndex] {
[MonoTODO] //FIXME: not always supposed to return current
get { return this[columnIndex, DataRowVersion.Current]; }
[MonoTODO]
set {
DataColumn column = table.Columns[columnIndex];
if (column == null)
DataColumn column = table.Columns[columnIndex]; //FIXME: will throw
if (column == null)
throw new IndexOutOfRangeException ();
this[column] = value;
}
@@ -129,8 +136,9 @@ namespace System.Data
/// Gets the specified version of data stored in the named column.
/// </summary>
public object this[string columnName, DataRowVersion version] {
[MonoTODO]
get {
DataColumn column = table.Columns[columnName];
DataColumn column = table.Columns[columnName]; //FIXME: will throw
if (column == null)
throw new IndexOutOfRangeException ();
return this[column, version];
@@ -175,8 +183,9 @@ namespace System.Data
/// retrieve.
/// </summary>
public object this[int columnIndex, DataRowVersion version] {
[MonoTODO]
get {
DataColumn column = table.Columns[columnIndex];
DataColumn column = table.Columns[columnIndex]; //FIXME: throws
if (column == null)
throw new IndexOutOfRangeException ();
return this[column, version];
@@ -186,6 +195,7 @@ namespace System.Data
/// <summary>
/// Gets or sets all of the values for this row through an array.
/// </summary>
[MonoTODO]
public object[] ItemArray {
get { return current; }
set {
@@ -206,11 +216,15 @@ namespace System.Data
continue;
}
//FIXME: int strings can be converted to ints
if (table.Columns[i].DataType != value[i].GetType())
throw new InvalidCastException ();
}
//FIXME: BeginEdit() not correct
BeginEdit (); // implicitly called
//FIXME: this isn't correct. a shorter array can set the first few values
//and not touch the rest. So not all the values will get replaced
proposed = value;
}
}
@@ -246,6 +260,7 @@ namespace System.Data
/// Commits all the changes made to this row since the last time AcceptChanges was
/// called.
/// </summary>
[MonoTODO]
public void AcceptChanges ()
{
this.EndEdit ();
@@ -259,7 +274,7 @@ namespace System.Data
rowState = DataRowState.Unchanged;
break;
case DataRowState.Deleted:
table.Rows.Remove (this);
table.Rows.Remove (this); //FIXME: this should occur in end edit
break;
}
@@ -269,6 +284,7 @@ namespace System.Data
/// <summary>
/// Begins an edit operation on a DataRow object.
/// </summary>
[MonoTODO]
public void BeginEdit()
{
if (rowState == DataRowState.Deleted)
@@ -279,7 +295,9 @@ namespace System.Data
proposed = new object[table.Columns.Count];
Array.Copy (current, proposed, table.Columns.Count);
}
//TODO: Suspend validation
//FIXME: this doesn't happen on begin edit
if (!HasVersion (DataRowVersion.Original))
{
original = new object[table.Columns.Count];
@@ -290,8 +308,11 @@ namespace System.Data
/// <summary>
/// Cancels the current edit on the row.
/// </summary>
[MonoTODO]
public void CancelEdit ()
{
//FIXME: original doesn't get erased on CancelEdit
//TODO: Events
if (HasVersion (DataRowVersion.Proposed))
{
original = null;
@@ -313,22 +334,26 @@ namespace System.Data
/// <summary>
/// Deletes the DataRow.
/// </summary>
[MonoTODO]
public void Delete ()
{
if (rowState == DataRowState.Deleted)
throw new DeletedRowInaccessibleException ();
//TODO: Events, Constraints
rowState = DataRowState.Deleted;
}
/// <summary>
/// Ends the edit occurring on the row.
/// </summary>
[MonoTODO]
public void EndEdit ()
{
if (HasVersion (DataRowVersion.Proposed))
{
rowState = DataRowState.Modified;
//TODO: Validate Constraints, Events
Array.Copy (proposed, current, table.Columns.Count);
proposed = null;
}
@@ -60,7 +60,7 @@ namespace System.Data
dataSet = null;
// _defaultView = null; // FIXME: temporarily commented
_columnCollection = new DataColumnCollection(this);
//_constraintCollection = new ConstraintCollection(); TODO: uncomment after ConstraintCollection is built.
_constraintCollection = new ConstraintCollection();
_extendedProperties = null;
_tableName = "";
_nameSpace = null;
@@ -2,8 +2,10 @@
// System.Data.ForeignKeyConstraint.cs
//
// Author:
// Franklin Wise <[email protected]>
// Daniel Morgan <[email protected]>
//
// (C) 2002 Franklin Wise
// (C) 2002 Daniel Morgan
//
@@ -15,122 +17,280 @@ using System.Runtime.InteropServices;
namespace System.Data
{
[Serializable]
[Serializable]
public class ForeignKeyConstraint : Constraint {
private UniqueConstraint _parentUniqueConstraint;
private DataColumn [] _parentColumns;
private DataColumn [] _childColumns;
private Rule _deleteRule;
private Rule _updateRule;
private AcceptRejectRule _acceptRejectRule;
#region Constructors
[MonoTODO]
public ForeignKeyConstraint(DataColumn parentColumn,
DataColumn childColumn) {
public ForeignKeyConstraint(DataColumn parentColumn, DataColumn childColumn)
{
if (null == parentColumn || null == childColumn) {
throw new ArgumentNullException("Neither parentColumn or" +
" childColumn can be null.");
}
_foreignKeyConstraint(null, new DataColumn[] {parentColumn},
new DataColumn[] {childColumn});
}
[MonoTODO]
public ForeignKeyConstraint(DataColumn[] parentColumns,
DataColumn[] childColumns) {
public ForeignKeyConstraint(DataColumn[] parentColumns, DataColumn[] childColumns)
{
_foreignKeyConstraint(null, parentColumns, childColumns);
}
[MonoTODO]
public ForeignKeyConstraint(string constraintName,
DataColumn parentColumn, DataColumn childColumn) {
public ForeignKeyConstraint(string constraintName,
DataColumn parentColumn, DataColumn childColumn)
{
if (null == parentColumn || null == childColumn) {
throw new ArgumentNullException("Neither parentColumn or" +
" childColumn can be null.");
}
_foreignKeyConstraint(constraintName, new DataColumn[] {parentColumn},
new DataColumn[] {childColumn});
}
[MonoTODO]
public ForeignKeyConstraint(string constraintName,
DataColumn[] parentColumns,
DataColumn[] childColumns) {
public ForeignKeyConstraint(string constraintName,
DataColumn[] parentColumns, DataColumn[] childColumns)
{
_foreignKeyConstraint(constraintName, parentColumns, childColumns);
}
[MonoTODO]
public ForeignKeyConstraint(string constraintName,
string parentTableName, string[] parentColumnNames,
string[] childColumnNames,
AcceptRejectRule acceptRejectRule, Rule deleteRule,
//special case
[MonoTODO]
public ForeignKeyConstraint(string constraintName,
string parentTableName, string[] parentColumnNames,
string[] childColumnNames,
AcceptRejectRule acceptRejectRule, Rule deleteRule,
Rule updateRule) {
}
private void _foreignKeyConstraint(string constraintName, DataColumn[] parentColumns,
DataColumn[] childColumns)
{
//Validate
_validateCtor(parentColumns, childColumns);
//Set Constraint Name
base.ConstraintName = constraintName;
//Keep reference to columns
_parentColumns = parentColumns;
_childColumns = childColumns;
}
[MonoTODO]
private void _validateCtor(DataColumn[] parentColumns, DataColumn[] childColumns)
{
//not null
if (null == parentColumns || null == childColumns)
throw new ArgumentNullException();
if (parentColumns.Length < 1 || childColumns.Length < 1)
throw new ArgumentException("Neither ParentColumns or ChildColumns can't be" +
" zero length.");
//DataTypes must match
//column sets must all be from the same table
DataTable ptable = parentColumns[0].Table;
DataTable ctable = childColumns[0].Table;
//not null check
//TODO: columns must belong to a table else ArgumentException
foreach (DataColumn pc in parentColumns)
{
foreach (DataColumn cc in childColumns)
{
}
}
//Tables must be from same datasets
if (ptable.DataSet != ctable.DataSet)
{
throw new InvalidOperationException("Tables must belong to the same dataset.");
}
}
#endregion // Constructors
#region Helpers
private void _validateRemoveParentConstraint(ConstraintCollection sender,
Constraint constraint, ref bool cancel, ref string failReason)
{
//if we hold a reference to the parent then cancel it
if (constraint == _parentUniqueConstraint)
{
cancel = true;
failReason = "Cannot remove UniqueConstraint because the"
+ " ForeignKeyConstraint " + this.ConstraintName + " exists.";
}
}
//Checks to see if a related unique constraint exists
//if it doesn't then a unique constraint is created.
//if a unique constraint can't be created an exception will be thrown
private void _ensureUniqueConstraintExists(ConstraintCollection collection,
DataColumn [] parentColumns)
{
//not null
if (null == parentColumns) throw new ArgumentNullException(
"ParentColumns can't be null");
UniqueConstraint uc = null;
//see if unique constraint already exists
//if not create unique constraint
uc = UniqueConstraint.GetUniqueConstraintForColumnSet(collection, parentColumns);
if (null == uc) uc = new UniqueConstraint(parentColumns, false); //could throw
//keep reference
_parentUniqueConstraint = uc;
//if this unique constraint is attempted to be removed before us
//we can fail the validation
collection.ValidateRemoveConstraint += new DelegateValidateRemoveConstraint(
_validateRemoveParentConstraint);
}
#endregion //Helpers
#region Properites
public virtual AcceptRejectRule AcceptRejectRule {
[MonoTODO]
get {
throw new NotImplementedException ();
return _acceptRejectRule;
}
[MonoTODO]
set {
throw new NotImplementedException ();
_acceptRejectRule = value;
}
}
public virtual DataColumn[] Columns {
[MonoTODO]
get {
throw new NotImplementedException ();
}
}
public virtual Rule DeleteRule {
[MonoTODO]
get {
throw new NotImplementedException ();
return _deleteRule;
}
[MonoTODO]
set {
throw new NotImplementedException ();
_deleteRule = value;
}
}
public virtual DataColumn[] RelatedColumns {
[MonoTODO]
get {
throw new NotImplementedException ();
}
}
public virtual DataTable RelatedTable {
[MonoTODO]
get {
throw new NotImplementedException ();
}
}
public override DataTable Table {
[MonoTODO]
get {
throw new NotImplementedException ();
}
}
public virtual Rule UpdateRule {
[MonoTODO]
get {
throw new NotImplementedException ();
return _updateRule;
}
[MonoTODO]
set {
throw new NotImplementedException ();
_updateRule = value;
}
}
public virtual DataColumn[] Columns {
get {
return _childColumns;
}
}
public virtual DataColumn[] RelatedColumns {
get {
return _parentColumns;
}
}
public virtual DataTable RelatedTable {
get {
if (_parentColumns != null)
if (_parentColumns.Length > 0)
return _parentColumns[0].Table;
return null;
}
}
public override DataTable Table {
get {
if (_childColumns != null)
if (_childColumns.Length > 0)
return _childColumns[0].Table;
return null;
}
}
#endregion // Properties
#region Methods
[MonoTODO]
public override bool Equals(object key) {
throw new NotImplementedException ();
public override bool Equals(object key)
{
ForeignKeyConstraint fkc = key as ForeignKeyConstraint;
if (null == fkc) return false;
//if the fk constrains the same columns then they are equal
if (! DataColumn.AreColumnSetsTheSame( this.RelatedColumns, fkc.RelatedColumns))
return false;
if (! DataColumn.AreColumnSetsTheSame( this.Columns, fkc.Columns) )
return false;
return true;
}
[MonoTODO]
[MonoTODO]
public override int GetHashCode() {
throw new NotImplementedException ();
}
protected internal override void AddToConstraintCollectionSetup(
ConstraintCollection collection)
{
//TODO:Should run Ctor rules again
_ensureUniqueConstraintExists(collection, _parentColumns);
}
[MonoTODO]
protected internal override void RemoveFromConstraintCollectionCleanup(
ConstraintCollection collection)
{
return; //no rules yet
}
[MonoTODO]
internal override void AssertConstraint()
{
//Constraint only works if both tables are part of the same dataset
//if DataSet ...
//check for orphaned children
//check for...
}
#endregion // Methods
}
@@ -14,7 +14,7 @@ namespace System.Data
/// <summary>
/// Represents a SQL statement that is executed while connected to a data source, and is implemented by .NET data providers that access relational databases.
/// </summary>
public interface IDbCommand
public interface IDbCommand : IDisposable
{
void Cancel();
@@ -14,7 +14,7 @@ namespace System.Data
/// <summary>
/// Represents an open connection to a data source, and is implemented by .NET data providers that access relational databases.
/// </summary>
public interface IDbConnection
public interface IDbConnection : IDisposable
{
IDbTransaction BeginTransaction();
@@ -2,10 +2,11 @@
// System.Data.UniqueConstraint.cs
//
// Author:
// Franklin Wise <[email protected]>
// Daniel Morgan <[email protected]>
//
//
// (C) 2002 Franklin Wise
// (C) 2002 Daniel Morgan
//
using System;
using System.Collections;
@@ -14,89 +15,220 @@ using System.Runtime.InteropServices;
namespace System.Data
{
public class UniqueConstraint : Constraint {
public class UniqueConstraint : Constraint
{
private bool _isPrimaryKey = false;
private DataTable _dataTable; //set by ctor except when unique case
private DataColumn [] _dataColumns;
//TODO:provide helpers for this case
private string [] _dataColumnNames; //unique case
#region Constructors
[MonoTODO]
public UniqueConstraint(DataColumn column) {
throw new NotImplementedException ();
_uniqueConstraint ("", column, false);
}
[MonoTODO]
public UniqueConstraint(DataColumn[] columns) {
throw new NotImplementedException ();
_uniqueConstraint ("", columns, false);
}
[MonoTODO]
public UniqueConstraint(DataColumn column,
public UniqueConstraint(DataColumn column,
bool isPrimaryKey) {
throw new NotImplementedException ();
_uniqueConstraint ("", column, isPrimaryKey);
}
[MonoTODO]
public UniqueConstraint(DataColumn[] columns, bool isPrimaryKey) {
throw new NotImplementedException ();
_uniqueConstraint ("", columns, isPrimaryKey);
}
[MonoTODO]
public UniqueConstraint(string name, DataColumn column) {
throw new NotImplementedException ();
_uniqueConstraint (name, column, false);
}
[MonoTODO]
public UniqueConstraint(string name, DataColumn[] columns) {
throw new NotImplementedException ();
_uniqueConstraint (name, columns, false);
}
[MonoTODO]
public UniqueConstraint(string name, DataColumn column,
public UniqueConstraint(string name, DataColumn column,
bool isPrimaryKey) {
throw new NotImplementedException ();
_uniqueConstraint (name, column, isPrimaryKey);
}
[MonoTODO]
public UniqueConstraint(string name,
public UniqueConstraint(string name,
DataColumn[] columns, bool isPrimaryKey) {
throw new NotImplementedException ();
_uniqueConstraint (name, columns, isPrimaryKey);
}
//Special case. Can only be added to the Collection with AddRange
[MonoTODO]
public UniqueConstraint(string name,
public UniqueConstraint(string name,
string[] columnNames, bool isPrimaryKey) {
throw new NotImplementedException ();
throw new NotImplementedException(); //need to finish related logic
/*
base.ConstraintName = name;
//set unique
//must set unique when added to the collection
//keep list of names to resolve later
_dataColumnNames = columnNames;
_isPrimaryKey = isPrimaryKey;
*/
}
#endregion // Constructors
//helper ctor
private void _uniqueConstraint(string name,
DataColumn column, bool isPrimaryKey) {
//validate
_validateColumn (column);
//Set Constraint Name
base.ConstraintName = name;
//set unique
column.Unique = true;
//keep reference
_dataColumns = new DataColumn [] {column};
//PK?
_isPrimaryKey = isPrimaryKey;
//Get table reference
_dataTable = column.Table;
}
//helpter ctor
public void _uniqueConstraint(string name,
DataColumn[] columns, bool isPrimaryKey) {
//validate
_validateColumns (columns, out _dataTable);
//Set Constraint Name
base.ConstraintName = name;
//set unique
_setColumnsUnique (columns);
//keep reference
_dataColumns = columns;
//PK?
_isPrimaryKey = isPrimaryKey;
}
#endregion // Constructors
#region Helpers
private void _setColumnsUnique(DataColumn [] columns) {
if (null == columns) return;
foreach (DataColumn col in columns) {
col.Unique = true;
}
}
//Validates a collection of columns with the ctor rules
private void _validateColumns(DataColumn [] columns, out DataTable table) {
table = null;
//not null
if (null == columns) throw new ArgumentNullException();
//check that there is at least one column
//LAMESPEC: not in spec
if (columns.Length < 1)
throw new InvalidConstraintException("Must be at least one column.");
DataTable compareTable = columns[0].Table;
//foreach
foreach (DataColumn col in columns){
//check individual column rules
_validateColumn (col);
//check that columns are all from the same table??
//LAMESPEC: not in spec
if (compareTable != col.Table)
throw new InvalidConstraintException("Columns must be from the same table.");
}
table = compareTable;
}
//validates a column with the ctor rules
private void _validateColumn(DataColumn column) {
//not null
if (null == column) throw new ArgumentNullException();
//column must belong to a table
//LAMESPEC: not in spec
if (null == column.Table)
throw new ArgumentException("Column " + column.ColumnName + " must belong to a table.");
}
internal static UniqueConstraint GetUniqueConstraintForColumnSet(ConstraintCollection collection,
DataColumn[] columns)
{
if (null == columns ) return null;
UniqueConstraint uniqueConstraint;
IEnumerator enumer = collection.GetEnumerator();
while (enumer.MoveNext())
{
uniqueConstraint = enumer.Current as UniqueConstraint;
if (uniqueConstraint != null)
{
if ( DataColumn.AreColumnSetsTheSame(uniqueConstraint.Columns, columns) )
{
return uniqueConstraint;
}
}
}
return null;
}
#endregion //Helpers
#region Properties
public virtual DataColumn[] Columns {
[MonoTODO]
get {
throw new NotImplementedException ();
return _dataColumns;
}
}
public bool IsPrimaryKey {
[MonoTODO]
get {
throw new NotImplementedException ();
return _isPrimaryKey;
}
}
public override DataTable Table {
[MonoTODO]
get {
throw new NotImplementedException ();
return _dataTable;
}
}
@@ -104,16 +236,46 @@ namespace System.Data
#region Methods
[MonoTODO]
public override bool Equals(object key2) {
throw new NotImplementedException ();
UniqueConstraint cst = key2 as UniqueConstraint;
if (null == cst) return false;
//according to spec if the cols are equal
//then two UniqueConstraints are equal
return DataColumn.AreColumnSetsTheSame(cst.Columns, this.Columns);
}
[MonoTODO]
public override int GetHashCode() {
throw new NotImplementedException ();
}
internal protected override void AddToConstraintCollectionSetup(
ConstraintCollection collection)
{
//TODO:Should run Ctor rules again
//make sure a unique constraint doesn't already exists for these columns
UniqueConstraint uc = UniqueConstraint.GetUniqueConstraintForColumnSet(collection, this.Columns);
if (null != uc) throw new ArgumentException("Unique constraint already exists for these" +
" columns.");
}
internal protected override void RemoveFromConstraintCollectionCleanup(
ConstraintCollection collection)
{
}
[MonoTODO]
internal override void AssertConstraint()
{
//Unique?
}
#endregion // Methods
}
}
+52
View File
@@ -1,3 +1,55 @@
2002-08-15 Franklin Wise <[email protected]>
* AllTests.cs: Added ForeignKeyConstraintTest to active running tests.
* NewFile: System.Data\ForeignKeyConstraintTest.cs
* System.Data\ConstraintTest: Added new test.
* System.Data\UniqueConstraintTest: Added more tests.
2002-08-14 Daniel Morgan <[email protected]>
* SqlSharpCli.cs: modified
- implemented the following commands:
\f FILENAME to read a batch of Sql# commands/queries from file.");
\o FILENAME to write out the result of Sql# commands executed to file.");
\load FILENAME to load from file SQL commands into SQL buffer.");
\save FILENAME to save SQL commands from SQL buffer to file.
\print - show what's in the SQL buffer now.
- can save output of result to an html file or text
- entering command "\provider mysql" will dynamically load mysql provider
from its assembly Mono.Data.MySql.dll
2002-08-13 Daniel Morgan <[email protected]>
* Test/SqlSharpCli.cs: modified
- removed dependency on Mono.Data.MySql assembly and classes
(if you still want to use Mono.Data.MySql, use \loadextprovider to load it).
- added use of provider System.Data.OleDb classes; however, you must
have a working libgda.
- added dynamic loading of .NET Data Provider's assembly and Connection class
which can be loaded via \loadextprovider
- renamed providers: postgresclient to postgresql, oracleclient to oracle
- add new command \exenonquery to execute non queries
- add new command \exescalar to execute and return one row/one column of data
- added beginnings of internal variables by adding new commands: \set, \unset, and
\variable
- add new command \r to reset (clear) the query buffer
- if quiting, need to close database connection if still open
2002-08-12 Franklin Wise <[email protected]>
* NewFile: Added test for System.Data.UniqueConstraintTest.cs
* NewFile: Added test for System.Data.ConstraintTest.cs
* NewFile: Added test for System.Data.ConstraintCollection.cs
* Added blank test for DataColumnTest so that NUnit won't warn
of no tests
* Updated System.Data.AllTests.cs to include the new tests
2002-05-27 Tim Coleman <[email protected]>
* TestSqlDataAdapter.cs: remove explicit opening of connection.
This should occur implicitly now.
+573 -115
View File
@@ -14,7 +14,7 @@
// visit http://www.go-mono.com/
//
// To build SqlSharpCli.cs:
// $ mcs SqlSharpCli.cs -r System.Data.dll -r Mono.Data.MySql.dll
// $ mcs SqlSharpCli.cs -r System.Data.dll
//
// To run with mono:
// $ mono SqlSharpCli.exe
@@ -31,27 +31,58 @@
// (C)Copyright 2002 Daniel Morgan
//
using Mono.Data.MySql;
using System;
using System.Collections;
using System.Data;
using System.Data.Common;
using System.Data.OleDb;
using System.Data.SqlClient;
using System.IO;
using System.Reflection;
using System.Runtime.Remoting;
using System.Text;
namespace Mono.Data.SqlSharp {
public enum FileFormat {
Html,
Xml,
CommaSeparatedValues,
TabSeparated,
Normal
}
// SQL Sharp - Command Line Interface
public class SqlSharpCli {
private IDbConnection conn = null;
private string provider = "POSTGRESCLIENT";
private string provider = "POSTGRESQL"; // name of internal provider
// {OleDb,SqlClient,MySql,Odbc,Oracle,PostgreSql} however, it
// can be set to LOADEXTPROVIDER to load an external provider
private string providerAssembly = ""; // filename of assembly
// for example: "Mono.Data.MySql"
private string providerConnectionClass = ""; // Connection class
// in the provider assembly that implements the IDbConnection
// interface. for example: "Mono.Data.MySql.MySqlConnection"
private StringBuilder build = null; // SQL string to build
private string buff = ""; // SQL string buffer
private string connectionString =
"host=localhost;dbname=test;user=postgres";
private string inputFilename = "";
private string outputFilename = "";
private StreamReader inputFilestream = null;
private StreamWriter outputFilestream = null;
private FileFormat outputFileFormat = FileFormat.Html;
private bool silent = false;
private bool showHeader = true;
private Hashtable internalVariables = new Hashtable();
// DisplayResult - used to Read() display a result set
// called by DisplayData()
@@ -74,9 +105,9 @@ namespace Mono.Data.SqlSharp {
line = new StringBuilder();
hdrUnderline = new StringBuilder();
Console.WriteLine("Fields in Query Result: " +
reader.FieldCount);
Console.WriteLine();
OutputLine("Fields in Query Result: " +
reader.FieldCount);
OutputLine("");
for(c = 0; c < schemaTable.Rows.Count; c++) {
@@ -96,7 +127,7 @@ namespace Mono.Data.SqlSharp {
if(dataType.Equals("System.Boolean")) {
columnSize = 5;
}
if(provider.Equals("POSTGRESCLIENT"))
if(provider.Equals("POSTGRESQL"))
if(dataTypeName.Equals("text"))
columnSize = 32; // text will be truncated to 32
@@ -108,11 +139,11 @@ namespace Mono.Data.SqlSharp {
line.Append(" ");
hdrUnderline.Append(" ");
}
Console.WriteLine(line.ToString());
OutputHeader(line.ToString());
line = null;
Console.WriteLine(hdrUnderline);
Console.WriteLine();
OutputHeader(hdrUnderline.ToString());
OutputHeader("");
hdrUnderline = null;
// DEBUG - need to know the columnSize
@@ -152,7 +183,7 @@ namespace Mono.Data.SqlSharp {
if(dataType.Equals("System.Boolean")) {
columnSize = 5;
}
if(provider.Equals("POSTGRESCLIENT"))
if(provider.Equals("POSTGRESQL"))
if(dataTypeName.Equals("text"))
columnSize = 32; // text will be truncated to 32
@@ -182,12 +213,68 @@ namespace Mono.Data.SqlSharp {
}
}
Console.WriteLine(line.ToString());
OutputData(line.ToString());
line = null;
}
Console.WriteLine("\nRows retrieved: " + rows);
OutputLine("\nRows retrieved: " + rows.ToString());
}
public void OutputDataToHtmlFile(IDataReader rdr, DataTable dt) {
StringBuilder strHtml = new StringBuilder();
strHtml.Append("<html> \n <head> <title>");
strHtml.Append("Results");
strHtml.Append("</title> </head>");
strHtml.Append("<body>");
strHtml.Append("<h1> Results </h1>");
strHtml.Append("<table border=1>");
outputFilestream.WriteLine(strHtml.ToString());
strHtml = null;
strHtml = new StringBuilder();
strHtml.Append("<tr>");
foreach (DataRow schemaRow in dt.Rows) {
strHtml.Append("<td> <b>");
object dataObj = schemaRow["ColumnName"];
string sColumnName = dataObj.ToString();
strHtml.Append(sColumnName);
strHtml.Append("</b> </td>");
}
strHtml.Append("</tr>");
outputFilestream.WriteLine(strHtml.ToString());
strHtml = null;
int col = 0;
string dataValue = "";
while(rdr.Read()) {
strHtml = new StringBuilder();
strHtml.Append("<tr>");
for(col = 0; col < rdr.FieldCount; col++) {
// column data
if(rdr.IsDBNull(col) == true)
dataValue = "NULL";
else {
object obj = rdr.GetValue(col);
dataValue = obj.ToString();
}
strHtml.Append("<td>");
strHtml.Append(dataValue);
strHtml.Append("</td>");
}
strHtml.Append("\t\t</tr>");
outputFilestream.WriteLine(strHtml.ToString());
strHtml = null;
}
outputFilestream.WriteLine(" </table> </body> \n </html>");
strHtml = null;
}
// DisplayData - used to display any Result Sets
// from execution of SQL SELECT Query or Queries
// called by DisplayData.
@@ -199,14 +286,14 @@ namespace Mono.Data.SqlSharp {
DataTable schemaTable = null;
int ResultSet = 0;
Console.WriteLine("Display any result sets...");
OutputLine("Display any result sets...");
do {
// by Default, SqlDataReader has the
// first Result set if any
ResultSet++;
Console.WriteLine("Display the result set " + ResultSet);
OutputLine("Display the result set " + ResultSet);
schemaTable = reader.GetSchemaTable();
@@ -223,13 +310,32 @@ namespace Mono.Data.SqlSharp {
else {
// SQL Query (SELECT)
// RecordsAffected -1 and DataTable has a reference
DisplayResult(reader, schemaTable);
OutputQueryResult(reader, schemaTable);
}
// get next result set (if anymore is left)
// get next result set (if anymore is left)
} while(reader.NextResult());
}
public void OutputQueryResult(IDataReader dreader, DataTable dtable) {
if(outputFilestream == null) {
DisplayResult(dreader, dtable);
}
else {
switch(outputFileFormat) {
case FileFormat.Normal:
DisplayResult(dreader, dtable);
break;
case FileFormat.Html:
OutputDataToHtmlFile(dreader, dtable);
break;
default:
Console.WriteLine("Error: Output data file format not supported.");
break;
}
}
}
// ExecuteSql - Execute the SQL Command(s) and/or Query(ies)
public void ExecuteSql(string sql) {
@@ -238,21 +344,7 @@ namespace Mono.Data.SqlSharp {
IDbCommand cmd = null;
IDataReader reader = null;
// create a Command object based on the provider
switch(provider) {
//case "OLEDB":
// cmd = new OleDbCommand();
// break;
case "MYSQL":
cmd = new MySqlCommand();
break;
case "POSTGRESCLIENT":
cmd = new SqlCommand();
break;
default:
Console.WriteLine("Error: PostgreSQL is only supported, and it through SqlClient.");
return;
}
cmd = conn.CreateCommand();
// set command properties
cmd.CommandType = CommandType.Text;
@@ -263,20 +355,79 @@ namespace Mono.Data.SqlSharp {
reader = cmd.ExecuteReader();
DisplayData(reader);
reader.Close();
//reader = null;
//cmd.Dispose();
//cmd = null;
reader = null;
}
catch(Exception e) {
Console.WriteLine("Exception Caught Executing SQL: " + e);
//if(reader != null) {
// if(reader.IsClosed == false)
// reader.Close();
// reader = null;
reader = null;
//}
// cmd.Dispose();
//cmd = null;
}
finally {
// cmd.Dispose();
cmd = null;
}
}
// ExecuteSql - Execute the SQL Commands (no SELECTs)
public void ExecuteSqlNonQuery(string sql) {
Console.WriteLine("Execute SQL Non Query: " + sql);
IDbCommand cmd = null;
int rowsAffected = -1;
cmd = conn.CreateCommand();
// set command properties
cmd.CommandType = CommandType.Text;
cmd.CommandText = sql;
cmd.Connection = conn;
try {
rowsAffected = cmd.ExecuteNonQuery();
cmd = null;
Console.WriteLine("Rows affected: " + rowsAffected);
}
catch(Exception e) {
Console.WriteLine("Exception Caught Executing SQL: " + e);
}
finally {
// cmd.Dispose();
cmd = null;
}
}
public void ExecuteSqlScalar(string sql) {
Console.WriteLine("Execute SQL Non Query: " + sql);
IDbCommand cmd = null;
string retrievedValue = "";
cmd = conn.CreateCommand();
// set command properties
cmd.CommandType = CommandType.Text;
cmd.CommandText = sql;
cmd.Connection = conn;
try {
retrievedValue = (string) cmd.ExecuteScalar().ToString();
Console.WriteLine("Retrieved value: " + retrievedValue);
}
catch(Exception e) {
Console.WriteLine("Exception Caught Executing SQL: " + e);
}
finally {
// cmd.Dispose();
cmd = null;
}
}
public void ExecuteSqlXml(string sql) {
Console.WriteLine("Error: Not implemented yet.");
}
// like ShowHelp - but only show at the beginning
@@ -287,7 +438,7 @@ namespace Mono.Data.SqlSharp {
Console.WriteLine(@" \ConnectionString to set the ConnectionString");
Console.WriteLine(@" \Provider to set the Provider:");
Console.WriteLine(@" {OleDb,SqlClient,MySql,Odbc,");
Console.WriteLine(@" OracleClient,PostgresClient}");
Console.WriteLine(@" Oracle,PostgreSql)");
Console.WriteLine(@" \Open to open the connection");
Console.WriteLine(@" \Close to close the connection");
Console.WriteLine(@" \Execute to execute SQL command(s)/queries(s)");
@@ -303,15 +454,30 @@ namespace Mono.Data.SqlSharp {
Console.WriteLine(@" \ConnectionString to set the ConnectionString");
Console.WriteLine(@" \Provider to set the Provider:");
Console.WriteLine(@" {OleDb,SqlClient,MySql,Odbc,");
Console.WriteLine(@" OracleClient,PostgresClient}");
Console.WriteLine(@" Oracle,PostgreSql}");
Console.WriteLine(@" \Open to open the connection");
Console.WriteLine(@" \Close to close the connection");
Console.WriteLine(@" \Execute to execute SQL command(s)/queries(s)");
Console.WriteLine(@" \f FILENAME to read a batch of commands from");
Console.WriteLine(@" \o FILENAME to read a batch of commands from");
Console.WriteLine(@" \exenonquery execute an SQL non query (not a SELECT).");
Console.WriteLine(@" \exescalar execute SQL to get a single row/single column result.");
Console.WriteLine(@" \f FILENAME to read a batch of Sql# commands/queries from.");
Console.WriteLine(@" \o FILENAME to write out the result of commands executed.");
Console.WriteLine(@" \load FILENAME to load from file SQL commands into SQL buffer.");
Console.WriteLine(@" \save FILENAME to save SQL commands from SQL buffer to file.");
Console.WriteLine(@" \h to show this help.");
Console.WriteLine(@" \defaults to show default variables.");
Console.WriteLine(@" \defaults to show default variables, such as,");
Console.WriteLine(@" Provider and ConnectionString.");
Console.WriteLine(@" \s {TRUE, FALSE} to silent messages.");
Console.WriteLine(@" \r reset (clear) the query buffer.");
Console.WriteLine(@" \set NAME VALUE - set an internal variable.");
Console.WriteLine(@" \unset NAME - remove an internal variable.");
Console.WriteLine(@" \variable NAME - display the value of an internal variable.");
Console.WriteLine(@" \loadprovider CLASS - load the provider");
Console.WriteLine(@" use the complete name of its connection class.");
Console.WriteLine(@" \loadextprovider ASSEMBLY CLASS - load the provider");
Console.WriteLine(@" use the complete name of its assembly and");
Console.WriteLine(@" its Connection class.");
Console.WriteLine(@" \print - show what's in the SQL buffer now.");
Console.WriteLine();
}
@@ -319,6 +485,12 @@ namespace Mono.Data.SqlSharp {
public void ShowDefaults() {
Console.WriteLine();
Console.WriteLine("The default Provider is " + provider);
if(provider.Equals("LOADEXTPROVIDER")) {
Console.WriteLine(" Assembly: " +
providerAssembly);
Console.WriteLine(" Connection Class: " +
providerConnectionClass);
}
Console.WriteLine();
Console.WriteLine("The default ConnectionString is: ");
Console.WriteLine(" \"" + connectionString + "\"");
@@ -330,19 +502,26 @@ namespace Mono.Data.SqlSharp {
Console.WriteLine("Attempt to Open...");
switch(provider) {
//case "OLEDB":
// conn = new OleDbConnection();
// break;
case "MYSQL":
conn = new MySqlConnection();
break;
case "POSTGRESCLIENT":
conn = new SqlConnection();
break;
default:
Console.WriteLine("Error: Bad argument or provider not supported.");
break;
try {
switch(provider) {
case "OLEDB":
conn = new OleDbConnection();
break;
case "POSTGRESQL":
conn = new SqlConnection();
break;
case "LOADEXTPROVIDER":
if(LoadExternalProvider() == false)
return;
break;
default:
Console.WriteLine("Error: Bad argument or provider not supported.");
return;
}
}
catch(Exception e) {
Console.WriteLine("Error: Unable to create Connection object. " + e);
return;
}
conn.ConnectionString = connectionString;
@@ -350,7 +529,7 @@ namespace Mono.Data.SqlSharp {
try {
conn.Open();
if(conn.State == ConnectionState.Open)
Console.WriteLine("Open was successfully.");
Console.WriteLine("Open was successfull.");
}
catch(Exception e) {
Console.WriteLine("Exception Caught Opening. " + e);
@@ -360,16 +539,18 @@ namespace Mono.Data.SqlSharp {
// CloseDataSource - close the connection to the data source
public void CloseDataSource() {
Console.WriteLine("Attempt to Close...");
try {
conn.Close();
Console.WriteLine("Close was successfull.");
if(conn != null) {
Console.WriteLine("Attempt to Close...");
try {
conn.Close();
Console.WriteLine("Close was successfull.");
}
catch(Exception e) {
Console.WriteLine("Exeception Caught Closing. " + e);
}
conn = null;
}
catch(Exception e) {
Console.WriteLine("Exeception Caught Closing. " + e);
}
conn = null;
}
// ChangeProvider - change the provider string variable
@@ -378,25 +559,39 @@ namespace Mono.Data.SqlSharp {
if(parms.Length == 2) {
string parm = parms[1].ToUpper();
switch(parm) {
case "ORACLECLIENT":
case "ORACLE":
case "ODBC":
case "GDA":
Console.WriteLine("Error: Provider not currently supported.");
break;
case "MYSQL":
string[] extp = new string[3] {
"\\loadextprovider",
"Mono.Data.MySql",
"Mono.Data.MySql.MySqlConnection"};
SetupExternalProvider(extp);
break;
case "SQLCLIENT":
provider = "POSTGRESCLIENT";
provider = "POSTGRESQL";
Console.WriteLine("Warning: Currently, the SqlClient provider is the PostgreSQL provider.");
break;
//case "OLEDB":
case "MYSQL":
case "POSTGRESCLIENT":
case "GDA":
provider = "OLEDB";
break;
case "OLEDB":
case "POSTGRESQL":
provider = parm;
break;
default:
Console.WriteLine("Error: " + "Bad argument or Provider not supported.");
break;
}
Console.WriteLine("Provider: " + provider);
Console.WriteLine("The default Provider is " + provider);
if(provider.Equals("LOADEXTPROVIDER")) {
Console.WriteLine(" Assembly: " +
providerAssembly);
Console.WriteLine(" Connection Class: " +
providerConnectionClass);
}
}
else
Console.WriteLine("Error: provider only has one parameter.");
@@ -411,29 +606,76 @@ namespace Mono.Data.SqlSharp {
connectionString = "";
}
public void SetupInputFile(string[] parms) {
if(parms.Length >= 2) {
public void ReadCommandsFromFile(StreamReader inCmds) {
}
public void SetupOutputResultsFile(string[] parms) {
if(parms.Length != 2) {
Console.WriteLine("Error: wrong number of parameters");
return;
}
inputFilename = parms[1];
// TODO:
// open input file
// while each line, do the SqlSharpCli command or SQL
// close input file
try {
outputFilestream = new StreamWriter(parms[1]);
}
catch(Exception e) {
Console.WriteLine("Error: Unable to setup output results file. " + e);
return;
}
}
public void SetupOutputFile(string[] parms) {
if(parms.Length == 1) {
outputFilename = "";
// TODO: close the output file
}
else if(parms.Length > 2) {
public void SetupInputCommandsFile(string[] parms) {
if(parms.Length != 2) {
Console.WriteLine("Error: wrong number of parameters");
return;
}
else {
outputFilename = parms[1];
// TODO: open the output file
try {
inputFilestream = new StreamReader(parms[1]);
}
catch(Exception e) {
Console.WriteLine("Error: Unable to setup input commmands file. " + e);
return;
}
}
public void LoadBufferFromFile(string[] parms) {
if(parms.Length != 2) {
Console.WriteLine("Error: wrong number of parameters");
return;
}
string inFilename = parms[1];
try {
StreamReader sr = new StreamReader( inFilename);
StringBuilder buffer = new StringBuilder();
string NextLine;
while((NextLine = sr.ReadLine()) != null) {
buffer.Append(NextLine);
buffer.Append("\n");
}
sr.Close();
buff = buffer.ToString();
build = null;
build = new StringBuilder();
build.Append(buff);
}
catch(Exception e) {
Console.WriteLine("Error: Unable to read file into SQL Buffer. " + e);
}
}
public void SaveBufferToFile(string[] parms) {
if(parms.Length != 2) {
Console.WriteLine("Error: wrong number of parameters");
return;
}
string outFilename = parms[1];
try {
StreamWriter sw = new StreamWriter(outFilename);
sw.WriteLine(buff);
sw.Close();
}
catch(Exception e) {
Console.WriteLine("Error: Could not save SQL Buffer to file." + e);
}
}
@@ -450,23 +692,146 @@ namespace Mono.Data.SqlSharp {
else
Console.WriteLine("Error: invalid parameter.");
}
public void SetInternalVariable(string[] parms) {
if(parms.Length < 2) {
Console.WriteLine("Error: wrong number of parameters.");
return;
}
string parm = parms[1].ToUpper();
StringBuilder ps = new StringBuilder();
for(int i = 2; i < parms.Length; i++)
ps.Append(parms[i]);
public void OutputLine(string line) {
if(silent == false)
Console.WriteLine(line);
internalVariables[parm] = ps.ToString();
}
public void ExecuteBatch() {
// TODO:
Console.WriteLine("Error: Execution of Batch Commands not implemented yet");
public void UnSetInternalVariable(string[] parms) {
if(parms.Length != 2) {
Console.WriteLine("Error: wrong number of parameters.");
return;
}
string parm = parms[1].ToUpper();
try {
internalVariables.Remove(parm);
}
catch(Exception e) {
Console.WriteLine("Error: internal variable does not exist.");
}
}
public void ShowInternalVariable(string[] parms) {
string internalVariableValue = "";
if(parms.Length != 2) {
Console.WriteLine("Error: wrong number of parameters.");
return;
}
string parm = parms[1].ToUpper();
if(GetInternalVariable(parm, out internalVariableValue) == true)
Console.WriteLine("Internal Variable - Name: " +
parm + " Value: " + internalVariableValue);
}
public bool GetInternalVariable(string name, out string sValue) {
sValue = "";
bool valueReturned = false;
try {
if(internalVariables.ContainsKey(name) == true) {
sValue = (string) internalVariables[name];
valueReturned = true;
}
else
Console.WriteLine("Error: internal variable does not exist.");
}
catch(Exception e) {
Console.WriteLine("Error: internal variable does not exist.");
}
return valueReturned;
}
// to be used for loading .NET Data Providers that exist in
// the System.Data assembly, but are not explicitly handling
// in SQL#
public void LoadProvider(string[] parms) {
Console.WriteLine("Error: not implemented yet.");
}
public void SetupExternalProvider(string[] parms) {
if(parms.Length != 3) {
Console.WriteLine("Error: Wrong number of parameters.");
return;
}
provider = "LOADEXTPROVIDER";
providerAssembly = parms[1];
providerConnectionClass = parms[2];
}
public bool LoadExternalProvider() {
bool success = false;
// For example: for the MySQL provider in Mono.Data.MySql
// \LoadExtProvider Mono.Data.MySql Mono.Data.MySql.MySqlConnection
// \ConnectionString dbname=test
// \open
// insert into sometable (tid, tdesc, aint) values ('abc','def',12)
// \exenonquery
// \close
// \quit
try {
Console.WriteLine("Loading external provider...");
Console.Out.Flush();
Assembly ps = Assembly.Load(providerAssembly);
Type typ = ps.GetType(providerConnectionClass);
conn = (IDbConnection) Activator.CreateInstance(typ);
success = true;
Console.WriteLine("External provider loaded.");
Console.Out.Flush();
}
catch(FileNotFoundException f) {
Console.WriteLine("Error: unable to load the assembly of the provider: " +
providerAssembly);
}
return success;
}
// used for outputting message, but if silent is set,
// don't display
public void OutputLine(string line) {
if(silent == false)
OutputData(line);
}
// used for outputting the header columns of a result
public void OutputHeader(string line) {
if(showHeader == true)
OutputData(line);
}
// OutputData() - used for outputting data
// if an output filename is set, then the data will
// go to a file; otherwise, it will go to the Console.
public void OutputData(string line) {
if(outputFilestream == null)
Console.WriteLine(line);
else
outputFilestream.WriteLine(line);
}
// HandleCommand - handle SqlSharpCli commands entered
public void HandleCommand(string entry) {
public void HandleCommand(string entry) {
string[] parms;
// maybe a SQL# Command was found
parms = entry.Split(new char[1] {' '});
string userCmd = parms[0].ToUpper();
@@ -477,6 +842,13 @@ namespace Mono.Data.SqlSharp {
case "\\CONNECTIONSTRING":
ChangeConnectionString(entry);
break;
case "\\LOADPROVIDER":
// TODO:
//SetupProvider(parms);
break;
case "\\LOADEXTPROVIDER":
SetupExternalProvider(parms);
break;
case "\\OPEN":
OpenDataSource();
break;
@@ -497,19 +869,55 @@ namespace Mono.Data.SqlSharp {
if(build == null)
Console.WriteLine("Error: SQL Buffer is empty.");
else {
ExecuteSql(build.ToString());
buff = build.ToString();
ExecuteSql(buff);
}
build = null;
}
break;
case "\\EXENONQUERY":
if(conn == null)
Console.WriteLine("Error: connection is not Open.");
else if(conn.State == ConnectionState.Closed)
Console.WriteLine("Error: connection is not Open.");
else {
if(build == null)
Console.WriteLine("Error: SQL Buffer is empty.");
else {
buff = build.ToString();
ExecuteSqlNonQuery(buff);
}
build = null;
}
break;
case "\\EXESCALAR":
if(conn == null)
Console.WriteLine("Error: connection is not Open.");
else if(conn.State == ConnectionState.Closed)
Console.WriteLine("Error: connection is not Open.");
else {
if(build == null)
Console.WriteLine("Error: SQL Buffer is empty.");
else {
buff = build.ToString();
ExecuteSqlScalar(buff);
}
build = null;
}
break;
case "\\F":
// Batch Input File: \f FILENAME
SetupInputFile(parms);
ExecuteBatch();
SetupInputCommandsFile(parms);
break;
case "\\O":
// Batch Output File: \o FILENAME
SetupOutputFile(parms);
SetupOutputResultsFile(parms);
break;
case "\\LOAD":
// Load file into SQL buffer: \load FILENAME
LoadBufferFromFile(parms);
break;
case "\\SAVE":
// Save SQL buffer to file: \save FILENAME
SaveBufferToFile(parms);
break;
case "\\H":
case "\\HELP":
@@ -517,12 +925,35 @@ namespace Mono.Data.SqlSharp {
ShowHelp();
break;
case "\\DEFAULTS":
// show the defaults for provider and connection strings
ShowDefaults();
break;
case "\\Q":
case "\\QUIT":
// Quit
break;
case "\\R":
// reset (clear) the query buffer
build = null;
break;
case "\\SET":
// sets internal variable
// \set name value
SetInternalVariable(parms);
break;
case "\\UNSET":
// deletes internal variable
// \unset name
UnSetInternalVariable(parms);
break;
case "\\VARIABLE":
ShowInternalVariable(parms);
break;
case "\\PRINT":
if(build == null)
Console.WriteLine("SQL Buffer is empty.");
else
Console.WriteLine("SQL Bufer\n" + buff);
default:
// Error
Console.WriteLine("Error: Unknown user command.");
@@ -543,14 +974,16 @@ namespace Mono.Data.SqlSharp {
Console.WriteLine("Error: Missing FILENAME for -f switch");
else {
inputFilename = args[a + 1];
ExecuteBatch();
inputFilestream = new StreamReader(inputFilename);
}
break;
case "O":
if(a + 1 >= args.Length)
Console.WriteLine("Error: Missing FILENAME for -o switch");
else
else {
outputFilename = args[a + 1];
outputFilestream = new StreamWriter(outputFilename);
}
break;
default:
Console.WriteLine("Error: Unknow switch: " + args[a]);
@@ -560,6 +993,29 @@ namespace Mono.Data.SqlSharp {
}
}
public string ReadSqlSharpCommand() {
string entry = "";
if(inputFilestream == null) {
Console.Write("\nSQL# ");
entry = Console.ReadLine();
}
else {
try {
entry = inputFilestream.ReadLine();
if(entry == null) {
Console.WriteLine("Executing SQL# Commands from file done.");
}
}
catch(Exception e) {
Console.WriteLine("Error: Reading command from file.");
}
Console.Write("\nSQL# ");
entry = Console.ReadLine();
}
return entry;
}
public void Run(string[] args) {
DealWithArgs(args);
@@ -578,10 +1034,7 @@ namespace Mono.Data.SqlSharp {
while(entry.ToUpper().Equals("\\Q") == false &&
entry.ToUpper().Equals("\\QUIT") == false) {
Console.Write("\nSQL# ");
entry = Console.ReadLine();
Console.WriteLine("Entered: " + entry);
entry = ReadSqlSharpCommand();
if(entry.Substring(0,1).Equals("\\")) {
HandleCommand(entry);
@@ -598,7 +1051,9 @@ namespace Mono.Data.SqlSharp {
build = new StringBuilder();
}
build.Append(entry);
ExecuteSql(build.ToString());
build.Append("\n");
buff = build.ToString();
ExecuteSql(buff);
build = null;
}
}
@@ -608,14 +1063,17 @@ namespace Mono.Data.SqlSharp {
if(build == null) {
build = new StringBuilder();
}
build.Append(entry + " ");
build.Append(entry + "\n");
buff = build.ToString();
}
}
CloseDataSource();
if(outputFilestream != null)
outputFilestream.Close();
}
}
public class SqlSharpDriver {
public static void Main(string[] args) {
SqlSharpCli sqlCommandLineEngine = new SqlSharpCli();
sqlCommandLineEngine.Run(args);
@@ -22,6 +22,10 @@ namespace MonoTests.System.Data
get {
TestSuite suite = new TestSuite ();
suite.AddTest (new TestSuite (typeof (DataColumnTest)));
suite.AddTest (new TestSuite (typeof (UniqueConstraintTest)));
suite.AddTest (new TestSuite (typeof (ConstraintTest)));
suite.AddTest (new TestSuite (typeof (ConstraintCollectionTest)));
suite.AddTest (new TestSuite (typeof (ForeignKeyConstraintTest)));
return suite;
}
}
@@ -0,0 +1,323 @@
// ConstraintCollection.cs - NUnit Test Cases for testing the ConstraintCollection
// class.
//
//
// Franklin Wise ([email protected])
//
// (C) Franklin Wise
//
using NUnit.Framework;
using System;
using System.Data;
namespace MonoTests.System.Data
{
public class ConstraintCollectionTest : TestCase
{
private DataTable _table;
private DataTable _table2;
private Constraint _constraint1;
private Constraint _constraint2;
public ConstraintCollectionTest() : base ("MonoTests.System.Data.ConstraintCollectionTest") {}
public ConstraintCollectionTest(string name) : base(name) {}
public void PublicSetup(){SetUp();}
protected override void SetUp()
{
//Setup DataTable
_table = new DataTable("TestTable");
_table.Columns.Add("Col1",typeof(int));
_table.Columns.Add("Col2",typeof(int));
_table.Columns.Add("Col3",typeof(int));
_table2 = new DataTable("TestTable");
_table2.Columns.Add("Col1",typeof(int));
_table2.Columns.Add("Col2",typeof(int));
//Use UniqueConstraint to test Constraint Base Class
_constraint1 = new UniqueConstraint(_table.Columns[0],false);
_constraint2 = new UniqueConstraint(_table.Columns[1],false);
}
protected override void TearDown() {}
public static ITest Suite
{
get
{
return new TestSuite(typeof(ConstraintCollectionTest));
}
}
public void TestAdd()
{
ConstraintCollection col = _table.Constraints;
col.Add(_constraint1);
col.Add(_constraint2);
Assertion.AssertEquals("Count doesn't equal added.",2, col.Count);
}
public void TestAddExceptions()
{
ConstraintCollection col = _table.Constraints;
//null
try
{
col.Add(null);
Assertion.Fail("B1: Failed to throw ArgumentNullException.");
}
catch (ArgumentNullException) {}
catch (AssertionFailedError exc) {throw exc;}
catch
{
Assertion.Fail("A1: Wrong exception type");
}
//duplicate name
try
{
_constraint1.ConstraintName = "Dog";
_constraint2.ConstraintName = "dog"; //case insensitive
col.Add(_constraint1);
col.Add(_constraint2);
Assertion.Fail("Failed to throw Duplicate name exception.");
}
catch (DuplicateNameException) {}
catch (AssertionFailedError exc) {throw exc;}
catch (Exception exc)
{
Assertion.Fail("A2: Wrong exception type. " + exc.ToString());
}
//Constraint Already exists
try
{
col.Add(_constraint1);
Assertion.Fail("B2: Failed to throw ArgumentException.");
}
catch (ArgumentException) {}
catch (AssertionFailedError exc) {throw exc;}
catch
{
Assertion.Fail("A3: Wrong exception type");
}
}
public void TestIndexer()
{
Constraint c1 = new UniqueConstraint(_table.Columns[0]);
Constraint c2 = new UniqueConstraint(_table.Columns[1]);
c1.ConstraintName = "first";
c2.ConstraintName = "second";
_table.Constraints.Add(c1);
_table.Constraints.Add(c2);
Assertion.AssertSame("A1", c1, _table.Constraints[0]);
Assertion.AssertSame("A2", c2, _table.Constraints[1]);
Assertion.AssertSame("A3", c1, _table.Constraints["first"]);
Assertion.AssertSame("A4", c2, _table.Constraints["sEcond"]); //case insensitive
}
public void TestIndexOf()
{
Constraint c1 = new UniqueConstraint(_table.Columns[0]);
Constraint c2 = new UniqueConstraint(_table.Columns[1]);
c1.ConstraintName = "first";
c2.ConstraintName = "second";
_table.Constraints.Add(c1);
_table.Constraints.Add(c2);
Assertion.AssertEquals("A1", 0, _table.Constraints.IndexOf(c1));
Assertion.AssertEquals("A2", 1, _table.Constraints.IndexOf(c2));
Assertion.AssertEquals("A3", 0, _table.Constraints.IndexOf("first"));
Assertion.AssertEquals("A4", 1, _table.Constraints.IndexOf("second"));
}
public void TestContains()
{
Constraint c1 = new UniqueConstraint(_table.Columns[0]);
Constraint c2 = new UniqueConstraint(_table.Columns[1]);
c1.ConstraintName = "first";
c2.ConstraintName = "second";
_table.Constraints.Add(c1);
Assertion.Assert("A1", _table.Constraints.Contains(c1.ConstraintName)); //true
Assertion.Assert("A2", _table.Constraints.Contains(c2.ConstraintName) == false); //doesn't contain
}
public void TestIndexerFailures()
{
_table.Constraints.Add(new UniqueConstraint(_table.Columns[0]));
//This doesn't throw
Assertion.AssertNull(_table.Constraints["notInCollection"]);
//Index too high
try
{
Constraint c = _table.Constraints[_table.Constraints.Count];
Assertion.Fail("B1: Failed to throw IndexOutOfRangeException.");
}
catch (IndexOutOfRangeException) {}
catch (AssertionFailedError exc) {throw exc;}
catch
{
Assertion.Fail("A1: Wrong exception type");
}
//Index too low
try
{
Constraint c = _table.Constraints[-1];
Assertion.Fail("B2: Failed to throw IndexOutOfRangeException.");
}
catch (IndexOutOfRangeException) {}
catch (AssertionFailedError exc) {throw exc;}
catch
{
Assertion.Fail("A2: Wrong exception type");
}
}
//TODO: Implementation not ready for this test yet
// public void TestAddFkException1()
// {
// DataSet ds = new DataSet();
// ds.Tables.Add(_table);
// ds.Tables.Add(_table2);
//
// _table.Rows.Add(new object [] {1});
// _table.Rows.Add(new object [] {1});
//
// //FKC: can't create unique constraint because duplicate values already exist
// try
// {
// ForeignKeyConstraint fkc = new ForeignKeyConstraint( _table.Columns[0],
// _table2.Columns[0]);
//
// _table2.Constraints.Add(fkc); //should throw
// Assertion.Fail("B1: Failed to throw ArgumentException.");
// }
// catch (ArgumentException) {}
// catch (AssertionFailedError exc) {throw exc;}
// catch (Exception exc)
// {
// Assertion.Fail("A1: Wrong Exception type. " + exc.ToString());
// }
//
//
// }
//TODO: Implementation not ready for this test yet
// public void TestAddFkException2()
// {
// //Foreign key rules only work when the tables
// //are apart of the dataset
// DataSet ds = new DataSet();
// ds.Tables.Add(_table);
// ds.Tables.Add(_table2);
//
// _table.Rows.Add(new object [] {1});
//
// // will need a matching parent value in
// // _table
// _table2.Rows.Add(new object [] {3});
//
//
// //FKC: no matching parent value
// try
// {
// ForeignKeyConstraint fkc = new ForeignKeyConstraint( _table.Columns[0],
// _table2.Columns[0]);
//
// _table2.Constraints.Add(fkc); //should throw
// Assertion.Fail("B1: Failed to throw ArgumentException.");
// }
// catch (ArgumentException) {}
// catch (AssertionFailedError exc) {throw exc;}
// catch (Exception exc)
// {
// Assertion.Fail("A1: Wrong Exception type. " + exc.ToString());
// }
//
//
// }
//TODO: Implementation not ready for this test yet
// public void TestAddUniqueExceptions()
// {
//
//
// //UC: can't create unique constraint because duplicate values already exist
// try
// {
// _table.Rows.Add(new object [] {1});
// _table.Rows.Add(new object [] {1});
// UniqueConstraint uc = new UniqueConstraint( _table.Columns[0]);
//
// _table.Constraints.Add(uc); //should throw
// Assertion.Fail("B1: Failed to throw ArgumentException.");
// }
// catch (ArgumentException) {}
// catch (AssertionFailedError exc) {throw exc;}
// catch (Exception exc)
// {
// Assertion.Fail("A1: Wrong Exception type. " + exc.ToString());
// }
// }
public void TestAddRange()
{
}
public void TestClear()
{
}
public void TestCanRemove()
{
}
public void TestCollectionChanged()
{
}
public void TestRemoveAt()
{
}
public void TestRemove()
{
}
public void TestRemoveExceptions()
{
}
}
}
@@ -0,0 +1,135 @@
// ConstraintTest.cs - NUnit Test Cases for testing the abstract class System.Data.Constraint
// The tests use an inherited class (UniqueConstraint) to test the Constraint class.
//
// Franklin Wise <[email protected]>
//
// (C) 2002 Franklin Wise
//
using NUnit.Framework;
using System;
using System.Data;
namespace MonoTests.System.Data
{
// public class MyUniqueConstraint: UniqueConstraint {
// public MyUniqueConstraint(DataColumn col, bool pk): base(col,pk){}
// string _myval = "";
// public override string ConstraintName {
// get{
// return _myval;
// return base.ConstraintName;
// }
// set{
// Console.WriteLine("NameSet = " + value);
// base.ConstraintName = value;
// _myval = value;
// }
// }
// }
public class ConstraintTest : TestCase
{
private DataTable _table;
private Constraint _constraint1;
private Constraint _constraint2;
public ConstraintTest() : base ("MonoTests.System.Data.ConstraintTest") {}
public ConstraintTest(string name) : base(name) {}
public void PublicSetup(){SetUp();}
protected override void SetUp() {
//Setup DataTable
_table = new DataTable("TestTable");
_table.Columns.Add("Col1",typeof(int));
_table.Columns.Add("Col2",typeof(int));
//Use UniqueConstraint to test Constraint Base Class
_constraint1 = new UniqueConstraint(_table.Columns[0],false);
_constraint2 = new UniqueConstraint(_table.Columns[1],false);
}
protected override void TearDown() {}
public static ITest Suite {
get {
return new TestSuite(typeof(ConstraintTest));
}
}
public void TestSetConstraintNameNullOrEmptyExceptions() {
bool exceptionCaught = false;
string name = null;
_table.Constraints.Add (_constraint1);
Console.WriteLine(_constraint1.ConstraintName);
for (int i = 0; i <= 1; i++) {
exceptionCaught = false;
if (0 == i) name = null;
if (1 == i) name = String.Empty;
try {
//Next line should throw ArgumentException
//Because ConstraintName can't be set to null
//or empty while the constraint is part of the
//collection
_constraint1.ConstraintName = name;
}
catch (ArgumentException){
exceptionCaught = true;
}
catch {
Assertion.Fail("Wrong exception type thrown.");
}
Assertion.Assert("Failed to throw exception.",
true == exceptionCaught);
}
}
public void TestSetConstraintNameDuplicateException() {
_constraint1.ConstraintName = "Dog";
_constraint2.ConstraintName = "Cat";
_table.Constraints.Add(_constraint1);
_table.Constraints.Add(_constraint2);
try {
//Should throw DuplicateNameException
_constraint2.ConstraintName = "Dog";
Assertion.Fail("Failed to throw " +
" DuplicateNameException exception.");
}
catch (DuplicateNameException) {}
catch (AssertionFailedError exc) {throw exc;}
catch {
Assertion.Fail("Wrong exception type thrown.");
}
}
public void TestToString() {
_constraint1.ConstraintName = "Test";
Assertion.Assert("ToString is the same as constraint name.", _constraint1.ConstraintName.CompareTo( _constraint1.ToString()) == 0);
_constraint1.ConstraintName = null;
Assertion.AssertNotNull("ToString should return empty.",_constraint1.ToString());
}
public void TestGetExtendedProperties() {
PropertyCollection col = _constraint1.ExtendedProperties as
PropertyCollection;
Assertion.AssertNotNull("ExtendedProperties returned null or didn't " +
"return the correct type", col);
}
}
}
@@ -26,5 +26,7 @@ namespace MonoTests.System.Data
return new TestSuite (typeof (DataColumnTest));
}
}
public void TestBlank() {} //Remove me when we add some tests
}
}
@@ -0,0 +1,124 @@
// ForeignKeyConstraintTest.cs - NUnit Test Cases for [explain here]
//
// Franklin Wise ([email protected])
//
// (C) Franklin Wise
//
using NUnit.Framework;
using System;
using System.Data;
namespace MonoTests.System.Data
{
public class ForeignKeyConstraintTest : TestCase
{
private DataSet _ds;
//NOTE: fk constraints only work when the table is part of a DataSet
public ForeignKeyConstraintTest() : base ("MonoTests.System.Data.ForeignKeyConstraintTest") {}
public ForeignKeyConstraintTest(string name) : base(name) {}
protected override void SetUp()
{
_ds = new DataSet();
//Setup DataTable
DataTable table;
table = new DataTable("TestTable");
table.Columns.Add("Col1",typeof(int));
table.Columns.Add("Col2",typeof(int));
table.Columns.Add("Col3",typeof(int));
_ds.Tables.Add(table);
table = new DataTable("TestTable2");
table.Columns.Add("Col1",typeof(int));
table.Columns.Add("Col2",typeof(int));
table.Columns.Add("Col3",typeof(int));
_ds.Tables.Add(table);
}
protected override void TearDown() {}
public static ITest Suite
{
get
{
return new TestSuite(typeof(ForeignKeyConstraintTest));
}
}
public void TestCtorExceptions ()
{
ForeignKeyConstraint fkc;
DataTable localTable = new DataTable();
localTable.Columns.Add("Col1",typeof(int));
localTable.Columns.Add("Col2",typeof(bool));
//Null
try
{
fkc = new ForeignKeyConstraint((DataColumn)null,(DataColumn)null);
Assertion.Fail("Failed to throw ArgumentNullException.");
}
catch (ArgumentNullException) {}
catch (AssertionFailedError exc) {throw exc;}
catch (Exception exc)
{
Assertion.Fail("A1: Wrong Exception type. " + exc.ToString());
}
//zero length collection
try
{
fkc = new ForeignKeyConstraint(new DataColumn[]{},new DataColumn[]{});
Assertion.Fail("B1: Failed to throw ArgumentException.");
}
catch (ArgumentException) {}
catch (AssertionFailedError exc) {throw exc;}
catch (Exception exc)
{
Assertion.Fail("A1: Wrong Exception type. " + exc.ToString());
}
//different datasets
try
{
fkc = new ForeignKeyConstraint(_ds.Tables[0].Columns[0], localTable.Columns[0]);
Assertion.Fail("Failed to throw InvalidOperationException.");
}
catch (InvalidOperationException) {}
catch (AssertionFailedError exc) {throw exc;}
catch (Exception exc)
{
Assertion.Fail("A1: Wrong Exception type. " + exc.ToString());
}
//different dataTypes
try
{
fkc = new ForeignKeyConstraint(_ds.Tables[0].Columns[0], localTable.Columns[1]);
Assertion.Fail("Failed to throw InvalidOperationException.");
}
catch (InvalidOperationException) {}
catch (AssertionFailedError exc) {throw exc;}
catch (Exception exc)
{
Assertion.Fail("A1: Wrong Exception type. " + exc.ToString());
}
}
}
}
@@ -0,0 +1,181 @@
// UniqueConstraintTest.cs - NUnit Test Cases for testing the class System.Data.UniqueConstraint
//
// Franklin Wise <[email protected]>
//
// (C) 2002 Franklin Wise
//
using NUnit.Framework;
using System;
using System.Data;
namespace MonoTests.System.Data
{
public class UniqueConstraintTest : TestCase
{
private DataTable _table;
public UniqueConstraintTest() : base ("MonoTests.System.Data.UniqueConstraintTest") {}
public UniqueConstraintTest(string name) : base(name) {}
public void PublicSetup() {this.SetUp();}
protected override void SetUp() {
//Setup DataTable
_table = new DataTable("TestTable");
_table.Columns.Add("Col1",typeof(int));
_table.Columns.Add("Col2",typeof(int));
_table.Columns.Add("Col3",typeof(int));
}
protected override void TearDown() {}
public static ITest Suite {
get {
return new TestSuite(typeof(UniqueConstraintTest));
}
}
public void TestCtorExceptions() {
//UniqueConstraint(string name, DataColumn column, bool isPrimaryKey)
UniqueConstraint cst;
//must have DataTable exception
try{
//Should throw an ArgumentException
//Can only add DataColumns that are attached
//to a DataTable
cst = new UniqueConstraint(new DataColumn(""));
Assertion.Fail("Failed to throw ArgumentException.");
}
catch (ArgumentException) {}
catch (AssertionFailedError exc) {throw exc;}
catch {
Assertion.Fail("A1: Wrong Exception type.");
}
//Null exception
try {
//Should throw argument null exception
cst = new UniqueConstraint((DataColumn)null);
}
catch (ArgumentNullException) {}
catch (AssertionFailedError exc) {throw exc;}
catch {
Assertion.Fail("A2: Wrong Exception type.");
}
try {
//Should throw exception
//must have at least one valid column
//InvalidConstraintException is thrown by msft ver
cst = new UniqueConstraint(new DataColumn [] {});
Assertion.Fail("B1: Failed to throw InvalidConstraintException.");
}
catch (InvalidConstraintException) {}
catch (AssertionFailedError exc) {throw exc;}
catch {
Assertion.Fail("A3: Wrong Exception type.");
}
DataTable dt = new DataTable("Table1");
dt.Columns.Add("Col1",typeof(int));
DataTable dt2 = new DataTable("Table2");
dt2.Columns.Add("Col1",typeof(int));
DataSet ds = new DataSet();
ds.Tables.Add(dt);
ds.Tables.Add(dt2);
//columns from two different tables.
try {
//next line should throw
//can't have columns from two different tables
cst = new UniqueConstraint(new DataColumn [] {
dt.Columns[0], dt2.Columns[0]});
Assertion.Fail("B2: Failed to throw InvalidConstraintException");
}
catch (InvalidConstraintException) {}
catch (AssertionFailedError exc) {throw exc;}
catch {
Assertion.Fail("A4: Wrong Exception type.");
}
}
public void TestCtor() {
UniqueConstraint cst;
//Success case
try {
cst = new UniqueConstraint(_table.Columns[0]);
}
catch (Exception exc) {
Assertion.Fail("A1: Failed to ctor. " + exc.ToString());
}
try {
cst = new UniqueConstraint( new DataColumn [] {
_table.Columns[0], _table.Columns[1]});
}
catch (Exception exc) {
Assertion.Fail("A2: Failed to ctor. " + exc.ToString());
}
//table is set on ctor
cst = new UniqueConstraint(_table.Columns[0]);
Assertion.AssertSame("B1", cst.Table, _table);
//table is set on ctor
cst = new UniqueConstraint( new DataColumn [] {
_table.Columns[0], _table.Columns[1]});
Assertion.AssertSame ("B2", cst.Table, _table);
cst = new UniqueConstraint("MyName",_table.Columns[0],true);
//Test ctor parm set for ConstraintName & IsPrimaryKey
Assertion.AssertEquals("ConstraintName not set in ctor.",
"MyName", cst.ConstraintName);
Assertion.AssertEquals("IsPrimaryKey not set in ctor.",
true, cst.IsPrimaryKey);
}
public void TestEquals() {
UniqueConstraint cst = new UniqueConstraint( new DataColumn [] {
_table.Columns[0], _table.Columns[1]});
UniqueConstraint cst2 = new UniqueConstraint( new DataColumn [] {
_table.Columns[1], _table.Columns[0]});
UniqueConstraint cst3 = new UniqueConstraint(_table.Columns[0]);
UniqueConstraint cst4 = new UniqueConstraint(_table.Columns[2]);
//true
Assertion.Assert(cst.Equals(cst2) == true);
//false
Assertion.Assert("A1", cst.Equals(23) == false);
Assertion.Assert("A2", cst.Equals(cst3) == false);
Assertion.Assert("A3", cst3.Equals(cst) == false);
Assertion.Assert("A4", cst.Equals(cst4) == false);
}
}
}
+6
View File
@@ -91,25 +91,31 @@ System.Data.Common/DataColumnMappingCollection.cs
System.Data.Common/DataTableMapping.cs
System.Data.Common/DataTableMappingCollection.cs
System.Data.Common/DbDataAdapter.cs
System.Data.Common/DbDataPermission.cs
System.Data.Common/DbDataPermissionAttribute.cs
System.Data.Common/RowUpdatedEventArgs.cs
System.Data.Common/RowUpdatingEventArgs.cs
System.Data.OleDb/libgda.cs
System.Data.OleDb/OleDbCommand.cs
System.Data.OleDb/OleDbCommandBuilder.cs
System.Data.OleDb/OleDbConnection.cs
System.Data.OleDb/OleDbDataAdapter.cs
System.Data.OleDb/OleDbDataReader.cs
System.Data.OleDb/OleDbError.cs
System.Data.OleDb/OleDbErrorCollection.cs
System.Data.OleDb/OleDbException.cs
System.Data.OleDb/OleDbInfoMessageEventArgs.cs
System.Data.OleDb/OleDbInfoMessageEventHandler.cs
System.Data.OleDb/OleDbLiteral.cs
System.Data.OleDb/OleDbParameter.cs
System.Data.OleDb/OleDbParameterCollection.cs
System.Data.OleDb/OleDbPermission.cs
System.Data.OleDb/OleDbPermissionAttribute.cs
System.Data.OleDb/OleDbRowUpdatedEventArgs.cs
System.Data.OleDb/OleDbRowUpdatedEventHandler.cs
System.Data.OleDb/OleDbRowUpdatingEventArgs.cs
System.Data.OleDb/OleDbRowUpdatingEventHandler.cs
System.Data.OleDb/OleDbSchemaGuid.cs
System.Data.OleDb/OleDbTransaction.cs
System.Data.OleDb/OleDbType.cs
System.Data.SqlClient/ParmUtil.cs
+6 -1
View File
@@ -2,9 +2,14 @@ topdir = ../..
LIBRARY = ../lib/System.Data.dll
LIB_LIST = list
LIB_FLAGS = -r corlib -r System -r System.Xml
SOURCES_INCLUDE=*.cs
SOURCES_EXCLUDE=\
./Test* \
*TestGDA.cs \
./System.Xml*
export MONO_PATH_PREFIX = ../lib:
include ../library.make
@@ -1,3 +1,7 @@
2002-07-28 Gonzalo Paniagua Javier <[email protected]>
* ColorTranslator.cs: use Color.Name.
2002-07-18 Gonzalo Paniagua Javier <[email protected]>
* Color.cs: implemented SystemColors and NamedColors properties that
@@ -66,7 +66,7 @@ namespace System.Drawing {
string result;
if (c.IsNamedColor)
result = c.ToString ();
result = c.Name;
else
result = String.Format ("#{0:X2}{1:X2}{2:X2}", c.R, c.G, c.B);
+4 -1
View File
@@ -2,9 +2,12 @@ topdir = ../..
LIBRARY = ../lib/System.Drawing.dll
LIB_LIST = list.unix
LIB_FLAGS = -r corlib -r System
SOURCES_INCLUDE=*.cs
SOURCES_EXCLUDE=\
./Test*
export MONO_PATH_PREFIX = ../lib:
include ../library.make
@@ -1,3 +1,20 @@
2002-08-13 Tim Coleman <[email protected]>
* list: new files added to build
2002-08-08 Tim Coleman <[email protected]>
* list: new files added to build.
2002-08-07 Tim Coleman <[email protected]>
* list: new files added to build.
2002-08-06 Tim Coleman <[email protected]>
* list: new files added to build.
* System.EnterpriseServices.CompensatingResourceManager:
New directory added
2002-08-03 Tim Coleman <[email protected]>
* list: new files added to build list.
2002-07-22 Tim Coleman <[email protected]>
* makefile.gnu: added to build on linux
@@ -0,0 +1,19 @@
2002-08-13 Tim Coleman <[email protected]>
* Clerk.cs:
* Compensator.cs:
New stubs added.
2002-08-07 Tim Coleman <[email protected]>
* CompensatorOptions.cs:
* LogRecordFlags.cs:
* TransactionState.cs:
Changed enum values to agree with .NET
* LogRecord.cs:
New stubs added
2002-08-06 Tim Coleman <[email protected]>
* ChangeLog.cs:
* CompensatorOptions.cs:
* LogRecordFlags.cs:
* TransactionState.cs:
New stubs added
@@ -0,0 +1,84 @@
//
// System.EnterpriseServices.CompensatingResourceManager.Clerk.cs
//
// Author:
// Tim Coleman ([email protected])
//
// Copyright (C) Tim Coleman, 2002
//
using System;
using System.EnterpriseServices;
namespace System.EnterpriseServices.CompensatingResourceManager {
public sealed class Clerk {
#region Constructors
//internal Clerk (CrmLogControl logControl)
//{
//}
[MonoTODO]
public Clerk (string compensator, string description, CompensatorOptions flags)
{
throw new NotImplementedException ();
}
[MonoTODO]
public Clerk (Type compensator, string description, CompensatorOptions flags)
{
throw new NotImplementedException ();
}
#endregion // Constructors
#region Properties
public int LogRecordCount {
[MonoTODO]
get { throw new NotImplementedException (); }
}
public string TransactionUOW {
[MonoTODO]
get { throw new NotImplementedException (); }
}
#endregion // Properties
#region Methods
[MonoTODO]
~Clerk ()
{
throw new NotImplementedException ();
}
[MonoTODO]
public void ForceLog ()
{
throw new NotImplementedException ();
}
[MonoTODO]
public void ForceTransactionToAbort ()
{
throw new NotImplementedException ();
}
[MonoTODO]
public void ForgetLogRecord ()
{
throw new NotImplementedException ();
}
[MonoTODO]
public void WriteLogRecord (object record)
{
throw new NotImplementedException ();
}
#endregion // Methods
}
}
@@ -0,0 +1,93 @@
//
// System.EnterpriseServices.CompensatingResourceManager.Compensator.cs
//
// Author:
// Tim Coleman ([email protected])
//
// Copyright (C) Tim Coleman, 2002
//
using System;
using System.EnterpriseServices;
namespace System.EnterpriseServices.CompensatingResourceManager {
public class Compensator : ServicedComponent{
#region Constructors
[MonoTODO]
public Compensator ()
{
throw new NotImplementedException ();
}
#endregion // Constructors
#region Properties
public Clerk Clerk {
[MonoTODO]
get { throw new NotImplementedException (); }
}
#endregion // Properties
#region Methods
[MonoTODO]
public virtual bool AbortRecord (LogRecord rec)
{
throw new NotImplementedException ();
}
[MonoTODO]
public virtual void BeginAbort (bool fRecovery)
{
throw new NotImplementedException ();
}
[MonoTODO]
public virtual void BeginCommit (bool fRecovery)
{
throw new NotImplementedException ();
}
[MonoTODO]
public virtual void BeginPrepare ()
{
throw new NotImplementedException ();
}
[MonoTODO]
public virtual void CommitRecord (LogRecord rec)
{
throw new NotImplementedException ();
}
[MonoTODO]
public virtual void EndAbort ()
{
throw new NotImplementedException ();
}
[MonoTODO]
public virtual void EndCommit ()
{
throw new NotImplementedException ();
}
[MonoTODO]
public virtual bool EndPrepare ()
{
throw new NotImplementedException ();
}
[MonoTODO]
public virtual bool PrepareRecord (LogRecord rec)
{
throw new NotImplementedException ();
}
#endregion // Methods
}
}
@@ -0,0 +1,22 @@
//
// System.EnterpriseServices.CompensatingResourceManager.CompensatorOptions.cs
//
// Author:
// Tim Coleman ([email protected])
//
// Copyright (C) Tim Coleman, 2002
//
using System;
namespace System.EnterpriseServices.CompensatingResourceManager {
[Flags]
[Serializable]
public enum CompensatorOptions {
PreparePhase = 0x1,
CommitPhase = 0x2,
AbortPhase = 0x4,
AllPhases = 0x7,
FailIfInDoubtsRemain = 0x10
}
}
@@ -0,0 +1,69 @@
//
// System.EnterpriseServices.CompensatingResourceManager.LogRecord.cs
//
// Author:
// Tim Coleman ([email protected])
//
// Copyright (C) Tim Coleman, 2002
//
using System;
using System.EnterpriseServices;
namespace System.EnterpriseServices.CompensatingResourceManager {
public sealed class LogRecord {
#region Fields
LogRecordFlags flags;
object record;
int sequence;
#endregion // Fields
#region Constructors
[MonoTODO]
internal LogRecord ()
{
}
[MonoTODO]
internal LogRecord (_LogRecord logRecord)
{
flags = (LogRecordFlags) logRecord.dwCrmFlags;
sequence = logRecord.dwSequenceNumber;
record = logRecord.blobUserData;
}
#endregion // Constructors
#region Properties
public LogRecordFlags Flags {
get { return flags; }
}
public object Record {
get { return record; }
}
public int Sequence {
get { return sequence; }
}
#endregion // Properties
}
internal struct _LogRecord {
#region Fields
public int dwCrmFlags;
public int dwSequenceNumber;
public object blobUserData; // FIXME: This is not the correct type
#endregion // Fields
}
}
@@ -0,0 +1,24 @@
//
// System.EnterpriseServices.CompensatingResourceManager.LogRecordFlags.cs
//
// Author:
// Tim Coleman ([email protected])
//
// Copyright (C) Tim Coleman, 2002
//
using System;
namespace System.EnterpriseServices.CompensatingResourceManager {
[Flags]
[Serializable]
public enum LogRecordFlags {
ForgetTarget = 0x1,
WrittenDuringPrepare = 0x2,
WrittenDuringCommit = 0x4,
WrittenDuringAbort = 0x8,
WrittenDurringRecovery = 0x10, // Typo present in .NET
WrittenDuringReplay = 0x20,
ReplayInProgress = 0x40
}
}
@@ -0,0 +1,20 @@
//
// System.EnterpriseServices.CompensatingResourceManager.TransactionState.cs
//
// Author:
// Tim Coleman ([email protected])
//
// Copyright (C) Tim Coleman, 2002
//
using System;
namespace System.EnterpriseServices.CompensatingResourceManager {
[Serializable]
public enum TransactionState {
Active = 0x0,
Committed = 0x1,
Aborted = 0x2,
Indoubt = 0x3
}
}
@@ -0,0 +1,16 @@
//
// System.EnterpriseServices.AccessChecksLevelOption.cs
//
// Author:
// Tim Coleman ([email protected])
//
// Copyright (C) Tim Coleman, 2002
//
namespace System.EnterpriseServices {
[Serializable]
public enum AccessChecksLevelOption {
Application,
ApplicationComponent
}
}
@@ -0,0 +1,16 @@
//
// System.EnterpriseServices.ActivationOption.cs
//
// Author:
// Tim Coleman ([email protected])
//
// Copyright (C) Tim Coleman, 2002
//
namespace System.EnterpriseServices {
[Serializable]
public enum ActivationOption {
Library,
Server
}
}
@@ -0,0 +1,63 @@
//
// System.EnterpriseServices.ApplicationAccessControlAttribute.cs
//
// Author:
// Tim Coleman ([email protected])
//
// Copyright (C) Tim Coleman, 2002
//
using System;
namespace System.EnterpriseServices {
[AttributeUsage (AttributeTargets.Assembly)]
public sealed class ApplicationAccessControlAttribute : Attribute {
#region Fields
AccessChecksLevelOption accessChecksLevel;
AuthenticationOption authentication;
ImpersonationLevelOption impersonation;
bool val;
#endregion // Fields
#region Constructors
public ApplicationAccessControlAttribute ()
{
this.val = false;
}
public ApplicationAccessControlAttribute (bool val)
{
this.val = val;
}
#endregion // Constructors
#region Properties
public AccessChecksLevelOption AccessChecksLevel {
get { return accessChecksLevel; }
set { accessChecksLevel = value; }
}
public AuthenticationOption Authentication {
get { return authentication; }
set { authentication = value; }
}
public ImpersonationLevelOption Impersonation {
get { return impersonation; }
set { impersonation = value; }
}
public bool Value {
get { return val; }
set { val = value; }
}
#endregion // Properties
}
}
@@ -0,0 +1,51 @@
//
// System.EnterpriseServices.ApplicationActivationAttribute.cs
//
// Author:
// Tim Coleman ([email protected])
//
// Copyright (C) Tim Coleman, 2002
//
using System;
namespace System.EnterpriseServices {
[AttributeUsage (AttributeTargets.Assembly)]
public sealed class ApplicationActivationAttribute : Attribute {
#region Fields
ActivationOption opt;
string soapMailbox;
string soapVRoot;
#endregion // Fields
#region Constructors
public ApplicationActivationAttribute (ActivationOption opt)
{
this.opt = opt;
}
#endregion // Constructors
#region Properties
public string SoapMailbox {
get { return soapMailbox; }
set { soapMailbox = value; }
}
public string SoapVRoot {
get { return soapVRoot; }
set { soapVRoot = value; }
}
public ActivationOption Value {
get { return opt; }
}
#endregion // Properties
}
}
@@ -0,0 +1,39 @@
//
// System.EnterpriseServices.ApplicationIDAttribute.cs
//
// Author:
// Tim Coleman ([email protected])
//
// Copyright (C) Tim Coleman, 2002
//
using System;
namespace System.EnterpriseServices {
[AttributeUsage (AttributeTargets.Assembly)]
public sealed class ApplicationIDAttribute : Attribute {
#region Fields
Guid guid;
#endregion // Fields
#region Constructors
public ApplicationIDAttribute (string guid)
{
this.guid = new Guid (guid);
}
#endregion // Constructors
#region Properties
public Guid Value {
get { return guid; }
}
#endregion // Properties
}
}
@@ -0,0 +1,39 @@
//
// System.EnterpriseServices.ApplicationNameAttribute.cs
//
// Author:
// Tim Coleman ([email protected])
//
// Copyright (C) Tim Coleman, 2002
//
using System;
namespace System.EnterpriseServices {
[AttributeUsage (AttributeTargets.Assembly)]
public sealed class ApplicationNameAttribute : Attribute {
#region Fields
string name;
#endregion // Fields
#region Constructors
public ApplicationNameAttribute (string name)
{
this.name = name;
}
#endregion // Constructors
#region Properties
public string Value {
get { return name; }
}
#endregion // Properties
}
}
@@ -0,0 +1,54 @@
//
// System.EnterpriseServices.ApplicationQueuingAttribute.cs
//
// Author:
// Tim Coleman ([email protected])
//
// Copyright (C) Tim Coleman, 2002
//
using System;
namespace System.EnterpriseServices {
[AttributeUsage (AttributeTargets.Assembly)]
public sealed class ApplicationQueuingAttribute : Attribute {
#region Fields
bool enabled;
int maxListenerThreads;
bool queueListenerEnabled;
#endregion // Fields
#region Constructors
public ApplicationQueuingAttribute ()
{
enabled = true;
queueListenerEnabled = false;
maxListenerThreads = 0;
}
#endregion // Constructors
#region Properties
public bool Enabled {
get { return enabled; }
set { enabled = value; }
}
public int MaxListenerThreads {
get { return maxListenerThreads; }
set { maxListenerThreads = value; }
}
public bool QueueListenerEnabled {
get { return queueListenerEnabled; }
set { queueListenerEnabled = value; }
}
#endregion // Properties
}
}
@@ -0,0 +1,21 @@
//
// System.EnterpriseServices.AuthenticationOption.cs
//
// Author:
// Tim Coleman ([email protected])
//
// Copyright (C) Tim Coleman, 2002
//
namespace System.EnterpriseServices {
[Serializable]
public enum AuthenticationOption {
Call,
Connect,
Default,
Integrity,
None,
Packet,
Privacy
}
}
@@ -0,0 +1,44 @@
//
// System.EnterpriseServices.AutoCompleteAttribute.cs
//
// Author:
// Tim Coleman ([email protected])
//
// Copyright (C) Tim Coleman, 2002
//
using System;
namespace System.EnterpriseServices {
[AttributeUsage (AttributeTargets.Method)]
public sealed class AutoCompleteAttribute : Attribute {
#region Fields
bool val;
#endregion // Fields
#region Constructors
public AutoCompleteAttribute ()
{
val = true;
}
public AutoCompleteAttribute (bool val)
{
this.val = val;
}
#endregion // Constructors
#region Properties
public bool Value {
get { return val; }
}
#endregion // Properties
}
}
@@ -0,0 +1,21 @@
//
// System.EnterpriseServices.BOID.cs
//
// Author:
// Tim Coleman ([email protected])
//
// Copyright (C) Tim Coleman, 2002
//
using System;
namespace System.EnterpriseServices {
public struct BOID {
#region Fields
public byte[] rgb;
#endregion // Fields
}
}
@@ -0,0 +1,31 @@
//
// System.EnterpriseServices.BYOT.cs
//
// Author:
// Tim Coleman ([email protected])
//
// Copyright (C) Tim Coleman, 2002
//
using System;
namespace System.EnterpriseServices {
public sealed class BYOT {
#region Methods
[MonoTODO]
public static object CreateWithTipTransaction (string url, Type t)
{
throw new NotImplementedException ();
}
[MonoTODO]
public static object CreateWithTransaction (object transaction, Type t)
{
throw new NotImplementedException ();
}
#endregion // Methods
}
}
@@ -0,0 +1,45 @@
//
// System.EnterpriseServices.COMTIIntrinsicsAttribute.cs
//
// Author:
// Tim Coleman ([email protected])
//
// Copyright (C) Tim Coleman, 2002
//
using System;
namespace System.EnterpriseServices {
[AttributeUsage (AttributeTargets.Class)]
public sealed class COMTIIntrinsicsAttribute : Attribute {
#region Fields
bool val;
#endregion // Fields
#region Constructors
public COMTIIntrinsicsAttribute ()
{
this.val = false;
}
public COMTIIntrinsicsAttribute (bool val)
{
this.val = val;
}
#endregion // Constructors
#region Properties
public bool Value {
get { return val; }
set { val = value; }
}
#endregion // Properties
}
}
@@ -1,3 +1,99 @@
2002-08-10 Gonzalo Paniagua Javier <[email protected]>
* RegistrationHelper.cs: fixed compilation.
2002-08-09 Tim Coleman <[email protected]>
* RegistrationHelperTx.cs:
Commit the add of RegistrationHelperTx.cs
2002-08-08 Tim Coleman <[email protected]>
* ISecurityCallContext.cs:
* ISecurityCallersColl.cs:
* ISecurityIdentityColl.cs:
* ISharedProperty.cs:
* ISharedPropertyGroup.cs:
* RegistrationHelperTx.cs:
* ResourcePool.cs:
* SecureMethodAttribute.cs:
* SecurityCallContext.cs:
* SecurityCallers.cs:
* SecurityIdentity.cs:
* SecurityRoleAttribute.cs:
* ServicedComponentException.cs:
* SharedProperty.cs:
* SharedPropertyGroup.cs:
* SharedPropertyGroupManager.cs:
* SynchronizationAttribute.cs:
* SynchronizationOption.cs:
* TransactionAttribute.cs:
* TransactionIsolationLevel.cs:
New files added.
* ContextUtil.cs:
New internal constructor added, methods added.
* IRemoteDispatch.cs:
AutoComplete attributes added to methods
* TODOAttribute.cs:
Namespace adjusted.
2002-08-07 Tim Coleman <[email protected]>
* RegistrationErrorInfo.cs:
* RegistrationException.cs:
* RegistrationHelper.cs:
* ServicedComponent.cs:
New stubs added
2002-08-06 Tim Coleman <[email protected]>
* IRegistrationHelper.cs:
* IRemoteDispatch.cs:
* IServicedComponentInfo.cs:
* ITransaction.cs:
Comment out Guid attribute for now
because it doesn't build with CSC unless
you supply a valid Guid.
2002-08-06 Tim Coleman <[email protected]>
* DescriptionAttribute.cs:
* EventClassAttribute.cs:
* EventTrackingEnabledAttribute.cs:
* ExceptionClassAttribute.cs:
* IISIntrinsicsAttribute.cs:
* IRegistrationHelper.cs:
* IRemoteDispatch.cs:
* IServicedComponentInfo.cs:
* ITransaction.cs:
* InstallationFlags.cs:
* InterfaceQueuingAttribute.cs:
* JustInTimeActivationAttribute.cs:
* LoadBalancingSupportedAttribute.cs:
* MustRunInClientContextAttribute.cs:
* ObjectPoolingAttribute.cs:
* PrivateComponentAttribute.cs:
* PropertyLockMode.cs:
* PropertyReleaseMode.cs:
* XACTTRANSINFO.cs:
New stubs added.
2002-08-03 Tim Coleman <[email protected]>
* AccessChecksLevelOption.cs:
* ActivationOption.cs:
* ApplicationAccessControlAttribute.cs:
* ApplicationActivationAttribute.cs:
* ApplicationIDAttribute.cs:
* ApplicationNameAttribute.cs:
* ApplicationQueuingAttribute.cs:
* AuthenticationOption.cs:
* AutoCompleteAttribute.cs:
* BOID.cs:
* BYOT.cs:
* COMTIIntrinsicsAttribute.cs:
* ComponentAccessControlAttribute.cs:
* ConstructionEnabledAttribute.cs:
* ContextUtil.cs:
* ImpersonationLevelOption.cs:
* TransactionVote.cs:
New stubs added
2002-07-22 Tim Coleman <[email protected]>
* TransactionOption.cs: New enum added as
required by System.Web.Services
@@ -0,0 +1,45 @@
//
// System.EnterpriseServices.ComponentAccessControlAttribute.cs
//
// Author:
// Tim Coleman ([email protected])
//
// Copyright (C) Tim Coleman, 2002
//
using System;
namespace System.EnterpriseServices {
[AttributeUsage (AttributeTargets.Class)]
public sealed class ComponentAccessControlAttribute : Attribute {
#region Fields
bool val;
#endregion // Fields
#region Constructors
public ComponentAccessControlAttribute ()
{
this.val = false;
}
public ComponentAccessControlAttribute (bool val)
{
this.val = val;
}
#endregion // Constructors
#region Properties
public bool Value {
get { return val; }
set { val = value; }
}
#endregion // Properties
}
}
@@ -0,0 +1,53 @@
//
// System.EnterpriseServices.ConstructionEnabledAttribute.cs
//
// Author:
// Tim Coleman ([email protected])
//
// Copyright (C) Tim Coleman, 2002
//
using System;
namespace System.EnterpriseServices {
[AttributeUsage (AttributeTargets.Class)]
public sealed class ConstructionEnabledAttribute : Attribute {
#region Fields
string def;
bool val;
#endregion // Fields
#region Constructors
public ConstructionEnabledAttribute ()
{
def = String.Empty;
this.val = false;
}
public ConstructionEnabledAttribute (bool val)
{
def = String.Empty;
this.val = val;
}
#endregion // Constructors
#region Properties
public string Default {
get { return def; }
set { def = value; }
}
public bool Value {
get { return val; }
set { val = value; }
}
#endregion // Properties
}
}
@@ -0,0 +1,130 @@
//
// System.EnterpriseServices.ContextUtil.cs
//
// Author:
// Tim Coleman ([email protected])
//
// Copyright (C) Tim Coleman, 2002
//
using System;
namespace System.EnterpriseServices {
public sealed class ContextUtil {
#region Fields
static bool deactivateOnReturn;
static TransactionVote myTransactionVote;
#endregion // Fields
#region Constructors
internal ContextUtil ()
{
}
#endregion // Constructors
#region Properties
public static Guid ActivityId {
[MonoTODO]
get { throw new NotImplementedException (); }
}
public static Guid ApplicationId {
[MonoTODO]
get { throw new NotImplementedException (); }
}
public static Guid ApplicationInstanceId {
[MonoTODO]
get { throw new NotImplementedException (); }
}
public static Guid ContextId {
[MonoTODO]
get { throw new NotImplementedException (); }
}
public static bool DeactivateOnReturn {
get { return deactivateOnReturn; }
set { deactivateOnReturn = value; }
}
public static bool IsInTransaction {
[MonoTODO]
get { throw new NotImplementedException (); }
}
public static bool IsSecurityEnabled {
[MonoTODO]
get { throw new NotImplementedException (); }
}
[MonoTODO]
public static TransactionVote MyTransactionVote {
get { return myTransactionVote; }
set { myTransactionVote = value; }
}
public static Guid PartitionId {
[MonoTODO]
get { throw new NotImplementedException (); }
}
public static object Transaction {
[MonoTODO]
get { throw new NotImplementedException (); }
}
public static Guid TransactionId {
[MonoTODO]
get { throw new NotImplementedException (); }
}
#endregion // Properties
#region Methods
[MonoTODO]
public static void DisableCommit ()
{
throw new NotImplementedException ();
}
[MonoTODO]
public static void EnableCommit ()
{
throw new NotImplementedException ();
}
[MonoTODO]
public static object GetNamedProperty ()
{
throw new NotImplementedException ();
}
[MonoTODO]
public static bool IsCallerInRole ()
{
throw new NotImplementedException ();
}
[MonoTODO]
public static void SetAbort ()
{
throw new NotImplementedException ();
}
[MonoTODO]
public static void SetComplete ()
{
throw new NotImplementedException ();
}
#endregion // Methods
}
}
@@ -0,0 +1,31 @@
//
// System.EnterpriseServices.DescriptionAttribute.cs
//
// Author:
// Tim Coleman ([email protected])
//
// Copyright (C) Tim Coleman, 2002
//
using System;
namespace System.EnterpriseServices {
[AttributeUsage (AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Interface)]
public sealed class DescriptionAttribute : Attribute {
#region Fields
string desc;
#endregion // Fields
#region Constructors
public DescriptionAttribute (string desc)
{
this.desc = desc;
}
#endregion // Constructors
}
}
@@ -0,0 +1,54 @@
//
// System.EnterpriseServices.EventClassAttribute.cs
//
// Author:
// Tim Coleman ([email protected])
//
// Copyright (C) Tim Coleman, 2002
//
using System;
namespace System.EnterpriseServices {
[AttributeUsage (AttributeTargets.Class)]
public sealed class EventClassAttribute : Attribute {
#region Fields
bool allowInProcSubscribers;
bool fireInParallel;
string publisherFilter;
#endregion // Fields
#region Constructors
public EventClassAttribute ()
{
allowInProcSubscribers = true;
fireInParallel = false;
publisherFilter = null;
}
#endregion // Constructors
#region Properties
public bool AllowInProcSubscribers {
get { return allowInProcSubscribers; }
set { allowInProcSubscribers = value; }
}
public bool FireInParallel {
get { return fireInParallel; }
set { fireInParallel = value; }
}
public string PublisherFilter {
get { return publisherFilter; }
set { publisherFilter = value; }
}
#endregion // Properties
}
}
@@ -0,0 +1,44 @@
//
// System.EnterpriseServices.EventTrackingEnabledAttribute.cs
//
// Author:
// Tim Coleman ([email protected])
//
// Copyright (C) Tim Coleman, 2002
//
using System;
namespace System.EnterpriseServices {
[AttributeUsage (AttributeTargets.Class)]
public sealed class EventTrackingEnabledAttribute : Attribute {
#region Fields
bool val;
#endregion // Fields
#region Constructors
public EventTrackingEnabledAttribute ()
{
val = true;
}
public EventTrackingEnabledAttribute (bool val)
{
this.val = val;
}
#endregion // Constructors
#region Properties
public bool Value {
get { return val; }
}
#endregion // Properties
}
}
@@ -0,0 +1,39 @@
//
// System.EnterpriseServices.ExceptionClassAttribute.cs
//
// Author:
// Tim Coleman ([email protected])
//
// Copyright (C) Tim Coleman, 2002
//
using System;
namespace System.EnterpriseServices {
[AttributeUsage (AttributeTargets.Class)]
public sealed class ExceptionClassAttribute : Attribute {
#region Fields
string name;
#endregion // Fields
#region Constructors
public ExceptionClassAttribute (string name)
{
this.name = name;
}
#endregion // Constructors
#region Properties
public string Value {
get { return name; }
}
#endregion // Properties
}
}
@@ -0,0 +1,44 @@
//
// System.EnterpriseServices.IISIntrinsicsAttribute.cs
//
// Author:
// Tim Coleman ([email protected])
//
// Copyright (C) Tim Coleman, 2002
//
using System;
namespace System.EnterpriseServices {
[AttributeUsage (AttributeTargets.Class)]
public sealed class IISIntrinsicsAttribute : Attribute {
#region Fields
bool val;
#endregion // Fields
#region Constructors
public IISIntrinsicsAttribute ()
{
val = true;
}
public IISIntrinsicsAttribute (bool val)
{
this.val = val;
}
#endregion // Constructors
#region Properties
public bool Value {
get { return val; }
}
#endregion // Properties
}
}
@@ -0,0 +1,26 @@
//
// System.EnterpriseServices.IRegistrationHelper.cs
//
// Author:
// Tim Coleman ([email protected])
//
// Copyright (C) Tim Coleman, 2002
//
using System;
using System.Runtime.InteropServices;
namespace System.EnterpriseServices {
//[Guid ("")]
[InterfaceType (ComInterfaceType.InterfaceIsIUnknown)]
public interface IRegistrationHelper {
#region Methods
void InstallAssembly (string assembly, out string application, out string tlb, InstallationFlags installFlags);
void UninstallAssembly (string assembly, string application);
#endregion
}
}
@@ -0,0 +1,27 @@
//
// System.EnterpriseServices.IRemoteDispatch.cs
//
// Author:
// Tim Coleman ([email protected])
//
// Copyright (C) Tim Coleman, 2002
//
using System;
using System.Runtime.InteropServices;
namespace System.EnterpriseServices {
//[Guid ("")]
public interface IRemoteDispatch {
#region Methods
[AutoComplete]
string RemoteDispatchAutoDone (string s);
[AutoComplete]
string RemoteDispatchNotAutoDone (string s);
#endregion // Methods
}
}
@@ -0,0 +1,34 @@
//
// System.EnterpriseServices.ISecurityCallContext.cs
//
// Author:
// Tim Coleman ([email protected])
//
// Copyright (C) Tim Coleman, 2002
//
using System;
using System.Collections;
namespace System.EnterpriseServices {
internal interface ISecurityCallContext {
#region Properties
int Count {
get;
}
#endregion
#region Methods
void GetEnumerator (ref IEnumerator enumerator);
object GetItem (string user);
bool IsCallerInRole (string role);
bool IsSecurityEnabled ();
bool IsUserInRole (ref object user, string role);
#endregion
}
}
@@ -0,0 +1,31 @@
//
// System.EnterpriseServices.ISecurityCallersColl.cs
//
// Author:
// Tim Coleman ([email protected])
//
// Copyright (C) Tim Coleman, 2002
//
using System;
using System.Collections;
namespace System.EnterpriseServices {
internal interface ISecurityCallersColl {
#region Properties
int Count {
get;
}
#endregion
#region Methods
void GetEnumerator (out IEnumerator enumerator);
ISecurityIdentityColl GetItem (int idx);
#endregion // Methods
}
}
@@ -0,0 +1,31 @@
//
// System.EnterpriseServices.ISecurityIdentityColl.cs
//
// Author:
// Tim Coleman ([email protected])
//
// Copyright (C) Tim Coleman, 2002
//
using System;
using System.Collections;
namespace System.EnterpriseServices {
internal interface ISecurityIdentityColl {
#region Properties
int Count {
get;
}
#endregion // Properties
#region Methods
void GetEnumerator (out IEnumerator enumerator);
SecurityIdentity GetItem (int idx);
#endregion // Methods
}
}
@@ -0,0 +1,24 @@
//
// System.EnterpriseServices.IServicedComponentInfo.cs
//
// Author:
// Tim Coleman ([email protected])
//
// Copyright (C) Tim Coleman, 2002
//
using System;
using System.Runtime.InteropServices;
namespace System.EnterpriseServices {
//[Guid ("")]
[InterfaceType (ComInterfaceType.InterfaceIsIUnknown)]
public interface IServicedComponentInfo {
#region Methods
void GetComponentInfo (ref int infoMask, out string[] infoArray);
#endregion // Methods
}
}
@@ -0,0 +1,24 @@
//
// System.EnterpriseServices.SharedProperty.cs
//
// Author:
// Tim Coleman ([email protected])
//
// Copyright (C) Tim Coleman, 2002
//
using System;
namespace System.EnterpriseServices {
internal interface ISharedProperty {
#region Properties
object Value {
get;
set;
}
#endregion
}
}
Loaded 100 of 904 files, more files were not shown because too many files have changed in this diff. Show more