Compare commits

...
532 Commits
Author SHA1 Message Date
nobody 8f0db6b551 This commit was manufactured by cvs2svn to create tag 'MCS_0_18'.
svn path=/tags/MCS_0_18/mcs/; revision=10436
2003-01-12 19:15:31 +00:00
Paolo Molaro db1f8f193e Sun Jan 12 19:58:42 CET 2003 Paolo Molaro <[email protected]>
* attribute.cs: only set GuidAttr to true when we have a
	GuidAttribute.

svn path=/trunk/mcs/; revision=10435
2003-01-12 19:15:31 +00:00
Miguel de Icaza 2a1ea43f4f Flush
svn path=/trunk/mcs/; revision=10434
2003-01-12 19:08:20 +00:00
Miguel de Icaza a4455e3f30 Flush
svn path=/trunk/mono/; revision=10429
2003-01-12 18:27:25 +00:00
Duncan Mak b5ffea4ee2 2003-01-12 Varga Zoltan <[email protected]>
* ArrayList.cs (RemoveRange): Patch for allowing zero-size
	removal at the end of a list. It also cleans up the argument
	checking code so the raised exceptions have the same message as
	under MS.NET.

svn path=/trunk/mcs/; revision=10426
2003-01-12 17:25:00 +00:00
Alp Toker f12bca6432 2003-01-12 Alp Toker <[email protected]>
* exception.c: Typo fix: insinde -> inside

svn path=/trunk/mono/; revision=10425
2003-01-12 17:11:09 +00:00
Gaurav Vaish 8594aa5558 2003-01-12 Gaurav Vaish <gvaish_mono AT lycos.com>
* MobileControl.cs       : Stub-ing completed. ;-)
	* ControlPager.cs        : Dummy implementation.

svn path=/trunk/mcs/; revision=10420
2003-01-12 16:25:05 +00:00
Rafael Teixeira f0afb017f7 make test
svn path=/trunk/mcs/; revision=10419
2003-01-12 16:06:14 +00:00
Sebastien Pouliot 314581e888 *** empty log message ***
svn path=/trunk/mono/; revision=10418
2003-01-12 15:58:55 +00:00
Sebastien Pouliot ea6e288bca 2003-01-12 Sebastien Pouliot <[email protected]>
* corlib_linux_test.args: added MACTripleDES test file.

svn path=/trunk/mcs/; revision=10417
2003-01-12 15:57:45 +00:00
Sebastien Pouliot 1f21c2668b 2003-01-12 Sebastien Pouliot <[email protected]>
* HashAlgorithmTest.cs: Added new test for null streams.
	* MACTripleDESTest.cs: New. Test suite par MAC using 3DES.

svn path=/trunk/mcs/; revision=10416
2003-01-12 15:54:36 +00:00
Sebastien Pouliot 7ec2e18907 2003-01-12 Sebastien Pouliot <[email protected]>
* MACTripleDES.cs: Now working (the problem was with my stream usage
	which was removed for performance reason).
	* TripleDES.cs: Fixed key generation (wasn't called and returned
	null).

svn path=/trunk/mcs/; revision=10415
2003-01-12 15:53:37 +00:00
Gaurav Vaish 1e44ddf80c 2003-01-12 Gaurav Vaish <gvaish_mono AT lycos.com>
* FontInfo.cs            : Implemented.
	* Form.cs                : Initial implementation.
	* Panel.cs               : Initial implementation.
	* MobileControl.cs       : Stubbed all properties.

svn path=/trunk/mcs/; revision=10414
2003-01-12 14:02:20 +00:00
Gonzalo Paniagua Javier db545706f5 2003-01-12 Gonzalo Paniagua Javier <[email protected]>
* StringCollection.cs: fixed range checks in CopyTo.

svn path=/trunk/mcs/; revision=10407
2003-01-12 08:37:20 +00:00
Gonzalo Paniagua Javier 89c6198dab 2003-01-12 Gonzalo Paniagua Javier <[email protected]>
* Exception.cs: changed default message to match MS one.

svn path=/trunk/mcs/; revision=10406
2003-01-12 08:09:12 +00:00
Duncan Mak 59aa23f847 2003-01-13 Duncan Mak <[email protected]>
* Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
	gc-internal.h.

svn path=/trunk/mono/; revision=10402
2003-01-12 05:38:22 +00:00
Jonathan Pryor c095b052d9 Fix makefile so type-reflector doesn't build when it doesn't need to.
svn path=/trunk/mcs/; revision=10401
2003-01-12 05:31:24 +00:00
Patrik Torstensson fad04e5265 2002-01-12 Patrik Torstensson <[email protected]>
* string-icall.[c|h], icall.c: Added support for CompareOrdinal mode

svn path=/trunk/mono/; revision=10398
2003-01-12 01:35:35 +00:00
Patrik Torstensson 13320bfb6b 2003-01-12 Patrik Torstensson <[email protected]>
* String.cs: Fixed bug with CompareOrdinal

svn path=/trunk/mcs/; revision=10397
2003-01-12 01:30:01 +00:00
Nick Drochak 16ec731a80 2003-01-12 Nick Drochak <[email protected]>
* TestResult.xml: Generated result file. Shouldn't be in CVS.

svn path=/trunk/mcs/; revision=10396
2003-01-12 00:20:56 +00:00
Johannes Roith f157a946e8 fix typo.
svn path=/trunk/mcs/; revision=10395
2003-01-11 23:18:54 +00:00
Martin Baulig 5a9fcf1c4f 2003-01-11 Martin Baulig <[email protected]>
* debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
	this to 20 for the release.

svn path=/trunk/mono/; revision=10373
2003-01-11 13:45:48 +00:00
Jonathan Pryor ead0797e43 Allow greater control of property generation by derived classes (through
PropertyFormat properties).

Fix a bug where the ReflectionNodeFinder wouldn't display the value of static
properties (it was using an invalid instance reference).

svn path=/trunk/mcs/; revision=10372
2003-01-11 04:42:20 +00:00
Patrik Torstensson 4ec4a564e6 2003-01-10 Patrik Torstensson <[email protected]>
* ThreadPool.cs: Temporary removed the usage of monitor thread,
			implemented a model more equal to the MS one.

svn path=/trunk/mcs/; revision=10368
2003-01-11 00:30:58 +00:00
Gonzalo Paniagua Javier b4ff470fda 2003-01-11 Gonzalo Paniagua Javier <[email protected]>
* XmlTextReader.cs:
	(ReadOuterXml): use Depth property which return elementDepth, not depth.

svn path=/trunk/mcs/; revision=10367
2003-01-11 00:02:34 +00:00
Gonzalo Paniagua Javier 0305ecc846 2003-01-10 Gonzalo Paniagua Javier <[email protected]>
* Enum.cs: implements IFormattable.

svn path=/trunk/mcs/; revision=10366
2003-01-10 22:46:54 +00:00
Duncan Mak eb8965458e 2003-01-10 Duncan Mak <[email protected]>
* ArrayList.cs (Insert): Patch from Zoltan
	([email protected]).

svn path=/trunk/mcs/; revision=10363
2003-01-10 21:54:44 +00:00
Duncan Mak 544d9defeb 2003-01-10 Duncan Mak <[email protected]>
* list.unix (CSharpCodeCompiler): Add
	Microsoft.Charp.CSharpCodeCompiler for Sean Kasun.

	* CSharpCodeCompiler.cs:
	* CSharpCodeProvider.cs: Patch from Sean Kasun
	<[email protected]> to implement CSharpCodeCompiler.

	* CompilerErrorCollection.cs:
	* CompilerParameters.cs: Patch from Sean Kasun
	<[email protected]> implementing most of the MonoTODOs in
	CompilerErrorCollection and the CompilerParameters overloads in CompilerParameters.cs.

svn path=/trunk/mcs/; revision=10362
2003-01-10 21:38:30 +00:00
Zoltan Varga 7769949627 2003-01-10 Zoltan Varga <[email protected]>
* ILGenerator.cs: Implemented EmitWriteLine(string).

svn path=/trunk/mcs/; revision=10359
2003-01-10 19:33:12 +00:00
Zoltan Varga 79aae4e91e 2003-01-10 Zoltan Varga <[email protected]>
* TypeBuilder.cs (DefineInitializedData): Call DefineNestedType()
	instead of DefineType() so the auxiliary types do not pollute the
	global namespace. This is consistent with the behaviour of MS .NET.

svn path=/trunk/mcs/; revision=10358
2003-01-10 19:29:03 +00:00
Gaurav Vaish 875085a576 2003-01-10 Gaurav Vaish <gvaish_mono AT lycos.com>
* DeviceSpecific.cs      : Dummy implementation.
	* MobilePage.cs          : GetControlAdapter(MobileControl) - Stubbed.
	* MobileControl.cs       : Adapter        { get; }      - Implemented
	                         : BreakAfter     { get; set; } - Stubbed.
	                         : DeviceSpecific { get; set; } - Stubbed.
	                         : MobilePage     { get; }      - Stubbed.

svn path=/trunk/mcs/; revision=10353
2003-01-10 19:08:56 +00:00
Atsushi Eno 464d99efee 2003-01-11 Atsushi Enomoto <[email protected]>
* XmlElementTests.cs : added TestInnerTextAndEvent test.
	  (and many coding style fix.)
	* XmlTextReaderTests.cs : tiny argument order fix for TestAttributeWithEntityReference test.

svn path=/trunk/mcs/; revision=10350
2003-01-10 18:51:31 +00:00
Atsushi Eno ef0e31f171 2003-01-11 Atsushi Enomoto <[email protected]>
* XmlElement.cs : (by ville) XmlElement.set_InnerText event bugfix.
	* XmlTextReader.cs : some fix for ReadOuterXml().

svn path=/trunk/mcs/; revision=10349
2003-01-10 18:50:39 +00:00
Gaurav Vaish e67543ba67 2003-01-10 Gaurav Vaish <gvaish_mono AT lycos.com>
* IObjectListFieldCollection.cs,
	* IPageAdapter.cs,
	* ITemplateable.cs                    : Added interface.
	* ObjectListField.cs                  : Dummy implementation.

svn path=/trunk/mcs/; revision=10344
2003-01-10 17:58:51 +00:00
Gaurav Vaish b76e1498d1 2003-01-10 Gaurav Vaish <gvaish_mono AT lycos.com>
* MobileListItemType.cs,
	* ObjectListViewMode.cs,
	* WmlListFieldType.cs,    // Failed to locate enumeration!
	* Wrapping.cs
	                         : Added enumerations.

svn path=/trunk/mcs/; revision=10343
2003-01-10 17:30:32 +00:00
Dietmar Maurer 3918d71392 2003-01-10 Dietmar Maurer <[email protected]>
* marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT

svn path=/trunk/mono/; revision=10341
2003-01-10 17:23:22 +00:00
Dietmar Maurer 0cb993900a more explicit layout related fixes
svn path=/trunk/mono/; revision=10340
2003-01-10 16:40:46 +00:00
Dietmar Maurer fe1f469a15 2003-01-10 Dietmar Maurer <[email protected]>
* marshal.c (emit_struct_conv): added an assertion for EXPLICIT_LAYOUT

svn path=/trunk/mono/; revision=10339
2003-01-10 16:31:27 +00:00
Dietmar Maurer c148129bd9 *** empty log message ***
svn path=/trunk/mono/; revision=10338
2003-01-10 16:19:43 +00:00
Dietmar Maurer 114dcd4c27 2003-01-10 Dietmar Maurer <[email protected]>
* loader.c (mono_method_get_marshal_info): bug fix

	* marshal.c (mono_marshal_get_ptr_to_struct): don't convert
	structures with explicit layout

svn path=/trunk/mono/; revision=10337
2003-01-10 16:18:13 +00:00
Jonathan Pryor b12c11330b Allow GUI front-ends to be used by default.
This allows ``type-reflector.exe'' (no arguments) to open a Gtk# window which
can be later used to open an Assembly.

svn path=/trunk/mcs/; revision=10336
2003-01-10 15:47:21 +00:00
Jonathan Pryor 99f0d27705 Don't require that types be specified on the command line if the displayer
doesn't require them.

For example, it's sensible for a GUI program to load without having any
assembly loaded, so there's no reason for assemblies/types to be specified.

This allows us to do:

    type-reflector --displayer=gtk

And get an empty Gtk# window (which can be later filled by using
File->Open...).

svn path=/trunk/mcs/; revision=10335
2003-01-10 15:08:10 +00:00
Paolo Molaro b2b4e687a2 Fri Jan 10 16:03:30 CET 2003 Paolo Molaro <[email protected]>
* ILGenerator.cs, MethodBuilder.cs, TypeBuilder.cs,
	ConstructorBuilder.cs: some tweaks to reduce memory usage.

svn path=/trunk/mcs/; revision=10334
2003-01-10 15:06:28 +00:00
Paolo Molaro 6ac813aeec Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <[email protected]>
* profiler.c: made the output more readable (and sorted).
	Added caller information for the allocation profiler.

svn path=/trunk/mono/; revision=10333
2003-01-10 15:02:00 +00:00
Dietmar Maurer ce0aeca153 also test isinst
svn path=/trunk/mono/; revision=10332
2003-01-10 14:57:05 +00:00
Dietmar Maurer 79bc748bc3 new test
svn path=/trunk/mono/; revision=10331
2003-01-10 14:32:01 +00:00
Jonathan Pryor b533e9d4d6 Better namespace partitioning. Instead of having all files in the same
namespace, partition into namespaces according to purpose.  For example, all
formatters (CSharp, VB, Default, etc.) are moved to the
Mono.TypeReflector.Formatters namespace.

Similar things were done for finders and displayers.

svn path=/trunk/mcs/; revision=10330
2003-01-10 14:16:07 +00:00
Gonzalo Paniagua Javier 8df50f0a41 2003-01-10 Gonzalo Paniagua Javier <[email protected]>
* README.building: New file.
	* makefile.gnu: install README.building file.

svn path=/trunk/mcs/; revision=10329
2003-01-10 09:44:59 +00:00
Gonzalo Paniagua Javier 3ba86a68ad 2003-01-10 Gonzalo Paniagua Javier <[email protected]>
* AspGenerator.cs: cast to Control if the container does not implement
	INamingContainer.

svn path=/trunk/mcs/; revision=10327
2003-01-10 08:41:11 +00:00
Gonzalo Paniagua Javier 825f31d939 2003-01-10 Gonzalo Paniagua Javier <[email protected]>
* HttpApplication.cs: keep _lasterror if no context. Attach
	application events *after* modules initialization (if not, User is not
	set when the user handler is called).

	* HttpApplicationFactory.cs: made all methods related to
	AttachEvents static. I will fix OnStart/OnEnd for application and
	session later.

	* HttpRequest.cs: don't initialize cookies twice.

svn path=/trunk/mcs/; revision=10326
2003-01-10 07:57:39 +00:00
Sebastien Pouliot 3dc7aa9132 2003-01-09 Sebastien Pouliot <[email protected]>
* AUTHORS: add myself to class library list

svn path=/trunk/mcs/; revision=10325
2003-01-10 03:04:20 +00:00
Sebastien Pouliot f91bb446ef 2003-01-09 Sebastien Pouliot <[email protected]>
* RNGCryptoServiceProvider.cs: Changed methods interacting with
	the runtime as Internal<MethodName>. This will allow to make the
	class Windows-compatible by doing a switch at runtime.

svn path=/trunk/mcs/; revision=10324
2003-01-10 02:33:04 +00:00
Sebastien Pouliot c5b1bb53c4 2003-01-09 Sebastien Pouliot <[email protected]>
* icall.c, rand.c, rand.h: Prepended RNG functions with Internal.

svn path=/trunk/mono/; revision=10323
2003-01-10 02:26:36 +00:00
Gonzalo Paniagua Javier 2bbefc17f4 2003-01-10 Gonzalo Paniagua Javier <[email protected]>
* makefile.gnu: added resource file.

svn path=/trunk/mcs/; revision=10322
2003-01-10 02:12:25 +00:00
Gonzalo Paniagua Javier 57f64df400 2003-01-10 Gonzalo Paniagua Javier <[email protected]>
* AppDomain.cs: implemented DoCallBack method.
	* MonoType.cs:
	(GetConstructorImpl): when the flag is BindingFlags.Default, set it to
	Public, Instance.

	NUnit2 tests start moving.

svn path=/trunk/mcs/; revision=10321
2003-01-10 02:11:16 +00:00
Jonathan Pryor 6d1edcc097 Provide a passable, if ugly, solution to the question posted to mono-list and
mono-hackers: how to provide support for what the build platform provides.

For example, if you're on Windows and have System.Windows.Forms but not Gtk#,
the default compile should give you System.Windows.Forms support and console
output.

If you're on Linux with Gtk# and no System.Windows.Forms, you should get Gtk#
support from the default compile.

Next trick: default to the GUI displayer, not the console displayer, if
--displayer isn't specified.  I have no idea how to pull that off...

svn path=/trunk/mcs/; revision=10320
2003-01-10 02:01:30 +00:00
Gonzalo Paniagua Javier 5a26321c22 2003-01-10 Gonzalo Paniagua Javier <[email protected]>
* AspGenerator.cs: fixed a couple of thinkos related to IsSubclassOf.

svn path=/trunk/mcs/; revision=10319
2003-01-10 01:16:10 +00:00
Gonzalo Paniagua Javier c499ff3b51 2003-01-10 Gonzalo Paniagua Javier <[email protected]>
* Page.cs: make it fire the LoadData related events also for controls
	such as ImageButton, whose variable(s) in the query string are of the
	form ctrl_name.x and only fire them once per control.

svn path=/trunk/mcs/; revision=10318
2003-01-10 01:13:49 +00:00
Gonzalo Paniagua Javier 69bb122b82 2003-01-10 Gonzalo Paniagua Javier <[email protected]>
* HttpResponse.cs:
	(ApplyAppPathModifiers): return the root directory for "".

svn path=/trunk/mcs/; revision=10317
2003-01-10 01:11:53 +00:00
Marco Ridoni 0936098eb5 Big New Year patch:
- Exit partly implemented (behaves like 'break' in C#)
- Arrays working (still very buggy and work only if declared
  statically - e.g. Dim MyArray(2,3) - but the plumbing is in place)
- Field and Local declarations have been re-coded in the grammar

svn path=/trunk/mcs/; revision=10316
2003-01-10 00:19:51 +00:00
Jonathan Pryor 55c9ab6a39 Remove dependence upon compiler symbols for GUI support (e.g. HAVE_GUI_GTK,
HAVE_GUI_SWF) by placing this information within type-reflector.exe.config.

This also provides for user-provided formatters/finders/displayers.  They
merely need to write a class and add it to the appropriate section.

svn path=/trunk/mcs/; revision=10315
2003-01-09 23:21:32 +00:00
Gonzalo Paniagua Javier 636ed33ad5 2003-01-09 Gonzalo Paniagua Javier <[email protected]>
* Activator.cs: fixed bug #36052. Also added checks to avoid trying to
	instantiate an abstract class.

svn path=/trunk/mcs/; revision=10313
2003-01-09 22:34:35 +00:00
Gonzalo Paniagua Javier f726ea6038 2003-01-09 Gonzalo Paniagua Javier <[email protected]>
* icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
	to get value types.

svn path=/trunk/mono/; revision=10312
2003-01-09 22:32:02 +00:00
Miguel de Icaza d506c0911d Some fixes for jstrike to look at
svn path=/trunk/mcs/; revision=10311
2003-01-09 22:25:56 +00:00
Gonzalo Paniagua Javier 383931b0ac 2003-01-09 Gonzalo Paniagua Javier <[email protected]>
* ecore.cs:
	* expression.cs:
	* typemanager.cs: fixes to allow mcs compile corlib with the new
	Type.IsSubclassOf fix.

svn path=/trunk/mcs/; revision=10310
2003-01-09 22:24:40 +00:00
Gonzalo Paniagua Javier 7e2eecd0d0 2003-01-09 Gonzalo Paniagua Javier <[email protected]>
* Type.cs:
	(IsSubclassOf): return false when null. Use != instead of Equals.

svn path=/trunk/mcs/; revision=10309
2003-01-09 22:21:52 +00:00
Gaurav Vaish 3b996b920f 2003-01-09 Gaurav Vaish <gvaish_mono AT lycos.com>
* MobileControl.cs       : Added some more properties (dummies).
	* Alignment.cs,
	* BooleanOption.cs,
	* CommandFormat.cs,
	* FontSize.cs,
	* FormMethod.cs,
	* ListDecoration.cs,
	* ListSelectType.cs,
	                         : Added enumerations.

svn path=/trunk/mcs/; revision=10307
2003-01-09 18:51:19 +00:00
Paolo Molaro e1072fa87e Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <[email protected]>
* object.c, profiler.h, profiler.c, profiler-private.h:
	Added object allocation profiler.

svn path=/trunk/mono/; revision=10306
2003-01-09 18:46:35 +00:00
Gaurav Vaish 3350778a00 2003-01-09 Gaurav Vaish <gvaish_mono AT lycos.com>
* assemblies.xml     : Needed for Mobile controls enumerations.

svn path=/trunk/mcs/; revision=10305
2003-01-09 18:12:19 +00:00
Paolo Molaro 5feab0a69a Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <[email protected]>
* reflection.h, reflection.c: handle global methods.
	Compress blob entries.

svn path=/trunk/mono/; revision=10304
2003-01-09 15:23:01 +00:00
Paolo Molaro f48ee288b9 Cut&pasted code got the cut before the off-by-one fix.
svn path=/trunk/mono/; revision=10303
2003-01-09 15:18:14 +00:00
Paolo Molaro d845777e9d Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <[email protected]>
* marshal.c: fix compilation.

svn path=/trunk/mono/; revision=10302
2003-01-09 14:57:32 +00:00
Jaime Anguiano Olarra 4eea199abb Fix.
svn path=/trunk/mono/; revision=10301
2003-01-09 14:56:40 +00:00
Dietmar Maurer 621c256867 2003-01-09 Dietmar Maurer <[email protected]>
* loader.c (mono_method_get_marshal_info): impl.

	* metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info

svn path=/trunk/mono/; revision=10300
2003-01-09 13:00:53 +00:00
Gonzalo Paniagua Javier 23e5b795c3 2003-01-09 Gonzalo Paniagua Javier <[email protected]>
* icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
	for reference types.

svn path=/trunk/mono/; revision=10299
2003-01-09 08:18:56 +00:00
Gonzalo Paniagua Javier 764e2b9db0 2003-01-09 Gonzalo Paniagua Javier <[email protected]>
* Type.cs: fixed IsSubclassOf. Patch from Zoltan Varga.

svn path=/trunk/mcs/; revision=10298
2003-01-09 08:12:04 +00:00
Jonathan Pryor 5bb9f62508 Lots of changes all over the map. See ChangeLog for details.
The biggest change is a System.Windows.Forms front-end.  It doesn't look as
nice (visually) as the Gtk# front-end, but it's better because it works.
Mwa-ha-ha-ha.  Err, sorry.

To be more specific, the Gtk# front-end works, but (at present) it must build
the entire tree at once, during initialization.

The swf front-end doesn't.  When you attempt to expand a node, it's at *that*
point that it looks for sub-nodes, allowing you to use (for example) the
reflection finder (--finder=reflection) and start clicking lots of `+' signs
to get properties of properties of properties...  (Make sure verbose output is
enabled to see what I mean.)

This is the approach I want Gtk# to ultimately follow, as soon as I figure out
how to do that (read: Gtk# allows me to do it cleanly).

svn path=/trunk/mcs/; revision=10297
2003-01-09 02:44:32 +00:00
Miguel de Icaza 784686c87e 2003-01-08 Miguel de Icaza <[email protected]>
* cs-parser.jay (fixed_statement): take a type instead of a
	pointer_type, so we can produce a better error message later.

	* statement.cs (Fixed.Resolve): Flag types that are not pointers
	as an error.

svn path=/trunk/mcs/; revision=10294
2003-01-08 22:38:38 +00:00
Miguel de Icaza e6a5308498 Add new error
svn path=/trunk/mcs/; revision=10293
2003-01-08 22:32:01 +00:00
Miguel de Icaza b3d6aded2a 2003-01-08 Miguel de Icaza <[email protected]>
* statement.cs: First populate the pinned variables, then emit the
	statement, then clear the variables.  Before I was emitting the
	code once for each fixed piece.

svn path=/trunk/mcs/; revision=10291
2003-01-08 21:46:34 +00:00
Miguel de Icaza 7c508a6f59 Improve test
svn path=/trunk/mcs/; revision=10290
2003-01-08 21:40:55 +00:00
Jaime Anguiano Olarra a70b90adb0 Fixed typo.
svn path=/trunk/mono/; revision=10289
2003-01-08 21:08:56 +00:00
Paolo Molaro cec5ae1ae9 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <[email protected]>
* loader.c: fixed off by one error in loaded parameter names.

svn path=/trunk/mono/; revision=10288
2003-01-08 19:14:35 +00:00
Gaurav Vaish a02ac6a4ad 2003-01-08 Gaurav Vaish <gvaish_mono AT lycos.com>
* IControlAdapter.cs     : Completed interface.
	* MobileControl.cs       : Initial implementation.
	* MobilePage.cs          : Dummy implementation.

svn path=/trunk/mcs/; revision=10287
2003-01-08 18:58:38 +00:00
Gaurav Vaish 7496998985 2003-01-08 Gaurav Vaish <gvaish_mono AT lycos.com>
* TODOAttribute.cs         : Added MonoTODO Attribute
	* ChangeLog                : Added file

svn path=/trunk/mcs/; revision=10286
2003-01-08 18:55:19 +00:00
Gaurav Vaish 1bc4619881 2003-01-08 Gaurav Vaish <gvaish_mono AT lycos.com>
* .cvsignore                             : Ignores local files
	* System.Web.Mobile.build                : The build file

svn path=/trunk/mcs/; revision=10285
2003-01-08 18:23:43 +00:00
Gaurav Vaish a3fc216cd1 2003-01-08 Gaurav Vaish <gvaish_mono AT lycos.com>
* System.Web.Mobile,
	* System.Web.UI.MobileControls,
	* System.Web.UI.MobileControls.Adapters  : Added directories

svn path=/trunk/mcs/; revision=10284
2003-01-08 18:10:03 +00:00
Miguel de Icaza c223ac0456 Patch from Piers
svn path=/trunk/mcs/; revision=10283
2003-01-08 18:00:00 +00:00
Dietmar Maurer a29ff00f6e 2003-01-08 Dietmar Maurer <[email protected]>
* marshal.c (mono_marshal_get_icall_wrapper): like
	mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
	instead of a MonoMethod.

svn path=/trunk/mono/; revision=10282
2003-01-08 17:38:59 +00:00
Dick Porter 58d5f4b1e1 2003-01-08 Dick Porter <[email protected]>
* Win32Exception.cs (ComponentModel): Added EWOULDBLOCK

svn path=/trunk/mcs/; revision=10281
2003-01-08 15:59:42 +00:00
Dick Porter 605ce25a5d 2003-01-08 Dick Porter <[email protected]>
* sockets.c: Fixed setting blocking mode to true (fixes bug 36388)

svn path=/trunk/mono/; revision=10280
2003-01-08 15:57:30 +00:00
Dietmar Maurer 5effc7c4c8 (x86_unwind_native_frame): disable unnecessary assertion
svn path=/trunk/mono/; revision=10279
2003-01-08 15:39:10 +00:00
Dietmar Maurer 00008d5186 2003-01-08 Dietmar Maurer <[email protected]>
* exception.c (ves_icall_get_frame_info): skip one more frame and also
	MONO_WRAPPER_RUNTIME_INVOKE wrappers

svn path=/trunk/mono/; revision=10278
2003-01-08 12:40:08 +00:00
Martin Baulig 0fbb4f9b23 2003-01-08 Martin Baulig <[email protected]>
* statement.cs (FlowBranching.MergeChild): A break in a
	SWITCH_SECTION does not leave a loop.  Fixes #36155.

svn path=/trunk/mcs/; revision=10277
2003-01-08 11:42:49 +00:00
Martin Baulig f4ba006995 2003-01-08 Martin Baulig <[email protected]>
* statement.cs (FlowBranching.CheckOutParameters): `struct_params'
	lives in the same number space than `param_map'.  Fixes #36154.

svn path=/trunk/mcs/; revision=10276
2003-01-08 11:16:10 +00:00
Gaurav Vaish f779a4dc96 2003-01-08 Gaurav Vaish <gvaish_mono AT lycos.com>
* System.Web.Mobile  : Added new directory

svn path=/trunk/mcs/; revision=10275
2003-01-08 10:27:15 +00:00
Gonzalo Paniagua Javier f72695f958 2003-01-08 Gonzalo Paniagua Javier <[email protected]>
* DataGrid.cs: default value for ShowHeaders is true. Fixed style for
	Header and Footer.
	* DataGridColumn.cs: added SetOwner method.
	* DataGridColumnCollection.cs: set the owner of the column when added.

svn path=/trunk/mcs/; revision=10272
2003-01-08 05:57:24 +00:00
Gonzalo Paniagua Javier bdb14f3711 2003-01-08 Gonzalo Paniagua Javier <[email protected]>
* DataBinder.cs:
	(GetPropertyValue): don't try to get the property as indexed

svn path=/trunk/mcs/; revision=10271
2003-01-08 05:55:06 +00:00
Gonzalo Paniagua Javier d16f2f3722 forgot this one
svn path=/trunk/mcs/; revision=10270
2003-01-08 05:53:06 +00:00
Gonzalo Paniagua Javier 5b52c01d8f 2003-01-08 Gonzalo Paniagua Javier <[email protected]>
* DbDataRecord.cs: return DbNull.Value in GetValue () if value is null.

svn path=/trunk/mcs/; revision=10269
2003-01-08 05:52:24 +00:00
Gonzalo Paniagua Javier 9297c6d626 2003-01-08 Gonzalo Paniagua Javier <[email protected]>
* DataColumnPropertyDescriptor.cs: store columnIndex in the .ctor.

svn path=/trunk/mcs/; revision=10268
2003-01-08 05:51:16 +00:00
Gonzalo Paniagua Javier 60789fe78f 2003-01-08 Gonzalo Paniagua Javier <[email protected]>
* AspElements.cs: attributes without value lacked a space afterwards.

svn path=/trunk/mcs/; revision=10267
2003-01-08 00:25:42 +00:00
Gonzalo Paniagua Javier 79f64cde76 2003-01-08 Gonzalo Paniagua Javier <[email protected]>
* HttpUtility.cs: fixed HtmlDecode to avoid ArgumentOutOfRangeException.

svn path=/trunk/mcs/; revision=10266
2003-01-07 23:42:27 +00:00
Gonzalo Paniagua Javier f71e7daac7 2003-01-08 Gonzalo Paniagua Javier <[email protected]>
* BoundColumn.cs: typo.
	* DataGrid.cs: use 'as' instead of casting. Typo.
	* HyperLinkColumn.cs: call OnColumnChanged when any property change.
	Mono-stylized.

svn path=/trunk/mcs/; revision=10264
2003-01-07 23:21:44 +00:00
Gonzalo Paniagua Javier 3240745d32 2003-01-08 Gonzalo Paniagua Javier <[email protected]>
* DataBinder.cs: use TypeDescriptor to get the properties and their
	values.

svn path=/trunk/mcs/; revision=10263
2003-01-07 23:18:02 +00:00
Gonzalo Paniagua Javier a825320f7c 2003-01-08 Gonzalo Paniagua Javier <[email protected]>
* TypeDescriptor.cs: use ICustomTypeDescriptor if the component
	implements it. It's done for GetProperties and should be done for the
	rest of methods present in ICustomTypeDescriptor.

svn path=/trunk/mcs/; revision=10262
2003-01-07 23:16:13 +00:00
Gonzalo Paniagua Javier 833088d020 2003-01-08 Gonzalo Paniagua Javier <[email protected]>
* list: added System.Data/DataTablePropertyDescriptor.cs
	* System.Data/DataColumnPropertyDescriptor.cs: fixed typo.
	* System.Data/DataViewManagerListItemTypeDescriptor.cs: added new
	internal property to get the DataViewManager and removed TablePD class.
	* System.Data/DataTablePropertyDescriptor.cs: TablePD class is now this
	one as suggested by danmorg.

svn path=/trunk/mcs/; revision=10261
2003-01-07 23:14:02 +00:00
Miguel de Icaza 6caf7d27e4 2003-01-07 Miguel de Icaza <[email protected]>
* cs-parser.jay (constructor_declaration): Set the
	Constructor.ModFlags before probing for it.  This makes the
	compiler report 514, 515 and 132 (the code was there, but got
	broken).

svn path=/trunk/mcs/; revision=10260
2003-01-07 21:10:23 +00:00
Miguel de Icaza ddee62a7a3 Fix test
svn path=/trunk/mcs/; revision=10259
2003-01-07 21:02:30 +00:00
Miguel de Icaza ba145fa703 Add new error
svn path=/trunk/mcs/; revision=10258
2003-01-07 20:40:17 +00:00
Miguel de Icaza 08296f179d 2003-01-07 Miguel de Icaza <[email protected]>
* statement.cs (Goto.Resolve): Set `Returns' to ALWAYS.
	(GotoDefault.Resolve): Set `Returns' to ALWAYS.
	(GotoCase.Resolve): Set `Returns' to ALWAYS. Fixes the test-49 problem on windows

svn path=/trunk/mcs/; revision=10257
2003-01-07 20:23:07 +00:00
Gonzalo Paniagua Javier 90d9c9150b 2003-01-07 Gonzalo Paniagua Javier <[email protected]>
* TypeDescriptor.cs: moved code from GetProperties (object) to (Type).

svn path=/trunk/mcs/; revision=10256
2003-01-07 19:09:21 +00:00
Gonzalo Paniagua Javier 5564a7150f 2003-01-07 Gonzalo Paniagua Javier <[email protected]>
* AspGenerator.cs: functions for columns don't return anything. Fixed
	typo.

svn path=/trunk/mcs/; revision=10255
2003-01-07 19:07:45 +00:00
Atsushi Eno 847f6606b2 2003-01-08 Atsushi Enomoto <[email protected]>
* XmlTextReader.cs : bugfix for attributes related to creation of
	  XmlAttribute *node*.

svn path=/trunk/mcs/; revision=10254
2003-01-07 17:39:01 +00:00
Atsushi Eno 739c956f27 2003-01-08 Atsushi Enomoto <[email protected]>
* XmlDocumentTests.cs : test for attribute value bugfix.

svn path=/trunk/mcs/; revision=10253
2003-01-07 17:38:23 +00:00
Paolo Molaro f0d95fe8cf Tue Jan 7 18:32:24 CET 2003 Paolo Molaro <[email protected]>
* enum.cs: create the enum static fields using the enum type.

svn path=/trunk/mcs/; revision=10252
2003-01-07 17:35:23 +00:00
Atsushi Eno 62b6fc8944 2003-01-08 Atsushi Enomoto <[email protected]>
* XmlTextReaderTests.cs : test for attribute value bugfix.

svn path=/trunk/mcs/; revision=10251
2003-01-07 16:39:53 +00:00
Atsushi Eno dbbe86f0a0 2003-01-08 Atsushi Enomoto <[email protected]>
* XmlTextReader.cs : bugfix for attribute values which have entity
	  references.

svn path=/trunk/mcs/; revision=10250
2003-01-07 16:38:52 +00:00
Dietmar Maurer cc2e1d4b5b 2003-01-07 Dietmar Maurer <[email protected]>
* exception.c (ves_icall_get_frame_info): fix bug 36382

svn path=/trunk/mono/; revision=10249
2003-01-07 16:18:55 +00:00
Gonzalo Paniagua Javier 1c77488486 2003-01-07 Gonzalo Paniagua Javier <[email protected]>
* decimal.c: fixed bug #36537.

svn path=/trunk/mono/; revision=10248
2003-01-07 15:51:49 +00:00
Paolo Molaro 9c62305b01 Tue Jan 7 15:15:41 CET 2003 Paolo Molaro <[email protected]>
* jit.c: handle wrapper_data in NEWOBJ/CALL.

svn path=/trunk/mono/; revision=10247
2003-01-07 14:18:48 +00:00
Paolo Molaro d63fd1df4c Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <[email protected]>
* marshal.c: throw a missing method exception if a
	P/Invoke method is not found.

svn path=/trunk/mono/; revision=10246
2003-01-07 14:17:16 +00:00
Dietmar Maurer 448aa3dc72 2003-01-07 Dietmar Maurer <[email protected]>
* jit.c (mono_analyze_stack): add check for NULL target in STFLD

svn path=/trunk/mono/; revision=10245
2003-01-07 11:28:25 +00:00
Gaurav Vaish b8e96d3f03 2003-01-07 Gaurav Vaish <gvaish_mono AT lycos.com>
* DataBindingHandler.cs         : Implemented.

svn path=/trunk/mcs/; revision=10244
2003-01-07 08:34:38 +00:00
Gonzalo Paniagua Javier dcbbeb8b65 2003-01-07 Gonzalo Paniagua Javier <[email protected]>
* HyperLink.cs: fixes bug #36336.

svn path=/trunk/mcs/; revision=10232
2003-01-07 04:44:22 +00:00
Gonzalo Paniagua Javier 3514aead26 2003-01-07 Gonzalo Paniagua Javier <[email protected]>
* DataList.cs: fixed IRepeatInfoUser.GetItemStyle.

svn path=/trunk/mcs/; revision=10230
2003-01-07 03:44:47 +00:00
Gonzalo Paniagua Javier ec4ed8f7f2 added XmlDiffLoader.cs
svn path=/trunk/mcs/; revision=10229
2003-01-07 02:25:09 +00:00
Gonzalo Paniagua Javier a64ba556e1 2003-01-07 Gonzalo Paniagua Javier <[email protected]>
* AspGenerator.cs: add data bound controls to code render function.

svn path=/trunk/mcs/; revision=10228
2003-01-07 01:35:11 +00:00
Gonzalo Paniagua Javier 1ccb7b53e5 2003-01-07 Gonzalo Paniagua Javier <[email protected]>
* AspComponentFoundry.cs: reworked to allow same prefix for multiple
	controls. You can register 1 assembly plus any number of user controls
	under the same prefix.

	* AspGenerator.cs: don't add duplicate 'using' for the same namespace.
	Hack to allow @Register access to assemblies in other places than bin
	directory.

svn path=/trunk/mcs/; revision=10225
2003-01-07 00:14:04 +00:00
Piers Haken 7f9719631b *** empty log message ***
svn path=/trunk/mcs/; revision=10224
2003-01-07 00:04:53 +00:00
Miguel de Icaza e843f2d74c Flush
svn path=/trunk/mono/; revision=10222
2003-01-06 22:25:17 +00:00
Ville Palo a451bdcd42 2003-01-06 Ville Palo <[email protected]>
* XmlDataLoader.cs: Moved diffgram stuff to new internal class
	XmlDiffLoader.
	* XmlDiffLoader.cs: new class for diffgrams. Added handling of
	diffgr:Errors and some fixes and changed XmlReader to XPathNavigator.

svn path=/trunk/mcs/; revision=10220
2003-01-06 19:08:31 +00:00
Gonzalo Paniagua Javier 1900d8f0a5 2003-01-06 Gonzalo Paniagua Javier <[email protected]>
* MemoryStream.cs: fixed bug #36319.

svn path=/trunk/mcs/; revision=10219
2003-01-06 17:57:49 +00:00
Gonzalo Paniagua Javier cae5963b24 Fixed typo
svn path=/trunk/mcs/; revision=10218
2003-01-06 17:11:07 +00:00
Gonzalo Paniagua Javier f724b1997e 2003-01-06 Gonzalo Paniagua Javier <[email protected]>
* AspElements.cs: added 'codebehind' attribute for page, control and
	application. It's ignored by MS, but allowed. Fixed typo.

svn path=/trunk/mcs/; revision=10217
2003-01-06 17:00:07 +00:00
Gonzalo Paniagua Javier 5338b6acef 2003-01-06 Gonzalo Paniagua Javier <[email protected]>
* AspGenerator.cs: fixed EnableSesssionState handling.

svn path=/trunk/mcs/; revision=10216
2003-01-06 16:29:36 +00:00
Jackson Harper bc65df29a9 Add REGION flag to #region directives, and add checks to make sure that regions are being poped correctly
svn path=/trunk/mcs/; revision=10215
2003-01-06 16:21:49 +00:00
Gonzalo Paniagua Javier f48010a829 2003-01-06 Gonzalo Paniagua Javier <[email protected]>
* DataView.cs: made dataViewManager internal.
	* DataViewManager.cs: use ICustomTypeDescriptor. We don't want the
	properties of the object, but the values of the columns present in a
	row.

	* DataViewManagerListItemTypeDescriptor.cs: implemented GetProperties,
	which returns a PropertyDescriptorCollection. Created a new class
	derived from PropertyDescriptor that treats Table as an object whose
	properties are DataRowView.

svn path=/trunk/mcs/; revision=10212
2003-01-06 15:35:19 +00:00
Martin Baulig b28320f23e 2003-01-06 Martin Baulig <[email protected]>
* debug.c (debugger_finished_mutex): Use a recursive mutex here.

svn path=/trunk/mono/; revision=10202
2003-01-06 14:03:43 +00:00
Martin Baulig 95c1a2c5e6 2003-01-06 Martin Baulig <[email protected]>
* debug.c: Correctly handle the `debugger_finished_mutex'; it is
	only unlocked by the pthread_cond_wait() in mono_debugger_wait().

svn path=/trunk/mono/; revision=10199
2003-01-06 13:37:17 +00:00
Piers Haken 614ac1d780 2003-01-06 Piers Haken <[email protected]>
* Tokenizer.cs : various unicode fixes/tidyups.

svn path=/trunk/mcs/; revision=10198
2003-01-06 10:57:32 +00:00
Sebastien Pouliot a3a13dc7cb 2003-01-05 Sebastien Pouliot <[email protected]>
* CryptoAPITransform.cs: Removed all TODO. This class will not be
	used by Mono. MS uses it with <algo>CryptoServiceProvider classes
	to provide a common ICryptoTransform access to CryptoAPI.

svn path=/trunk/mcs/; revision=10197
2003-01-06 03:08:30 +00:00
Sebastien Pouliot 39578cca29 2003-01-05 Sebastien Pouliot <[email protected]>
* unix.args: added COMException.cs in System.Runtime.InteropServices

svn path=/trunk/mcs/; revision=10191
2003-01-06 00:20:41 +00:00
Sebastien Pouliot 6212395019 2003-01-05 Sebastien Pouliot <[email protected]>
* COMException.cs: New. Minimal (incomplete - i'm not using COM)
	implementation because this is thrown when dealing with Software
	Publisher Certificates (SPC) in X509Certificate.

svn path=/trunk/mcs/; revision=10190
2003-01-06 00:19:55 +00:00
Sebastien Pouliot 620189bcbf 2003-01-05 Sebastien Pouliot <[email protected]>
* Hash.cs: Added [Serializable] and ISerializable to class declaration.
	Changed how the hash algorithm are created (now use system default
	implementation). Added some exception handling.

svn path=/trunk/mcs/; revision=10189
2003-01-06 00:18:38 +00:00
Sebastien Pouliot 629d4b8e9c *** empty log message ***
svn path=/trunk/mono/; revision=10184
2003-01-05 21:19:36 +00:00
Gonzalo Paniagua Javier 2c157e3a86 2003-01-05 Gonzalo Paniagua Javier <[email protected]>
* AspGenerator.cs: don't generate instance fields for pages/controls
	when the base class specified in the Inherits attribute already has
	them. Closes bug #36262.

svn path=/trunk/mcs/; revision=10167
2003-01-05 17:50:27 +00:00
Miguel de Icaza 873e6ce0a2 Faq updates
svn path=/trunk/mono/; revision=10165
2003-01-05 16:19:43 +00:00
Paolo Molaro 5131a50222 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <[email protected]>
* icall.c: allow a null this for constructors.

svn path=/trunk/mono/; revision=10164
2003-01-05 10:59:47 +00:00
Jackson Harper ad6cc0a389 Move must_send_finished var declaration out of #if win32 block (this fixes the build on win32)
svn path=/trunk/mono/; revision=10163
2003-01-05 03:16:32 +00:00
Dennis Hayes 7e0c8b4274 rollback
svn path=/trunk/mcs/; revision=10162
2003-01-05 02:40:25 +00:00
Martin Baulig 3cc3d7fd6e 2003-01-05 Martin Baulig <[email protected]>
* debug.c (mono_debugger_jit_exec): Custom version of mono_jit_exec();
	this is used when we're running inside the Mono Debugger
	(mono_debugger_wait): Put the waiting code into a function of its own.

	* mono.c (main): Call mono_debugger_jit_exec() instead of
	mono_jit_exec() if we're running inside the Mono Debugger.

svn path=/trunk/mono/; revision=10160
2003-01-05 00:59:40 +00:00
Martin Baulig de0ca53667 2003-01-05 Martin Baulig <[email protected]>
* debug.h (MonoDebugFormat): Added
	`MONO_DEBUG_FORMAT_MONO_DEBUGGER'; this allows us to check whether
	we're running inside the Mono Debugger prior to the args parsing.

svn path=/trunk/mono/; revision=10159
2003-01-04 23:55:55 +00:00
Ville Palo aad8256f80 2003-01-04 Ville Palo <[email protected]>
* XmlSchemaMapper.cs: Added handling for Constraints, Attributes.

svn path=/trunk/mcs/; revision=10154
2003-01-04 19:45:12 +00:00
Ville Palo 7a2d4a0992 2003-01-04 Ville Palo <[email protected]>
* DataColumn.cs: ExtendedProperties is by default !null-

svn path=/trunk/mcs/; revision=10151
2003-01-04 19:35:20 +00:00
Paolo Molaro 201e873e5d Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <[email protected]>
* icall.c: raise the proper exceptions if the arguments to the
	internal Invoke are incorrect.

svn path=/trunk/mono/; revision=10144
2003-01-04 17:31:37 +00:00
Paolo Molaro 31fd17e8a2 Sat Jan 4 18:26:41 CET 2003 Paolo Molaro <[email protected]>
* MonoMethod.cs: propagate exceptions from the internal invoke
	code that need to be propagated.

svn path=/trunk/mcs/; revision=10143
2003-01-04 17:29:40 +00:00
Paolo Molaro efc8e8c584 Sat Jan 4 18:04:07 CET 2003 Paolo Molaro <[email protected]>
* Binder.cs: throw an exception if the number of arguments
	when invoking a method is incorrect.

svn path=/trunk/mcs/; revision=10141
2003-01-04 17:07:05 +00:00
Gonzalo Paniagua Javier 838b6c5e41 2003-01-04 Gonzalo Paniagua Javier <[email protected]>
* UdpClient.cs: fixed bug #36226.

svn path=/trunk/mcs/; revision=10135
2003-01-04 16:51:17 +00:00
Ville Palo e65af8b086 2003-01-04 Ville Palo <[email protected]>
* DataColumnCollection.cs: Add (DataColumn Column) -method didn't
	set column's ordinal.

svn path=/trunk/mcs/; revision=10120
2003-01-04 12:35:29 +00:00
Miguel de Icaza 5b8934a193 Flush
svn path=/trunk/mono/; revision=10115
2003-01-04 05:47:49 +00:00
Gonzalo Paniagua Javier 777e0e5d46 2003-01-04 Gonzalo Paniagua Javier <[email protected]>
* System.Web/HttpApplication.cs: added new state to handle default
	authentication.

	* System.Web.Configuration/HttpModulesConfigurationHandler.cs: add
	a default authentication module at the end of the list.

	* System.Web.Configuration/ModuleItem.cs: new constructor.
	* System.Web.Security/DefaultAuthenticationModule.cs: implemented. It
	just create a default unauthenticated user when no one else provided one.
	* System.Web.Security/FormsAuthenticationModule.cs: removed debug output.
	* System.Web.UI/Control.cs:
	(AddedControl): take the children to the same state of the parent.
	(InitRecursive): set the page of the children.
	* System.Web.UI/Page.cs: removed one line (it's done a few lines above).
	* System.Web.UI/UserControl.cs:
	(OnInit): always call InitializeAsUserControl
	(InitializeAsUserControl): sets the page for the control.

svn path=/trunk/mcs/; revision=10114
2003-01-04 04:39:32 +00:00
Martin Baulig 02fbd6d229 2003-01-04 Martin Baulig <[email protected]>
* debug.c (release_symbol_file_table): Only call this if we're
	actually modifying the symbol tables.
	(mono_debug_open): Always set the `mono_debugger_class_init_func'
	for MONO_DEBUG_FORMAT_MONO; this stuff should also go into core dumps.

svn path=/trunk/mono/; revision=10113
2003-01-04 04:21:05 +00:00
Paolo Molaro d3773c8a5d Fri Jan 3 20:18:51 CET 2003 Paolo Molaro <[email protected]>
* MonoType.cs: fixed Namespace property for nested types.

svn path=/trunk/mcs/; revision=10107
2003-01-03 19:22:52 +00:00
Marco Ridoni 9b030eaa82 A few changes to support correct scoping for default constructors
svn path=/trunk/mcs/; revision=10105
2003-01-03 16:55:33 +00:00
Marco Ridoni 1f5f382ffd A few changes to resolve scoping for default constructors
svn path=/trunk/mcs/; revision=10104
2003-01-03 16:53:37 +00:00
Marco Ridoni 914cb0a99d Field declaration modified to better conform to MS'VB.NET grammar
Class declaration modified to better conform to MS'VB.NET grammar
Preliminary support for Array declarations (not working yet)

svn path=/trunk/mcs/; revision=10103
2003-01-03 16:52:22 +00:00
Martin Baulig fca5a4e021 2003-01-03 Martin Baulig <[email protected]>
* debug.c: Disable the mono debugger stuff on Windows.

svn path=/trunk/mono/; revision=10099
2003-01-03 15:47:24 +00:00
Dietmar Maurer e8129d33d0 2003-01-03 Dietmar Maurer <[email protected]>
* marshal.c (mono_marshal_get_ptr_to_struct): code cleanups

svn path=/trunk/mono/; revision=10098
2003-01-03 15:46:45 +00:00
Paolo Molaro 0e17974c40 Fri Jan 3 16:18:27 CET 2003 Paolo Molaro <[email protected]>
* MonoCustomAttrs.cs: create properly typed arrays when returning
	arrays of attributes of a given type.

svn path=/trunk/mcs/; revision=10097
2003-01-03 15:21:29 +00:00
Gonzalo Paniagua Javier d10b5a6587 2003-01-03 Gonzalo Paniagua Javier <[email protected]>
* machine.config: added forms authentication module and close forms tag.

svn path=/trunk/mono/; revision=10096
2003-01-03 12:27:25 +00:00
Gonzalo Paniagua Javier 48a31481b3 2003-01-03 Gonzalo Paniagua Javier <[email protected]>
* HttpContext.cs: removed hack to get the User.

svn path=/trunk/mcs/; revision=10095
2003-01-03 12:25:20 +00:00
Paolo Molaro b0c6742743 Fri Jan 3 11:10:14 CET 2003 Paolo Molaro <[email protected]>
* MonoType.cs: fixed MemberType property for nested types.

svn path=/trunk/mcs/; revision=10092
2003-01-03 10:12:57 +00:00
Sebastien Pouliot 42f3785d41 2003-01-03 Sebastien Pouliot <[email protected]>
* RC2CryptoServiceProvider.cs: Now about 2 time faster by inlining
	methods and changing to UInt16 (instead of UInt32).

svn path=/trunk/mcs/; revision=10091
2003-01-03 03:27:10 +00:00
Gonzalo Paniagua Javier 2355191fda 2003-01-03 Gonzalo Paniagua Javier <[email protected]>
* String.cs: fixed bug #36209.

svn path=/trunk/mcs/; revision=10090
2003-01-03 03:15:40 +00:00
Gonzalo Paniagua Javier 83e5a79086 2003-01-03 Gonzalo Paniagua Javier <[email protected]>
* HtmlInputButton.cs: fixed bug #35677.

svn path=/trunk/mcs/; revision=10088
2003-01-03 02:30:54 +00:00
Martin Baulig cdb31069de 2003-01-03 Martin Baulig <[email protected]>
* debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.

svn path=/trunk/mono/; revision=10084
2003-01-03 02:20:43 +00:00
Martin Baulig b886279b63 2003-01-03 Martin Baulig <[email protected]>
* debug.c (mono_debugger_trampoline_breakpoint_callback): New
	function.  This is called from the breakpoint trampoline to signal
	the debugger and wait until it has reload the symbol tables.

	* trampoline.c (get_breakpoint_trampoline): Call the new
	mono_debugger_trampoline_breakpoint_callback() in the breakpoint
	trampoline just before the breakpoint.

svn path=/trunk/mono/; revision=10083
2003-01-03 02:19:49 +00:00
Gonzalo Paniagua Javier 076eac9fdd Forgot this.
svn path=/trunk/mcs/; revision=10082
2003-01-03 02:06:22 +00:00
Gonzalo Paniagua Javier a6deecb38d 2003-01-03 Gonzalo Paniagua Javier <[email protected]>
* HttpUtility.cs: fixed bug #36038. Thanks to [email protected] for
	reporting the bug and how to fix it.

svn path=/trunk/mcs/; revision=10081
2003-01-03 02:03:45 +00:00
Gonzalo Paniagua Javier a8405b7892 2003-01-03 Gonzalo Paniagua Javier <[email protected]>
* Control.cs: fixed bug #36037.

svn path=/trunk/mcs/; revision=10080
2003-01-03 01:53:08 +00:00
Gonzalo Paniagua Javier 967ca29ff0 2003-01-03 Gonzalo Paniagua Javier <[email protected]>
* HtmlInputControl.cs: fixed bug #35673.

svn path=/trunk/mcs/; revision=10079
2003-01-03 00:56:12 +00:00
Gonzalo Paniagua Javier 428eb1b337 2003-01-03 Gonzalo Paniagua Javier <[email protected]>
* HtmlInputText.cs: fixed bug #35670.

svn path=/trunk/mcs/; revision=10078
2003-01-03 00:38:48 +00:00
Gonzalo Paniagua Javier 73226678cc fixed the build on windows
svn path=/trunk/mcs/; revision=10077
2003-01-03 00:15:39 +00:00
Marco Ridoni 654c0d002a Fixed a problem with CVS
svn path=/trunk/mcs/; revision=10063
2003-01-02 18:34:12 +00:00
Marco Ridoni fe734b4b38 Some minor changes
svn path=/trunk/mcs/; revision=10062
2003-01-02 18:29:18 +00:00
Paolo Molaro 9df0d00487 Thu Jan 2 19:04:58 CET 2003 Paolo Molaro <[email protected]>
* Binder.cs: In SelectMethod() look for an exact match first.

svn path=/trunk/mcs/; revision=10061
2003-01-02 18:07:42 +00:00
Paolo Molaro 8599b48ed8 Thu Jan 2 18:46:09 CET 2003 Paolo Molaro <[email protected]>
* ModuleBuilder.cs, TypeBuilder.cs: support global fields and methods.

svn path=/trunk/mcs/; revision=10060
2003-01-02 18:06:24 +00:00
Jonathan Pryor a3e3a655fe NodeFormatter.cs: Change error message to use parens instead of braces and
close the parens.  Allows better use of vi's paren-matching functionality in
output, avoids issues with "}}" format specifier in string.Format.

NodeInfo.cs: handle MemberTypes.NestedType, which is returned under .NET for
nested types.  Without this, .NET generates error messages for nested types.

svn path=/trunk/mcs/; revision=10059
2003-01-02 17:58:43 +00:00
Ville Palo 1d5a5d348b 2003-01-02 Ville Palo <[email protected]>
* DataSet.cs:
	* XmlDataLoader.cs: XmlReader closing fixes.
	* XmlSchemaReader.cs: Added support for ref=

svn path=/trunk/mcs/; revision=10058
2003-01-02 17:38:37 +00:00
Sebastien Pouliot 94622644f1 2003-01-02 Sebastien Pouliot <[email protected]>
* RijndaelManaged.cs: Now 7 (encrypt) to 10 (decrypt) times faster
	by removing allocation inside intensively called methods, using pre-
	calculated tables instead of Mult_GF methods and inlining most methods.

svn path=/trunk/mcs/; revision=10052
2003-01-02 05:08:57 +00:00
Jaime Anguiano Olarra a432fe0de1 Process is no longer visible.
svn path=/trunk/mcs/; revision=10047
2003-01-01 21:27:33 +00:00
Rachel Hestilow 8e2be15c61 2003-01-01 Rachel Hestilow <[email protected]>
* MonoField.cs (SetValue): Fix logic typo. Check that obj is
	non-null only for the non-static case.

svn path=/trunk/mcs/; revision=10046
2003-01-01 21:26:39 +00:00
Gonzalo Paniagua Javier c19ac071d6 removed Process.cs
svn path=/trunk/mcs/; revision=10045
2003-01-01 21:09:11 +00:00
Gonzalo Paniagua Javier 2ef8be005e This class is already in System.dll
svn path=/trunk/mcs/; revision=10044
2003-01-01 21:06:51 +00:00
Jaime Anguiano Olarra 980ee60024 Reimplemented the ProcessID property using the Process class.
svn path=/trunk/mcs/; revision=10041
2003-01-01 18:32:22 +00:00
Jaime Anguiano Olarra 15d2979366 Added System.Diagnostics.Process.cs
svn path=/trunk/mcs/; revision=10040
2003-01-01 18:30:45 +00:00
Jaime Anguiano Olarra 25690e339c Added the Process skeleton for Remoting use.
svn path=/trunk/mcs/; revision=10039
2003-01-01 18:30:06 +00:00
Atsushi Eno ae20fcc018 2002-01-02 Atsushi Enomoto <[email protected]>
* SelectNodesTests.cs : added TestAlphabetDigitMixedName.

svn path=/trunk/mcs/; revision=10036
2003-01-01 17:37:42 +00:00
Atsushi Eno 6b073ef5d7 2003-01-02 Atsushi Enomoto <[email protected]>
* Tokenizer.cs : Fixed ParseIdentifier to allow digits.
		(It should be a temporary fix.)

svn path=/trunk/mcs/; revision=10035
2003-01-01 17:34:17 +00:00
Martin Baulig 2e98ca93d0 Removed debugging instruction.
svn path=/trunk/mono/; revision=10034
2003-01-01 17:11:49 +00:00
Ville Palo e60f5b9896 Added XmlSchemaMapper.cs
svn path=/trunk/mcs/; revision=10029
2003-01-01 13:47:54 +00:00
Ville Palo bce9fe8164 2003-01-01 Ville Palo <[email protected]>
* DataSet.cs:
	  - Added XmlReader and XmlWriter Closing.
	  - Moved ReadXmlSchema stuff to new internal class XmlSchemaMapper.
	* XmlSchemaMapper.cs
	  - Much better way IMHO  to map xmlschema than the old one in
	    DataSet.cs. Its, more flexible, cleaner, ...

svn path=/trunk/mcs/; revision=10028
2003-01-01 12:54:37 +00:00
Jonathan Pryor 1ae95f3ec7 Remove some trace messages.
svn path=/trunk/mcs/; revision=10021
2002-12-31 18:49:26 +00:00
Jonathan Pryor 2e3e2d1740 I had a week of no internet access, so I had far too much time on my hands.
When I wasn't recovering from stomach flu, anyway...

All in all, a good Christmas.

Summary:
  - Made tools/makefile.gnu recursive, much like the top-level makefile.gnu.
    This was principally done so that the type-reflector install target could
    install additional files (currently it installs type-reflector.exe and
    type-reflector.exe.config; this may expand in the future).
  - Massive cleanup/improvements to type-reflector

The biggest news is that a Gtk# front-end exists for type-reflector now.  It
is incomplete (due to my learning Gtk# with this program) and needs
improvement, but it works...  Sort of.

It's not enabled by default, as I don't want to require that the
Gtk#/Gnome#/Glade# assemblies be available to build mcs from CVS.

To enable the type-reflector Gtk# front-end, do two things:
  - Rebuild type-reflector: cd tools/type-reflector && make -f makefile.gnu gui
  - When running, specify the --displayer=gtk parameter, e.g.
      type-reflector.exe --displayer=gtk -S .

svn path=/trunk/mcs/; revision=10020
2002-12-31 18:45:12 +00:00
Sebastien Pouliot 8f7ce12d41 2002-12-31 Sebastien Pouliot <[email protected]>
* AsymmetricAlgorithm.cs: Removed ValidKeySize (method only present
	in SymmetricAlgorithm).
	* DSA.cs: Change ZeroizePrivateKey from protected to internal.
	* DSACryptoServiceProvider.cs: Added some case where we need to check
	for keypairGenerated.
	* RSA.cs: Change ZeroizePrivateKey from protected to internal.
	* RSACryptoServiceProvider.cs: Key were never generated with the default
	(no parameter) constructor. Now checks for keypairGenerated in methods.
	* SignatureDescription.cs: Added CreateDeformatter in RSAPKCS1SHA1-
	SignatureDescription to please corcompare (it just call it's ancestor).

svn path=/trunk/mcs/; revision=10019
2002-12-31 17:33:06 +00:00
Martin Baulig 93aaeca08a 2002-12-31 Martin Baulig <[email protected]>
* debug.c (MonoDebuggerSymbolFileTable): Added `global_symfile'
	field to point to the MonoGlobalSymbolTable.

svn path=/trunk/mono/; revision=10013
2002-12-31 10:23:16 +00:00
Martin Baulig d0d6490732 2002-12-31 Martin Baulig <[email protected]>
* debug-mono-symfile.c: Completely rewrote the type section.
	Instead of using individual malloc()ed fields, we use one big
	continuous memory area and offsets into this area.
	See the comments in the source code for details.

svn path=/trunk/mono/; revision=10011
2002-12-31 10:22:43 +00:00
Marco Ridoni 7af9728f5f A small fix to allow compilation under mcs while preserving the Author
attribute

svn path=/trunk/mcs/; revision=10008
2002-12-30 22:37:55 +00:00
Marco Ridoni b431f22584 Fixed a problem occurred when committing last time
svn path=/trunk/mcs/; revision=10007
2002-12-30 22:31:19 +00:00
Sebastien Pouliot d3dadbbd8d 2002-12-30 Sebastien Pouliot <[email protected]>
* CryptoStream.cs: Implemented core. Not sure about many details -
	but it run the samples now (#30256).
	* CryptoStreamMode.cs: Added [Serializable] to enum declaration.
	* SymmetricAlgorithm.cs: Made some changes required for CryptoStream
	and to match more closely MS implementation. Also added little
	optimizations in TransformBlock.

svn path=/trunk/mcs/; revision=10006
2002-12-30 21:45:26 +00:00
Marco Ridoni 40d171c197 Select Case is working
svn path=/trunk/mcs/; revision=10005
2002-12-30 20:21:22 +00:00
Marco Ridoni e7609febb3 Minor changes
svn path=/trunk/mcs/; revision=10004
2002-12-30 20:20:22 +00:00
Martin Baulig 78ec56451c 2002-12-30 Martin Baulig <[email protected]>
* debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.

svn path=/trunk/mono/; revision=10002
2002-12-30 19:58:55 +00:00
Martin Baulig 0c7c6652a7 2002-12-30 Martin Baulig <[email protected]>
* debug.c (MonoDebuggerInfo): Put back `symbol_file_modified'.
	This variable now specifies that the symbol tables have been
	modified after the last notification has been send.  The debugger
	uses this flag to check whether it needs to reload the symbol
	tables or not.
	(debugger_compile_method): Just send a notification to the
	debugger, but don't set the modified flag.  It may or may not be
	set when the debugger gets the notification - depending on whether
	the JIT compilation added a new method to the symbol tables.

svn path=/trunk/mono/; revision=9999
2002-12-30 18:42:35 +00:00
Martin Baulig bc89db47d6 2002-12-30 Martin Baulig <[email protected]>
* debug.c (debugger_compile_method): This is a wrapper around
	mono_compile_method() which always sends a notification to the
	debugger.

svn path=/trunk/mono/; revision=9997
2002-12-30 18:31:32 +00:00
Martin Baulig 60f2732c4b 2002-12-30 Martin Baulig <[email protected]>
* debug.c: Reload the symbol file table before sending the
	notification event to the debugger.
	(MonoDebuggerInfo): Removed `update_symbol_file_table'.

svn path=/trunk/mono/; revision=9995
2002-12-30 18:22:36 +00:00
Martin Baulig 4aa80ca2af 2002-12-31 Martin Baulig <[email protected]>
* debug.c: Propertly lock everything and avoid race conditions.
	(MonoDebuggerInfo): Removed the `symbol_file_modified' again.

svn path=/trunk/mono/; revision=9987
2002-12-30 17:45:56 +00:00
Duncan Mak 58aeae86da 2002-12-31 Duncan Mak <[email protected]>
* debug.c (initialize_debugger_support): Fix build error by
	declaring ret at the top of the function.

svn path=/trunk/mono/; revision=9986
2002-12-30 17:08:02 +00:00
Gonzalo Paniagua Javier 4b10f5831b Changes by Daniel Cazullino.
2002-12-27  Daniel Cazzulino <[email protected]>

	* CacheEntry.cs: several changes. New constants, use of constants
	defined in Cache.cs, modified locks to optimize perf. Fixed property
	sets which weren't using the keyword value to set the new values
	(don't know how this worked before!).

	* Cache.cs: changed singleton implementation to only create the object
	when actually used. Changed Insert overloads to use constants
	defined instead of hard values.

	* ExpiresBuchets: major changes. All locking now uses ReaderWriterLock
	class. Bucket now efectively reuses free indexes from removed items
	to avoid unnecessary expansions. Expansion now uses Array.CopyTo to
	add elements to the new list. Added private Int32Collection to
	handle int indexes efficiently (thanks Shawn Van Ness). See comments
	there.

svn path=/trunk/mcs/; revision=9985
2002-12-30 16:22:37 +00:00
Sebastien Pouliot db0d827424 2002-12-30 Sebastien Pouliot <[email protected]>
* AssemblyNameTest.cs: Added test for FullName (null cultureinfo).

svn path=/trunk/mcs/; revision=9981
2002-12-30 15:27:25 +00:00
Martin Baulig df021b96c7 2002-12-30 Martin Baulig <[email protected]>
* debug.c: When running under the mono debugger, create a special
	debugger thread; always protect the symbol tables with a mutex.

svn path=/trunk/mono/; revision=9980
2002-12-30 15:07:13 +00:00
Martin Baulig d7044e8a8a 2002-12-30 Martin Baulig <[email protected]>
* debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
	line number table in this data blob instead of using an external
	pointer.

svn path=/trunk/mono/; revision=9979
2002-12-30 15:04:53 +00:00
Daniel Morgan 9ded121123 remove bit-rotted tests
svn path=/trunk/mcs/; revision=9975
2002-12-30 14:48:38 +00:00
Sebastien Pouliot 8482be0aef 2002-12-30 Sebastien Pouliot <[email protected]>
* AssemblyName.cs: Fixed null cultureinfo in FullName (as reported by
	Zoltan).

svn path=/trunk/mcs/; revision=9972
2002-12-30 14:45:18 +00:00
Marco Ridoni 4eea63fd16 Select..Case..Case Else added to grammar definition
Modified Do..Loop and While/Until definitions in grammar

svn path=/trunk/mcs/; revision=9970
2002-12-30 12:21:25 +00:00
Daniel Morgan c30103c5ec 2002-12-30 Daniel Morgan <[email protected]>
* LoginDialog.cs
	* DbProviderCollection.cs
	* DbProvider.cs
	* DataGrid.cs: save as Unix (LF) and format based on
	Mono style

	* SqlEditorSharp.cs: SQL editor will be used in a
	notebook, keep track of that tab.  Also, when text changed,
	update the notebook tab to indicate text changed.  Save as
	Unix (LF) and monostyle format

	* sqlsharpgtk.cs: add a notebook where each tab represents a SQL editor where
	the selected tab could be opend or saved to a file or execute against the
	database.  The full filename of the selected editor tab is displayed in the title
	bar.  The tab gets an asterisk if the user changes the text in that text buffer.
	Add a second notebook for the results to be a DataGrid or a TextView
	to log messages.  Add new menu items for execute and saving to
	a HTML, XML, and CSV (Comma Separated Values) files.  Menu item New brings up a new
	editor tab.  Add menu item New SQL# Window to open a new SQL# window.

svn path=/trunk/mcs/; revision=9969
2002-12-30 08:30:20 +00:00
Miguel de Icaza b51535e43f No-op for install target
svn path=/trunk/mcs/; revision=9968
2002-12-29 19:53:17 +00:00
Miguel de Icaza c4e8361bdf Add missing files to the build
svn path=/trunk/mcs/; revision=9967
2002-12-29 19:52:17 +00:00
Ville Palo 9b5e527bf5 ups, little fix
svn path=/trunk/mcs/; revision=9966
2002-12-29 17:54:48 +00:00
Ville Palo beaeaad347 2002-12-29 Ville Palo <[email protected]>
* XmlDataLoader.cs: Reading diffgrams.

svn path=/trunk/mcs/; revision=9965
2002-12-29 16:16:24 +00:00
Ville Palo 20bf43868e 2002-12-29 Ville Palo <[email protected]>
* DataRow.cs: Little fix to indexer and DataColumnCang* trigger fixes.
	* DataTable.cs: Added ChanginDataColumn () for triggering
	DataColumnChanging event

svn path=/trunk/mcs/; revision=9964
2002-12-29 14:50:14 +00:00
Lluis Sanchez 0792fc1a6d no message
svn path=/trunk/mcs/; revision=9963
2002-12-29 12:36:37 +00:00
Lluis Sanchez b936987419 no message
svn path=/trunk/mcs/; revision=9962
2002-12-29 12:24:45 +00:00
Miguel de Icaza 27ac138a66 2002-12-29 Miguel de Icaza <[email protected]>
* cs-tokenizer.cs (get_cmd_arg): Fixups to allow \r to terminate
	the command.   This showed up while compiling the JANET source
	code, which used \r as its only newline separator.

svn path=/trunk/mcs/; revision=9961
2002-12-29 08:18:36 +00:00
Miguel de Icaza 41e8d17219 2002-12-28 Marcus Urban <[email protected]>
* Activator.cs: Since the documentation indicates the method
	either succeeds or throws one of the listed exceptions, we weren't
	expecting that CreateInstance might be returning null.

	For more information on the bug, see http://bugs.ximian.com/show_bug.cgi?id=36109

svn path=/trunk/mcs/; revision=9960
2002-12-29 02:15:09 +00:00
Marco Ridoni bc53601431 Properties are working and support typed parameters. An error is
flagged if parameters haven't corresponding types.

svn path=/trunk/mcs/; revision=9959
2002-12-28 23:06:11 +00:00
Sebastien Pouliot f55334e816 2002-12-28 Sebastien Pouliot <[email protected]>
* X509CertificateTest.cs: Changed how the dates are compared. This
	should stop the nunit errors in X509Certificate.

svn path=/trunk/mcs/; revision=9956
2002-12-28 18:30:12 +00:00
Ville Palo a3f73ce252 2002-12-28 Ville Palo <[email protected]>
* DataSet.cs: Indentations to WriteXmlSchema () and one little fix

svn path=/trunk/mcs/; revision=9953
2002-12-28 16:10:35 +00:00
Martin Baulig 1203967cdf 2002-12-28 Martin Baulig <[email protected]>
* debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.

svn path=/trunk/mono/; revision=9947
2002-12-28 14:25:29 +00:00
Martin Baulig 568d8fcd01 2002-12-28 Martin Baulig <[email protected]>
* debug.c (MonoDebuggerInfo): Added `symbol_file_modified'; it's
	incremented each time one of the symbol tables is modified.

svn path=/trunk/mono/; revision=9946
2002-12-28 14:25:10 +00:00
Ville Palo d720f20fd0 2002-12-28 Ville Palo <[email protected]>
* DataSet.cs: Indentations to WriteXml ()

svn path=/trunk/mcs/; revision=9945
2002-12-28 13:03:27 +00:00
Ville Palo ae78b31e9e 2002-12-28 Ville Palo <[email protected]>
* XmlDocument.cs: XmlTextWriter.Formatting == Indented when
	calling Save () -methods.

svn path=/trunk/mcs/; revision=9944
2002-12-28 12:34:37 +00:00
Lluis Sanchez 41785d5763 no message
svn path=/trunk/mcs/; revision=9943
2002-12-28 11:52:19 +00:00
Lluis Sanchez 5dc1d5b45f Implemented some functions
svn path=/trunk/mcs/; revision=9942
2002-12-28 11:46:36 +00:00
Duncan Mak 58dd6011a8 2002-12-28 Duncan Mak <[email protected]>
* unix.args (ASN1.cs): Sebastien forgot to include this file.

svn path=/trunk/mcs/; revision=9940
2002-12-28 09:21:30 +00:00
Atsushi Eno 797b28bbf8 2002-12-28 Atsushi Enomoto <[email protected]>
* XmlNodeReader.cs : primitive reading implementation.

svn path=/trunk/mcs/; revision=9939
2002-12-28 05:35:13 +00:00
Sebastien Pouliot da30b9cce8 2002-12-27 Sebastien Pouliot <[email protected]>
* unix.args: added CryptoTools.cs file.

svn path=/trunk/mcs/; revision=9934
2002-12-27 18:36:15 +00:00
Sebastien Pouliot 1d085448a2 2002-12-27 Sebastien Pouliot <[email protected]>
* CryptoTools.cs: New. Shared classes for cryptography. Now
	includes a KeyBuilder to generate symmetric keys and IV.
	* DES.cs: Modified Key validation.
	* DESCryptoServiceProvider.cs: Implemented Key and IV using
	KeyBuilder.
	* RC2CryptoServiceProvider.cs: Implemented Key and IV using
	KeyBuilder (and removed TODO).
	* RijndaelManaged.cs: Implemented Key and IV using KeyBuilder
	(and removed TODO).
	* SHA384Managed.cs: Changed code to remove compiler warning.
	* SHA512Managed.cs: Changed code to remove compiler warning.
	* SymmetricAlgorithm.cs: Removed TODO on IV.
	* TripleDESCryptoServiceProvider.cs: Implemented Key and IV
	using KeyBuilder (and removed TODO).

svn path=/trunk/mcs/; revision=9933
2002-12-27 18:32:44 +00:00
Atsushi Eno 8e23e5f682 2002-12-28 Atsushi Enomoto <[email protected]>
* XmlDocumentTests.cs : Test for bugzilla #34743 (whitespace handling)

svn path=/trunk/mcs/; revision=9932
2002-12-27 16:26:25 +00:00
Atsushi Eno 337d2be637 2002-12-28 Atsushi Enomoto <[email protected]>
* XmlElement.cs : quick fix for the incomplete patch of #35308 below.

svn path=/trunk/mcs/; revision=9931
2002-12-27 16:15:10 +00:00
Atsushi Eno 9762d5bab0 2002-12-28 Atsushi Enomoto <[email protected]>
* XmlDocumentTests.cs : Test for bugzilla #35308 (default ns output)
	* XmlElementTests.cs : Test for output of attributes with different NS.

svn path=/trunk/mcs/; revision=9930
2002-12-27 15:54:39 +00:00
Atsushi Eno ea63c7d9e2 2002-12-28 Atsushi Enomoto <[email protected]>
* XmlDocument.cs : removed inconsistent line-feed output.
	* XmlElement.cs, XmlTextWriter.cs :
		fixed for bugzilla 35308 (default ns output)
	* XmlWhitespace.cs : limited output only when preserving whitespace.

svn path=/trunk/mcs/; revision=9929
2002-12-27 15:53:53 +00:00
Sebastien Pouliot d5fb889e15 2002-12-27 Sebastien Pouliot <[email protected]>
* ASN1.cs: New. Classes to manipulate Abstract Syntax Notation 1
	structures.
	* cert2spc.cs: New tool to generate Software Publisher Certificate
	(SPC) from a list of X509 certificate and CRL.
	* secutils.cs: Changed copyright notice.
	* makefile: Added cert2spc.exe to Windows build.
	* makefile.gnu: Added cert2spc.exe to Linux build.

svn path=/trunk/mcs/; revision=9928
2002-12-27 15:37:38 +00:00
Sebastien Pouliot 71bac88f6c 2002-12-27 Sebastien Pouliot <[email protected]>
* ASN1.cs: New. Updated ASN1 classes for X509Certificate that can
	now be reused for other tools (like Cert2Spc). Classes are marked
	internal so they cannot be reused from outside corlib (for
	compatibility with MS implementation).
	* X509Certificate.cs: Removed all ASN1 classes from file.

svn path=/trunk/mcs/; revision=9927
2002-12-27 15:26:45 +00:00
Ville Palo e86ff448b8 2002-12-27 Ville Palo <[email protected]>
* list: Added System.Data/XmlDataLoader.cs

svn path=/trunk/mcs/; revision=9924
2002-12-27 14:20:49 +00:00
Ville Palo 89fd33f0a3 2002-12-27 Ville Palo <[email protected]>
* DataSet.cs:
	* XmlDataLoader.cs: Moved ReadXml -stuff from DataSet.cs to new
	class XmlDataLoader.cs

svn path=/trunk/mcs/; revision=9923
2002-12-27 14:18:27 +00:00
Jeroen Janssen 34b57b5ef2 2002-12-27 Jeroen Janssen <[email protected]>
* fixed url for System.Windows.Forms in the class status

svn path=/trunk/mono/; revision=9916
2002-12-27 10:54:39 +00:00
Sebastien Pouliot dc0e35c21b 2002-12-26 Sebastien Pouliot <[email protected]>
* X509Certificate.cs: Fixed the date issue (again). Time was
	converted to local time then ajusted to Pacific time. Now time
	is kept (internally) as UTC and correct (-8) to Pacific when shown.
	Changed Authenticode signature detection and removed debugging code.

svn path=/trunk/mcs/; revision=9914
2002-12-27 00:57:42 +00:00
Ville Palo b7625dd45d 2002-12-26 Ville Palo <[email protected]>
* own_schema.xsd: XmlSchema for testing ReadXmlSchema() -method
	* DataSetTest.cs: Added more Xml-tests.

svn path=/trunk/mcs/; revision=9913
2002-12-26 19:09:56 +00:00
Miguel de Icaza 10f375d325 Add SDL.NET bindings, reorganize
svn path=/trunk/mono/; revision=9866
2002-12-24 18:46:41 +00:00
Alejandro Sánchez Acosta 433d12e01a Added cs0208.cs test error.
svn path=/trunk/mcs/; revision=9861
2002-12-24 14:33:51 +00:00
Alejandro Sánchez Acosta ada835f12f Added cs0202.cs test error.
svn path=/trunk/mcs/; revision=9860
2002-12-24 14:23:39 +00:00
Alejandro Sánchez Acosta 451e834b2b Added cs0197 test error.
svn path=/trunk/mcs/; revision=9859
2002-12-24 14:10:16 +00:00
Sebastien Pouliot f91d740dc1 2002-12-23 Sebastien Pouliot <[email protected]>
* AssemblyNameTest.cs: Added test for non-signed assembly (which
	returns an empty array - i.e. not null like an empty assembly).

svn path=/trunk/mcs/; revision=9857
2002-12-24 03:48:49 +00:00
Sebastien Pouliot 926b1a1224 2002-12-23 Sebastien Pouliot <[email protected]>
* AssemblyName.cs: GetPublicKey now return an empty array (not null)
	when an assembly isn't signed with a StrongName (to match MS
	implementation) and null when no assembly is referenced. Also removed
	commented code (no bug reported so it was probably not used).

svn path=/trunk/mcs/; revision=9856
2002-12-24 03:47:27 +00:00
Miguel de Icaza 5d772df810 Also distribute sqlsharp
svn path=/trunk/mono/; revision=9855
2002-12-24 01:43:09 +00:00
Miguel de Icaza 841e1cc7b2 Add secutil to the distribution
svn path=/trunk/mono/; revision=9851
2002-12-23 22:32:58 +00:00
Atsushi Eno 879d8fbdcd 2002-12-24 Atsushi Enomoto <[email protected]>
* XmlAttribute.cs, XmlDocument.cs, XmlTextReader.cs:
		Implemented XmlTextReader.ReadAttributeValue().
		Added internal ReadAttributeNodeValue().
		Fixed XmlAttribute.InnerXml to use these methods.

	* XmlDocument.cs, XmlDocumentFragment.cs, XmlElement.cs, XmlNode.cs:
		Implemented XmlDocument.ReadNode() and removed ConstructDOM().
		Other changes are replacing them.

svn path=/trunk/mcs/; revision=9848
2002-12-23 17:35:55 +00:00
Atsushi Eno a275fb4618 2002-12-24 Atsushi Enomoto <[email protected]>
* XmlDocumentTests.cs, XmlWhitespaceTests.cs:
		fixed whitespace handling (in relation to Ville's patch).

svn path=/trunk/mcs/; revision=9846
2002-12-23 16:24:38 +00:00
Atsushi Eno 981fe2cef9 2002-12-24 Atsushi Enomoto <[email protected]>
* XmlDocument.cs: patch by Ville (fixed default PreserveWhitespace)

svn path=/trunk/mcs/; revision=9845
2002-12-23 16:23:36 +00:00
Alejandro Sánchez Acosta 82828beee5 Added cs0192.cs test file.
svn path=/trunk/mcs/; revision=9842
2002-12-23 13:56:18 +00:00
Alejandro Sánchez Acosta c2b988119c Added cs0170 test error.
svn path=/trunk/mcs/; revision=9841
2002-12-23 12:54:57 +00:00
Alejandro Sánchez Acosta 6aaf27ebc5 Added cs0156 test error.
svn path=/trunk/mcs/; revision=9840
2002-12-23 12:40:24 +00:00
Nick Drochak eb692e0eda 2002-12-23 Nick Drochak <[email protected]>
* System_test.build: Fix build.  Need to link with System.Xml.dll

svn path=/trunk/mcs/; revision=9837
2002-12-23 01:14:01 +00:00
Sebastien Pouliot 7ae7b6a09f 2002-12-22 Sebastien Pouliot <[email protected]>
* secutils.cs: New tool to extract strongname and X509 certificate
	from assembly (or other signed files).
	* makefile: Added secutil.exe to Windows build.
	* makefile.gnu: Added secutil.exe to Linux build.

svn path=/trunk/mcs/; revision=9836
2002-12-22 16:09:46 +00:00
Sebastien Pouliot 46145d061c 2002-12-22 Sebastien Pouliot <[email protected]>
* X509Certificate.cs: Completed CreateFromSignedFile. Added a new
	internal constructor so Publisher (and the related classes) can
	create a X509Certificate object which return null dates (for both
	GetEffectiveDateString and GetExpirationDateString methods).

svn path=/trunk/mcs/; revision=9835
2002-12-22 16:08:11 +00:00
Miguel de Icaza fdd9676283 2002-12-22 Miguel de Icaza <[email protected]>
* ecore.cs (FieldExpr.DoResolve): Instead of throwing an
	exception, report error 120 `object reference required'.

	* driver.cs: Add --pause option, used during to measure the size
	of the process as it goes with --timestamp.

svn path=/trunk/mcs/; revision=9833
2002-12-22 06:44:47 +00:00
Miguel de Icaza 686fdaac38 Add another one
svn path=/trunk/mcs/; revision=9832
2002-12-22 06:39:28 +00:00
Tim Coleman 5c0779502a 2002-12-22 Tim Coleman <[email protected]>
* Mono.Data.Tds.Protocol/TdsComm.cs:
                Change GetString to NOT explicitly add a NUL
                to the end of the string since Encoder.GetString ()
                will do that.

svn path=/trunk/mcs/; revision=9831
2002-12-22 06:26:20 +00:00
Rachel Hestilow a226b353f8 2002-12-22 Rachel Hestilow <[email protected]>
* marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
	as a boxed return type.

svn path=/trunk/mono/; revision=9830
2002-12-22 06:14:11 +00:00
Miguel de Icaza 46d978a6af Move configuration information that is used when compiling code that links
to Mono into a define that we can ship in mono.pc

Remove the dependency on config.h from mono/metadata/exception.h

svn path=/trunk/mono/; revision=9829
2002-12-22 05:37:37 +00:00
Miguel de Icaza 390086fddc Add this change as well
svn path=/trunk/mcs/; revision=9827
2002-12-22 04:34:21 +00:00
Jonathan Pryor 182b17c5a6 Initial patch to use Switches to limit the trace messages that are generated.
svn path=/trunk/mcs/; revision=9826
2002-12-22 03:47:57 +00:00
Miguel de Icaza d499df96e0 2002-12-21 Miguel de Icaza <[email protected]>
* appdomain.c
	(ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
	g_build_filename to properly get separators on the filename created.

svn path=/trunk/mono/; revision=9825
2002-12-22 01:59:57 +00:00
Miguel de Icaza e1645a45a6 Add new test, I forgot to add this a few weeks ago test-178.cs
svn path=/trunk/mcs/; revision=9824
2002-12-21 23:10:15 +00:00
Miguel de Icaza 7a2ae61405 Re-enable code
svn path=/trunk/mcs/; revision=9823
2002-12-21 23:04:23 +00:00
Miguel de Icaza 5e017a3f3f 2002-12-20 Lluis Sanchez Gual <[email protected]>
* RealProxy.cs: Added ObjectIdentity property.
	  Implemented CrateObjRef.
	* RemotingProxy.cs: Added Identity parameter to constructor

2002-12-20  Lluis Sanchez Gual <[email protected]>

	* ServerContextTerminatorSink.cs: Added
	* ServerObjectTerminatorSink.cs: Added
	* StackBuilderSink.cs: Added

2002-12-20  Lluis Sanchez Gual <[email protected]>

	* LeaseSink.cs: Added
2002-12-20 Lluis Sanchez Gual <[email protected]>

	* ObjRef.cs: Implementation now based on methods of RemotingServices.
	* RemotingServices.cs: Remoting information now kept in Identity objects.
	  All methods adapted to work with identities.
	  Renamed ExecuteMessage to InternalExecuteMessage. ExecuteMessage should
	  not make a direct call to the object.
	* Identity.cs: added.

svn path=/trunk/mcs/; revision=9822
2002-12-21 23:00:04 +00:00
Miguel de Icaza df53b8e04d Add new field that reflects changes to corlib for remoting
svn path=/trunk/mono/; revision=9821
2002-12-21 22:53:35 +00:00
Ravi Pratap M 39587eadc8 2002-12-21 Ravi Pratap <[email protected]>
* test-171.cs : Fix up since it wasn't working because of some
	array code bug. That is a separate problem ;-)

svn path=/trunk/mcs/; revision=9820
2002-12-21 19:48:56 +00:00
Alejandro Sánchez Acosta 706b7b3304 Added cs0163.cs test error.
svn path=/trunk/mcs/; revision=9819
2002-12-21 19:07:54 +00:00
Alejandro Sánchez Acosta e587984615 Added cs0161.cs test file.
svn path=/trunk/mcs/; revision=9818
2002-12-21 18:59:18 +00:00
Nick Drochak 99a25b98bd 2002-12-21 Nick Drochak <[email protected]>
* all: make tests build and run under nunit2

svn path=/trunk/mcs/; revision=9817
2002-12-21 14:15:43 +00:00
Nick Drochak 166d18cf51 Needed to build test dll
svn path=/trunk/mcs/; revision=9816
2002-12-21 14:13:26 +00:00
Nick Drochak 07b1a51bc6 2002-12-21 Nick Drochak <[email protected]>
* AllTests2.cs: Helper file for unit tests

svn path=/trunk/mcs/; revision=9815
2002-12-21 13:29:25 +00:00
Paolo Molaro 377280f5b5 Fix build breakers.
svn path=/trunk/mcs/; revision=9814
2002-12-21 13:25:30 +00:00
Miguel de Icaza cda63d0706 2002-12-21 Miguel de Icaza <[email protected]>
* cs-tokenizer.cs: Small fix to the parser: compute the ascii
	number before adding it.

svn path=/trunk/mcs/; revision=9813
2002-12-21 08:17:00 +00:00
Miguel de Icaza 590d1b39e5 Revert
svn path=/trunk/mcs/; revision=9812
2002-12-21 08:06:25 +00:00
Miguel de Icaza 5d13212687 Added files for Lluis.
svn path=/trunk/mcs/; revision=9811
2002-12-21 08:03:06 +00:00
Miguel de Icaza 5821325879 2002-12-21 Miguel de Icaza <[email protected]>
* object.h: Small change, introduce MonoMarshalByRefObject to
	track the layout of that structure in the C# universe as we make
	changes there.

svn path=/trunk/mono/; revision=9810
2002-12-21 07:58:55 +00:00
Ravi Pratap M 29bdfb20ab 2002-12-21 Ravi Pratap <[email protected]>
* ecore.cs (StandardImplicitConversion): When in an unsafe
	context, we allow conversion between void * to any other pointer
	type. This fixes bug #35973.

svn path=/trunk/mcs/; revision=9809
2002-12-21 07:27:52 +00:00
Ravi Pratap M 5d592bb366 2002-12-21 Ravi Pratap <[email protected]>
* test-171.cs : This was mysteriously absent. Add new test in its
	place.

svn path=/trunk/mcs/; revision=9808
2002-12-21 07:25:18 +00:00
Jonathan Pryor 2571837c88 New/Updated test cases. Fixed TraceTest so that it isn't causing test
failures anymore.  Added SwitchesTest (to test switches) and
DiagnosticsConfigurationHandler to test .config file handling.

Issues: while the DiagnosticsConfigurationHandlerTest is reasonably
self-contained, SwitchesTest is not.  To properly test switches, we need a
.exe and a .exe.config file.  The needed .exe.config file that SwitchesTest
depends on is present in `test-config-file', but I'm unsure where to place it
(much less what to name it).

Additionally, SwitchesTest generates test failures at this time, principally
because of the lack of .config file support in the test system.

Finally, makefile.gnu & system_linux_test.args was changed to use the newly
added tests and to reference System.Xml.dll, which is used by
DiagnosticsConfigurationHandlerTest.

svn path=/trunk/mcs/; revision=9807
2002-12-21 03:50:07 +00:00
Jonathan Pryor f69bd81f97 DiagnosticsConfigurationHandler.cs:
Don't assume that optional attributes are always present
  <assert/> can't have any child nodes
  Change in semantics: if the attribute isn't present, GetAttribute()
    returns null, not "".  This allows us to differentiate between an attribute
    not being present and an attribute with an empty value.
  Translate exceptions if a TraceListener type is invalid

ChangeLog: Update for the previous changes I forgot to record

svn path=/trunk/mcs/; revision=9806
2002-12-21 03:38:12 +00:00
Miguel de Icaza 594edb6fd8 Fix from Matt Kunze to add the other Process.Start overloads
svn path=/trunk/mcs/; revision=9800
2002-12-21 00:14:16 +00:00
Atsushi Eno cfd9e478ee 2002-12-21 Atsushi Enomoto <[email protected]>
* XmlTextWriterTests.cs (TestAttributeNamespacesXmlnsXmlns):
		fixed bug in the testcase (in relation to JD Conley's patch).

svn path=/trunk/mcs/; revision=9799
2002-12-20 18:13:32 +00:00
Atsushi Eno f00c428bbe 2002-12-21 Atsushi Enomoto <[email protected]>
* XmlElement.cs, XmlTextWriter.cs, XmlWriter.cs:
		patch by JD Conley <[email protected]>.
		(Fix for xmlns attribute output.)

svn path=/trunk/mcs/; revision=9798
2002-12-20 18:12:54 +00:00
Gonzalo Paniagua Javier 8e35e3a7b9 2002-12-20 Gonzalo Paniagua Javier <[email protected]>
* System.Web/HttpCookie.cs: send 'expires' in the header.
	* System.Web.Security/FormsAuthenticationModule.cs: remove debug lines.
	* System.Web.UI/BaseParser.cs: a couple of path fixes to make it work
	when the page is not in the root directory.
	* System.Web.Util/UrlUtils.cs: fixed IsRelativeUrl and IsRootUrl.

svn path=/trunk/mcs/; revision=9797
2002-12-20 13:49:48 +00:00
Jackson Harper 5ac344ac00 Use Path.GetFileNameWithoutExtension so an exception is not thrown when extensionless outputs are used
svn path=/trunk/mcs/; revision=9795
2002-12-20 09:12:11 +00:00
Jackson Harper 918a74cce2 Copy constructor does not attempt to merge if it recieves a null ref
svn path=/trunk/mcs/; revision=9794
2002-12-20 08:58:03 +00:00
Gonzalo Paniagua Javier fd59368b78 2002-12-20 Gonzalo Paniagua Javier <[email protected]>
* regex.cs: fixed little mistake (closes #35860).

svn path=/trunk/mcs/; revision=9793
2002-12-20 08:22:50 +00:00
Gonzalo Paniagua Javier 61402fe1a2 check the _controls is not null
svn path=/trunk/mcs/; revision=9792
2002-12-20 06:50:35 +00:00
Gonzalo Paniagua Javier 9258732319 2002-12-20 Gonzalo Paniagua Javier <[email protected]>
* rootcontext.cs: fixed compilation of corlib.

svn path=/trunk/mcs/; revision=9790
2002-12-20 04:07:50 +00:00
Gonzalo Paniagua Javier 64e6cf7460 2002-12-20 Gonzalo Paniagua Javier <[email protected]>
* LinkLabel.cs:
	* ListView.cs: fixed the build with csc.

svn path=/trunk/mcs/; revision=9789
2002-12-20 01:38:56 +00:00
Gonzalo Paniagua Javier 51f8013b8a 2002-12-20 Gonzalo Paniagua Javier <[email protected]>
* Control.cs: fixed PreRenderRecursiveInternal. Thanks to kojoadams for
	reporting the bug.

svn path=/trunk/mcs/; revision=9788
2002-12-20 01:16:28 +00:00
Jonathan Pryor 1f73687f90 IndentLevel and IndentSize shouldn't be hardcoded; they should be set to
whatever TraceImpl is using (which in turn may have been set by the .config
file, so we should get the user-specified values in added listeners).

svn path=/trunk/mcs/; revision=9787
2002-12-20 00:04:00 +00:00
Jonathan Pryor 1eb5d4634b * TraceListener.cs: Make sure that indents are initially written. This allows
code that uses Trace.Indent() before a Trace.WriteLine() to be indented
  properly.
* TraceImpl.cs: provide a static constructor to explicitly specify the
  ordering of initialization, in particular the ordering of
  TraceImpl.Listeners and the reading of the .config file (by accessing
  DiagnosticsConfiguration.Settings).  This (hopefully) ensures that the
  Listeners collection is initialized before the .config file is read in, as
  the DiagnosticsConfigurationHandler will directly modify the listeners
  collection.
  The DiagnosticsConfigurationHandler assumes this so that it can <add/> and
  <remove/> trace listeners and set the logfile for the DefaultTraceListener.

svn path=/trunk/mcs/; revision=9786
2002-12-19 23:36:00 +00:00
Miguel de Icaza 63c75e1f0e 2002-12-19 Miguel de Icaza <[email protected]>
* attribute.cs (Attributes.Contains): Add new method.

	* class.cs (MethodCore.LabelParameters): if the parameter is an
	`out' parameter, check that no attribute `[In]' has been passed.

svn path=/trunk/mcs/; revision=9785
2002-12-19 22:31:34 +00:00
Miguel de Icaza 763d5b92a2 update
svn path=/trunk/mono/; revision=9784
2002-12-19 22:08:46 +00:00
Miguel de Icaza 1473503ae7 Fix the test
svn path=/trunk/mcs/; revision=9783
2002-12-19 22:04:24 +00:00
César Natarén df5afd9d37 Added file cs0230.cs
svn path=/trunk/mcs/; revision=9782
2002-12-19 21:56:08 +00:00
Miguel de Icaza 630c4a5800 2002-12-14 Jaroslaw Kowalski <[email protected]>
* decl.cs: Added special case to allow overrides on "protected
	internal" methods

svn path=/trunk/mcs/; revision=9781
2002-12-19 21:21:58 +00:00
César Natarén fbe4a7a52f Added file cs0225.cs
svn path=/trunk/mcs/; revision=9780
2002-12-19 21:09:35 +00:00
Marco Ridoni c545c4f6cc Minor changes
svn path=/trunk/mcs/; revision=9779
2002-12-19 20:57:05 +00:00
Dennis Hayes 6348ceadfe monir tweaks
svn path=/trunk/mcs/; revision=9777
2002-12-19 20:46:21 +00:00
Marco Ridoni 930d8df78d A few fixes to make properties work properly (not totally fixed yet)
svn path=/trunk/mcs/; revision=9776
2002-12-19 20:41:20 +00:00
Ville Palo fd9537549a 2002-12-19 Ville Palo <[email protected]>
* DataSet.cs Implemented ReadXml with XmlReadMode.ReadSchema

svn path=/trunk/mcs/; revision=9775
2002-12-19 20:14:13 +00:00
Jaime Anguiano Olarra 694f875483 ApplicationName and AplicationID implemented.
svn path=/trunk/mcs/; revision=9774
2002-12-19 18:37:24 +00:00
Jaime Anguiano Olarra 8fbc5fca48 Added the Gtk# intro page.
svn path=/trunk/mono/; revision=9773
2002-12-19 18:07:57 +00:00
Jaime Anguiano Olarra c6d8f736e3 Added a custom Gtk# introduction.
svn path=/trunk/mono/; revision=9772
2002-12-19 18:02:15 +00:00
Paolo Molaro 2000882245 Thu Dec 19 18:31:54 CET 2002 Paolo Molaro <[email protected]>
* jit.c: fix LDELEMA implementation here as well.

svn path=/trunk/mono/; revision=9771
2002-12-19 17:34:29 +00:00
Gonzalo Paniagua Javier 52218604b0 2002-12-19 Gonzalo Paniagua Javier <[email protected]>
* HttpValueCollection.cs: patch from Botjan Vizin
	<[email protected]> that implements ToString (bool).

svn path=/trunk/mcs/; revision=9770
2002-12-19 17:29:27 +00:00
Paolo Molaro fe58460445 Thu Dec 19 16:43:19 CET 2002 Paolo Molaro <[email protected]>
* MonoMethod.cs, ParameterInfo.cs: return a custom attribute
	provider for the return type of a method.

svn path=/trunk/mcs/; revision=9769
2002-12-19 15:46:00 +00:00
Paolo Molaro 0b7186d44d Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <[email protected]>
* object.c: removed assert to allow static fields on interfaces.
	* loader.c: a TypeSpec may be used for any type, not just arrays.

svn path=/trunk/mono/; revision=9768
2002-12-19 15:26:08 +00:00
Paolo Molaro 0ff9d1d988 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <[email protected]>
* class.c, class.h: added mono_class_array_element_size ().
	Ignore static methods in interfaces.

svn path=/trunk/mono/; revision=9767
2002-12-19 13:22:53 +00:00
Marco Ridoni cda9448ef0 Some minor changes
svn path=/trunk/mcs/; revision=9766
2002-12-19 12:28:03 +00:00
Marco Ridoni 4387ccd8db Invocation.DoResolve was modified to accomodate Properties with
parameters (which still need a bit of work)

svn path=/trunk/mcs/; revision=9765
2002-12-19 12:03:04 +00:00
Gonzalo Paniagua Javier 845496d205 2002-12-19 Gonzalo Paniagua Javier <[email protected]>
* System.Web.Configuration/AuthConfig.cs: LoginUrl defaults to login.aspx.
	* System.Web.Security/FormsAuthentication.cs: return a null ticket when
	an exception is thrown creating it. Implemented RenewTicketIfOld.

	* System.Web.Security/FormsAuthenticationModule.cs: implemented event
	handlers for AuthenticateRequest and EndRequest.
	* System.Web.Security/FormsAuthenticationTicket.cs: implemented
	SetDates and Clone methods.

svn path=/trunk/mcs/; revision=9764
2002-12-19 05:26:58 +00:00
Gonzalo Paniagua Javier 4c82ee69ae 2002-12-19 Gonzalo Paniagua Javier <[email protected]>
* DateTime.cs: fixed bug #30076.
	* TimeZone.cs: provide the parameter name in a exception.

svn path=/trunk/mcs/; revision=9763
2002-12-19 05:16:32 +00:00
Gonzalo Paniagua Javier 6af1fe9bdf 2002-12-19 Gonzalo Paniagua Javier <[email protected]>
* AspGenerator.cs: generate code like 'control.XXX = value' also for
	public fields (properties were being handled in that way too).

svn path=/trunk/mcs/; revision=9762
2002-12-19 04:20:28 +00:00
Gonzalo Paniagua Javier c5f048f1c7 2002-12-19 Gonzalo Paniagua Javier <[email protected]>
* threads.c: fixed the build under cygwin.

svn path=/trunk/mono/; revision=9761
2002-12-19 02:26:39 +00:00
Gonzalo Paniagua Javier 8543293ad2 2002-12-19 Gonzalo Paniagua Javier <[email protected]>
* ConfigXmlDocument.cs: don't jump over the first element.
	* ConfigurationSettings.cs: pass doc.DocumentElement instead of doc.

	This used to work until i tried to access one attribute of the first
	element and realized that the element was not the expected!
	This change does not affect the configuration handlers that only use
	ChildNodes property on the XmlNode they get as argument.

svn path=/trunk/mcs/; revision=9760
2002-12-19 01:50:06 +00:00
César Natarén c7fa63baee Added file cs0201.cs
svn path=/trunk/mcs/; revision=9759
2002-12-19 01:46:52 +00:00
César Natarén 763b5774f2 Added test for error CS0201.
svn path=/trunk/mcs/; revision=9758
2002-12-19 01:35:45 +00:00
Ravi Pratap M 0cf7fde104 2002-12-18 Ravi Pratap <[email protected]>
* attribute.cs (Attributes.AddAttributeSection): Rename to this
	since it makes much more sense.

	(Attributes.ctor): Don't require a Location parameter.

	* rootcontext.cs (AddGlobalAttributeSection): Rename again.

	* attribute.cs (ApplyAttributes): Remove extra Location parameters
	since we already have that information per attribute.

	* everywhere : make appropriate changes.

	* class.cs (LabelParameters): Write the code which actually
	applies attributes to the return type. We can't do this on the MS
	.NET runtime so we flag a warning in the case an exception is
	thrown.

svn path=/trunk/mcs/; revision=9757
2002-12-19 00:44:23 +00:00
Ravi Pratap M e9e9fb22e2 Add test 176 to the usual suite. Wonder why it wasnt there.
svn path=/trunk/mcs/; revision=9756
2002-12-19 00:39:05 +00:00
Ravi Pratap M 488ca42f3e test-177 goes into NO_PASS for now
svn path=/trunk/mcs/; revision=9755
2002-12-19 00:36:07 +00:00
Ravi Pratap M e324c6452d 2002-12-18 Ravi Pratap <[email protected]>
* test-177.cs : Add. This doesn't pass yet because we don't have
	ReturnTypeCustomAttributes working.

svn path=/trunk/mcs/; revision=9754
2002-12-19 00:35:31 +00:00
Ravi Pratap M 01714dfb49 2002-12-18 Ravi Pratap <[email protected]>
* errors.txt : Update for error # -24.

svn path=/trunk/mcs/; revision=9753
2002-12-19 00:23:25 +00:00
Paolo Molaro a9a7df0439 Thu Dec 19 00:06:57 CET 2002 Paolo Molaro <[email protected]>
* AssemblyBuilder.cs: remove duplicated user string entries.

svn path=/trunk/mcs/; revision=9752
2002-12-18 23:09:09 +00:00
Ville Palo d5634eb360 2002-12-18 Ville Palo <[email protected]>
* DataSet.cs: Started to implement ReadXml-methods.

svn path=/trunk/mcs/; revision=9751
2002-12-18 19:48:44 +00:00
Miguel de Icaza c724358425 2002-12-18 Miguel de Icaza <[email protected]>
* const.cs: Handle implicit null conversions here too.

svn path=/trunk/mcs/; revision=9750
2002-12-18 19:32:36 +00:00
Gonzalo Paniagua Javier ce46a3e791 2002-12-18 Gonzalo Paniagua Javier <[email protected]>
* configure.in: moved struct tm field tm_gmtoff check before the check
	for timezone global variable. This makes Timezone work for me (debian
	sid, linux, x86, which has both the field and the global variables).

svn path=/trunk/mono/; revision=9749
2002-12-18 19:01:27 +00:00
Paolo Molaro 1c256c7686 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <[email protected]>
* reflection.c: handle nullref constants. Allocate keys for
	reflection handles with the GC.

svn path=/trunk/mono/; revision=9748
2002-12-18 17:46:17 +00:00
Jonathan Pryor 60d72a0f50 Switches (Boolean & Trace) should be working now. Behavior of user-provided
Switch derived classes should match that of .NET.

Go forth and use Swiches! ;-)

ChangeLog:
  * BooleanSwitch.cs: Complete re-write.  It works now.
  * DefaultTraceListener.cs:
    - Use `const' strings, so I don't worry about copy/paste errors
    - Give `AssertUiEnabled' an actual backing member
  * DiagnosticsConfigurationHandler.cs: To avoid race conditions, let the
    configuration handler set .config-specified properties on
    DefaultTraceListener (AssertUiEnabled, LogFileName) and TraceImpl
    (AutoFlush, IndentSize).
  * Switch.cs: Near complete re-write.  Actually works, and is (should be)
    comformant with .NET behavior.  Changed member names because they were
    confusing me.  (Yes, that doesn't say much about my memory.)
  * TextWriterTraceListener.cs: Append text to already existing files, don't
    overwrite them.
  * TraceImpl.cs:
    - Added private destructor, to ensure no instances are created.
    - Move members declarations to be closer to each other.
  * TraceSwitch.cs: Complete re-write.  It works now.

svn path=/trunk/mcs/; revision=9747
2002-12-18 16:01:09 +00:00
Paolo Molaro 920f482d9c Wed Dec 18 11:42:58 CET 2002 Paolo Molaro <[email protected]>
* jit.c: handle CEE_CONV_OVF_U8_UN like CEE_CONV_OVF_I8_UN.

svn path=/trunk/mono/; revision=9746
2002-12-18 10:45:15 +00:00
Paolo Molaro b6d7af01cf Wed Dec 18 11:36:04 CET 2002 Paolo Molaro <[email protected]>
jit.c: query the thread abort signal from the runtime.

svn path=/trunk/mono/; revision=9745
2002-12-18 10:38:17 +00:00
Paolo Molaro f4c02305c8 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <[email protected]>
* threads.c, threads.h: added mono_thread_get_abort_signal()
	to get a suitable signal for thread abort.

svn path=/trunk/mono/; revision=9744
2002-12-18 10:37:26 +00:00
Paolo Molaro a7888c627c Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <[email protected]>
* metadata.c: fix handling of ExportedType table.

svn path=/trunk/mono/; revision=9743
2002-12-18 10:28:25 +00:00
Gonzalo Paniagua Javier 3d1ea510c1 2002-12-18 Gonzalo Paniagua Javier <[email protected]>
* FormsAuthentication.cs: implemented GetAuthCookie, SetAuthCookie,
	SignOut, FormsCookieName and FormsCookiePath.

svn path=/trunk/mcs/; revision=9742
2002-12-18 03:28:02 +00:00
Dennis Hayes 868857b075 removed some 'extras'
svn path=/trunk/mcs/; revision=9741
2002-12-18 02:52:17 +00:00
Dennis Hayes fedcadcafd more menu implmentation
svn path=/trunk/mcs/; revision=9740
2002-12-18 02:30:02 +00:00
Dennis Hayes d9d9bb6675 updated menutest
svn path=/trunk/mcs/; revision=9739
2002-12-18 02:25:16 +00:00
Dennis Hayes 18ce6facb7 added new api function
svn path=/trunk/mcs/; revision=9738
2002-12-18 02:19:56 +00:00
Gonzalo Paniagua Javier 8e91ed0203 2002-12-18 Gonzalo Paniagua Javier <[email protected]>
* System.Web/HttpApplicationFactory.cs: add the context as parameter
	when building the application Type.

	* System.Web/HttpCookie.cs: new internal constructor.
	* System.Web/HttpCookieCollection.cs: new internal method to make a
	cookie expire.

	* System.Web/HttpRequest.cs: MapPath fixes.
	* System.Web/HttpResponse.cs: implemented ApplyAppPathModifier.
	* System.Web/HttpRuntime.cs: fixed typo in AppDomainAppVirtualPath.
	* System.Web.Compilation/AspGenerator.cs: now it uses the current
	HttpContext when creating user controls. TemplateSourceDirectory is no
	longer a dummy value.

	* System.Web.Compilation/GlobalAsaxCompiler.cs:
	* System.Web.Compilation/PageCompiler.cs:
	* System.Web.Compilation/UserControlCompiler.cs: set the context which
	will be used to locate the files.

	* System.Web.UI/BaseParser.cs: use MapPath and context to locate files.
	* System.Web.UI/Control.cs: implemented MapPathSecure.
	* System.Web.UI/TemplateControl.cs: use UrlUtils to generate the path.
	* System.Web.UI/TemplateControlParser.cs: use the context and MapPath.
	* System.Web.UI/UserControl.cs: implemented MapPath.
	* System.Web.UI/UserControlParser.cs: added context parameter to
	constructor.
	* System.Web.Util/PathUtil.cs: removed.
	* System.Web.Util/UrlUtils.cs: fixed Combine to handle '~'.

svn path=/trunk/mcs/; revision=9737
2002-12-18 02:17:17 +00:00
Ravi Pratap M 1c4362e658 2002-12-17 Ravi Pratap <[email protected]>
* class.cs (MethodCore.LabelParameters): Remove the extra
	Type [] parameter since it is completely unnecessary. Instead
	pass in the method's attributes so that we can extract
	the "return" attribute.

svn path=/trunk/mcs/; revision=9736
2002-12-17 23:36:20 +00:00
Jonathan Pryor 7187b5f041 Reformat to comply with Mono coding standards.
svn path=/trunk/mcs/; revision=9735
2002-12-17 22:10:50 +00:00
Jonathan Pryor e11681b16e Add <system.diagnostics/> to the available .config file sections.
svn path=/trunk/mono/; revision=9734
2002-12-17 21:50:54 +00:00
Jonathan Pryor b843881827 Implement DiagnosticsConfigurationHandler, so that .config files can contain
<system.diagnostics/> configuration sections.

svn path=/trunk/mcs/; revision=9733
2002-12-17 21:42:08 +00:00
Alejandro Sánchez Acosta a481294ce7 Added new mcs test error cs0154.cs
svn path=/trunk/mcs/; revision=9732
2002-12-17 17:51:26 +00:00
Alejandro Sánchez Acosta ed99b91dda new test sample
svn path=/trunk/mcs/; revision=9731
2002-12-17 17:40:08 +00:00
Alejandro Sánchez Acosta d7bda5dd8f new sample test error cs0138.cs
svn path=/trunk/mcs/; revision=9730
2002-12-17 17:38:41 +00:00
Ville Palo 6e4193fc42 2002-12-17 Ville Palo <[email protected]>
* region.xml:
	* store.xsd: new xmldoment and xmlschema for testing DataSet
	* DataSetTest.cs: Added some Xml-tests.
	* AllTests.cs: Added DataSetTest

svn path=/trunk/mcs/; revision=9729
2002-12-17 16:05:38 +00:00
Marco Ridoni c3572782b7 Properties implemented. Property paramters still don't work.
svn path=/trunk/mcs/; revision=9728
2002-12-17 13:24:41 +00:00
Marco Ridoni 5918028c17 Implemented an overloaded method for EmitTopBlock which is called by
MethodData.Emit and specifies the function name (needed to get the return
value)

svn path=/trunk/mcs/; revision=9727
2002-12-17 13:23:38 +00:00
Miguel de Icaza 8fb465e560 2002-12-17 Miguel de Icaza <[email protected]>
* cs-parser.jay (parse): Use Report.Error to flag errors instead
	of ignoring it and letting the compile continue.

	* typemanager.cs (ChangeType): use an extra argument to return an
	error condition instead of throwing an exception.

svn path=/trunk/mcs/; revision=9726
2002-12-17 09:12:07 +00:00
Gonzalo Paniagua Javier 9096fdf8c0 2002-12-17 Gonzalo Paniagua Javier <[email protected]>
* BaseValidator.cs: return an empty string in GetControlValidationValue
	when GetValue returned null.

	* CompareValidator.cs: fixed EvaluateIsValid.

	* RegularExpressionValidator.cs: fixed EvaluateIsValid.

svn path=/trunk/mcs/; revision=9725
2002-12-17 07:31:20 +00:00
Gonzalo Paniagua Javier 1cffa9bea3 2002-12-17 Gonzalo Paniagua Javier <[email protected]>
* Xml.cs: use MapPathSecure to get the path of the document.

svn path=/trunk/mcs/; revision=9724
2002-12-17 04:50:26 +00:00
Gonzalo Paniagua Javier b272797408 2002-12-17 Gonzalo Paniagua Javier <[email protected]>
* Control.cs: implemented MapPathSecure.
	* Page.cs: fixed Server property.

svn path=/trunk/mcs/; revision=9723
2002-12-17 04:47:08 +00:00
Gonzalo Paniagua Javier dcfad7ede7 2002-12-17 Gonzalo Paniagua Javier <[email protected]>
* FormsAuthentication.cs: implemented Authenticate, unencrypted Encrypt
	and Decrypt, HashPasswordForStoringInConfigFile and Initialize.

	* FormsAuthenticationTicket.cs: set cookiePath to the default when no
	other provided.

svn path=/trunk/mcs/; revision=9722
2002-12-17 04:44:49 +00:00
Gonzalo Paniagua Javier 48c0213c19 updated list file
svn path=/trunk/mcs/; revision=9721
2002-12-17 04:41:15 +00:00
Gonzalo Paniagua Javier 045bda5f2e 2002-12-17 Gonzalo Paniagua Javier <[email protected]>
* AuthConfig.cs:
	* AuthenticationConfigHandler.cs: handler and helper class for
	system.web/authentication configuration section.

	* HttpHandlersSectionHandler.cs: check for null in attributes.

	* MachineKeyConfig.cs:
	* MachineKeyConfigHandler.cs: handler and helper class for
	system.web/machineKey tag.

svn path=/trunk/mcs/; revision=9720
2002-12-17 04:40:13 +00:00
Nick Drochak 5aa72841ea forgot to add this from a while back
svn path=/trunk/mcs/; revision=9719
2002-12-17 04:34:38 +00:00
Gonzalo Paniagua Javier 98dad4b1be 2002-12-17 Gonzalo Paniagua Javier <[email protected]>
* HttpContext.cs: hack to create a default user when there's no one.
	Implemented GetConfig (string).

	* HttpRequest.cs: fixes to MapPath (string).

svn path=/trunk/mcs/; revision=9718
2002-12-17 04:28:10 +00:00
Gonzalo Paniagua Javier 49c0d13a3f updated list file
svn path=/trunk/mcs/; revision=9717
2002-12-17 04:23:16 +00:00
Gonzalo Paniagua Javier 9c8a33be2e oops. Typo
svn path=/trunk/mono/; revision=9716
2002-12-17 04:20:48 +00:00
Gonzalo Paniagua Javier eddf7d74d8 2002-12-17 Gonzalo Paniagua Javier <[email protected]>
* DataSet.cs: implemented DefaultViewManager and GetList.

	* DataViewManager.cs: a bit of work on IList and ITypedList needed by
	DataList in System.Web.

	* DataViewManagerListItemTypeDescriptor.cs: custom type descriptor for
	DataViewManager.

svn path=/trunk/mcs/; revision=9715
2002-12-17 04:19:27 +00:00
Gonzalo Paniagua Javier a880449fbc 2002-12-17 Gonzalo Paniagua Javier <[email protected]>
* GenericIdentity.cs: check arguments and fixed IsAuthenticated.

svn path=/trunk/mcs/; revision=9714
2002-12-17 04:15:26 +00:00
Gonzalo Paniagua Javier d81e88dbbc new sections
svn path=/trunk/mono/; revision=9713
2002-12-17 04:13:43 +00:00
Sebastien Pouliot f73e4954e9 2002-12-16 Sebastien Pouliot <[email protected]>
* unix.args: added StrongName.cs, StrongNamePublicKeyBlob.cs
	and StrongNameIdentityPermission.cs files.

svn path=/trunk/mcs/; revision=9712
2002-12-17 04:03:36 +00:00
Sebastien Pouliot 92954a18d3 2002-12-16 Sebastien Pouliot <[email protected]>
* corlib_linux_test.args: added StrongNamePublicKeyBlob and
	StrongName test files.

svn path=/trunk/mcs/; revision=9711
2002-12-17 04:02:51 +00:00
Sebastien Pouliot 376a1a0908 2002-12-16 Sebastien Pouliot <[email protected]>
* AllTests.cs: Added test suites for StrongName.
	* StrongNameTest.cs: New. Test suite for StrongName (complete).

svn path=/trunk/mcs/; revision=9710
2002-12-17 04:02:11 +00:00
Sebastien Pouliot 3f705b0c1e 2002-12-16 Sebastien Pouliot <[email protected]>
* StrongName.cs: New. Implemented.

svn path=/trunk/mcs/; revision=9709
2002-12-17 04:01:11 +00:00
Sebastien Pouliot 6d4d947a18 2002-12-16 Sebastien Pouliot <[email protected]>
AllTests.cs: Added StrongNamePublicKeyBlobTest suite.
	StrongNamePublicKeyBlobTest.cs: New. Test suite for
	StrongNamePublicKeyBlob.

svn path=/trunk/mcs/; revision=9708
2002-12-17 03:59:26 +00:00
Sebastien Pouliot f9a5f1f8bb 2002-12-16 Sebastien Pouliot <[email protected]>
* StrongNamePublicKeyBlob.cs: New. Implemented.
	* StrongNameIdentityPermission.cs. New. Stubbed (required
	for StrongName class).

svn path=/trunk/mcs/; revision=9707
2002-12-17 03:58:11 +00:00
Ville Palo c815067fde 2002-12-16 Ville Palo <[email protected]>
* DataRow.cs
	* DataTable.cs: Fixed NullException (rollback -event)
	* DataSet.cs: WriteXml -method does not anymore write <?xml... row.

svn path=/trunk/mcs/; revision=9706
2002-12-16 18:50:22 +00:00
Ville Palo 53ea503c26 2002-12-16 Ville Palo <[email protected]>
* System.Xml/XmlDataDocumentTest.cs: some fixes.

svn path=/trunk/mcs/; revision=9705
2002-12-16 18:43:28 +00:00
Ville Palo 2366f340fd 2002-12-16 Ville Palo <[email protected]>
* System.Xml/XmlDataDocument.cs: Now rollback works. It means all
	types of transactions works, i guess ;)

svn path=/trunk/mcs/; revision=9704
2002-12-16 18:40:07 +00:00
Miguel de Icaza 5505a96205 Remove file
svn path=/trunk/mono/; revision=9703
2002-12-16 04:51:17 +00:00
Miguel de Icaza c1a1833e3b Add file in this directory
svn path=/trunk/mono/; revision=9702
2002-12-16 04:51:07 +00:00
Miguel de Icaza 9c32fb39a8 Flush
svn path=/trunk/mono/; revision=9701
2002-12-16 04:50:58 +00:00
Sebastien Pouliot a80cb630dd 2002-12-15 Sebastien Pouliot <[email protected]>
* unix.args: added PublisherIdentityPermission.cs,
	Publisher.cs and PublisherMembershipCondition.cs

svn path=/trunk/mcs/; revision=9699
2002-12-16 02:02:44 +00:00
Sebastien Pouliot ece54edd18 2002-12-15 Sebastien Pouliot <[email protected]>
* corlib_linux_test.args: added Publisher and
	PublisherMembershipCondition test files.

svn path=/trunk/mcs/; revision=9698
2002-12-16 02:01:49 +00:00
Sebastien Pouliot 35c33c2804 2002-12-15 Sebastien Pouliot <[email protected]>
* AllTests.cs: Added test suites for Publisher and
	PublisherMembershipCondition.
	* PublisherTest.cs: New. Test suite for Publisher (complete).
	* PublisherMembershipConditionTest.cs: New. Test suite for Publisher
	PublisherMembershipCondition (incomplete).

svn path=/trunk/mcs/; revision=9697
2002-12-16 02:00:52 +00:00
Sebastien Pouliot 389cd4bee6 2002-12-15 Sebastien Pouliot <[email protected]>
* Publisher.cs: New. Implemented.
	* PublisherMembershipCondition.cs: New. X509 related stuff implemented.

svn path=/trunk/mcs/; revision=9696
2002-12-16 01:59:35 +00:00
Sebastien Pouliot a80dd5cb26 2002-12-15 Sebastien Pouliot <[email protected]>
* PublisherIdentityPermission.cs. New. Stubbed (required
	for Publisher class).

svn path=/trunk/mcs/; revision=9695
2002-12-16 01:58:22 +00:00
Eduardo Garcia Cebollero 886f18c732 2002-12-16 Eduardo Garcia Cebollero <[email protected]>
* Directory.cs: Some fixes to SMB shares handling, and not compiling
	with csc, mcs compiles it correctly (mcs bug 35652)

svn path=/trunk/mcs/; revision=9694
2002-12-16 00:31:11 +00:00
Eduardo Garcia Cebollero ef43ef882a 2002-12-14 Eduardo Garcia Cebollero <[email protected]>
* Directory.cs: Some fixes related to correct some exceptions thrown

2002-12-11  Eduardo Garcia Cebollero <[email protected]>

	* Directory.cs: Some Exceptions added, fixed GetParent(),
	CreateDirectory() should work with unix, native windows and
	windows samba shares. Converted end-lines from dos-mode to unix-mode

2002-12-08  Eduardo Garcia Cebollero <[email protected]>

	* Directory.cs: CreateDirectory  works now with Absolute paths
	too, not only with relative ones.

svn path=/trunk/mcs/; revision=9693
2002-12-15 23:14:30 +00:00
Johannes Roith 63ef7bccd2 add mono basic compiler page
svn path=/trunk/mono/; revision=9692
2002-12-15 23:03:03 +00:00
Miguel de Icaza 4863ad2d71 Flush
svn path=/trunk/mono/; revision=9691
2002-12-15 22:13:00 +00:00
Miguel de Icaza 219c7642e5 Update
svn path=/trunk/mcs/; revision=9690
2002-12-15 22:03:47 +00:00
Miguel de Icaza b839d66b10 Flush
svn path=/trunk/mono/; revision=9689
2002-12-15 20:18:10 +00:00
Sebastien Pouliot 362af3afae 2002-12-15 Sebastien Pouliot <[email protected]>
* X509CertificateTest.cs: Uncommented the GetEffectiveDateString and
	GetExpirationDateString tests. Added a test for ToString(true).

svn path=/trunk/mcs/; revision=9688
2002-12-15 20:18:04 +00:00
Sebastien Pouliot caba817083 2002-12-15 Sebastien Pouliot <[email protected]>
* X509Certificate.cs: Fixed the date issue. MS implementation always
	return the local time for Pacific (GMT-8). Added ToString() and changed
	some protected to private to please corcompare.

svn path=/trunk/mcs/; revision=9687
2002-12-15 20:16:44 +00:00
Gonzalo Paniagua Javier 6ff6f22bc2 added ErrorLevel.cs
svn path=/trunk/mcs/; revision=9686
2002-12-15 19:09:49 +00:00
Jackson Harper 33ac496fc8 Moved ErrorLevel enum into its own file
svn path=/trunk/mcs/; revision=9685
2002-12-15 18:02:23 +00:00
Alp Toker ebebc496df 2002-12-15 Alp Toker <[email protected]>
* makefile.gnu: make sure mcs is in PATH, otherwise tell user to read
	INSTALL.txt

svn path=/trunk/mcs/; revision=9679
2002-12-15 16:38:48 +00:00
Nick Drochak a1f1e7e966 2002-12-15 Nick Drochak <[email protected]>
* nunit.build: Don't delete Transform.resources now, we don't generate
	it anymore.

svn path=/trunk/mcs/; revision=9674
2002-12-15 14:37:52 +00:00
Nick Drochak 3f6d1d848c 2002-12-15 Nick Drochak <[email protected]>
* Transform.resources: Add file.  This is technically a generated file,
	but it will never change for us since we get the sources from the nunit
	project anyway.

svn path=/trunk/mcs/; revision=9672
2002-12-15 14:18:48 +00:00
Gonzalo Paniagua Javier acb4421b8b 2002-12-15 Gonzalo Paniagua Javier <[email protected]>
* ConfigurationSettings.cs: removed type loading hack no longer needed.

svn path=/trunk/mcs/; revision=9668
2002-12-15 12:41:50 +00:00
Ville Palo 8050bf79b1 2002-12-15 Ville Palo <[email protected]>
* DataRow.cs:
	* DataRowCollection.cs: Moved event triggering from DataRow to
	DataRowCollection.

svn path=/trunk/mcs/; revision=9666
2002-12-15 10:32:32 +00:00
Miguel de Icaza e27296d935 Add new test
svn path=/trunk/mcs/; revision=9665
2002-12-15 08:49:32 +00:00
Jonathan Pryor 2891b0badc Allow configuration settings to be removed. Previously, if you tried to
remove a configuration setting, you'd get an exception saying that there was
no factory for it (i.e. it had already been removed).

svn path=/trunk/mcs/; revision=9664
2002-12-15 04:43:37 +00:00
Gonzalo Paniagua Javier 3b9e702ba9 2002-12-15 Gonzalo Paniagua Javier <[email protected]>
* DataBinder.cs: try the indexer if the property is not found in
	GetPropertyValue ().

svn path=/trunk/mcs/; revision=9663
2002-12-15 03:54:51 +00:00
Daniel Morgan 58d5c73846 2002-12-14 Daniel Morgan <[email protected]>
* Mono.Data.Tds.Protocol/Tds70.cs: single quotes in SQL string
	need to be escaped as two single quotes

svn path=/trunk/mcs/; revision=9662
2002-12-15 02:27:29 +00:00
Gonzalo Paniagua Javier 2a0582c8bf 2002-12-15 Gonzalo Paniagua Javier <[email protected]>
* DefaultTraceListener.cs: now OutputDebugStringW is called from an
	internal call (update your runtime!). No more warnings in linux.

svn path=/trunk/mcs/; revision=9661
2002-12-15 02:19:34 +00:00
Gonzalo Paniagua Javier 0a5f3a447e 2002-12-15 Gonzalo Paniagua Javier <[email protected]>
* icall.c: added WriteWindowsDebugString internal call.

svn path=/trunk/mono/; revision=9660
2002-12-15 02:17:59 +00:00
Gonzalo Paniagua Javier d63f33d197 2002-12-15 Gonzalo Paniagua Javier <[email protected]>
* reflection.h: added fields to match C# implementation.

svn path=/trunk/mono/; revision=9659
2002-12-15 02:11:45 +00:00
Daniel Morgan 093db10b18 2002-12-12 Daniel Morgan <[email protected]>
* makefile.gnu
	* win32.make: removed non-existent file from build

svn path=/trunk/mcs/; revision=9658
2002-12-15 01:01:25 +00:00
Daniel Morgan 0199cca9da 2002-12-12 Daniel Morgan <[email protected]>
* makefile.gnu: added file for linux build

	* win32.make: update file for windows build

	* DataGrid.cs: since SetColumnTypes has been fixed in GTK#,
	update its use here

	* sqlsharpgtk.cs: change Console.WriteLine()s to Error()s or
	get rid of the Console.WriteLine()s.  Created new menus Session
	and Command and move some menu items.  Implement new menu items
	File - New, Open, Save, and Save As

	* FileSelectionDialog.cs: added file
	to make it easier to use the FileSelection dialog

	* SqlEditorSharp.cs: added public methods
	LoadFromFile, SaveToFile, and Clear

svn path=/trunk/mcs/; revision=9657
2002-12-15 00:52:59 +00:00
Miguel de Icaza 452cfa4ca5 Flush
svn path=/trunk/mono/; revision=9649
2002-12-14 22:27:19 +00:00
Miguel de Icaza 68a9e6f96d Revert Directory.cs patch until its fixed
svn path=/trunk/mcs/; revision=9645
2002-12-14 19:40:15 +00:00
Ville Palo 78ef9ef5dc Fixed ms warning issue
svn path=/trunk/mcs/; revision=9643
2002-12-14 17:51:29 +00:00
Ville Palo 4ee28e267c 2002-12-14 Ville Palo [email protected]>
* System.Xml/XmlDataDocumentTest.cs: Added three new tests

svn path=/trunk/mcs/; revision=9639
2002-12-14 17:14:37 +00:00
Ville Palo 2a37c57394 2002-12-14 Ville Palo <[email protected]>
* System.Xml/XmlDataDocument.cs: Adding row via XmlDataDocument to
	DataSet's datatable is now possible.

svn path=/trunk/mcs/; revision=9638
2002-12-14 17:11:20 +00:00
Gonzalo Paniagua Javier 97064f82ad 2002-12-14 Gonzalo Paniagua Javier <[email protected]>
* typemanager.cs: fixed cut & paste error in GetRemoveMethod.

svn path=/trunk/mcs/; revision=9637
2002-12-14 16:33:18 +00:00
Gonzalo Paniagua Javier 8d75eddbf5 2002-12-14 Gonzalo Paniagua Javier <[email protected]>
* icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.

svn path=/trunk/mono/; revision=9636
2002-12-14 15:58:28 +00:00
Jaime Anguiano Olarra 07ef78ce07 Fixing versions. Now all it's fine.
svn path=/trunk/mono/; revision=9626
2002-12-13 18:42:41 +00:00
Jaime Anguiano Olarra 9889b5435f Added a pair Q/A. Not much general things the past days.
svn path=/trunk/mono/; revision=9625
2002-12-13 18:21:36 +00:00
Marco Ridoni b26d6e1e11 Implemented For..Next..Step
Implemented Finally clause in Try..Catch

svn path=/trunk/mcs/; revision=9624
2002-12-13 16:30:44 +00:00
Gonzalo Paniagua Javier 31c202887f 2002-12-13 Gonzalo Paniagua Javier <[email protected]>
* System.Web.Compilation/AspGenerator.cs: added support for
	AutoEventWireup attribute in @Page and @Control.

	* System.Web.Compilation/CompilationResult.cs:
	* System.Web.Compilation/GlobalAsaxCompiler.cs:
	* System.Web.Compilation/PageCompiler.cs:
	* System.Web.Compilation/UserControlCompiler.cs: store the options.

	* System.Web.UI/Control.cs: added AutoEventWireup internal property.

	* System.Web.UI/Page.cs: removed page events wire up from here.

	* System.Web.UI/TemplateControl.cs: new method WireupAutomaticEvents to
	hook up page and user controls events.

	* System.Web.UI/TemplateControlParser.cs: process the options that are
	applicable once we have the instance of the control.

	* System.Web.UI/TemplateParser.cs: also stores the options.

	* System.Web.UI/UserControl.cs: hook up events before initializing the
	control.

svn path=/trunk/mcs/; revision=9623
2002-12-13 15:57:07 +00:00
Gonzalo Paniagua Javier 4b38835edf 2002-12-13 Gonzalo Paniagua Javier <[email protected]>
* DecimalFormatter.cs: fixed bug #35560.

svn path=/trunk/mcs/; revision=9619
2002-12-13 10:05:51 +00:00
Gonzalo Paniagua Javier d7948ad01a 2002-12-13 Gonzalo Paniagua Javier <[email protected]>
* namespace.cs: fixed bug #35489.

svn path=/trunk/mcs/; revision=9618
2002-12-13 09:46:54 +00:00
Gonzalo Paniagua Javier 72df0c550b 2002-12-13 Gonzalo Paniagua Javier <[email protected]>
* DataList.cs: fixed header & footer.

svn path=/trunk/mcs/; revision=9617
2002-12-13 09:28:55 +00:00
Miguel de Icaza 85ed858a24 Sorry about this
svn path=/trunk/mcs/; revision=9616
2002-12-13 06:05:38 +00:00
Juli Mallett f05c761b71 2002-12-12 Juli Mallett <[email protected]>
* jit.c: If SIGRTMIN is not defined, fall back to SIGUSR1.

svn path=/trunk/mono/; revision=9613
2002-12-13 03:31:36 +00:00
Juli Mallett 78d1184ee5 2002-12-12 Juli Mallett <[email protected]>
* gc.h, gc-internal.h: Rename header for GC internal calls to
	gc-internal.h from gc.h as to not clash with Boehm GC having its
	header installed as <gc.h> in outside include paths.
	* appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
	* threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.

svn path=/trunk/mono/; revision=9612
2002-12-13 03:31:33 +00:00
Miguel de Icaza 38ade84160 2002-12-12 Miguel de Icaza <[email protected]>
* class.cs: Remove some dead code.

	* cs-parser.jay: Estimate the number of methods needed
	(RootContext.MethodCount);

	* cs-tokenizer.cs: Use char arrays for parsing identifiers and
	numbers instead of StringBuilders.

	* support.cs (PtrHashtable): Add constructor with initial size;
	We can now reduce reallocations of the method table.

svn path=/trunk/mcs/; revision=9611
2002-12-13 03:10:37 +00:00
Marco Ridoni 2f34bc1499 Statically declared events (i.e Sub MySub() Handles b1.Click) work (even
if they're probably buggy)
Try..Catch also works. Finally is in the grammat but still soes not work.

svn path=/trunk/mcs/; revision=9599
2002-12-12 23:29:46 +00:00
Gonzalo Paniagua Javier 06bb07d6d0 forgotten in last commit
svn path=/trunk/mcs/; revision=9595
2002-12-12 20:54:30 +00:00
Gonzalo Paniagua Javier 1fd7a5bbd1 2002-12-12 Gonzalo Paniagua Javier <[email protected]>
* System.Web.UI/Control.cs: new method to set bindingContainer value.
	* System.Web.UI/TemplateControl.cs: added controls are not binding
	containers.
	* System.Web.UI.WebControls/DataList.cs: for header and footer don't
	use data source. Instantiate in the DataListItem, not in the DataList.
	databind-template.aspx works now.

svn path=/trunk/mcs/; revision=9594
2002-12-12 20:45:43 +00:00
Ville Palo 31c994a6de Added -r System.Xml.dll
svn path=/trunk/mcs/; revision=9593
2002-12-12 20:42:18 +00:00
Gonzalo Paniagua Javier 76bf457206 forgot this one
svn path=/trunk/mcs/; revision=9592
2002-12-12 20:37:36 +00:00
Juli Mallett 8e85dddebb 2002-12-11 Juli Mallett <[email protected]>
* daemon.c, handles-private.h, handles.c, wapi-private.h:
	Check for an implementation which says it supports
	_POSIX_THREAD_PROCESS_SHARED, rather than just one that
	defines the symbol.  Defined but with a value of -1 still
	means that it is unsupported.

svn path=/trunk/mono/; revision=9591
2002-12-12 10:58:37 +00:00
Marco Ridoni bf76aa56e1 References to Microsoft.VisualBasic.* have been temporarily disabled
System.Drawing in driver.cs is referenced by default (just for now)
Added an extra define (EXTRA_DEFAULT_REFS) in driver.cs to allow default
  referencing of a bigger set of system assemblies. Off by default.

svn path=/trunk/mcs/; revision=9590
2002-12-12 10:53:01 +00:00
Marco Ridoni 4e9468ab1a Modified a check in AddConstructor (a VB.NET constructor is always named
'New')

svn path=/trunk/mcs/; revision=9589
2002-12-12 10:50:46 +00:00
Jackson Harper a4f95a85b1 Comment out UTF8... test (it does not exist)
svn path=/trunk/mcs/; revision=9588
2002-12-12 08:43:17 +00:00
Jackson Harper fc27d088b0 Partially implemented bugreport option, also only allow valid options now
svn path=/trunk/mcs/; revision=9587
2002-12-12 08:33:43 +00:00
Gonzalo Paniagua Javier 40f19f2cdf 2002-12-12 Gonzalo Paniagua Javier <[email protected]>
* Encoding.cs: g_get_encoding () returns "ASCII". In Default, when the
	encoding is not found, default to UTF8Unmarked. Removed comment in
	UnixConsoleEncoding, because it's now Default, which gets the
	encoding internally using g_get_encoding ().

svn path=/trunk/mcs/; revision=9584
2002-12-12 04:26:24 +00:00
Gonzalo Paniagua Javier 43d7f24f1c 2002-12-12 Gonzalo Paniagua Javier <[email protected]>
* list: Modified file.
	* System.Web/HttpRuntime.cs: avoid nulls and exception when getting
	resource format strings.

	* System.Web/StaticFileHandler.cs: added file name to error message.
	* System.Web.Compilation/AspElements.cs: new method Tag.GetElements
	used to parse the inner contents of a tag looking for data binding or
	code render tags.

	New property HtmlControlTag.ParseChildren allows
	differentiation of a couple of HtmlControls that has children as
	properties (namely HtmlTable and HtmlTableRow).

	* System.Web.Compilation/AspGenerator.cs: fixed container semantics to
	match BindingContainer one. Implemented Inherits attribute for page and
	control.

	Support HtmlControls that has ChildrenAsProperties.

	Generate code for data binding functions that matches the semantic of
	Container.

	Handle data bound and code render attribute values.

	Set proper value return for TemplateSourceDirectory. Should be relative
	to appPath.

	* System.Web.Compilation/BaseCompiler.cs: moved CompilerOptions and
	References handling here.

	* System.Web.Compilation/CachingCompiler.cs: copy result of compilation.

	* System.Web.Compilation/CompilationException.cs: simple ToString ()
	implementation.

	* System.Web.Compilation/CompilationResult.cs: implemented CopyFrom and
	ToString.

	* System.Web.Compilation/GlobalAsaxCompiler.cs:
	* System.Web.Compilation/PageCompiler.cs:
	* System.Web.Compilation/UserControlCompiler.cs: removed
	CompilerOptions as it's now handled in the base class. Get all the
	types in the generated assembly and look for one that derives from
	the correct Type.

	* System.Web.UI/Control.cs: implemented TemplateSourceDirectory.
	* System.Web.UI/TemplateControl.cs: implemented LoadControl and
	LoadTemplate.

	* System.Web.Util/PathUtil.cs: some path handling methods that are not
	available in Path.

svn path=/trunk/mcs/; revision=9583
2002-12-12 03:20:19 +00:00
Gonzalo Paniagua Javier e09de1116e 2002-12-12 Gonzalo Paniagua Javier <[email protected]>
* icall.c: assign minor, build and revision in FillName.

svn path=/trunk/mono/; revision=9580
2002-12-12 01:03:06 +00:00
Miguel de Icaza 8e87f4f56f Add notes
svn path=/trunk/mcs/; revision=9579
2002-12-12 00:22:16 +00:00
Jaime Anguiano Olarra fc38d2816d System.Runtime.Remoting/RemotingConfiguration.cs added to the build.
svn path=/trunk/mcs/; revision=9577
2002-12-11 20:37:58 +00:00
Jaime Anguiano Olarra 71d6ccb2b7 System.Runtime.Remoting.RemotingConfiguration.cs added to the CVS.
svn path=/trunk/mcs/; revision=9576
2002-12-11 20:37:14 +00:00
Jeroen Janssen 93d3ee72e7 2002-12-11 Jeroen Janssen <[email protected]>
* enabled building Mono.Directory.LDAP and
	  System.Design in .build file

svn path=/trunk/mcs/; revision=9574
2002-12-11 18:46:42 +00:00
Jeroen Janssen 23d85fcce6 2002-12-11 Jeroen Janssen <[email protected]>
* removed set for RootDesignerSerializerAttribute.TypeId
	* fixed .build file to include reference to System.dll

svn path=/trunk/mcs/; revision=9573
2002-12-11 18:44:00 +00:00
Jaime Anguiano Olarra 411a88af6b Little fix
svn path=/trunk/mcs/; revision=9572
2002-12-11 18:33:01 +00:00
Jeroen Janssen ae076ef087 2002-12-11 Jeroen Janssen <[email protected]>
* add reference to corlib.dll in order to eliminate [MonoTODO] build error

svn path=/trunk/mcs/; revision=9571
2002-12-11 18:32:10 +00:00
Miguel de Icaza aff2d37425 Update
svn path=/trunk/mono/; revision=9569
2002-12-11 18:00:29 +00:00
Zoltan Varga 384690ac59 * FieldBuilder.cs: added 'handle' field which is needed by some new
code in reflection.c.

svn path=/trunk/mcs/; revision=9566
2002-12-11 17:29:23 +00:00
Zoltan Varga f345a60ef8 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
Added support for running code generated by Reflection.Emit.

svn path=/trunk/mono/; revision=9565
2002-12-11 17:27:56 +00:00
Marco Ridoni eee4f0aa5e A few cosmetic changes: error codes are now reported as BCxxxx instead of
CSxxxx

svn path=/trunk/mcs/; revision=9564
2002-12-11 15:34:47 +00:00
Ville Palo bd8a904eca 2002-12-11 Ville Palo <[email protected]>
* System.Xml/XmlDataDocument.cs: Implemented GetRowFromElement() and
	GetElementFromRowElement () -methods. Somefixed and little clean up.

svn path=/trunk/mcs/; revision=9563
2002-12-11 15:25:21 +00:00
Marco Ridoni 963b4479a8 A lot of changes: support for modules, classes, properties, delegates,
parameters passing, namespace import. Preliminary event support.

svn path=/trunk/mcs/; revision=9562
2002-12-11 15:09:05 +00:00
Marco Ridoni 08234aa2b8 Commented out a few lines to solve a problem in member access
svn path=/trunk/mcs/; revision=9561
2002-12-11 15:07:45 +00:00
Marco Ridoni b3d003c0b5 Slight changes to allow compiling under Mono/mcs
svn path=/trunk/mcs/; revision=9560
2002-12-11 15:06:50 +00:00
Marco Ridoni e3ec9e0570 A few test files for classes, modules, delegates, properties, etc. Some of
them require System.Window.Forms

svn path=/trunk/mcs/; revision=9559
2002-12-11 14:53:58 +00:00
Dick Porter afd1f8e068 Fixed some debug messages
svn path=/trunk/mono/; revision=9558
2002-12-11 12:48:05 +00:00
Ravi Pratap M d113def524 2002-12-10 Ravi Pratap <[email protected]>
* attribute.cs (ApplyAttributes): Keep track of the emitted
	attributes on a per-target basis. This fixes bug #35413.

svn path=/trunk/mcs/; revision=9557
2002-12-11 03:25:45 +00:00
Ravi Pratap M 424ef47428 2002-12-10 Ravi Pratap <[email protected]>
* test-102.cs : Improve to catch the case when an attribute
	can be emitted twice for the same program element but with
	different targets.

svn path=/trunk/mcs/; revision=9556
2002-12-11 03:19:24 +00:00
Gonzalo Paniagua Javier e4eba3b888 2002-12-11 Gonzalo Paniagua Javier <[email protected]>
* appdomain.c: check for NULL argument in LoadFrom.

svn path=/trunk/mono/; revision=9555
2002-12-11 02:02:32 +00:00
Miguel de Icaza 18377cc045 Add
svn path=/trunk/mcs/; revision=9554
2002-12-11 00:09:18 +00:00
Miguel de Icaza 2cfc9fd1a6 2002-12-10 Miguel de Icaza <[email protected]>
* driver.cs (MainDriver): On rotor encoding 28591 does not exist,
	default to the Windows 1252 encoding.

	(UnixParseOption): Support version, thanks to Alp for the missing
	pointer.

	* AssemblyInfo.cs: Add nice assembly information.

	* cs-tokenizer.cs: Add fix from Felix to the #if/#else handler
	(bug 35169).

	* cs-parser.jay: Allow a trailing comma before the close bracked
	in the attribute_section production.

svn path=/trunk/mcs/; revision=9553
2002-12-10 23:54:06 +00:00
Miguel de Icaza 056d6258c8 Improve test
svn path=/trunk/mcs/; revision=9552
2002-12-10 23:47:42 +00:00
Miguel de Icaza b057401f91 2002-12-10 Miguel de Icaza <[email protected]>
* cs-parser.jay: Allow a trailing comma before the close bracked
	in the attribute_section production.

svn path=/trunk/mcs/; revision=9551
2002-12-10 23:16:47 +00:00
Daniel Morgan c80e9ca5df 2002-12-10 Daniel Morgan <[email protected]>
* doc/oracle: added file which is
	a new web page oracle.html

	* doc/ado-net: clean up and add link
	to oracle.html

	* doc/web/commands
	* doc/web/makefile: added oracle.html

svn path=/trunk/mono/; revision=9549
2002-12-10 23:10:19 +00:00
Miguel de Icaza 8fa2cc52ba Reverted changes, they break the build with our setup.
svn path=/trunk/mcs/; revision=9548
2002-12-10 23:02:59 +00:00
Miguel de Icaza dc2bd0825c Small fixes
svn path=/trunk/mcs/; revision=9547
2002-12-10 22:40:15 +00:00
Miguel de Icaza ebe5f0fecd Simple fix
svn path=/trunk/mcs/; revision=9546
2002-12-10 22:37:29 +00:00
Miguel de Icaza 685f14f961 Improve test
svn path=/trunk/mcs/; revision=9545
2002-12-10 22:34:40 +00:00
Miguel de Icaza 7d6c1a502b 2002-12-10 Miguel de Icaza <[email protected]>
* ecore.cs (FieldExpr.AddressOf): Until I figure out why the
	address of the instance was being taken, I will take this out,

svn path=/trunk/mcs/; revision=9544
2002-12-10 22:31:56 +00:00
Jeroen Janssen deafc750cf 2002-12-10 Jeroen Janssen <[email protected]>
* updated .build file(s) to correctly contain required buildfile
	  attribute for nant

svn path=/trunk/mcs/; revision=9543
2002-12-10 22:08:36 +00:00
Jeroen Janssen a91a4d1e89 2002-12-10 Jeroen Janssen <[email protected]>
* added System.ServiceProcess.build file
	* added ChangeLog file

svn path=/trunk/mcs/; revision=9542
2002-12-10 21:59:33 +00:00
Jeroen Janssen 7f7df1e6e5 2002-12-10 Jeroen Janssen <[email protected]>
* added Mono.Directory.LDAP.build file

svn path=/trunk/mcs/; revision=9541
2002-12-10 21:54:53 +00:00
Jeroen Janssen 46564e3d34 2002-12-10 Jeroen Janssen <[email protected]>
* added ChangeLog
	* fixed MonoTodo compile errors with csc

svn path=/trunk/mcs/; revision=9540
2002-12-10 21:38:35 +00:00
Miguel de Icaza 8fb70a7097 Fix
svn path=/trunk/mcs/; revision=9539
2002-12-10 19:57:08 +00:00
Jaime Anguiano Olarra 5803915c37 The CallContext skeleton.
svn path=/trunk/mcs/; revision=9538
2002-12-10 18:58:33 +00:00
Jaime Anguiano Olarra 45714addb2 *** empty log message ***
svn path=/trunk/mcs/; revision=9537
2002-12-10 18:34:49 +00:00
Jonathan Pryor b42293fb4e Changelog: Update
TestTypes.cs: work around lack of [return:] attribute support in MCS.

svn path=/trunk/mcs/; revision=9536
2002-12-10 18:18:34 +00:00
Daniel Morgan e2f1bdeecf 2002-12-10 Daniel Morgan <[email protected]>
* man/Makefile.am: changed sqlsharpcli.1 to sqlsharp.1

	* man/sqlsharpcli.1: renamed to sqlsharp.1

svn path=/trunk/mono/; revision=9535
2002-12-10 18:15:26 +00:00
Gonzalo Paniagua Javier 8d29a839ff 2002-12-10 Gonzalo Paniagua Javier <[email protected]>
* Mono.Data.Tds/Mono.Data.Tds.Protocol/Tds.cs:
	(Disconnect): close the stream and set connected to false.
	(NextResult): check if after DoneProc we have a ColumnMetadata + Row,
	which holds the values for the output parameters and read them.
	(LoadRow): add the values to outputParameters if DoneProc.
	When executing a stored procedure, we execute the procedure and then
	select the parameter values.

	* Mono.Data.Tds/Mono.Data.Tds.Protocol/Tds70.cs:
	(BuildParameters): check Parameters.

	* Mono.Data.Tds/Mono.Data.Tds.Protocol/TdsComm.cs: added Close () to
	close the stream.

	* Mono.Data.Tds/Mono.Data.Tds.Protocol/TdsConnectionParameters.cs:
	initialize all the string to be empty.

	* System.Data/System.Data.SqlClient/SqlCommand.cs:
	(CloseReader): don't get the output parameters here.
	(GetOutputParameters): don't skip the stream. The parameters will be
	there.

	* System.Data/System.Data.SqlClient/SqlConnection.cs: don't try to
	execute 'sp_reset_connection'.

	* System.Data/System.Data.SqlClient/SqlDataReader.cs: get the output
	parameters after the end of the results.

svn path=/trunk/mcs/; revision=9534
2002-12-10 18:08:08 +00:00
Dick Porter 21374e28f0 2002-12-10 Dick Porter <[email protected]>
* Monitor.cs:
	* Thread.cs:
	* ThreadPool.cs:
	* Timer.cs:
	* WaitHandle.cs: Use TotalMilliseconds to convert a TimeSpan to
	ms, not Milliseconds.

svn path=/trunk/mcs/; revision=9533
2002-12-10 18:02:55 +00:00
Daniel Morgan 212f3d1ec3 2002-12-10 Daniel Morgan <[email protected]>
* makefile
	* tools/makefile
	* tools/makefile.gnu: change target
	from SqlSharpCli.exe
	to sqlsharp.exe

svn path=/trunk/mcs/; revision=9532
2002-12-10 17:26:24 +00:00
Ville Palo 60d500f43f 2002-12-10 Ville Palo <[email protected]>
* System.Xml/XmlDataDocumentTest.cs: Added new tests
	* System.Xml/region.xml: Changed XmlDocument.

svn path=/trunk/mcs/; revision=9531
2002-12-10 17:19:48 +00:00
Daniel Morgan 24a8b73609 2002-12-10 Daniel Morgan <[email protected]>
* Makefile
	* SqlSharpCli.build: change target
	from SqlSharpCli.exe
	to sqlsharp.exe

	* README: mention how to run SQL#

svn path=/trunk/mcs/; revision=9530
2002-12-10 17:05:42 +00:00
Alp Toker 5e047389dc 2002-12-10 Alp Toker <[email protected]>
* ilasm/makefile.gnu: Install ilasm executable with -m 755, not 644
        * ilasm/makefile: ditto

svn path=/trunk/mcs/; revision=9529
2002-12-10 16:33:02 +00:00
Alp Toker ac80cad773 2002-12-10 Alp Toker <[email protected]>
* ilasm/makefile.gnu: Install ilasm executable with -m 755, not 644

svn path=/trunk/mcs/; revision=9528
2002-12-10 16:20:56 +00:00
Dick Porter 385339b14e 2002-12-10 Dick Porter <[email protected]>
* threads.c: WaitHandle fixes from Tum <[email protected]>

svn path=/trunk/mono/; revision=9527
2002-12-10 12:33:46 +00:00
Dick Porter 17948dace8 Don't abort the build if any of the prebuilt assemblies can't be found
svn path=/trunk/mono/; revision=9526
2002-12-10 12:21:41 +00:00
Gaurav Vaish 127cb9906a 2002-09-16 Gaurav Vaish <[email protected]>
* System.Web.UI.Design             : Added directory.

svn path=/trunk/mcs/; revision=9525
2002-12-10 10:04:37 +00:00
Tim Haynes 1064dbd97c Implemented MONO_CFG_DIR environment variable to enable use of different machine.config files
svn path=/trunk/mono/; revision=9524
2002-12-10 09:48:29 +00:00
Gaurav Vaish ea80e51e0e 2002-12-10 Gaurav Vaish <[email protected]>
* AUTHORS: Corrected my email-ID.

svn path=/trunk/mcs/; revision=9516
2002-12-10 04:57:48 +00:00
Ravi Pratap M a949f0ec65 2002-12-09 Ravi Pratap <[email protected]>
* typemanager.cs (AreMultipleAllowed): Take care of the most
	obvious case where attribute type is not in the current assembly -
	stupid me ;-)

svn path=/trunk/mcs/; revision=9515
2002-12-10 04:51:09 +00:00
Dennis Hayes d825bb749c se last entry
svn path=/trunk/mcs/; revision=9514
2002-12-10 03:02:48 +00:00
Dennis Hayes e0fa4d24c4 see last entry
svn path=/trunk/mcs/; revision=9513
2002-12-10 03:02:24 +00:00
Dennis Hayes cb58b2b711 2002-12-9 DennisHayes <[email protected]>
* Form.cs
	* KeysConverter.cs
	* Label.cs
	* LinkArea.cs
	* LinkLabel.cs
	* ListBindingConverter.cs
	* ListBox.cs
	* ListControl.cs
	* ListView.cs
	* ListViewItem.cs
	* ListViewItemConverter.cs
	* MainMenu.cs
	* Menu.cs
	* MenuItem.cs
	* NativeWindow.cs
	* NumericUpDown.cs
	* OpacityConverter.cs
	* OSFeature.cs
	* PictureBox.cs
	* PrintControllerWithStatusDialog.cs
	* PrintDialog.cs
	* PrintPreviewControl.cs
	* PropertyManager.cs
	* RadioButton.cs
	* Screen.cs
	* ScrollableControl.cs
	* ScrollBar.cs
	* SendKeys.cs
	* SplitterEventArgs.cs
	* StatusBar.cs
	* SystemInformation.cs
	* TextBoxBase.cs
	* ToolBar.cs
	* TrackBar.cs
	* TreeNode.cs
	* TreeNodeCollection.cs
	* TreeNodeConverter.cs
	* TreeView.cs

	* cleanup, fixes, some implmentation

svn path=/trunk/mcs/; revision=9512
2002-12-10 03:01:29 +00:00
Miguel de Icaza 72c08f9073 Flushage
svn path=/trunk/mono/; revision=9511
2002-12-10 01:28:51 +00:00
Miguel de Icaza 11cfcaa8ed Flush
svn path=/trunk/mono/; revision=9510
2002-12-10 01:23:01 +00:00
Miguel de Icaza c41929b248 Flush
svn path=/trunk/mono/; revision=9509
2002-12-10 01:08:00 +00:00
Miguel de Icaza ae86534696 Update web site
svn path=/trunk/mono/; revision=9508
2002-12-09 23:40:34 +00:00
Jaime Anguiano Olarra 230d91760e Updates.
svn path=/trunk/mono/; revision=9503
2002-12-09 22:43:18 +00:00
Miguel de Icaza 8817b5ade4 Flush
svn path=/trunk/mono/; revision=9501
2002-12-09 22:06:54 +00:00
Miguel de Icaza 22eb65b8be update
svn path=/trunk/mono/; revision=9500
2002-12-09 21:49:46 +00:00
Daniel Morgan 1a5e1ba0a5 2002-12-09 Daniel Morgan <[email protected]>
* library.build: add Mono.GetOptions to windows build

	* Mono.GetOptions/Mono.GetOptions.build: add file
	for windows build

svn path=/trunk/mcs/; revision=9499
2002-12-09 21:08:15 +00:00
Jaime Anguiano Olarra f7739f9bf1 For the URL bar.
svn path=/trunk/mono/; revision=9498
2002-12-09 20:39:16 +00:00
Miguel de Icaza 961d3a1514 Update NEWS
svn path=/trunk/mono/; revision=9497
2002-12-09 20:27:13 +00:00
Miguel de Icaza 842499ec02 Update NEWS
svn path=/trunk/mono/; revision=9496
2002-12-09 20:21:30 +00:00
Miguel de Icaza fb4afb54ed Update NEWS
svn path=/trunk/mono/; revision=9495
2002-12-09 20:19:24 +00:00
Miguel de Icaza 7004cfd5d7 update
svn path=/trunk/mono/; revision=9494
2002-12-09 20:08:31 +00:00
nobody 4e4824afab This commit was manufactured by cvs2svn to create branch 'SAVANNAH_CVS'.
svn path=/branches/SAVANNAH_CVS/mcs/; revision=6844
2002-08-21 10:08:33 +00:00
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
811 changed files with 42623 additions and 40821 deletions

No files matched your search

+33
View File
@@ -1,3 +1,36 @@
2002-12-27 Jeroen Janssen <[email protected]>
* fixed url for System.Windows.Forms in the class status
2002-12-18 Gonzalo Paniagua Javier <[email protected]>
* configure.in: moved struct tm field tm_gmtoff check before the check
for timezone global variable. This makes Timezone work for me (debian
sid, linux, x86, which has both the field and the global variables).
2002-12-10 Daniel Morgan <[email protected]>
* doc/oracle: added file which is
a new web page oracle.html
* doc/ado-net: clean up and add link
to oracle.html
* doc/web/commands
* doc/web/makefile: added oracle.html
2002-12-10 Daniel Morgan <[email protected]>
* man/Makefile.am: changed sqlsharpcli.1 to sqlsharp.1
* man/sqlsharpcli.1: renamed to sqlsharp.1
2002-12-09 Tim Haynes <[email protected]>
* mono/jit/jit.c
* mono/metadata/icall.c: added mono_install_get_config_dir() to
utilize the MONO_CFG_DIR environment variable for specifying
different machine.configs.
2002-12-06 Duncan Mak <[email protected]>
* data/Makefile.am (EXTRA_DIST): Add machine.config
+156
View File
@@ -1,3 +1,159 @@
Hello!
Version 0.17 of Mono has been released.
There are plenty of new features, bug fixes, new classes,
performance improvements, optimizations and much more
available in this release.
* Stats
2605 cvs commits to the Mono repository since October 1st, an
average of 37 commits per day including weekends.
212 commits to the Mono module.
1438 commits to the MCS module.
* Mono Improvements:
Work has begun to make the runtime run a finalizer thread and
invoke all the finalizers from this thread. This is the same
behavior as Java and the Microsoft runtime, but it is disabled
on this build.
Integrated the s390 work from Neale Ferguson.
Beginning of the work for pre-compiling code (Ahead of time
compilation) for Mono (based on the early work of Zoltan).
New option `--noboundscheck' for benchmark purposes, it
disables array bound checks.
Uses mmap instead of SysV shared memory for the Windows API
emulation layer.
Plenty of bug fixes, improvements and integration with the
upper layer class libraries.
New exception handling code uses the GCC native support for
stack-walking if available and gives big performance boost
(15% on mcs bootstrap).
A lot of the work in the new release of Mono is required for
the Mono Debugger (which will be released separately). The
Mono debugger is interesting, because it can debug both
managed and unmanaged applications, but it only supports the
JITer for debugging.
Dick, Dietmar, Gonzalo, Martin and Paolo were in charge of
most of these changes.
* Compiler improvements:
Many bug fixes as usual, better C# compliancy.
Performance improvements. The new release of the Mono C#
compiler is 37% faster than the previous version (self-compile
is down to 8 seconds). On my P4 1.8Ghz machine, the Mono C#
compiler compiles (342,000 lines per minute).
Thanks to go Ravi and Martin for helping out with the bug
fixing hunt.
* Cryptography and Security classes
Sebastien Pouliot and Andrew Birkett were extremely busy
during the past two months working on the cryptography
classes, many of the crypto providers are now working
Jackson on the other hand helped us with the security
classes, he said about those:
`Writing security classes is the most exciting thing I have
ever done, I can not wait to write more of them'.
* ASP.NET:
We have now moved the code from the XSP server (which was our
test bed for ASP.NET) into the right classes inside
System.Web, and now any web server that was built by using the
System.Web hosting interfaces can be used with Mono.
The sample XSP server still exists, but it is now just a
simple implementation of the WorkerRequest and ApplicationHost
classes and can be used to test drive ASP.NET. A big thanks
goes to Gonzalo who worked on this night and day (mostly
night).
Gaurav keeps helping us with the Web.Design classes, and
improving the existing web controls.
* ADO.NET:
New providers are available in this release. The relentless
System.Data team (Brian, Dan, Rodrigo, Tim and Ville) are
hacking non-stop on the databse code. Improving existing
providers, and new providers.
The new providers on this release:
* Oracle
* MS SQL
* ODBC
* Sybase
* Sqlite (for embedded use).
Many regression tests have been added as well (Ville has been
doing a great job here).
Stuart Caborn contributed Writing XML from a DataSet.
* System.XML:
Atsushi has taken the lead in fixing and plugging the missing
parts of the System.XML namespace, many fixes, many
improvements.
* CodeDom and the C# provider.
Jackson Harper has been helping us with the various interface
classes from the CodeDOM to the C# compiler, in this release
a new assembly joins us: Cscompmgd. It is a simple assembly,
and hence Microsoft decided not to waste an entire "System"
"dot" on it.
* Testing
Nick Drochak has integrated the new NUnit 2.0 system.
* Monograph:
Monograph now has a --stats option to get statistics on
assembly code.
CVS Contributors to this release:
Alejandro Sanchez, Alp Toker, Andrew Birkett, Atsushi Enomoto,
Brian Ritchie, Cesar Octavio Lopez Nataren, Chris Toshok,
Daniel Morgan, Daniel Stodden, Dennis Hayes, Dick Porter,
Diego Sevilla, Dietmar Maurer, Duncan Mak, Eduardo Garcia,
Ettore Perazzoli, Gaurav Vaish, Gonzalo Paniagua, Jackson
Harper, Jaime Anguiano, Johannes Roith, John Sohn, Jonathan
Pryor, Kristian Rietveld, Mads Pultz, Mark Crichton, Martin
Baulig, Martin Willemoes Hansen, Miguel de Icaza, Mike
Kestner, Nick Drochak, Nick Zigarovich, Paolo Molaro, Patrik
Torstensson, Phillip Pearson, Piers Haken, Rachel Hestilow,
Radek Doulik, Rafael Teixeira, Ravi Pratap, Rodrigo Moya,
Sebastien Pouliot, Tim Coleman, Tim Haynes, Ville Palo,
Vladimir Vukicevic, and Zoltan Varga.
(Am sorry, I could not track everyone from the ChangeLog
messages, I apologize in advance for the missing
contributors).
------------------------------------------------------------------------
Hello!
Version 0.16 of Mono has been released! This is mostly a bug
-1
View File
@@ -19,4 +19,3 @@
#undef MONO_SIZEOF_SUNPATH
#undef NEED_LINK_UNLINK
#undef PTHREAD_POINTER_ID
#undef MONO_USE_EXC_TABLES
+24 -15
View File
@@ -4,6 +4,13 @@ AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(mono, 0.17)
AM_MAINTAINER_MODE
#
# These are the flags that need to be stored in the mono.pc file for
# compiling code that will embed Mono
#
libmono_cflags=""
AC_SUBST(libmono_cflags)
# Thread configuration inspired by sleepycat's db
AC_MSG_CHECKING([host platform characteristics])
case "$host" in
@@ -18,6 +25,7 @@ case "$host" in
*-*-*bsd*)
platform_win32=no
CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
libmono_cflags="-D_THREAD_SAFE"
LDFLAGS="$LDFLAGS -pthread"
AC_DEFINE(NEED_LINK_UNLINK)
AC_DEFINE(PTHREAD_POINTER_ID)
@@ -25,14 +33,15 @@ case "$host" in
;;
*-*-linux*)
platform_win32=no
AC_DEFINE(MONO_USE_EXC_TABLES)
CPPFLAGS="$CPPFLAGS -DGC_LINUX_THREADS -D_GNU_SOURCE -D_REENTRANT -fexceptions"
CPPFLAGS="$CPPFLAGS -DGC_LINUX_THREADS -DMONO_USE_EXC_TABLES -D_GNU_SOURCE -D_REENTRANT -fexceptions"
libmono_cflags="-DMONO_USE_EXC_TABLES -fexceptions -D_REENTRANT"
libdl="-ldl"
;;
*-*-solaris*)
platform_win32=no
CPPFLAGS="$CPPFLAGS -DGC_SOLARIS_THREADS -DGC_SOLARIS_PTHREADS -D_REENTRANT"
AC_DEFINE(NEED_LINK_UNLINK)
libmono_cflags="-D_REENTRANT"
;;
*)
AC_MSG_WARN([*** Please add $host to configure.in checks!])
@@ -369,24 +378,24 @@ if test x$platform_win32 = xno; then
dnl ********************************
dnl *** Checks for timezone stuff **
dnl ********************************
AC_CACHE_CHECK(for timezone variable, ac_cv_var_timezone,
AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff,
AC_TRY_COMPILE([
#include <time.h>
], [
timezone = 1;
], ac_cv_var_timezone=yes, ac_cv_var_timezone=no))
if test $ac_cv_var_timezone = yes; then
AC_DEFINE(HAVE_TIMEZONE)
], [
struct tm tm;
tm.tm_gmtoff = 1;
], ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no))
if test $ac_cv_struct_tm_gmtoff = yes; then
AC_DEFINE(HAVE_TM_GMTOFF)
else
AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff,
AC_CACHE_CHECK(for timezone variable, ac_cv_var_timezone,
AC_TRY_COMPILE([
#include <time.h>
], [
struct tm tm;
tm.tm_gmtoff = 1;
], ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no))
if test $ac_cv_struct_tm_gmtoff = yes; then
AC_DEFINE(HAVE_TM_GMTOFF)
], [
timezone = 1;
], ac_cv_var_timezone=yes, ac_cv_var_timezone=no))
if test $ac_cv_var_timezone = yes; then
AC_DEFINE(HAVE_TIMEZONE)
else
AC_ERROR(unable to find a way to determine timezone)
fi
+15
View File
@@ -5,9 +5,12 @@
<configSections>
<section name="appSettings" type="System.Configuration.NameValueFileSectionHandler, System" />
<section name="system.diagnostics" type="System.Diagnostics.DiagnosticsConfigurationHandler, System" />
<sectionGroup name="system.web">
<section name="httpHandlers" type="System.Web.Configuration.HttpHandlersSectionHandler, System.Web" />
<section name="httpModules" type="System.Web.Configuration.HttpModulesConfigurationHandler, System.Web" />
<section name="machineKey" type="System.Web.Configuration.MachineKeyConfigHandler, System.Web" />
<section name="authentication" type="System.Web.Configuration.AuthenticationConfigHandler, System.Web" />
</sectionGroup>
</configSections>
<system.web>
@@ -20,7 +23,16 @@
<add verb="*" path="*" type="System.Web.HttpMethodNotAllowedHandler" />
</httpHandlers>
<httpModules>
<add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule" />
</httpModules>
<authentication mode="Forms">
<forms name=".MONOAUTH" loginUrl="login.aspx" protection="All" timeout="30" path="/">
<credentials passwordFormat="Clear">
<!--<user name="gonzalo" password="gonz"/>-->
</credentials>
</forms>
</authentication>
<machineKey validationKey="AutoGenerate" decryptionKey="AutoGenerate" validation="SHA1" />
</system.web>
<appSettings>
@@ -28,5 +40,8 @@
<!--<remove key="a key defined higher in the hierarchy" /> -->
<!--<clear/> Removes all defined settings -->
</appSettings>
<system.diagnostics>
<trace autoflush="false" indentsize="4" />
</system.diagnostics>
</configuration>
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 448 B

+40 -122
View File
@@ -23,6 +23,7 @@
<ul>
<li><a href="http://www.go-mono.com/mysql.html">MySQL</a>
<li><a href="http://www.go-mono.com/odbc.html">ODBC</a>
<li><a href="http://www.go-mono.com/oracle.html">Oracle</a>
<li><a href="http://www.go-mono.com/oledb.html">OLE DB</a>
<li><a href="http://www.go-mono.com/postgresql.html">PostgreSQL</a>
<li><a href="http://www.go-mono.com/sqlclient.html">Microsoft SQL Server</a>
@@ -33,42 +34,43 @@
some of these databases are supported via the ODBC or OLEDB providers.
<ul>
<li><a href="http://www-3.ibm.com/software/data/db2/">IBM DB2 Universal Database</a>
<li>miniSQL
<li><a href="http://www.oracle.com/">Oracle</a> - could be done by creating C# bindings to OCI (Oracle C Call Level Interface)
<li>BerkeleyDB (Sleepycat)
<li><a href="http://www.sapdb.org/">SapDB</a>
<li>Microsoft Access - could be done by creating C# bindings to <a href="http://mdbtools.sourceforge.net">MDB Tools</a>
<li>dbase or xbase type database files
<li>Others, of course, are welcomed...
<li><a href="http://www.hughes.com.au/">miniSQL</a></li>
<li><a href="http://www.sleepycat.com/">BerkeleyDB (Sleepycat)</a></li>
<li><a href="http://www.sapdb.org/">SapDB</a></li>
<li>Microsoft Access - could be done by creating C# bindings to <a href="http://mdbtools.sourceforge.net">MDB Tools</a></li>
<li>dbase or xbase type database files</li>
<li>Others are welcome</li>
</ul>
</ul>
<br>
<li>Modify Pre-existing ADO.NET Providers to work with Mono. This may
require fixing or implementing areas of Mono too.
<ul>
<li><a href="http://www.go-mono.com/firebird.html">Firebird Interbase</a>
<li><a href="http://gborg.postgresql.org/project/npgsql/projdisplay.php">Npgsql</a> a PostgreSQL provider
written in 100% C#
<li><a href="http://sourceforge.net/projects/mysqldrivercs/">MySQLDriverCS</a> is a MySQL provider written in C#
<li><a href="http://sourceforge.net/projects/mysqlnet/">MySQLNet</a> is a MySQL Manager provider written in C#
<li><a href="http://www.go-mono.com/firebird.html">Firebird Interbase</a></li>
<li><a href="http://gborg.postgresql.org/project/npgsql/projdisplay.php">Npgsql</a> is a PostgreSQL Managed data provider written
in 100% C# and does not require a client library </li>
<li><a href="http://sourceforge.net/projects/mysqlnet/">MySQLNet</a> is a MySQL Manager data provider written in 100% C# and does not
require a client library</li>
<li><a href="http://sourceforge.net/projects/mysqldrivercs/">MySQLDriverCS</a> is a MySQL data provider written in C#</li>
</ul>
</li>
</ul>
<br>
<li>Create Tools for Configuration, Testing, and Entering SQL Queries
<ul>
<li><b>SQL# CLI - a command-line tool</b> to execute SQL commands,
<li><b>SQL# CLI - a command-line tool</b> written in C# to
execute SQL commands,
test connection strings, and connect to various ADO.NET
providers in Mono. The SQL# CLI can be found in
mcs/tools/SqlSharp/SqlSharpCli.cs
It is written in C# and runs on Mono and .NET
<li><p><b>SQL# GUI - a GUI tool</b> to execute SQL commands.
mcs/tools/SqlSharp/SqlSharpCli.cs</li>
<li><p><b>SQL# GUI - a GUI tool</b> written in C# to
execute SQL commands.
Currently, there is SQL# For GTK# which
can be found at
mcs/tools/SqlSharp/gui/gtk-sharp. It has a SQL editor with
syntax hi lighting of SQL keywords
mcs/tools/SqlSharp/gui/gtk-sharp
It has a SQL editor with
syntax hi lighting of SQL keywords</li>
<li><b>Configuration Command-Line and GUI Tools for ADO.NET</b>.
These tools have not been started. The tools would be written in
C# and run on Mono. The
@@ -76,13 +78,13 @@
<ul>
<li>setup DSNs for the ODBC and OLE-DB
providers and configurations for
their underlying libraries (unixODBC and libgda)
their underlying libraries (unixODBC and libgda)</li>
<li>setup configurations for the Mono.Data.ProviderFactory
that Brian Ritchie created
that Brian Ritchie created</li>
<li>setup native database client library configurations too, such as,
freetds.conf for Microsoft SQL Server and Sybase
freetds.conf for Microsoft SQL Server and Sybase</li>
</ul>
</li>
</ul>
</ul>
@@ -95,6 +97,18 @@
<p><b>DataSet, DataAdaptor, DataTable, DataRelation, DataRow, DataColumn,
DataColumnCollection, DataRowCollection, and others</b> need more work. There are
many classes that are just stubs and need to be implemented.
<p><b>XML support in System.Data</b> needs work. This involves working on
the classes: DataSet, XmlDataDocument, and the method ExecuteXmlReader() that
exists in a provider's class that implements IDbCommand, and others.
Stuart Caborn has started the XML support in a DataSet. Tim Coleman started
XML support in the ExecuteXmlReader() in a SqlCommand.
<p><b>ADO.NET Provider Factory</b> has been started by Brian Ritchie. The
Provider Factory is used to dynamically create
connections, commands, parameters, and data adapters based on configuration information. This
provider factory can also provide utility functions needed by a lot of
providers but are not exposed via the provider.
<p><b>Integration with ASP.NET</b> has not been started, such as, data binding
to a System.Web.UI.WebControls.DataGrid. This may involve implementing many classes
@@ -135,103 +149,7 @@
gtk+ widgets (GUI controls) for data access. There are some nifty widgets
(GUI controls) that can be used, such as, GnomeDbGrid, GnomeDbBrowswer,
GnomeDbSqlEditor, GnomeDbList, GnomeDbLogin, GnomeDbReportEditor, GnomeDbTableEditor,
GnomeDbCombo, and GnomeDbForm. Rodrigo Moya is the best person to contact.
<p><b>XML support in System.Data</b> needs work. This involves working on
the classes: DataSet, XmlDataDocument, and the method ExecuteXmlReader() that
exists in a provider's class that implements IDbCommand, and others.
Stuart Caborn has started the XML support in a DataSet. Tim Coleman started
XML support in the ExecuteXmlReader() in a SqlCommand.
<p><b>ADO.NET Provider Factory</b> has been started by Brian Ritchie. The
Provider Factory is used to dynamically create data provider
connections and data adapters based on configuration information. This
provider factory can also provide utility functions needed by a lot of
providers but are not exposed via the provider.
<p><b>ADO.NET Multiplexor Provider</b> needs to be created. It can use the
ADO.NET Provider Factory to create its connections and adapters, but the
Multiplexor Provider is a Generic Provider that internally uses an existing
provider based on configuration options. This is not
part of Microsoft .NET, but it needs to be able to run on Microsoft .NET
and Mono. This provider can be a generic provider, much like the ODBC.NET and
OLEDB.NET providers are, but be written in 100% C# and be configurable via
a configuration file. This provider will multiplex to other providers
that exist. If one does not exist for a given DBMS,
default to the ODBC or OLEDB .NET provider.
<p>According to Gonzalo, this is how the configuration could be implemented for
the Provider Factory and Multiplexor Provider.
<p>After some work done in System.Configuration, you can now do something
like:
<p>
<pre>
// Get an instance of the multiplexor from machine.config file
// Can be overriden in the application config file
object o = ConnectionSettings.GetConfig
("mono.data/multiplexor");
if (o == null)
--- error
Multiplexor mp = (Multiplexor) o;
// may be a string [] argument can help passing arguments
IDbConnection cnc = mp.CreateConnection (providerName);
</pre>
<p>and in the machine.config file:
<pre>
&lt;configuration&gt;
&lt;configSections&gt;
&lt;section name="mono.data"
type="Mono.Data.MultiplexorSectionHandler,Mono.Data"/&gt;
....
&lt;/configSections>
...
&lt;sectionGroup name="mono.data"&gt;
&lt;multiplexor&gt;
&lt;add provider="PostgreSQL"
type="Mono.Data.PostgreSQLClient,Mono.Data"
validate="false"
parameters="USER=xxx;HOST=127.0.0.1;DBNAME=xxx"/&gt;
&lt;/multiplexor&gt;
&lt;/sectionGroup&gt;
&lt;/configuration&gt;
</pre>
<p>validate="false" tells MultiplexorSectionHandler not to load the Type
until an instance is required. You can add more attributes or whatever
inside <multiplexor> as long as MultiplexorSectionHandler parses it.
<pre>
public class MultiplexorSectionHandler :
IConfigurationSectionHandler
{
public object Create (object parent,
object configContext,
XmlNode section)
{
Multiplexor mp;
// Here you get the ChildNodes and
// set up a Multiplexor
// instance that will hold the information
// needed to create
// instances of each provider. Only one
// instance will be
// created by the config system.
return mp;
}
}
</pre>
<p>This way, if our providers works with MS, the user can test them in both
MS and mono by just adding a few lines to machine.config (i still have
to upload a default machine.config file for mono). And this is the .NET
way of doing it (of course, if you prefer, you can use the other config
file. I just wanted to make people aware of this feature that now works
on mono).
GnomeDbCombo, and GnomeDbForm. Rodrigo Moya is the best person to contact.
<p><b>Building System.Data</b>
+1 -1
View File
@@ -25,7 +25,7 @@
Support runtime for Visual Basic applications
<li><a
href="http://www.go-mono.com/class-status-Windows.Forms.html">Windows.Forms</a>:
href="http://www.go-mono.com/class-status-System.Windows.Forms.html">Windows.Forms</a>:
there is also a <a
href="http://lists.ximian.com/mailman/listinfo/mono-winforms-list">mailing
list available</a>
+280
View File
@@ -0,0 +1,280 @@
* Cryptography
In the .NET framework cryptography can be found under a number of
namespaces in several assemblies.
** Assembly: corlib
*** Namespace: <b>System.Security.Cryptography</b>
Thanks to the work of many people this namespace is almost complete.
**** Status
<ul>
* Every classes are present.
* Most classes have their unit tests.
</ul>
**** TODO
<ul>
* Support for adding/modifying algorithms and OID using the
<code>machine.config</code> configuration file (in progress).
* RNGCryptoServiceProvider is currently only working on Linux.
The current implementation reside in Mono's runtime and use
the <code>/dev/[u]random</code> device (which do not exists
under Windows). A Windows alternative is in the work...
* Keypair persistance for RSA and DSA. This persistance must
somehow be linked with X509 certificate stores (in planning).
* <code>PasswordDeriveBytes</code> is currently limited to
generating keys with the maximum length equals to the hash
output (as specified in PKCS #5). However the framework
implementation allows for longer keys to be generated. Also
the algorithms used by CryptDeriveKey (used by Windows
applications) are unknown.
* Analyse the current coverage of the unit tests on the
cryptographic classes and complete the unit tests.
* Optimizations (performance) on most class are possible. Some
have been done using the Community Edition of BoundChecker
(a free VisualStudio addon) - recommanded!
</ul>
**** Notes
<ul>
* All cryptographic algorithms are entirely managed, including
classes named <code>*CryptoServiceProvider</code>, with the
exception of <code>RNGCryptoServiceProvider</code> (which
resides in the runtime).
</ul>
*** Namespace: <b>System.Security.Cryptography.X509Certificates</b>
**** Status
<ul>
* X.509 certificates are parsed using 100% managed code.
* Software Publisher Certificates (SPC) used by Authenticode
(tm) to sign assemblies are supported (extraction from PE
files) but <b>not</b> validated.
* Tests are generated from a set of existing certificates
(about a dozen) each having different properties. Another
set of certificates (more than 300) are used for a more
complete test (but isn't part of the test suite for size
and time consideration).
</ul>
**** TODO
<ul>
* Authenticode(tm) support is incomplete. We can extract the
certificates from PE files but cannot validate the signature
nor the certificate chain (and we're still missing some trust
anchors).
* Integration with CryptoAPI isn't possible as long as the
<code>X509Certificate(IntPtr)</code> constructor isn't
completed.
</ul>
**** Notes
<ul>
* <b>There's no validation of the certificates</b> done in this
class (this isn't a restriction of Mono!). This means that
certificate signatures and validity dates are never checked!
* The newer X509Certificate class included in Microsoft's Web
Service Enhancement (WSE) is a little better (as it includes
validation).
* Microsoft implementation of <code>X509Certificate</code> is
done by using CryptoAPI. From the exceptions thrown
Authenticode(tm) support is done via COM.
</ul>
<hr>
** Assembly: System.Security
*** Namespace: <b>System.Security.Cryptography.Xml</b>
This namespace implements the XML Digital Signature specification from
W3C.
**** Status
<ul>
* All classes are present but some are only stubbed.
* Most classes have their unit tests.
* This assembly is present in CVS but isn't (yet) part of the
build.
</ul>
**** TODO
<ul>
* All the transforms needs to be done. But this requires far
more XML knowledge than crypto.
* Fix the tests (see notes) then include the assembly into the
build process.
</ul>
**** Notes
<ul>
* Many current tests fails because the XML generated by Mono
isn't exactly the same as the one produced by the Microsoft
implementation (but 100% equivalent). We'll either have to
change the XML code or the tests.
* Testing is difficult because the classes use CryptoConfig
to create the required cryptographic objects. When running
the unit tests the CryptoConfig executing is the one in
mscorlib (not Mono's one) so it doesn't return the expected
objects. This results in InvalidCastException.
</ul>
<hr>
** Assembly: Mono.Security.Win32
This assembly is to provide maximum compatibility with CryptoAPI to
application running with Mono's runtime on the Windows operating
system.
<b>This assembly should NEVER be used directly by any application</b>.
The classes should only be used by modifying the <code>machine.config
</code> configuration file (and then only if this increased
compatibility is required by an application).
*** Namespace: Mono.Security.Cryptography
**** Status
<ul>
* A RNGCryptoServiceProvider built on top of CryptoAPI.
* Not (yet) commited in CVS.
</ul>
**** TODO
<ul>
* Unmanaged versions of hash algorithms (SHA1 and MD5).
* Unmanaged versions of symmetric encryption algorithms
(like DES, TripleDES, RC2 and others present in CryptoAPI).
* Unmanaged versions of asymmetric algorithms (like DSA and
RSA) which persist their keypair into the specified CSP.
</ul>
<hr>
** Assembly: Microsoft.Web.Services
Microsoft Web Service Enhancement (WSE), known as Web Service
Development Kit (WSDK) in it's beta days, is an add-on the .NET
framework that implements WS-Security (and other WS-* specifications).
It also includes improved support for XML Signature (replacing and/or
extending <code>System.Security.Cryptography.Xml</code>) and X509
certificates.
Note: WSE is distributed as an add-on because the WS-Security
specification isn't yet completed by OASIS.
<b>There are some licensing issues to consider before stating to
implement WS-Security. All contributors must sign an agreement with
Microsoft before commiting anything related to WS-Security into CVS.
</b>
*** Namespace: Microsoft.Web.Services.Security
**** Status
<ul>
* Nothing (yet) commited in CVS.
</ul>
*** Namespace: Microsoft.Web.Services.Security.X509
**** Status
<ul>
* Nothing (yet) commited in CVS.
</ul>
**** TODO
<ul>
* We need to define certificate stores (for both users and
machines). These sames stores must be linked with asymmetric
keypairs. This could also be used to store the SPC roots.
</ul>
<hr>
** Other stuff
There are other, not so visible, uses of cryptography both inside and
outside the class library - such as:
<ul>
* SSL/TLS for secure communication (investigation under way).
* Assembly signing (and verification) using StrongNames.
* Assembly signing (and verification) using Authenticode(tm).
</ul>
*** Tools
There are many tools in the .NET framework that indirectly interacts
with some cryptographic classes. Mono will eventually need these tools.
**** Status
The following tools are complete:
<ul>
* <code>secutil</code> is a tool to extract certificates and
strongnames from assemblies in a format that can be easily
re-used in source code (C# or VB.NET syntax).
* <code>cert2spc</code> is a tool to transform multiple X.509
certificates (a chain) into a Software Publisher Certificate
(SPC) - which is a long name for a simple PKCS#7 file.
</ul>
**** TODO
The following tools are still missing or incomplete:
<ul>
* <code>monosn</code> is a clone of the <code>sn</code> to manage
strongnames. This tools is part of the runtime (not the class
library) and as such is written in C.
* <code>signcode</code> and <code>chktrust</code> for signing
and validating Authenticode(tm) signatures on assemblies.
* <code>makecert</code> to create X.509 test certificates that
can be used (once transformed in SPC) to sign assemblies.
* Other tools like a, GUI-based, certificate manager...
</ul>
Note that many of the tools requires the class library and/or the
runtime to be ready for them.
<hr>
** How to Help
Complete any of the TODO (and feel good about it ;-).
Add missing unit tests to classes or methods.
Write some documentation on the cryptographic classes for MonkeyGuide
(as I'm not a good writer - but you must be a good reader if you got to
this part).
Optimization can also be done on algorithms as crypto is never fast
enough. Just be sure to test every optimization (using the unit test)
carefully - it's so fast to break an algorithm ;-).
Contact Sebastien Pouliot (<a href="mailto:[email protected]">home</a>
, <a href="mailto:[email protected]">work</a>) if you need additional
informations about the status of the cryptographic classes.
+191 -74
View File
@@ -6,12 +6,147 @@
href="runtime.html">Runtime</a> description for more details
on this part of the project.
The software is also available on the `Mono' channel in <a href="http://www.ximian.com/products/redcarpet/">Red Carpet</a>.
Some useful links: <a
href="http://www.go-mono.org/mono-beginning.html">Resources/Beginning
section</a>, the <a
href="http://www.go-mono.org/faq.html">FAQ</a> and the <a
href="http://geneura.ugr.es/~jaime/deploy/mono-common-problems.html">
Mono Common Problems</a>.
href="http://www.go-mono.org/faq.html">FAQ</a>.
<table>
<tbody>
<tr bgcolor="#DDDDDD">
<td>
<b>Release 0.17</b><br>
<a href="archive/mono-0.17">Release notes</a><br>
Dec 9th, 2002.
</td>
<td>
<table cellspacing="1" cellpadding="3">
<tr bgcolor="#BBBBBB">
<td>
<b>Source Code</b>
</td>
<td>
<ul>
<li><a href="archive/mcs-0.17.tar.gz">Mono Class Libraries and C# Compiler.</a>
<li><a href="archive/mono-0.17.tar.gz">Mono Runtime</a>
<li><a href="archive/gc6.1.tar.gz">Boehm GC 6.1</a>
<li><a href="archive/xsp-0.2.tar.gz">XSP web server</a> <b><font color="#dd0000">New!</font></b>
</ul>
</td>
</tr>
<tr bgcolor="#BBBBBB">
<td>
<b>Source RPMs</b><br>
(No RPMS for XSP).
</td>
<td>
<ul>
<li><a href="archive/libgc-6.1-1.src.rpm">libgc-6.1-1.src.rpm</a>
<li><a href="archive/mono-0.17-2.src.rpm">mono-0.17-2.src.rpm</a>
</ul>
</td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td bgcolor="#999999">
<b>Red Hat 7.3/x86</b>
<ul>
<li><a href="archive/redhat-73-i386/libgc-6.1-1.i386.rpm">libgc-6.1-1.i386.rpm</a>
<li><a href="archive/redhat-73-i386/libgc-devel-6.1-1.i386.rpm">libgc-devel-6.1-1.i386.rpm</a>
<li><a href="archive/redhat-73-i386/mono-0.17-2.i386.rpm">mono-0.17-2.i386.rpm</a>
<li><a href="archive/redhat-73-i386/mono-devel-0.17-2.i386.rpm">mono-devel-0.17-2.i386.rpm</a>
</ul>
</td>
<td bgcolor="#999999">
<b>Red Hat 7.2/x86</b>
<ul>
<li><a href="archive/redhat-72-i386/libgc-6.1-1.i386.rpm">libgc-6.1-1.i386.rpm</a>
<li><a href="archive/redhat-72-i386/libgc-devel-6.1-1.i386.rpm">libgc-devel-6.1-1.i386.rpm</a>
<li><a href="archive/redhat-72-i386/mono-0.17-2.i386.rpm">mono-0.17-2.i386.rpm</a>
<li><a href="archive/redhat-72-i386/mono-devel-0.17-2.i386.rpm">mono-devel-0.17-2.i386.rpm</a>
</ul>
</td>
</tr>
<tr>
<td bgcolor="#999999">
<b>Red Hat 7.1/x86</b>
<ul>
<li><a href="archive/redhat-71-i386/libgc-6.1-1.i386.rpm">libgc-6.1-1.i386.rpm</a>
<li><a href="archive/redhat-71-i386/libgc-devel-6.1-1.i386.rpm">libgc-devel-6.1-1.i386.rpm</a>
<li><a href="archive/redhat-71-i386/mono-0.17-2.i386.rpm">mono-0.17-2.i386.rpm</a>
<li><a href="archive/redhat-71-i386/mono-devel-0.17-2.i386.rpm">mono-devel-0.17-2.i386.rpm</a>
</ul>
</td>
<td bgcolor="#999999">
<b>Mandrake 8.2/x86</b>
<ul>
<li><a href="archive/mandrake-82-i386/libgc-6.1-1.i586.rpm">libgc-6.1-1.i586.rpm</a>
<li><a href="archive/mandrake-82-i386/libgc-devel-6.1-1.i586.rpm">libgc-devel-6.1-1.i586.rpm</a>
<li><a href="archive/mandrake-82-i386/mono-0.17-2.i586.rpm">mono-0.17-2.i586.rpm</a>
<li><a href="archive/mandrake-82-i386/mono-devel-0.17-2.i586.rpm">mono-devel-0.17-2.i586.rpm</a>
</ul>
</td>
</tr>
<tr>
<td bgcolor="#999999">
<b>SuSE 8.0/x86</b>
<ul>
<li><a href="archive/suse-80-i386/libgc-6.1-1.i386.rpm">libgc-6.1-1.i386.rpm</a>
<li><a href="archive/suse-80-i386/libgc-devel-6.1-1.i386.rpm">libgc-devel-6.1-1.i386.rpm</a>
<li><a href="archive/suse-80-i386/mono-0.17-1.i386.rpm">mono-0.17-1.i386.rpm</a>
<li><a href="archive/suse-80-i386/mono-devel-0.17-1.i386.rpm">mono-devel-0.17-1.i386.rpm</a>
</ul>
</td>
<td bgcolor="#999999">
<b>Red Hat 8.0/x86</b>
<ul>
<li><a href="archive/redhat-80-i386/libgc-6.1-1.i386.rpm">libgc-6.1-1.i386.rpm</a>
<li><a href="archive/redhat-80-i386/libgc-devel-6.1-1.i386.rpm">libgc-devel-6.1-1.i386.rpm</a>
<li><a href="archive/redhat-80-i386/mono-0.17-2.i386.rpm">mono-0.17-2.i386.rpm</a>
<li><a href="archive/redhat-80-i386/mono-devel-0.17-2.i386.rpm">mono-devel-0.17-2.i386.rpm</a>
</ul>
</td>
</tr>
<tr>
<td bgcolor="#999999">
<b>Windows Setup Wizard (NT/2000/XP)</b>
<ul>
<li><a href="archive/mono-0.17-stable.exe">Mono-Setup</a>
</ul>
</td>
<td bgcolor="#999999">
<b>Debian packages</b>
<ul>
<li><a href="http://www.atoker.com/mono/">Alp's web site</a>
</ul>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<tr bgcolor="#CCCCC">
<td>
<b>Regression Tests</b><br>
</td>
<td>
You can get binaries for the Mono Regression Test
Suite <a href="archive/mono-tests.tar.gz">here</a>
</td>
</tr>
</tr>
</tbody>
</table>
<br>
* Older Releases:
We provide binaries for older releases until we have packages for the new release.
<table>
<tbody>
@@ -49,66 +184,6 @@
<tr>
<td></td>
</tr>
<tr>
<td bgcolor="#999999">
<b>Red Hat 7.3/x86</b>
<ul>
<li><a href="archive/redhat-73-i386/libgc-6.1-1.i386.rpm">libgc-6.1-1.i386.rpm</a>
<li><a href="archive/redhat-73-i386/libgc-devel-6.1-1.i386.rpm">libgc-devel-6.1-1.i386.rpm</a>
<li><a href="archive/redhat-73-i386/mono-0.16-1.i386.rpm">mono-0.16-1.i386.rpm</a>
<li><a href="archive/redhat-73-i386/mono-devel-0.16-1.i386.rpm">mono-devel-0.16-1.i386.rpm</a>
</ul>
</td>
<td bgcolor="#999999">
<b>Red Hat 7.2/x86</b>
<ul>
<li><a href="archive/redhat-72-i386/libgc-6.1-1.i386.rpm">libgc-6.1-1.i386.rpm</a>
<li><a href="archive/redhat-72-i386/libgc-devel-6.1-1.i386.rpm">libgc-devel-6.1-1.i386.rpm</a>
<li><a href="archive/redhat-72-i386/mono-0.16-1.i386.rpm">mono-0.16-1.i386.rpm</a>
<li><a href="archive/redhat-72-i386/mono-devel-0.16-1.i386.rpm">mono-devel-0.16-1.i386.rpm</a>
</ul>
</td>
</tr>
<tr>
<td bgcolor="#999999">
<b>Red Hat 7.1/x86</b>
<ul>
<li><a href="archive/redhat-71-i386/libgc-6.1-1.i386.rpm">libgc-6.1-1.i386.rpm</a>
<li><a href="archive/redhat-71-i386/libgc-devel-6.1-1.i386.rpm">libgc-devel-6.1-1.i386.rpm</a>
<li><a href="archive/redhat-71-i386/mono-0.16-1.i386.rpm">mono-0.16-1.i386.rpm</a>
<li><a href="archive/redhat-71-i386/mono-devel-0.16-1.i386.rpm">mono-devel-0.16-1.i386.rpm</a>
</ul>
</td>
<td bgcolor="#999999">
<b>Mandrake 8.2/x86</b>
<ul>
<li><a href="archive/mandrake-82-i386/libgc-6.1-1.i586.rpm">libgc-6.1-1.i586.rpm</a>
<li><a href="archive/mandrake-82-i386/libgc-devel-6.1-1.i586.rpm">libgc-devel-6.1-1.i586.rpm</a>
<li><a href="archive/mandrake-82-i386/mono-0.16-1.i586.rpm">mono-0.16-1.i586.rpm</a>
<li><a href="archive/mandrake-82-i386/mono-devel-0.16-1.i586.rpm">mono-devel-0.16-1.i586.rpm</a>
</ul>
</td>
</tr>
<tr>
<td bgcolor="#999999">
<b>SuSE 8.0/x86</b>
<ul>
<li><a href="archive/suse-80-i386/libgc-6.1-1.i386.rpm">libgc-6.1-1.i386.rpm</a>
<li><a href="archive/suse-80-i386/libgc-devel-6.1-1.i386.rpm">libgc-devel-6.1-1.i386.rpm</a>
<li><a href="archive/suse-80-i386/mono-0.16-1.i386.rpm">mono-0.16-1.i386.rpm</a>
<li><a href="archive/suse-80-i386/mono-devel-0.16-1.i386.rpm">mono-devel-0.16-1.i386.rpm</a>
</ul>
</td>
<td bgcolor="#999999">
<b>Red Hat 8.0/x86</b>
<ul>
<li><a href="archive/redhat-80-i386/libgc-6.1-1.i386.rpm">libgc-6.1-1.i386.rpm</a>
<li><a href="archive/redhat-80-i386/libgc-devel-6.1-1.i386.rpm">libgc-devel-6.1-1.i386.rpm</a>
<li><a href="archive/redhat-80-i386/mono-0.16-1.i386.rpm">mono-0.16-1.i386.rpm</a>
<li><a href="archive/redhat-80-i386/mono-devel-0.16-1.i386.rpm">mono-devel-0.16-1.i386.rpm</a>
</ul>
</td>
</tr>
<tr>
<td bgcolor="#999999">
<b>Linux s390</b>
@@ -121,12 +196,6 @@
<li><a href="archive/s390/mono-devel-0.16-1.s390.rpm">mono-devel-0.16-1.s390.rpm</a>
</ul>
</td>
<td bgcolor="#999999">
<b>Windows Setup Wizard (NT/2000/XP)</b>
<ul>
<li><a href="archive/mono-0.16-stable.exe">Mono-Setup</a>
</ul>
</td>
</tr>
</table>
</td>
@@ -144,11 +213,6 @@
</tr>
</tbody>
</table>
<br>
* Older Releases:
We provide binaries for older releases until we have packages for the new release.
<table>
<tbody>
@@ -231,6 +295,21 @@
The <a href="anoncvs.html">anoncvs</a> mirrors provided by
Hispalinux are updated every six hours.
* Compiling the code
There are a number of ways of compiling Mono
<ul>
<li>From the <a href="#scripts">scripts</A>
<LI><a href="#install">Manually</a> for the first time.
<li>Manually, <a href="#upgrade">while upgrading</a> to CVS
</ul>
(which is an easy way to get the latest CVS information)
<a name="scripts">
* Compiling with scripts
There are scripts to help build mono for both Unix and Windows. Get
@@ -309,6 +388,7 @@
You can change /usr/local to something else if you want.
</ul>
*** On Windows, to install and work on the compiler and the class libraries:
@@ -431,3 +511,40 @@ make install
</ul>
<a name="upgrading">
** Upgrading
To upgrade your Mono installation from CVS, it is very
important that you update your Mono and MCS modules from CVS
at the same time. Failure to do so might result in a
problematic installation as the runtime and the class
libraries will be out of sync.
Run the following commands to update your CVS tree (more
details in <a href="ccvs.html">Cvs and Mono</a> and the <A
href="anoncvs.html">AnonCVS and Mono</a> pages).
<pre>
(cd mono; cvs update -dP .)
(cd mcs; cvs update -dP .)
</pre>
Once you have updated your sources, remove any cached
assemblies or old binaries from the Mono "runtime" directory,
and then compile each component:
<pre>
(cd mono/runtime; rm *exe *dll)
(cd mono; make)
(cd mcs; make)
</pre>
Now you can install the result:
<pre>
(cd mono; make install)
</pre>
Notice that following the above procedure does not require you
to manually install the software in the `mcs' directory, as
the relevant files will be copied by the `mono' makefiles.
+96 -14
View File
@@ -3,6 +3,7 @@
<a href="#gnome">Mono and GNOME</a><br>
<a href="#gui">Building GUI applications with Mono</a><br>
<a href="#msft">Mono and Microsoft</a><br>
<a href="#platforms">Mono platforms</a><br>
<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>
@@ -314,14 +315,16 @@ A: We do not know, volunteers are working on this, but there is no set
Q: Is Microsoft helping Ximian with this project?
A: No. Ximian CTO Miguel de Icaza had a friendly conversation with
Microsoft software architect David Stutz, but that's about the
extent of the contact. Microsoft is interested in other
implementations of .NET and are willing to help make the ECMA spec
more accurate for this purpose.
A: There is no high level communication between Ximian and Microsoft
at this point, but engineers who work on .NET or the ECMA groups
have been very friendly, and very nice to answer our questions, or
clarify part of the specification for us.
Ximian representatives have also spoken with Sam Ruby at the ECMA
TG3 committee to discuss the same issues.
Microsoft is interested in other implementations of .NET and are
willing to help make the ECMA spec more accurate for this purpose.
Ximian was also invited to participate in the ECMA committee
meetings for C# and the CLI.
Q: Is Microsoft or Corel paying Ximian to do this?
@@ -425,6 +428,44 @@ A: Not yet, but the client side API for authentication is not the problem.
Alliance APIs. The problem is people on the web provider end that might use
this for authentication.
<a name="platforms"></a>
** Mono Platforms
Q: What operating systems does Mono run on?
A: Mono is known to run on Linux, Unix and Windows systems.
Q: What architectures does Mono support?
A: Mono today ships with a Just-in-Time compiler for x86-based
systems. It is tested regularly on Linux, FreeBSD and Windows
(with the XP/NT core).
There is also an interpreter, which is slower that runs on the
s390, SPARC and PowerPC architectures.
Q: Can Mono run on Windows 9x, or ME editions?
A: Mono requires Unicode versions of Win32 APIs to run,
and only a handful of *W functions is supported under Win9x.
There is Microsoft Layer for Unicode that provides implementation
of these APIs on 9x systems.
Unfortunately it uses linker trick for delayed load that is not
supported by ld, so some sort of adapter is necessary.
You will need MSLU and one of the following libs to link Mono to
unicows.dll <a
href="http://mono.eurosoft.od.ua/files/unimono.zip">http://mono.eurosoft.od.ua/files/unimono.zip</a>
or alternatively search the net for "libunicows".
No changes to Mono source code required, the only thing is to make
sure that linker will resolve imports to adapter library instead of
Win32 libs. This is achieved by inserting -lunimono before
-lkerner32/user32 in the linker's specs file.
<a name="pnpproject"></a>
** Mono and Portable.NET
@@ -436,13 +477,20 @@ A: Most of Mono is being written using C#, with only
It is easier to describe what is unique about Mono:
<ul>
<li> A Just-in-Time compiler engine. This is important for
making your applications fast.
<li> A self-hosting C# compiler written in C#, which is clean, easy
to maintain.
<li> Focus on the .NET Framework: we are tracking down the .NET
Framework API definition, as we believe it is the API people
will be most familiar with.
<li> A multi-platform runtime engine: both a JIT engine and an
interpreter exist. The JIT engine runs currently on x86
systems, while the interpreter works on SPARC, StrongARM and
PowerPC systems.
systems, while the interpreter works on SPARC, StrongARM,
s390 and PowerPC systems.
<li> Supports Linux, Windows and Solaris at this point.
@@ -471,8 +519,9 @@ A: Most of Mono is being written using C#, with only
<li> We have a great community of developers, without which Mono
would not be possible.
<li> We will provide an ahead of time compilation mode in the
future.
<li> We are working on an ahead of time compilation mode to
pre-compile code for the target architecture (this is part
of our new code generation effort).
</ul>
<a name="webservices"></a>
@@ -659,6 +708,16 @@ Q: I'm wondering if there are any plans to start using nant to build the
A: Maybe well be doing some sort of automated build process + testing when
the summer finish.
Q: My C code uses the __stdcall which is not availble on Linux, how can I
make the code portable Windows/Unix across platforms?
A: Replace the __stdcall attribute with the STDCALL macro, and include this
in your C code for newer gcc versions:
#ifndef STDCALL
#define STDCALL __attribute__((stdcall))
#endif
<a name="asp">
** Mono and ASP.NET
@@ -704,6 +763,12 @@ 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 Microsoft
implementation.
Q: Does Mono can to connect to Sybase by using Mono.Data.*?
A: Yes. use Mono.Data.SybaseClient. First of all you have to create a
SybaseConnection, and then, from it, use it as any other
IDbConnection-based class.
<a name="java">
** Mono and Java
@@ -773,6 +838,17 @@ A: Yes. Eto Demerzal has started a Rhino port to C#.
After this is completed, we will begin developing
the JavaScript compiler.
Q: Can Mono or .NET share system classes (loaded from mscore.dll and other
libs) or will it behave like Sun's Java VM?
A: What you can do with mono is to load different applications in their own
application domain: this is a feature of the CLR that allows sandboxing
applications inside a single process space. This is usualy exploited to
compartmentalize different parts of the same app, but it can also be
effectively used to reduce the startup and memory overhead.
Using different appdomains the runtime representation of types and
methods is shared across applications.
<a name="extending"></a>
** Extending Mono
@@ -1030,9 +1106,6 @@ A: We will have to evaluate the licenses for compatibility first,
but as a general rule, we will accept the code under the same
terms of the "container" module.
Q: Is the Mono
<a name="patents"></a>
** Patents
@@ -1140,6 +1213,15 @@ A: GtkHTML is just a lightweight HTML rendering engine that does not
Linux when disconnected from the Web (and that has better
interactions than a web page).
Q: Is there a command-line tool that allows me to access .NET interactively?
A: There are several but one that is free software and uses MCS is the one
Dennis Lu from Rice University is working on; a REPL C# interpreter.
Q: Is it possible to use Visual C++ with Mono?.
A: Well, It's possible to run VC++ generated apps under Mono though.
<a name="problems"></a>
** Mono Common Problems
+21
View File
@@ -0,0 +1,21 @@
* Gtk#
<a href="http://gtk-sharp.sourceforge.net">Gtk#</a> (Gtk
sharp) is a set of C# language bindings for the
<a href="http://www.gtk.org">Gtk+</a> toolkit and other
libraries that are part of the <a
href="http://www.gnome.org">GNOME</a> platform .
** API of Gtk#
The API is browsable
<a
href="http://primates.ximian.com/~tvgm/gtk-sharp-docs/">here</a>
** Where to learn more.
Visit the official site for the <a
href="http://gtk-sharp.sourceforge.net">Gtk# Project</a>.
The <a href="http://www.go-mono.org/faq">Mono FAQ</a> has some useful
information too.
+82 -1
View File
@@ -91,7 +91,86 @@
</tr>
</table>
@item Dec 9th, 2002: VB.NET, Oracle Provider.
@item Jan 10th, 2003: Mono Weekly News.
A new issue of the <a
href="http://lists.ximian.com/archives/public/mono-list/2003-January/004903.html">Mono
Weekly News</a> has been published.
Check out the <a href="crypto.html">Crypto status</a> page
that Sebastien has put together.
@item Jan 3rd, 2003: Glade#, Code Coverage, Apache, MBas, Debugger.
Rachel has made Glade# use attributes so binding C# widgets to
the designed widgets is now easier than ever. Alp has
improved this to use implicit names as well.
Martin's Mono debugger now has support for multi-thread
debugging. Special feature: breakpoints can be defined in a
per-thread basis now.
Daniel López has checked in his Apache module to integrate
Mono and Mono's ASP.NET support as an Apache module. Gonzalo
has folded his new Mono hosting classes into this module (they
are now shared between XSP and mod_mono). You can get the
mod_apache from CVS (module name: mod_mono).
Mono Basic improvements: Marco has added support for more
statements on the grammar.
Zoltan has <a href="http://www.nexus.hu/vargaz2/">posted</a>
his Code Coverage analysis tool for Mono.
@item Dec 17th, 2002: Mono: Commercial uses.
<a href="http://www.tipic.com">Tipic</a> today <a
href="http://www.ximian.com/about_us/press_center/press_releases/index.html?pr=tipic_mono">announced</a>
their work on porting their Instant Messaging Server platform
to run on Mono.
<a href="http://www.winfessor.com">Winfessor</a> also <a
href="http://www.winfessor.com/press.asp">announced</a> the
availability of their Jabber SDK to run on Mono.
Also two weeks ago we mentioned <a
href="http://www.openlinksw.com">OpenLink Software's</a> <a
href="http://www.ximian.com/about_us/press_center/press_releases/index.html?pr=openlink_mono">announcement</a>
of their product, also using Mono.
@item Dec 10th, 2002: Gtk# 0.6 released; Mono 0.17 packages for Windows and Debian.
Mike Kestner <a
href="http://lists.ximian.com/archives/public/mono-list/2002-December/003961.html">announced
Gtk# 0.6</a>. This new release includes many new features and
bug fixes, and is the perfect companion to the <a
href="archive/mono-0.17">Mono 0.17</a> release.
Johannes has contributed a Windows-ready package of Mono 0.17,
and its available from our <a
href="download.html">download</a> page.
Alp Toker has <a href="http://www.atoker.com/mono/">Debian packages</a>
@item Dec 9th, 2002: Mono 0.17 has been released
Mono 0.17 has been released. Check out the <a
href="archive/mono-0.17">release notes</a> for a more detailed
list. You can get it <a href="download.html">here</a>.
Many new features as well as plenty of bug fixes. Many new
System.Data providers and a more mature System.Web (ASP.NET)
which can now be hosted in any web server. A simple <a
href="archive/xsp-0.2.tar.gz">test web server</a> to host
asp.net has been released as well.
This version also integrates Neale's s390 port.
This release also includes a new exception handling system
that uses the gcc exception information that vastly improves
our internalcall speed (15% faster mcs compilation times).
@item Dec 8th, 2002: VB.NET, Oracle Provider.
Marco has got the Mono Basic compiler up to speed (support for
classes, modules, expressions, object creation, method
@@ -493,6 +572,8 @@
@item Aug 20th, 2002: Remoting work, Resources, SPARC checkins, ADO.NET
<b>San Francisco</b>: August 14th. Linux World Expo.
Mark Crichton has checked in his patches to get the SPARC port
on par with the PPC port.
+19 -1
View File
@@ -8,6 +8,14 @@
* <a href="#MonoLogo">MonoLogo</a>
* <a href="#Oberon">Oberon</a>
* <a href="#Forth">Forth</a>
* <a href="#mbas">Mono Basic</a> (Mono's VB.NET compiler)
</ul>
Languages which are known to run, but we have not done a
complete ran of all their regression tests to validate it:
<ul>
* Kylix.NET.
</ul>
Languages we would like to have supported, with links to resources:
@@ -28,8 +36,11 @@
** Java
There is a very interesting project to make a JavaVM for .NET
<a href="http://radio.weblogs.com/0109845/">here</a>
<a href="http://radio.weblogs.com/0109845/">here</a>.
Currently this will not work with Mono, as they use some
pieces of Managed C++ to implement the JNI interface.
A workaround has been discussed, contact the author if you want to contribute.
<a name="MonoLogo">
** MonoLogo
@@ -40,6 +51,13 @@
hosted in the <a href="ccvs.html">Mono CVS</a> repository
and also available on the <a href="anoncvs.html">AnonCVS</a> mirrors.
<a name="mbas">
** Mono Basic (Mono's VB.NET compiler)
Work has resumed on the Mono Visual Basic compiler (currently
called mbas). It is part of the standard Mono distribution,
but its still an early compiler.
<a name="Oberon">
** Oberon
+54
View File
@@ -0,0 +1,54 @@
* mbas: Mono's Basic.NET Compiler.
MBAS is a CIL compiler for the Visual Basic language, an extended
version of VisualBasic.NET. It's based on the MCS compiler
and still in heavy development, though many language features are
already supported.
** What works
<ul>
* Classes, Fields and Methods. Properties are still
being worked on.
* Module definition and Sub functionality (TODO: Function's)
* Namespace Import, so can you reference, instantiate
and call external assemblies
* Parameter passing between Sub's. ByVal and ByRef
parameters are being worked on.
* Delegates
* Object creation
* Events - to a limited extent. You can declare a
Class-Field as 'WithEvents' and dynamic events (i.e
AddHandler MyButton.Click, Button1_OnClick). Please
beware: just after committing the code, I discovered
that the handler field in the AddHandler call is
case-sensitive, a remnant of mBas' mcs heritage)
* Statements supported are 'If..Then..Else' ,
'While..End While' and assignment statements. Simple
operators (+, -, *, /, >, <, =) should also
work. Other statements (For..Next, etc.) should be
quite trivial to implement.
</ul>
A lot of this stuff is implemented rebuilding proper expressions and
statements on top of the classes provided by mcs (look at the grammar -
mb-parser.jay - and compare it with cs-parser.jay, if interested).
** TODO-list
At this stage almost every element of the language must be still checked for
conformance to MS'implementation. Help is particularly needed for those areas
I know little of (mcs internals are still quite obscure to me). I'd like to
implement class properties, the missing statements, exception handling,
structures and actual event support (not necessarily in this order). Once we
have all this stuff set up and reasonably bug-free, more work could be done
on helper functions and Object-vars handling.
+2 -5
View File
@@ -11,22 +11,19 @@
For <a href="mono-beginning/t1.html">RPM Linux based systems</a>
For <a href="http://geneura.ugr.es/~jaime/mono-beginning-windows/t1.html">Microsoft Windows</a>
For <a href="http://monoevo.sourceforge.net/mono-windows/mono-beginning-windows/t1.html">Microsoft Windows</a>
PDF Format
For <a href="mono-beginning.pdf">RPM Linux based systems</a>
For <a href="http://geneura.ugr.es/~jaime/mono-beginning-windows/mono-beginning-windows.pdf">Microsoft Windows</a>
XML Source
For <a href="mono-beginning.xml">RPM Linux based systems</a>
For <a href="http://geneura.ugr.es/~jaime/mono-beginning-windows/mono-beginning-windows.xml">Microsoft Windows</a>
For <a href="http://monoevo.sourceforge.net/mono-windows/mono-beginning-windows.xml">Microsoft Windows</a>
Currently Hinne is working on a Mono Tools HOWTO. Which will be
Executable
+52
View File
@@ -0,0 +1,52 @@
* Oracle Data Provider
<ul>
<li>Exists in namespace System.Data.OracleClient and assembly System.Data.OracleClient</li>
<li>Works on Windows</li>
<li>Works with Oracle 8i</li>
<li>More information about Oracle can be found at <a href="http://www.oracle.com/"/>here</a></li>
</ul>
* Current Status
<ul>
<li>OracleConnection can connect to an Oracle 8i database on
Windows via oci.dll</li>
<li>The native glue library only has makefiles for Borland C++ and
Microsoft Visual C++ command line compilers. Only the makefile for
Microsoft Visual C++ command-line compiler has been tested.</li>
<li>Can execute simple DML SQL statements, such as,
INSERT a row into the EMP table via the OracleCommand's ExecuteNonQuery method</li>
<li>The System.Data.OracleClient.dll assembly can be built with mcs/mono via
the makefile.gnu for System.Data.OracleClient or csc/.net via the
System.Data.OracleClient.build nant build file. There is also a Visual Studio.NET
solution it too.
</ul>
* Action Plan
<ul>
<li>Get the makefile for the Borland C++ compiler to work
since the <a href="http://www.borland.com/">Borland</a> C++ compiler is
a free download</li>
<li>Get the native glue lib System.Data.OracleClient.ocigule.dll to be built
using gcc on Linux. This would require that Oracle 8i client software be installed
on Linux with the oci headers and shared libraries</li>
<li>Be able to retrieve results via a data reader</li>
<li>Parameters support</li>
<li>Stored Procedures, Functions, and Packages support</li>
<li>Be able to fill a DataTable in a DataSet via a data adapter</li>
<li>Support for Oracle 9i</li>
<li>Figure out how to move the unmanaged OCI handling code in
the oci glue C library to the managed C# assembly. I have been unable
to successfully connect to an Oracle 8i database by using Platform Invoke and
Marshalling in C# to the oci shared library (oci.dll on Windows)</li>
</ul>
+55 -27
View File
@@ -11,9 +11,13 @@
The <a href="http://msdn.microsoft.com/net">Microsoft.NET site.</a>
The Microsoft .NET Framework 1.0 can be downloaded <a href="http://msdn.microsoft.com/downloads/default.asp?url=/downloads/sample.asp?url=/msdn-files/027/000/976/msdncompositedoc.xml&frame=true">here</a>
The Microsoft .NET Framework 1.0 can be downloaded <a
href="http://msdn.microsoft.com/downloads/default.asp?url=/downloads/sample.asp?url=/msdn-files/027/000/976/msdncompositedoc.xml&frame=true">here</a>
New methods that are not documented in 1.0, are documented <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/framewrkaddend.asp">here</a>
New methods that are not documented in 1.0, are documented <a
href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/framewrkaddend.asp">here</a>
The changes between .NET 1.0 and .NET 1.1 are available <a href="http://www.csharphelp.com/archives2/archive406.html">here</a>
** IRC
@@ -24,7 +28,7 @@
The Mono Tutorial:
<a href="http://mwh.sysrq.dk/the_mono_tutorial/">Mono Tutorial</a>
<a href="http://http://go-mono.com/gnometutorial/">GNOME.NET Tutorial</a>
and other useful tutorials (Gtk#, Glade#, Embeded, etc) (in Spanish) at
@@ -53,6 +57,14 @@
href="http://www.foundstone.com/pdf/dotnet-security-framework.pdf">.NET
security architecture</a>.
** Development Tools
A tool to compare two assemblies:
<ul>
<li><a href="http://www.gotdotnet.com/userarea/keywordsrch.aspx?keyword=winchurn">http://www.gotdotnet.com/userarea/keywordsrch.aspx?keyword=winchurn</a>
</ul>
** Presentations
Currently the <a href="Presentations/O-Reilly">O'Reilly</a>
@@ -111,31 +123,53 @@
There are a number of related projects to Mono:
<li><b>Development tools</b></li>
<ul>
* <a
href="http://qtcsharp.sourceforge.net">Qt#:</a>
C# bindings for the Qt toolkit.
* <a
href="http://www.icsharpcode.net/OpenSource/SD/default.asp">Sharp
Develop:</a> an IDE for the C# language written in C#.
* <a
href="http://www.improve-technologies.com/alpha/esharp/">Eclipse
Plugin for C#</a>
* <a
href="http://janet-js.sourceforge.net/">Janet:</a>
an implemention of ECMAScript (the standarized
version of JavaScript) in C#
* <a href="http://nunit.sourceforge.net">NUnit:</a> A
testing framework for .NET classes.
* <a
href="http://xmarks.sourceforge.net/doc.html">XMarks DOC.NET:</a> For
creating online documentation you can browse for your own classes.
* <a href="http://nunit.sourceforge.net">NUnit:</a> A
testing framework for .NET classes.
</ul>
<li><b>Class Libraries</b></li>
<ul>
* <a href="http://9mm.com/~ogl/sdldotnet/">SDL for
.NET:</a> Bindings for the popular SDL graphics library.
* C# bindings for OpenGL and SDL are available here: <a
href="http://csgl.sourceforge.net">http://csgl.sourceforge.net</a>
* <a
href="http://qtcsharp.sourceforge.net">Qt#:</a>
C# bindings for the Qt toolkit.
* <a
href="http://codigolivre.org.br/projects/monoqle">Project MonoQLE:</a> a C# Message Queue Server.
Sorry only in portuguese, for now.
</ul>
<li><b>Programming languages:</b></li>
<ul>
* <a
href="http://janet-js.sourceforge.net/">Janet:</a>
an implemention of ECMAScript (the standarized
version of JavaScript) in C#
</ul>
<li><b>Other projects</b></li>
<ul>
* <a
href="http://www.improve-technologies.com/alpha/esharp/">Eclipse
Plugin for C#</a>
* <a href="http://www.kaffe.org">Kaffe:</a> A popular
Free Software JIT engine for Java.
@@ -143,19 +177,13 @@
* <a href="http://www.intel.com/research/mrl/orp">ORP:</a> A research
JIT/VM/GC system from Intel.
* C# bindings for OpenGL and SDL are available here: <a
href="http://csgl.sourceforge.net">http://csgl.sourceforge.net</a>
* <a
href="http://www.southern-storm.com.au/portable_net.html">Portable.NET:</a>
Another implementation of the CLI and C# compiler.
* A Free (GFDL) tutorial on C# in Spanish with examples, slides, and extras (under development). Get it <a href="http://geneura.ugr.es/~jaime/csharp/">here</a>.
* <a
href="http://codigolivre.org.br/projects/monoqle">Project MonoQLE:</a> a C# Message Queue Server.
Sorry only in portuguese, for now.
* A Free (GFDL) tutorial on C# in Spanish with
examples, slides, and extras (under development). Get it <a
href="http://geneura.ugr.es/~jaime/csharp/">here</a>.
</ul>
** GNOME Documentation
+30 -27
View File
@@ -4,23 +4,11 @@
1,Runtime,runtime.html,runtime.src
2,Embedding,embedded-api.html,embedded-api.src
1,Classes,class-library.html,class-library.src
1,Gtk#,http://gtk-sharp.sourceforge.net
1,Gtk#,gtk-sharp.html,gtk-sharp.src
1,ASP.NET,asp-net.html,asp-net.src
1,ADO.NET,ado-net.html,ado-net.src
1,Class Status,class-status.html,class-status.src,cm/cormissing.css,cm/cormissing.js
2,corlib,class-status-corlib.html,class-status-corlib.src,cm/cormissing.css,cm/cormissing.js
2,System,class-status-System.html,class-status-System.src,cm/cormissing.css,cm/cormissing.js
2,Xml,class-status-System.Xml.html,class-status-System.Xml.src,cm/cormissing.css,cm/cormissing.js
2,Data,class-status-System.Data.html,class-status-System.Data.src,cm/cormissing.css,cm/cormissing.js
2,Drawing,class-status-System.Drawing.html,class-status-System.Drawing.src,cm/cormissing.css,cm/cormissing.js
2,Web,class-status-System.Web.html,class-status-System.Web.src,cm/cormissing.css,cm/cormissing.js
2,Web.Services,class-status-System.Web.Services.html,class-status-System.Web.Services.src,cm/cormissing.css,cm/cormissing.js
2,Microsoft.VisualBasic,class-status-Microsoft.VisualBasic.html,class-status-Microsoft.VisualBasic.src,cm/cormissing.css,cm/cormissing.js
2,Windows.Forms,class-status-System.Windows.Forms.html,class-status-System.Windows.Forms.src,cm/cormissing.css,cm/cormissing.js
2,EnterpriseServices,class-status-System.EnterpriseServices.html,class-status-System.EnterpriseServices.src,cm/cormissing.css,cm/cormissing.js
2,Formatters.Soap,class-status-System.Runtime.Serialization.Formatters.Soap.html,class-status-System.Runtime.Serialization.Formatters.Soap.src,cm/cormissing.css,cm/cormissing.js
1,C# Compiler,c-sharp.html,c-sharp.src
1,Status,status.html,status.src
1,VB Compiler,mbas.html,mbas.src
0,Download,download.html,download.src
1,CVS access,ccvs.html,ccvs.src
1,AnonCVS access,anoncvs.html,anoncvs.src
@@ -34,19 +22,6 @@
1,Porting,porting.html,porting.src
2,PowerPC,ppc.html,ppc.src
1,HOWTO,mono-contribution-howto.html,mono-contribution-howto.src
0,Plans,plans.html,plans.src
1,ADO.NET,ado-net.html,ado-net.src
2,Firebird Interbase,firebird.html,firebird.src
2,Microsft SQL Server,sqlclient.html,sqlclient.src
2,MySQL,mysql.html,mysql.src
2,ODBC,odbc.html,odbc.src
2,OLE DB,oledb.html,oledb.src
2,PostgreSQL,postgresql.html,postgresql.src
2,SQL Lite,sqlite.html,sqlite.src
2,Sybase,sybase.html,sybase.src
2,TDS Generic,tdsclient.html,tdsclient.src
1,Java,java.html,java.src
1,Windows.Forms,winforms.html,winforms.src
0,Resources,resources.html,resources.src
1,Beginning,mono-beginning.html,mono-beginning.src
1,Mailing Lists,mailing-lists.html,mailing-lists.src
@@ -56,4 +31,32 @@
1,Papers,papers.html,papers.src
1,Languages,languages.html,languages.src
1,Debugging,jit-debug.html,jit-debug.src
0,Plans,plans.html,plans.src
1,ADO.NET,ado-net.html,ado-net.src
1,Crypto,crypto.html,crypto.src
2,Firebird Interbase,firebird.html,firebird.src
2,Microsft SQL Server,sqlclient.html,sqlclient.src
2,MySQL,mysql.html,mysql.src
2,ODBC,odbc.html,odbc.src
2,OLE DB,oledb.html,oledb.src
2,Oracle,oracle.html,oracle.src
2,PostgreSQL,postgresql.html,postgresql.src
2,SQL Lite,sqlite.html,sqlite.src
2,Sybase,sybase.html,sybase.src
2,TDS Generic,tdsclient.html,tdsclient.src
1,Java,java.html,java.src
1,Windows.Forms,winforms.html,winforms.src
0,Class Status,class-status.html,class-status.src,cm/cormissing.css,cm/cormissing.js
1,corlib,class-status-corlib.html,class-status-corlib.src,cm/cormissing.css,cm/cormissing.js
1,System,class-status-System.html,class-status-System.src,cm/cormissing.css,cm/cormissing.js
1,Xml,class-status-System.Xml.html,class-status-System.Xml.src,cm/cormissing.css,cm/cormissing.js
1,Data,class-status-System.Data.html,class-status-System.Data.src,cm/cormissing.css,cm/cormissing.js
1,Drawing,class-status-System.Drawing.html,class-status-System.Drawing.src,cm/cormissing.css,cm/cormissing.js
1,Web,class-status-System.Web.html,class-status-System.Web.src,cm/cormissing.css,cm/cormissing.js
1,Web.Services,class-status-System.Web.Services.html,class-status-System.Web.Services.src,cm/cormissing.css,cm/cormissing.js
1,Microsoft.VisualBasic,class-status-Microsoft.VisualBasic.html,class-status-Microsoft.VisualBasic.src,cm/cormissing.css,cm/cormissing.js
1,Windows.Forms,class-status-System.Windows.Forms.html,class-status-System.Windows.Forms.src,cm/cormissing.css,cm/cormissing.js
1,EnterpriseServices,class-status-System.EnterpriseServices.html,class-status-System.EnterpriseServices.src,cm/cormissing.css,cm/cormissing.js
1,Formatters.Soap,class-status-System.Runtime.Serialization.Formatters.Soap.html,class-status-System.Runtime.Serialization.Formatters.Soap.src,cm/cormissing.css,cm/cormissing.js
1,Cscompmgd,class-status-Cscompmgd.html,class-status-Cscompmgd.src,cm/cormissing.css,cm/cormissing.js
0,Contact,contact.html,contact.src
+4
View File
@@ -9,6 +9,7 @@ OBJECTS= \
deploy/mysql.html \
deploy/odbc.html \
deploy/oledb.html \
deploy/oracle.html \
deploy/postgresql.html \
deploy/sqlclient.html \
deploy/sqlite.html \
@@ -30,13 +31,16 @@ OBJECTS= \
deploy/class-status-System.EnterpriseServices.html \
deploy/class-status-System.Runtime.Serialization.Formatters.Soap.html \
deploy/class-status-System.Windows.Forms.html \
deploy/class-status-Cscompmgd.html \
deploy/class-library.html \
deploy/classlib-doc.html \
deploy/contact.html \
deploy/c-sharp.html \
deploy/mbas.html \
deploy/ccvs.html \
deploy/documentation.html \
deploy/download.html \
deploy/crypto.html \
deploy/embedded-api.html \
deploy/faq.html \
deploy/gcc-frontend.html \
+1
View File
@@ -2,6 +2,7 @@
<html>
<head>
<title>#TITLE#</title>
<link rel="icon" href="../MonoIcon.png" type="image/png">
<!-- background-image: url("images/bgsquares.gif"); -->
<style type="text/css">
<!--
+1 -1
View File
@@ -1,4 +1,4 @@
man_MANS = mcs.1 mono.1 monostyle.1 mono-config.5 sqlsharpcli.1
man_MANS = mcs.1 mono.1 monostyle.1 mono-config.5 sqlsharp.1
EXTRA_DIST = $(man_MANS)
+36 -48
View File
@@ -1,13 +1,26 @@
.TH sqlsharpcli 1 "30 November 2002"
.TH sqlsharp 1 "10 December 2002"
.SH NAME
sqlsharpcli \- Mono SQL# Command Line SQL Query tool
sqlsharp \- Mono SQL# command-line SQL Query tool
.SH SYNOPSIS
.B sqlsharpcli
[option] [source-files]
.B sqlsharp
[\-f filename] [\-o filename] [\-s]
.SH DESCRIPTION
sqlsharpcli is the Mono SQL# tool used for entering SQL queries
sqlsharp is the Mono SQL# tool used for entering SQL queries
to a database using Mono ADO.NET providers.
.PP
.SH OPTIONS
The following options are supported:
.TP
.I "-f filename"
Output file to load SQL# commands from.
.TP
.I "-o filename"
Output file to send results.
.TP
.I "-s"
Silent mode.
.PP
.SH HOW TO USE
The SQL# tool accepts commands via its command line interface. Commands
begin with a backslash followed by the command name.
.PP
@@ -46,35 +59,6 @@ To connect to a database, you need to do the following:
.fi
.PP
.SH COMMANDS
The following commands are supported:
.PP
.TP
.I "Open"
Opens connection to database.
.nf
Example:
SQL# \\open
.fi
.TP
.I "ConnectionString"
Sets the Connection String.
.nf
Example:
SQL# \\connectionstring Database=test
.fi
.TP
.I "Provider"
Sets the data provider.
.nf
Example:
SQL# \\provider mysql
.fi
.SH CONNECTION AND PROVIDER COMMANDS
These commands are used to setup the provider,
connection string, and open/close the database connnection
@@ -427,30 +411,34 @@ which connects to a PostgreSQL database:
.fi
.SH DEBUGGING SUPPORT
No debugging support.
.SH NOTES
No notes.
.SH AUTHORS
The Mono SQL# Tool was written
.nf
by Daniel Morgan <[email protected]>
.fi
.PP
.SH LICENSE
The Mono SQL# Tool is released under the terms of the GNU GPL.
Please read the accompanying `COPYING' file for details. Alternative
licenses are available from Ximian or Daniel Morgan.
.PP
.SH SEE ALSO
mono(1), mint(1), mcs(1)
.PP
.SH BUGS
To report bugs in the compiler, you can use `bug-buddy', or you can
file bug reports in our bug tracking system:
.nf
http://bugzilla.ximian.com.
.SH MAILING LIST
The Mono Mailing List is available at: [email protected]
.SH MORE INFORMATION
The Mono C# compiler is developed by Ximian, Inc
(http://www.ximian.com) (http://www.ximian.com) and is based on the
ECMA C# language standard available here:
http://www.ecma.ch/ecma1/STAND/ecma-334.htm
.fi
.PP
.SH MAILING LISTS
For details, visit:
.nf
http://mail.ximian.com/mailman/mono-list
.fi
.SH WEB SITE
For details, visit:
.nf
http://www.go-mono.com
.fi
.PP
.SH SEE ALSO
mono(1), mint(1)
+2 -1
View File
@@ -5,7 +5,7 @@ C# Compiler:
Class Libraries:
Patrik Torstensson <[email protected]>
Gaurav Vaish <gvaish@iitk.ac.in>
Gaurav Vaish <gvaish[email protected]>
Jeff Stedfast ([email protected])
Joe Shaw ([email protected])
Miguel de Icaza ([email protected])
@@ -15,3 +15,4 @@ Class Libraries:
Bob Smith ([email protected])
John Barnette ([email protected])
Daniel Morgan <[email protected]>
Sebastien Pouliot <[email protected]>
+47 -16
View File
@@ -1,3 +1,34 @@
2003-01-10 Gonzalo Paniagua Javier <[email protected]>
* README.building: New file.
* makefile.gnu: install README.building file.
2003-01-09 Sebastien Pouliot <[email protected]>
* AUTHORS: add myself to class library list
2002-12-15 Alp Toker <[email protected]>
* makefile.gnu: make sure mcs is in PATH, otherwise tell user to read
INSTALL.txt
2002-12-10 Daniel Morgan <[email protected]>
* makefile
* tools/makefile
* tools/makefile.gnu: change target
from SqlSharpCli.exe
to sqlsharp.exe
2002-12-10 Alp Toker <[email protected]>
* ilasm/makefile.gnu: Install ilasm executable with -m 755, not 644
* ilasm/makefile: ditto
2002-12-10 Gaurav Vaish <[email protected]>
* AUTHORS: Corrected my email-ID.
2002-11-29 Daniel Morgan <[email protected]>
* INSTALL: renamed to INSTALL.txt because INSTALL
@@ -165,20 +196,20 @@
* makefile (linux): Abandon the build if any of the subdir makes fail
2002-03-07 Nick Drochak <[email protected]>
* makefile: Change order of build so corlib is built before nunit since
Nunit needs corlib now.
2002-02-14 Nick Drochak <[email protected]>
* makefile: Build mcs/doctools too when one does 'make'
2002-01-20 Nick Drochak <[email protected]>
* on the 'test' target, make sure NUnit is built first before building
and running tests
2002-01-20 Nick Drochak <[email protected]>
2002-03-07 Nick Drochak <[email protected]>
* makefile: Change order of build so corlib is built before nunit since
Nunit needs corlib now.
2002-02-14 Nick Drochak <[email protected]>
* makefile: Build mcs/doctools too when one does 'make'
2002-01-20 Nick Drochak <[email protected]>
* on the 'test' target, make sure NUnit is built first before building
and running tests
2002-01-20 Nick Drochak <[email protected]>
* add nunit directory to the list of dirs to build in
+33
View File
@@ -0,0 +1,33 @@
[1] Building mono + mcs from CVS on *NIX. The Easy Way (tm)
-------------------------------------------------------------
1. Get mono and mcs from CVS (http://www.go-mono.com/download.html)
2. Use the script to build mono (mono/doc/mono-build.sh).
3. Copy the dlls and mcs.exe from the latest monocharge tarball
(http://www.gnome-db.org/~gonzalo/mono/) to /where/you/installed/mono/lib and
..../bin respectively.
[2] Keeping the stuff up to date
----------------------------------
Once you have followed the above steps, do these ones to keep your installation
up to date:
1. In mcs directory,
cvs -z3 update -Pd
make -f makefile.gnu
2. Use the mono-build.sh script to update, rebuild and install mono from CVS.
Doing a cvs update of mono/doc/mono-build.sh file is also a good idea.
3. In mcs directory:
make -f makefile.gnu install prefix=/prefix/of/your/installation/path
4. In case of troubles (ie, unable to compile mcs/* sources) go to [1].
-Gonzalo
+3 -1
View File
@@ -22,7 +22,9 @@
</sources>
</csc>
<copy file="../lib/Accessibility.dll" tofile="Test/Accessibility.dll"/>
<nant basedir="Test" target="build"/>
<!-- TODO: missing tests & buildfile
<nant basedir="Test" target="build"/>
-->
</target>
<target name="test" depends="build">
+3
View File
@@ -0,0 +1,3 @@
2002-12-10 Jeroen Janssen <[email protected]>
* updated .build file to correctly build with Nant
+21
View File
@@ -1,3 +1,24 @@
2003-01-08 Gaurav Vaish <gvaish_mono AT lycos.com>
* System.Web.Mobile : Added new directory
2002-12-11 Jeroen Janssen <[email protected]>
* enabled building Mono.Directory.LDAP and
System.Design in .build file
2002-12-10 Jeroen Janssen <[email protected]>
* updated .build file(s) to correctly contain required buildfile
attribute for nant
2002-12-09 Daniel Morgan <[email protected]>
* library.build: add Mono.GetOptions to windows build
* Mono.GetOptions/Mono.GetOptions.build: add file
for windows build
2002-12-08 Radek Doulik <[email protected]>
* makefile.gnu (DIRS): place System.Data before Mono.GetOptions,
+10 -2
View File
@@ -1,8 +1,16 @@
2002-13-07 Jackson Harper <[email protected]>
2002-12-15 Jackson Harper <[email protected]>
* CompilerError.cs ErrorLevel.cs: Moved ErrorLevel enum into its own file
2002-12-12 Jackson Harper <[email protected]>
* Compiler.cs: Partially implemented bugreport option, also only allow valid options now
2002-12-07 Jackson Harper <[email protected]>
* Compiler.cs: Moved StreamWriter creation into a try block
2002-13-07 Jackson Harper <[email protected]>
2002-12-07 Jackson Harper <[email protected]>
* Compiler.cs: Source text is now implemented so you can pass strings of C# code to be compiled
@@ -30,11 +30,20 @@ namespace Microsoft.CSharp {
string[] temp_cs_files;
CompilerError[] errors;
string bugreport_path = null;
StreamWriter bug_report = null;
temp_cs_files = CreateCsFiles (sourceTexts, sourceTextNames);
if (options != null)
bugreport_path = (string)options["bugreport"];
if (bugreport_path != null) {
bug_report = CreateBugReport (sourceTexts, sourceTextNames, bugreport_path);
}
try {
errors = CompileFiles (temp_cs_files, target, imports, options);
errors = CompileFiles (temp_cs_files, target, imports, options, bug_report);
} catch {
throw;
} finally {
@@ -42,6 +51,8 @@ namespace Microsoft.CSharp {
FileInfo file = new FileInfo (temp_file);
file.Delete ();
}
if (bug_report != null)
bug_report.Close ();
}
return errors;
@@ -52,7 +63,7 @@ namespace Microsoft.CSharp {
//
private static CompilerError[] CompileFiles (string[] cs_files,
string target, string[] imports, IDictionary options)
string target, string[] imports, IDictionary options, StreamWriter bug_report)
{
ArrayList error_list = new ArrayList ();
Process mcs = new Process ();
@@ -82,6 +93,11 @@ namespace Microsoft.CSharp {
error_list.Add (error);
}
if (bug_report != null) {
bug_report.WriteLine ("### Compiler Output");
bug_report.Write (mcs_output);
}
return (CompilerError[])error_list.ToArray (typeof(CompilerError));
}
@@ -152,6 +168,8 @@ namespace Microsoft.CSharp {
if (null != options) {
foreach (object option in options.Keys) {
object value = options[option];
if (!ValidOption ((string)option))
continue;
args.AppendFormat ("{0} ", OptionString (option,value));
}
}
@@ -184,6 +202,64 @@ namespace Microsoft.CSharp {
throw new IndexOutOfRangeException ();
}
private static StreamWriter CreateBugReport (string[] source_texts,
string[] source_names, string path)
{
StreamWriter bug_report = null;
try {
bug_report = new StreamWriter (path);
bug_report.WriteLine ("### C# Compiler Defect Report," +
" created {0}", DateTime.Now);
// Compiler Version
// Runtime
// Operating System
// Username
for (int i=0; i<source_texts.Length; i++) {
bug_report.WriteLine ("### Source file: '{0}'",
source_names[i]);
bug_report.Write (source_texts[i]);
}
} catch {
if (bug_report != null)
bug_report.Close ();
throw;
}
return bug_report;
}
private static bool ValidOption (string option)
{
switch (option) {
case "addmodule":
case "baseaddress":
case "checked":
case "d":
case "debug":
case "doc":
case "filealign":
case "incr":
case "lib":
case "linkres":
case "m":
case "nostdlib":
case "nowarn":
case "o":
case "r":
case "res":
case "target":
case "unsafe":
case "w":
case "warnaserror":
case "win32icon":
case "win32res":
return true;
}
return false;
}
}
}
@@ -11,13 +11,6 @@ using System.Text;
namespace Microsoft.CSharp {
public enum ErrorLevel {
None,
Warning,
Error,
FatalError,
}
public class CompilerError {
private ErrorLevel level = ErrorLevel.None;
@@ -0,0 +1,17 @@
// Microsoft.CSharp.ErrorLevel
//
// Author(s):
// Jackson Harper ([email protected])
//
// (C) 2002 Jackson Harper, All rights reserved.
//
namespace Microsoft.CSharp {
public enum ErrorLevel {
None,
Warning,
Error,
FatalError,
}
}
+1
View File
@@ -1,3 +1,4 @@
Microsoft.CSharp/Compiler.cs
Microsoft.CSharp/CompilerError.cs
Microsoft.CSharp/ErrorLevel.cs
Microsoft.CSharp/TODOAttribute.cs
+11
View File
@@ -1,3 +1,14 @@
2002-12-22 Tim Coleman <[email protected]>
* Mono.Data.Tds.Protocol/TdsComm.cs:
Change GetString to NOT explicitly add a NUL
to the end of the string since Encoder.GetString ()
will do that.
2002-12-14 Daniel Morgan <[email protected]>
* Mono.Data.Tds.Protocol/Tds70.cs: single quotes in SQL string
need to be escaped as two single quotes
2002-12-01 Tim Coleman <[email protected]>
* list:
Remove more unnecessary files.
@@ -1,3 +1,20 @@
2002-12-10 Gonzalo Paniagua Javier <[email protected]>
* Tds.cs:
(Disconnect): close the stream and set connected to false.
(NextResult): check if after DoneProc we have a ColumnMetadata + Row,
which holds the values for the output parameters and read them.
(LoadRow): add the values to outputParameters if DoneProc.
When executing a stored procedure, we execute the procedure and then
select the parameter values.
* Tds70.cs:
(BuildParameters): check Parameters.
* TdsComm.cs: added Close () to close the stream.
* TdsConnectionParameters.cs: initialize all the string to be empty.
2002-11-04 Tim Coleman ([email protected])
* TdsBigDecimal.cs:
New class added to handle (potentially) large
@@ -184,8 +184,8 @@ namespace Mono.Data.Tds.Protocol {
comm.StartPacket (TdsPacketType.Logoff);
comm.Append ((byte) 0);
comm.SendPacket ();
SkipToEnd ();
comm.Close ();
connected = false;
}
public void Execute (string sql)
@@ -237,14 +237,26 @@ namespace Mono.Data.Tds.Protocol {
TdsPacketSubType subType;
bool done = false;
bool outputParams = false;
while (!done) {
subType = ProcessSubPacket ();
if (outputParams) {
moreResults = false;
break;
}
switch (subType) {
case TdsPacketSubType.ColumnInfo:
case TdsPacketSubType.ColumnMetadata:
case TdsPacketSubType.RowFormat:
done = (Comm.Peek () != (byte) TdsPacketSubType.TableName);
byte peek = Comm.Peek ();
done = (peek != (byte) TdsPacketSubType.TableName);
if (done && doneProc && peek == (byte) TdsPacketSubType.Row) {
outputParams = true;
done = false;
}
break;
case TdsPacketSubType.TableName:
done = true;
@@ -763,6 +775,9 @@ namespace Mono.Data.Tds.Protocol {
foreach (TdsDataColumn column in columns) {
object o = GetColumnValue ((TdsColumnType) column["ColumnType"], false, i);
currentRow.Add (o);
if (doneProc)
outputParameters.Add (o);
if (o is TdsBigDecimal && currentRow.BigDecimalIndex < 0)
currentRow.BigDecimalIndex = i;
i += 1;
@@ -37,14 +37,18 @@ namespace Mono.Data.Tds.Protocol {
private string BuildExec (string sql)
{
string esql = sql.Replace ("'", "''"); // escape single quote
if (Parameters != null && Parameters.Count > 0)
return BuildProcedureCall (String.Format ("sp_executesql N'{0}', N'{1}', ", sql, BuildPreparedParameters ()));
return BuildProcedureCall (String.Format ("sp_executesql N'{0}', N'{1}', ", esql, BuildPreparedParameters ()));
else
return BuildProcedureCall (String.Format ("sp_executesql N'{0}'", sql));
return BuildProcedureCall (String.Format ("sp_executesql N'{0}'", esql));
}
private string BuildParameters ()
{
if (Parameters == null || Parameters.Count == 0)
return String.Empty;
StringBuilder result = new StringBuilder ();
foreach (TdsMetaParameter p in Parameters) {
if (result.Length > 0)
@@ -215,6 +215,11 @@ namespace Mono.Data.Tds.Protocol {
Append (BitConverter.GetBytes (l));
}
public void Close ()
{
stream.Close ();
}
private void ConnectCallback (IAsyncResult ar)
{
Socket s = (Socket) ar.AsyncState;
@@ -291,7 +296,6 @@ namespace Mono.Data.Tds.Protocol {
else {
byte[] result = new byte[len + 1];
Array.Copy (GetBytes (len, false), result, len);
result[len] = (byte) 0;
return (encoder.GetString (result));
}
}
@@ -7,17 +7,18 @@
// Copyright (C) 2002 Tim Coleman
//
using System;
namespace Mono.Data.Tds.Protocol {
public class TdsConnectionParameters
{
public string ApplicationName = "Mono";
public string Database;
public string Charset;
public string Database = String.Empty;
public string Charset = String.Empty;
public string Hostname = "localhost";
public string Language;
public string Language = String.Empty;
public string LibraryName = "Mono";
public string Password;
public string Password = String.Empty;
public string ProgName = "Mono";
public string User;
public string User = String.Empty;
}
}
+7
View File
@@ -0,0 +1,7 @@
2002-12-11 Jeroen Janssen <[email protected]>
* add reference to corlib.dll in order to eliminate [MonoTODO] build error
2002-12-10 Jeroen Janssen <[email protected]>
* added Mono.Directory.LDAP.build file
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- NAnt build file for Mono.Directory.LDAP.dll -->
<project name="Mono.Directory.LDAP" default="build">
<property name="debug" value="false"/>
<target name="build">
<csc target="library" output="../lib/Mono.Directory.LDAP.dll" debug="${debug}">
<arg value="/nowarn:1595"/>
<arg value="/nowarn:0067"/>
<arg value="/nowarn:0109"/>
<arg value="/nowarn:0169"/>
<arg value="/nowarn:0649"/>
<arg value="/unsafe"/>
<arg value="/noconfig"/>
<arg value="/lib:../lib/"/>
<arg value="/r:corlib.dll"/>
<sources>
<includes name="**/*.cs"/>
<excludes name="Test/**"/>
</sources>
</csc>
</target>
<target name="test" depends="build">
<nant basedir="Test" target="test"/>
</target>
<target name="clean">
<delete file="../lib/Mono.Directory.LDAP.dll" failonerror="false"/>
</target>
</project>
+39
View File
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- NAnt build file for Mono.GetOptions.dll -->
<project name="Mono.GetOptions" default="build">
<property name="debug" value="false"/>
<target name="build">
<csc target="library" output="../lib/Mono.GetOptions.dll" debug="${debug}">
<arg value="/nowarn:1595"/>
<arg value="/nowarn:0067"/>
<arg value="/nowarn:0109"/>
<arg value="/nowarn:0169"/>
<arg value="/nowarn:0649"/>
<arg value="/unsafe"/>
<arg value="/noconfig"/>
<arg value="/r:System.dll"/>
<arg value="/r:System.Xml.dll"/>
<arg value="/r:System.Data.dll"/>
<sources>
<includes name="**/*.cs"/>
<excludes name="GetOptTest/**"/>
</sources>
<references>
<includes name="../lib/corlib.dll"/>
<includes name="../lib/System.dll"/>
<includes name="../lib/System.Xml.dll"/>
<includes name="../lib/System.Data.dll"/>
</references>
</csc>
</target>
<target name="test" depends="build">
<nant basedir="Test" target="test"/>
</target>
<target name="clean">
<delete file="../lib/Mono.GetOptions.dll" failonerror="false"/>
</target>
</project>
@@ -1,3 +1,8 @@
2002-12-10 Jeroen Janssen <[email protected]>
* updated .build file(s) to correctly contain required buildfile
attribute for nant
2002-12-01 Alejandro Sánchez Acosta <[email protected]>
* list.unix: Changed
+36
View File
@@ -1,3 +1,39 @@
2003-01-08 Gonzalo Paniagua Javier <[email protected]>
* list: added System.Data/DataTablePropertyDescriptor.cs
2002-12-27 Ville Palo <[email protected]>
* list: Added System.Data/XmlDataLoader.cs
2002-12-16 Ville Palo <[email protected]>
* System.Xml/XmlDataDocument.cs: Now rollback works. It means all
types of transactions works, i guess ;)
2002-12-14 Ville Palo <[email protected]>
* System.Xml/XmlDataDocument.cs: Adding row via XmlDataDocument to
DataSet's datatable is now possible.
2002-12-11 Ville Palo <[email protected]>
* System.Xml/XmlDataDocument.cs: Implemented GetRowFromElement() and
GetElementFromRowElement () -methods. Somefixed and little clean up.
2002-12-10 Gonzalo Paniagua Javier <[email protected]>
* System.Data.SqlClient/SqlCommand.cs:
(CloseReader): don't get the output parameters here.
(GetOutputParameters): don't skip the stream. The parameters will be
there.
* System.Data.SqlClient/SqlConnection.cs: don't try to execute
'sp_reset_connection'.
* System.Data.SqlClient/SqlDataReader.cs: get the output parameters
after the end of the results.
2002-12-04 Ville Palo <[email protected]>
* System.Xml/XmlDataDocument.cs: Now this works in both ways,
@@ -1,3 +1,7 @@
2003-01-08 Gonzalo Paniagua Javier <[email protected]>
* DbDataRecord.cs: return DbNull.Value in GetValue () if value is null.
2002-10-31 Daniel Morgan <[email protected]>
* SchemaInfo.cs: added missing properties to fix mcs build
@@ -154,7 +154,10 @@ namespace System.Data.Common {
public object GetValue (int i)
{
return values [i];
object value = values [i];
if (value == null)
value = DBNull.Value;
return value;
}
[MonoTODO]
@@ -202,7 +202,6 @@ namespace System.Data.SqlClient {
internal void CloseDataReader (bool moreResults)
{
GetOutputParameters ();
Connection.DataReader = null;
if ((behavior & CommandBehavior.CloseConnection) != 0)
@@ -345,11 +344,9 @@ namespace System.Data.SqlClient {
return xmlReader;
}
private void GetOutputParameters ()
internal void GetOutputParameters ()
{
Connection.Tds.SkipToEnd ();
IList list = Connection.Tds.ColumnValues;
IList list = Connection.Tds.OutputParameters;
if (list != null && list.Count > 0) {
int index = 0;
@@ -351,8 +351,13 @@ namespace System.Data.SqlClient {
if (!tds.IsConnected)
tds.Connect (parms);
/* Not sure ebout removing these 2 lines.
* The command that gets to the sql server is just
* 'sp_reset_connection' and it fails.
* Either remove them definitely or fix it
else if (connectionReset)
tds.ExecProc ("sp_reset_connection");
*/
ChangeState (ConnectionState.Open);
}
@@ -732,12 +732,13 @@ namespace System.Data.SqlClient {
{
if ((command.CommandBehavior & CommandBehavior.SingleResult) != 0 && resultsRead > 0)
return false;
if (command.Tds.DoneProc)
return false;
schemaTable.Rows.Clear ();
moreResults = command.Tds.NextResult ();
if (!moreResults)
command.GetOutputParameters ();
GetSchemaTable ();
rowsRead = 0;
+113
View File
@@ -1,3 +1,116 @@
2003-01-08 Gonzalo Paniagua Javier <[email protected]>
* DataColumnPropertyDescriptor.cs: store columnIndex in the .ctor.
2003-01-08 Gonzalo Paniagua Javier <[email protected]>
* DataColumnPropertyDescriptor.cs: fixed typo.
* DataViewManagerListItemTypeDescriptor.cs: added new internal property
to get the DataViewManager and removed TablePD class.
* DataTablePropertyDescriptor.cs: TablePD class is now this one as
suggested by danmorg.
2003-01-06 Ville Palo <[email protected]>
* XmlDataLoader.cs: Moved diffgram stuff to new internal class
XmlDiffLoader.
* XmlDiffLoader.cs: new class for diffgrams. Added handling of
diffgr:Errors and some fixes and changed XmlReader to XPathNavigator.
2003-01-06 Gonzalo Paniagua Javier <[email protected]>
* DataView.cs: made dataViewManager internal.
* DataViewManager.cs: use ICustomTypeDescriptor. We don't want the
properties of the object, but the values of the columns present in a
row.
* DataViewManagerListItemTypeDescriptor.cs: implemented GetProperties,
which returns a PropertyDescriptorCollection. Created a new class
derived from PropertyDescriptor that treats Table as an object whose
properties are DataRowView.
2003-01-04 Ville Palo <[email protected]>
* XmlSchemaMapper.cs: Added handling for Constraints, Attributes.
2003-01-04 Ville Palo <[email protected]>
* DataColumn.cs: ExtendedProperties is by default !null-
2003-01-04 Ville Palo <[email protected]>
* DataColumnCollection.cs: Add (DataColumn Column) -method didn't
set column's ordinal.
2003-01-02 Ville Palo <[email protected]>
* DataSet.cs:
* XmlDataLoader.cs: XmlReader closing fixes.
* XmlSchemaReader.cs: Added support for ref=
2003-01-01 Ville Palo <[email protected]>
* DataSet.cs:
- Added XmlReader and XmlWriter Closing.
- Moved ReadXmlSchema stuff to new internal class XmlSchemaMapper.
* XmlSchemaMapper.cs
- Much better way IMHO to map xmlschema than the old one in
DataSet.cs. Its, more flexible, cleaner, ...
2002-12-29 Ville Palo <[email protected]>
* XmlDataLoader.cs: Reading diffgrams.
2002-12-29 Ville Palo <[email protected]>
* DataRow.cs: Little fix to indexer and DataColumnCang* trigger fixes.
* DataTable.cs: Added ChanginDataColumn () for triggering
DataColumnChanging event
2002-12-28 Ville Palo <[email protected]>
* DataSet.cs: Indentations to WriteXmlSchema () and one little fix
2002-12-28 Ville Palo <[email protected]>
* DataSet.cs: Indentations to WriteXml ()
2002-12-27 Ville Palo <[email protected]>
* DataSet.cs:
* XmlDataLoader.cs: Moved ReadXml -stuff from DataSet.cs to new
class XmlDataLoader.cs
2002-12-19 Ville Palo <[email protected]>
* DataSet.cs Implemented ReadXml with XmlReadMode.ReadSchema
2002-12-18 Ville Palo <[email protected]>
* DataSet.cs: Started to implement ReadXml-methods.
2002-12-17 Gonzalo Paniagua Javier <[email protected]>
* DataSet.cs: implemented DefaultViewManager and GetList.
* DataViewManager.cs: a bit of work on IList and ITypedList needed by
DataList in System.Web.
* DataViewManagerListItemTypeDescriptor.cs: custom type descriptor for
DataViewManager.
2002-12-16 Ville Palo <[email protected]>
* DataRow.cs
* DataTable.cs: Fixed NullException (rollback -event)
* DataSet.cs: WriteXml -method does not anymore write <?xml... row.
2002-12-15 Ville Palo <[email protected]>
* DataRow.cs:
* DataRowCollection.cs: Moved event triggering from DataRow to
DataRowCollection.
2002-12-09 Ville Palo <[email protected]>
* DataSet.cs: Little fix to WriteTable () -method
@@ -53,7 +53,7 @@ namespace System.Data {
private Type _dataType = null;
private object _defaultValue = null;
private string expression = null;
private PropertyCollection _extendedProperties = null;
private PropertyCollection _extendedProperties = new PropertyCollection ();
private int maxLength = -1; //-1 represents no length limit
private string nameSpace = null;
private int _ordinal = -1; //-1 represents not part of a collection
@@ -117,7 +117,8 @@ namespace System.Data {
CollectionChangeEventArgs e = new CollectionChangeEventArgs(CollectionChangeAction.Add, this);
column.SetTable( parentTable);
base.List.Add(column);
int ordinal = base.List.Add(column);
column.SetOrdinal (ordinal);
//add constraints if neccesary
@@ -25,6 +25,7 @@ namespace System.Data
public DataColumnPropertyDescriptor (string name, int columnIndex, Attribute [] attrs)
: base (name, attrs)
{
this.columnIndex = columnIndex;
}
public void SetReadOnly (bool value)
@@ -72,7 +73,7 @@ namespace System.Data
DataRowView drv = (DataRowView) component;
return drv[base.Name];
}
else if(component == typeof(DbDataRecord) && component is DbDataRecord) {
else if(componentType == typeof(DbDataRecord) && component is DbDataRecord) {
DbDataRecord dr = (DbDataRecord) component;
return dr[columnIndex];
}
+26 -10
View File
@@ -5,6 +5,7 @@
// Rodrigo Moya <[email protected]>
// Daniel Morgan <[email protected]>
// Tim Coleman <[email protected]>
// Ville Palo <[email protected]>
//
// (C) Ximian, Inc 2002
// (C) Daniel Morgan 2002
@@ -13,6 +14,7 @@
using System;
using System.Collections;
using System.Globalization;
namespace System.Data {
/// <summary>
@@ -97,10 +99,10 @@ namespace System.Data {
[MonoTODO]
set {
value = (value == null) ? DBNull.Value : value;
value = (value == null) ? DBNull.Value : value;
bool objIsDBNull = value.Equals(DBNull.Value);
if (column == null)
throw new ArgumentNullException ();
throw new ArgumentNullException (Locale.GetText ("'column' argument cannot be null."));
int columnIndex = _table.Columns.IndexOf (column);
if (columnIndex == -1)
throw new ArgumentException ();
@@ -114,6 +116,8 @@ namespace System.Data {
if (rowState == DataRowState.Deleted)
throw new DeletedRowInaccessibleException ();
_table.ChangingDataColumn (this, column, value);
//MS Implementation doesn't seem to create the proposed or original
//set of values when a datarow has just been created or added to the
//DataTable and AcceptChanges() has not been called yet.
@@ -128,20 +132,23 @@ namespace System.Data {
else {
BeginEdit (); // implicitly called
rowState = DataRowState.Modified;
if(objIsDBNull)
proposed[columnIndex] = DBNull.Value;
else
proposed[columnIndex] = value;
_table.ChangedDataColumn (this, column, value);
rowState = DataRowState.Modified;
current [columnIndex] = proposed[columnIndex];
proposed[columnIndex] = null;
}
//Don't know if this is the rigth thing to do,
//but it fixes my test. I believe the MS docs only say this
//method is implicitly called when calling AcceptChanges()
// EndEdit (); // is this the right thing to do?
//EndEdit (); // is this the right thing to do?
}
}
@@ -191,14 +198,14 @@ namespace System.Data {
return column.DefaultValue;
if (!HasVersion (version))
throw new VersionNotFoundException ();
throw new VersionNotFoundException (Locale.GetText ("There is no " + version.ToString () + " data to access."));
switch (version)
{
case DataRowVersion.Proposed:
return proposed[columnIndex];
case DataRowVersion.Current:
return current[columnIndex];
return current[columnIndex];
case DataRowVersion.Original:
return original[columnIndex];
default:
@@ -397,7 +404,6 @@ namespace System.Data {
switch (rowState) {
case DataRowState.Added:
Table.Rows.Remove (this);
_table.DeletedDataRow (this, DataRowAction.Delete);
break;
case DataRowState.Deleted:
throw new DeletedRowInaccessibleException ();
@@ -656,6 +662,8 @@ namespace System.Data {
if (original != null)
{
Array.Copy (original, current, _table.Columns.Count);
_table.ChangedDataRow (this, DataRowAction.Rollback);
CancelEdit ();
switch (rowState)
{
@@ -668,9 +676,17 @@ namespace System.Data {
case DataRowState.Deleted:
rowState = DataRowState.Unchanged;
break;
}
}
_table.ChangedDataRow (this, DataRowAction.Rollback);
}
else {
// If rows are just loaded via Xml the original values are null.
// So in this case we have to remove all columns.
// FIXME: I'm not realy sure, does this break something else, but
// if so: FIXME ;)
if ((rowState & DataRowState.Added) > 0)
_table.Rows.Remove (this);
}
}
@@ -132,14 +132,17 @@ namespace System.Data
public void Remove (DataRow row)
{
list.Remove (row);
table.DeletedDataRow (row, DataRowAction.Delete);
}
/// <summary>
/// Removes the row at the specified index from the collection.
/// </summary>
public void RemoveAt (int index)
{
list.RemoveAt (index);
{
DataRow row = (DataRow)list [index];
list.RemoveAt (index);
table.DeletedDataRow (row, DataRowAction.Delete);
}
///<summary>
+65 -149
View File
@@ -32,13 +32,14 @@ namespace System.Data {
ISupportInitialize, ISerializable {
private string dataSetName;
private string _namespace;
private string _namespace = "";
private string prefix;
private bool caseSensitive;
private bool enforceConstraints;
private bool enforceConstraints = true;
private DataTableCollection tableCollection;
// private DataTableRelationCollection relationCollection;
private PropertyCollection properties;
private DataViewManager defaultView;
#region Constructors
@@ -80,15 +81,11 @@ namespace System.Data {
[DataSysDescription ("Indicates a custom \"view\" of the data contained by the DataSet. This view allows filtering, searching, and navigating through the custom data view.")]
[Browsable (false)]
public DataViewManager DefaultViewManager {
[MonoTODO]
get {
throw new NotImplementedException ();
if (defaultView == null)
defaultView = new DataViewManager (this);
return defaultView;
}
[MonoTODO]
set {
throw new NotImplementedException ();
}
}
[DataSysDescription ("Indicates whether constraint rules are to be followed.")]
@@ -272,6 +269,7 @@ namespace System.Data {
public void WriteXml(XmlWriter writer)
{
WriteXml( writer, XmlWriteMode.IgnoreSchema );
writer.Close ();
}
public void WriteXml(Stream stream, XmlWriteMode mode)
@@ -297,9 +295,7 @@ namespace System.Data {
public void WriteXml(XmlWriter writer, XmlWriteMode mode)
{
writer.WriteStartDocument();
((XmlTextWriter)writer).Formatting = Formatting.Indented;
WriteStartElement( writer, mode, Namespace, Prefix, DataSetName );
if( mode == XmlWriteMode.WriteSchema )
@@ -333,7 +329,7 @@ namespace System.Data {
writer.WriteEndElement();
writer.WriteEndDocument();
writer.Close ();
}
public void WriteXmlSchema(Stream stream)
@@ -359,6 +355,7 @@ namespace System.Data {
public void WriteXmlSchema(XmlWriter writer)
{
((XmlTextWriter)writer).Formatting = Formatting.Indented;
//Create a skeleton doc and then write the schema
//proper which is common to the WriteXml method in schema mode
writer.WriteStartDocument();
@@ -366,7 +363,7 @@ namespace System.Data {
DoWriteXmlSchema( writer );
writer.WriteEndDocument();
writer.Close ();
}
public void ReadXmlSchema(Stream stream)
@@ -384,13 +381,59 @@ namespace System.Data {
public void ReadXmlSchema(TextReader treader)
{
XmlReader reader = new XmlTextReader( treader );
ReadXmlSchema( reader );
}
public void ReadXmlSchema(XmlReader reader)
{
DoReadXmlSchema( reader );
XmlSchemaMapper SchemaMapper = new XmlSchemaMapper (this);
SchemaMapper.Read (reader);
reader.Close ();
}
public XmlReadMode ReadXml (Stream stream)
{
return ReadXml (new XmlTextReader (stream));
}
public XmlReadMode ReadXml (string str)
{
return ReadXml (new XmlTextReader (str));
}
public XmlReadMode ReadXml (TextReader reader)
{
return ReadXml (new XmlTextReader (reader));
}
public XmlReadMode ReadXml (XmlReader r)
{
XmlDataLoader Loader = new XmlDataLoader (this);
XmlReadMode Result = Loader.LoadData (r);
r.Close ();
return Result;
}
public XmlReadMode ReadXml (Stream stream, XmlReadMode mode)
{
return ReadXml (new XmlTextReader (stream), mode);
}
public XmlReadMode ReadXml (string str, XmlReadMode mode)
{
return ReadXml (new XmlTextReader (str), mode);
}
public XmlReadMode ReadXml (TextReader reader, XmlReadMode mode)
{
return ReadXml (new XmlTextReader (reader), mode);
}
[MonoTODO]
public XmlReadMode ReadXml (XmlReader reader, XmlReadMode mode)
{
XmlDataLoader Loader = new XmlDataLoader (this);
return Loader.LoadData (reader, mode);
}
#endregion // Public Methods
@@ -414,12 +457,12 @@ namespace System.Data {
#region IListSource methods
IList IListSource.GetList ()
{
throw new NotImplementedException ();
return DefaultViewManager;
}
bool IListSource.ContainsListCollection {
get {
throw new NotImplementedException ();
return true;
}
}
#endregion IListSource methods
@@ -459,7 +502,7 @@ namespace System.Data {
{
//sort out the namespacing
string nspc = table.Namespace.Length > 0 ? table.Namespace : Namespace;
WriteStartElement( writer, mode, nspc, table.Prefix, table.TableName );
foreach( DataColumn col in atts )
@@ -539,7 +582,7 @@ namespace System.Data {
break;
};
}
private void DoWriteXmlSchema( XmlWriter writer )
{
//Create the root element and declare all the namespaces etc
@@ -704,135 +747,6 @@ namespace System.Data {
writer.WriteEndElement();
}
[MonoTODO]
private void DoReadXmlSchema(XmlReader reader)
{
DataTable dt = new DataTable ();
XmlSchema schema = XmlSchema.Read (reader, null);
XmlSchemaObjectCollection SimpleTypes = new XmlSchemaObjectCollection ();
XmlSchemaObjectCollection ComplexTypes = new XmlSchemaObjectCollection ();
// Get types
for (int i = 0; i < schema.Items.Count; i++) {
XmlSchemaSimpleType simpleType = null;
XmlSchemaComplexType complexType = null;
if ((simpleType = schema.Items [i] as XmlSchemaSimpleType) != null) {
SimpleTypes.Add (simpleType);
}
else if ((complexType = schema.Items [i] as XmlSchemaComplexType) != null) {
ComplexTypes.Add (complexType);
}
}
// Get elements
XmlSchemaObjectCollection Elements = new XmlSchemaObjectCollection ();
for (int i = 0; i < schema.Items.Count; i++) {
XmlSchemaElement element = null;
XmlSchemaComplexType complexType = null;
if ((element = schema.Items [i] as XmlSchemaElement) != null) {
// does element have type defined
if (!element.SchemaTypeName.IsEmpty)
ReadTypeElement (element, ComplexTypes, ref dt);
else if ((complexType = element.SchemaType as XmlSchemaComplexType) != null) {
dataSetName = element.Name;
ReadColumnsFromSchema (complexType, ComplexTypes, ref dt);
}
Tables.Add (dt);
}
}
}
[MonoTODO]
private bool ReadTypeElement (XmlSchemaElement el, XmlSchemaObjectCollection ComplexTypes,
ref DataTable datatable)
{
/*
* reads element's type
*/
bool found = false;
if (ComplexTypes.Count <= 0)
return found;
if (ComplexTypes[0] is XmlSchemaComplexType) {
foreach (XmlSchemaComplexType c in ComplexTypes) {
if (el.SchemaTypeName.ToString () == c.Name.ToString ()) {
found = true;
ReadColumnsFromSchema (c, ComplexTypes, ref datatable);
}
}
}
return found;
}
[MonoTODO]
private void ReadColumnsFromSchema (XmlSchemaComplexType c, XmlSchemaObjectCollection ComplexTypes,
ref DataTable datatable)
{
// FIXME: There is so much work to do. And i dont event know is this right way but here it is
XmlSchemaSequence seq = null;
XmlSchemaChoice choice = null;
ArrayList names = new ArrayList ();
if ((seq = c.Particle as XmlSchemaSequence) != null) {
for (int i = 0; i < seq.Items.Count; i++) {
XmlSchemaElement element = null;
if ((element = seq.Items [i] as XmlSchemaElement) != null) {
// first is table name and after that comes column names
if (datatable.TableName == string.Empty)
datatable.TableName = element.Name;
else if (i + 1 > datatable.Columns.Count)
datatable.Columns.Add (element.Name);
ReadTypeElement (element, ComplexTypes, ref datatable);
}
}
}
else if ((choice = c.Particle as XmlSchemaChoice) != null) {
foreach (XmlSchemaObject obj in choice.Items) {
XmlSchemaElement e = null;
if ((e = obj as XmlSchemaElement) != null) {
// if element has type we got to find out what is it
if (e.SchemaType != null) {
datatable.TableName = e.Name;
ReadColumnsFromSchema (e.SchemaType as XmlSchemaComplexType, ComplexTypes,
ref datatable);
}
else if (!e.RefName.IsEmpty) {
// FIXME: this is wrong way to do. We should find element which is
// referenced by e. I do that later
dataSetName = e.Name;
datatable.TableName = e.RefName.ToString ();
}
}
}
}
}
#endregion
[MonoTODO]
private void OnXmlSchemaValidation (object sender, ValidationEventArgs args)
{
}
///<summary>
/// Helper function to split columns into attributes elements and simple
/// content
@@ -878,5 +792,7 @@ namespace System.Data {
//TODO -
return "xs:string";
}
#endregion //Private Xml Serialisation
}
}
+14 -4
View File
@@ -7,6 +7,7 @@
// Daniel Morgan <[email protected]>
// Rodrigo Moya <[email protected]>
// Tim Coleman ([email protected])
// Ville Palo <[email protected]>
//
// (C) Chris Podurgiel
// (C) Ximian, Inc 2002
@@ -118,6 +119,12 @@ namespace System.Data {
OnColumnChanged(e);
}
internal void ChangingDataColumn (DataRow dr, DataColumn dc, object pv)
{
DataColumnChangeEventArgs e = new DataColumnChangeEventArgs (dr, dc, pv);
OnColumnChanging (e);
}
internal void DeletedDataRow (DataRow dr, DataRowAction action)
{
DataRowChangeEventArgs e = new DataRowChangeEventArgs (dr, action);
@@ -602,10 +609,13 @@ namespace System.Data {
[MonoTODO]
public void RejectChanges()
{
foreach(DataRow myRow in _rows)
{
if (myRow.RowState != DataRowState.Unchanged)
myRow.RejectChanges();
//foreach(DataRow myRow in _rows)
//{
for (int i = _rows.Count - 1; i >= 0; i--) {
DataRow row = _rows [i];
if (row.RowState != DataRowState.Unchanged)
_rows [i].RejectChanges ();
}
}
@@ -0,0 +1,80 @@
//
// System.Data.DataTablePropertyDescriptor
//
// Authors:
// Gonzalo Paniagua Javier ([email protected])
//
// (C) 2003 Ximian, Inc (http://www.ximian.com)
//
using System;
using System.ComponentModel;
namespace System.Data
{
internal class DataTablePropertyDescriptor : PropertyDescriptor
{
DataTable table;
public DataTablePropertyDescriptor (DataTable table) : base (table.TableName, null)
{
this.table = table;
}
public override object GetValue (object component)
{
DataViewManagerListItemTypeDescriptor desc = component as DataViewManagerListItemTypeDescriptor;
if (desc == null)
return null;
DataView dv = new DataView (table);
dv.dataViewManager = desc.DataViewManager;
return dv;
}
public override bool CanResetValue (object component)
{
return false;
}
public override bool Equals (object other)
{
return (other is DataTablePropertyDescriptor &&
((DataTablePropertyDescriptor) other).table == table);
}
public override int GetHashCode ()
{
return table.GetHashCode ();
}
public override bool ShouldSerializeValue (object component)
{
return false;
}
public override void ResetValue (object component)
{
}
public override void SetValue (object component, object value)
{
}
public override bool IsReadOnly
{
get { return false; }
}
public override Type ComponentType
{
get { return typeof (DataRowView); }
}
public override Type PropertyType
{
get { return typeof (IBindingList); }
}
}
}
@@ -40,7 +40,7 @@ namespace System.Data {
bool isOpen = false;
DataViewManager dataViewManager = null;
internal DataViewManager dataViewManager = null;
[MonoTODO]
public DataView () {
@@ -23,6 +23,7 @@ namespace System.Data
#region Fields
DataSet dataSet;
DataViewManagerListItemTypeDescriptor descriptor;
#endregion // Fields
@@ -78,20 +79,22 @@ namespace System.Data
}
bool IList.IsFixedSize {
[MonoTODO]
get { throw new NotImplementedException (); }
get { return true; }
}
bool IList.IsReadOnly {
[MonoTODO]
get { throw new NotImplementedException (); }
get { return true; }
}
object IList.this [int index] {
[MonoTODO]
get { throw new NotImplementedException (); }
[MonoTODO]
set { throw new NotImplementedException (); }
get {
if (descriptor == null)
descriptor = new DataViewManagerListItemTypeDescriptor (this);
return descriptor;
}
set { throw new ArgumentException ("Not modifiable"); }
}
bool IBindingList.AllowEdit {
@@ -239,9 +242,16 @@ namespace System.Data
throw new NotImplementedException ();
}
[MonoTODO]
PropertyDescriptorCollection ITypedList.GetItemProperties (PropertyDescriptor[] listAccessors)
{
if (dataSet == null)
throw new DataException ("dataset is null");
if (listAccessors == null || listAccessors.Length == 0) {
ICustomTypeDescriptor desc = new DataViewManagerListItemTypeDescriptor (this);
return desc.GetProperties ();
}
throw new NotImplementedException ();
}
@@ -0,0 +1,110 @@
//
// System.Data.DataViewManagerListItemTypeDscriptor
//
// Authors:
// Gonzalo Paniagua Javier ([email protected])
//
// (C) 2002 Ximian, Inc (http://www.ximian.com)
//
using System;
using System.ComponentModel;
namespace System.Data
{
class DataViewManagerListItemTypeDescriptor : ICustomTypeDescriptor
{
DataViewManager dvm;
PropertyDescriptorCollection propsCollection;
internal DataViewManagerListItemTypeDescriptor (DataViewManager dvm)
{
this.dvm = dvm;
}
internal DataViewManager DataViewManager {
get { return dvm; }
}
AttributeCollection ICustomTypeDescriptor.GetAttributes ()
{
return new AttributeCollection (null);
}
[MonoTODO]
string ICustomTypeDescriptor.GetClassName ()
{
throw new NotImplementedException ();
}
[MonoTODO]
string ICustomTypeDescriptor.GetComponentName ()
{
throw new NotImplementedException ();
}
[MonoTODO]
TypeConverter ICustomTypeDescriptor.GetConverter ()
{
throw new NotImplementedException ();
}
[MonoTODO]
EventDescriptor ICustomTypeDescriptor.GetDefaultEvent ()
{
throw new NotImplementedException ();
}
[MonoTODO]
PropertyDescriptor ICustomTypeDescriptor.GetDefaultProperty ()
{
throw new NotImplementedException ();
}
[MonoTODO]
object ICustomTypeDescriptor.GetEditor (Type editorBaseType)
{
throw new NotImplementedException ();
}
[MonoTODO]
EventDescriptorCollection ICustomTypeDescriptor.GetEvents ()
{
throw new NotImplementedException ();
}
[MonoTODO]
EventDescriptorCollection ICustomTypeDescriptor.GetEvents (System.Attribute[] attributes)
{
throw new NotImplementedException ();
}
PropertyDescriptorCollection ICustomTypeDescriptor.GetProperties ()
{
DataSet ds = dvm.DataSet;
if (ds == null)
return null;
DataTableCollection tables = ds.Tables;
int index = 0;
PropertyDescriptor [] descriptors = new PropertyDescriptor [tables.Count];
foreach (DataTable table in tables)
descriptors [index++] = new DataTablePropertyDescriptor (table);
return new PropertyDescriptorCollection (descriptors);
}
[MonoTODO]
PropertyDescriptorCollection ICustomTypeDescriptor.GetProperties (System.Attribute[] attributes)
{
throw new NotImplementedException ();
}
[MonoTODO]
object ICustomTypeDescriptor.GetPropertyOwner (PropertyDescriptor pd)
{
throw new NotImplementedException ();
}
}
}
@@ -0,0 +1,237 @@
//
// mcs/class/System.Data/System.Data/XmlDataLoader.cs
//
// Purpose: Loads XmlDocument to DataSet
//
// class: XmlDataLoader
// assembly: System.Data.dll
// namespace: System.Data
//
// Author:
// Ville Palo <[email protected]>
//
// (c)copyright 2002 Ville Palo
//
// XmlDataLoader is included within the Mono Class Library.
//
using System;
using System.Data;
using System.Xml;
using System.Xml.XPath;
using System.Collections;
using System.Globalization;
namespace System.Data {
internal class XmlDataLoader
{
private DataSet DSet;
Hashtable DiffGrRows = new Hashtable ();
public XmlDataLoader (DataSet set)
{
DSet = set;
}
public XmlReadMode LoadData (XmlReader r)
{
// FIXME: somekinda exception?
if (!r.Read ())
return XmlReadMode.Auto; // FIXME
/*\
* If document is diffgram we will use diffgram
\*/
if (r.LocalName == "diffgram")
return LoadData (r, XmlReadMode.DiffGram);
/*\
* If we already have a schema, or the document
* contains an in-line schema, sets XmlReadMode to ReadSchema.
\*/
// FIXME: is this always true: "if we have tables we have to have schema also"
if (DSet.Tables.Count > 0)
return LoadData (r, XmlReadMode.ReadSchema);
/*\
* If we dont have a schema yet and document
* contains no inline-schema mode is XmlReadMode.InferSchema
\*/
return LoadData (r, XmlReadMode.InferSchema);
}
public XmlReadMode LoadData (XmlReader reader, XmlReadMode mode)
{
XmlReadMode Result = XmlReadMode.Auto;
switch (mode) {
case XmlReadMode.DiffGram:
Result = XmlReadMode.DiffGram;
ReadModeDiffGram (reader);
break;
case XmlReadMode.Auto:
LoadData (reader);
break;
case XmlReadMode.Fragment:
break;
case XmlReadMode.ReadSchema:
Result = XmlReadMode.ReadSchema;
ReadModeSchema (reader, false);
break;
case XmlReadMode.IgnoreSchema:
Result = XmlReadMode.IgnoreSchema;
ReadModeSchema (reader, true);
break;
case XmlReadMode.InferSchema:
Result = XmlReadMode.InferSchema;
ReadModeInferSchema (reader);
break;
default:
break;
}
return Result;
}
// These methods should be in their own class for example XmlDiffLoader. But for now, let them be here
#region diffgram-methods
// XmlReadMode.DiffGram
private void ReadModeDiffGram (XmlReader reader)
{
XmlDiffLoader DiffLoader = new XmlDiffLoader (DSet);
DiffLoader.Load (reader);
}
#endregion // diffgram-methods
#region reading
// XmlReadMode.InferSchema
[MonoTODO]
private void ReadModeInferSchema (XmlReader reader)
{
// root element is DataSets name
reader.MoveToContent ();
DSet.DataSetName = reader.LocalName;
// And now comes tables
while (reader.Read ()) {
// skip possible inline-schema
if (String.Compare (reader.LocalName, "schema", true) == 0 && reader.NodeType == XmlNodeType.Element) {
while (reader.Read () && (reader.NodeType != XmlNodeType.EndElement
|| String.Compare (reader.LocalName, "schema", true) != 0));
}
if (reader.NodeType == XmlNodeType.Element) {
string datatablename = reader.LocalName;
bool addTable = true;
DataTable table;
if (!DSet.Tables.Contains (datatablename)) {
table = new DataTable (reader.LocalName);
}
else {
table = DSet.Tables [datatablename];
addTable = false;
}
Hashtable rowValue = new Hashtable ();
while (reader.Read () && (reader.NodeType != XmlNodeType.EndElement
|| reader.LocalName != datatablename))
{
if (reader.NodeType == XmlNodeType.Element) {
string dataColumnName = reader.LocalName;
if (addTable)
table.Columns.Add (dataColumnName);
// FIXME: exception?
if (!reader.Read ())
return;
rowValue.Add (dataColumnName, reader.Value);
}
}
DataRow row = table.NewRow ();
IDictionaryEnumerator enumerator = rowValue.GetEnumerator ();
while (enumerator.MoveNext ()) {
row [enumerator.Key.ToString ()] = enumerator.Value.ToString ();
}
table.Rows.Add (row);
if (addTable)
DSet.Tables.Add (table);
}
}
}
// Read Xmldocument. XmlReadMode.ReadSchema and XmlReadMode.IgnoreSchema
[MonoTODO]
private void ReadModeSchema (XmlReader reader, bool IgnoreSchema)
{
/*\
* Reads any inline schema, but an exception is thrown
* if any tables in the inline schema already exist in the DataSet.
\*/
reader.MoveToContent ();
while (reader.Read ()) {
// FIXME: possible inline-schema should be readed here
if (String.Compare (reader.LocalName, "schema", true) == 0 && reader.NodeType == XmlNodeType.Element) {
if (!IgnoreSchema)
DSet.ReadXmlSchema (reader);
}
// find table
if (reader.NodeType == XmlNodeType.Element && DSet.Tables.Contains (reader.LocalName)) {
DataTable table = DSet.Tables [reader.LocalName];
DataRow row = table.NewRow ();
ReadColumns (reader, row, table, reader.LocalName);
table.Rows.Add (row);
}
}
}
#endregion // reading
#region Private helper methods
private void ReadColumns (XmlReader reader, DataRow row, DataTable table, string TableName)
{
do {
if (reader.NodeType == XmlNodeType.Element &&
table.Columns.Contains (reader.LocalName)) {
string columName = reader.LocalName;
reader.Read ();
row [columName] = reader.Value;
}
else {
reader.Read ();
}
} while (table.TableName != reader.LocalName
|| reader.NodeType != XmlNodeType.EndElement);
}
#endregion // Private helper methods
}
}
@@ -0,0 +1,246 @@
//
// mcs/class/System.Data/System.Data/XmlDiffLoader.cs
//
// Purpose: Loads XmlDiffGrams to DataSet
//
// class: XmlDiffLoader
// assembly: System.Data.dll
// namespace: System.Data
//
// Author:
// Ville Palo <[email protected]>
//
// (c)copyright 2003 Ville Palo
//
using System;
using System.Data;
using System.Xml;
using System.Xml.XPath;
using System.Collections;
using System.Globalization;
namespace System.Data {
internal class XmlDiffLoader
{
#region Fields
private DataSet DSet;
private Hashtable DiffGrRows = new Hashtable ();
private Hashtable ErrorRows = new Hashtable ();
#endregion // Fields
#region ctors
public XmlDiffLoader (DataSet DSet)
{
this.DSet = DSet;
}
#endregion //ctors
#region Public methods
public void Load (XmlReader Reader)
{
XmlTextReader TextReader = new XmlTextReader (Reader.BaseURI);
XmlDocument Document = new XmlDocument ();
Document.Load (TextReader);
TextReader.Close ();
XPathNavigator Navigator = Document.CreateNavigator ();
LoadBefore (Navigator);
LoadCurrent (Navigator);
LoadErrors (Navigator);
}
#endregion // Public methods
#region Private methods
private void LoadCurrent (XPathNavigator Navigator)
{
Navigator.MoveToRoot ();
if (Navigator.MoveToFirstChild ()) {
if (Navigator.Name == "diffgr:diffgram") {
if (Navigator.MoveToFirstChild ()) {
if (Navigator.MoveToFirstChild ()) {
if (DSet.Tables.Contains (Navigator.LocalName)) {
DataTable Table = DSet.Tables [Navigator.LocalName];
DataRow Row = null;
bool NewRow = false;
bool HasErrors = false;
string id = "";
if (Navigator.MoveToFirstAttribute ()) {
do {
// Find out was there same row in 'before' section
if (Navigator.LocalName == "id") {
id = Navigator.Value;
if (DiffGrRows.Contains (id))
Row = (DataRow)DiffGrRows [id];
}
else if (Navigator.LocalName == "hasErrors" && String.Compare (Navigator.Value, "true", true) == 0)
HasErrors = true;
} while (Navigator.MoveToNextAttribute ());
// back to business
Navigator.MoveToParent ();
}
if (Row == null) {
Row = Table.NewRow ();
NewRow = true;
}
LoadColumns (Table, Row, Navigator, NewRow);
if (HasErrors) // If row had errors add row to hashtable for later use
ErrorRows.Add (id, Row);
}
}
}
}
}
}
private void LoadBefore (XPathNavigator Navigator)
{
Navigator.MoveToRoot ();
if (!Navigator.MoveToFirstChild ())
return; // FIXME: exception
if (Navigator.Name != "diffgr:diffgram")
return; // FIXME: exception
if (Navigator.MoveToFirstChild ()) {
while (Navigator.Name != "diffgr:before") {
if (!Navigator.MoveToNext ()) // there is no before
return;
}
if (Navigator.MoveToFirstChild ()) {
do {
if (DSet.Tables.Contains (Navigator.LocalName)) {
String id = null;
DataTable Table = DSet.Tables [Navigator.LocalName];
DataRow Row = Table.NewRow ();
if (Navigator.MoveToFirstAttribute ()) {
do {
if (Navigator.Name == "diffgr:id")
id = Navigator.Value;
} while (Navigator.MoveToNextAttribute ());
Navigator.MoveToParent ();
}
LoadColumns (Table, Row, Navigator, true);
DiffGrRows.Add (id, Row); // for later use
Row.AcceptChanges ();
}
else {
throw new DataException (Locale.GetText ("Cannot load diffGram. Table '" + Navigator.LocalName + "' is missing in the destination dataset"));
}
} while (Navigator.MoveToNext ());
}
}
}
private void LoadErrors (XPathNavigator Navigator)
{
Navigator.MoveToRoot ();
if (!Navigator.MoveToFirstChild ())
return; // FIXME: exception
if (Navigator.Name != "diffgr:diffgram")
return; // FIXME: exception
if (Navigator.MoveToFirstChild ()) {
while (Navigator.Name != "diffgr:errors") {
if (!Navigator.MoveToNext ())
return;
}
if (Navigator.MoveToFirstChild ()) {
DataRow Row = null;
// find the row in 'current' section
if (Navigator.MoveToFirstAttribute ()) {
do {
if (Navigator.Name == "diffgr:id") {
if (ErrorRows.Contains (Navigator.Value))
Row = (DataRow)ErrorRows [Navigator.Value];
}
} while (Navigator.MoveToNextAttribute ());
Navigator.MoveToParent ();
}
if (Navigator.MoveToFirstChild ()) {
string Error = "";
do {
if (Navigator.MoveToFirstAttribute ()) {
do {
if (Navigator.Name == "diffgr:Error")
Error = Navigator.Value;
} while (Navigator.MoveToNextAttribute ());
Navigator.MoveToParent ();
}
Row.SetColumnError (Navigator.LocalName, Error);
} while (Navigator.MoveToNext ());
}
}
}
}
private void LoadColumns (DataTable Table, DataRow Row, XPathNavigator Navigator, bool NewRow)
{
if (Navigator.MoveToFirstChild ()) {
do {
if (Table.Columns.Contains (Navigator.LocalName))
Row [Navigator.LocalName] = Navigator.Value;
} while (Navigator.MoveToNext ());
if (NewRow)
Table.Rows.Add (Row);
}
}
#endregion // Private methods
}
}
@@ -0,0 +1,380 @@
//
// mcs/class/System.Data/System.Data/XmlSchemaMapper.cs
//
// Purpose: Maps XmlSchema to DataSet
//
// class: XmlSchemaMapper
// assembly: System.Data.dll
// namespace: System.Data
//
// Author:
// Ville Palo <[email protected]>
//
// (C) 2002 Ville Palo
//
using System;
using System.Data;
using System.Xml;
using System.Xml.Schema;
using System.Collections;
using System.Globalization;
namespace System.Data {
/*\
* There is so much TODO here that i dont bother to list them.
\*/
internal class XmlSchemaMapper
{
#region Fields
private DataSet DSet;
enum ElementType {ELEMENT_UNDEFINED, ELEMENT_TABLE, ELEMENT_COLUMN};
private Hashtable TypeCollection = new Hashtable ();
private Hashtable ElementCollection = new Hashtable ();
#endregion // Fields
#region Constructors
public XmlSchemaMapper (DataSet dataset)
{
DSet = dataset;
}
#endregion // Constructors
#region Public methods
public void Read (XmlReader Reader)
{
XmlSchema Schema = XmlSchema.Read (Reader, new ValidationEventHandler (OnXmlSchemaValidation));
// read items
foreach (XmlSchemaObject Item in Schema.Items) {
ReadXmlSchemaItem (Item);
}
}
#endregion // Public methods
#region Private methods
private void ReadXmlSchemaItem (XmlSchemaObject Item)
{
XmlSchemaObject SchemaObject;
if (Item is XmlSchemaType)
ReadXmlSchemaType ((XmlSchemaType)Item);
else if ((SchemaObject = Item as XmlSchemaElement) != null)
ReadXmlSchemaElement (SchemaObject as XmlSchemaElement, ElementType.ELEMENT_UNDEFINED);
}
private void ReadXmlSchemaSequence (XmlSchemaSequence Sequence)
{
ReadXmlSchemaSequence (Sequence, null);
}
private void ReadXmlSchemaSequence (XmlSchemaSequence Sequence, DataTable Table)
{
foreach (XmlSchemaObject TempObj in Sequence.Items) {
XmlSchemaObject SchemaObject;
if ((SchemaObject = TempObj as XmlSchemaElement) != null)
ReadXmlSchemaElement ((XmlSchemaElement)SchemaObject, ElementType.ELEMENT_COLUMN, Table);
}
}
private void ReadXmlSchemaChoice (XmlSchemaChoice Choice)
{
//MaxOccurs
XmlSchemaObject SchemaObject;
foreach (XmlSchemaObject TempObject in Choice.Items) {
if ((SchemaObject = TempObject as XmlSchemaElement) != null)
ReadXmlSchemaElement ((XmlSchemaElement)SchemaObject, ElementType.ELEMENT_TABLE);
}
}
private void ReadXmlSchemaElement (XmlSchemaElement Element)
{
ReadXmlSchemaElement (Element, ElementType.ELEMENT_UNDEFINED);
}
private void ReadXmlSchemaElement (XmlSchemaElement Element, ElementType ElType)
{
ReadXmlSchemaElement (Element, ElType, null);
}
private void ReadXmlSchemaElement (XmlSchemaElement Element, ElementType ElType, DataTable Table)
{
Hashtable Attributes = ReadUnhandledAttributes (Element.UnhandledAttributes);
DataTable Table2 = null;
if (Attributes.Contains ("IsDataSet")) { // DataSet -elemt
if (String.Compare (Attributes ["IsDataSet"].ToString (), "true", true) == 0)
DSet.DataSetName = Element.Name;
}
else if (Element.SchemaTypeName != null && Element.SchemaTypeName.Namespace != XmlConstants.SchemaNamespace
&& Element.SchemaTypeName.Name != String.Empty) {
//
// If type is not standard type
//
DataTable TempTable = new DataTable (Element.Name);
DSet.Tables.Add (TempTable);
// FIXME: if this element comes before types
if (TypeCollection.Contains (Element.SchemaTypeName.ToString ()))
ReadXmlSchemaType ((XmlSchemaType)TypeCollection [Element.SchemaTypeName.ToString ()], TempTable);
}
else if (Element.RefName != null && Element.RefName.Name != string.Empty) { // if there is a ref=
if (ElementCollection.Contains (Element.RefName.Name))
ReadXmlSchemaElement ((XmlSchemaElement)ElementCollection [Element.RefName.Name], ElementType.ELEMENT_TABLE);
}
else if (ElementType.ELEMENT_UNDEFINED != ElType) {
if (ElType == ElementType.ELEMENT_TABLE)
ReadTable (Element);
else if (ElType == ElementType.ELEMENT_COLUMN && Table != null)
ReadColumn (Element, Table);
}
else {
// this element is undefined, for now
ElementCollection.Add (Element.Name, Element);
}
// Read Element type
if (Element.SchemaType != null)
ReadXmlSchemaType (Element.SchemaType);
// Read possible constraints
if (Element.Constraints != null && Element.Constraints.Count > 0)
ReadXmlSchemaConstraints (Element.Constraints);
}
private void ReadTable (XmlSchemaElement Element)
{
DataTable TempTable = new DataTable (Element.Name);
DSet.Tables.Add (TempTable);
ReadXmlSchemaType (Element.SchemaType, TempTable);
}
private void ReadColumn (XmlSchemaElement Element, DataTable Table)
{
DataColumn Column = new DataColumn (Element.Name);
Table.Columns.Add (Column);
if (Element.UnhandledAttributes == null)
return;
foreach (XmlAttribute Attr in Element.UnhandledAttributes) {
switch (Attr.LocalName) {
case "Caption":
Column.Caption = Attr.Value;
break;
case "DataType":
Column.DataType = Type.GetType (Attr.Value);
break;
case "type":
// FIXME:
break;
default:
break;
}
}
//
// Handel rest of the parameters
//
// FIXME: Default columntype is string???
if (Column.DataType == null)
Column.DataType = Type.GetType ("System.String");
if (Element.DefaultValue != null)
Column.DefaultValue = Element.DefaultValue;
// If Element have type
if (Element.SchemaType != null)
ReadXmlSchemaType (Element.SchemaType, Column);
}
// Makes new Hashtable of the attributes.
private Hashtable ReadUnhandledAttributes (XmlAttribute [] Attributes)
{
Hashtable Result = new Hashtable ();
if (Attributes == null)
return Result;
foreach (XmlAttribute attribute in Attributes) {
Result.Add (attribute.LocalName, attribute.Value);
}
return Result;
}
private void ReadXmlSchemaConstraints (XmlSchemaObjectCollection Constraints)
{
foreach (XmlSchemaObject Constraint in Constraints) {
if (Constraint is XmlSchemaUnique)
ReadXmlSchemaUnique ((XmlSchemaUnique)Constraint);
}
}
[MonoTODO()]
private void ReadXmlSchemaUnique (XmlSchemaUnique Unique)
{
// FIXME: Parsing XPath
string TableName = Unique.Selector.XPath;
if (TableName.StartsWith (".//"))
TableName = TableName.Substring (3);
DataColumn [] Columns;
if (DSet.Tables.Contains (TableName)) {
DataTable Table = DSet.Tables [TableName];
Columns = new DataColumn [Unique.Fields.Count];
int i = 0;
foreach (XmlSchemaXPath Field in Unique.Fields) {
if (Table.Columns.Contains (Field.XPath)) {
Table.Columns [Field.XPath].Unique = true;
Columns [i] = Table.Columns [Field.XPath];
i++;
}
}
UniqueConstraint Constraint = new UniqueConstraint (Unique.Name, Columns);
}
}
#endregion // Private methods
#region Private listeners
private void OnXmlSchemaValidation (object sender, ValidationEventArgs args)
{
;
}
#endregion // Private listeners
#region Private TypeReaders
// Reads XmlSchemaType
private void ReadXmlSchemaType (XmlSchemaType SchemaType)
{
ReadXmlSchemaType (SchemaType, (DataTable)null);
}
// Reads XmlSchemaType and decides is it Complex or Simple and continue reading those types
private void ReadXmlSchemaType (XmlSchemaType SchemaType, DataTable Table)
{
if (SchemaType is XmlSchemaComplexType)
ReadXmlSchemaComplexType ((XmlSchemaComplexType)SchemaType, Table);
else if (SchemaType is XmlSchemaSimpleType)
ReadXmlSchemaSimpleType ((XmlSchemaSimpleType)SchemaType, Table);
}
// Same as above but with DataColumn
private void ReadXmlSchemaType (XmlSchemaType SchemaType, DataColumn Column)
{
if (SchemaType is XmlSchemaComplexType)
ReadXmlSchemaComplexType ((XmlSchemaComplexType)SchemaType, Column);
else if (SchemaType is XmlSchemaSimpleType)
ReadXmlSchemaSimpleType ((XmlSchemaSimpleType)SchemaType, Column);
}
#endregion // PrivateTypeReader
#region TypeReaderHelppers
private void ReadXmlSchemaSimpleType (XmlSchemaSimpleType SimpleType, DataColumn Column)
{
// Read Contents
if (SimpleType.Content is XmlSchemaSimpleTypeRestriction)
ReadXmlSchemaSimpleTypeRestriction ((XmlSchemaSimpleTypeRestriction)SimpleType.Content, Column);
}
[MonoTODO]
private void ReadXmlSchemaSimpleType (XmlSchemaSimpleType SimpleType, DataTable Table)
{
// TODO: Is it possible that Table-element have simpletype???
}
[MonoTODO]
private void ReadXmlSchemaSimpleTypeRestriction (XmlSchemaSimpleTypeRestriction Restriction, DataColumn Column)
{
foreach (XmlSchemaObject Facet in Restriction.Facets) {
// FIXME: I dont know are everyone of these needed but, let them be here for now
if (Facet is XmlSchemaMaxLengthFacet)
Column.MaxLength = Int32.Parse(((XmlSchemaFacet)Facet).Value);
//else if (Facet is XmlSchemaMinLengthFacet)
// ;
//else if (Facet is XmlSchemaLengthFacet)
// ;
//else if (Facet is XmlSchemaPatternFacet)
// ;
//else if (Facet is XmlSchemaEnumerationFacet)
// ;
//else if (Facet is XmlSchemaMaxInclusiveFacet)
// ;
//else if (Facet is XmlSchemaMaxExclusiveFacet)
// ;
//else if (Facet is XmlSchemaMinInclusiveFacet)
// ;
//else if (Facet is XmlSchemaMinExclusiveFacet)
// ;
//else if (Facet is XmlSchemaFractionDigitsFacet)
// ;
//else if (Facet is XmlSchemaTotalDigitsFacet)
// ;
//else if (Facet is XmlSchemaWhiteSpaceFacet)
// ;
}
}
[MonoTODO]
private void ReadXmlSchemaComplexType (XmlSchemaComplexType Type, DataColumn Column)
{
// TODO: is it possible that column-element have complextype
}
// Reads XmlSchemaComplexType with DataTable
private void ReadXmlSchemaComplexType (XmlSchemaComplexType Type, DataTable Table)
{
XmlSchemaComplexType ComplexType = Type as XmlSchemaComplexType;
if (ComplexType.Name != null && !TypeCollection.Contains (ComplexType.Name)) {
TypeCollection.Add (ComplexType.Name, ComplexType);
}
else {
XmlSchemaParticle Particle;
if ((Particle = ComplexType.Particle as XmlSchemaChoice) != null) {
ReadXmlSchemaChoice (Particle as XmlSchemaChoice);
}
else if ((Particle = ComplexType.Particle as XmlSchemaSequence) != null) {
ReadXmlSchemaSequence (Particle as XmlSchemaSequence, Table);
}
}
}
#endregion // TypeReaderHelppers
}
}
@@ -23,6 +23,7 @@ using System.IO;
using System.Text;
using System.Xml.XPath;
using System.Collections;
using System.Globalization;
namespace System.Xml {
@@ -36,21 +37,31 @@ namespace System.Xml {
private int dataRowID = 1;
private ArrayList dataRowIDList = new ArrayList ();
// this is needed for inserting new row to datatable via xml
private Hashtable TempTable = new Hashtable ();
#endregion // Fields
#region Constructors
public XmlDataDocument() {
dataSet = new DataSet();
this.NodeChanged += new XmlNodeChangedEventHandler (OnXmlDataColumnChanged);
this.NodeChanged += new XmlNodeChangedEventHandler (OnNodeChanged);
//this.NodeChanging += new XmlNodeChangedEventHandler (OnXmlDataColumnChanged);
//this.NodeInserted += new XmlNodeChangedEventHandler (OnXmlDataColumnChanged);
//this.NodeRemoved += new XmlNodeChangedEventHandler (OnXmlDataColumnChanged);
this.NodeInserting += new XmlNodeChangedEventHandler (OnNodeInserting);
this.NodeRemoved += new XmlNodeChangedEventHandler (OnNodeRemoved);
this.NodeInserted += new XmlNodeChangedEventHandler (OnNodeInserted);
}
public XmlDataDocument(DataSet dataset) {
this.dataSet = dataset;
this.NodeChanged += new XmlNodeChangedEventHandler (OnXmlDataColumnChanged);
this.NodeChanged += new XmlNodeChangedEventHandler (OnNodeChanged);
//this.NodeChanging += new XmlNodeChangedEventHandler (OnXmlDataColumnChanged);
this.NodeInserting += new XmlNodeChangedEventHandler (OnNodeInserting);
this.NodeRemoved += new XmlNodeChangedEventHandler (OnNodeRemoved);
this.NodeInserted += new XmlNodeChangedEventHandler (OnNodeInserted);
}
#endregion // Constructors
@@ -119,7 +130,7 @@ namespace System.Xml {
public override string Name {
[MonoTODO]
get {
throw new NotImplementedException();
return base.Name;
}
}
@@ -142,7 +153,7 @@ namespace System.Xml {
#region overloaded CreateElement methods
[MonoTODO]
[MonoTODO ("why this is override?")]
public override XmlElement CreateElement(string prefix,
string localName, string namespaceURI)
{
@@ -151,7 +162,6 @@ namespace System.Xml {
"or an empty string.");
string pref = prefix != null ? prefix : String.Empty;
return base.CreateElement (pref, localName, namespaceURI != null ? namespaceURI : String.Empty);
}
#endregion // overloaded CreateElement Methods
@@ -169,16 +179,72 @@ namespace System.Xml {
}
// get the XmlElement associated with the DataRow
[MonoTODO ("Exceptions")]
public XmlElement GetElementFromRow(DataRow r)
{
throw new NotImplementedException();
if (r.XmlRowID == 0) // datarow was not in xmldatadocument
throw new Exception ();
int elementRow = dataRowIDList.IndexOf (r.XmlRowID);
return (XmlElement)GetElementsByTagName (r.Table.TableName) [elementRow];
}
// get the DataRow associated with the XmlElement
[MonoTODO]
[MonoTODO ("Exceptions")]
public DataRow GetRowFromElement(XmlElement e)
{
throw new NotImplementedException();
XmlElement node = e;
if (node == null)
return null;
XPathNavigator nodeNavigator = node.CreateNavigator ();
int c = GetElementsByTagName (node.Name).Count;
if (c == 0)
return null;
// FIXME: I dont know which way it should be but this work on linux.
// could be also GetElementsByTagName (args.OldParent.Name) []
XmlNodeList nodeList = GetElementsByTagName (node.Name);
int i = 0;
bool isSame = false;
while (i < c && !isSame) {
XPathNavigator docNavigator = nodeList [i].CreateNavigator ();
isSame = docNavigator.IsSamePosition (nodeNavigator);
docNavigator = nodeList [i].CreateNavigator ();
if (!isSame)
i++;
}
if (!isSame)
return null;
if (i >= dataRowIDList.Count)
return null;
// now we know rownum
int xmlrowid = (int)dataRowIDList [i];
if (xmlrowid <= 0)
return null;
DataTable dt = DataSet.Tables [node.Name];
DataRow row = null;
if (dt == null)
return null;
foreach (DataRow r in dt.Rows) {
if (xmlrowid == r.XmlRowID) {
row = r;
}
}
return row;
}
#region overload Load methods
@@ -196,7 +262,10 @@ namespace System.Xml {
}
public override void Load(XmlReader reader) {
// dont listen these events
RemoveXmlDocumentListeners ();
DataTable dt = null;
// For reading xml to XmlDocument
@@ -207,18 +276,18 @@ namespace System.Xml {
reader.MoveToContent ();
// TODO: Findout which exception should be throwen
if (reader.NodeType != XmlNodeType.Element)
if (reader.NodeType != XmlNodeType.Element) {
throw new Exception ();
}
if (dataSet.DataSetName != reader.Name)
if (dataSet.DataSetName != reader.Name) {
throw new Exception ();
}
// read to next element
while (reader.Read () && reader.NodeType != XmlNodeType.Element);
do {
// Find right table from tablecollection
for (int i = 0; i < DataSet.Tables.Count && dt == null; i++) {
@@ -261,6 +330,8 @@ namespace System.Xml {
} while (reader.Read ());
base.Load (textReader);
AddXmlDocumentListeners ();
}
#endregion // overloaded Load methods
@@ -293,76 +364,149 @@ namespace System.Xml {
#endregion // Protected Methods
#region DataSet event handlers
// this changed datatable values when some of xmldocument elements is changed
private void OnXmlDataColumnChanged (object sender, XmlNodeChangedEventArgs args)
// Invoked when XmlNode is changed colum is changed
[MonoTODO]
private void OnNodeChanged (object sender, XmlNodeChangedEventArgs args)
{
int i = 0;
XPathNavigator nodeNavigator = args.Node.CreateNavigator ();
int c = GetElementsByTagName (args.Node.Name).Count;
// FIXME: I dont know which way it should be but this work on linux.
// could be also GetElementsByTagName (args.OldParent.Name) []
XmlNodeList nodeList = GetElementsByTagName (args.Node.Name);
if (args.Node == null)
return;
DataRow row = GetRowFromElement ((XmlElement)args.Node);
bool isSame = false;
if (row == null)
return;
// Find right row
while ((i < c) && !isSame ) {
if (row [args.Node.Name].ToString () != args.Node.InnerText)
row [args.Node.Name] = args.Node.InnerText;
}
XPathNavigator docNavigator = nodeList [i].CreateNavigator ();
isSame = docNavigator.IsSamePosition (nodeNavigator);
docNavigator = nodeList [i].CreateNavigator ();
i++;
}
// if there wasnt such row it is just added and we dont need to care about it
if (!isSame)
// Invoked when XmlNode is removed
[MonoTODO]
private void OnNodeRemoved (object sender, XmlNodeChangedEventArgs args)
{
if (args.OldParent == null)
return;
// now we know rownum
int xmlrowid = (int)dataRowIDList [i];
DataTable dt = DataSet.Tables [args.OldParent.Name];
foreach (DataRow r in dt.Rows) {
if (xmlrowid == r.XmlRowID) {
// change value only when have to.
if ((string)r [args.Node.Name] != (string)args.Node.InnerText)
r [args.Node.Name] = args.Node.InnerText;
DataRow row = GetRowFromElement ((XmlElement)args.OldParent);
if (row == null) {
return ;
}
// Dont trig event again
row.Table.ColumnChanged -= new DataColumnChangeEventHandler (OnDataTableColumnChanged);
row [args.Node.Name] = null;
// if all columns are "nulled" we can remove the row.
// FIXME: This is rather slow, try to find faster way
bool allNulls = true;
foreach (DataColumn dc in row.Table.Columns) {
if (row [dc.ColumnName] != DBNull.Value) {
allNulls = false;
break;
}
}
if (allNulls) {
dataRowIDList.Remove (row.XmlRowID);
row.Delete ();
}
row.Table.ColumnChanged += new DataColumnChangeEventHandler (OnDataTableColumnChanged);
}
private void OnNodeInserting (object sender, XmlNodeChangedEventArgs args) {
if (DataSet.EnforceConstraints)
throw new InvalidOperationException (Locale.GetText ("Please set DataSet.EnforceConstraints == false " +
"before trying to edit XmlDataDocument using " +
"XML operations."));
}
private void OnNodeInserted (object sender, XmlNodeChangedEventArgs args)
{
// this is table element
if (DataSet.Tables.Contains (args.NewParent.Name)) {
Hashtable ht = null;
if (TempTable.ContainsKey (args.NewParent.Name)) {
// if TempTable contains table name, get it and remove it from hashtable
// so we can later add it :)
ht = TempTable [args.NewParent.Name] as Hashtable;
TempTable.Remove (args.NewParent.Name);
}
}
else
ht = new Hashtable ();
ht.Add (args.Node.Name, args.Node.InnerText);
TempTable.Add (args.NewParent.Name, ht);
}
else if (DataSet.Tables.Contains (args.Node.Name)) {
// if nodes name is same as some table in the list is is time to
// add row to datatable
DataTable dt = DataSet.Tables [args.Node.Name];
DataRow row = dt.NewRow ();
Hashtable ht = TempTable [args.Node.Name] as Hashtable;
IDictionaryEnumerator enumerator = ht.GetEnumerator ();
while (enumerator.MoveNext ()) {
row [enumerator.Key.ToString ()] = enumerator.Value.ToString ();
}
dt.RowChanged -= new DataRowChangeEventHandler (OnDataTableRowChanged);
DataSet.Tables [args.Node.Name].Rows.Add (row);
dt.RowChanged += new DataRowChangeEventHandler (OnDataTableRowChanged);
}
}
[MonoTODO]
private void OnDataTableColumnChanged(object sender,
DataColumnChangeEventArgs eventArgs)
{
RemoveXmlDocumentListeners ();
// row is not yet in datatable
if (eventArgs.Row.XmlRowID == 0)
return;
// TODO: Here should be some kind of error checking.
GetElementsByTagName (eventArgs.Column.ToString ()) [dataRowIDList.IndexOf (
eventArgs.Row.XmlRowID)].InnerText = (string)eventArgs.ProposedValue;
eventArgs.Row.XmlRowID)].InnerText = eventArgs.ProposedValue.ToString ();
AddXmlDocumentListeners ();
}
[MonoTODO]
private void OnDataTableRowDeleted(object sender,
DataRowChangeEventArgs eventArgs)
{
DataRow deletedRow = null;
deletedRow = eventArgs.Row;
if (eventArgs.Row.XmlRowID == 0)
return;
int rowIndex = dataRowIDList.IndexOf (eventArgs.Row.XmlRowID);
if (rowIndex == -1 || eventArgs.Row.XmlRowID == 0 ||
rowIndex > GetElementsByTagName (deletedRow.Table.TableName).Count - 1)
return;
// Remove element from xmldocument and row indexlist
GetElementsByTagName (deletedRow.Table.TableName) [rowIndex].RemoveAll ();
dataRowIDList.RemoveAt (rowIndex);
// FIXME: this is one way to do this, but i hope someday i find out much better way.
XmlNode p = GetElementsByTagName (deletedRow.Table.TableName) [rowIndex].ParentNode;
if (p != null) {
p.RemoveChild (GetElementsByTagName (deletedRow.Table.TableName) [rowIndex]);
dataRowIDList.RemoveAt (rowIndex);
}
}
[MonoTODO]
@@ -390,6 +534,8 @@ namespace System.Xml {
[MonoTODO]
private void OnDataTableRowAdded (DataRowChangeEventArgs args)
{
RemoveXmlDocumentListeners ();
// If XmlRowID is != 0 then it is already added
if (args.Row.XmlRowID != 0)
return;
@@ -401,34 +547,44 @@ namespace System.Xml {
XmlElement element = CreateElement (args.Row.Table.TableName);
DocumentElement.AppendChild (element);
XmlElement rowElement = null;
for (int i = 0; i < row.Table.Columns.Count; i++) {
XmlElement rowElement = null;
for (int i = 0; i < row.Table.Columns.Count; i++) {
rowElement = CreateElement (row.Table.Columns [i].ToString ());
rowElement.InnerText = (string)row [i];
element.AppendChild (rowElement);
}
AddXmlDocumentListeners ();
}
// Rollback
[MonoTODO]
private void OnDataTableRowRollback (DataRowChangeEventArgs args)
{
DataRow row = args.Row;
int rowid = dataRowIDList.IndexOf (row.XmlRowID);
// find right element in xmldocument
XmlNode node = GetElementsByTagName (row.Table.TableName) [rowid];
RemoveXmlDocumentListeners ();
DataRow row = args.Row;
int rowid = dataRowIDList.IndexOf (row.XmlRowID);
// find right element in xmldocument
if (rowid == 0 || rowid >= GetElementsByTagName (row.Table.TableName).Count)
return;
XmlNode node = GetElementsByTagName (row.Table.TableName) [rowid];
int rowValue = 0;
for (int i = 0; i < node.ChildNodes.Count; i++) {
XmlNode child = node.ChildNodes [i];
if (child.NodeType != XmlNodeType.Whitespace)
child.InnerText = (string)row [rowValue++];
XmlNode child = node.ChildNodes [i];
if (child.NodeType != XmlNodeType.Whitespace) {
child.InnerText = (string)row [rowValue++];
}
}
AddXmlDocumentListeners ();
}
#endregion // DataSet event handlers
@@ -457,6 +613,17 @@ namespace System.Xml {
}
}
private void RemoveXmlDocumentListeners ()
{
this.NodeInserting -= new XmlNodeChangedEventHandler (OnNodeInserting);
this.NodeInserted -= new XmlNodeChangedEventHandler (OnNodeInserted);
}
private void AddXmlDocumentListeners ()
{
this.NodeInserting += new XmlNodeChangedEventHandler (OnNodeInserting);
this.NodeInserted += new XmlNodeChangedEventHandler (OnNodeInserted);
}
#endregion // Private methods
}
}
+13
View File
@@ -1,3 +1,16 @@
2002-12-16 Ville Palo <[email protected]>
* System.Xml/XmlDataDocumentTest.cs: some fixes.
2002-12-14 Ville Palo <[email protected]>
* System.Xml/XmlDataDocumentTest.cs: Added three new tests
2002-12-10 Ville Palo <[email protected]>
* System.Xml/XmlDataDocumentTest.cs: Added new tests
* System.Xml/region.xml: Changed XmlDocument.
2002-11-24 Ville Palo <[email protected]>
* System.Xml/XmlDataDocumentTest.cs: Added new test suite for
@@ -0,0 +1,3 @@
2002/11/08 Nick Drochak <[email protected]>
* SqlSingleTest.cs : Remove debug statement that was breaking the build
@@ -30,6 +30,7 @@ namespace MonoTests.System.Data
suite.AddTest (new TestSuite (typeof (DataRowCollectionTest)));
suite.AddTest (new TestSuite (typeof (DataRowTest)));
suite.AddTest (new TestSuite (typeof (DataColumnCollectionTest)));
suite.AddTest (new TestSuite (typeof (DataSetTest)));
return suite;
}
}
@@ -1,3 +1,15 @@
2002-12-26 Ville Palo <[email protected]>
* own_schema.xsd: XmlSchema for testing ReadXmlSchema() -method
* DataSetTest.cs: Added more Xml-tests.
2002-12-17 Ville Palo <[email protected]>
* region.xml:
* store.xsd: new xmldoment and xmlschema for testing DataSet
* DataSetTest.cs: Added some Xml-tests.
* AllTests.cs: Added DataSetTest
2002-10-23 Nick Drochak <[email protected]>
* ConstraintCollectionTest.cs (SetUp): Clear the constraints before
@@ -9,4 +21,4 @@
2002-10-22 Nick Drochak <[email protected]>
* DataColumnTest.cs: Remove compiler warnings and use caught exception
to report useful info.
to report useful info.
@@ -0,0 +1,832 @@
// MonoTests.System.Data.DataSetTest.cs
//
// Author:
// Ville Palo <[email protected]>
//
// (C) Copyright 2002 Ville Palo
//
using NUnit.Framework;
using System;
using System.Xml;
using System.IO;
using System.Data;
using System.Data.SqlTypes;
using System.Globalization;
using System.Threading;
namespace MonoTests.System.Data
{
public class DataSetTest : TestCase
{
public DataSetTest() : base ("MonoTests.System.Data.DataSetTest") {}
public DataSetTest(string name) : base(name) {}
protected override void SetUp()
{
Thread.CurrentThread.CurrentCulture = new CultureInfo ("fi-FI");
}
protected override void TearDown() {}
public static ITest Suite
{
get
{
return new TestSuite(typeof(DataSetTest));
}
}
public void TestReadXmlSchema ()
{
DataSet ds = new DataSet ();
ds.ReadXmlSchema ("System.Data/own_schema.xsd");
AssertEquals ("test#01", 2, ds.Tables.Count);
DataTable Table = ds.Tables [0];
AssertEquals ("test#02", "test_table", Table.TableName);
AssertEquals ("test#03", "", Table.Namespace);
AssertEquals ("test#04", 2, Table.Columns.Count);
AssertEquals ("test#05", 0, Table.Rows.Count);
AssertEquals ("test#06", false, Table.CaseSensitive);
AssertEquals ("test#07", 1, Table.Constraints.Count);
AssertEquals ("test#08", "", Table.Prefix);
Constraint cons = Table.Constraints [0];
AssertEquals ("test#09", "Constraint1", cons.ConstraintName.ToString ());
AssertEquals ("test#10", "Constraint1", cons.ToString ());
DataColumn column = Table.Columns [0];
AssertEquals ("test#11", true, column.AllowDBNull);
AssertEquals ("test#12", false, column.AutoIncrement);
AssertEquals ("test#13", 0L, column.AutoIncrementSeed);
AssertEquals ("test#14", 1L, column.AutoIncrementStep);
AssertEquals ("test#15", "test", column.Caption);
AssertEquals ("test#16", "Element", column.ColumnMapping.ToString ());
AssertEquals ("test#17", "first", column.ColumnName);
AssertEquals ("test#18", "System.String", column.DataType.ToString ());
AssertEquals ("test#19", "test_default_value", column.DefaultValue.ToString ());
AssertEquals ("test#20", false, column.DesignMode);
AssertEquals ("test#21", "", column.Expression);
AssertEquals ("test#22", 100, column.MaxLength);
AssertEquals ("test#23", "", column.Namespace);
AssertEquals ("test#24", 0, column.Ordinal);
AssertEquals ("test#25", "", column.Prefix);
AssertEquals ("test#26", false, column.ReadOnly);
AssertEquals ("test#27", true, column.Unique);
DataColumn column2 = Table.Columns [1];
AssertEquals ("test#28", true, column2.AllowDBNull);
AssertEquals ("test#29", false, column2.AutoIncrement);
AssertEquals ("test#30", 0L, column2.AutoIncrementSeed);
AssertEquals ("test#31", 1L, column2.AutoIncrementStep);
AssertEquals ("test#32", "second", column2.Caption);
AssertEquals ("test#33", "Element", column2.ColumnMapping.ToString ());
AssertEquals ("test#34", "second", column2.ColumnName);
AssertEquals ("test#35", "System.Data.SqlTypes.SqlGuid", column2.DataType.ToString ());
AssertEquals ("test#36", "", column2.DefaultValue.ToString ());
AssertEquals ("test#37", false, column2.DesignMode);
AssertEquals ("test#38", "", column2.Expression);
AssertEquals ("test#39", -1, column2.MaxLength);
AssertEquals ("test#40", "", column2.Namespace);
AssertEquals ("test#41", 1, column2.Ordinal);
AssertEquals ("test#42", "", column2.Prefix);
AssertEquals ("test#43", false, column2.ReadOnly);
AssertEquals ("test#44", false, column2.Unique);
DataTable Table2 = ds.Tables [1];
AssertEquals ("test#45", "second_test_table", Table2.TableName);
AssertEquals ("test#46", "", Table2.Namespace);
AssertEquals ("test#47", 1, Table2.Columns.Count);
AssertEquals ("test#48", 0, Table2.Rows.Count);
AssertEquals ("test#49", false, Table2.CaseSensitive);
AssertEquals ("test#50", 1, Table2.Constraints.Count);
AssertEquals ("test#51", "", Table2.Prefix);
DataColumn column3 = Table2.Columns [0];
AssertEquals ("test#52", true, column3.AllowDBNull);
AssertEquals ("test#53", false, column3.AutoIncrement);
AssertEquals ("test#54", 0L, column3.AutoIncrementSeed);
AssertEquals ("test#55", 1L, column3.AutoIncrementStep);
AssertEquals ("test#56", "second_first", column3.Caption);
AssertEquals ("test#57", "Element", column3.ColumnMapping.ToString ());
AssertEquals ("test#58", "second_first", column3.ColumnName);
AssertEquals ("test#59", "System.String", column3.DataType.ToString ());
AssertEquals ("test#60", "default_value", column3.DefaultValue.ToString ());
AssertEquals ("test#61", false, column3.DesignMode);
AssertEquals ("test#62", "", column3.Expression);
AssertEquals ("test#63", 100, column3.MaxLength);
AssertEquals ("test#64", "", column3.Namespace);
AssertEquals ("test#65", 0, column3.Ordinal);
AssertEquals ("test#66", "", column3.Prefix);
AssertEquals ("test#67", false, column3.ReadOnly);
AssertEquals ("test#68", true, column3.Unique);
}
public void TestOwnWriteXmlSchema ()
{
DataSet ds = new DataSet ("test_dataset");
DataTable table = new DataTable ("test_table");
DataColumn column = new DataColumn ("first", typeof (string));
column.AllowDBNull = true;
column.DefaultValue = "test_default_value";
column.MaxLength = 100;
column.Caption = "test";
column.Unique = true;
table.Columns.Add (column);
DataColumn column2 = new DataColumn ("second", typeof (SqlGuid));
column2.ColumnMapping = MappingType.Element;
table.Columns.Add (column2);
ds.Tables.Add (table);
DataTable table2 = new DataTable ("second_test_table");
DataColumn column3 = new DataColumn ("second_first", typeof (string));
column3.AllowDBNull = true;
column3.DefaultValue = "default_value";
column3.MaxLength = 100;
column3.Unique = true;
table2.Columns.Add (column3);
ds.Tables.Add (table2);
TextWriter writer = new StringWriter ();
ds.WriteXmlSchema (writer);
string TextString = writer.ToString ();
string substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#01", "<?xml version=\"1.0\" encoding=\"utf-16\"?>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#02", "<xs:schema id=\"test_dataset\" xmlns=\"\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#03", " <xs:element name=\"test_dataset\" msdata:IsDataSet=\"true\" msdata:Locale=\"fi-FI\">", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#04", " <xs:complexType>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#05", " <xs:choice maxOccurs=\"unbounded\">", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#06", " <xs:element name=\"test_table\">", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#07", " <xs:complexType>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#08", " <xs:sequence>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#09", " <xs:element name=\"first\" msdata:Caption=\"test\" default=\"test_default_value\" minOccurs=\"0\">", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#10", " <xs:simpleType>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#11", " <xs:restriction base=\"xs:string\">", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#12", " <xs:maxLength value=\"100\" />", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#13", " </xs:restriction>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#14", " </xs:simpleType>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#15", " </xs:element>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#16", " <xs:element name=\"second\" msdata:DataType=\"System.Data.SqlTypes.SqlGuid, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" type=\"xs:string\" minOccurs=\"0\" />", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#17", " </xs:sequence>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#18", " </xs:complexType>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#19", " </xs:element>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#20", " <xs:element name=\"second_test_table\">", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#21", " <xs:complexType>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#22", " <xs:sequence>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#23", " <xs:element name=\"second_first\" default=\"default_value\" minOccurs=\"0\">", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#24", " <xs:simpleType>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#25", " <xs:restriction base=\"xs:string\">", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#26", " <xs:maxLength value=\"100\" />", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#27", " </xs:restriction>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#28", " </xs:simpleType>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#29", " </xs:element>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#30", " </xs:sequence>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#31", " </xs:complexType>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#32", " </xs:element>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#33", " </xs:choice>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#34", " </xs:complexType>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#36", " <xs:unique name=\"Constraint1\">", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#37", " <xs:selector xpath=\".//test_table\" />", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#38", " <xs:field xpath=\"first\" />", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#39", " </xs:unique>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#40", " <xs:unique name=\"second_test_table_Constraint1\" msdata:ConstraintName=\"Constraint1\">", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#41", " <xs:selector xpath=\".//second_test_table\" />", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#42", " <xs:field xpath=\"second_first\" />", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#43", " </xs:unique>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#44", " </xs:element>", substring);
AssertEquals ("test#45", "</xs:schema>", TextString);
}
public void TestReadWriteXml ()
{
DataSet ds = new DataSet ();
ds.ReadXml ("System.Data/region.xml");
TextWriter writer = new StringWriter ();
ds.WriteXml (writer);
string TextString = writer.ToString ();
string substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#01", "<Root>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#02", " <Region>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#03", " <RegionID>1</RegionID>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#04", " <RegionDescription>Eastern", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#05", " </RegionDescription>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#06", " </Region>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#07", " <Region>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#08", " <RegionID>2</RegionID>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#09", " <RegionDescription>Western", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#10", " </RegionDescription>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#11", " </Region>", substring);
AssertEquals ("test#11", "</Root>", TextString);
}
public void TestReadWriteXmlDiffGram ()
{
DataSet ds = new DataSet ();
ds.ReadXml ("System.Data/region.xml", XmlReadMode.DiffGram);
TextWriter writer = new StringWriter ();
ds.WriteXml (writer);
string TextString = writer.ToString ();
AssertEquals ("test#01", "<NewDataSet />", TextString);
ds.WriteXml (writer, XmlWriteMode.DiffGram);
TextString = writer.ToString ();
AssertEquals ("test#02", "<NewDataSet /><diffgr:diffgram xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\" xmlns:diffgr=\"urn:schemas-microsoft-com:xml-diffgram-v1\" />", TextString);
ds = new DataSet ();
ds.ReadXml ("System.Data/region.xml");
DataTable table = ds.Tables ["Region"];
table.Rows [0] [0] = "64";
ds.ReadXml ("System.Data/region.xml", XmlReadMode.DiffGram);
ds.WriteXml (writer, XmlWriteMode.DiffGram);
TextString = writer.ToString ();
string substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#03", "<NewDataSet /><diffgr:diffgram xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\" xmlns:diffgr=\"urn:schemas-microsoft-com:xml-diffgram-v1\" /><diffgr:diffgram xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\" xmlns:diffgr=\"urn:schemas-microsoft-com:xml-diffgram-v1\">",substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#04", " <Root>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#05", " <Region diffgr:id=\"Region1\" msdata:rowOrder=\"0\" diffgr:hasChanges=\"inserted\">", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#06", " <RegionID>64</RegionID>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#07", " <RegionDescription>Eastern", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#07", " </RegionDescription>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#08", " </Region>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#09", " <Region diffgr:id=\"Region2\" msdata:rowOrder=\"1\" diffgr:hasChanges=\"inserted\">", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#10", " <RegionID>2</RegionID>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#11", " <RegionDescription>Western", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#12", " </RegionDescription>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#13", " </Region>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#14", " </Root>", substring);
AssertEquals ("test#15", "</diffgr:diffgram>", TextString);
}
public void TestWriteXmlSchema ()
{
DataSet ds = new DataSet ();
ds.ReadXml ("System.Data/region.xml");
TextWriter writer = new StringWriter ();
ds.WriteXmlSchema (writer);
string TextString = writer.ToString ();
string substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#01", "<?xml version=\"1.0\" encoding=\"utf-16\"?>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#02", "<xs:schema id=\"Root\" xmlns=\"\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#03", " <xs:element name=\"Root\" msdata:IsDataSet=\"true\" msdata:Locale=\"fi-FI\">", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#04", " <xs:complexType>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#05", " <xs:choice maxOccurs=\"unbounded\">", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#06", " <xs:element name=\"Region\">", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#07", " <xs:complexType>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#08", " <xs:sequence>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#09", " <xs:element name=\"RegionID\" type=\"xs:string\" minOccurs=\"0\" />", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#10", " <xs:element name=\"RegionDescription\" type=\"xs:string\" minOccurs=\"0\" />", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#11", " </xs:sequence>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#12", " </xs:complexType>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#13", " </xs:element>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#14", " </xs:choice>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#15", " </xs:complexType>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#16", " </xs:element>", substring);
AssertEquals ("test#17", "</xs:schema>", TextString);
}
public void TestReadWriteXmlSchemaIgnoreSchema ()
{
DataSet ds = new DataSet ();
ds.ReadXmlSchema ("System.Data/store.xsd");
ds.ReadXml ("System.Data/region.xml", XmlReadMode.IgnoreSchema);
TextWriter writer = new StringWriter ();
ds.WriteXmlSchema (writer);
string TextString = writer.ToString ();
string substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#01", "<?xml version=\"1.0\" encoding=\"utf-16\"?>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#02", "<xs:schema id=\"NewDataSet\" xmlns=\"\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#03", " <xs:complexType name=\"bookstoreType\">", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#04", " <xs:sequence>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#05", " <xs:element name=\"book\" type=\"bookType\" minOccurs=\"0\" maxOccurs=\"unbounded\" />", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#06", " </xs:sequence>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#07", " </xs:complexType>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#08", " <xs:complexType name=\"bookType\">", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#09", " <xs:sequence>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#10", " <xs:element name=\"title\" type=\"xs:string\" msdata:Ordinal=\"1\" />", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#11", " <xs:element name=\"price\" type=\"xs:decimal\" msdata:Ordinal=\"2\" />", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#12", " <xs:element name=\"author\" type=\"authorName\" minOccurs=\"0\" maxOccurs=\"unbounded\" />", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#13", " </xs:sequence>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#14", " <xs:attribute name=\"genre\" type=\"xs:string\" />", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#15", " </xs:complexType>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#16", " <xs:complexType name=\"authorName\">", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#17", " <xs:sequence>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#18", " <xs:element name=\"first-name\" type=\"xs:string\" />", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#19", " <xs:element name=\"last-name\" type=\"xs:string\" />", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#20", " </xs:sequence>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#21", " </xs:complexType>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#22", " <xs:element name=\"bookstore\" type=\"bookstoreType\" />", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#23", " <xs:element name=\"NewDataSet\" msdata:IsDataSet=\"true\" msdata:Locale=\"fi-FI\">", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#24", " <xs:complexType>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#25", " <xs:choice maxOccurs=\"unbounded\">", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#26", " <xs:element ref=\"bookstore\" />", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#27", " </xs:choice>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#28", " </xs:complexType>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#29", " </xs:element>", substring);
AssertEquals ("test#30", "</xs:schema>", TextString);
}
public void TestReadWriteXmlSchema ()
{
DataSet ds = new DataSet ();
ds.ReadXmlSchema ("System.Data/store.xsd");
ds.ReadXml ("System.Data/region.xml", XmlReadMode.InferSchema);
TextWriter writer = new StringWriter ();
ds.WriteXmlSchema (writer);
string TextString = writer.ToString ();
string substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#01", "<?xml version=\"1.0\" encoding=\"utf-16\"?>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#02", "<xs:schema id=\"Root\" xmlns=\"\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#03", " <xs:complexType name=\"bookstoreType\">", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#04", " <xs:sequence>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#05", " <xs:element name=\"book\" type=\"bookType\" minOccurs=\"0\" maxOccurs=\"unbounded\" />", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#06", " </xs:sequence>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#07", " </xs:complexType>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#08", " <xs:complexType name=\"bookType\">", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#09", " <xs:sequence>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#10", " <xs:element name=\"title\" type=\"xs:string\" msdata:Ordinal=\"1\" />", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#11", " <xs:element name=\"price\" type=\"xs:decimal\" msdata:Ordinal=\"2\" />", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#12", " <xs:element name=\"author\" type=\"authorName\" minOccurs=\"0\" maxOccurs=\"unbounded\" />", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#13", " </xs:sequence>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#14", " <xs:attribute name=\"genre\" type=\"xs:string\" />", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#15", " </xs:complexType>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#16", " <xs:complexType name=\"authorName\">", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#17", " <xs:sequence>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#18", " <xs:element name=\"first-name\" type=\"xs:string\" />", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#19", " <xs:element name=\"last-name\" type=\"xs:string\" />", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#20", " </xs:sequence>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#21", " </xs:complexType>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#22", " <xs:element name=\"bookstore\" type=\"bookstoreType\" />", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#23", " <xs:element name=\"Root\" msdata:IsDataSet=\"true\" msdata:Locale=\"fi-FI\">", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#24", " <xs:complexType>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#25", " <xs:choice maxOccurs=\"unbounded\">", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#26", " <xs:element ref=\"bookstore\" />", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#27", " <xs:element name=\"Region\">", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#28", " <xs:complexType>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#29", " <xs:sequence>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#30", " <xs:element name=\"RegionID\" type=\"xs:string\" minOccurs=\"0\" />", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#31", " <xs:element name=\"RegionDescription\" type=\"xs:string\" minOccurs=\"0\" />", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#32", " </xs:sequence>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#33", " </xs:complexType>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#34", " </xs:element>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#35", " </xs:choice>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#36", " </xs:complexType>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("test#37", " </xs:element>", substring);
AssertEquals ("test#38", "</xs:schema>", TextString);
}
}
}
+44
View File
@@ -0,0 +1,44 @@
<?xml version="1.0"?>
<xs:schema id="test_dataset" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="test_dataset" msdata:IsDataSet="true" msdata:Locale="fi-FI">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="test_table">
<xs:complexType>
<xs:sequence>
<xs:element name="first" msdata:Caption="test" default="test_default_value" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="100" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="second" msdata:DataType="System.Data.SqlTypes.SqlGuid, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="second_test_table">
<xs:complexType>
<xs:sequence>
<xs:element name="second_first" default="default_value" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="100" />
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
<xs:unique name="Constraint1">
<xs:selector xpath=".//test_table" />
<xs:field xpath="first" />
</xs:unique>
<xs:unique name="second_test_table_Constraint1" msdata:ConstraintName="Constraint1">
<xs:selector xpath=".//second_test_table" />
<xs:field xpath="second_first" />
</xs:unique>
</xs:element>
</xs:schema>
@@ -0,0 +1,13 @@
<?xml version="1.0" standalone="yes"?>
<Root>
<Region>
<RegionID>1</RegionID>
<RegionDescription>Eastern
</RegionDescription>
</Region>
<Region>
<RegionID>2</RegionID>
<RegionDescription>Western
</RegionDescription>
</Region>
</Root>
+27
View File
@@ -0,0 +1,27 @@
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="bookstore" type="bookstoreType"/>
<xsd:complexType name="bookstoreType">
<xsd:sequence maxOccurs="unbounded">
<xsd:element name="book" type="bookType"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="bookType">
<xsd:sequence>
<xsd:element name="title" type="xsd:string"/>
<xsd:element name="author" type="authorName"/>
<xsd:element name="price" type="xsd:decimal"/>
</xsd:sequence>
<xsd:attribute name="genre" type="xsd:string"/>
</xsd:complexType>
<xsd:complexType name="authorName">
<xsd:sequence>
<xsd:element name="first-name" type="xsd:string"/>
<xsd:element name="last-name" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
@@ -1,239 +1,629 @@
//
// XmlDataDocumentTestTest.cs - NUnit Test Cases for XmlDataDocument
//
// Ville Palo ([email protected])
//
// (C) Ville Palo 2002
//
using NUnit.Framework;
using System;
using System.Data;
using System.Xml;
using System.IO;
namespace MonoTests.System.Data.Xml
{
public class XmlDataDocumentTest : TestCase {
public XmlDataDocumentTest() : base ("System.Xml.XmlDataDocument") {}
public XmlDataDocumentTest(string name) : base(name) {}
protected override void TearDown() {}
protected override void SetUp()
{
}
public static ITest Suite {
get {
return new TestSuite(typeof(XmlDataDocumentTest));
}
}
// Test constructor
public void Test1()
{
//Create an XmlDataDocument.
XmlDataDocument doc = new XmlDataDocument();
//Load the schema file.
doc.DataSet.ReadXmlSchema("System.Xml/store.xsd");
//Load the XML data.
doc.Load("System.Data/2books.xml");
//Update the price on the first book using the DataSet methods.
DataTable books = doc.DataSet.Tables["book"];
books.Rows[0]["price"] = "12,95";
//string outstring = "";
TextWriter text = new StringWriter ();
doc.Save(text);
//str.Read (bytes, 0, (int)str.Length);
//String OutString = new String (bytes);
string TextString = text.ToString ();
string substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#A01", "<?xml version=\"1.0\" encoding=\"utf-16\"?>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#A02", "<!--sample XML fragment-->", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#A03", "<bookstore>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#A04", " <book genre=\"novel\" ISBN=\"10-861003-324\">", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#A05", " <title>The Handmaid's Tale</title>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#A06", " <price>12.95</price>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#A07", " </book>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#A08", " <book genre=\"novel\" ISBN=\"1-861001-57-5\">", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#A09", " <title>Pride And Prejudice</title>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#A10", " <price>24.95</price>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#A11", " </book>", substring);
substring = TextString;
AssertEquals ("#A12", "</bookstore>", substring);
}
// Test public fields
public void Test2()
{
DataSet RegionDS = new DataSet ();
DataRow RegionRow;
RegionDS.ReadXmlSchema ("System.Xml/region.xsd");
XmlDataDocument DataDoc = new XmlDataDocument (RegionDS);
DataDoc.Load("System.Data/region.xml" );
RegionRow = RegionDS.Tables[0].Rows[0];
RegionDS.AcceptChanges ();
RegionRow["RegionDescription"] = "Reeeeeaalllly Far East!";
RegionDS.AcceptChanges ();
TextWriter text = new StringWriter ();
DataDoc.Save (text);
string TextString = text.ToString ();
string substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B01", "<?xml version=\"1.0\" encoding=\"utf-16\" standalone=\"yes\"?>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B02", "<Root>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B03", " <Region>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B04", " <RegionID>1</RegionID>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B05", " <RegionDescription>Reeeeeaalllly Far East!</RegionDescription>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B06", " </Region>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B07", " <Region>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B08", " <RegionID>2</RegionID>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B09", " <RegionDescription>Western", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B10", " </RegionDescription>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B11", " </Region>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B12", " <Region>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B13", " <RegionID>3</RegionID>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B14", " <RegionDescription>Northern", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B15", " </RegionDescription>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B16", " </Region>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B17", " <Region>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B18", " <RegionID>4</RegionID>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B19", " <RegionDescription>Southern", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B20", " </RegionDescription>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B21", " </Region>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B22", " <MoreData>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B23", " <Column1>12</Column1>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B24", " <Column2>Hi There</Column2>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B25", " </MoreData>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B26", " <MoreData>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B27", " <Column1>12</Column1>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B28", " <Column2>Hi There</Column2>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B29", " </MoreData>", substring);
}
}
}
//
// XmlDataDocumentTestTest.cs - NUnit Test Cases for XmlDataDocument
//
// Ville Palo ([email protected])
//
// (C) Ville Palo 2002
//
using NUnit.Framework;
using System;
using System.Data;
using System.Xml;
using System.IO;
namespace MonoTests.System.Data.Xml
{
public class XmlDataDocumentTest : TestCase {
public XmlDataDocumentTest() : base ("System.Xml.XmlDataDocument") {}
public XmlDataDocumentTest(string name) : base(name) {}
protected override void TearDown() {}
protected override void SetUp()
{
}
public static ITest Suite {
get {
return new TestSuite(typeof(XmlDataDocumentTest));
}
}
// Test constructor
public void Test1()
{
//Create an XmlDataDocument.
XmlDataDocument doc = new XmlDataDocument();
//Load the schema file.
doc.DataSet.ReadXmlSchema("System.Xml/store.xsd");
//Load the XML data.
doc.Load("System.Xml/2books.xml");
//Update the price on the first book using the DataSet methods.
DataTable books = doc.DataSet.Tables["book"];
books.Rows[0]["price"] = "12,95";
//string outstring = "";
TextWriter text = new StringWriter ();
doc.Save(text);
//str.Read (bytes, 0, (int)str.Length);
//String OutString = new String (bytes);
string TextString = text.ToString ();
string substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#A01", "<?xml version=\"1.0\" encoding=\"utf-16\"?>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#A02", "<!--sample XML fragment-->", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#A03", "<bookstore>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#A04", " <book genre=\"novel\" ISBN=\"10-861003-324\">", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#A05", " <title>The Handmaid's Tale</title>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#A06", " <price>12.95</price>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#A07", " </book>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#A08", " <book genre=\"novel\" ISBN=\"1-861001-57-5\">", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#A09", " <title>Pride And Prejudice</title>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#A10", " <price>24.95</price>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#A11", " </book>", substring);
substring = TextString;
AssertEquals ("#A12", "</bookstore>", substring);
}
// Test public fields
public void Test2()
{
DataSet RegionDS = new DataSet ();
DataRow RegionRow;
RegionDS.ReadXmlSchema ("System.Xml/region.xsd");
XmlDataDocument DataDoc = new XmlDataDocument (RegionDS);
DataDoc.Load("System.Xml/region.xml" );
RegionRow = RegionDS.Tables[0].Rows[0];
RegionDS.AcceptChanges ();
RegionRow["RegionDescription"] = "Reeeeeaalllly Far East!";
RegionDS.AcceptChanges ();
TextWriter text = new StringWriter ();
DataDoc.Save (text);
string TextString = text.ToString ();
string substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B01", "<?xml version=\"1.0\" encoding=\"utf-16\" standalone=\"yes\"?>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B02", "<Root>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B03", " <Region>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B04", " <RegionID>1</RegionID>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B05", " <RegionDescription>Reeeeeaalllly Far East!</RegionDescription>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B06", " </Region>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B07", " <Region>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B08", " <RegionID>2</RegionID>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B09", " <RegionDescription>Western", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B10", " </RegionDescription>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B11", " </Region>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B12", " <Region>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B13", " <RegionID>3</RegionID>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B14", " <RegionDescription>Northern", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B15", " </RegionDescription>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B16", " </Region>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B17", " <Region>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B18", " <RegionID>4</RegionID>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B19", " <RegionDescription>Southern", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B20", " </RegionDescription>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B21", " </Region>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B22", " <MoreData>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B23", " <Column1>12</Column1>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B24", " <Column2>Hi There</Column2>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B25", " </MoreData>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B26", " <MoreData>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B27", " <Column1>12</Column1>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B28", " <Column2>Hi There</Column2>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#B29", " </MoreData>", substring);
}
public void Test3()
{
XmlDataDocument DataDoc = new XmlDataDocument ();
DataSet dataset = DataDoc.DataSet;
dataset.ReadXmlSchema ("System.Xml/region.xsd");
DataDoc.Load("System.Xml/region.xml" );
DataDoc.GetElementsByTagName ("Region") [0].RemoveAll ();
TextWriter text = new StringWriter ();
dataset.WriteXml (text);
//DataDoc.Save (text);
string TextString = text.ToString ();
string substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#C01", "<Root>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#C02", " <Region />", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#C03", " <Region>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#C04", " <RegionID>2</RegionID>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#C05", " <RegionDescription>Western", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#C06", " </RegionDescription>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#C07", " </Region>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#C08", " <Region>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#C09", " <RegionID>3</RegionID>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#C10", " <RegionDescription>Northern", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#C11", " </RegionDescription>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#C12", " </Region>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#C13", " <Region>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#C14", " <RegionID>4</RegionID>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#C15", " <RegionDescription>Southern", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#C16", " </RegionDescription>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#C17", " </Region>", substring);
substring = TextString.Substring (0, TextString.Length);
//TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#C18", "</Root>", substring);
}
public void Test4 ()
{
DataSet RegionDS = new DataSet ();
RegionDS.ReadXmlSchema ("System.Xml/region.xsd");
XmlDataDocument DataDoc = new XmlDataDocument (RegionDS);
DataDoc.Load("System.Xml/region.xml" );
DataTable table = DataDoc.DataSet.Tables ["Region"];
DataRow newRow = table.NewRow ();
newRow [0] = "new row";
newRow [1] = "new description";
table.Rows.Add (newRow);
TextWriter text = new StringWriter ();
DataDoc.Save (text);
string TextString = text.ToString ();
string substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#F01", "<?xml version=\"1.0\" encoding=\"utf-16\" standalone=\"yes\"?>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#F02", "<Root>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#F03", " <Region>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#F04", " <RegionID>1</RegionID>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#F05", " <RegionDescription>Eastern", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#F06", " </RegionDescription>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#F07", " </Region>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#F08", " <Region>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#F09", " <RegionID>2</RegionID>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#F10", " <RegionDescription>Western", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#F11", " </RegionDescription>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#F12", " </Region>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#F13", " <Region>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#F14", " <RegionID>3</RegionID>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#F15", " <RegionDescription>Northern", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#F16", " </RegionDescription>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#F17", " </Region>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#F18", " <Region>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#F19", " <RegionID>4</RegionID>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#F20", " <RegionDescription>Southern", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#F21", " </RegionDescription>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#F22", " </Region>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#F23", " <MoreData>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#F24", " <Column1>12</Column1>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#F25", " <Column2>Hi There</Column2>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#F26", " </MoreData>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#F27", " <MoreData>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#F28", " <Column1>12</Column1>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#F29", " <Column2>Hi There</Column2>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#F30", " </MoreData>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#F31", " <Region>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#F32", " <RegionID>new row</RegionID>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#F33", " <RegionDescription>new description</RegionDescription>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#F34", " </Region>", substring);
substring = TextString.Substring (0, TextString.Length);
AssertEquals ("#F35", "</Root>", substring);
}
public void Test5 ()
{
DataSet RegionDS = new DataSet ();
RegionDS.ReadXmlSchema ("System.Xml/region.xsd");
XmlDataDocument DataDoc = new XmlDataDocument (RegionDS);
DataDoc.Load("System.Xml/region.xml" );
try {
DataDoc.DocumentElement.AppendChild (DataDoc.DocumentElement.FirstChild);
Fail ("#G01");
} catch (Exception e) {
AssertEquals ("#G02", typeof (InvalidOperationException), e.GetType ());
AssertEquals ("#G03", "Please set DataSet.EnforceConstraints == false before trying to edit " +
"XmlDataDocument using XML operations.", e.Message);
DataDoc.DataSet.EnforceConstraints = false;
}
XmlElement newNode = DataDoc.CreateElement ("Region");
XmlElement newChildNode = DataDoc.CreateElement ("RegionID");
newChildNode.InnerText = "64";
XmlElement newChildNode2 = DataDoc.CreateElement ("RegionDescription");
newChildNode2.InnerText = "test node";
newNode.AppendChild (newChildNode);
newNode.AppendChild (newChildNode2);
DataDoc.DocumentElement.AppendChild (newNode);
TextWriter text = new StringWriter ();
//DataDoc.Save (text);
DataDoc.DataSet.WriteXml(text);
string TextString = text.ToString ();
string substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
for (int i = 0; i < 21; i++) {
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
}
AssertEquals ("#G04", " <Region>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#G05", " <RegionID>64</RegionID>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#G06", " <RegionDescription>test node</RegionDescription>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#G07", " </Region>", substring);
substring = TextString.Substring (0, TextString.Length);
AssertEquals ("#G08", "</Root>", substring);
}
public void Test6 ()
{
DataSet RegionDS = new DataSet ();
RegionDS.ReadXmlSchema ("System.Xml/region.xsd");
XmlDataDocument DataDoc = new XmlDataDocument (RegionDS);
DataDoc.Load("System.Xml/region.xml" );
DataDoc.DataSet.EnforceConstraints = false;
XmlElement newNode = DataDoc.CreateElement ("Region");
XmlElement newChildNode = DataDoc.CreateElement ("RegionID");
newChildNode.InnerText = "64";
XmlElement newChildNode2 = null;
try {
newChildNode2 = DataDoc.CreateElement ("something else");
Fail ("#H01");
} catch (Exception e) {
AssertEquals ("#H02", typeof (XmlException), e.GetType ());
newChildNode2 = DataDoc.CreateElement ("something_else");
}
newChildNode2.InnerText = "test node";
newNode.AppendChild (newChildNode);
newNode.AppendChild (newChildNode2);
DataDoc.DocumentElement.AppendChild (newNode);
TextWriter text = new StringWriter ();
//DataDoc.Save (text);
DataDoc.DataSet.WriteXml(text);
string TextString = text.ToString ();
string substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
for (int i = 0; i < 21; i++) {
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
}
AssertEquals ("#H03", " <Region>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#H04", " <RegionID>64</RegionID>", substring);
substring = TextString.Substring (0, TextString.IndexOf("\n") - 1);
TextString = TextString.Substring (TextString.IndexOf("\n") + 1);
AssertEquals ("#H05", " </Region>", substring);
substring = TextString.Substring (0, TextString.Length);
AssertEquals ("#H06", "</Root>", substring);
}
public void TestGetElementFromRow ()
{
XmlDataDocument doc = new XmlDataDocument ();
doc.DataSet.ReadXmlSchema ("System.Xml/region.xsd");
doc.Load ("System.Xml/region.xml");
DataTable table = doc.DataSet.Tables ["Region"];
XmlElement element = doc.GetElementFromRow (table.Rows [2]);
AssertEquals ("#D01", "Region", element.Name);
AssertEquals ("#D02", "3", element ["RegionID"].InnerText);
try {
element = doc.GetElementFromRow (table.Rows [4]);
Fail ("#D03");
} catch (Exception e) {
AssertEquals ("#D04", typeof (IndexOutOfRangeException), e.GetType ());
AssertEquals ("#D05", "There is no row at position 4.", e.Message);
}
}
public void TestGetRowFromElement ()
{
XmlDataDocument doc = new XmlDataDocument ();
doc.DataSet.ReadXmlSchema ("System.Xml/region.xsd");
doc.Load ("System.Xml/region.xml");
XmlElement root = doc.DocumentElement;
DataRow row = doc.GetRowFromElement((XmlElement)root.FirstChild);
AssertEquals ("#E01", "1", row [0]);
row = doc.GetRowFromElement((XmlElement)root.ChildNodes [2]);
AssertEquals ("#E02", "3", row [0]);
}
}
}
@@ -1,11 +1,31 @@
<!--sample XML fragment-->
<bookstore>
<book genre='novel' ISBN='10-861003-324'>
<title>The Handmaid's Tale</title>
<price>19.95</price>
</book>
<book genre='novel' ISBN='1-861001-57-5'>
<title>Pride And Prejudice</title>
<price>24.95</price>
</book>
</bookstore>
<?xml version="1.0" standalone="yes"?>
<Root>
<Region>
<RegionID>1</RegionID>
<RegionDescription>Eastern
</RegionDescription>
</Region>
<Region>
<RegionID>2</RegionID>
<RegionDescription>Western
</RegionDescription>
</Region>
<Region>
<RegionID>3</RegionID>
<RegionDescription>Northern
</RegionDescription>
</Region>
<Region>
<RegionID>4</RegionID>
<RegionDescription>Southern
</RegionDescription>
</Region>
<MoreData>
<Column1>12</Column1>
<Column2>Hi There</Column2>
</MoreData>
<MoreData>
<Column1>12</Column1>
<Column2>Hi There</Column2>
</MoreData>
</Root>
@@ -1,118 +0,0 @@
//
// TestPgSqlInsert.cs
//
// To Test PgSqlConnection and PgSqlCommand by connecting
// to a PostgreSQL database
// and then executing an INSERT SQL statement
//
// To use:
// change strings to your database, userid, tables, etc...:
// connectionString
// insertStatement
//
// To test:
// mcs TestPgSqlInsert.cs -r System.Data
// mint TestPgSqlInsert.exe
//
// Author:
// Rodrigo Moya ([email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc 2002
//
using System;
using System.Data;
using Mono.Data.PostgreSqlClient;
namespace TestSystemDataPgSqlClient
{
class TestPgSqlInsert
{
[STAThread]
static void Main(string[] args) {
PgSqlConnection conn = null;
PgSqlCommand cmd = null;
PgSqlTransaction trans = null;
int rowsAffected = -1;
String connectionString = "";
String insertStatement = "";
String deleteStatement = "";
connectionString =
"host=localhost;" +
"dbname=test;" +
"user=postgres";
insertStatement =
"insert into NoSuchTable " +
"(tid, tdesc) " +
"values ('beer', 'Beer for All!') ";
deleteStatement =
"delete from sometable " +
"where tid = 'beer' ";
try {
// Connect to a PostgreSQL database
Console.WriteLine ("Connect to database...");
conn = new PgSqlConnection(connectionString);
conn.Open();
// begin transaction
Console.WriteLine ("Begin Transaction...");
trans = conn.BeginTransaction();
// create SQL DELETE command
Console.WriteLine ("Create Command initializing " +
"with an DELETE statement...");
cmd = new PgSqlCommand (deleteStatement, conn);
// execute the DELETE SQL command
Console.WriteLine ("Execute DELETE SQL Command...");
rowsAffected = cmd.ExecuteNonQuery();
Console.WriteLine ("Rows Affected: " + rowsAffected);
// change the SQL command to an SQL INSERT Command
Console.WriteLine ("Now use INSERT SQL Command...");
cmd.CommandText = insertStatement;
// execute the INSERT SQL command
Console.WriteLine ("Execute INSERT SQL Command...");
rowsAffected = cmd.ExecuteNonQuery();
Console.WriteLine ("Rows Affected: " + rowsAffected);
// if successfull at INSERT, commit the transaction,
// otherwise, do a rollback the transaction using
// trans.Rollback();
Console.WriteLine ("Commit transaction...");
trans.Commit();
// Close connection to database
Console.WriteLine ("Close database connection...");
conn.Close();
Console.WriteLine ("Assuming everything " +
"was successful.");
Console.WriteLine ("Verify data in database to " +
"see if row is there.");
}
catch(PgSqlException e) {
// Display the SQL Errors and Rollback the database
Console.WriteLine("PgSqlException caught: " +
e.ToString());
if(trans != null) {
trans.Rollback();
Console.WriteLine("Database has been Rolled back!");
}
}
finally {
if(conn != null)
if(conn.State == ConnectionState.Open)
conn.Close();
}
}
}
}
-105
View File
@@ -1,105 +0,0 @@
//
// TestSqlInsert.cs
//
// To Test SqlConnection and SqlCommand by connecting
// to a PostgreSQL database
// and then executing an INSERT SQL statement
//
// To use:
// change strings to your database, userid, tables, etc...:
// connectionString
// insertStatement
//
// To test:
// mcs TestSqlInsert.cs -r System.Data
// mint TestSqlInsert.exe
//
// Author:
// Rodrigo Moya ([email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc 2002
//
using System;
using System.Data;
using System.Data.SqlClient;
namespace TestSystemDataSqlClient
{
class TestSqlInsert
{
[STAThread]
static void Main(string[] args)
{
SqlConnection conn;
SqlCommand cmd;
SqlTransaction trans;
int rowsAffected;
String connectionString;
String insertStatement;
String deleteStatement;
connectionString =
"host=localhost;" +
"dbname=test;" +
"user=postgres";
insertStatement =
"insert into sometable " +
"(tid, tdesc) " +
"values ('beer', 'Beer for All!') ";
deleteStatement =
"delete from sometable " +
"where tid = 'beer' ";
// Connect to a PostgreSQL database
Console.WriteLine ("Connect to database...");
conn = new SqlConnection(connectionString);
conn.Open();
// begin transaction
Console.WriteLine ("Begin Transaction...");
trans = conn.BeginTransaction();
// create SQL DELETE command
Console.WriteLine ("Create Command initializing " +
"with an DELETE statement...");
cmd = new SqlCommand (deleteStatement, conn);
// execute the DELETE SQL command
Console.WriteLine ("Execute DELETE SQL Command...");
rowsAffected = cmd.ExecuteNonQuery();
Console.WriteLine ("Rows Affected: " + rowsAffected);
// change the SQL command to an SQL INSERT Command
Console.WriteLine ("Now use INSERT SQL Command...");
cmd.CommandText = insertStatement;
// execute the INSERT SQL command
Console.WriteLine ("Execute INSERT SQL Command...");
rowsAffected = cmd.ExecuteNonQuery();
Console.WriteLine ("Rows Affected: " + rowsAffected);
// if successfull at INSERT, commit the transaction,
// otherwise, do a rollback the transaction using
// trans.Rollback();
// FIXME: need to have exceptions working in
// SqlClient classes before you can do rollback
Console.WriteLine ("Commit transaction...");
trans.Commit();
// Close connection to database
Console.WriteLine ("Close database connection...");
conn.Close();
Console.WriteLine ("Assuming everything " +
"was successful.");
Console.WriteLine ("Verify data in database to " +
"see if row is there.");
}
}
}
@@ -1,104 +0,0 @@
//
// TestSqlIsolationLevel.
//
// To Test Setting Isolation Level of SqlTransaction
// to a PostgreSQL database
//
// To use:
// change strings to your database, userid, tables, etc...:
// connectionString
// insertStatement
//
// To test:
// mcs TestSqlIsolationLevel.cs -r System.Data
// mint TestSqlIsolationLevel.exe
//
// Author:
// Rodrigo Moya ([email protected])
// Daniel Morgan ([email protected])
//
// (C) Ximian, Inc 2002
//
using System;
using System.Data;
using System.Data.SqlClient;
namespace TestSystemDataSqlClient
{
class TestSqlInsert
{
[STAThread]
static void Main(string[] args)
{
SqlConnection conn;
SqlCommand cmd;
SqlTransaction trans;
int rowsAffected;
String connectionString;
String insertStatement;
String deleteStatement;
connectionString =
"host=localhost;" +
"dbname=test;" +
"user=postgres";
insertStatement =
"insert into sometable " +
"(tid, tdesc) " +
"values ('beer', 'Beer for All!') ";
deleteStatement =
"delete from sometable " +
"where tid = 'beer' ";
// Connect to a PostgreSQL database
Console.WriteLine ("Connect to database...");
conn = new SqlConnection(connectionString);
conn.Open();
// begin transaction
Console.WriteLine ("Begin Transaction...");
trans = conn.BeginTransaction(IsolationLevel.Serializable);
// create SQL DELETE command
Console.WriteLine ("Create Command initializing " +
"with an DELETE statement...");
cmd = new SqlCommand (deleteStatement, conn);
// execute the DELETE SQL command
Console.WriteLine ("Execute DELETE SQL Command...");
rowsAffected = cmd.ExecuteNonQuery();
Console.WriteLine ("Rows Affected: " + rowsAffected);
// change the SQL command to an SQL INSERT Command
Console.WriteLine ("Now use INSERT SQL Command...");
cmd.CommandText = insertStatement;
// execute the INSERT SQL command
Console.WriteLine ("Execute INSERT SQL Command...");
rowsAffected = cmd.ExecuteNonQuery();
Console.WriteLine ("Rows Affected: " + rowsAffected);
// if successfull at INSERT, commit the transaction,
// otherwise, do a rollback the transaction using
// trans.Rollback();
// FIXME: need to have exceptions working in
// SqlClient classes before you can do rollback
Console.WriteLine ("Commit transaction...");
trans.Commit();
// Close connection to database
Console.WriteLine ("Close database connection...");
conn.Close();
Console.WriteLine ("Assuming everything " +
"was successful.");
Console.WriteLine ("Verify data in database to " +
"see if row is there.");
}
}
}
+1
View File
@@ -6,6 +6,7 @@ LIB_LIST = data_linux_test.args
LIB_FLAGS = \
-r $(topdir)/class/lib/corlib.dll \
-r $(topdir)/class/lib/System.Data.dll \
-r $(topdir)/class/lib/System.Xml.dll \
-r $(topdir)/class/lib/System.dll \
-r $(topdir)/class/lib/NUnitCore_mono.dll
+5
View File
@@ -27,8 +27,10 @@ System.Data/DataSet.cs
System.Data/DataSysDescriptionAttribute.cs
System.Data/DataTable.cs
System.Data/DataTableCollection.cs
System.Data/DataTablePropertyDescriptor.cs
System.Data/DataView.cs
System.Data/DataViewManager.cs
System.Data/DataViewManagerListItemTypeDescriptor.cs
System.Data/DataViewRowState.cs
System.Data/DataViewSetting.cs
System.Data/DataViewSettingCollection.cs
@@ -90,6 +92,7 @@ System.Data/VersionNotFoundException.cs
System.Data/XmlReadMode.cs
System.Data/XmlWriteMode.cs
System.Data/XmlConstants.cs
System.Data/XmlDiffLoader.cs
System.Data.Common/DataAdapter.cs
System.Data.Common/DataColumnMapping.cs
System.Data.Common/DataColumnMappingCollection.cs
@@ -184,4 +187,6 @@ System.Data.SqlClient/SqlRowUpdatingEventArgs.cs
System.Data.SqlClient/SqlRowUpdatingEventHandler.cs
System.Data.SqlClient/SqlTransaction.cs
System.Data.SqlClient/SqlXmlTextReader.cs
System.Data/XmlDataLoader.cs
System.Data/XmlSchemaMapper.cs
System.Xml/XmlDataDocument.cs
+10 -1
View File
@@ -1,4 +1,13 @@
2002-10-07 Gaurav Vaish <[email protected]>
2002-12-11 Jeroen Janssen <[email protected]>
* removed set for RootDesignerSerializerAttribute.TypeId
* fixed .build file to include reference to System.dll
2002-09-16 Gaurav Vaish <[email protected]>
* System.Web.UI.Design : Added directory.
2002-12-09 Gaurav Vaish <[email protected]>
* System.Design : Added directory.
@@ -70,8 +70,6 @@ namespace System.ComponentModel.Design.Serialization
[MonoTODO]
public override object TypeId {
get { throw new NotImplementedException ();}
set { throw new NotImplementedException ();}
}
}
}
@@ -18,6 +18,7 @@
<arg value="/noconfig"/>
<arg value="/debug"/>
<arg value="/r:System.Web.dll"/>
<arg value="/r:System.dll"/>
<sources>
<includes name="**/*.cs"/>
<excludes name="Test/**"/>
@@ -0,0 +1,4 @@
2003-01-07 Gaurav Vaish <gvaish_mono AT lycos.com>
* DataBindingHandler.cs : Implemented.
@@ -0,0 +1,26 @@
/**
* Namespace: System.Web.UI.Design
* Class: DataBindingHandler
*
* Author: Gaurav Vaish
* Maintainer: [email protected]
*
* (C) Gaurav Vaish (2002)
*/
using System;
using System.ComponentModel.Design;
using System.Web.UI.WebControls;
namespace System.Web.UI.Design
{
public abstract class DataBindingHandler
{
protected DataBindingHandler()
{
}
public abstract void DataBindControl(IDesignerHost designerHost,
Control control);
}
}
@@ -5,7 +5,7 @@
//
// (C) Alejandro Sánchez Acosta
//
using System;
using System.Runtime.InteropServices;
namespace System.EnterpriseServices.Internal
@@ -5,6 +5,7 @@
//
// (C) Alejandro Sánchez Acosta
//
using System;
using System.Runtime.InteropServices;
@@ -5,6 +5,7 @@
//
// (C) Alejandro Sánchez Acosta
//
using System;
using System.Runtime.InteropServices;
@@ -1,3 +1,19 @@
2002-12-29 Lluis Sanchez Gual <[email protected]>
* CommonTransportKeys.cs: Implemented and added to CVS
* TcpChannel.cs: Added. It is a more ore less complete implementation
of the tcp channel, although not yet compatible with MS TcpChannel.
* TcpClientChannel.cs: Added
* TcpClientTransportSink.cs: Added
* TcpClientTransportSinkProvider.cs: Added
* TcpConnectionPool.cs: Added
* TcpMessageIO.cs: Added
* TcpServerChannel.cs: Added
* TcpServerTransportSink.cs: Added
* SimpleWireFormat.cs: Corrected a bug in method SerializeObject
* SimpleServerFormatterSink.cs: Some small corrections
* SimpleClientFormatterSink.cs: Some small corrections
2002-09-03 Dietmar Maurer <[email protected]>
* System.Runtime.Remoting.Channels.CORBA/CORBAChannel.cs:
@@ -96,6 +96,7 @@ namespace System.Runtime.Remoting.Channels.Simple
try {
// create a new header
TransportHeaders req_headers = new TransportHeaders ();
req_headers[CommonTransportKeys.RequestUri] = call.Uri;
//fixme: set some header values
@@ -58,7 +58,7 @@ namespace System.Runtime.Remoting.Channels.Simple {
{
IMessage call;
string uri = (string)requestHeaders ["_requestUri"];
string uri = (string)requestHeaders [CommonTransportKeys.RequestUri];
if (requestMsg == null) {
call = (IMessage)format.DeserializeRequest (requestStream, uri);
@@ -40,14 +40,15 @@ namespace System.Runtime.Remoting.Channels.Simple {
void SerializeObject (BinaryWriter writer, object obj)
{
Type type = obj.GetType ();
if (obj == null) {
writer.Write ((byte)TypeId.NULL);
return;
}
if (type == typeof (String)) {
Type type = obj.GetType ();
if (type == typeof (String))
{
writer.Write ((byte)TypeId.String);
writer.Write ((String)obj);
return;
@@ -225,6 +226,7 @@ namespace System.Runtime.Remoting.Channels.Simple {
}
MonoMethodMessage msg = new MonoMethodMessage (svr_type, method_name, args);
msg.Uri = uri;
return msg;
}
@@ -2,6 +2,7 @@
// System.Runtime.Remoting.Channels.Tcp.TcpChannel.cs
//
// Author: Rodrigo Moya ([email protected])
// Lluis Sanchez Gual ([email protected])
//
// 2002 (C) Copyright, Ximian, Inc.
//
@@ -12,86 +13,98 @@ using System.Text.RegularExpressions;
namespace System.Runtime.Remoting.Channels.Tcp
{
public class TcpChannel : IChannelReceiver, IChannel,
IChannelSender
public class TcpChannel : IChannelReceiver, IChannel, IChannelSender
{
private int tcp_port;
public TcpChannel ()
{
tcp_port = 0;
private TcpClientChannel _clientChannel;
private TcpServerChannel _serverChannel = null;
private string _name;
public TcpChannel (): this (0)
{
}
public TcpChannel (int port)
{
tcp_port = port;
Hashtable ht = new Hashtable();
ht["port"] = port.ToString();
Init(ht, null, null);
}
[MonoTODO]
public void Init(IDictionary properties, IClientChannelSinkProvider clientSink, IServerChannelSinkProvider serverSink)
{
_clientChannel = new TcpClientChannel(properties,clientSink);
string port = properties["port"] as string;
if (port != null && port != string.Empty)
{
_serverChannel = new TcpServerChannel(properties, serverSink);
}
_name = properties["name"] as string;
}
public TcpChannel (IDictionary properties,
IClientChannelSinkProvider clientSinkProvider,
IServerChannelSinkProvider serverSinkProvider)
{
throw new NotImplementedException ();
Init (properties, clientSinkProvider, serverSinkProvider);
}
public object ChannelData
{
[MonoTODO]
get {
throw new NotImplementedException ();
}
}
public string ChannelName
{
[MonoTODO]
get {
throw new NotImplementedException ();
}
}
public int ChannelPriority
{
[MonoTODO]
get {
throw new NotImplementedException ();
}
}
[MonoTODO]
public IMessageSink CreateMessageSink (string url,
object remoteChannelData,
out string objectURI)
{
throw new NotImplementedException ();
}
[MonoTODO]
public string[] GetUrlsForUri (string objectURI)
{
throw new NotImplementedException ();
}
public IMessageSink CreateMessageSink(string url, object remoteChannelData, out string objectURI)
{
return _clientChannel.CreateMessageSink(url, remoteChannelData, out objectURI);
}
public string ChannelName
{
get { return _name; }
}
public int ChannelPriority
{
get { return 1; }
}
public void StartListening (object data)
{
if (_serverChannel != null) _serverChannel.StartListening(data);
}
public void StopListening (object data)
{
if (_serverChannel != null) _serverChannel.StopListening(data);
}
public string[] GetUrlsForUri (string uri)
{
if (_serverChannel != null) return _serverChannel.GetUrlsForUri(uri);
else return null;
}
public object ChannelData
{
get
{
if (_serverChannel != null) return _serverChannel.ChannelData;
else return null;
}
}
public string Parse (string url, out string objectURI)
{
return TcpChannel.ParseChannelUrl (url, out objectURI);
}
internal static string ParseChannelUrl (string url, out string objectURI)
{
int port;
string host = ParseTcpURL (url, out objectURI, out port);
return "tcp://" + host + ":" + port;
}
[MonoTODO]
public void StartListening (object data)
{
throw new NotImplementedException ();
}
[MonoTODO]
public void StopListening (object data)
{
throw new NotImplementedException ();
if (host != null)
return "tcp://" + host + ":" + port;
else
return null;
}
internal static string ParseTcpURL (string url, out string objectURI, out int port)
@@ -101,7 +114,7 @@ namespace System.Runtime.Remoting.Channels.Tcp
objectURI = null;
port = 0;
Match m = Regex.Match (url, "tcp://([^:]+):([0-9]+)(/.*)");
Match m = Regex.Match (url, "tcp://([^:]+):([0-9]+)[/](.*)");
if (!m.Success)
return null;
@@ -2,6 +2,7 @@
// System.Runtime.Remoting.Channels.Tcp.TcpClientChannel.cs
//
// Author: Dietmar Maurer ([email protected])
// Lluis Sanchez Gual ([email protected])
//
// 2002 (C) Copyright, Ximian, Inc.
//
@@ -11,132 +12,51 @@ using System.IO;
using System.Net.Sockets;
using System.Runtime.Remoting.Messaging;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Simple;
using System.Threading;
namespace System.Runtime.Remoting.Channels.Tcp
{
public class TcpClientTransportSink : IClientChannelSink
{
string host;
string object_uri;
int port;
TcpClient tcpclient;
Stream stream = null;
public TcpClientTransportSink (string url)
{
host = TcpChannel.ParseTcpURL (url, out object_uri, out port);
tcpclient = new TcpClient ();
}
public IDictionary Properties
{
get {
return null;
}
}
public IClientChannelSink NextChannelSink
{
get {
// we are the last one
return null;
}
}
public void AsyncProcessRequest (IClientChannelSinkStack sinkStack, IMessage msg,
ITransportHeaders headers, Stream stream)
{
throw new NotImplementedException ();
}
public void AsyncProcessResponse (IClientResponseChannelSinkStack sinkStack,
object state, ITransportHeaders headers,
Stream stream)
{
throw new NotImplementedException ();
}
public Stream GetRequestStream (IMessage msg, ITransportHeaders headers)
{
// no acces to stream?
return null;
}
public void ProcessMessage (IMessage msg,
ITransportHeaders requestHeaders,
Stream requestStream,
out ITransportHeaders responseHeaders,
out Stream responseStream)
{
if (stream == null) {
tcpclient.Connect (host, port);
stream = tcpclient.GetStream ();
}
Console.WriteLine ("Client ProcessMessage");
responseHeaders = null;
responseStream = null;
//throw new NotImplementedException ();
}
}
public class TcpClientTransportSinkProvider : IClientChannelSinkProvider
{
public TcpClientTransportSinkProvider ()
{
// what should we do here ?
}
public IClientChannelSinkProvider Next
{
get {
return null;
}
set {
// ignore, we are always the last in the chain
}
}
public IClientChannelSink CreateSink (IChannelSender channel, string url,
object remoteChannelData)
{
return new TcpClientTransportSink (url);
}
}
public class TcpClientChannel : IChannelSender, IChannel
{
int priority = 1;
string name = "tcp";
IClientChannelSinkProvider sink_provider;
IClientChannelSinkProvider _sinkProvider;
public TcpClientChannel ()
{
sink_provider = new BinaryClientFormatterSinkProvider ();
sink_provider.Next = new TcpClientTransportSinkProvider ();
{
}
public TcpClientChannel (IDictionary properties, IClientChannelSinkProvider sinkProvider)
{
priority = 1;
sink_provider = sinkProvider;
// add the tcp provider at the end of the chain
IClientChannelSinkProvider prov = sinkProvider;
while (prov.Next != null) prov = prov.Next;
prov.Next = new TcpClientTransportSinkProvider ();
if (_sinkProvider != null)
{
_sinkProvider = sinkProvider;
// add the tcp provider at the end of the chain
IClientChannelSinkProvider prov = sinkProvider;
while (prov.Next != null) prov = prov.Next;
prov.Next = new TcpClientTransportSinkProvider ();
// Note: a default formatter is added only when
// no sink providers are specified in the config file.
}
else
{
// FIXME: change soap to binary
_sinkProvider = new SimpleClientFormatterSinkProvider ();
_sinkProvider.Next = new TcpClientTransportSinkProvider ();
}
}
public TcpClientChannel (string name, IClientChannelSinkProvider sinkProvider)
{
priority = 1;
this.name = name;
sink_provider = sinkProvider;
_sinkProvider = sinkProvider;
// add the tcp provider at the end of the chain
IClientChannelSinkProvider prov = sinkProvider;
@@ -161,7 +81,7 @@ namespace System.Runtime.Remoting.Channels.Tcp
public IMessageSink CreateMessageSink (string url,
object remoteChannelData,
out string objectURI)
{
{
if (url == null && remoteChannelData != null) {
IChannelDataStore ds = remoteChannelData as IChannelDataStore;
if (ds != null)
@@ -171,16 +91,12 @@ namespace System.Runtime.Remoting.Channels.Tcp
if (Parse (url, out objectURI) == null)
return null;
return (IMessageSink) sink_provider.CreateSink (this, url, remoteChannelData);
return (IMessageSink) _sinkProvider.CreateSink (this, url, remoteChannelData);
}
public string Parse (string url, out string objectURI)
{
int port;
string host = TcpChannel.ParseTcpURL (url, out objectURI, out port);
return "tcp://" + host + ":" + port;
return TcpChannel.ParseChannelUrl (url, out objectURI);
}
}
}
@@ -0,0 +1,152 @@
//
// System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.cs
//
// Author: Dietmar Maurer ([email protected])
// Lluis Sanchez ([email protected])
//
// 2002 (C) Copyright, Ximian, Inc.
//
using System;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Messaging;
using System.Collections;
using System.IO;
using System.Threading;
namespace System.Runtime.Remoting.Channels.Tcp
{
public class TcpClientTransportSink : IClientChannelSink
{
string _host;
string _objectUri;
int _port;
public TcpClientTransportSink (string url)
{
_host = TcpChannel.ParseTcpURL (url, out _objectUri, out _port);
}
public IDictionary Properties
{
get
{
return null;
}
}
public IClientChannelSink NextChannelSink
{
get
{
// we are the last one
return null;
}
}
public void AsyncProcessRequest (IClientChannelSinkStack sinkStack, IMessage msg,
ITransportHeaders headers, Stream requestStream)
{
TcpConnection connection = null;
try
{
// Sends the stream using a connection from the pool
// and creates a WorkItem that will wait for the
// response of the server
connection = TcpConnectionPool.GetConnection (_host, _port);
TcpMessageIO.SendMessageStream (connection.Stream, requestStream, headers, connection.Buffer);
sinkStack.Push (this, connection);
ThreadPool.QueueUserWorkItem (new WaitCallback(ReadAsyncTcpMessage), sinkStack);
}
catch
{
if (connection != null) connection.Release();
throw;
}
}
private void ReadAsyncTcpMessage(object data)
{
// This method is called by a new thread to asynchronously
// read the response to a request
// The stack was provided as state data in QueueUserWorkItem
IClientChannelSinkStack stack = (IClientChannelSinkStack)data;
// The first sink in the stack is this sink. Pop it and
// get the status data, which is the TcpConnection used to send
// the request
TcpConnection connection = (TcpConnection)stack.Pop(this);
try
{
ITransportHeaders responseHeaders;
// Read the response, blocking if necessary
MessageType type = TcpMessageIO.ReceiveMessageType (connection.Stream);
if (type != MessageType.MethodMessage)
throw new RemotingException ("Unknown response message from server");
Stream responseStream = TcpMessageIO.ReceiveMessageStream (connection.Stream, out responseHeaders, connection.Buffer);
// Free the connection, so it can be reused
connection.Release();
connection = null;
// Ok, proceed with the other sinks
stack.AsyncProcessResponse (responseHeaders, responseStream);
}
catch
{
if (connection != null) connection.Release();
throw;
}
}
public void AsyncProcessResponse (IClientResponseChannelSinkStack sinkStack,
object state, ITransportHeaders headers,
Stream stream)
{
// Should never be called
throw new NotSupportedException();
}
public Stream GetRequestStream (IMessage msg, ITransportHeaders headers)
{
return null;
}
public void ProcessMessage (IMessage msg,
ITransportHeaders requestHeaders,
Stream requestStream,
out ITransportHeaders responseHeaders,
out Stream responseStream)
{
TcpConnection connection = null;
try
{
// Sends the message
connection = TcpConnectionPool.GetConnection (_host, _port);
TcpMessageIO.SendMessageStream (connection.Stream, requestStream, requestHeaders, connection.Buffer);
// Reads the response
MessageType type = TcpMessageIO.ReceiveMessageType (connection.Stream);
if (type != MessageType.MethodMessage)
throw new RemotingException ("Unknown response message from server");
responseStream = TcpMessageIO.ReceiveMessageStream (connection.Stream, out responseHeaders, connection.Buffer);
}
finally
{
if (connection != null)
connection.Release();
}
}
}
}
@@ -0,0 +1,41 @@
//
// System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSinkProvider.cs
//
// Author: Dietmar Maurer ([email protected])
// Lluis Sanchez ([email protected])
//
// 2002 (C) Copyright, Ximian, Inc.
//
using System;
using System.Runtime.Remoting.Channels;
namespace System.Runtime.Remoting.Channels.Tcp
{
public class TcpClientTransportSinkProvider : IClientChannelSinkProvider
{
public TcpClientTransportSinkProvider ()
{
// what should we do here ?
}
public IClientChannelSinkProvider Next
{
get
{
return null;
}
set
{
// ignore, we are always the last in the chain
}
}
public IClientChannelSink CreateSink (IChannelSender channel, string url,
object remoteChannelData)
{
return new TcpClientTransportSink (url);
}
}
}
@@ -0,0 +1,246 @@
//
// System.Runtime.Remoting.Channels.Tcp.TcpConnectionPool.cs
//
// Author: Lluis Sanchez ([email protected])
//
// 2002 (C) Lluis Sanchez Gual
//
using System;
using System.Collections;
using System.Threading;
using System.IO;
using System.Net.Sockets;
namespace System.Runtime.Remoting.Channels.Tcp
{
// This is a pool of Tcp connections. Connections requested
// by the TCP channel are pooled after their use, and can
// be reused later. Connections are automaticaly closed
// if not used after some time, specified in KeepAliveSeconds.
// The number of allowed open connections can also be specified
// in MaxOpenConnections. The limit is per host.
// If a thread requests a connection and the limit has been
// reached, the thread is suspended until one is released.
internal class TcpConnectionPool
{
// Table of pools. There is a HostConnectionPool
// instance for each host
static Hashtable _pools = new Hashtable();
static int _maxOpenConnections = 2;
static int _keepAliveSeconds = 15;
static TcpConnectionPool()
{
// This thread will close unused connections
Thread t = new Thread (new ThreadStart (ConnectionCollector));
t.Start();
t.IsBackground = true;
}
public static int MaxOpenConnections
{
get { return _maxOpenConnections; }
set
{
if (value < 1) throw new RemotingException ("MaxOpenConnections must be greater than zero");
_maxOpenConnections = value;
}
}
public static int KeepAliveSeconds
{
get { return _keepAliveSeconds; }
set { _keepAliveSeconds = value; }
}
public static TcpConnection GetConnection (string host, int port)
{
HostConnectionPool hostPool;
lock (_pools)
{
string key = host + ":" + port;
hostPool = (HostConnectionPool) _pools[key];
if (hostPool == null)
{
hostPool = new HostConnectionPool(host, port);
_pools[key] = hostPool;
}
}
return hostPool.GetConnection();
}
private static void ConnectionCollector ()
{
while (true)
{
Thread.Sleep(3000);
lock (_pools)
{
ICollection values = _pools.Values;
foreach (HostConnectionPool pool in values)
pool.PurgeConnections();
}
}
}
}
internal class TcpConnection
{
DateTime _controlTime;
Stream _stream;
TcpClient _client;
HostConnectionPool _pool;
byte[] _buffer;
public TcpConnection (HostConnectionPool pool, TcpClient client)
{
_pool = pool;
_client = client;
_stream = client.GetStream();
_controlTime = DateTime.Now;
_buffer = new byte[TcpMessageIO.DefaultStreamBufferSize];
}
public Stream Stream
{
get { return _stream; }
}
public DateTime ControlTime
{
get { return _controlTime; }
set { _controlTime = value; }
}
// This is a "thread safe" buffer that can be used by
// TcpClientTransportSink to read or send data to the stream.
// The buffer is "thread safe" since only one thread can
// use a connection at a given time.
public byte[] Buffer
{
get { return _buffer; }
}
// Returns the connection to the pool
public void Release()
{
_pool.ReleaseConnection (this);
}
public void Close()
{
_client.Close();
}
}
internal class HostConnectionPool
{
ArrayList _pool = new ArrayList();
int _activeConnections = 0;
string _host;
int _port;
public HostConnectionPool (string host, int port)
{
_host = host;
_port = port;
}
public TcpConnection GetConnection ()
{
lock (_pool)
{
TcpConnection connection = null;
do
{
if (_pool.Count > 0)
{
// There are available connections
connection = (TcpConnection)_pool[_pool.Count - 1];
_pool.RemoveAt(_pool.Count - 1);
}
if (connection == null && _activeConnections < TcpConnectionPool.MaxOpenConnections)
{
// No connections available, but the max connections
// has not been reached yet, so a new one can be created
connection = CreateConnection();
}
// No available connections in the pool
// Wait for somewone to release one.
if (connection == null)
Monitor.Wait(_pool);
}
while (connection == null);
return connection;
}
}
private TcpConnection CreateConnection()
{
try
{
TcpClient client = new TcpClient(_host, _port);
TcpConnection entry = new TcpConnection(this, client);
_activeConnections++;
return entry;
}
catch (Exception ex)
{
throw new RemotingException (ex.Message);
}
}
public void ReleaseConnection (TcpConnection entry)
{
lock (_pool)
{
entry.ControlTime = DateTime.Now; // Initialize timeout
_pool.Add (entry);
Monitor.Pulse (_pool);
}
}
private void CancelConnection(TcpConnection entry)
{
try
{
entry.Stream.Close();
_activeConnections--;
}
catch
{
}
}
public void PurgeConnections()
{
lock (_pool)
{
for (int n=0; n < _pool.Count; n++)
{
TcpConnection entry = (TcpConnection)_pool[n];
if ( (DateTime.Now - entry.ControlTime).TotalSeconds > TcpConnectionPool.KeepAliveSeconds)
{
CancelConnection (entry);
_pool.RemoveAt(n);
n--;
}
}
}
}
}
}
@@ -0,0 +1,205 @@
// System.Runtime.Remoting.Channels.Tcp.TcpMessageIO.cs
//
// Author: Lluis Sanchez ([email protected])
//
// (C) 2002 Lluis Sanchez Gual
using System.Runtime.Serialization;
using System.Collections;
using System.IO;
using System.Text;
using System.Net.Sockets;
namespace System.Runtime.Remoting.Channels.Tcp
{
enum MessageType { MethodMessage = 0, CancelSignal = 1, Unknown = 10}
internal class TcpMessageIO
{
static byte[][] _msgHeaders =
{
new byte[] { (byte)'.', (byte)'N', (byte)'E', (byte)'T', 0 },
new byte[] { 255, 255, 255, 255, 255 }
};
public static int DefaultStreamBufferSize = 1000;
// Identifies an incoming message
public static MessageType ReceiveMessageType (Stream networkStream)
{
try
{
bool[] isOnTrack = new bool[_msgHeaders.Length];
bool atLeastOneOnTrack = true;
int i = 0;
while (atLeastOneOnTrack)
{
atLeastOneOnTrack = false;
byte c = (byte)networkStream.ReadByte();
for (int n = 0; n<_msgHeaders.Length; n++)
{
if (i > 0 && !isOnTrack[n]) continue;
isOnTrack[n] = (c == _msgHeaders[n][i]);
if (isOnTrack[n] && (i == _msgHeaders[n].Length-1)) return (MessageType)n;
atLeastOneOnTrack = atLeastOneOnTrack || isOnTrack[n];
}
i++;
}
return MessageType.Unknown;
}
catch (IOException ex)
{
// Stream closed
return MessageType.CancelSignal;
}
}
public static void SendMessageStream (Stream networkStream, Stream data, ITransportHeaders requestHeaders, byte[] buffer)
{
if (buffer == null) buffer = new byte[DefaultStreamBufferSize];
// Writes the message start header
byte[] dotnetHeader = _msgHeaders[(int)MessageType.MethodMessage];
networkStream.Write(dotnetHeader, 0, dotnetHeader.Length);
// Writes the length of the stream being sent (not including the headers)
int num = (int)data.Length;
buffer [0] = (byte) num;
buffer [1] = (byte) (num >> 8);
buffer [2] = (byte) (num >> 16);
buffer [3] = (byte) (num >> 24);
networkStream.Write(buffer, 0, 4);
// Writes the message headers
SendHeaders (networkStream, requestHeaders, buffer);
// Writes the stream
if (data is MemoryStream)
{
// The copy of the stream can be optimized. The internal
// buffer of MemoryStream can be used.
MemoryStream memStream = (MemoryStream)data;
networkStream.Write (memStream.GetBuffer(), 0, (int)memStream.Length);
}
else
{
int nread = data.Read (buffer, 0, buffer.Length);
while (nread > 0)
{
networkStream.Write (buffer, 0, nread);
nread = data.Read (buffer, 0, buffer.Length);
}
}
}
private static void SendHeaders(Stream networkStream, ITransportHeaders requestHeaders, byte[] buffer)
{
if (requestHeaders == null)
SendString (networkStream, "", buffer);
else
{
// Writes the headers as a sequence of strings
IEnumerator e = requestHeaders.GetEnumerator();
while (e.MoveNext())
{
DictionaryEntry hdr = (DictionaryEntry)e.Current;
SendString (networkStream, hdr.Key.ToString(), buffer);
SendString (networkStream, hdr.Value.ToString(), buffer);
}
SendString (networkStream, "", buffer);
}
}
public static ITransportHeaders ReceiveHeaders (Stream networkStream, byte[] buffer)
{
TransportHeaders headers = new TransportHeaders();
string key = ReceiveString (networkStream, buffer);
while (key != string.Empty)
{
headers[key] = ReceiveString (networkStream, buffer);
key = ReceiveString (networkStream, buffer);
}
return headers;
}
public static Stream ReceiveMessageStream (Stream networkStream, out ITransportHeaders headers, byte[] buffer)
{
if (buffer == null) buffer = new byte[DefaultStreamBufferSize];
// Gets the length of the data stream
int nr = 0;
while (nr < 4)
nr += networkStream.Read (buffer, nr, 4 - nr);
int byteCount = (buffer [0] | (buffer [1] << 8) |
(buffer [2] << 16) | (buffer [3] << 24));
// Reads the headers
headers = ReceiveHeaders (networkStream, buffer);
byte[] resultBuffer = new byte[byteCount];
nr = 0;
while (nr < byteCount)
nr += networkStream.Read (resultBuffer, nr, byteCount - nr);
return new MemoryStream(resultBuffer);
}
private static void SendString (Stream networkStream, string str, byte[] buffer)
{
// Allocates a buffer. Use the internal buffer if it is
// big enough. If not, create a new one.
int maxBytes = Encoding.UTF8.GetMaxByteCount(str.Length)+4; //+4 bytes for storing the string length
if (maxBytes > buffer.Length)
buffer = new byte[maxBytes];
int num = Encoding.UTF8.GetBytes (str, 0, str.Length, buffer, 4);
// store number of bytes (not number of chars!)
buffer [0] = (byte) num;
buffer [1] = (byte) (num >> 8);
buffer [2] = (byte) (num >> 16);
buffer [3] = (byte) (num >> 24);
// Write the string bytes
networkStream.Write (buffer, 0, num + 4);
}
private static string ReceiveString (Stream networkStream, byte[] buffer)
{
int nr = 0;
while (nr < 4)
nr += networkStream.Read (buffer, nr, 4 - nr);
// Reads the number of bytes (not chars!)
int byteCount = (buffer [0] | (buffer [1] << 8) |
(buffer [2] << 16) | (buffer [3] << 24));
if (byteCount == 0) return string.Empty;
// Allocates a buffer of the correct size. Use the
// internal buffer if it is big enough
if (byteCount > buffer.Length)
buffer = new byte[byteCount];
// Reads the string
nr = 0;
while (nr < byteCount)
nr += networkStream.Read (buffer, nr, byteCount - nr);
char[] chars = Encoding.UTF8.GetChars(buffer, 0, byteCount);
return new string(chars);
}
}
}
@@ -2,6 +2,7 @@
// System.Runtime.Remoting.Channels.Tcp.TcpServerChannel.cs
//
// Author: Rodrigo Moya ([email protected])
// Lluis Sanchez Gual ([email protected])
//
// 2002 (C) Copyright, Ximian, Inc.
//
@@ -13,63 +14,10 @@ using System.Net.Sockets;
using System.Net;
using System.Threading;
using System.IO;
using System.Runtime.Remoting.Channels.Simple;
namespace System.Runtime.Remoting.Channels.Tcp
{
public class TcpServerTransportSink : IServerChannelSink, IChannelSinkBase
{
IServerChannelSink next_sink;
public TcpServerTransportSink (IServerChannelSink next)
{
next_sink = next;
}
public IServerChannelSink NextChannelSink {
get {
return next_sink;
}
}
[MonoTODO]
public IDictionary Properties {
get {
throw new NotImplementedException ();
}
}
[MonoTODO]
public void AsyncProcessResponse (IServerResponseChannelSinkStack sinkStack, object state,
IMessage msg, ITransportHeaders headers, Stream stream)
{
throw new NotImplementedException ();
}
[MonoTODO]
public Stream GetResponseStream (IServerResponseChannelSinkStack sinkStack, object state,
IMessage msg, ITransportHeaders headers)
{
throw new NotImplementedException ();
}
public ServerProcessing ProcessMessage (IServerChannelSinkStack sinkStack,
IMessage requestMsg,
ITransportHeaders requestHeaders,
Stream requestStream,
out IMessage responseMsg,
out ITransportHeaders responseHeaders,
out Stream responseStream)
{
// this is the first sink, and TcpServerChannel does not call it.
throw new NotSupportedException ();
}
internal void InternalProcessMessage (Stream requestStream)
{
Console.WriteLine ("ProcessMessageInternal");
}
}
public class TcpServerChannel : IChannelReceiver, IChannel
{
int port = 0;
@@ -81,11 +29,12 @@ namespace System.Runtime.Remoting.Channels.Tcp
TcpServerTransportSink sink;
ChannelDataStore channel_data;
void Init (IServerChannelSinkProvider provider) {
if (provider == null) {
provider = new BinaryServerFormatterSinkProvider ();
void Init (IServerChannelSinkProvider serverSinkProvider)
{
if (serverSinkProvider == null) {
// FIXME: change soap for binary
serverSinkProvider = new SimpleServerFormatterSinkProvider ();
}
IServerChannelSink next_sink = provider.CreateSink (this);
host = Dns.GetHostByName(Dns.GetHostName()).HostName;
@@ -95,9 +44,20 @@ namespace System.Runtime.Remoting.Channels.Tcp
uris = new String [1];
uris [0] = GetChannelUri ();
}
channel_data = new ChannelDataStore (uris);;
// Gets channel data from the chain of channel providers
channel_data = new ChannelDataStore (uris);
IServerChannelSinkProvider provider = serverSinkProvider;
while (provider != null)
{
provider.GetChannelData(channel_data);
provider = provider.Next;
}
// Creates the sink chain that will process all incoming messages
IServerChannelSink next_sink = ChannelServices.CreateServerChannelSinkChain (serverSinkProvider, this);
sink = new TcpServerTransportSink (next_sink);
listener = new TcpListener (port);
@@ -113,21 +73,21 @@ namespace System.Runtime.Remoting.Channels.Tcp
public TcpServerChannel (IDictionary properties,
IServerChannelSinkProvider serverSinkProvider)
{
port = (int)properties ["port"];
port = Int32.Parse ((string)properties ["port"]);
Init (serverSinkProvider);
}
public TcpServerChannel (string name, int port,
IServerChannelSinkProvider serverSinkProvider)
{
name = name;
this.name = name;
this.port = port;
Init (serverSinkProvider);
}
public TcpServerChannel (string name, int port)
{
name = name;
this.name = name;
this.port = port;
Init (null);
}
@@ -158,35 +118,32 @@ namespace System.Runtime.Remoting.Channels.Tcp
return "tcp://" + host + ":" + port;
}
public string[] GetUrlsForUri (string uri)
{
string [] result = new String [1];
if (uri.IndexOf ('/') != 0)
result [0] = GetChannelUri () + "/" + uri;
else
result [0] = GetChannelUri () + uri;
return result;
}
public string[] GetUrlsForUri (string uri)
{
if (!uri.StartsWith ("/")) uri = "/" + uri;
string [] chnl_uris = channel_data.ChannelUris;
string [] result = new String [chnl_uris.Length];
for (int i = 0; i < chnl_uris.Length; i++)
result [i] = chnl_uris [i] + uri;
return result;
}
public string Parse (string url, out string objectURI)
{
int port;
string host = TcpChannel.ParseTcpURL (url, out objectURI, out port);
return "tcp://" + host + ":" + port;
return TcpChannel.ParseChannelUrl (url, out objectURI);
}
void WaitForConnections ()
{
while (true) {
while (true)
{
TcpClient client = listener.AcceptTcpClient ();
sink.InternalProcessMessage (client.GetStream ());
client.Close ();
ClientConnection reader = new ClientConnection (client, sink);
ThreadPool.QueueUserWorkItem ( new WaitCallback( reader.ProcessMessages));
}
}
@@ -201,6 +158,7 @@ namespace System.Runtime.Remoting.Channels.Tcp
}
server_thread = new Thread (new ThreadStart (WaitForConnections));
server_thread.IsBackground = true;
server_thread.Start ();
}
}
@@ -214,4 +172,53 @@ namespace System.Runtime.Remoting.Channels.Tcp
}
}
}
class ClientConnection
{
TcpClient _client;
TcpServerTransportSink _sink;
Stream _stream;
byte[] _buffer = new byte[TcpMessageIO.DefaultStreamBufferSize];
public ClientConnection (TcpClient client, TcpServerTransportSink sink)
{
_client = client;
_sink = sink;
}
public Stream Stream
{
get { return _stream; }
}
public byte[] Buffer
{
get { return _buffer; }
}
public void ProcessMessages(object data)
{
_stream = _client.GetStream();
bool end = false;
while (!end)
{
MessageType type = TcpMessageIO.ReceiveMessageType (_stream);
switch (type)
{
case MessageType.MethodMessage:
_sink.InternalProcessMessage (this);
break;
case MessageType.CancelSignal:
end = true;
break;
}
}
_stream.Close();
}
}
}
Loaded 100 of 811 files, more files were not shown because too many files have changed in this diff. Show more