Compare commits

..
116 Commits
Author SHA1 Message Date
nobody 62975301f2 This commit was manufactured by cvs2svn to create tag 'MCS_0_22'.
svn path=/tags/MCS_0_22/mcs/; revision=12236
2003-03-05 23:45:51 +00:00
Gonzalo Paniagua Javier f3609d9a4f 2003-03-05 Gonzalo Paniagua Javier <[email protected]>
* ASCIIEncoding.cs: fixed bug #38984.

svn path=/trunk/mcs/; revision=12235
2003-03-05 23:45:51 +00:00
Gonzalo Paniagua Javier 5ea869194c 2003-03-05 Gonzalo Paniagua Javier <[email protected]>
* ASCIIEncodingTest.cs: added a couple of asserts fot zero-length
	arrays.

svn path=/trunk/mcs/; revision=12234
2003-03-05 23:40:43 +00:00
Gonzalo Paniagua Javier 8f389f0504 2003-03-05 Aleksey Demakov <[email protected]>
* ASCIIEncoding.cs:
	* Latin1Encoding.cs: fix GetString (byte[]) and
	GetString (byte[], int, int) for zero-length case.

svn path=/trunk/mcs/; revision=12233
2003-03-05 23:37:21 +00:00
Per Arneng cb9e18ec9d Added classes:
SmtpMessage - A more sofisticated mail container than MailMessage
	MailAddress - A class that represents a mail address
	MailAddressCollection - A collection of mail adresses

Theese classes where added to support the funtionality of serveral
recievers and Cc and Bcc. And also to ensure the format of the
address strings.

svn path=/trunk/mcs/; revision=12230
2003-03-05 21:26:26 +00:00
Miguel de Icaza b585e440d2 2003-03-05 Miguel de Icaza <[email protected]>
* category.cs (CategoryUtils.CategoryFromName): Use StartsWith
	("Is") instead of a substring for (0,2) which was throwing an
	exception causing Category.None to be returned

svn path=/trunk/mcs/; revision=12228
2003-03-05 20:28:45 +00:00
Miguel de Icaza 8ea6302fef Flush
svn path=/trunk/mono/; revision=12224
2003-03-05 20:01:31 +00:00
Alexandre Pigolkine c16696b4ac check in for Dennis Hayes, see ChangeLog
svn path=/trunk/mcs/; revision=12222
2003-03-05 19:18:52 +00:00
Dick Porter e2ec869918 2003-03-05 Dick Porter <[email protected]>
* MemoryStreamTest.cs: Some more tests

svn path=/trunk/mcs/; revision=12219
2003-03-05 15:25:18 +00:00
Dietmar Maurer b89e80ddd2 2003-03-05 Dietmar Maurer <[email protected]>
* monobitset.c (mono_bitset_set_all): impl.

svn path=/trunk/mono/; revision=12218
2003-03-05 14:47:51 +00:00
Martin Baulig 4f16b08e11 2003-03-05 Martin Baulig <[email protected]>
* debug-jit.c, debug-jit.h: New files.  Moved all JIT-specific
	stuff here.

	* debug.c (mono_debug_add_method): Moved to debug-jit.c.
	(mono_debug_handle, mono_debug_initialized): Made them global.
	(replace_suffix): Removed, this isn't used anymore.
	(record_line_number): Moved to debug-jit.c.
	(debug_generate_method_lines): Moved to debug-jit.c
	(generate_line_number): Renamed to
	_mono_debug_generate_line_number() and made it global.
	(debug_update_il_offsets): Moved to debug-jit.c
	(mono_debug_get_image): Renamed to _mono_debug_get_image() and made
	it global.
	(address_from_il_offset): Renamed to
	_mono_debug_address_from_il_offset() and made it global.
	(il_offset_from_position): Moved to debug-jit.c
	(lookup_method): Renamed to _mono_debug_lookup_method() and made
	it global.
	(mono_debug_add_method): Moved to debug-jit.c.
	(mono_debug_create_notification_function): Use two new functions
	mono_debug_codegen_breakpoint() and mono_debug_codegen_ret()
	instead of x86_breakpoint() and x86_ret().

svn path=/trunk/mono/; revision=12217
2003-03-05 13:08:39 +00:00
Gonzalo Paniagua Javier 8428d51a90 2003-03-05 Gonzalo Paniagua Javier <[email protected]>
* MemoryStream.cs: general fixes and reformatted. Passes all tests in
	the new MemoryStreamTest.

svn path=/trunk/mcs/; revision=12213
2003-03-05 11:12:52 +00:00
Gonzalo Paniagua Javier 1d71da917c 2003-03-05 Gonzalo Paniagua Javier <[email protected]>
* MemoryStreamTest.cs: some nunit2 love. Added a bunch of new tests.

svn path=/trunk/mcs/; revision=12212
2003-03-05 11:06:42 +00:00
Paolo Molaro 7b9054aa4f Wed Mar 5 11:35:54 CET 2003 Paolo Molaro <[email protected]>
* monoresgen.cs: patch from Ian MacLean <[email protected]>
	to add the /compile option.

svn path=/trunk/mcs/; revision=12211
2003-03-05 10:40:28 +00:00
Gonzalo Paniagua Javier b89975d19e 2003-03-05 Gonzalo Paniagua Javier <[email protected]>
* MemoryStream.cs: undo my bogus fix in ToArray. Allow GetBuffer and
	ToArray even after closing the stream.

svn path=/trunk/mcs/; revision=12204
2003-03-05 02:24:44 +00:00
Gonzalo Paniagua Javier 0cc2a5b351 2003-03-05 Gonzalo Paniagua Javier <[email protected]>
* Queue.cs: fixed bug #39046.

svn path=/trunk/mcs/; revision=12202
2003-03-05 00:17:19 +00:00
Sebastien Pouliot b837de481d 2003-03-04 Sebastien Pouliot <[email protected]>
* crypto: Updated crypto status and plan

svn path=/trunk/mono/; revision=12201
2003-03-04 23:39:06 +00:00
Sebastien Pouliot cf3674f046 2003-03-04 Sebastien Pouliot <[email protected]>
* System.Security.build: Added a new output System.Security_cmp.dll
	which links with mscorlib. This version is to be used to generate
	the class status web page (required for CorCompare).

svn path=/trunk/mcs/; revision=12200
2003-03-04 23:35:13 +00:00
Sebastien Pouliot bba3d6b99d 2003-03-04 Sebastien Pouliot <[email protected]>
* makefile: System.Security (corlib) class status now compared
	with System.Security_cmp.dll (mscorlib) as required for CorCompare.

svn path=/trunk/mono/; revision=12199
2003-03-04 23:33:56 +00:00
Gonzalo Paniagua Javier c5fad80d07 2003-03-04 Gonzalo Paniagua Javier <[email protected]>
* SqlException.cs: implemented GetObjectData ().

svn path=/trunk/mcs/; revision=12195
2003-03-04 20:47:52 +00:00
Gonzalo Paniagua Javier fd91897a61 2003-03-04 Gonzalo Paniagua Javier <[email protected]>
* Win32Exception.cs: implemented GetObjectData ().

svn path=/trunk/mcs/; revision=12194
2003-03-04 20:44:31 +00:00
Gonzalo Paniagua Javier a05736ef43 2003-03-04 Gonzalo Paniagua Javier <[email protected]>
* list.unix: added RunInstallerAttribute.cs
	* System.ComponentModel/RunInstallerAttribute.cs: New file.

svn path=/trunk/mcs/; revision=12193
2003-03-04 20:27:43 +00:00
Gonzalo Paniagua Javier 44d61c55f9 Added missing file
svn path=/trunk/mcs/; revision=12192
2003-03-04 20:13:17 +00:00
Rafael Teixeira 442bf03103 2003/03/04 Rafael Teixeira <[email protected]>
* mb-parser.jay: added rule for Imports with alias
	* mb-parser.jay: Friend (internal) modifier was missing,
					 Shared modifier was expecting Static token erroneously
					 Modules must accept only a static constructor rule added
					 Constant declaration rule added
	* makefile & makefile.gnu : actually run the compiled program on test target

svn path=/trunk/mcs/; revision=12191
2003-03-04 19:58:58 +00:00
Tim Coleman 193d88d82e 2003-03-04 Tim Coleman <[email protected]>
* System.Data.OracleClient.Oci/OciEnvironmentHandle.cs:
		fix again

svn path=/trunk/mcs/; revision=12188
2003-03-04 19:29:38 +00:00
Tim Coleman ec3b48576b 2003-03-04 Tim Coleman <[email protected]>
* System.Data.OracleClient.Oci/OciDefineHandle.cs :
	* System.Data.OracleClient.Oci/OciEnvironmentHandle.cs :
	* System.Data.OracleClient.Oci/OciLobLocator.cs :
	* System.Data.OracleClient/OracleLob.cs :
		Fix win32 build

svn path=/trunk/mcs/; revision=12187
2003-03-04 19:27:36 +00:00
Atsushi Eno f6a5fc26b6 2003-03-05 Atsushi Enomoto <[email protected]>
* XmlDocumentFragment.cs, XmlElement.cs :
	  modified InnerXml (fragment type from Element to DocumentFragment).

	* XmlElement.cs : fixed WriteTo() ns check.
	* XmlNamespaceManager.cs : MS.NET allows Add() used two or more times.
	* XmlNode.cs : fixed ConstructNamespaceManager().

	* XmlConstructs.cs : added IsSpace, IsName, IsNameStart, IsNCName,
	  IsPubid with an int arg.
	* XmlReader.cs : changed to use XmlChar.cs (its role is as same as
	  XmlConstructs.cs).
	* XmlTextReader.cs :
	  improved error messages with line info.
	  / checking matching start and end tags.
	  / prevents the apperance of multiple root elements. (patch by Erik)
	  fixed and refactored ReadInnerXml() and ReadOuterXml()
	  changed to use XmlChar.cs.

	* XmlTextWriter.cs : changed to put element's xmlns at CloseStartTag ()
	  (It will help c14n implementation.)
	  / blocks multiple attribute output with element node.

svn path=/trunk/mcs/; revision=12186
2003-03-04 18:39:58 +00:00
Paolo Molaro 5b0dbd3c3f Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <[email protected]>
* socket-io.c:  handle case when AF_INET6 and AF_IPX are not defined
	(pointed out by Michael Adams).

svn path=/trunk/mono/; revision=12184
2003-03-04 17:08:50 +00:00
Gonzalo Paniagua Javier 307f7f0f90 use the freshly built mcs.exe
svn path=/trunk/mcs/; revision=12181
2003-03-04 15:31:23 +00:00
Tim Coleman 8c246fd3c7 2003-03-04 Tim Coleman <[email protected]>
* System.Data.OracleClient.Oci/IOciDescriptorHandle.cs:
	* System.Data.OracleClient.Oci/IOciHandle.cs:
	* System.Data.OracleClient.Oci/OciDescriptorType.cs:
		Removed. These are no longer used.
	* System.Data.OracleClient.Oci/OciParameterDescriptor.cs:
		Add new class
	* list:
		Add System.Data.OracleClient.Oci/OciParameterDescriptor.cs
		Rem System.Data.OracleClient.Oci/IOciDescriptorHandle.cs
		Rem System.Data.OracleClient.Oci/IOciHandle.cs
		Rem System.Data.OracleClient.Oci/OciDescriptorType.cs
	* System.Data.OracleClient/OciGlue.cs:
		Move the OCIAttrGet* methods into OciHandle
	* System.Data.OracleClient/OracleDataReader.cs:
	* System.Data.OracleClient/OracleParameter.cs:
		Change the way that columns are bound and described
	* System.Data.OracleClient.Oci/OciBindHandle.cs:
	* System.Data.OracleClient.Oci/OciDefineHandle.cs:
	* System.Data.OracleClient.Oci/OciDescriptorHandle.cs:
	* System.Data.OracleClient.Oci/OciEnvironmentHandle.cs:
	* System.Data.OracleClient.Oci/OciErrorHandle.cs:
	* System.Data.OracleClient.Oci/OciHandle.cs:
	* System.Data.OracleClient.Oci/OciLobLocator.cs:
	* System.Data.OracleClient.Oci/OciServerHandle.cs:
	* System.Data.OracleClient.Oci/OciServiceHandle.cs:
	* System.Data.OracleClient.Oci/OciSessionHandle.cs:
	* System.Data.OracleClient.Oci/OciStatementHandle.cs:
	* System.Data.OracleClient.Oci/OciTransactionHandle.cs:
		All handles now derive from OciHandle, and these classes
		have been rewritten as such.  Also attempted to implement
		the Dispose () methods for these classes.
	* System.Data.OracleClient.Oci/OciHandleType.cs:
		Add descriptor types into here because handles and
		descriptors are used in many of the same OCI functions.

svn path=/trunk/mcs/; revision=12176
2003-03-04 13:50:35 +00:00
Dick Porter 7efdf97a06 And the changelog
svn path=/trunk/mcs/; revision=12173
2003-03-04 12:56:00 +00:00
Dick Porter 24bb51445f 2003-03-04 Dick Porter <[email protected]>
* icall.c: Temporarily reverted the Double and Single ToString()
	change, because it broke nunit.

svn path=/trunk/mono/; revision=12172
2003-03-04 12:55:46 +00:00
Dick Porter 0230634cf9 2003-03-04 Dick Porter <[email protected]>
* Single.cs: Temporarily reverted the Double and Single ToString()
	change, because it broke nunit.

svn path=/trunk/mcs/; revision=12171
2003-03-04 12:52:51 +00:00
Paolo Molaro 3f3eaf781b Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <[email protected]>
* object.h, threads.h: make include files compatible with C++
	(patch by Jerome Laban <[email protected]>).

svn path=/trunk/mono/; revision=12168
2003-03-04 11:46:08 +00:00
Gonzalo Paniagua Javier a58d7e54e8 2003-03-04 Gonzalo Paniagua Javier <[email protected]>
* makefile:
	* class/library.build:
	* class/makefile.gnu: added Mono.Posix and System.Management.

svn path=/trunk/mcs/; revision=12167
2003-03-04 01:28:55 +00:00
Gonzalo Paniagua Javier 4db56925dc 2003-03-04 Gonzalo Paniagua Javier <[email protected]>
* HttpSessionState.cs: reworked to use SessionDictionary.
	* SessionDictionary.cs: implemented serialization/deserialization.

svn path=/trunk/mcs/; revision=12166
2003-03-04 01:23:51 +00:00
Tim Coleman a69be26d7d 2003-03-03 Tim Coleman <[email protected]>
* unix.args: Added
                System.Runtime.InteropServices/HandleRef.cs

svn path=/trunk/mcs/; revision=12165
2003-03-03 23:56:18 +00:00
Tim Coleman 78c4ae6e8e 2003-03-03 Tim Coleman <[email protected]>
* HandleRef.cs: Add this struct

svn path=/trunk/mcs/; revision=12164
2003-03-03 23:55:11 +00:00
Miguel de Icaza 77c3b5453b 2003-03-03 Miguel de Icaza <[email protected]>
* NameValueCollection.cs: Uncoment constructor, an old MCS bug
	prevented this from working.  Removed test for nullitude of col,
	as it would have aborted anyways on the dereference in the base
	constructor call.

svn path=/trunk/mcs/; revision=12163
2003-03-03 23:13:02 +00:00
Pedro Martínez Juliá 0e27d1f07a 2003-03-04 Pedro Mart�nez Juli� <[email protected]>
* Double.cs: Changed ToString method. Added NumberFormatInfo support
    with DoubleFormatter class.
    * Single.cs: Changed ToString method. Added NumberFormatInfo support
    with SingleFormatter class.
    * DoubleFormatter.cs: New class with Double formatting functions.
    * SingleFormatter.cs: New class with Single formatting functions.

svn path=/trunk/mono/; revision=12162
2003-03-03 23:02:31 +00:00
Pedro Martínez Juliá a11e947126 2003-03-04 Pedro Mart�nez Juli� <[email protected]>
* Double.cs: Changed ToString method. Added NumberFormatInfo support
    with DoubleFormatter class.
    * Single.cs: Changed ToString method. Added NumberFormatInfo support
    with SingleFormatter class.
    * DoubleFormatter.cs: New class with Double formatting functions.
    * SingleFormatter.cs: New class with Single formatting functions.

svn path=/trunk/mcs/; revision=12162
2003-03-03 23:02:31 +00:00
Sebastien Pouliot 1f51cf036a 2003-03-03 Sebastien Pouliot <[email protected]>
* RSACryptoServiceProvider.cs: Delay keypair generation event when
	keysize is a constructor parameter (major speed improvment when
	importing keys). Removed NotSupportedException when CspParameter is
	used in constructor (required for forthcoming security tools).

svn path=/trunk/mcs/; revision=12161
2003-03-03 22:55:21 +00:00
Sebastien Pouliot 96e4254985 2003-03-03 Sebastien Pouliot <[email protected]>
* XmlDsigBase64TransformTest.cs: Simplified some parts when fixing
	XPath test.

svn path=/trunk/mcs/; revision=12160
2003-03-03 22:46:24 +00:00
Sebastien Pouliot 15e8f4607c 2003-03-03 Sebastien Pouliot <[email protected]>
* System.Security_test.build: Updated build file to stop linking
	with MS assemblies (and like with Mono's corlib instead).

svn path=/trunk/mcs/; revision=12159
2003-03-03 22:44:33 +00:00
Sebastien Pouliot 8aeb1c2772 2003-03-03 Sebastien Pouliot <[email protected]>
* DSAKeyValue.cs: Added patch from Atsushi Eno (to remove string
	XML generation).
	* RSAKeyValue.cs: Added patch from Atsushi Eno (to remove string
	XML generation).
	* XmlDsigBase64Transform.cs: Fixed problem when using XPath.

svn path=/trunk/mcs/; revision=12158
2003-03-03 22:43:28 +00:00
Sebastien Pouliot ef46767f99 2003-03-03 Sebastien Pouliot <[email protected]>
* System.Security.build: Updated build file to stop linking with
	MS assemblies (and like with Mono's corlib instead).

svn path=/trunk/mcs/; revision=12157
2003-03-03 22:42:35 +00:00
Jean-Marc Andre 7f67f25643 2003-03-03 Jean-Marc Andre <[email protected]>
* RemotingServicesTest.cs: New unit test added

svn path=/trunk/mcs/; revision=12156
2003-03-03 21:24:31 +00:00
Miguel de Icaza 89a1c3131a 2003-03-03 Miguel de Icaza <[email protected]>
* interface.cs (Interface.DefineMembers): Avoid defining members
	twice.

svn path=/trunk/mcs/; revision=12152
2003-03-03 19:54:34 +00:00
Paolo Molaro 280ba73ac7 Speeling.
svn path=/trunk/mono/; revision=12151
2003-03-03 19:14:54 +00:00
Gonzalo Paniagua Javier 3a14f3caf3 New assembly and new class.
svn path=/trunk/mcs/; revision=12150
2003-03-03 19:10:00 +00:00
Paolo Molaro 14fdc4cc45 New entry.
svn path=/trunk/mono/; revision=12148
2003-03-03 17:51:20 +00:00
Lluis Sanchez 87e33fb506 Added IContributeDynamicSink.cs, IContributeEnvoySink.cs, IContributeObjectSink.cs
svn path=/trunk/mcs/; revision=12145
2003-03-03 17:16:13 +00:00
Lluis Sanchez 67f0439956 Added ContextAttribute.cs
svn path=/trunk/mcs/; revision=12144
2003-03-03 16:57:58 +00:00
Lluis Sanchez e84f2a9426 Added UrlAttribute.cs
svn path=/trunk/mcs/; revision=12143
2003-03-03 16:54:15 +00:00
Lluis Sanchez 07f0b96bc0 * unix.args: added ConstructionLevelActivator.cs, ContextLevelActivator.cs,
RemoteActivationAttribute.cs

svn path=/trunk/mcs/; revision=12142
2003-03-03 16:45:02 +00:00
Lluis Sanchez 21a8a1c413 * Thread.cs: Changed implementation of CurrentContext, adapted to the changes
in the runtime.

svn path=/trunk/mcs/; revision=12141
2003-03-03 16:44:10 +00:00
Lluis Sanchez 6f0ebcd9a5 * ProxyAttribute.cs: Implemented.
* RealProxy.cs: Added stubs for some missing methods.
	* RemotingProxy.cs: The activation constructor now creates the ConstructionCall
	  message and collects the context properties.
	  Activation of objects now use IActivator instances.

svn path=/trunk/mcs/; revision=12140
2003-03-03 16:42:50 +00:00
Lluis Sanchez ca2024d4b8 * ConstructionCall.cs: Added internal constructor. Added setter for activation attributes.
Some other minor corrections.
	* EnvoyTerminatorSink.cs: Message now redirected to current context's client sink chain.
	* MethodCall.cs: Added method for copying messages.

svn path=/trunk/mcs/; revision=12139
2003-03-03 16:42:17 +00:00
Lluis Sanchez d0ee41d86a * LeaseManager.cs: Added method for removing an object from the lease manager.
* LifetimeServices.cs: Added method for removing an object from the lease manager.

svn path=/trunk/mcs/; revision=12138
2003-03-03 16:41:36 +00:00
Lluis Sanchez ceb4b2a9b2 * Contexts.cs : Management of the default context moved to the runtime.
Implemented creation of the client context, server context, object and envoy sinks.
	  Added method for creating a new context.
	* CrossContextChannel.cs : Removed check for construction messages. Now construction
	  go through the IActivators.

svn path=/trunk/mcs/; revision=12137
2003-03-03 16:41:06 +00:00
Lluis Sanchez ae2aa396a8 * ChannelServices.cs: Minor corrections.
* CrossAppDomainChannel.cs: Context is now restored when exiting the domain.

svn path=/trunk/mcs/; revision=12136
2003-03-03 16:40:35 +00:00
Lluis Sanchez 42a1ccef13 * ActivationServices.cs: Added method for creating a proxy from a list
of activation attributes. This is used by System.Activator.
	  Added method for creating a ConstructionCall from a list of activation attributes.
	  This is used from RemotingProxy.
	* ConstructionLevelActivator.cs: Added. Implements an IActivator that constructs an object.
	* ContextLevelActivator.cs: Added. Implements an IActivator that constructs a context.
	* RemoteActivationAttribute.cs: Added.
	* RemoteActivator.cs: Used RemoteActivationAttribute in the creation of the server object.
	* UrlAttribute.cs: Removed some "throw new NotImplementedException ()".

svn path=/trunk/mcs/; revision=12135
2003-03-03 16:39:42 +00:00
Lluis Sanchez d521b3e35c * Identity.cs: Added property to check if an identity is connected (it is remotely accesible)
* ObjRef.cs: Added internal helper method for getting the server type of an ObjRef.
	* RemotingServices.cs: Implemented Disconnect method. Added support for custom proxy
	  creating using ProxyAttribute. Added support for activation attributes in creation
	  of proxies. Some other minor corrections.
	* ServerIdentity.cs: minor corrections.

svn path=/trunk/mcs/; revision=12134
2003-03-03 16:39:13 +00:00
Rafael Teixeira 5e05883f3a 2003/03/03 Rafael Teixeira <[email protected]>
* mb-tokenizer.cs : new semi-keywords: Compare, Explicit, Strict, On, Off, Binary, Text
	* mb-parser.jay: tokens for above semi-keywords, and rules for option directives
	* driver.cs: integrates command line options with parser flags for option directives
	* makefile & makefile.gnu : added 'verbose' target that uses --verbose switch to compile 
	  the test source and pipes it through 'less', also added a Extended Syntax source

svn path=/trunk/mcs/; revision=12133
2003-03-03 16:39:09 +00:00
Lluis Sanchez 638444081f * Activator.cs: Added support for activation using activation attributes.
* AppDomain.cs: Added internal method to get the default context from the runtime.

svn path=/trunk/mcs/; revision=12132
2003-03-03 16:38:21 +00:00
Lluis Sanchez fdda64a77a * appdomain.c: Added method for initializing the default context of
a domain. Added internal call for getting the default context.
	* appdomain.h: Added context variable in MonoDomain struct.
	* domain.c: mono_domain_set also sets the default context of the domain
	* icall.c: Mapped internal method InternalGetDefaultContext.
	* object.c: mono_object_get_virtual_method returns always a remoting
	wrapper if the object is a transparent proxy.
	mono_runtime_invoke_array: when creating an object by calling the
	constructor, if the created object is a proxy, then the constructor should
	be called using the a remoting wrapper.

svn path=/trunk/mono/; revision=12131
2003-03-03 16:35:22 +00:00
Dick Porter 3420a036b9 2003-03-03 Dick Porter <[email protected]>
* io.c (CreateFile): Try opening directories readonly, so that
	timestamps can be adjusted.  Patch by Elan Feingold
	<[email protected]>.

svn path=/trunk/mono/; revision=12121
2003-03-03 13:23:20 +00:00
Dick Porter 86593032da 2003-03-03 Dick Porter <[email protected]>
* socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
	variable so it compiles on solaris.  Problem spotted by
	Christopher Taylor <[email protected]>

svn path=/trunk/mono/; revision=12120
2003-03-03 13:19:26 +00:00
Gonzalo Paniagua Javier 054a3a3368 2003-02-13 Gonzalo Paniagua Javier <[email protected]>
* data/machine.config: added default sessionState section and handler.

svn path=/trunk/mono/; revision=12119
2003-03-03 12:23:11 +00:00
Gonzalo Paniagua Javier 2342462642 2003-03-03 Gonzalo Paniagua Javier <[email protected]>
* list: added SessionConfig.cs and SessionStateSectionHandler.cs

	* System.Web/HttpHelper.cs: store the values in an ArrayList to get
	them in correct order.

	* System.Web.Configuration/ModuleItem.cs: it's not public.
	* System.Web.Configuration/ModulesConfiguration.cs: it's not public.

	* System.Web.SessionState/SessionConfig.cs:
	* System.Web.SessionState/SessionStateSectionHandler.cs: new files to
	read <sessionState> configuration.

svn path=/trunk/mcs/; revision=12118
2003-03-03 12:21:34 +00:00
Gonzalo Paniagua Javier 1727ec736b 2003-03-03 Gonzalo Paniagua Javier <[email protected]>
* Directory.cs:
	(Move): don't use File.Move.

	* DirectoryInfo.cs: fixed Name property.

	Fixes bug #37755.

svn path=/trunk/mcs/; revision=12116
2003-03-03 10:33:05 +00:00
Nick Drochak 66b156e640 2003-03-03 Nick Drochak <[email protected]>
* StringTest.cs: Catch exception the .NET docs say should not be thrown

svn path=/trunk/mcs/; revision=12115
2003-03-03 09:25:57 +00:00
Jackson Harper f4575fd229 * PEAPI.cs: Add file
* README.txt: Add file

svn path=/trunk/mcs/; revision=12113
2003-03-03 00:29:47 +00:00
Jackson Harper 3eb9288a4c Add PEAPI directory
svn path=/trunk/mcs/; revision=12112
2003-03-03 00:27:40 +00:00
Gonzalo Paniagua Javier c6b2a68290 2003-03-03 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs:
	(SendTo): fix from Jerome Laban <[email protected]>.

svn path=/trunk/mcs/; revision=12111
2003-03-03 00:12:24 +00:00
Miguel de Icaza cc1640ad2a Fix typo
svn path=/trunk/mcs/; revision=12110
2003-03-02 23:00:30 +00:00
Miguel de Icaza c4c409cc20 flush
svn path=/trunk/mono/; revision=12109
2003-03-02 22:54:56 +00:00
Miguel de Icaza c15b0b5e01 Flushety flush
svn path=/trunk/mono/; revision=12108
2003-03-02 22:26:59 +00:00
Miguel de Icaza b459bf6d1e Flush Flush
svn path=/trunk/mono/; revision=12106
2003-03-02 21:15:44 +00:00
Gonzalo Paniagua Javier 875ad2454d 2003-03-02 Gonzalo Paniagua Javier <[email protected]>
* DirectoryInfo.cs: changed ToString to match MS behavior.
	* Path.cs: further fixes to GetDirectoryName to return null in the
	same cases that MS does.

	Fixes bug #38387.

svn path=/trunk/mcs/; revision=12105
2003-03-02 17:18:51 +00:00
Gonzalo Paniagua Javier d4182fdfac 2003-03-02 Gonzalo Paniagua Javier <[email protected]>
* Path.cs: fixed a couple of bugs reported in #35906.

svn path=/trunk/mcs/; revision=12104
2003-03-02 16:42:52 +00:00
Sebastien Pouliot a89d081fef 2003-03-02 Sebastien Pouliot <[email protected]>
* list.unix: Added XmlSignature.cs.

svn path=/trunk/mcs/; revision=12103
2003-03-02 16:13:14 +00:00
Gonzalo Paniagua Javier 01a8a4e3cb 2003-03-02 Gonzalo Paniagua Javier <[email protected]>
* AppSettingsReader.cs: fixed bug #38755.

svn path=/trunk/mcs/; revision=12102
2003-03-02 16:12:55 +00:00
Sebastien Pouliot 18e37330b6 2003-03-02 Sebastien Pouliot <[email protected]>
* KeyInfoNameTest.cs: Better naming.
	* KeyInfoRetrievalMethodTest.cs: Splitted a test.

svn path=/trunk/mcs/; revision=12101
2003-03-02 16:12:33 +00:00
Sebastien Pouliot 2d91f6724f 2003-03-02 Sebastien Pouliot <[email protected]>
* DSAKeyValue.cs: New XML generation is commented. Old string technique
	did a better job to match MS implementation.
	* DataObject.cs: Replaced XML generation from StringBuilder to XmlElement.
	* KeyInfo.cs: Replaced XML generation from StringBuilder to XmlElement.
	* KeyInfoName.cs: Replaced XML generation from StringBuilder to XmlElement.
	* KeyInfoNode.cs: Replaced XML generation from StringBuilder to XmlElement.
	* KeyInfoRetrievalMethod.cs: Replaced XML generation from StringBuilder to XmlElement.
	* KeyInfoX509Data.cs: Replaced XML generation from StringBuilder to XmlElement.
	* RSAKeyValue.cs: New XML generation is commented. Old string technique
	did a better job to match MS implementation.
	* Reference.cs: Replaced XML generation from StringBuilder to XmlElement.
	* Signature.cs: Replaced XML generation from StringBuilder to XmlElement.
	* SignedInfo.cs: Replaced XML generation from StringBuilder to XmlElement.
	* SignedXml.cs: Replaced XML generation from StringBuilder to XmlElement.
	* Transform.cs: Replaced XML generation from StringBuilder to XmlElement.
	* XmlDsigEnvelopedSignatureTransform.cs: Added missing Algorithm URL.
	* XmlDsigXPathTransform.cs: Added missing Algorithm URL.
	* XmlSignature.cs: New. Private contants (construct similar to WSE).

svn path=/trunk/mcs/; revision=12100
2003-03-02 16:09:19 +00:00
Alexandre Pigolkine edde6cf456 checkin for Dennis Hayes, see changeLog for details
svn path=/trunk/mcs/; revision=12099
2003-03-02 09:12:37 +00:00
Sebastien Pouliot a2bdd1500f 2003-03-01 Sebastien Pouliot <[email protected]>
* PKCS1.cs: Fix for some (lame) PKCS1 v1.5 signatures done
	without specifying an OID.

svn path=/trunk/mcs/; revision=12097
2003-03-01 22:29:49 +00:00
Alexandre Pigolkine 9e7d9a15bd see ChangeLog for details
svn path=/trunk/mcs/; revision=12096
2003-03-01 22:24:20 +00:00
Alexandre Pigolkine ba55638ad6 see ChangeLog for details
svn path=/trunk/mcs/; revision=12092
2003-03-01 21:20:31 +00:00
Sebastien Pouliot 4926072584 2003-03-01 Sebastien Pouliot <[email protected]>
* X509CertificateCollection.cs: Fixed bugs in AddRange
	(added the collection not the certificates in the collection).

svn path=/trunk/mcs/; revision=12091
2003-03-01 21:16:05 +00:00
Alexandre Pigolkine 949c372713 added stubs to compile SWF
svn path=/trunk/mcs/; revision=12090
2003-03-01 20:49:10 +00:00
Gonzalo Paniagua Javier 37659d83e3 the cvsroot's been changed to 'mono'
svn path=/trunk/mono/; revision=12089
2003-03-01 19:41:41 +00:00
Miguel de Icaza 980892ae50 Fix from Gonz
svn path=/trunk/mcs/; revision=12088
2003-03-01 19:40:35 +00:00
Jackson Harper 00d6b70cf6 * Image.cs: Write Metadata root
svn path=/trunk/mcs/; revision=12087
2003-03-01 19:27:35 +00:00
Jackson Harper 5ea6e1b9fc * MDStream.cs: Add methods to write metadata streams
svn path=/trunk/mcs/; revision=12086
2003-03-01 19:21:03 +00:00
Gonzalo Paniagua Javier c8ed8a5d53 2003-03-01 Gonzalo Paniagua Javier <[email protected]>
* appdomain.c:
	(get_info_from_assembly_name): don't leak value.

	* icall.c:
	(ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
	result.

svn path=/trunk/mono/; revision=12085
2003-03-01 19:19:58 +00:00
Miguel de Icaza 946769ee24 Patch from Aleksey Ryabchuk <[email protected]>
svn path=/trunk/mcs/; revision=12084
2003-03-01 19:13:08 +00:00
Gonzalo Paniagua Javier 3472c164c3 2003-03-01 Gonzalo Paniagua Javier <[email protected]>
* unix.args: added ModuleResolveEventHandler.cs

	* System.Reflection/Assembly.cs: added missing stuff. Only ModuleResolve
	event is left out to avoid changing MonoReflectionAssembly by now.
	* System.Reflection/ModuleResolveEventHandler.cs: delegate.

svn path=/trunk/mcs/; revision=12083
2003-03-01 18:57:54 +00:00
Jackson Harper d036dd6f19 * MetaDataRoot.cs: Add method to write Metadata
svn path=/trunk/mcs/; revision=12082
2003-03-01 18:54:54 +00:00
Gonzalo Paniagua Javier 9b9cbe14c1 2003-03-01 Gonzalo Paniagua Javier <[email protected]>
* Directory.cs: fixed bugs #38939 and #38940. No need for separate
	unix/windows/unc shares code paths.

svn path=/trunk/mcs/; revision=12081
2003-03-01 17:32:30 +00:00
Gonzalo Paniagua Javier 065279f2be documented MONO_CFG_DIR environment variable
svn path=/trunk/mono/; revision=12080
2003-03-01 16:02:36 +00:00
Paolo Molaro aa392b5f39 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <[email protected]>
* assembly.c: export mono_image_load_references ().
	* class.c: handle function pointers. mono_class_from_name() now
	supports nested type names directly.

svn path=/trunk/mono/; revision=12079
2003-03-01 14:38:59 +00:00
Paolo Molaro 5fc61b3a3b Sat Mar 1 12:36:45 CET 2003 Paolo Molaro <[email protected]>
* jit.c: remove unnecessary assert when inlining.

svn path=/trunk/mono/; revision=12075
2003-03-01 11:40:46 +00:00
Miguel de Icaza fbcf51142f Flush
svn path=/trunk/mono/; revision=12069
2003-02-28 20:08:10 +00:00
Zoltan Varga 53f7fd7b57 2003-02-28 Zoltan Varga <[email protected]>
* ILGenerator.cs (Emit): Add fixup for already created methods and
	fields. Do not add fixup for types since their table index do not
	change any more.

svn path=/trunk/mcs/; revision=12067
2003-02-28 18:41:17 +00:00
Zoltan Varga eb4a498e41 2003-02-28 Zoltan Varga <[email protected]>
* reflection.h reflection.c: Encode already created dynamic methods
	and fields correctly as a DEF instead of a REF.

	* reflection.c: Get rid of the force_ref argument to
	mono_image_typedef_or_ref since it was wrong in the first place.

svn path=/trunk/mono/; revision=12066
2003-02-28 18:36:47 +00:00
Zoltan Varga fd41207b81 2003-02-28 Zoltan Varga <[email protected]>
* StringTest.cs: added String constructor tests.

svn path=/trunk/mcs/; revision=12064
2003-02-28 16:25:03 +00:00
Zoltan Varga 6e9001f1e2 2003-02-28 Zoltan Varga <[email protected]>
* string-icalls.c: add error checking to string constructors according
	to the MSDN docs.

svn path=/trunk/mono/; revision=12063
2003-02-28 16:24:03 +00:00
Zoltan Varga 14f6bf0594 2003-02-28 Zoltan Varga <[email protected]>
* reflection.c: Emit types in the order their TypeBuilders were
	created. Previously, a new table index was assigned to each type before
	the tables were emitted. This was wrong because the signature blob
	might already refer to a type by its original table index.

svn path=/trunk/mono/; revision=12062
2003-02-28 15:24:37 +00:00
Gonzalo Paniagua Javier 3ca2ba376e added 3 missing assemblies for windows install target
svn path=/trunk/mcs/; revision=12061
2003-02-28 14:51:49 +00:00
Per Arneng f4c01192b0 Updated with a change to the parsing code. some servers
send 200-xxxxx instead of 200 xxxxxx. Thnx Elan Feingold

svn path=/trunk/mcs/; revision=12059
2003-02-28 10:55:57 +00:00
Reggie Burnett dd52b9a794 * Added several external functions to Win32funcs.cs
* Added necessary LoadLibrary to RichTextEdit to load common control library

svn path=/trunk/mcs/; revision=12058
2003-02-28 08:43:13 +00:00
Aleksey Demakov 658b2bb4a2 *** empty log message ***
svn path=/trunk/mcs/; revision=12057
2003-02-28 08:39:18 +00:00
Gonzalo Paniagua Javier dcc8dfb3af 2003-02-28 Gonzalo Paniagua Javier <[email protected]>
* Socket.cs: patch from Elan Feingold <[email protected]>. Fixes
	NullReferenceException when the callback is null.

svn path=/trunk/mcs/; revision=12056
2003-02-28 08:00:46 +00:00
Christopher Bockner d670275678 Removed the unsafe dependencies from the driver.
svn path=/trunk/mcs/; revision=12049
2003-02-28 03:48:13 +00:00
Miguel de Icaza 0b975bbbb3 update release page
svn path=/trunk/mono/; revision=12048
2003-02-27 23:13:33 +00:00
309 changed files with 15433 additions and 3724 deletions

No files matched your search

+4
View File
@@ -1,3 +1,7 @@
2003-02-13 Gonzalo Paniagua Javier <[email protected]>
* data/machine.config: added default sessionState section and handler.
2003-02-17 Daniel Morgan <[email protected]>
* doc/provider-factory: add new web page
+3
View File
@@ -19,6 +19,8 @@
type="System.Web.Configuration.AuthorizationConfigHandler, System.Web" />
<section name="globalization"
type="System.Web.Configuration.GlobalizationConfigurationHandler, System.Web" />
<section name="sessionState"
type="System.Web.SessionState.SessionStateSectionHandler, System.Web" />
</sectionGroup>
</configSections>
<system.web>
@@ -49,6 +51,7 @@
culture="en-US"
uiculture="en-US" />
-->
<sessionState mode="InProc" />
</system.web>
<appSettings>
+69 -45
View File
@@ -27,14 +27,14 @@
* 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 (see
Mono.Security.Win32 assembly section).
under Windows). A Windows specific alternative is available
using the Mono.Security.Win32 assembly.
* Keypair persistance for RSA and DSA. This persistance must
somehow be linked with X509 certificate stores (in planning).
* <code>PasswordDeriveBytes.CryptDeriveKey</code> is included
in the BCL to provide compatibility with existing Windows
in MS BCL to provide compatibility with existing Windows
applications. The main problem is that the key derivation
algorithm can be different for every CSP (Crypto Service
Provider). However for compatibility we should provide an
@@ -54,6 +54,9 @@
classes named <code>*CryptoServiceProvider</code>, with the
exception of <code>RNGCryptoServiceProvider</code> (which
resides in the runtime).
* Look at assembly Mono.Security.Win32 if you require more
compatiblity with the Microsoft implementation (like accessing
a particuliar keypair container in a CSP).
</ul>
@@ -62,17 +65,17 @@
**** Status
<ul>
* X.509 certificates are parsed using 100% managed code
(using an internal ASN.1 class).
(using the Mono.Security.ASN1 class).
* 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
* Unit 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).
complete test (but isn't part of the standard test suite for
size and time consideration).
</ul>
**** TODO
@@ -89,18 +92,20 @@
**** 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 <b>never</b>
checked (except when used for Authenticode, i.e.
* Except for their structure <b>there are no validation of the
certificates</b> done by this class (this is by design and
isn't a restriction of Mono!). This means that certificate
signatures and validity dates are <b>never</b> checked
(except when used for Authenticode, i.e.
<code>CreateFromSignedFile</code>).
* The newer X509Certificate class included in Microsoft's Web
Service Enhancement (WSE) is a little better (as it includes
CryptoAPI's validation) when <code>IsCurrent</code> is called.
See assembly <b>Microsoft.Web.Services</b> for more details.
* Microsoft implementation of <code>X509Certificate</code> is
done by using CryptoAPI (unmanaged). From the exceptions
done by using CryptoAPI (unmanaged code). From the exceptions
thrown Authenticode(tm) support is done via COM.
</ul>
@@ -115,13 +120,10 @@
**** Status
<ul>
* All classes are present but some (Transforms) are only
* All classes are present but some (most Transforms) are only
stubbed.
* Most classes have their unit tests.
* This assembly is present in CVS but only available when
building using NAnt (i.e. makefile are missing).
</ul>
**** TODO
@@ -132,8 +134,30 @@
signing (not because the transforms works). In the short
term <code>libxml2</code> could be used to provide C14N, but
in the long term a fully managed class would be much better.
</ul>
* Makefile for building under non-Windows operating systems.
<hr>
** Assembly: Mono.Security
This assembly provides the missing pieces to .NET security. On Windows
CryptoAPI is often used to provide much needed functionalities (like
some cryptographic algorithms, code signing, X.509 certificates).
*** Namespace: Mono.Security
*** Namespace: Mono.Security.Authenticode
*** Namespace: Mono.Security.Cryptography
*** Namespace: Mono.Security.X509
*** Namespace: Mono.Security.X509.Extensions
**** Status
<ul>
* Work has been under way for quite some time - and should
start hitting CVS soon.
* A big part of this assembly is also included inside Mono's
corlib. The class are duplicated in this assembly so the
functionalities can be used with a dependency on Mono's
corlib (which depends on Mono's runtime).
</ul>
<hr>
@@ -152,7 +176,9 @@
**** Status
<ul>
* A RNGCryptoServiceProvider built on top of CryptoAPI.
* A RNGCryptoServiceProvider built on top of CryptoAPI. This
allows Windows users to get around the limitation of the
runtime RNG (which requires <code>/dev/[u]random/</code>).
* Wrapper classes for unmanaged versions of hash algorithms:
MD2, MD4, MD5 and SHA1 are supported. <b>note</b>: some
@@ -179,30 +205,34 @@
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.
extending <code>System.Security.Cryptography.Xml</code>) and X.509
certificates classes.
Note: WSE is distributed as an add-on because the WS-Security
specification isn't yet completed by
<a href="http://www.oasis-open.org/committees/wss/">OASIS</a>.
Note: WSE is distributed as an add-on because some specifications,
like WS-Security, aren't yet completed by
<a href="http://www.oasis-open.org/committees/wss/">OASIS</a> or
other committees.
<b>There are some licensing issues to consider before stating to
<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
*** Namespace: Microsoft.Web.Services.Timestamp
**** Status
<ul>
* Nothing (yet) commited in CVS.
* Nothing (yet) commited in CVS <b>[*]</b>.
</ul>
*** Namespace: Microsoft.Web.Services.Security.X509
**** Status
<ul>
* Nothing (yet) commited in CVS.
* Nothing (yet) commited in CVS. However the classes in this
namespace are outside WS-Security scope. So development
could be done without signing any agreements.
</ul>
**** TODO
@@ -213,21 +243,7 @@
</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
** Tools
There are many tools in the .NET framework that indirectly interacts
with some cryptographic classes. Mono will eventually need these tools.
@@ -267,6 +283,14 @@
Note that many of the tools requires the class library and/or the
runtime to be ready for them.
<hr>
** Other stuff
<ul>
* SSL/TLS for secure communication (a prototype is under way).
</ul>
<hr>
** How to Help
@@ -274,9 +298,9 @@
Add missing unit tests to classes or methods.
Write some documentation on the cryptographic classes for MonkeyGuide
(as I'm not a good writer, at least in English, but you must be a good
reader if you got to this part).
Write some documentation on the cryptographic classes for the
<a href="http://go-mono.com/tutorial/html/en/index.html">Mono
Handbook</a> as I'm not a good writer (at least in English).
Optimization can also be done on algorithms as crypto is never fast
enough. Just be sure to test every optimization (using the unit test)
@@ -287,4 +311,4 @@
informations about the status of the cryptographic classes.
<hr>
Last reviewed: February 5, 2003 (post mono 0.19)
Last reviewed: March 4, 2003 (post mono 0.21)
+104 -36
View File
@@ -13,17 +13,13 @@
section</a>, the <a
href="http://www.go-mono.org/faq.html">FAQ</a>.
<b>Important</b>: The contributed binaries for Windows
binaries of Mono 0.20 contained a virus. Please read <a
href="virus.html">this</a> if you installed the binary.
<table>
<tbody>
<tr bgcolor="#DDDDDD">
<td>
<b>Release 0.20</b><br>
<a href="archive/mono-0.20">Release notes</a><br>
Jan 20th, 2003
<b>Release 0.21</b><br>
<a href="archive/mono-0.21">Release notes</a><br>
Jan 21th, 2003
</td>
<td>
<table cellspacing="1" cellpadding="3">
@@ -33,11 +29,10 @@
</td>
<td>
<ul>
<li><a href="archive/mcs-0.20.tar.gz">Mono Class Libraries and C# Compiler.</a>
<li><a href="archive/mono-0.20.tar.gz">Mono Runtime</a>
<li><a href="archive/mcs-0.21.tar.gz">Mono Class Libraries and C# Compiler.</a>
<li><a href="archive/mono-0.21.tar.gz">Mono Runtime</a>
<li><a href="archive/gc6.1.tar.gz">Boehm GC 6.1</a>
<li><a href="archive/xsp-0.3.tar.gz">XSP web server (0.3)</a>
<li><a href="archive/mono-debugger-0.2.0.tar.gz">Mono Debugger 0.2.0</a> <b><font color="#dd0000">New!</font></b>
</ul>
</td>
</tr>
@@ -49,7 +44,7 @@
<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.20-1.src.rpm">mono-0.20-1.src.rpm</a>
<li><a href="archive/mono-0.21-1.src.rpm">mono-0.21-1.src.rpm</a>
</ul>
</td>
</tr>
@@ -62,8 +57,8 @@
<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.20-1.i386.rpm">mono-0.20-1.i386.rpm</a>
<li><a href="archive/redhat-73-i386/mono-devel-0.20-1.i386.rpm">mono-devel-0.20-1.i386.rpm</a>
<li><a href="archive/redhat-73-i386/mono-0.21-1.i386.rpm">mono-0.21-1.i386.rpm</a>
<li><a href="archive/redhat-73-i386/mono-devel-0.21-1.i386.rpm">mono-devel-0.21-1.i386.rpm</a>
</ul>
</td>
<td bgcolor="#999999">
@@ -71,8 +66,8 @@
<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.20-1.i386.rpm">mono-0.20-1.i386.rpm</a>
<li><a href="archive/redhat-72-i386/mono-devel-0.20-1.i386.rpm">mono-devel-0.20-1.i386.rpm</a>
<li><a href="archive/redhat-72-i386/mono-0.21-1.i386.rpm">mono-0.21-1.i386.rpm</a>
<li><a href="archive/redhat-72-i386/mono-devel-0.21-1.i386.rpm">mono-devel-0.21-1.i386.rpm</a>
</ul>
</td>
</tr>
@@ -82,8 +77,8 @@
<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.20-1.i386.rpm">mono-0.20-1.i386.rpm</a>
<li><a href="archive/redhat-71-i386/mono-devel-0.20-1.i386.rpm">mono-devel-0.20-1.i386.rpm</a>
<li><a href="archive/redhat-71-i386/mono-0.21-1.i386.rpm">mono-0.21-1.i386.rpm</a>
<li><a href="archive/redhat-71-i386/mono-devel-0.21-1.i386.rpm">mono-devel-0.21-1.i386.rpm</a>
</ul>
</td>
<td bgcolor="#999999">
@@ -91,8 +86,8 @@
<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.20-1.i586.rpm">mono-0.20-1.i586.rpm</a>
<li><a href="archive/mandrake-82-i386/mono-devel-0.20-1.i586.rpm">mono-devel-0.20-1.i586.rpm</a>
<li><a href="archive/mandrake-82-i386/mono-0.21-1.i586.rpm">mono-0.21-1.i586.rpm</a>
<li><a href="archive/mandrake-82-i386/mono-devel-0.21-1.i586.rpm">mono-devel-0.21-1.i586.rpm</a>
</ul>
</td>
</tr>
@@ -102,27 +97,12 @@
<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.20-1.i386.rpm">mono-0.20-1.i386.rpm</a>
<li><a href="archive/suse-80-i386/mono-devel-0.20-1.i386.rpm">mono-devel-0.20-1.i386.rpm</a>
<li><a href="archive/suse-80-i386/mono-0.21-1.i386.rpm">mono-0.21-1.i386.rpm</a>
<li><a href="archive/suse-80-i386/mono-devel-0.21-1.i386.rpm">mono-devel-0.21-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.20-1.i386.rpm">mono-0.20-1.i386.rpm</a>
<li><a href="archive/redhat-80-i386/mono-devel-0.20-1.i386.rpm">mono-devel-0.20-1.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.20-stable-win32-2.exe">Mono-Setup</a>
</ul>
</td>
<td bgcolor="#999999">
<b>Debian packages</b>
<ul>
@@ -130,6 +110,14 @@
</ul>
</td>
</tr>
<tr>
<td bgcolor="#999999">
<b>Windows Setup Wizard (NT/2000/XP)</b>
<ul>
<li><a href="archive/mono-0.21-win32-1.exe">Mono-Setup</a>
</ul>
</td>
</tr>
</table>
</td>
</tr>
@@ -153,6 +141,86 @@
We provide binaries for older releases until we have packages for the new release.
<table>
<tbody>
<tr bgcolor="#DDDDDD">
<td>
<b>Release 0.20</b><br>
<a href="archive/mono-0.20">Release notes</a><br>
Jan 20th, 2003
</td>
<td>
<table cellspacing="1" cellpadding="3">
<tr bgcolor="#BBBBBB">
<td>
<b>Source Code</b>
</td>
<td>
<ul>
<li><a href="archive/mcs-0.20.tar.gz">Mono Class Libraries and C# Compiler.</a>
<li><a href="archive/mono-0.20.tar.gz">Mono Runtime</a>
<li><a href="archive/gc6.1.tar.gz">Boehm GC 6.1</a>
<li><a href="archive/xsp-0.3.tar.gz">XSP web server (0.3)</a>
</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.20-1.src.rpm">mono-0.20-1.src.rpm</a>
</ul>
</td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<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.20-1.i386.rpm">mono-0.20-1.i386.rpm</a>
<li><a href="archive/redhat-80-i386/mono-devel-0.20-1.i386.rpm">mono-devel-0.20-1.i386.rpm</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>
<tr>
<td bgcolor="#999999">
<b>Windows Setup Wizard (NT/2000/XP)</b>
<ul>
<li><a href="archive/mono-0.20-stable-win32-2.exe">Mono-Setup</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>
<table>
<tbody>
<tr bgcolor="#DDDDDD">
+29 -11
View File
@@ -721,26 +721,44 @@ A: Replace the __stdcall attribute with the STDCALL macro, and include this
<a name="asp">
** Mono and ASP.NET
Q: Is Mono supporting ASP.NET?
Q: Does Mono support ASP.NET?
A: Yes. The development of the support for ASP.NET comes in various stages,
here is what Gonzalo has been working on: 1. The Parser. 2. Getting the
parser to generate output compatible with ASP.NET. 3. Running the sample
output with the real Microsoft runtime but using our generated page. 4.
Running the sample with our classes with the .NET runtime. 5. Running
our sample code with our classes with our runtime. This is the process
we are following. Currently Gonzalo has reached point 5.
A: Yes.
Mono supports ASP.NET, we have shown an unmodified IBuySpy
installation running on Mono as well as various other programs. You can
try it yourself downloading the XSP server.
Q: Do I need install cygwin to work on ASP.NET in mono or Linux is enough since
it is self host right now.
A: Linux is enough.
Q: How can I run ASP.NET-based applications with Mono?
A: You need the Mono runtime and a hosting web server. Currently we distribute a
small web server called `xsp' which is used to debug applications, or you can choose
to use Daniel's Apache 2 module.
Q: Any plan to make ASP.NET in mono works with Apache in Linux?.
A: Yes, we have plans to do so, but we need to wait for Patrik's patches to
HttpRuntime. Once that is there, writing a mod_mono should be trivial
(look at mono/samples/embed for a sample embedded application).
A: Daniel has authored an Apache2 Module for Mono that hosts the ASP.NET runtime
and is available here: <a
href="http://apacheworld.org/modmono/">http://apacheworld.org/modmono/</a>
Q: Will you support Apache 1?
A: Modules developed for Apache 2 are not compatible with Apache 1.3
Daniel plans to support Apache 1.3 in the future but the current focus is on
Apache 2, because of the better support for threading and Windows.
Q: Can I run Apache 1 and Apache 2 on the same machine?
You can always keep a copy of Apache 2 running in paralell with your Apache
1.3 (either different port or using a reverse proxy).
You can also bind the two servers to different IP addresses on the
same physical machine.
<a name="ado">
** Mono and ADO.NET
+8
View File
@@ -13,6 +13,14 @@ Some of them may start contributing because they want a mention in the
* Mono Hackers
** Zoltan Varga
Zoltan has contributed significantly to Mono, with bug reports and bug
fixes as well as pushing the envelope of the things that can be done in
and with the mono runtime: the gcc-based ngen compiler, code coverage
and more recently his work with Reflection.Emit that got mono to the
point of running the IKVM Java virtual machine.
** Sergey Chaban
Sergey has been a long time contributor to the project, from the early
+25
View File
@@ -102,6 +102,31 @@
</tr>
</table>
@item Mar 3rd, 2003: The Mono Hackers Hall Of Fame welcomes Zoltan Varga
The <a href="hackers.html">Mono Hackers Hall Of Fame</a>
continues to show our appreciation to the excellent
contributors that make <b>mono::</b> a successful free
software project.
Zoltan has contributed significantly to Mono, with bug reports and bug
fixes as well as pushing the envelope of the things that can be done in
and with the mono runtime: the gcc-based ngen compiler, code coverage
and more recently his work with Reflection.Emit that got mono to the
point of running the <a href="http://www.ikvm.net">IKVM</a> Java virtual
machine.
@item Mar 2nd, 2003: New Mono mailing list.
A new mailing list for <a
href="http://lists.ximian.com/mailman/listinfo/mono-devel-list">Mono
Development</a> has been created.
@item Feb 27th, 2003: Mono 0.21 released
Mono 0.21 has been released. This is only a bug fix release.
The <a href="archive/mono-0.21">release notes</a> are available.
@item Feb 25th, 2003: Mono 0.20 for Windows released; New Apache module released.
Packages of Mono for Windows have been <a
+43 -7
View File
@@ -6,7 +6,16 @@
There are a number of mailing lists for Mono in English:
<table>
<table border=1>
<tr>
<td>
<b><a
href="http://lists.ximian.com/mailman/listinfo/mono-announce-list">mono-announce-list</a></b>
</td>
<td>
Announcements of Mono developments.
</td>
</tr>
<tr>
<td>
<b><a
@@ -19,11 +28,39 @@
<tr>
<td>
<b><a
href="http://lists.ximian.com/mailman/listinfo/mono-announce-list">mono-announce-list</a></b>
href="http://lists.ximian.com/mailman/listinfo/mono-devel-list">mono-devel-list</a></b>
</td>
<td>
A mailing list specifically dedicated to discussions
about developing Mono and programming *with* Mono.
Programmers that work on Mono are _strongly_ encouraged
to join this list. Third-party programmers interested
in running or compiling their managed applications with
Mono or that are interested in using mono-specific
technologies should join the list as well.
<p>
Examples of on-topic arguments are:
<ul>
<li>proposals and patches for new features for the mono runtime and programs
<li>discussions about bugs in the mono runtime and programs
<li>discussions about future directions
<li>embedding API, scripting language bridges
<li>mono/mcs build issues
<li>programming with mono-specific assemblies
<li>discussions about third-party compilers that target and/or use directly the CLR
<li>discussions about getting a managed application run with mono
</ul>
<p>Topics that are better discussed on other mailing lists:
<ul>
<li> general C# questions (use the specific lists at develop.com)
<li> issues that are already covered by a more specific mono
mailing list (like System.Windows.Forms or Gtk#)
<li> success reports about new apps running on mono, including
runtime/buildtime support for new programming languages (use
mono-list to reach a wider audience)
</ul>
</td>
<td>
Announcements of Mono developments.
</td>
</tr>
<tr>
<td>
@@ -40,7 +77,7 @@
href="http://lists.ximian.com/mailman/listinfo/mono-patches">mono-patches</a></b>
</td>
<td>
Track the CVS activity of Mono on this mailing list (patches are sent to recipients).
Track the CVS activity of Mono on this mailing list (patches are sent to recipients). <p>
You can get <a href="http://www.go-mono.com/snapshots">daily snapshots</a> as well.
</td>
</tr>
@@ -89,7 +126,6 @@
Used to discuss the Gtk bindings for Mono (<a href="http://gtk-sharp.sf.net">Gtk#</a>).
</td>
</tr>
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
</table>
Other mailing lists of interest:
+2 -2
View File
@@ -190,8 +190,8 @@
dbcmd.CommandText = sql;
IDataReader reader = dbcmd.ExecuteReader();
while(reader.Read()) {
string FirstName = reader["firstname"];
string LastName = reader["lastname"];
string FirstName = (string) reader["firstname"];
string LastName = (string) reader["lastname"];
Console.WriteLine("Name: " +
FirstName + " " + LastName);
}
+1 -1
View File
@@ -212,7 +212,7 @@ function clickHandler (evt)
if (evt.ctrlKey)
{
var strRoot = 'http://cvs.hispalinux.es/cgi-bin/cvsweb/mcs/class/';
var strExtra = '?cvsroot=Mono';
var strExtra = '?cvsroot=mono';
if (strAssembly)
{
+4 -1
View File
@@ -1,4 +1,5 @@
CSCRIPT = $(SYSTEMROOT)/system32/cscript.exe
ROOT=C:/WINNT
CSCRIPT = $(ROOT)/system32/cscript.exe
CSC=csc
CORCOMPARE=../../../mcs/tools/corcompare
@@ -148,6 +149,8 @@ src/%.xml: ../../../mcs/class/lib/%.dll $(CORCOMPARE)/CorCompare.exe
src/corlib.xml: ../../../mcs/class/lib/corlib_cmp.dll $(CORCOMPARE)/CorCompare.exe
$(CORCOMPARE)/CorCompare.exe -f corlib -ms mscorlib -x $@ $<
src/System.Security.xml: ../../../mcs/class/lib/System.Security_cmp.dll $(CORCOMPARE)/CorCompare.exe
$(CORCOMPARE)/CorCompare.exe -f System.Security -ms System.Security -x $@ $<
../class-status: ../class-status.in
cp -f $< $@
+4
View File
@@ -141,6 +141,10 @@ Directories are separated by the platform path separator (colons on unix). Examp
If this variable is set, it disables the Windows I/O Emulation layer,
and handles (files, events, mutexes, pipes) will not be shared across
processes. This option is only available on Unix.
.TP
.I "MONO_CFG_DIR"
If set, this variable overrides the default system configuration directory
($PREFIX/etc). It's used to locate machine.config file.
.SH FILES
On Unix assemblies are loaded from the installation lib directory. If you set
`prefix' to /usr, the assemblies will be located in /usr/lib. On
+4
View File
@@ -1,3 +1,7 @@
2003-03-04 Gonzalo Paniagua Javier <[email protected]>
* makefile: added Mono.Posix and System.Management.
2003-02-16 Martin Baulig <[email protected]>
* docs/compiler: Added a few works about the new `Location' code.
+9
View File
@@ -1,3 +1,12 @@
2003-03-04 Gonzalo Paniagua Javier <[email protected]>
* class/library.build:
* class/makefile.gnu: added Mono.Posix and System.Management.
2003-03-02 Jackson Harper <[email protected]>
* mcs/class: Add PEAPI directory
2003-02-22 Martin Baulig <[email protected]>
* library.make: Pass `MCS_FLAGS' to MCS.
@@ -299,7 +299,6 @@ namespace DB2ClientCS
}
#endregion
#region Prepare ()
///
/// Prepare a statement against the database
@@ -18,7 +18,7 @@ namespace DB2ClientCS
/// Summary description for DB2ClientDataReader.
/// DB2ClientDataReader.
/// </summary>
unsafe public class DB2ClientDataReader : IDataReader
public class DB2ClientDataReader : IDataReader
{
internal DataTable rs; //Our result set is a datatable
internal DB2ClientConnection db2Conn; //The connection we're working with
@@ -45,7 +45,7 @@ namespace DB2ClientCS
sqlRet = DB2ClientPrototypes.SQLNumResultCols(hwndStmt, ref numCols);
util.DB2CheckReturn(sqlRet, DB2ClientConstants.SQL_HANDLE_STMT, hwndStmt, "DB2ClientDataReader - SQLNumResultCols");
IntPtr[] dbVals = new IntPtr[numCols];
byte[][] dbVals = new byte[(int)numCols][];
IntPtr[] sqlLen_or_IndPtr = new IntPtr[numCols];
PrepareResults(dbVals, sqlLen_or_IndPtr);
@@ -69,9 +69,10 @@ namespace DB2ClientCS
sqlRet = DB2ClientPrototypes.SQLNumResultCols(hwndStmt, ref numCols);
util.DB2CheckReturn(sqlRet, DB2ClientConstants.SQL_HANDLE_STMT, hwndStmt, "DB2ClientDataReader - SQLNumResultCols");
IntPtr[] dbVals = new IntPtr[numCols];
byte[][] dbVals = new byte[(int)numCols][];
IntPtr[] sqlLen_or_IndPtr = new IntPtr[numCols];
PrepareResults(dbVals, sqlLen_or_IndPtr);
FetchResults(dbVals, sqlLen_or_IndPtr, rs);
isClosed = false;
@@ -184,7 +185,7 @@ namespace DB2ClientCS
/// <summary>
/// Does the describe and bind steps for the query result set. Called for both immediate and prepared queries.
/// </summary>
private void PrepareResults(IntPtr[] dbVals, IntPtr[] sqlLen_or_IndPtr)
private void PrepareResults(byte[][] dbVals, IntPtr[] sqlLen_or_IndPtr)
{
short sqlRet;
StringBuilder colName = new StringBuilder(18);
@@ -205,7 +206,8 @@ namespace DB2ClientCS
rs.Columns.Add(colName.ToString());
sqlLen_or_IndPtr[i-1] = new IntPtr();
dbVals[i-1] = Marshal.AllocHGlobal((int)colSize+1);
dbVals[i-1] = new byte[(int)colSize];
try
{
@@ -216,10 +218,10 @@ namespace DB2ClientCS
case DB2ClientConstants.SQL_TYPE_TIME:
case DB2ClientConstants.SQL_TYPE_TIMESTAMP:
case DB2ClientConstants.SQL_VARCHAR:
sqlRet = DB2ClientPrototypes.SQLBindCol(hwndStmt, i, DB2ClientConstants.SQL_C_CHAR, dbVals[i-1],(short)colSize+1, ref sqlLen_or_IndPtr[i-1]);
sqlRet = DB2ClientPrototypes.SQLBindCol(hwndStmt, i, DB2ClientConstants.SQL_C_CHAR, dbVals[i-1],(short)colSize+1, (int)sqlLen_or_IndPtr[i-1]);
break;
default:
sqlRet = DB2ClientPrototypes.SQLBindCol(hwndStmt, i, (short)sqlDataType, dbVals[i-1],(short)colSize+1, ref sqlLen_or_IndPtr[i-1]);
sqlRet = DB2ClientPrototypes.SQLBindCol(hwndStmt, i, (short)sqlDataType, dbVals[i-1],(short)colSize+1, (int)sqlLen_or_IndPtr[i-1]);
break;
}
util.DB2CheckReturn(sqlRet, DB2ClientConstants.SQL_HANDLE_STMT, hwndStmt, "DB2ClientDataReader - SQLBindCol");
@@ -228,8 +230,8 @@ namespace DB2ClientCS
{
System.Console.Write(e.Message);
}
isClosed = false;
}
isClosed = false;
}
/// <summary>
/// FetchResults does what it says.
@@ -237,7 +239,7 @@ namespace DB2ClientCS
/// <param name="dbVals"></param>
/// <param name="sqlLen_or_IndPtr"></param>
/// <param name="rs"></param>
private void FetchResults(IntPtr[] dbVals, IntPtr[] sqlLen_or_IndPtr, DataTable rs)
private void FetchResults(byte[][] dbVals, IntPtr[] sqlLen_or_IndPtr, DataTable rs)
{
short sqlRet = 0;
DB2ClientUtils util = new DB2ClientUtils();
@@ -249,14 +251,12 @@ namespace DB2ClientCS
{
DataRow newRow = rs.NewRow();
for (short y=1;y<=numCols;y++)
newRow[y-1] = Marshal.PtrToStringAnsi(dbVals[y-1]);
newRow[y-1] = System.Text.Encoding.Default.GetString(dbVals[y-1]);
rs.Rows.Add(newRow);
sqlRet = DB2ClientPrototypes.SQLFetch(hwndStmt);
util.DB2CheckReturn(sqlRet, DB2ClientConstants.SQL_HANDLE_STMT, hwndStmt, "DB2ClientDataReader - SQLFetch 2");
}
for (int n=0;n<numCols;n++)
Marshal.FreeHGlobal(dbVals[n]);
}
#endregion
@@ -369,6 +369,10 @@ namespace DB2ClientCS
///
/// GetDateTime method
///
public string NewGetDateTime(int col)
{
return Convert.ToString(this[col]);
}
public DateTime GetDateTime(int col)
{
return Convert.ToDateTime(this[col]);
@@ -23,7 +23,7 @@ namespace DB2ClientCS
{
this.message = Message;
}
unsafe public DB2ClientException(short sqlHandleType, IntPtr sqlHandle, string Message)
public DB2ClientException(short sqlHandleType, IntPtr sqlHandle, string Message)
{
StringBuilder sqlState = new StringBuilder(50);
StringBuilder errorMessage = new StringBuilder(1025);
@@ -20,47 +20,47 @@ namespace DB2ClientCS
internal class DB2ClientPrototypes
{
[DllImport("db2cli.dll", EntryPoint = "SQLAllocHandle")]
unsafe public static extern short SQLAllocHandle(short handleType, IntPtr inputHandle, ref IntPtr outputHandle);
internal static extern short SQLAllocHandle(short handleType, IntPtr inputHandle, ref IntPtr outputHandle);
[DllImport("db2cli.Dll", EntryPoint = "SQLConnect")]
unsafe public static extern short SQLConnect(IntPtr sqlHdbc, string serverName, short serverNameLength, string userName, short userNameLength, string authentication, short authenticationLength);
internal static extern short SQLConnect(IntPtr sqlHdbc, string serverName, short serverNameLength, string userName, short userNameLength, string authentication, short authenticationLength);
[DllImport("db2cli.Dll", CharSet = CharSet.Auto, EntryPoint = "SQLDisconnect")]
unsafe public static extern short SQLDisconnect(IntPtr sqlHdbc);
internal static extern short SQLDisconnect(IntPtr sqlHdbc);
[DllImport("db2cli.dll", EntryPoint = "SQLGetDiagRec")]
unsafe public static extern short SQLGetDiagRec( short handleType, IntPtr handle, short recNum, [Out] StringBuilder sqlState, ref IntPtr nativeErrorPtr, [Out] StringBuilder errorMessage, short bufferLength, ref IntPtr shortTextLengthPtr);
internal static extern short SQLGetDiagRec( short handleType, IntPtr handle, short recNum, [Out] StringBuilder sqlState, ref IntPtr nativeErrorPtr, [Out] StringBuilder errorMessage, short bufferLength, ref IntPtr shortTextLengthPtr);
[DllImport("db2cli.Dll", EntryPoint = "SQLSetConnectAttr")]
unsafe public static extern short SQLSetConnectAttr(IntPtr sqlHdbc, long sqlAttr, [In] IntPtr sqlValuePtr, long sqlValueLength);
internal static extern short SQLSetConnectAttr(IntPtr sqlHdbc, long sqlAttr, [In] IntPtr sqlValuePtr, long sqlValueLength);
[DllImport("db2cli.Dll", EntryPoint = "SQLEndTran")]
unsafe public static extern short SQLEndTran (short handleType, IntPtr handle, short fType);
internal static extern short SQLEndTran (short handleType, IntPtr handle, short fType);
[DllImport("db2cli.Dll", EntryPoint = "SQLCancel")]
unsafe public static extern short SQLCancel(IntPtr handle);
internal static extern short SQLCancel(IntPtr handle);
[DllImport("db2cli.dll", EntryPoint = "SQLNumResultCols")]
unsafe public static extern short SQLNumResultCols(IntPtr handle, ref int numCols);
internal static extern short SQLNumResultCols(IntPtr handle, ref int numCols);
[DllImport("db2cli.Dll", EntryPoint = "SQLFetch")]
unsafe public static extern short SQLFetch(IntPtr handle);
internal static extern short SQLFetch(IntPtr handle);
[DllImport("db2cli.dll", EntryPoint = "SQLRowCount")]
unsafe public static extern short SQLRowCount(IntPtr stmtHandle, ref int numRows);
internal static extern short SQLRowCount(IntPtr stmtHandle, ref int numRows);
[DllImport("db2cli.dll", EntryPoint = "SQLExecute")]
unsafe public static extern short SQLExecute(IntPtr handle);
internal static extern short SQLExecute(IntPtr handle);
[DllImport ("db2cli.dll", EntryPoint = "SQLExecDirect")]
unsafe public static extern short SQLExecDirect(IntPtr stmtHandle, string stmt, int length);
internal static extern short SQLExecDirect(IntPtr stmtHandle, string stmt, int length);
[DllImport("db2cli.Dll", EntryPoint = "SQLDescribeCol")]
unsafe public static extern short SQLDescribeCol(IntPtr stmtHandle, ushort colNum, [Out] StringBuilder colName, short colNameMaxLength, IntPtr colNameLength, ref IntPtr dataType, ref IntPtr colSizePtr, ref IntPtr scalePtr, ref IntPtr nullablePtr );
internal static extern short SQLDescribeCol(IntPtr stmtHandle, ushort colNum, [Out] StringBuilder colName, short colNameMaxLength, IntPtr colNameLength, ref IntPtr dataType, ref IntPtr colSizePtr, ref IntPtr scalePtr, ref IntPtr nullablePtr );
[DllImport("db2cli.dll", EntryPoint = "SQLBindCol")]
unsafe public static extern short SQLBindCol(IntPtr stmtHandle, ushort colNum, int dataType,[In][Out] IntPtr dataBufferPtr, int dataBufferLength, ref IntPtr StrLen_or_IndPtr);
internal static extern short SQLBindCol(IntPtr stmtHandle, ushort colNum, int dataType, [Out] byte[] dataBufferPtr, int dataBufferLength, int StrLen_or_IndPtr);
[DllImport("db2cli.dll", EntryPoint = "SQLDriverConnect")]
unsafe public static extern short SQLDriverConnect(IntPtr hdbc, int centered, [In] string inConnectStr, [In] int inStrLength, [Out] StringBuilder outConnectStr, [Out] int outStrCapacity, [Out] IntPtr outStrLengthReturned, [In] int completion);
internal static extern short SQLDriverConnect(IntPtr hdbc, int centered, [In] string inConnectStr, [In] int inStrLength, [Out] StringBuilder outConnectStr, [Out] int outStrCapacity, [Out] IntPtr outStrLengthReturned, [In] int completion);
[DllImport("db2cli.dll", EntryPoint = "SQLPrepare")]
unsafe public static extern short SQLPrepare(IntPtr stmtHandle, string stmt, int length);
internal static extern short SQLPrepare(IntPtr stmtHandle, string stmt, int length);
[DllImport("db2cli.dll", EntryPoint = "SQLDescribeParam")]
unsafe public static extern short SQLDescribeParam(IntPtr stmtHandle, short paramNumber,ref IntPtr dataType, ref IntPtr paramSize, ref IntPtr decimalDigits, ref IntPtr nullable);
internal static extern short SQLDescribeParam(IntPtr stmtHandle, short paramNumber,ref IntPtr dataType, ref IntPtr paramSize, ref IntPtr decimalDigits, ref IntPtr nullable);
[DllImport("db2cli.dll", EntryPoint = "SQLNumParams")]
unsafe public static extern short SQLNumParams(IntPtr stmtHandle, ref IntPtr numParams);
internal static extern short SQLNumParams(IntPtr stmtHandle, ref IntPtr numParams);
[DllImport("db2cli.dll")]
internal static extern short SQLBindParameter(IntPtr stmtHandle, ushort paramNumber,
short dataType, short valueType, short paramType, uint colSize, short decDigits,
byte[] dataBufferPtr, int dataBufferLength, int StrLen_or_IndPtr);
[DllImport("db2cli.dll", EntryPoint = "SQLBindParameter")]
unsafe public static extern short SQLBindParameter(IntPtr stmtHandle, ushort paramNumber,
internal static extern short SQLBindParameter(IntPtr stmtHandle, ushort paramNumber,
short dataType, short valueType, short paramType, uint colSize, short decDigits,
ref int dataBufferPtr, int dataBufferLength, int StrLen_or_IndPtr);
@@ -18,7 +18,7 @@ namespace DB2ClientCS
/// at the statement level, but I haven't worked that in here yet.
/// NOTE: AT THE MOMENT, SETTING OF THE ISOLATION LEVEL IS NOT WORKING
/// </summary>
unsafe public class DB2ClientTransaction : IDbTransaction
public class DB2ClientTransaction : IDbTransaction
{
DB2ClientUtils util = new DB2ClientUtils();
IsolationLevel IL = IsolationLevel.Unspecified;
+4
View File
@@ -1,3 +1,7 @@
2003-03-01 Jackson Harper <[email protected]>
* Image.cs: Write Metadata root
2003-02-23 Peter Williams <[email protected]>
* makefile.gnu (all): Give this dependencies
+5 -6
View File
@@ -149,18 +149,17 @@ namespace Mono.PEToolkit {
coffHdr.Write (writer);
peHdr.Write (writer);
WriteSections (writer);
if (this.IsCLI) {
writer.BaseStream.Position = RVAToVA (peHdr.CLIHdrDir.virtAddr);
corHdr.Write (writer);
/*
mdRoot = new MetaDataRoot(this);
reader.BaseStream.Position = RVAToVA(corHdr.MetaData.virtAddr);
mdRoot.Read(reader);
*/
long pos = RVAToVA (corHdr.MetaData.virtAddr);
writer.BaseStream.Position = pos;
mdRoot.Write (writer);
}
}
@@ -1,3 +1,11 @@
2003-03-01 Jackson Harper <[email protected]>
* MDStream.cs: Add methods to write metadata streams
2003-03-01 Jackson Harper <[email protected]>
* MetaDataRoot.cs: Add method to write Metadata
2003-02-20 Jackson Harper <[email protected]>
* MDStream.cs: Make Header a class and use a Read method to load it. Because it is no longer
+33 -1
View File
@@ -50,10 +50,33 @@ namespace Mono.PEToolkit.Metadata {
pos &= ~3;
if (stream != null)
pos += stream.Root.filePos;
// Advance file pointer.
reader.BaseStream.Position = pos;
}
public void Write (BinaryWriter writer, MDStream stream)
{
writer.Write (offs);
writer.Write (size);
for (int i=0; i<name.Length; i++)
writer.Write ((sbyte)name[i]);
writer.Write ((sbyte) '\0');
// Round up to dword boundary.
long pos = writer.BaseStream.Position;
if (stream != null)
pos -= stream.Root.filePos;
pos += 3;
pos &= ~3;
if (stream != null)
pos += stream.Root.filePos;
// Advance file pointer.
writer.BaseStream.Position = pos;
}
} // header
@@ -152,6 +175,15 @@ namespace Mono.PEToolkit.Metadata {
}
public void Write (BinaryWriter writer)
{
hdr.Write (writer, this);
long old_pos = writer.BaseStream.Position;
writer.BaseStream.Position = root.filePos + hdr.offs;
writer.Write (data);
writer.BaseStream.Position = old_pos;
}
/// <summary>
/// Initializes heap for this stream.
/// </summary>
@@ -101,7 +101,7 @@ namespace Mono.PEToolkit.Metadata {
unsafe public void Read(BinaryReader reader)
{
filePos = reader.BaseStream.Position;
sig = reader.ReadUInt32();
if (sig != Sig) {
throw new BadImageException("Invalid MetaData Signature.");
@@ -110,10 +110,10 @@ namespace Mono.PEToolkit.Metadata {
majVer = reader.ReadInt16();
minVer = reader.ReadInt16();
reserved = reader.ReadUInt32();
// Length of version string.
len = reader.ReadInt32();
// Read version string.
if (len != 0) {
sbyte* pVer = stackalloc sbyte [len];
@@ -141,10 +141,9 @@ namespace Mono.PEToolkit.Metadata {
} else {
VersionString = String.Empty;
}
flags = reader.ReadInt16();
nStreams = reader.ReadInt16();
streams = new Hashtable(nStreams);
// load all streams into memory
@@ -168,6 +167,44 @@ namespace Mono.PEToolkit.Metadata {
blobIdx = tabsHeap.BlobIndexSize;
}
public void Write (BinaryWriter writer)
{
filePos = writer.BaseStream.Position;
writer.Write (Sig);
writer.Write (majVer);
writer.Write (minVer);
writer.Write (reserved);
// Length of version string
writer.Write (verStr.Length);
if (verStr.Length > 0) {
long pos = writer.BaseStream.Position;
for (int i=0; i<verStr.Length; i++)
writer.Write ((sbyte) verStr[i]);
// Round up to dword boundary, relative to header start.
pos += verStr.Length;
pos -= filePos;
pos += 3;
pos &= ~3;
pos += filePos;
// Advance file pointer
writer.BaseStream.Position = pos;
}
writer.Write (flags);
writer.Write (nStreams);
// load all streams into memory
foreach (MDStream stream in streams.Values)
stream.Write (writer);
}
public TablesHeap TablesHeap {
get {
MDStream tabs = Streams["#~"] as MDStream;
+4
View File
@@ -0,0 +1,4 @@
2003-03-02 Jackson Harper <[email protected]>
* PEAPI.cs: Add file
* README.txt: Add file
File diff suppressed because it is too large. Load diff
+31
View File
@@ -0,0 +1,31 @@
PEAPI
-----
This is a preliminary version of our PE writer component. It is a managed
component which presents on the client side an API and constructs program
executable files.
We have tested this component as an alternative backend for Gardens Point
Component Pascal .NET. Our previous versions of gpcp produced textual CIL and
invoked ilasm. The new backend can create a program executable file in almost
exactly the same length of time as it takes to write the equivalent CIL text
file.
PEAPI is written in C# and is released as open source under a FreeBSD-like
licence. Included in this release is pdf documentation and both html and
chm documentation. The main documentation is written as if it was a new
Appendix to John Gough's book Compiling for the .NET Common Language Runtime,
Prentice-Hall 2002.
The current release implements most of the facilities of the API however,
some final features not required for component pascal have yet to be added.
We expect to update the component incrementally as additional features are
added. Currently the component does not produce debugger information (pdb
files). We are considering possible ways of doing this or alternatively
producing rotor-format debugging information.
The team has a committment to maintain and update the component into the
foreseeable future, as several other projects here depend on it. Users are
encouraged to send feedback on missing features, bug reports etc. to assist
in this quest.
@@ -1,3 +1,39 @@
2003-03-04 Tim Coleman <[email protected]>
* System.Data.OracleClient.Oci/IOciDescriptorHandle.cs:
* System.Data.OracleClient.Oci/IOciHandle.cs:
* System.Data.OracleClient.Oci/OciDescriptorType.cs:
Removed. These are no longer used.
* System.Data.OracleClient.Oci/OciParameterDescriptor.cs:
Add new class
* list:
Add System.Data.OracleClient.Oci/OciParameterDescriptor.cs
Rem System.Data.OracleClient.Oci/IOciDescriptorHandle.cs
Rem System.Data.OracleClient.Oci/IOciHandle.cs
Rem System.Data.OracleClient.Oci/OciDescriptorType.cs
* System.Data.OracleClient/OciGlue.cs:
Move the OCIAttrGet* methods into OciHandle
* System.Data.OracleClient/OracleDataReader.cs:
* System.Data.OracleClient/OracleParameter.cs:
Change the way that columns are bound and described
* System.Data.OracleClient.Oci/OciBindHandle.cs:
* System.Data.OracleClient.Oci/OciDefineHandle.cs:
* System.Data.OracleClient.Oci/OciDescriptorHandle.cs:
* System.Data.OracleClient.Oci/OciEnvironmentHandle.cs:
* System.Data.OracleClient.Oci/OciErrorHandle.cs:
* System.Data.OracleClient.Oci/OciHandle.cs:
* System.Data.OracleClient.Oci/OciLobLocator.cs:
* System.Data.OracleClient.Oci/OciServerHandle.cs:
* System.Data.OracleClient.Oci/OciServiceHandle.cs:
* System.Data.OracleClient.Oci/OciSessionHandle.cs:
* System.Data.OracleClient.Oci/OciStatementHandle.cs:
* System.Data.OracleClient.Oci/OciTransactionHandle.cs:
All handles now derive from OciHandle, and these classes
have been rewritten as such. Also attempted to implement
the Dispose () methods for these classes.
* System.Data.OracleClient.Oci/OciHandleType.cs:
Add descriptor types into here because handles and
descriptors are used in many of the same OCI functions.
2003-02-26 Tim Coleman <[email protected]>
* System.Data.OracleClient/OracleConnection.cs:
Rollback transactions when connection closes if they
@@ -1,30 +0,0 @@
//
// IOciDescriptorHandle.cs
//
// Part of managed C#/.NET library System.Data.OracleClient.dll
//
// Part of the Mono class libraries at
// mcs/class/System.Data.OracleClient/System.Data.OracleClient.Oci
//
// Assembly: System.Data.OracleClient.dll
// Namespace: System.Data.OracleClient.Oci
//
// Author:
// Tim Coleman <[email protected]>
//
// Copyright (C) Tim Coleman, 2003
//
using System;
namespace System.Data.OracleClient.Oci {
internal interface IOciDescriptorHandle
{
#region Properties
IntPtr Handle { get; set; }
OciDescriptorType HandleType { get; }
#endregion // Properties
}
}
@@ -1,30 +0,0 @@
//
// IOciHandle.cs
//
// Part of managed C#/.NET library System.Data.OracleClient.dll
//
// Part of the Mono class libraries at
// mcs/class/System.Data.OracleClient/System.Data.OracleClient.Oci
//
// Assembly: System.Data.OracleClient.dll
// Namespace: System.Data.OracleClient.Oci
//
// Author:
// Tim Coleman <[email protected]>
//
// Copyright (C) Tim Coleman, 2003
//
using System;
namespace System.Data.OracleClient.Oci {
internal interface IOciHandle
{
#region Properties
IntPtr Handle { get; set; }
OciHandleType HandleType { get; }
#endregion // Properties
}
}
@@ -20,142 +20,45 @@ using System.Runtime.InteropServices;
using System.Text;
namespace System.Data.OracleClient.Oci {
internal sealed class OciBindHandle : IOciHandle, IDisposable
internal sealed class OciBindHandle : OciHandle, IDisposable
{
#region Fields
IntPtr handle;
string name;
bool disposed = false;
IntPtr value;
OciStatementHandle statement;
OciDataType type;
int size;
int indicator;
#endregion // Fields
#region Constructors
public OciBindHandle (string name)
public OciBindHandle (OciHandle parent, IntPtr newHandle)
: base (OciHandleType.Bind, parent, newHandle)
{
this.name = name;
this.value = IntPtr.Zero;
this.indicator = 0;
}
#endregion // Constructors
#region Properties
public IntPtr Handle {
get { return handle; }
set { handle = value; }
}
public OciHandleType HandleType {
get { return OciHandleType.Bind; }
}
public string Name {
get { return name; }
set { name = value; }
}
public int Size {
get { return size; }
set { size = value; }
}
public OciDataType Type {
get { return type; }
set { type = value; }
}
public IntPtr Value {
get { return value; }
set { this.value = value; }
}
#endregion
#endregion // Properties
#region Methods
[DllImport ("oci", EntryPoint = "OCIBindByName")]
public static extern int OCIBindByName (IntPtr stmtp,
out IntPtr bindpp,
IntPtr errhp,
string placeholder,
int placeh_len,
IntPtr valuep,
int value_sz,
[MarshalAs (UnmanagedType.U2)] OciDataType dty,
ref int indp,
IntPtr alenp,
ushort rcodep,
uint maxarr_len,
IntPtr curelp,
uint mode);
public void Bind (OciStatementHandle statement, object val)
protected override void Dispose (bool disposing)
{
handle = IntPtr.Zero;
this.statement = statement;
int indp = 0;
ushort alenp = 0;
IntPtr rcodep = IntPtr.Zero;
int status = 0;
OciDataType bindType = Type;
int definedSize = 0;
string stringValue = val.ToString ();
if (val == DBNull.Value)
indicator = -1;
else {
switch (Type) {
case OciDataType.Number:
case OciDataType.Integer:
case OciDataType.Float:
case OciDataType.VarNum:
bindType = OciDataType.Char;
definedSize = stringValue.Length;
value = Marshal.StringToHGlobalAnsi (stringValue);
break;
case OciDataType.Date:
break;
default:
bindType = OciDataType.Char;
definedSize = stringValue.Length;
value = Marshal.StringToHGlobalAnsi (stringValue);
break;
if (!disposed) {
try {
Marshal.FreeHGlobal (value);
disposed = true;
} finally {
base.Dispose (disposing);
}
}
status = OCIBindByName (statement.Handle,
out handle,
statement.ErrorHandle.Handle,
name,
name.Length,
value,
definedSize,
bindType,
ref indicator,
IntPtr.Zero,
0,
0,
IntPtr.Zero,
0);
if (status != 0) {
OciErrorInfo info = statement.ErrorHandle.HandleError ();
throw new OracleException (info.ErrorCode, info.ErrorMessage);
}
}
public void Dispose ()
{
Marshal.FreeHGlobal (value);
}
#endregion // Methods
@@ -21,10 +21,12 @@ using System.Runtime.InteropServices;
using System.Text;
namespace System.Data.OracleClient.Oci {
internal sealed class OciDefineHandle : IOciHandle, IDisposable
internal sealed class OciDefineHandle : OciHandle, IDisposable
{
#region Fields
bool disposed = false;
IntPtr handle;
IntPtr value;
short indicator;
@@ -33,61 +35,30 @@ namespace System.Data.OracleClient.Oci {
OciDataType definedType;
int definedSize;
int rlenp;
sbyte scale;
short scale;
OciErrorHandle errorHandle;
OciStatementHandle statement;
OciLobLocator lobLocator;
byte[] date;
#endregion // Fields
#region Constructors
public OciDefineHandle (OciStatementHandle statement, int position)
public OciDefineHandle (OciHandle parent, IntPtr newHandle)
: base (OciHandleType.Define, parent, newHandle)
{
int ociTypeInt;
int status = 0;
this.statement = statement;
IntPtr parameterHandle = statement.CreateParameterHandle (position);
status = OciGlue.OCIAttrGetInt32 (parameterHandle,
(uint) OciDescriptorType.Parameter,
out definedSize,
IntPtr.Zero,
OciAttributeType.DataSize,
statement.ErrorHandle.Handle);
if (status != 0) {
OciErrorInfo info = statement.ErrorHandle.HandleError ();
throw new OracleException (info.ErrorCode, info.ErrorMessage);
}
status = OciGlue.OCIAttrGetSByte (parameterHandle,
(uint) OciDescriptorType.Parameter,
out scale,
IntPtr.Zero,
OciAttributeType.DataSize,
statement.ErrorHandle.Handle);
if (status != 0) {
OciErrorInfo info = statement.ErrorHandle.HandleError ();
throw new OracleException (info.ErrorCode, info.ErrorMessage);
}
status = OciGlue.OCIAttrGetInt32 (parameterHandle,
(uint) OciDescriptorType.Parameter,
out ociTypeInt,
IntPtr.Zero,
OciAttributeType.DataType,
statement.ErrorHandle.Handle);
if (status != 0) {
OciErrorInfo info = statement.ErrorHandle.HandleError ();
throw new OracleException (info.ErrorCode, info.ErrorMessage);
}
definedType = (OciDataType) ociTypeInt;
}
public void DefineByPosition (int position)
{
OciParameterDescriptor parameter = ((OciStatementHandle) Parent).GetParameter (position);
definedSize = parameter.GetDataSize ();
scale = parameter.GetScale ();
definedType = parameter.GetDataType ();
Define (position);
statement.FreeParameterHandle (parameterHandle);
parameter.Dispose ();
}
#endregion // Constructors
@@ -102,20 +73,16 @@ namespace System.Data.OracleClient.Oci {
get { return definedSize; }
}
public IntPtr Handle {
get { return handle; }
set { handle = value; }
}
public OciHandleType HandleType {
get { return OciHandleType.Define; }
public OciErrorHandle ErrorHandle {
get { return errorHandle; }
set { errorHandle = value; }
}
public bool IsNull {
get { return (indicator == -1); }
}
public sbyte Scale {
public short Scale {
get { return scale; }
}
@@ -157,12 +124,21 @@ namespace System.Data.OracleClient.Oci {
IntPtr rcodep,
uint mode);
[DllImport ("oci")]
static extern int OCIDateTimeGetDate (IntPtr hndl,
IntPtr err,
byte[] datetime,
out short year,
out byte month,
out byte day);
void Define (int position)
{
switch (definedType) {
case OciDataType.Date:
definedSize = 20;
DefineChar (position); // HANDLE AS CHAR FOR NOW
definedSize = 7;
DefineDate (position);
return;
case OciDataType.Clob:
case OciDataType.Blob:
@@ -175,6 +151,31 @@ namespace System.Data.OracleClient.Oci {
}
}
void DefineDate (int position)
{
ociType = OciDataType.Date;
value = Marshal.AllocHGlobal (definedSize);
int status = 0;
status = OCIDefineByPos (Parent,
out handle,
ErrorHandle,
position + 1,
value,
definedSize,
ociType,
ref indicator,
ref rlenp,
IntPtr.Zero,
0);
if (status != 0) {
OciErrorInfo info = ErrorHandle.HandleError ();
throw new OracleException (info.ErrorCode, info.ErrorMessage);
}
}
void DefineChar (int position)
{
ociType = OciDataType.Char;
@@ -182,20 +183,20 @@ namespace System.Data.OracleClient.Oci {
int status = 0;
status = OCIDefineByPos (statement.Handle,
out handle,
statement.ErrorHandle.Handle,
position,
value,
definedSize,
ociType,
ref indicator,
ref rlenp,
IntPtr.Zero,
0);
status = OCIDefineByPos (Parent,
out handle,
ErrorHandle,
position + 1,
value,
definedSize,
ociType,
ref indicator,
ref rlenp,
IntPtr.Zero,
0);
if (status != 0) {
OciErrorInfo info = statement.ErrorHandle.HandleError ();
OciErrorInfo info = ErrorHandle.HandleError ();
throw new OracleException (info.ErrorCode, info.ErrorMessage);
}
}
@@ -207,19 +208,21 @@ namespace System.Data.OracleClient.Oci {
definedSize = -1;
lobLocator = (OciLobLocator) statement.Environment.AllocateDescriptor (OciDescriptorType.LobLocator);
lobLocator = (OciLobLocator) Parent.Parent.Allocate (OciHandleType.LobLocator);
if (lobLocator == null) {
OciErrorInfo info = statement.Environment.HandleError ();
OciErrorInfo info = ErrorHandle.HandleError ();
throw new OracleException (info.ErrorCode, info.ErrorMessage);
}
value = lobLocator.Handle;
lobLocator.ErrorHandle = statement.ErrorHandle;
lobLocator.Service = statement.Service;
status = OCIDefineByPosPtr (statement.Handle,
value = lobLocator.Handle;
lobLocator.ErrorHandle = ErrorHandle;
lobLocator.Service = ((OciStatementHandle) Parent).Service;
status = OCIDefineByPosPtr (Parent,
out handle,
statement.ErrorHandle.Handle,
position,
ErrorHandle,
position + 1,
ref value,
definedSize,
ociType,
@@ -229,14 +232,22 @@ namespace System.Data.OracleClient.Oci {
0);
if (status != 0) {
OciErrorInfo info = statement.ErrorHandle.HandleError ();
OciErrorInfo info = ErrorHandle.HandleError ();
throw new OracleException (info.ErrorCode, info.ErrorMessage);
}
}
public void Dispose ()
[MonoTODO ("This will be an override when this is properly derived from OciHandle.")]
protected override void Dispose (bool disposing)
{
Marshal.FreeHGlobal (value);
if (!disposed) {
try {
Marshal.FreeHGlobal (value);
disposed = true;
} finally {
base.Dispose (disposing);
}
}
}
public OracleLob GetOracleLob ()
@@ -279,15 +290,31 @@ namespace System.Data.OracleClient.Oci {
return Double.Parse (String.Copy ((string) tmp));
break;
case OciDataType.Date:
tmp = Marshal.PtrToStringAnsi (Value, Size);
if (tmp != null)
return DateTime.Parse ((string) tmp);
break;
return UnpackDate ();
}
return DBNull.Value;
}
[MonoTODO ("Be able to handle negative dates... i.e. BCE.")]
public DateTime UnpackDate ()
{
byte century = Marshal.ReadByte (value, 0);
byte year = Marshal.ReadByte (value, 1);
byte month = Marshal.ReadByte (value, 2);
byte day = Marshal.ReadByte (value, 3);
byte hour = Marshal.ReadByte (value, 4);
byte minute = Marshal.ReadByte (value, 5);
byte second = Marshal.ReadByte (value, 6);
return new DateTime ((century - 100) * 100 + (year - 100),
month,
day,
hour - 1,
minute - 1,
second - 1);
}
#endregion // Methods
}
}
@@ -16,44 +16,32 @@
//
using System;
using System.Runtime.InteropServices;
namespace System.Data.OracleClient.Oci {
internal abstract class OciDescriptorHandle : IOciDescriptorHandle
internal abstract class OciDescriptorHandle : OciHandle
{
#region Fields
IntPtr handle;
OciEnvironmentHandle environment;
OciDescriptorType type;
#endregion // Fields
#region Constructors
public OciDescriptorHandle (OciDescriptorType type, OciEnvironmentHandle environment, IntPtr newHandle)
public OciDescriptorHandle (OciHandleType type, OciHandle parent, IntPtr newHandle)
: base (type, parent, newHandle)
{
this.type = type;
this.environment = environment;
this.handle = newHandle;
}
#endregion // Constructors
#region Properties
#region Methods
public OciEnvironmentHandle Environment {
get { return environment; }
[DllImport ("oci")]
static extern int OCIDescriptorFree (IntPtr hndlp,
[MarshalAs (UnmanagedType.U4)] OciHandleType type);
protected override void FreeHandle ()
{
int status = 0;
status = OCIDescriptorFree (Handle, HandleType);
}
public IntPtr Handle {
get { return handle; }
set { handle = value; }
}
public OciDescriptorType HandleType {
get { return type; }
}
#endregion // Properties
#endregion // Methods
}
}
@@ -1,45 +0,0 @@
//
// OciDescriptorType.cs
//
// Part of managed C#/.NET library System.Data.OracleClient.dll
//
// Part of the Mono class libraries at
// mcs/class/System.Data.OracleClient/System.Data.OracleClient.Oci
//
// Assembly: System.Data.OracleClient.dll
// Namespace: System.Data.OracleClient.Oci
//
// Author:
// Tim Coleman <[email protected]>
//
// Copyright (C) Tim Coleman, 2003
//
using System;
namespace System.Data.OracleClient.Oci {
internal enum OciDescriptorType {
LobLocator = 0x32,
Snapshot = 0x33,
ResultSet = 0x34,
Parameter = 0x35,
RowId = 0x36,
ComplexObject = 0x37,
FileLobLocator = 0x38,
EnqueueOptions = 0x39,
DequeueOptions = 0x3a,
MessageProperties = 0x3b,
Agent = 0x3c,
Locator = 0x3d,
IntervalYearToMonth = 0x3e,
IntervalDayToSecond = 0x3f,
Notify = 0x40,
Date = 0x41,
Time = 0x42,
TimeWithTZ = 0x43,
TimeStamp = 0x44,
TimeStampWithTZ = 0x45,
TimeStampLocal = 0x46,
UserCallback = 0x47
}
}
@@ -19,14 +19,8 @@ using System;
using System.Runtime.InteropServices;
namespace System.Data.OracleClient.Oci {
internal class OciEnvironmentHandle : IOciHandle, IDisposable
internal class OciEnvironmentHandle : OciHandle, IDisposable
{
#region Fields
IntPtr handle;
#endregion // Fields
#region Constructors
public OciEnvironmentHandle ()
@@ -35,143 +29,35 @@ namespace System.Data.OracleClient.Oci {
}
public OciEnvironmentHandle (OciEnvironmentMode mode)
: base (OciHandleType.Environment, null, IntPtr.Zero)
{
int status = 0;
this.handle = IntPtr.Zero;
IntPtr newHandle = IntPtr.Zero;
status = OCIEnvCreate (out newHandle,
mode,
IntPtr.Zero,
IntPtr.Zero,
IntPtr.Zero,
IntPtr.Zero,
0,
IntPtr.Zero);
status = OCIEnvCreate (out handle, mode,
IntPtr.Zero,
IntPtr.Zero,
IntPtr.Zero,
IntPtr.Zero,
0,
IntPtr.Zero);
SetHandle (newHandle);
}
#endregion // Constructors
#region Properties
public IntPtr Handle {
get { return handle; }
set { handle = value; }
}
public OciHandleType HandleType {
get { return OciHandleType.Environment; }
}
#endregion // Properties
#region Methods
[DllImport ("oci")]
public static extern int OCIEnvCreate (out IntPtr envhpp,
[MarshalAs (UnmanagedType.U4)] OciEnvironmentMode mode,
IntPtr ctxp,
IntPtr malocfp,
IntPtr ralocfp,
IntPtr mfreep,
int xtramem_sz,
IntPtr usrmempp);
[DllImport ("oci")]
public static extern int OCIHandleAlloc (IntPtr parenth,
out IntPtr hndlpp,
[MarshalAs (UnmanagedType.U4)] OciHandleType type,
int xtramem_sz,
IntPtr usrmempp);
[DllImport ("oci")]
public static extern int OCIDescriptorAlloc (IntPtr parenth,
out IntPtr descpp,
[MarshalAs (UnmanagedType.U4)] OciDescriptorType type,
int xtramem_sz,
IntPtr usrmempp);
[DllImport ("oci")]
public static extern int OCIHandleFree (IntPtr hndlp,
[MarshalAs (UnmanagedType.U4)] OciHandleType type);
[DllImport ("oci")]
public static extern int OCIDescriptorFree (IntPtr hndlp,
[MarshalAs (UnmanagedType.U4)] OciDescriptorType type);
public IOciHandle Allocate (OciHandleType type)
{
IntPtr newHandle = IntPtr.Zero;
int status = 0;
status = OCIHandleAlloc (Handle,
out newHandle,
type,
0,
IntPtr.Zero);
if (status != 0 && status != 1)
return null;
switch (type) {
case OciHandleType.Service:
return new OciServiceHandle (this, newHandle);
case OciHandleType.Error:
return new OciErrorHandle (this, newHandle);
case OciHandleType.Server:
return new OciServerHandle (this, newHandle);
case OciHandleType.Session:
return new OciSessionHandle (this, newHandle);
case OciHandleType.Statement:
return new OciStatementHandle (this, newHandle);
case OciHandleType.Transaction:
return new OciTransactionHandle (this, newHandle);
default:
OCIHandleFree (newHandle, type);
newHandle = IntPtr.Zero;
throw new ArgumentException ("Invalid handle type.");
}
}
public IOciDescriptorHandle AllocateDescriptor (OciDescriptorType type)
{
IntPtr newHandle = IntPtr.Zero;
int status = 0;
status = OCIDescriptorAlloc (Handle,
out newHandle,
type,
0,
IntPtr.Zero);
if (status != 0 && status != 1)
return null;
switch (type) {
case OciDescriptorType.LobLocator:
return new OciLobLocator (this, newHandle);
default:
OCIDescriptorFree (newHandle, type);
newHandle = IntPtr.Zero;
throw new ArgumentException ("Invalid handle type.");
}
}
public void Dispose ()
{
FreeHandle (this);
}
public void FreeHandle (IOciHandle toBeDisposed)
{
OCIHandleFree (toBeDisposed.Handle, toBeDisposed.HandleType);
toBeDisposed.Handle = IntPtr.Zero;
}
public void FreeDescriptor (IOciDescriptorHandle toBeDisposed)
{
OCIDescriptorFree (toBeDisposed.Handle, toBeDisposed.HandleType);
toBeDisposed.Handle = IntPtr.Zero;
}
static extern int OCIEnvCreate (out IntPtr envhpp,
[MarshalAs (UnmanagedType.U4)] OciEnvironmentMode mode,
IntPtr ctxp,
IntPtr malocfp,
IntPtr ralocfp,
IntPtr mfreep,
int xtramem_sz,
IntPtr usrmempp);
public OciErrorInfo HandleError ()
{
@@ -182,7 +68,7 @@ namespace System.Data.OracleClient.Oci {
info.ErrorCode = 0;
info.ErrorMessage = String.Empty;
OciGlue.OCIErrorGet (handle,
OciGlue.OCIErrorGet (Handle,
1,
IntPtr.Zero,
out info.ErrorCode,
@@ -19,12 +19,18 @@ using System;
using System.Runtime.InteropServices;
namespace System.Data.OracleClient.Oci {
internal sealed class OciErrorHandle : OciHandle, IOciHandle, IDisposable
internal sealed class OciErrorHandle : OciHandle, IDisposable
{
#region Fields
bool disposed = false;
#endregion // Fields
#region Constructors
public OciErrorHandle (OciEnvironmentHandle environment, IntPtr handle)
: base (OciHandleType.Error, environment, handle)
public OciErrorHandle (OciHandle parent, IntPtr handle)
: base (OciHandleType.Error, parent, handle)
{
}
@@ -32,9 +38,12 @@ namespace System.Data.OracleClient.Oci {
#region Methods
public void Dispose ()
protected override void Dispose (bool disposing)
{
Environment.FreeHandle (this);
if (!disposed) {
disposed = true;
base.Dispose (disposing);
}
}
public OciErrorInfo HandleError ()
@@ -16,38 +16,53 @@
//
using System;
using System.Runtime.InteropServices;
namespace System.Data.OracleClient.Oci {
internal abstract class OciHandle : IOciHandle
internal abstract class OciHandle : IDisposable
{
#region Fields
bool disposed = false;
IntPtr handle;
OciEnvironmentHandle environment;
OciHandle parent;
OciHandleType type;
#endregion // Fields
#region Constructors
public OciHandle (OciHandleType type, OciEnvironmentHandle environment, IntPtr newHandle)
public OciHandle (OciHandleType type, OciHandle parent, IntPtr newHandle)
{
this.type = type;
this.environment = environment;
this.parent = parent;
this.handle = newHandle;
}
~OciHandle ()
{
Dispose (false);
}
#endregion // Constructors
#region Properties
public OciEnvironmentHandle Environment {
get { return environment; }
public OciHandle Parent {
get { return parent; }
}
/*
public HandleRef Handle {
get {
HandleRef hr = new HandleRef (this, handle);
GC.KeepAlive (this);
return hr;
}
}
*/
public IntPtr Handle {
get { return handle; }
set { handle = value; }
}
public OciHandleType HandleType {
@@ -55,5 +70,257 @@ namespace System.Data.OracleClient.Oci {
}
#endregion // Properties
#region Methods
[DllImport ("oci")]
static extern int OCIAttrGet (IntPtr trgthndlp,
[MarshalAs (UnmanagedType.U4)] OciHandleType trghndltyp,
out IntPtr attributep,
out int sizep,
[MarshalAs (UnmanagedType.U4)] OciAttributeType attrtype,
IntPtr errhp);
[DllImport ("oci", EntryPoint = "OCIAttrGet")]
static extern int OCIAttrGetSByte (IntPtr trgthndlp,
[MarshalAs (UnmanagedType.U4)] OciHandleType trghndltyp,
out sbyte attributep,
IntPtr sizep,
[MarshalAs (UnmanagedType.U4)] OciAttributeType attrtype,
IntPtr errhp);
[DllImport ("oci", EntryPoint = "OCIAttrGet")]
static extern int OCIAttrGetByte (IntPtr trgthndlp,
[MarshalAs (UnmanagedType.U4)] OciHandleType trghndltyp,
out byte attributep,
IntPtr sizep,
[MarshalAs (UnmanagedType.U4)] OciAttributeType attrtype,
IntPtr errhp);
[DllImport ("oci", EntryPoint = "OCIAttrGet")]
static extern int OCIAttrGetUInt16 (IntPtr trgthndlp,
[MarshalAs (UnmanagedType.U4)] OciHandleType trghndltyp,
out ushort attributep,
IntPtr sizep,
[MarshalAs (UnmanagedType.U4)] OciAttributeType attrtype,
IntPtr errhp);
[DllImport ("oci", EntryPoint = "OCIAttrGet")]
static extern int OCIAttrGetInt32 (IntPtr trgthndlp,
[MarshalAs (UnmanagedType.U4)] OciHandleType trghndltyp,
out int attributep,
IntPtr sizep,
[MarshalAs (UnmanagedType.U4)] OciAttributeType attrtype,
IntPtr errhp);
[DllImport ("oci")]
static extern int OCIDescriptorAlloc (IntPtr parenth,
out IntPtr hndlpp,
[MarshalAs (UnmanagedType.U4)] OciHandleType type,
int xtramem_sz,
IntPtr usrmempp);
[DllImport ("oci")]
static extern int OCIHandleAlloc (IntPtr parenth,
out IntPtr descpp,
[MarshalAs (UnmanagedType.U4)] OciHandleType type,
int xtramem_sz,
IntPtr usrmempp);
[DllImport ("oci")]
static extern int OCIHandleFree (IntPtr hndlp,
[MarshalAs (UnmanagedType.U4)] OciHandleType type);
public OciHandle Allocate (OciHandleType type)
{
int status = 0;
IntPtr newHandle = IntPtr.Zero;
if (type < OciHandleType.LobLocator)
status = OCIHandleAlloc (this,
out newHandle,
type,
0,
IntPtr.Zero);
else
status = OCIDescriptorAlloc (this,
out newHandle,
type,
0,
IntPtr.Zero);
if (status != 0 && status != 1)
throw new Exception (String.Format ("Could not allocate new OCI Handle of type {0}", type));
switch (type) {
case OciHandleType.Service:
return new OciServiceHandle (this, newHandle);
case OciHandleType.Error:
return new OciErrorHandle (this, newHandle);
case OciHandleType.Server:
return new OciServerHandle (this, newHandle);
case OciHandleType.Session:
return new OciSessionHandle (this, newHandle);
case OciHandleType.Statement:
return new OciStatementHandle (this, newHandle);
case OciHandleType.Transaction:
return new OciTransactionHandle (this, newHandle);
case OciHandleType.LobLocator:
return new OciLobLocator (this, newHandle);
}
return null;
}
protected virtual void Dispose (bool disposing)
{
if (!disposed) {
if (disposing) {
parent = null;
}
FreeHandle ();
disposed = true;
}
}
public void Dispose ()
{
Dispose (true);
GC.SuppressFinalize (this);
}
protected virtual void FreeHandle ()
{
OCIHandleFree (Handle, HandleType);
handle = IntPtr.Zero;
}
public bool GetAttributeBool (OciAttributeType attrType, OciErrorHandle errorHandle)
{
return (GetAttributeInt32 (attrType, errorHandle) != 0);
}
public sbyte GetAttributeSByte (OciAttributeType attrType, OciErrorHandle errorHandle)
{
int status = 0;
sbyte output;
status = OCIAttrGetSByte (Handle,
HandleType,
out output,
IntPtr.Zero,
attrType,
errorHandle);
if (status != 0) {
OciErrorInfo info = errorHandle.HandleError ();
throw new OracleException (info.ErrorCode, info.ErrorMessage);
}
return output;
}
public byte GetAttributeByte (OciAttributeType attrType, OciErrorHandle errorHandle)
{
int status = 0;
byte output;
status = OCIAttrGetByte (Handle,
HandleType,
out output,
IntPtr.Zero,
attrType,
errorHandle);
if (status != 0) {
OciErrorInfo info = errorHandle.HandleError ();
throw new OracleException (info.ErrorCode, info.ErrorMessage);
}
return output;
}
public ushort GetAttributeUInt16 (OciAttributeType attrType, OciErrorHandle errorHandle)
{
int status = 0;
ushort output;
status = OCIAttrGetUInt16 (Handle,
HandleType,
out output,
IntPtr.Zero,
attrType,
errorHandle);
if (status != 0) {
OciErrorInfo info = errorHandle.HandleError ();
throw new OracleException (info.ErrorCode, info.ErrorMessage);
}
return output;
}
public int GetAttributeInt32 (OciAttributeType attrType, OciErrorHandle errorHandle)
{
int status = 0;
int output;
status = OCIAttrGetInt32 (Handle,
HandleType,
out output,
IntPtr.Zero,
attrType,
errorHandle);
if (status != 0) {
OciErrorInfo info = errorHandle.HandleError ();
throw new OracleException (info.ErrorCode, info.ErrorMessage);
}
return output;
}
public string GetAttributeString (OciAttributeType attrType, OciErrorHandle errorHandle)
{
string output = String.Empty;
IntPtr outputPtr = IntPtr.Zero;
int outSize;
int status = 0;
status = OCIAttrGet (Handle,
HandleType,
out outputPtr,
out outSize,
attrType,
errorHandle);
if (status != 0) {
OciErrorInfo info = errorHandle.HandleError ();
throw new OracleException (info.ErrorCode, info.ErrorMessage);
}
if (outputPtr != IntPtr.Zero && outSize > 0) {
object str = Marshal.PtrToStringAnsi (outputPtr, outSize);
if (str != null)
output = String.Copy ((string) str);
}
return output;
}
public void SetHandle (IntPtr h)
{
handle = h;
}
#endregion // Methods
#region Operators and Type Conversions
public static implicit operator IntPtr (OciHandle h)
{
return h.Handle;
}
#endregion // Operators and Type Conversions
}
}
@@ -35,6 +35,31 @@ namespace System.Data.OracleClient.Oci {
DirectPathContext = 0x0e,
DirectPathColumnArray = 0x0f,
DirectPathStream = 0x10,
Process = 0x11
Process = 0x11,
// Descriptor handles
LobLocator = 0x32,
Snapshot = 0x33,
ResultSet = 0x34,
Parameter = 0x35,
RowId = 0x36,
//ComplexObject = 0x37,
FileLobLocator = 0x38,
EnqueueOptions = 0x39,
DequeueOptions = 0x3a,
MessageProperties = 0x3b,
Agent = 0x3c,
Locator = 0x3d,
IntervalYearToMonth = 0x3e,
IntervalDayToSecond = 0x3f,
Notify = 0x40,
Date = 0x41,
Time = 0x42,
TimeWithTZ = 0x43,
TimeStamp = 0x44,
TimeStampWithTZ = 0x45,
TimeStampLocal = 0x46,
UserCallback = 0x47
}
}
@@ -20,10 +20,11 @@ using System.Data.OracleClient;
using System.Runtime.InteropServices;
namespace System.Data.OracleClient.Oci {
internal sealed class OciLobLocator : OciDescriptorHandle, IOciDescriptorHandle, IDisposable
internal sealed class OciLobLocator : OciDescriptorHandle, IDisposable
{
#region Fields
bool disposed = false;
OciErrorHandle errorHandle;
OciServiceHandle service;
OciDataType type;
@@ -32,8 +33,8 @@ namespace System.Data.OracleClient.Oci {
#region Constructors
public OciLobLocator (OciEnvironmentHandle environment, IntPtr handle)
: base (OciDescriptorType.LobLocator, environment, handle)
public OciLobLocator (OciHandle parent, IntPtr handle)
: base (OciHandleType.LobLocator, parent, handle)
{
}
@@ -65,6 +66,15 @@ namespace System.Data.OracleClient.Oci {
IntPtr errhp,
IntPtr locp);
[DllImport ("oci")]
static extern int OCILobCopy (IntPtr svchp,
IntPtr errhp,
IntPtr dst_locp,
IntPtr src_locp,
uint amount,
uint dst_offset,
uint src_offset);
[DllImport ("oci")]
static extern int OCILobErase (IntPtr svchp,
IntPtr errhp,
@@ -138,6 +148,26 @@ namespace System.Data.OracleClient.Oci {
}
}
public uint Copy (OciLobLocator destination, uint amount, uint destinationOffset, uint sourceOffset)
{
OCILobCopy (Service,
ErrorHandle,
destination,
Handle,
amount,
destinationOffset,
sourceOffset);
return amount;
}
protected override void Dispose (bool disposing)
{
if (!disposed) {
disposed = true;
base.Dispose ();
}
}
public void EndBatch ()
{
int status = 0;
@@ -279,11 +309,6 @@ namespace System.Data.OracleClient.Oci {
return (int) amount;
}
public void Dispose ()
{
Environment.FreeDescriptor (this);
}
#endregion // Methods
}
}
@@ -0,0 +1,85 @@
//
// OciLobLocator.cs
//
// Part of managed C#/.NET library System.Data.OracleClient.dll
//
// Part of the Mono class libraries at
// mcs/class/System.Data.OracleClient/System.Data.OracleClient.Oci
//
// Assembly: System.Data.OracleClient.dll
// Namespace: System.Data.OracleClient.Oci
//
// Author:
// Tim Coleman <[email protected]>
//
// Copyright (C) Tim Coleman, 2003
//
using System;
using System.Data.OracleClient;
using System.Runtime.InteropServices;
namespace System.Data.OracleClient.Oci {
internal sealed class OciParameterDescriptor : OciDescriptorHandle
{
#region Fields
OciErrorHandle errorHandle;
OciServiceHandle service;
OciDataType type;
#endregion // Fields
#region Constructors
public OciParameterDescriptor (OciHandle parent, IntPtr handle)
: base (OciHandleType.Parameter, parent, handle)
{
}
#endregion // Constructors
#region Properties
public OciErrorHandle ErrorHandle {
get { return errorHandle; }
set { errorHandle = value; }
}
#endregion // Properties
#region Methods
public string GetName ()
{
return GetAttributeString (OciAttributeType.Name, ErrorHandle);
}
public int GetDataSize ()
{
return (int) GetAttributeUInt16 (OciAttributeType.DataSize, ErrorHandle);
}
public OciDataType GetDataType ()
{
return (OciDataType) GetAttributeInt32 (OciAttributeType.DataType, ErrorHandle);
}
public short GetPrecision ()
{
return (short) GetAttributeByte (OciAttributeType.Precision, ErrorHandle);
}
public short GetScale ()
{
return (short) GetAttributeSByte (OciAttributeType.Scale, ErrorHandle);
}
public bool GetIsNull ()
{
return GetAttributeBool (OciAttributeType.IsNull, ErrorHandle);
}
#endregion // Methods
}
}
@@ -19,11 +19,12 @@ using System;
using System.Runtime.InteropServices;
namespace System.Data.OracleClient.Oci {
internal sealed class OciServerHandle : OciHandle, IOciHandle, IDisposable
internal sealed class OciServerHandle : OciHandle, IDisposable
{
#region Fields
bool attached;
bool disposed = false;
bool attached = false;
OciErrorHandle errorHandle;
string tnsname;
@@ -31,10 +32,9 @@ namespace System.Data.OracleClient.Oci {
#region Constructors
public OciServerHandle (OciEnvironmentHandle environment, IntPtr handle)
: base (OciHandleType.Server, environment, handle)
public OciServerHandle (OciHandle parent, IntPtr handle)
: base (OciHandleType.Server, parent, handle)
{
attached = false;
}
#endregion // Constructors
@@ -79,14 +79,17 @@ namespace System.Data.OracleClient.Oci {
return attached;
}
public void Dispose ()
protected override void Dispose (bool disposing)
{
if (attached) {
OCIServerDetach (Handle,
errorHandle.Handle,
0);
if (!disposed) {
try {
if (attached)
OCIServerDetach (Handle, errorHandle, 0);
disposed = true;
} finally {
base.Dispose (disposing);
}
}
Environment.FreeHandle (this);
}
#endregion // Methods
@@ -19,20 +19,22 @@ using System;
using System.Runtime.InteropServices;
namespace System.Data.OracleClient.Oci {
internal sealed class OciServiceHandle : OciHandle, IOciHandle, IDisposable
internal sealed class OciServiceHandle : OciHandle
{
#region Fields
OciSessionHandle sessionHandle;
OciServerHandle serverHandle;
bool disposed = false;
OciSessionHandle session;
OciServerHandle server;
OciErrorHandle errorHandle;
#endregion // Fields
#region Constructors
public OciServiceHandle (OciEnvironmentHandle environment, IntPtr handle)
: base (OciHandleType.Service, environment, handle)
public OciServiceHandle (OciHandle parent, IntPtr handle)
: base (OciHandleType.Service, parent, handle)
{
}
@@ -49,34 +51,46 @@ namespace System.Data.OracleClient.Oci {
#region Methods
public void Dispose ()
protected override void Dispose (bool disposing)
{
Environment.FreeHandle (this);
if (!disposed) {
try {
if (disposing) {
if (server != null)
server.Dispose ();
if (session != null)
session.Dispose ();
}
disposed = true;
} finally {
base.Dispose (disposing);
}
}
}
public bool SetServer (OciServerHandle handle)
{
serverHandle = handle;
server = handle;
int status = 0;
status = OciGlue.OCIAttrSet (Handle,
HandleType,
serverHandle.Handle,
server,
0,
OciAttributeType.Server,
errorHandle.Handle);
errorHandle);
return (status == 0);
}
public bool SetSession (OciSessionHandle handle)
{
sessionHandle = handle;
session = handle;
int status = 0;
status = OciGlue.OCIAttrSet (Handle,
HandleType,
sessionHandle.Handle,
session,
0,
OciAttributeType.Session,
errorHandle.Handle);
errorHandle);
return (status == 0);
}
@@ -19,13 +19,14 @@ using System;
using System.Runtime.InteropServices;
namespace System.Data.OracleClient.Oci {
internal sealed class OciSessionHandle : OciHandle, IOciHandle, IDisposable
internal sealed class OciSessionHandle : OciHandle, IDisposable
{
#region Fields
OciErrorHandle errorHandle;
OciServiceHandle serviceHandle;
bool begun;
bool begun = false;
bool disposed = false;
string username;
string password;
@@ -33,10 +34,9 @@ namespace System.Data.OracleClient.Oci {
#region Constructors
public OciSessionHandle (OciEnvironmentHandle environment, IntPtr handle)
: base (OciHandleType.Session, environment, handle)
public OciSessionHandle (OciHandle parent, IntPtr handle)
: base (OciHandleType.Session, parent, handle)
{
begun = false;
}
#endregion // Constructors
@@ -118,15 +118,21 @@ namespace System.Data.OracleClient.Oci {
return true;
}
public void Dispose ()
protected override void Dispose (bool disposing)
{
if (begun) {
OCISessionEnd (Service.Handle,
errorHandle.Handle,
Handle,
0);
if (!disposed) {
try {
if (begun) {
OCISessionEnd (Service.Handle,
errorHandle.Handle,
Handle,
0);
}
disposed = false;
} finally {
base.Dispose (disposing);
}
}
Environment.FreeHandle (this);
}
#endregion // Methods
@@ -20,7 +20,7 @@ using System.Collections;
using System.Runtime.InteropServices;
namespace System.Data.OracleClient.Oci {
internal sealed class OciStatementHandle : OciHandle, IOciHandle, IDisposable
internal sealed class OciStatementHandle : OciHandle, IDisposable
{
#region Fields
@@ -32,6 +32,7 @@ namespace System.Data.OracleClient.Oci {
ArrayList values;
ArrayList parameters;
bool disposed = false;
bool moreResults;
int columnCount;
@@ -39,8 +40,8 @@ namespace System.Data.OracleClient.Oci {
#region Constructors
public OciStatementHandle (OciEnvironmentHandle environment, IntPtr handle)
: base (OciHandleType.Statement, environment, handle)
public OciStatementHandle (OciHandle parent, IntPtr handle)
: base (OciHandleType.Statement, parent, handle)
{
parameters = new ArrayList ();
language = OciStatementLanguage.NTV;
@@ -80,25 +81,41 @@ namespace System.Data.OracleClient.Oci {
#region Methods
[DllImport ("oci")]
public static extern int OCIDescriptorFree (IntPtr descp,
[MarshalAs (UnmanagedType.U4)] OciDescriptorType type);
static extern int OCIBindByName (IntPtr stmtp,
out IntPtr bindpp,
IntPtr errhp,
string placeholder,
int placeh_len,
IntPtr valuep,
int value_sz,
[MarshalAs (UnmanagedType.U4)] OciDataType dty,
ref int indp,
IntPtr alenp,
ushort rcodep,
uint maxarr_len,
IntPtr curelp,
uint mode);
[DllImport ("oci")]
public static extern int OCIParamGet (IntPtr hndlp,
[MarshalAs (UnmanagedType.U4)] OciHandleType htype,
IntPtr errhp,
out IntPtr parmdpp,
[MarshalAs (UnmanagedType.U4)] int pos);
static extern int OCIDescriptorFree (IntPtr descp,
[MarshalAs (UnmanagedType.U4)] OciHandleType type);
[DllImport ("oci")]
public static extern int OCIStmtExecute (IntPtr svchp,
IntPtr stmthp,
IntPtr errhp,
[MarshalAs (UnmanagedType.U4)] bool iters,
uint rowoff,
IntPtr snap_in,
IntPtr snap_out,
[MarshalAs (UnmanagedType.U4)] OciExecuteMode mode);
static extern int OCIParamGet (IntPtr hndlp,
[MarshalAs (UnmanagedType.U4)] OciHandleType htype,
IntPtr errhp,
out IntPtr parmdpp,
[MarshalAs (UnmanagedType.U4)] int pos);
[DllImport ("oci")]
static extern int OCIStmtExecute (IntPtr svchp,
IntPtr stmthp,
IntPtr errhp,
[MarshalAs (UnmanagedType.U4)] bool iters,
uint rowoff,
IntPtr snap_in,
IntPtr snap_out,
[MarshalAs (UnmanagedType.U4)] OciExecuteMode mode);
[DllImport ("oci")]
public static extern int OCIStmtFetch (IntPtr stmtp,
@@ -116,7 +133,15 @@ namespace System.Data.OracleClient.Oci {
[MarshalAs (UnmanagedType.U4)] OciStatementLanguage language,
[MarshalAs (UnmanagedType.U4)] OciStatementMode mode);
public IntPtr CreateParameterHandle (int position)
protected override void Dispose (bool disposing)
{
if (!disposed) {
disposed = true;
base.Dispose (disposing);
}
}
public OciParameterDescriptor GetParameter (int position)
{
IntPtr handle = IntPtr.Zero;
int status = 0;
@@ -125,47 +150,88 @@ namespace System.Data.OracleClient.Oci {
OciHandleType.Statement,
ErrorHandle.Handle,
out handle,
position);
position + 1);
if (status != 0) {
OciErrorInfo info = ErrorHandle.HandleError ();
throw new OracleException (info.ErrorCode, info.ErrorMessage);
}
return handle;
OciParameterDescriptor output = new OciParameterDescriptor (this, handle);
output.ErrorHandle = ErrorHandle;
return output;
}
public void FreeBindHandle (IntPtr handle)
public OciDefineHandle GetDefineHandle (int position)
{
int status = 0;
OciDefineHandle defineHandle = new OciDefineHandle (this, IntPtr.Zero);
defineHandle.ErrorHandle = ErrorHandle;
defineHandle.DefineByPosition (position);
//status = OCIDescriptorFree (handle, OciDescriptorType.Parameter);
if (status != 0) {
OciErrorInfo info = ErrorHandle.HandleError ();
throw new OracleException (info.ErrorCode, info.ErrorMessage);
}
return defineHandle;
}
public void FreeParameterHandle (IntPtr handle)
public OciBindHandle GetBindHandle (string name, object val, OciDataType type)
{
IntPtr handle = IntPtr.Zero;
IntPtr value = IntPtr.Zero;
int indicator = 0;
string stringValue = val.ToString ();
int definedSize = 0;
int status = 0;
status = OCIDescriptorFree (handle, OciDescriptorType.Parameter);
if (val == DBNull.Value)
indicator = -1;
else
switch (type) {
case OciDataType.Number:
case OciDataType.Integer:
case OciDataType.Float:
case OciDataType.VarNum:
type = OciDataType.Char;
definedSize = stringValue.Length;
value = Marshal.StringToHGlobalAnsi (stringValue);
break;
case OciDataType.Date:
break;
default:
type = OciDataType.Char;
definedSize = stringValue.Length;
value = Marshal.StringToHGlobalAnsi (stringValue);
break;
}
status = OCIBindByName (Handle,
out handle,
ErrorHandle,
name,
name.Length,
value,
definedSize,
type,
ref indicator,
IntPtr.Zero,
0,
0,
IntPtr.Zero,
0);
if (status != 0) {
OciErrorInfo info = ErrorHandle.HandleError ();
throw new OracleException (info.ErrorCode, info.ErrorMessage);
}
OciBindHandle output = new OciBindHandle (this, handle);
output.Value = value;
return output;
}
void Define ()
{
values = new ArrayList ();
for (int i = 0; i < columnCount; i += 1)
values.Add (new OciDefineHandle (this, i + 1));
}
public void Dispose ()
{
Environment.FreeHandle (this);
values.Add (GetDefineHandle (i));
}
public bool ExecuteQuery ()
@@ -213,192 +279,12 @@ namespace System.Data.OracleClient.Oci {
void GetColumnCount ()
{
int status = 0;
status = OciGlue.OCIAttrGetInt32 ( Handle,
(uint) OciHandleType.Statement,
out columnCount,
IntPtr.Zero,
OciAttributeType.ParameterCount,
ErrorHandle.Handle);
if (status != 0) {
OciErrorInfo info = ErrorHandle.HandleError ();
throw new OracleException (info.ErrorCode, info.ErrorMessage);
}
}
public bool GetAttributeBool (IntPtr handle, OciAttributeType type)
{
bool output;
int status = 0;
status = OciGlue.OCIAttrGetBool (handle,
(uint) OciDescriptorType.Parameter,
out output,
IntPtr.Zero,
type,
ErrorHandle.Handle);
if (status != 0) {
OciErrorInfo info = ErrorHandle.HandleError ();
throw new OracleException (info.ErrorCode, info.ErrorMessage);
}
return output;
}
public sbyte GetAttributeSByte (IntPtr handle, OciAttributeType type) {
sbyte output;
int status = 0;
status = OciGlue.OCIAttrGetSByte (handle,
(uint) OciDescriptorType.Parameter,
out output,
IntPtr.Zero,
type,
ErrorHandle.Handle);
if (status != 0) {
OciErrorInfo info = ErrorHandle.HandleError ();
throw new OracleException (info.ErrorCode, info.ErrorMessage);
}
return output;
}
public byte GetAttributeByte (IntPtr handle, OciAttributeType type)
{
byte output;
int status = 0;
status = OciGlue.OCIAttrGetByte (handle,
(uint) OciDescriptorType.Parameter,
out output,
IntPtr.Zero,
type,
ErrorHandle.Handle);
if (status != 0) {
OciErrorInfo info = ErrorHandle.HandleError ();
throw new OracleException (info.ErrorCode, info.ErrorMessage);
}
return output;
}
public ushort GetAttributeUInt16 (IntPtr handle, OciAttributeType type) {
int status = 0;
ushort output;
status = OciGlue.OCIAttrGetUInt16 (handle,
(uint) OciDescriptorType.Parameter,
out output,
IntPtr.Zero,
type,
ErrorHandle.Handle);
if (status != 0) {
OciErrorInfo info = ErrorHandle.HandleError ();
throw new OracleException (info.ErrorCode, info.ErrorMessage);
}
return output;
}
public int GetAttributeInt32 (IntPtr handle, OciAttributeType type)
{
int status = 0;
int output;
status = OciGlue.OCIAttrGetInt32 (handle,
(uint) OciDescriptorType.Parameter,
out output,
IntPtr.Zero,
type,
ErrorHandle.Handle);
if (status != 0) {
OciErrorInfo info = ErrorHandle.HandleError ();
throw new OracleException (info.ErrorCode, info.ErrorMessage);
}
return output;
}
[MonoTODO]
public string GetAttributeString (IntPtr handle, OciAttributeType type)
{
string output = String.Empty;
IntPtr outputPtr = IntPtr.Zero;
int outSize;
int status = 0;
status = OciGlue.OCIAttrGet (handle,
(uint) OciDescriptorType.Parameter,
out outputPtr,
out outSize,
type,
ErrorHandle.Handle);
if (status != 0) {
OciErrorInfo info = ErrorHandle.HandleError ();
throw new OracleException (info.ErrorCode, info.ErrorMessage);
}
if (outputPtr != IntPtr.Zero && outSize > 0) {
object name = Marshal.PtrToStringAnsi (outputPtr, outSize);
if (name != null) {
output = String.Copy ((string) name);
/* TRWC
* We shouldn't really free this, but how can we make Oracle
* do it?
*/
// Marshal.FreeHGlobal (outputPtr); -- this *may* leak memory
}
}
return output;
}
[MonoTODO]
public OciColumnInfo DescribeColumn (int ordinal)
{
int status = 0;
OciColumnInfo columnInfo;
string schemaName;
IntPtr parameterHandle = CreateParameterHandle (ordinal + 1);
columnInfo.ColumnName = GetAttributeString (parameterHandle, OciAttributeType.Name);
columnInfo.ColumnOrdinal = ordinal + 1;
columnInfo.ColumnSize = GetAttributeUInt16 (parameterHandle, OciAttributeType.DataSize);
columnInfo.Precision = GetAttributeByte (parameterHandle, OciAttributeType.Precision);
columnInfo.Scale = GetAttributeSByte (parameterHandle, OciAttributeType.Scale);
columnInfo.DataType = (OciDataType) GetAttributeInt32 (parameterHandle, OciAttributeType.DataType);
columnInfo.AllowDBNull = GetAttributeBool (parameterHandle, OciAttributeType.IsNull);
columnInfo.BaseColumnName = GetAttributeString (parameterHandle, OciAttributeType.Name);
// TRWC not sure what to do with this yet.
schemaName = GetAttributeString (parameterHandle, OciAttributeType.SchemaName);
FreeParameterHandle (parameterHandle);
return columnInfo;
columnCount = GetAttributeInt32 (OciAttributeType.ParameterCount, ErrorHandle);
}
public OciStatementType GetStatementType ()
{
int status = 0;
int statementType;
status = OciGlue.OCIAttrGetInt32 (Handle,
(uint) OciHandleType.Statement,
out statementType,
IntPtr.Zero,
OciAttributeType.StatementType,
errorHandle.Handle);
if (status != 0) {
OciErrorInfo info = ErrorHandle.HandleError ();
throw new OracleException (info.ErrorCode, info.ErrorMessage);
}
return (OciStatementType) statementType;
return (OciStatementType) GetAttributeInt32 (OciAttributeType.StatementType, ErrorHandle);
}
public bool Fetch ()
@@ -19,10 +19,11 @@ using System;
using System.Runtime.InteropServices;
namespace System.Data.OracleClient.Oci {
internal sealed class OciTransactionHandle : OciHandle, IOciHandle, IDisposable
internal sealed class OciTransactionHandle : OciHandle, IDisposable
{
#region Fields
bool disposed = false;
OciErrorHandle errorHandle;
OciServiceHandle serviceHandle;
@@ -30,8 +31,8 @@ namespace System.Data.OracleClient.Oci {
#region Constructors
public OciTransactionHandle (OciEnvironmentHandle environment, IntPtr handle)
: base (OciHandleType.Transaction, environment, handle)
public OciTransactionHandle (OciHandle parent, IntPtr handle)
: base (OciHandleType.Transaction, parent, handle)
{
}
@@ -72,12 +73,12 @@ namespace System.Data.OracleClient.Oci {
public void AttachToServiceContext ()
{
int status = 0;
status = OciGlue.OCIAttrSet (Service.Handle,
status = OciGlue.OCIAttrSet (Service,
OciHandleType.Service,
Handle,
this,
0,
OciAttributeType.Transaction,
ErrorHandle.Handle);
ErrorHandle);
if (status != 0) {
OciErrorInfo info = ErrorHandle.HandleError ();
throw new OracleException (info.ErrorCode, info.ErrorMessage);
@@ -90,10 +91,10 @@ namespace System.Data.OracleClient.Oci {
AttachToServiceContext ();
status = OCITransStart (Service.Handle,
ErrorHandle.Handle,
60,
OciTransactionFlags.New);
status = OCITransStart (Service,
ErrorHandle,
60,
OciTransactionFlags.New);
if (status != 0) {
OciErrorInfo info = ErrorHandle.HandleError ();
@@ -105,9 +106,7 @@ namespace System.Data.OracleClient.Oci {
{
int status = 0;
AttachToServiceContext ();
status = OCITransCommit (Service.Handle,
ErrorHandle.Handle,
0);
status = OCITransCommit (Service, ErrorHandle, 0);
if (status != 0) {
OciErrorInfo info = ErrorHandle.HandleError ();
@@ -115,18 +114,19 @@ namespace System.Data.OracleClient.Oci {
}
}
public void Dispose ()
protected override void Dispose (bool disposing)
{
Environment.FreeHandle (this);
if (!disposed) {
disposed = true;
base.Dispose (disposing);
}
}
public void Rollback ()
{
int status = 0;
AttachToServiceContext ();
status = OCITransRollback (Service.Handle,
ErrorHandle.Handle,
0);
status = OCITransRollback (Service, ErrorHandle, 0);
if (status != 0) {
OciErrorInfo info = ErrorHandle.HandleError ();
@@ -67,54 +67,6 @@ namespace System.Data.OracleClient.Oci {
[MarshalAs (UnmanagedType.U4)] OciAttributeType attrtype,
IntPtr errhp);
[DllImport ("oci")]
public static extern int OCIAttrGet (IntPtr trgthndlp,
uint trghndltyp,
out IntPtr attributep,
out int sizep,
[MarshalAs (UnmanagedType.U4)] OciAttributeType attrtype,
IntPtr errhp);
[DllImport ("oci", EntryPoint = "OCIAttrGet")]
public static extern int OCIAttrGetBool (IntPtr trgthndlp,
uint trghndltyp,
out bool attributep,
IntPtr sizep,
[MarshalAs (UnmanagedType.U4)] OciAttributeType attrtype,
IntPtr errhp);
[DllImport ("oci", EntryPoint = "OCIAttrGet")]
public static extern int OCIAttrGetSByte (IntPtr trgthndlp,
uint trghndltyp,
out sbyte attributep,
IntPtr sizep,
[MarshalAs (UnmanagedType.U4)] OciAttributeType attrtype,
IntPtr errhp);
[DllImport ("oci", EntryPoint = "OCIAttrGet")]
public static extern int OCIAttrGetByte (IntPtr trgthndlp,
uint trghndltyp,
out byte attributep,
IntPtr sizep,
[MarshalAs (UnmanagedType.U4)] OciAttributeType attrtype,
IntPtr errhp);
[DllImport ("oci", EntryPoint = "OCIAttrGet")]
public static extern int OCIAttrGetUInt16 (IntPtr trgthndlp,
uint trghndltyp,
out ushort attributep,
IntPtr sizep,
[MarshalAs (UnmanagedType.U4)] OciAttributeType attrtype,
IntPtr errhp);
[DllImport ("oci", EntryPoint = "OCIAttrGet")]
public static extern int OCIAttrGetInt32 (IntPtr trgthndlp,
uint trghndltyp,
out int attributep,
IntPtr sizep,
[MarshalAs (UnmanagedType.U4)] OciAttributeType attrtype,
IntPtr errhp);
[DllImport ("oci")]
public static extern int OCIErrorGet (IntPtr hndlp,
uint recordno,
@@ -267,8 +267,7 @@ namespace System.Data.OracleClient {
public string GetName (int i)
{
OciColumnInfo columnInfo = statement.DescribeColumn (i);
return columnInfo.ColumnName;
return statement.GetParameter (i).GetName ();
}
[MonoTODO]
@@ -315,18 +314,19 @@ namespace System.Data.OracleClient {
for (int i = 0; i < statement.ColumnCount; i += 1) {
DataRow row = schemaTable.NewRow ();
OciColumnInfo columnInfo = statement.DescribeColumn (i);
row ["ColumnName"] = columnInfo.ColumnName;
row ["ColumnOrdinal"] = i + 1;
row ["ColumnSize"] = (int) columnInfo.ColumnSize;
row ["NumericPrecision"] = (short) columnInfo.Precision;
row ["NumericScale"] = (short) columnInfo.Scale;
OciParameterDescriptor parameter = statement.GetParameter (i);
row ["ColumnName"] = parameter.GetName ();
row ["ColumnOrdinal"] = i + 1;
row ["ColumnSize"] = parameter.GetDataSize ();
row ["NumericPrecision"] = parameter.GetPrecision ();
row ["NumericScale"] = parameter.GetScale ();
// FIXME: "DataType" need to implement
//row ["DataType"] = OciGlue.OciDataTypeToDbType (columnInfo.DataType);
row ["DataType"] = typeof(string);
row ["AllowDBNull"] = columnInfo.AllowDBNull;
row ["BaseColumnName"] = columnInfo.BaseColumnName;
row ["DataType"] = typeof(string);
row ["AllowDBNull"] = parameter.GetIsNull ();
row ["BaseColumnName"] = parameter.GetName ();
schemaTable.Rows.Add (row);
}
@@ -79,10 +79,8 @@ namespace System.Data.OracleClient {
public int ChunkSize {
[MonoTODO]
get {
if (Connection.State == ConnectionState.Closed)
throw new InvalidOperationException ();
if (!isOpen)
throw new ObjectDisposedException ("OracleLob");
AssertConnectionIsOpen ();
AssertObjectNotDisposed ();
return locator.GetChunkSize ();
}
}
@@ -101,20 +99,16 @@ namespace System.Data.OracleClient {
public bool IsTemporary {
get {
if (Connection.State == ConnectionState.Closed)
throw new InvalidOperationException ();
if (!isOpen)
throw new ObjectDisposedException ("OracleLob");
AssertConnectionIsOpen ();
AssertObjectNotDisposed ();
throw new NotImplementedException ();
}
}
public override long Length {
get {
if (Connection.State == ConnectionState.Closed)
throw new InvalidOperationException ();
if (!isOpen)
throw new ObjectDisposedException ("OracleLob");
AssertConnectionIsOpen ();
AssertObjectNotDisposed ();
if (length >= 0)
return length;
return locator.GetLength (LobType == OracleType.Blob);
@@ -125,28 +119,26 @@ namespace System.Data.OracleClient {
get { return type; }
}
internal OciLobLocator Locator {
get { return locator; }
}
public override long Position {
get {
if (Connection.State == ConnectionState.Closed)
throw new InvalidOperationException ();
if (!isOpen)
throw new ObjectDisposedException ("OracleLob");
AssertConnectionIsOpen ();
AssertObjectNotDisposed ();
return position;
}
set {
if (!isOpen)
throw new ObjectDisposedException ("OracleLob");
if (value > Length)
throw new ArgumentOutOfRangeException ();
AssertConnectionIsOpen ();
AssertObjectNotDisposed ();
position = value;
}
}
public object Value {
get {
if (!isOpen)
throw new ObjectDisposedException ("OracleLob");
AssertObjectNotDisposed ();
if (IsNull)
return DBNull.Value;
@@ -173,6 +165,38 @@ namespace System.Data.OracleClient {
throw new NotImplementedException ();
}
void AssertAmountIsEven (long amount, string argName)
{
if (amount % 2 == 1)
throw new ArgumentOutOfRangeException ("CLOB and NCLOB parameters require even number of bytes for this argument.");
}
void AssertAmountIsValid (long amount, string argName)
{
if (amount > UInt32.MaxValue)
throw new ArgumentOutOfRangeException ("Argument too big.");
if (LobType == OracleType.Clob || LobType == OracleType.NClob)
AssertAmountIsEven (amount, argName);
}
void AssertConnectionIsOpen ()
{
if (connection.State == ConnectionState.Closed)
throw new InvalidOperationException ("Invalid operation. The connection is closed.");
}
void AssertObjectNotDisposed ()
{
if (!isOpen)
throw new ObjectDisposedException ("OracleLob");
}
void AssertTransactionExists ()
{
if (connection.Transaction == null)
throw new InvalidOperationException ("Modifying a LOB requires that the connection be transacted.");
}
public void BeginBatch ()
{
BeginBatch (OracleLobOpenMode.ReadOnly);
@@ -180,8 +204,11 @@ namespace System.Data.OracleClient {
public void BeginBatch (OracleLobOpenMode mode)
{
isBatched = true;
AssertConnectionIsOpen ();
AssertObjectNotDisposed ();
locator.BeginBatch (mode);
isBatched = true;
}
[MonoTODO]
@@ -197,22 +224,28 @@ namespace System.Data.OracleClient {
isOpen = false;
}
[MonoTODO]
public long CopyTo (OracleLob destination)
{
throw new NotImplementedException ();
return CopyTo (0, destination, 0, Length);
}
[MonoTODO]
public long CopyTo (OracleLob destination, long destinationOffset)
{
throw new NotImplementedException ();
return CopyTo (0, destination, destinationOffset, Length);
}
[MonoTODO]
public long CopyTo (long sourceOffset, OracleLob destination, long destinationOffset, long amount)
{
throw new NotImplementedException ();
if (destination.IsNull)
throw new ArgumentNullException ();
AssertAmountIsValid (sourceOffset, "sourceOffset");
AssertAmountIsValid (destinationOffset, "destinationOffset");
AssertAmountIsValid (amount, "amount");
AssertTransactionExists ();
AssertConnectionIsOpen ();
return (long) locator.Copy (destination.Locator, (uint) amount, (uint) destinationOffset + 1, (uint) sourceOffset + 1);
}
[MonoTODO]
@@ -223,6 +256,9 @@ namespace System.Data.OracleClient {
public void EndBatch ()
{
AssertConnectionIsOpen ();
AssertObjectNotDisposed ();
locator.EndBatch ();
isBatched = false;
}
@@ -234,16 +270,14 @@ namespace System.Data.OracleClient {
public long Erase (long offset, long amount)
{
if (offset < 0)
throw new ArgumentOutOfRangeException ();
if (amount < 0)
throw new ArgumentOutOfRangeException ();
if (offset < 0 || amount < 0)
throw new ArgumentOutOfRangeException ("Must be a positive value.");
if (offset + amount > Length)
throw new ArgumentOutOfRangeException ();
if (offset > UInt32.MaxValue)
throw new ArgumentOutOfRangeException ();
if (amount > UInt32.MaxValue)
throw new ArgumentOutOfRangeException ();
AssertAmountIsValid (offset, "offset");
AssertAmountIsValid (amount, "amount");
return (long) locator.Erase ((uint) offset + 1, (uint) amount);
}
@@ -254,6 +288,14 @@ namespace System.Data.OracleClient {
public override int Read (byte[] buffer, int offset, int count)
{
if (buffer == null)
throw new ArgumentNullException ();
AssertAmountIsValid (offset, "offset");
AssertAmountIsValid (count, "count");
AssertConnectionIsOpen ();
AssertObjectNotDisposed ();
int bytesRead;
byte[] output = new byte[count];
@@ -290,18 +332,10 @@ namespace System.Data.OracleClient {
[MonoTODO]
public override void SetLength (long value)
{
if ((LobType == OracleType.Clob || LobType == OracleType.NClob) && (value % 2) == 1)
throw new ArgumentOutOfRangeException ();
if (value > UInt32.MaxValue)
throw new ArgumentOutOfRangeException ();
if (connection.Transaction == null)
throw new InvalidOperationException ();
if (IsNull)
throw new InvalidOperationException ();
if (Connection.State == ConnectionState.Closed)
throw new InvalidOperationException ();
if (!isOpen)
throw new ObjectDisposedException ("OracleLob");
AssertAmountIsValid (value, "value");
AssertTransactionExists ();
AssertConnectionIsOpen ();
AssertObjectNotDisposed ();
locator.Trim ((uint) value);
length = value;
@@ -311,38 +345,25 @@ namespace System.Data.OracleClient {
{
if (buffer == null)
throw new ArgumentNullException ("Buffer is null.");
if (offset < 0)
throw new ArgumentOutOfRangeException ("Offset parameter must be positive.");
if (count < 0)
throw new ArgumentOutOfRangeException ("Count parameter must be positive.");
if (offset < 0 || count < 0)
throw new ArgumentOutOfRangeException ("Must be a positive value.");
if (offset + count > buffer.Length)
throw new ArgumentOutOfRangeException ("Offset + Count > buffer Length.");
if (offset > UInt32.MaxValue)
throw new ArgumentOutOfRangeException ("Offset too big.");
if (count > UInt32.MaxValue)
throw new ArgumentOutOfRangeException ("Count too big.");
if (LobType == OracleType.Clob || LobType == OracleType.NClob) {
if (offset % 2 == 1)
throw new ArgumentOutOfRangeException ("Offset must be even.");
if (count % 2 == 1)
throw new ArgumentOutOfRangeException ("Count must be even.");
}
if (connection.Transaction == null)
throw new InvalidOperationException ("Transaction is null.");
if (IsNull)
throw new InvalidOperationException ("LOB is null.");
if (connection.State == ConnectionState.Closed)
throw new InvalidOperationException ("Connection is closed.");
if (!isOpen)
throw new ObjectDisposedException ("OracleLob");
throw new ArgumentOutOfRangeException ("The offset and count values specified exceed the buffer provided.");
AssertAmountIsValid (offset, "offset");
AssertAmountIsValid (count, "count");
AssertTransactionExists ();
AssertConnectionIsOpen ();
AssertObjectNotDisposed ();
byte[] value = null;
if (offset + count == buffer.Length && offset == 0)
position += locator.Write (buffer, (uint) Position, (uint) buffer.Length, LobType);
value = buffer;
else {
byte[] copy = new byte [count];
Array.Copy (buffer, offset, copy, 0, count);
position += locator.Write (copy, (uint) Position, (uint) copy.Length, LobType);
value = new byte[count];
Array.Copy (buffer, offset, value, 0, count);
}
position += locator.Write (value, (uint) offset, (uint) value.Length, LobType);
}
#endregion // Methods
@@ -28,6 +28,7 @@ namespace System.Data.OracleClient {
string name;
OracleType oracleType = OracleType.VarChar;
OciDataType ociType;
int size;
ParameterDirection direction;
bool isNullable;
@@ -54,7 +55,6 @@ namespace System.Data.OracleClient {
public OracleParameter (string name, object value)
{
bindHandle = new OciBindHandle (name);
this.name = name;
this.value = value;
SourceVersion = DataRowVersion.Current;
@@ -78,7 +78,6 @@ namespace System.Data.OracleClient {
public OracleParameter (string name, OracleType dataType, int size, ParameterDirection direction, bool isNullable, byte precision, byte scale, string srcColumn, DataRowVersion srcVersion, object value)
{
bindHandle = new OciBindHandle (name);
this.name = name;
this.size = size;
this.value = value;
@@ -124,8 +123,8 @@ namespace System.Data.OracleClient {
}
public string ParameterName {
get { return bindHandle.Name; }
set { bindHandle.Name = value; }
get { return name; }
set { name = value; }
}
public byte Precision {
@@ -167,7 +166,7 @@ namespace System.Data.OracleClient {
internal void Bind (OciStatementHandle handle)
{
bindHandle.Bind (handle, value);
bindHandle = handle.GetBindHandle (ParameterName, value, ociType);
}
[MonoTODO]
@@ -225,61 +224,61 @@ namespace System.Data.OracleClient {
switch (type) {
case DbType.AnsiString:
oracleType = OracleType.VarChar;
bindHandle.Type = OciDataType.VarChar;
ociType = OciDataType.VarChar;
break;
case DbType.AnsiStringFixedLength:
oracleType = OracleType.Char;
bindHandle.Type = OciDataType.Char;
ociType = OciDataType.Char;
break;
case DbType.Binary:
case DbType.Guid:
oracleType = OracleType.Raw;
bindHandle.Type = OciDataType.Raw;
ociType = OciDataType.Raw;
break;
case DbType.Boolean:
case DbType.Byte:
oracleType = OracleType.Byte;
bindHandle.Type = OciDataType.Integer;
ociType = OciDataType.Integer;
break;
case DbType.Currency:
case DbType.Decimal:
case DbType.Int64:
oracleType = OracleType.Number;
bindHandle.Type = OciDataType.Number;
ociType = OciDataType.Number;
break;
case DbType.Date:
case DbType.DateTime:
case DbType.Time:
oracleType = OracleType.DateTime;
bindHandle.Type = OciDataType.Char;
ociType = OciDataType.Char;
break;
case DbType.Double:
oracleType = OracleType.Double;
bindHandle.Type = OciDataType.Float;
ociType = OciDataType.Float;
break;
case DbType.Int16:
oracleType = OracleType.Int16;
bindHandle.Type = OciDataType.Integer;
ociType = OciDataType.Integer;
break;
case DbType.Int32:
oracleType = OracleType.Int32;
bindHandle.Type = OciDataType.Integer;
ociType = OciDataType.Integer;
break;
case DbType.Object:
oracleType = OracleType.Blob;
bindHandle.Type = OciDataType.Blob;
ociType = OciDataType.Blob;
break;
case DbType.Single:
oracleType = OracleType.Float;
bindHandle.Type = OciDataType.Float;
ociType = OciDataType.Float;
break;
case DbType.String:
oracleType = OracleType.NVarChar;
bindHandle.Type = OciDataType.VarChar;
ociType = OciDataType.VarChar;
break;
case DbType.StringFixedLength:
oracleType = OracleType.NChar;
bindHandle.Type = OciDataType.Char;
ociType = OciDataType.Char;
break;
default:
throw new ArgumentException (exception);
@@ -297,76 +296,76 @@ namespace System.Data.OracleClient {
case OracleType.LongRaw:
case OracleType.Raw:
dbType = DbType.Binary;
bindHandle.Type = OciDataType.Raw;
ociType = OciDataType.Raw;
break;
case OracleType.Byte:
dbType = DbType.Byte;
bindHandle.Type = OciDataType.Integer;
ociType = OciDataType.Integer;
break;
case OracleType.Char:
dbType = DbType.AnsiStringFixedLength;
bindHandle.Type = OciDataType.Char;
ociType = OciDataType.Char;
break;
case OracleType.Clob:
case OracleType.LongVarChar:
case OracleType.RowId:
case OracleType.VarChar:
dbType = DbType.AnsiString;
bindHandle.Type = OciDataType.VarChar;
ociType = OciDataType.VarChar;
break;
case OracleType.Cursor:
case OracleType.IntervalDayToSecond:
dbType = DbType.Object;
bindHandle.Type = OciDataType.Blob;
ociType = OciDataType.Blob;
break;
case OracleType.DateTime:
case OracleType.Timestamp:
case OracleType.TimestampLocal:
case OracleType.TimestampWithTZ:
dbType = DbType.DateTime;
bindHandle.Type = OciDataType.Char;
ociType = OciDataType.Char;
break;
case OracleType.Double:
dbType = DbType.Double;
bindHandle.Type = OciDataType.Float;
ociType = OciDataType.Float;
break;
case OracleType.Float:
dbType = DbType.Single;
bindHandle.Type = OciDataType.Float;
ociType = OciDataType.Float;
break;
case OracleType.Int16:
dbType = DbType.Int16;
bindHandle.Type = OciDataType.Integer;
ociType = OciDataType.Integer;
break;
case OracleType.Int32:
case OracleType.IntervalYearToMonth:
dbType = DbType.Int32;
bindHandle.Type = OciDataType.Integer;
ociType = OciDataType.Integer;
break;
case OracleType.NChar:
dbType = DbType.StringFixedLength;
bindHandle.Type = OciDataType.Char;
ociType = OciDataType.Char;
break;
case OracleType.NClob:
case OracleType.NVarChar:
dbType = DbType.String;
bindHandle.Type = OciDataType.VarChar;
ociType = OciDataType.VarChar;
break;
case OracleType.Number:
dbType = DbType.VarNumeric;
bindHandle.Type = OciDataType.Number;
ociType = OciDataType.Number;
break;
case OracleType.SByte:
dbType = DbType.SByte;
bindHandle.Type = OciDataType.Integer;
ociType = OciDataType.Integer;
break;
case OracleType.UInt16:
dbType = DbType.UInt16;
bindHandle.Type = OciDataType.Integer;
ociType = OciDataType.Integer;
break;
case OracleType.UInt32:
dbType = DbType.UInt32;
bindHandle.Type = OciDataType.Integer;
ociType = OciDataType.Integer;
break;
default:
throw new ArgumentException (exception);
+1 -3
View File
@@ -1,12 +1,9 @@
System.Data.OracleClient.Oci/IOciHandle.cs
System.Data.OracleClient.Oci/IOciDescriptorHandle.cs
System.Data.OracleClient.Oci/OciAttributeType.cs
System.Data.OracleClient.Oci/OciBindHandle.cs
System.Data.OracleClient.Oci/OciColumnInfo.cs
System.Data.OracleClient.Oci/OciCredentialType.cs
System.Data.OracleClient.Oci/OciDataType.cs
System.Data.OracleClient.Oci/OciDefineHandle.cs
System.Data.OracleClient.Oci/OciDescriptorType.cs
System.Data.OracleClient.Oci/OciDescriptorHandle.cs
System.Data.OracleClient.Oci/OciEnvironmentHandle.cs
System.Data.OracleClient.Oci/OciEnvironmentMode.cs
@@ -17,6 +14,7 @@ System.Data.OracleClient.Oci/OciHandle.cs
System.Data.OracleClient.Oci/OciHandleType.cs
System.Data.OracleClient.Oci/OciLobLocator.cs
System.Data.OracleClient.Oci/OciLobType.cs
System.Data.OracleClient.Oci/OciParameterDescriptor.cs
System.Data.OracleClient.Oci/OciPointerType.cs
System.Data.OracleClient.Oci/OciServerHandle.cs
System.Data.OracleClient.Oci/OciServiceHandle.cs
@@ -1,3 +1,8 @@
2003-02-28 Aleksey Demakov <[email protected]>
* DbDataAdapter.cs: Update (DataSet) updates the default
table only.
2003-02-25 Alan Tam <[email protected]>
* DbDataAdapter.cs: Added support for filling when schema is present.
@@ -362,10 +362,7 @@ namespace System.Data.Common {
public override int Update (DataSet dataSet)
{
int result = 0;
foreach (DataTable table in dataSet.Tables)
result += Update (table);
return result;
return Update (dataSet, DefaultSourceTableName);
}
public int Update (DataTable dataTable)
@@ -1,3 +1,7 @@
2003-03-04 Gonzalo Paniagua Javier <[email protected]>
* SqlException.cs: implemented GetObjectData ().
2003-02-16 Daniel Morgan <[email protected]>
* ChangeLog: added this file
@@ -99,10 +99,13 @@ namespace System.Data.SqlClient {
return new SqlException (e.Class, e.LineNumber, e.Message, e.Number, e.Procedure, e.Server, "Mono SqlClient Data Provider", e.State);
}
[MonoTODO ("Determine how to serialize this class.")]
public override void GetObjectData (SerializationInfo si, StreamingContext context)
{
throw new NotImplementedException ();
if (si == null)
throw new ArgumentNullException ("si");
si.AddValue ("errors", errors);
base.GetObjectData (si, context);
}
#endregion // Methods
@@ -4,7 +4,7 @@
// Author:
// Dennis Hayes ([email protected])
//
// (C) 2002 Ximian, Inc
// (C) 2002/3 Ximian, Inc
//
using System;
@@ -13,13 +13,69 @@ namespace System.Drawing.Drawing2D
/// <summary>
/// Summary description for AdjustableArrowCap.
/// </summary>
public class AdjustableArrowCap
public sealed class AdjustableArrowCap : CustomLineCap
{
public AdjustableArrowCap()
{
//
// TODO: Add constructor logic here
//
private bool isFilled;
private float height;
private float width;
private float middleInset;
//Constructors
public AdjustableArrowCap(float width, float height, bool isFilled) {
this.isFilled = isFilled;
this.height = height;
this.width = width;
middleInset = 0;
}
public AdjustableArrowCap(float width, float height) {
isFilled = true;
this.height = height;
this.width = width;
middleInset = 0;
//AdjustableArrowCap(width, height, true);
}
//Public Properities
[MonoTODO] //redraw on set
public bool Filled {
get {
return isFilled;
}
set {
isFilled = value;
//Redraw!
}
}
[MonoTODO] //redraw on set
public float Width {
get {
return width;
}
set {
width = value;
//Redraw!
}
}
[MonoTODO] //redraw on set
public float Height {
get {
return height;
}
set {
height = value;
//Redraw!
}
}
[MonoTODO] //redraw on set
public float MiddleInset {
get {
return middleInset;
}
set {
middleInset = value;
//Redraw!
}
}
}
}
@@ -4,7 +4,7 @@
// Author:
// Dennis Hayes ([email protected])
//
// (C) 2002 Ximian, Inc
// (C) 2002/3 Ximian, Inc
//
using System;
@@ -13,13 +13,71 @@ namespace System.Drawing.Drawing2D
/// <summary>
/// Summary description for Blend.
/// </summary>
public class Blend
public sealed class Blend
{
public Blend()
{
//
// TODO: Add constructor logic here
//
private int count;
private float [] positions;
private float [] factors;
public Blend(int count) {
this.count = count;
if(count < 2){
throw new ArgumentOutOfRangeException("Count", count, "Must be at least 2");
}
if(count == 2){
//FIXME: call Blend!
count = 2;
positions = new float [1];
factors = new float [1];
positions[0] = 0.0F;
positions[1] = 1.0F;
factors[0] = 0.0F;
factors[1] = 1.0F;
}
int i;
for(i = 0; i < count; i++){
positions[i] = (1.0F/count) * i;
factors[i] = (1.0F/count) * i;
}
//fix any rounding errors that would generate an invald list.
positions[0] = 0.0F;
positions[1] = 1.0F;
factors[0] = 0.0F;
factors[1] = 1.0F;
}
public Blend() {
count = 2;
positions = new float [1];
factors = new float [1];
positions[0] = 0.0F;
positions[1] = 1.0F;
factors[0] = 0.0F;
factors[1] = 1.0F;
}
public float [] Factors{
get {
return factors;
}
set{
count = value.GetUpperBound(0) + 1;
if((value[0] !=0) | (value[count-1] != 1.0F)){
throw new ArgumentException(" First value must be 0.0, last value must be 1.0","Factors");
}
factors = value;
}
}
public float [] Positions{
get {
return Positions;
}
set{
count = value.GetUpperBound(0) + 1;
if((value[0] !=0) | (value[count-1] != 1.0F)){
throw new ArgumentException(" First value must be 0.0, last value must be 1.0","Positon");
}
positions = value;
}
}
}
}
@@ -1,3 +1,15 @@
2003-3-5 DennisHayes <[email protected]>
* Added values for enums
* Stubbed and somewhat implmented Blend, ColorBlend, CustomLineCap
2003-3-2 DennisHayes <[email protected]>
* Created changelog
* updated copyrights to 2002/3
* changed namespace from System.Drawing, System.Drawing.Drawing2d to System.Drawing.Drawing2D
* cosmetic improvments
2002-10-13 DennisHayes <[email protected]>
* Changed namespace from *2d to *2D
* Changed comment header from system.Drawing to System.Drawing.Drawing2D
@@ -56,4 +68,4 @@
* Matrix.cs : MonoTODO everywhere.
* TODOAttribute.cs : Add here too.
* TODOAttribute.cs : Add here too.
@@ -4,22 +4,77 @@
// Author:
// Dennis Hayes ([email protected])
//
// (C) 2002 Ximian, Inc
// (C) 2002/3 Ximian, Inc
//
using System;
namespace System.Drawing.Drawing2D
{
/// <summary>
/// Summary description for ColorBlend.
/// </summary>
public class ColorBlend
{
public ColorBlend()
{
//
// TODO: Add constructor logic here
//
public sealed class ColorBlend {
private int count;
private float [] positions;
private Color [] colors;
public ColorBlend(int count) {
//FIXME:
if(count < 2){
throw new ArgumentOutOfRangeException("Count", count, "Must be at least 2");
}
if(count == 2){
//FIXME: call ColorBlend!
count = 2;
positions = new float [1];
colors = new Color [1];
positions[0] = 0.0F;
positions[1] = 1.0F;
colors[0] = Color.FromArgb(0,0,0);
colors[1] = Color.FromArgb(255,255,255);
}
this.count = count;
int i;
for(i = 0; i < count; i++){
positions[i] = (1.0F/count) * i;
//FIXME: Do real default color blend
//FIXME: I used 254 to prevent overflow, should use 255, if anyone cares?
colors[i] = Color.FromArgb((1/count) * i * 254,(1/count) * i * 254,(1/count) * i * 254);
}
//fix any rounding errors that would generate an invald list.
positions[0] = 0.0F;
positions[1] = 1.0F;
colors[0] = Color.FromArgb(0,0,0);
colors[1] = Color.FromArgb(255,255,255);
}
public ColorBlend() {
count = 2;
positions = new float [1];
colors = new Color [1];
positions[0] = 0.0F;
positions[1] = 1.0F;
colors[0] = Color.FromArgb(0,0,0);
colors[1] = Color.FromArgb(255,255,255);
}
public Color [] Colors{
get {
return colors;
}
set{
count = value.GetUpperBound(0) + 1;
colors = value;
}
}
public float [] Positions{
get {
return Positions;
}
set{
count = value.GetUpperBound(0) + 1;
positions = value;
}
}
}
}
@@ -5,7 +5,7 @@
// Stefan Maierhofer <[email protected]>
// Dennis Hayes ([email protected])
//
// (C) 2002 Ximian, Inc
// (C) 2002/3 Ximian, Inc
//
using System;
@@ -17,9 +17,9 @@ namespace System.Drawing.Drawing2D {
{
Complement = 5,
Exclude = 4,
Intersect =4,
Intersect = 1,
Replace = 0,
Union = 2,
Xor =3
Xor = 3
}
}
@@ -5,7 +5,7 @@
// Stefan Maierhofer <[email protected]>
// Dennis Hayes ([email protected])
//
// (C) 2002 Ximian, Inc
// (C) 2002/3 Ximian, Inc
//
using System;
@@ -13,9 +13,8 @@ namespace System.Drawing.Drawing2D {
/// <summary>
/// Summary description for CompostingMode.
/// </summary>
public enum CompositingMode {
SourceCopy,
SourceOver
}
public enum CompositingMode {
SourceCopy = 1,
SourceOver = 0
}
}
@@ -1,11 +1,11 @@
//
// System.Drawing.CompostingQuality.cs
// System.Drawing.Drawing2D.CompostingQuality.cs
//
// Author:
// Stefan Maierhofer <[email protected]>
// Dennis Hayes ([email protected])
//
// (C) 2002 Ximian, Inc
// (C) 2002/3 Ximian, Inc
//
using System;
@@ -14,11 +14,11 @@ namespace System.Drawing.Drawing2D {
/// Summary description for CompostingQuality.
/// </summary>
public enum CompositingQuality {
AssumeLinear,
Default,
GammaCorrected,
HighQuality,
HighSpeed,
Invalid
AssumeLinear = 4,
Default = 0,
GammaCorrected = 3,
HighQuality = 2,
HighSpeed = 1,
Invalid = -1
}
}
@@ -5,7 +5,7 @@
// Stefan Maierhofer <[email protected]>
// Dennis Hayes ([email protected])
//
// (C) 2002 Ximian, Inc
// (C) 2002/3 Ximian, Inc
//
using System;
@@ -14,8 +14,8 @@ namespace System.Drawing.Drawing2D {
/// Summary description for CoordinateSpace.
/// </summary>
public enum CoordinateSpace {
Device,
Page,
World
Device = 2,
Page = 1,
World = 0
}
}
@@ -4,22 +4,25 @@
// Author:
// Dennis Hayes ([email protected])
//
// (C) 2002 Ximian, Inc
// (C) 2002/3 Ximian, Inc
//
using System;
namespace System.Drawing.Drawing2D
{
namespace System.Drawing.Drawing2D {
/// <summary>
/// Summary description for CustomLineCap.
/// </summary>
public class CustomLineCap
{
public CustomLineCap()
{
//
// TODO: Add constructor logic here
//
public class CustomLineCap {// : MarshalByRefObject, ICloneable, IDisposable {
protected CustomLineCap() {
}
public CustomLineCap(GraphicsPath fillPAth, GraphicsPath strokePAth, LineCap baseCap, float baseInset) {
}
public CustomLineCap(GraphicsPath fillPAth, GraphicsPath strokePAth, LineCap baseCap) {
}
public CustomLineCap(GraphicsPath fillPAth, GraphicsPath strokePAth) {
}
}
}
@@ -5,7 +5,7 @@
// Stefan Maierhofer <[email protected]>
// Dennis Hayes ([email protected])
//
// (C) 2002 Ximian, Inc
// (C) 2002/3 Ximian, Inc
//
using System;
@@ -4,7 +4,7 @@
// Author:
// Dennis Hayes ([email protected])
//
// (C) 2002 Ximian, Inc
// (C) 2002/3 Ximian, Inc
//
using System;
@@ -14,11 +14,11 @@ namespace System.Drawing.Drawing2D
/// Summary description for DashStyle.
/// </summary>
public enum DashStyle {
Custom,
Dash,
DashDot,
DashDotDot,
Dot,
Solid
Custom = 5,
Dash = 1,
DashDot = 3,
DashDotDot = 4,
Dot = 2,
Solid = 0
}
}
@@ -5,7 +5,7 @@
// Stefan Maierhofer <[email protected]>
// Dennis Hayes ([email protected])
//
// (C) 2002 Ximian, Inc
// (C) 2002/3 Ximian, Inc
//
using System;
@@ -15,7 +15,7 @@ namespace System.Drawing.Drawing2D {
/// Summary description for FillMode.
/// </summary>
public enum FillMode {
Alternate,
Winding
Alternate = 0,
Winding = 1
}
}
@@ -5,7 +5,7 @@
// Stefan Maierhofer <[email protected]>
// Dennis Hayes ([email protected])
//
// (C) 2002 Ximian, Inc
// (C) 2002/3 Ximian, Inc
//
using System;
@@ -14,7 +14,7 @@ namespace System.Drawing.Drawing2D {
/// Summary description for FlushIntention.
/// </summary>
public enum FlushIntention {
Flush,
Sync
Flush = 0,
Sync = 1
}
}
@@ -4,7 +4,7 @@
// Author:
// Dennis Hayes ([email protected])
//
// (C) 2002 Ximian, Inc
// (C) 2002/3 Ximian, Inc
//
using System;
@@ -17,9 +17,6 @@ namespace System.Drawing.Drawing2D
{
public GraphicsContainer()
{
//
// TODO: Add constructor logic here
//
}
}
}
@@ -4,7 +4,7 @@
// Author:
// Dennis Hayes ([email protected])
//
// (C) 2002 Ximian, Inc
// (C) 2002/3 Ximian, Inc
//
using System;
namespace System.Drawing.Drawing2D
@@ -15,8 +15,8 @@ namespace System.Drawing.Drawing2D
public sealed class GraphicsPath //: MarshalByRefObject, ICloneable, IDisposable
{
//[MonoTODO]
public GraphicsPath() {
}
//public GraphicsPath() {
//}
//[MonoTODO]
//public GraphicsPath(FillMode fillMode) : this() {
//}
@@ -4,7 +4,7 @@
// Author:
// Dennis Hayes ([email protected])
//
// (C) 2002 Ximian, Inc
// (C) 2002/3 Ximian, Inc
//
using System;
@@ -17,9 +17,6 @@ namespace System.Drawing.Drawing2D
{
public GraphicsPathIterator()
{
//
// TODO: Add constructor logic here
//
}
}
}
@@ -4,7 +4,7 @@
// Author:
// Dennis Hayes ([email protected])
//
// (C) 2002 Ximian, Inc
// (C) 2002/3 Ximian, Inc
//
using System;
@@ -17,9 +17,6 @@ namespace System.Drawing.Drawing2D
{
public GraphicsState()
{
//
// TODO: Add constructor logic here
//
}
}
}
@@ -4,7 +4,7 @@
// Author:
// Dennis Hayes ([email protected])
//
// (C) 2002 Ximian, Inc
// (C) 2002/3 Ximian, Inc
//
using System;
@@ -17,9 +17,6 @@ namespace System.Drawing.Drawing2D
{
public HatchBrush()
{
//
// TODO: Add constructor logic here
//
}
}
}
@@ -5,7 +5,7 @@
// Stefan Maierhofer <[email protected]>
// Dennis Hayes ([email protected])
//
// (C) 2002 Ximian, Inc
// (C) 2002/3 Ximian, Inc
//
using System;
@@ -14,62 +14,62 @@ namespace System.Drawing.Drawing2D {
/// <summary>
/// Summary description for HatchStyle.
/// </summary>
public enum HatchStyle {
BackwardDiagonal,
Cross,
DarkDownwardDiagonal,
DarkHorizontal,
DarkUpwardDiagonal,
DarkVertical,
DashedDownwardDiagonal,
DashedHorizontal,
DashedUpwardDiagonal,
DashedVertical,
DiagonalBrick,
DiagonalCross,
Divot,
DottedDiamond,
DottedGrid,
ForwardDiagonal,
Horizontal,
HorizontalBrick,
LargeCheckerBoard,
LargeConfetti,
LargeGrid,
LightDownwardDiagonal,
LightHorizontal,
LightUpwardDiagonal,
LightVertical,
Max,
Min,
NarrowHorizontal,
NarrowVertical,
OutlinedDiamond,
Percent05,
Percent10,
Percent20,
Percent25,
Percent30,
Percent40,
Percent50,
Percent60,
Percent70,
Percent75,
Percent80,
Percent90,
Plaid,
Shingle,
SmallCheckerBoard,
SmallConfetti,
SmallGrid,
SolidDiamond,
Sphere,
Trellis,
Vertical,
Wave,
Weave,
WideDownwardDiagonal,
WideUpwardDiagonal,
ZigZag
}
public enum HatchStyle {
BackwardDiagonal = 3,
Cross = 4,
DarkDownwardDiagonal = 20,
DarkHorizontal = 29,
DarkUpwardDiagonal = 21,
DarkVertical = 28,
DashedDownwardDiagonal = 30,
DashedHorizontal = 32,
DashedUpwardDiagonal = 31,
DashedVertical = 33,
DiagonalBrick = 38,
DiagonalCross = 5,
Divot = 42,
DottedDiamond = 44,
DottedGrid = 43,
ForwardDiagonal = 2,
Horizontal = 0,
HorizontalBrick = 39,
LargeCheckerBoard = 50,
LargeConfetti = 35,
LargeGrid = 4,
LightDownwardDiagonal = 18,
LightHorizontal = 25,
LightUpwardDiagonal = 19,
LightVertical = 24,
Max = 4,
Min = 0,
NarrowHorizontal = 27,
NarrowVertical = 26,
OutlinedDiamond = 51,
Percent05 = 6,
Percent10 = 7,
Percent20 = 8,
Percent25 = 9,
Percent30 = 10,
Percent40 = 11,
Percent50 = 12,
Percent60 = 13,
Percent70 = 14,
Percent75 = 15,
Percent80 = 16,
Percent90 = 17,
Plaid = 41,
Shingle = 45,
SmallCheckerBoard = 49,
SmallConfetti = 34,
SmallGrid = 48,
SolidDiamond = 52,
Sphere = 47,
Trellis = 46,
Vertical = 1,
Wave = 37,
Weave = 40,
WideDownwardDiagonal = 22,
WideUpwardDiagonal = 21,
ZigZag = 36
}
}
@@ -5,7 +5,7 @@
// Stefan Maierhofer <[email protected]>
// Dennis Hayes ([email protected])
//
// (C) 2002 Ximian, Inc
// (C) 2002/3 Ximian, Inc
//
using System;
@@ -14,14 +14,14 @@ namespace System.Drawing.Drawing2D {
/// Summary description for InterpolationMode.
/// </summary>
public enum InterpolationMode {
Bicubic,
Bilinear,
Default,
High,
HighQualityBicubic,
HighQualityBilinear,
Invalid,
Low,
NearestNeighbour
Bicubic = 4,
Bilinear = 3,
Default = 0,
High = 2,
HighQualityBicubic = 7,
HighQualityBilinear = 6,
Invalid = -1,
Low = 1,
NearestNeighbour = 5
}
}
@@ -5,7 +5,7 @@
// Stefan Maierhofer <[email protected]>
// Dennis Hayes ([email protected])
//
// (C) 2002 Ximian, Inc
// (C) 2002/3 Ximian, Inc
//
using System;
@@ -14,16 +14,16 @@ namespace System.Drawing.Drawing2D {
/// Summary description for LineCap.
/// </summary>
public enum LineCap {
AnchorMask,
ArrowAnchor,
Custom,
DiamondAnchor,
Flat,
NoAnchor,
Round,
RoundAnchor,
Square,
SquareAnchor,
Triangle
AnchorMask = 240,
ArrowAnchor = 20,
Custom = 255,
DiamondAnchor = 19,
Flat = 0,
NoAnchor = 16,
Round = 2,
RoundAnchor = 18,
Square = 1,
SquareAnchor = 17,
Triangle = 3
}
}
@@ -5,7 +5,7 @@
// Stefan Maierhofer <[email protected]>
// Dennis Hayes ([email protected])
//
// (C) 2002 Ximian, Inc
// (C) 2002/3 Ximian, Inc
//
using System;
@@ -14,9 +14,9 @@ namespace System.Drawing.Drawing2D {
/// Summary description for LineJoin.
/// </summary>
public enum LineJoin {
Bevel,
Miter,
MiterClipped,
Round
Bevel = 1,
Miter = 0,
MiterClipped = 3,
Round = 2
}
}
@@ -4,11 +4,11 @@
// Author:
// Dennis Hayes ([email protected])
//
// (C) 2002 Ximian, Inc
// (C) 2002/3 Ximian, Inc
//
using System;
namespace System.Drawing.Drawing2D
namespace System.Drawing2D
{
/// <summary>
/// Summary description for LinearGradientBrush.
@@ -17,9 +17,6 @@ namespace System.Drawing.Drawing2D
{
public LinearGradientBrush()
{
//
// TODO: Add constructor logic here
//
}
}
}
@@ -5,7 +5,7 @@
// Stefan Maierhofer <[email protected]>
// Dennis Hayes ([email protected])
//
// (C) 2002 Ximian, Inc
// (C) 2002/3 Ximian, Inc
//
using System;
@@ -14,9 +14,9 @@ namespace System.Drawing.Drawing2D {
/// Summary description for LinearGradientMode.
/// </summary>
public enum LinearGradientMode {
BackwardDiagonal,
ForwardDiagonal,
Horizontal,
Vertical
BackwardDiagonal = 3,
ForwardDiagonal = 2,
Horizontal = 0,
Vertical = 1
}
}
@@ -5,7 +5,7 @@
// Stefan Maierhofer <[email protected]>
// Dennis Hayes ([email protected])
//
// (C) 2002 Ximian, Inc
// (C) 2002/3 Ximian, Inc
//
using System;
@@ -14,7 +14,7 @@ namespace System.Drawing.Drawing2D {
/// Summary description for MatrixOrder.
/// </summary>
public enum MatrixOrder {
Append,
Prepend
Append = 1,
Prepend = 0
}
}
@@ -4,7 +4,7 @@
// Author:
// Dennis Hayes ([email protected])
//
// (C) 2002 Ximian, Inc
// (C) 2002/3 Ximian, Inc
//
using System;
@@ -17,9 +17,6 @@ namespace System.Drawing.Drawing2D
{
public PathData()
{
//
// TODO: Add constructor logic here
//
}
}
}
@@ -4,7 +4,7 @@
// Author:
// Dennis Hayes ([email protected])
//
// (C) 2002 Ximian, Inc
// (C) 2002/3 Ximian, Inc
//
using System;
@@ -17,9 +17,6 @@ namespace System.Drawing.Drawing2D
{
public PathGradientBrush()
{
//
// TODO: Add constructor logic here
//
}
}
}
@@ -5,7 +5,7 @@
// Stefan Maierhofer <[email protected]>
// Dennis Hayes ([email protected])
//
// (C) 2002 Ximian, Inc
// (C) 2002/3 Ximian, Inc
//
using System;
@@ -14,13 +14,13 @@ namespace System.Drawing.Drawing2D {
/// Summary description for PathPointType.
/// </summary>
public enum PathPointType {
Bezier,
Bezier3,
CloseSubpath,
DashMode,
Line,
PathMarker,
PathTypeMask,
Start
Bezier = 3,
Bezier3 = 3,
CloseSubpath = 128,
DashMode = 16,
Line = 1,
PathMarker = 32,
PathTypeMask = 7,
Start = 0
}
}
@@ -1,21 +1,21 @@
//
// System.Drawing.Drawing2D.PenAlignment.cs
//
// Author:
// Miguel de Icaza ([email protected])
// Dennis Hayes ([email protected])
// (C) Ximian, Inc. http://www.ximian.com
//
using System;
namespace System.Drawing.Drawing2D {
public enum PenAlignment {
Center = 0,
Inset = 1,
Outset = 2,
Left = 3,
Right =4
}
}
//
// System.Drawing.Drawing2D.PenAlignment.cs
//
// Author:
// Miguel de Icaza ([email protected])
// Dennis Hayes ([email protected])
// (C) 2002/3 Ximian, Inc http://www.ximian.com
//
using System;
namespace System.Drawing.Drawing2D {
public enum PenAlignment {
Center = 0,
Inset = 1,
Outset = 2,
Left = 3,
Right =4
}
}
@@ -4,9 +4,8 @@
// Author:
// Dennis Hayes ([email protected])
//
// (C) 2002 Ximian, Inc
//
using System;
// (C) 2002/3 Ximian, Inc
//using System;
namespace System.Drawing.Drawing2D
{
@@ -14,10 +13,10 @@ namespace System.Drawing.Drawing2D
/// Summary description for PenType.
/// </summary>
public enum PenType {
HatchFill,
LinearGradient,
PathGradient,
SolidColor,
TextureFill
HatchFill = 1,
LinearGradient = 4,
PathGradient = 3,
SolidColor = 0,
TextureFill = 2
}
}
@@ -5,7 +5,7 @@
// Stefan Maierhofer <[email protected]>
// Dennis Hayes ([email protected])
//
// (C) 2002 Ximian, Inc
// (C) 2002/3 Ximian, Inc
//
using System;
@@ -14,12 +14,12 @@ namespace System.Drawing.Drawing2D {
/// Summary description for PixelOffsetMode.
/// </summary>
public enum PixelOffsetMode {
Default,
Half,
HighQuality,
HighSpeed,
Invalid,
None
Default = 0,
Half = 4,
HighQuality = 2,
HighSpeed = 1,
Invalid = -1,
None = 3
}
}
@@ -5,7 +5,7 @@
// Stefan Maierhofer <[email protected]>
// Dennis Hayes ([email protected])
//
// (C) 2002 Ximian, Inc
// (C) 2002/3 Ximian, Inc
//
using System;
@@ -14,9 +14,9 @@ namespace System.Drawing.Drawing2D {
/// Summary description for QualityMode.
/// </summary>
public enum QualityMode {
Default,
Hight,
Invalid,
Low
Default = 0,
Hight = 2,
Invalid = -1,
Low = 1
}
}
@@ -4,7 +4,7 @@
// Author:
// Dennis Hayes ([email protected])
//
// (C) 2002 Ximian, Inc
// (C) 2002/3 Ximian, Inc
//
using System;
@@ -17,9 +17,6 @@ namespace System.Drawing.Drawing2D
{
public RegionData()
{
//
// TODO: Add constructor logic here
//
}
}
}
@@ -5,7 +5,7 @@
// Stefan Maierhofer <[email protected]>
// Dennis Hayes ([email protected])
//
// (C) 2002 Ximian, Inc
// (C) 2002/3 Ximian, Inc
//
using System;
@@ -14,11 +14,11 @@ namespace System.Drawing.Drawing2D {
/// Summary description for SmoothingMode.
/// </summary>
public enum SmoothingMode {
AntiAlias,
Default,
HighQuality,
HighSpeed,
Invalid,
None
AntiAlias = 4,
Default = 0,
HighQuality = 2,
HighSpeed = 1,
Invalid = -1,
None = 3
}
}
@@ -1,5 +1,5 @@
//
// System.Drawing.Drawing2D.WarpMode.cs
// System.Drawing.WarpMode.cs
//
// Author:
// Stefan Maierhofer <[email protected]>
@@ -14,7 +14,7 @@ namespace System.Drawing.Drawing2D {
/// Summary description for WarpMode.
/// </summary>
public enum WarpMode {
Bilinear,
Perspective
Bilinear = 1,
Perspective = 0
}
}
@@ -5,7 +5,7 @@
// Stefan Maierhofer <[email protected]>
// Dennis Hayes ([email protected])
//
// (C) 2002 Ximian, Inc
// (C) 2002/3 Ximian, Inc
//
using System;
@@ -1,3 +1,8 @@
2003-03-01 Alexandre Pigolkine <[email protected]>
* SystemBrushes.cs
added stubs to compile SWF
2003-02-21 Alexandre Pigolkine <[email protected]>
* Font.cs
* Graphics.cs
@@ -34,5 +34,22 @@ namespace System.Drawing
}
}
public static Brush Highlight {
get {
return new SolidBrush(Color.Blue);
}
}
public static Brush HighlightText {
get {
return new SolidBrush(Color.White);
}
}
public static Brush Window {
get {
return new SolidBrush(Color.White);
}
}
}
}
Whitespace-only changes.
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- NAnt build file for System.Management.dll -->
<project name="System" default="build">
<property name="debug" value="false"/>
<target name="build">
<mkdir dir="../lib"/>
<csc target="library" output="../lib/System.Management.dll" debug="${debug}">
<arg value="/unsafe"/>
<arg value="/noconfig"/>
<arg value="/debug"/>
<arg value="/r:System.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/System.Management.dll" failonerror="false"/>
<delete file="../lib/System.Management.pdb" failonerror="false"/>
</target>
</project>
Whitespace-only changes.
@@ -0,0 +1,71 @@
//
// System.Management.ManagementNamedValueCollection
//
// Authors:
// Gonzalo Paniagua Javier ([email protected])
//
// (C) 2003 Ximian, Inc (http://www.ximian.com)
//
using System;
using System.Collections.Specialized;
using System.Runtime.Serialization;
namespace System.Management
{
public class ManagementNamedValueCollection : NameObjectCollectionBase
{
public ManagementNamedValueCollection ()
{
}
public ManagementNamedValueCollection (SerializationInfo info, StreamingContext context)
: base (info, context)
{
}
public void Add (string name, object value)
{
if (BaseGet (name) != null)
BaseRemove (name);
BaseAdd (name, value);
}
public ManagementNamedValueCollection Clone ()
{
ManagementNamedValueCollection result = new ManagementNamedValueCollection ();
foreach (string key in Keys) {
object value = BaseGet (key);
if (value == null) {
result.Add (key, value);
continue;
}
if (value is ICloneable) {
result.Add (key, ((ICloneable) value).Clone ());
} else {
result.Add (key, value);
}
}
return result;
}
public void Remove (string name)
{
BaseRemove (name);
}
public void RemoveAll ()
{
BaseClear ();
}
public object this [string name]
{
get { return BaseGet (name); }
}
}
}
+1
View File
@@ -0,0 +1 @@
./System.Management/ManagementNamedValueCollection.cs
+13
View File
@@ -0,0 +1,13 @@
topdir = ../..
LIBRARY = $(topdir)/class/lib/System.Management.dll
LIB_LIST = list
LIB_FLAGS = -r corlib -r System
SOURCES_INCLUDE=*.cs
SOURCES_EXCLUDE=./Test*
export MONO_PATH = $(topdir)/class/lib:
include $(topdir)/class/library.make
+15
View File
@@ -1,3 +1,18 @@
2003-03-04 Sebastien Pouliot <[email protected]>
* System.Security.build: Added a new output System.Security_cmp.dll
which links with mscorlib. This version is to be used to generate
the class status web page (required for CorCompare).
2003-03-03 Sebastien Pouliot <[email protected]>
* System.Security.build: Updated build file to stop linking with
MS assemblies (and like with Mono's corlib instead).
2003-03-02 Sebastien Pouliot <[email protected]>
* list.unix: Added XmlSignature.cs.
2003-01-17 Sebastien Pouliot <[email protected]>
* System.Security.build: Simplified and fixed some issues.
@@ -1,3 +1,32 @@
2003-03-03 Sebastien Pouliot <[email protected]>
* DSAKeyValue.cs: Added patch from Atsushi Eno (to remove string
XML generation).
* RSAKeyValue.cs: Added patch from Atsushi Eno (to remove string
XML generation).
* XmlDsigBase64Transform.cs: Fixed problem when using XPath.
2003-03-02 Sebastien Pouliot <[email protected]>
* DSAKeyValue.cs: New XML generation is commented. Old string technique
did a better job to match MS implementation.
* DataObject.cs: Replaced XML generation from StringBuilder to XmlElement.
* KeyInfo.cs: Replaced XML generation from StringBuilder to XmlElement.
* KeyInfoName.cs: Replaced XML generation from StringBuilder to XmlElement.
* KeyInfoNode.cs: Replaced XML generation from StringBuilder to XmlElement.
* KeyInfoRetrievalMethod.cs: Replaced XML generation from StringBuilder to XmlElement.
* KeyInfoX509Data.cs: Replaced XML generation from StringBuilder to XmlElement.
* RSAKeyValue.cs: New XML generation is commented. Old string technique
did a better job to match MS implementation.
* Reference.cs: Replaced XML generation from StringBuilder to XmlElement.
* Signature.cs: Replaced XML generation from StringBuilder to XmlElement.
* SignedInfo.cs: Replaced XML generation from StringBuilder to XmlElement.
* SignedXml.cs: Replaced XML generation from StringBuilder to XmlElement.
* Transform.cs: Replaced XML generation from StringBuilder to XmlElement.
* XmlDsigEnvelopedSignatureTransform.cs: Added missing Algorithm URL.
* XmlDsigXPathTransform.cs: Added missing Algorithm URL.
* XmlSignature.cs: New. Private contants (construct similar to WSE).
2003-02-19 Sebastien Pouliot <[email protected]>
* All: Corrected class indentation, minor fixes, added many MonoTODO (so class status
Loaded 100 of 309 files, more files were not shown because too many files have changed in this diff. Show more