Compare commits

..
4 Commits
Author SHA1 Message Date
nobody cfaea8bc95 This commit was manufactured by cvs2svn to create tag 'MCS_0_21'.
svn path=/tags/MCS_0_21/mcs/; revision=12047
2003-02-27 22:22:37 +00:00
nobody 4e4824afab This commit was manufactured by cvs2svn to create branch 'SAVANNAH_CVS'.
svn path=/branches/SAVANNAH_CVS/mcs/; revision=6844
2002-08-21 10:08:33 +00:00
Martin Baulig 7f0542b133 Importing NUnit 1.11.
svn path=/branches/NUNIT/mcs/; revision=2713
2002-02-27 09:38:21 +00:00
nobody 9f187b5dd0 This commit was manufactured by cvs2svn to create branch 'NUNIT'.
svn path=/branches/NUNIT/mcs/; revision=2712
2002-02-27 09:38:18 +00:00
305 changed files with 4259 additions and 37572 deletions

No files matched your search

-4
View File
@@ -1,7 +1,3 @@
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
+51
View File
@@ -0,0 +1,51 @@
/* config.h.in. Generated automatically from configure.in by autoheader 2.13. */
/* Define if you have the ANSI C header files. */
#undef STDC_HEADERS
#undef HAVE_INET_PTON
#undef HAVE_INET_ATON
#undef HAVE_SOL_IP
#undef HAVE_SOL_TCP
#undef HAVE_IP_PKTINFO
#undef HAVE_STRUCT_IP_MREQN
#undef HAVE_PTHREAD
#undef HAVE_PTHREAD_MUTEX_TIMEDLOCK
#undef USE_MONO_MUTEX
#undef HAVE_LARGE_FILE_SUPPORT
#undef PLATFORM_WIN32
#undef HAVE_NEW_ICONV
#undef NAME_DEV_RANDOM
#undef HAVE_CRYPT_RNG
#undef HAVE_BOEHM_GC
/* The number of bytes in a void *. */
#undef SIZEOF_VOID_P
/* Define if you have the inet_aton function. */
#undef HAVE_INET_ATON
/* Define if you have the inet_pton function. */
#undef HAVE_INET_PTON
/* Define if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define if you have the <netdb.h> header file. */
#undef HAVE_NETDB_H
/* Define if you have the <sys/filio.h> header file. */
#undef HAVE_SYS_FILIO_H
/* Define if you have the <sys/sockio.h> header file. */
#undef HAVE_SYS_SOCKIO_H
/* Define if you have the <utime.h> header file. */
#undef HAVE_UTIME_H
/* Name of package */
#undef PACKAGE
/* Version number of package */
#undef VERSION
-3
View File
@@ -19,8 +19,6 @@
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>
@@ -51,7 +49,6 @@
culture="en-US"
uiculture="en-US" />
-->
<sessionState mode="InProc" />
</system.web>
<appSettings>
+45 -69
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 specific alternative is available
using the Mono.Security.Win32 assembly.
under Windows). A Windows alternative is in the work (see
Mono.Security.Win32 assembly section).
* 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 MS BCL to provide compatibility with existing Windows
in the 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,9 +54,6 @@
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>
@@ -65,17 +62,17 @@
**** Status
<ul>
* X.509 certificates are parsed using 100% managed code
(using the Mono.Security.ASN1 class).
(using an internal ASN.1 class).
* Software Publisher Certificates (SPC) used by Authenticode
(tm) to sign assemblies are supported (extraction from PE
files) but <b>not</b> validated.
* Unit tests are generated from a set of existing certificates
* 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 standard test suite for
size and time consideration).
complete test (but isn't part of the test suite for size
and time consideration).
</ul>
**** TODO
@@ -92,20 +89,18 @@
**** Notes
<ul>
* 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.
* <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.
<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 code). From the exceptions
done by using CryptoAPI (unmanaged). From the exceptions
thrown Authenticode(tm) support is done via COM.
</ul>
@@ -120,10 +115,13 @@
**** Status
<ul>
* All classes are present but some (most Transforms) are only
* All classes are present but some (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
@@ -134,30 +132,8 @@
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>
<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).
* Makefile for building under non-Windows operating systems.
</ul>
<hr>
@@ -176,9 +152,7 @@
**** Status
<ul>
* 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>).
* A RNGCryptoServiceProvider built on top of CryptoAPI.
* Wrapper classes for unmanaged versions of hash algorithms:
MD2, MD4, MD5 and SHA1 are supported. <b>note</b>: some
@@ -205,34 +179,30 @@
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 X.509
certificates classes.
extending <code>System.Security.Cryptography.Xml</code>) and X509
certificates.
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.
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>.
<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 <b>[*]</b>.
* Nothing (yet) commited in CVS.
</ul>
*** Namespace: Microsoft.Web.Services.Security.X509
**** Status
<ul>
* 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.
* Nothing (yet) commited in CVS.
</ul>
**** TODO
@@ -243,7 +213,21 @@
</ul>
<hr>
** Tools
** Other stuff
There are other, not so visible, uses of cryptography both inside and
outside the class library - such as:
<ul>
* SSL/TLS for secure communication (investigation under way).
* Assembly signing (and verification) using StrongNames.
* Assembly signing (and verification) using Authenticode(tm).
</ul>
*** Tools
There are many tools in the .NET framework that indirectly interacts
with some cryptographic classes. Mono will eventually need these tools.
@@ -283,14 +267,6 @@
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
@@ -298,9 +274,9 @@
Add missing unit tests to classes or methods.
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).
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).
Optimization can also be done on algorithms as crypto is never fast
enough. Just be sure to test every optimization (using the unit test)
@@ -311,4 +287,4 @@
informations about the status of the cryptographic classes.
<hr>
Last reviewed: March 4, 2003 (post mono 0.21)
Last reviewed: February 5, 2003 (post mono 0.19)
+37 -105
View File
@@ -13,13 +13,17 @@
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.21</b><br>
<a href="archive/mono-0.21">Release notes</a><br>
Jan 21th, 2003
<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">
@@ -29,10 +33,11 @@
</td>
<td>
<ul>
<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/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>
<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>
@@ -44,7 +49,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.21-1.src.rpm">mono-0.21-1.src.rpm</a>
<li><a href="archive/mono-0.20-1.src.rpm">mono-0.20-1.src.rpm</a>
</ul>
</td>
</tr>
@@ -57,8 +62,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.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>
<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>
</ul>
</td>
<td bgcolor="#999999">
@@ -66,8 +71,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.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>
<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>
</ul>
</td>
</tr>
@@ -77,8 +82,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.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>
<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>
</ul>
</td>
<td bgcolor="#999999">
@@ -86,8 +91,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.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>
<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>
</ul>
</td>
</tr>
@@ -97,24 +102,31 @@
<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.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>
<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>
</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>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.21-win32-1.exe">Mono-Setup</a>
<li><a href="archive/mono-0.20-stable-win32-2.exe">Mono-Setup</a>
</ul>
</td>
<td bgcolor="#999999">
<b>Debian packages</b>
<ul>
<li><a href="http://www.atoker.com/mono/">Alp's web site</a>
</ul>
</td>
</tr>
@@ -141,86 +153,6 @@
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">
+11 -29
View File
@@ -721,44 +721,26 @@ A: Replace the __stdcall attribute with the STDCALL macro, and include this
<a name="asp">
** Mono and ASP.NET
Q: Does Mono support ASP.NET?
Q: Is Mono supporting ASP.NET?
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.
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.
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: 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: Yes, we have plans to do so, but we need to wait for Patrik's patches to
HttpRuntime. Once that is there, writing a mod_mono should be trivial
(look at mono/samples/embed for a sample embedded application).
<a name="ado">
** Mono and ADO.NET
-8
View File
@@ -13,14 +13,6 @@ 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,31 +102,6 @@
</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
+7 -43
View File
@@ -6,16 +6,7 @@
There are a number of mailing lists for Mono in English:
<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>
<table>
<tr>
<td>
<b><a
@@ -28,39 +19,11 @@
<tr>
<td>
<b><a
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>
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>
@@ -77,7 +40,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). <p>
Track the CVS activity of Mono on this mailing list (patches are sent to recipients).
You can get <a href="http://www.go-mono.com/snapshots">daily snapshots</a> as well.
</td>
</tr>
@@ -126,6 +89,7 @@
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 = (string) reader["firstname"];
string LastName = (string) reader["lastname"];
string FirstName = reader["firstname"];
string LastName = reader["lastname"];
Console.WriteLine("Name: " +
FirstName + " " + LastName);
}
+246
View File
@@ -0,0 +1,246 @@
System.Object
System.Exception
System.ValueType
System.Delegate
System.MulticastDelegate
System.Enum
System.Activator
System.ArgIterator
System.__ComObject
System.TypedReference
System.Security.AllowPartiallyTrustedCallersAttribute
System.Runtime.Serialization.Formatter
System.Runtime.Serialization.FormatterConverter
System.Runtime.Serialization.FormatterServices
System.Runtime.Serialization.ObjectIDGenerator
System.Runtime.Serialization.ObjectManager
System.Reflection.ModuleResolveEventHandler
System.Reflection.Pointer
System.Globalization.CompareInfo
System.Globalization.HebrewCalendar
System.Globalization.HijriCalendar
System.Globalization.JapaneseCalendar
System.Globalization.KoreanCalendar
System.Globalization.SortKey
System.Globalization.StringInfo
System.Globalization.TaiwanCalendar
System.Globalization.TextElementEnumerator
System.Globalization.TextInfo
System.Globalization.ThaiBuddhistCalendar
System.IO.IsolatedStorage.IsolatedStorageFile
System.Reflection.Emit.MethodRental
System.Runtime.CompilerServices.AccessedThroughPropertyAttribute
System.Runtime.CompilerServices.CallConvCdecl
System.Runtime.CompilerServices.CallConvStdcall
System.Runtime.CompilerServices.CallConvThiscall
System.Runtime.CompilerServices.CallConvFastcall
System.Runtime.CompilerServices.CustomConstantAttribute
System.Runtime.CompilerServices.DateTimeConstantAttribute
System.Runtime.CompilerServices.DiscardableAttribute
System.Runtime.CompilerServices.DecimalConstantAttribute
System.Runtime.CompilerServices.CompilationRelaxationsAttribute
System.Runtime.CompilerServices.CompilerGlobalScopeAttribute
System.Runtime.CompilerServices.IDispatchConstantAttribute
System.Runtime.CompilerServices.IsVolatile
System.Runtime.CompilerServices.IUnknownConstantAttribute
System.Runtime.CompilerServices.RequiredAttributeAttribute
System.Runtime.InteropServices.ArrayWithOffset
System.Runtime.InteropServices.DispIdAttribute
System.Runtime.InteropServices.ClassInterfaceType
System.Runtime.InteropServices.ClassInterfaceAttribute
System.Runtime.InteropServices.ComVisibleAttribute
System.Runtime.InteropServices.LCIDConversionAttribute
System.Runtime.InteropServices.ComRegisterFunctionAttribute
System.Runtime.InteropServices.ComUnregisterFunctionAttribute
System.Runtime.InteropServices.ProgIdAttribute
System.Runtime.InteropServices.ImportedFromTypeLibAttribute
System.Runtime.InteropServices.IDispatchImplType
System.Runtime.InteropServices.IDispatchImplAttribute
System.Runtime.InteropServices.ComSourceInterfacesAttribute
System.Runtime.InteropServices.ComConversionLossAttribute
System.Runtime.InteropServices.TypeLibTypeFlags
System.Runtime.InteropServices.TypeLibFuncFlags
System.Runtime.InteropServices.TypeLibVarFlags
System.Runtime.InteropServices.TypeLibTypeAttribute
System.Runtime.InteropServices.TypeLibFuncAttribute
System.Runtime.InteropServices.TypeLibVarAttribute
System.Runtime.InteropServices.ComImportAttribute
System.Runtime.InteropServices.PreserveSigAttribute
System.Runtime.InteropServices.ComAliasNameAttribute
System.Runtime.InteropServices.AutomationProxyAttribute
System.Runtime.InteropServices.PrimaryInteropAssemblyAttribute
System.Runtime.InteropServices.CoClassAttribute
System.Runtime.InteropServices.ComEventInterfaceAttribute
System.Runtime.InteropServices.COMException
System.Runtime.InteropServices.ComMemberType
System.Runtime.InteropServices.CurrencyWrapper
System.Runtime.InteropServices.DispatchWrapper
System.Runtime.InteropServices.ErrorWrapper
System.Runtime.InteropServices.ExtensibleClassFactory
System.Runtime.InteropServices.HandleRef
System.Runtime.InteropServices.InvalidComObjectException
System.Runtime.InteropServices.InvalidOleVariantTypeException
System.Runtime.InteropServices.TypeLibImporterFlags
System.Runtime.InteropServices.ExporterEventKind
System.Runtime.InteropServices.ITypeLibExporterNotifySink
System.Runtime.InteropServices.ITypeLibConverter
System.Runtime.InteropServices.MarshalDirectiveException
System.Runtime.InteropServices.ObjectCreationDelegate
System.Runtime.InteropServices.RuntimeEnvironment
System.Runtime.InteropServices.RegistrationServices
System.Runtime.InteropServices.SafeArrayRankMismatchException
System.Runtime.InteropServices.SafeArrayTypeMismatchException
System.Runtime.InteropServices.SEHException
System.Runtime.InteropServices.TypeLibConverter
System.Runtime.InteropServices.BIND_OPTS
System.Runtime.InteropServices.UCOMIBindCtx
System.Runtime.InteropServices.UCOMIConnectionPointContainer
System.Runtime.InteropServices.UCOMIConnectionPoint
System.Runtime.InteropServices.UCOMIEnumMoniker
System.Runtime.InteropServices.CONNECTDATA
System.Runtime.InteropServices.UCOMIEnumConnections
System.Runtime.InteropServices.UCOMIEnumConnectionPoints
System.Runtime.InteropServices.UCOMIEnumString
System.Runtime.InteropServices.UCOMIEnumVARIANT
System.Runtime.InteropServices.FILETIME
System.Runtime.InteropServices.UCOMIMoniker
System.Runtime.InteropServices.UCOMIPersistFile
System.Runtime.InteropServices.UCOMIRunningObjectTable
System.Runtime.InteropServices.STATSTG
System.Runtime.InteropServices.UCOMIStream
System.Runtime.InteropServices.DESCKIND
System.Runtime.InteropServices.BINDPTR
System.Runtime.InteropServices.UCOMITypeComp
System.Runtime.InteropServices.TYPEKIND
System.Runtime.InteropServices.TYPEFLAGS
System.Runtime.InteropServices.IMPLTYPEFLAGS
System.Runtime.InteropServices.TYPEATTR
System.Runtime.InteropServices.FUNCDESC
System.Runtime.InteropServices.IDLFLAG
System.Runtime.InteropServices.IDLDESC
System.Runtime.InteropServices.PARAMFLAG
System.Runtime.InteropServices.PARAMDESC
System.Runtime.InteropServices.TYPEDESC
System.Runtime.InteropServices.ELEMDESC
System.Runtime.InteropServices.VARDESC
System.Runtime.InteropServices.DISPPARAMS
System.Runtime.InteropServices.EXCEPINFO
System.Runtime.InteropServices.FUNCKIND
System.Runtime.InteropServices.INVOKEKIND
System.Runtime.InteropServices.CALLCONV
System.Runtime.InteropServices.FUNCFLAGS
System.Runtime.InteropServices.VARFLAGS
System.Runtime.InteropServices.UCOMITypeInfo
System.Runtime.InteropServices.SYSKIND
System.Runtime.InteropServices.LIBFLAGS
System.Runtime.InteropServices.TYPELIBATTR
System.Runtime.InteropServices.UCOMITypeLib
System.Runtime.InteropServices.UnknownWrapper
System.Runtime.Remoting.IObjectHandle
System.Runtime.Remoting.IRemotingTypeInfo
System.Runtime.Remoting.IChannelInfo
System.Runtime.Remoting.IEnvoyInfo
System.Runtime.Remoting.RemotingConfiguration
System.Runtime.Remoting.TypeEntry
System.Runtime.Remoting.ActivatedClientTypeEntry
System.Runtime.Remoting.ActivatedServiceTypeEntry
System.Runtime.Remoting.WellKnownClientTypeEntry
System.Runtime.Remoting.WellKnownServiceTypeEntry
System.Runtime.Remoting.RemotingException
System.Runtime.Remoting.ServerException
System.Runtime.Remoting.RemotingTimeoutException
System.Runtime.Remoting.RemotingServices
System.Runtime.Remoting.InternalRemotingServices
System.Runtime.Remoting.SoapServices
System.Runtime.Remoting.Activation.UrlAttribute
System.Runtime.Remoting.Messaging.IMessageSink
System.Runtime.Remoting.Messaging.AsyncResult
System.Runtime.Remoting.Messaging.CallContext
System.Runtime.Remoting.Messaging.ILogicalThreadAffinative
System.Runtime.Remoting.Messaging.InternalMessageWrapper
System.Runtime.Remoting.Messaging.IMethodCallMessage
System.Runtime.Remoting.Messaging.MethodCallMessageWrapper
System.Runtime.Remoting.Messaging.HeaderHandler
System.Runtime.Remoting.Messaging.IMessageCtrl
System.Runtime.Remoting.Messaging.IRemotingFormatter
System.Runtime.Remoting.Messaging.ReturnMessage
System.Runtime.Remoting.Messaging.MethodCall
System.Runtime.Remoting.Messaging.ConstructionCall
System.Runtime.Remoting.Messaging.MethodResponse
System.Runtime.Remoting.Messaging.ConstructionResponse
System.Runtime.Remoting.Messaging.MethodReturnMessageWrapper
System.Runtime.Remoting.Messaging.OneWayAttribute
System.Runtime.Remoting.Messaging.MessageSurrogateFilter
System.Runtime.Remoting.Messaging.RemotingSurrogateSelector
System.Runtime.Remoting.Contexts.CrossContextDelegate
System.Runtime.Remoting.Contexts.ContextProperty
System.Runtime.Remoting.Contexts.IContextPropertyActivator
System.Runtime.Remoting.Contexts.IContributeClientContextSink
System.Runtime.Remoting.Contexts.IContributeDynamicSink
System.Runtime.Remoting.Contexts.IContributeEnvoySink
System.Runtime.Remoting.Contexts.IContributeObjectSink
System.Runtime.Remoting.Contexts.IContributeServerContextSink
System.Runtime.Serialization.Formatters.InternalRM
System.Runtime.Serialization.Formatters.InternalST
System.Runtime.Serialization.Formatters.SoapMessage
System.Runtime.Serialization.Formatters.SoapFault
System.Runtime.Serialization.Formatters.ServerFault
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
System.Security.Cryptography.CryptoConfig
System.Security.Cryptography.KeyedHashAlgorithm
System.Security.Cryptography.HMACSHA1
System.Security.Cryptography.MACTripleDES
System.Security.Cryptography.MaskGenerationMethod
System.Security.Cryptography.PasswordDeriveBytes
System.Security.Cryptography.PKCS1MaskGenerationMethod
System.Security.Cryptography.RC2
System.Security.Cryptography.RC2CryptoServiceProvider
System.Security.Cryptography.RSACryptoServiceProvider
System.Security.Cryptography.RSAOAEPKeyExchangeDeformatter
System.Security.Cryptography.RSAOAEPKeyExchangeFormatter
System.Security.Cryptography.RSAPKCS1KeyExchangeDeformatter
System.Security.Cryptography.RSAPKCS1KeyExchangeFormatter
System.Security.Cryptography.RSAPKCS1SignatureDeformatter
System.Security.Cryptography.RSAPKCS1SignatureFormatter
System.Security.Cryptography.SHA1Managed
System.Security.Cryptography.TripleDES
System.Security.Cryptography.TripleDESCryptoServiceProvider
System.Security.Permissions.EnvironmentPermission
System.Security.Permissions.FileDialogPermission
System.Security.Permissions.IsolatedStorageFilePermission
System.Security.Permissions.PrincipalPermissionAttribute
System.Security.Permissions.SecurityPermissionAttribute
System.Security.Permissions.PublisherIdentityPermissionAttribute
System.Security.Permissions.PublisherIdentityPermission
System.Security.Permissions.ReflectionPermission
System.Security.Permissions.RegistryPermission
System.Security.Permissions.PrincipalPermission
System.Security.Permissions.SiteIdentityPermission
System.Security.Permissions.StrongNameIdentityPermission
System.Security.Permissions.StrongNamePublicKeyBlob
System.Security.Permissions.UIPermission
System.Security.Permissions.UrlIdentityPermission
System.Security.Permissions.ZoneIdentityPermission
System.Security.Policy.ApplicationDirectory
System.Security.Policy.ApplicationDirectoryMembershipCondition
System.Security.Policy.FirstMatchCodeGroup
System.Security.Policy.Hash
System.Security.Policy.HashMembershipCondition
System.Security.Policy.NetCodeGroup
System.Security.Policy.PermissionRequestEvidence
System.Security.Policy.Publisher
System.Security.Policy.PublisherMembershipCondition
System.Security.Policy.Site
System.Security.Policy.SiteMembershipCondition
System.Security.Policy.StrongName
System.Security.Policy.StrongNameMembershipCondition
System.Security.Policy.UnionCodeGroup
System.Security.Policy.Url
System.Security.Policy.UrlMembershipCondition
System.Security.Policy.Zone
System.Security.Policy.ZoneMembershipCondition
System.Security.Principal.WindowsIdentity
System.Security.Principal.WindowsImpersonationContext
System.Security.Principal.WindowsPrincipal
System.Threading.CompressedStack
+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)
{
+1 -4
View File
@@ -1,5 +1,4 @@
ROOT=C:/WINNT
CSCRIPT = $(ROOT)/system32/cscript.exe
CSCRIPT = $(SYSTEMROOT)/system32/cscript.exe
CSC=csc
CORCOMPARE=../../../mcs/tools/corcompare
@@ -149,8 +148,6 @@ 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,10 +141,6 @@ 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,7 +1,3 @@
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,12 +1,3 @@
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,6 +299,7 @@ namespace DB2ClientCS
}
#endregion
#region Prepare ()
///
/// Prepare a statement against the database
@@ -18,7 +18,7 @@ namespace DB2ClientCS
/// Summary description for DB2ClientDataReader.
/// DB2ClientDataReader.
/// </summary>
public class DB2ClientDataReader : IDataReader
unsafe 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");
byte[][] dbVals = new byte[(int)numCols][];
IntPtr[] dbVals = new IntPtr[numCols];
IntPtr[] sqlLen_or_IndPtr = new IntPtr[numCols];
PrepareResults(dbVals, sqlLen_or_IndPtr);
@@ -69,10 +69,9 @@ namespace DB2ClientCS
sqlRet = DB2ClientPrototypes.SQLNumResultCols(hwndStmt, ref numCols);
util.DB2CheckReturn(sqlRet, DB2ClientConstants.SQL_HANDLE_STMT, hwndStmt, "DB2ClientDataReader - SQLNumResultCols");
byte[][] dbVals = new byte[(int)numCols][];
IntPtr[] dbVals = new IntPtr[numCols];
IntPtr[] sqlLen_or_IndPtr = new IntPtr[numCols];
PrepareResults(dbVals, sqlLen_or_IndPtr);
FetchResults(dbVals, sqlLen_or_IndPtr, rs);
isClosed = false;
@@ -185,7 +184,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(byte[][] dbVals, IntPtr[] sqlLen_or_IndPtr)
private void PrepareResults(IntPtr[] dbVals, IntPtr[] sqlLen_or_IndPtr)
{
short sqlRet;
StringBuilder colName = new StringBuilder(18);
@@ -206,8 +205,7 @@ namespace DB2ClientCS
rs.Columns.Add(colName.ToString());
sqlLen_or_IndPtr[i-1] = new IntPtr();
dbVals[i-1] = new byte[(int)colSize];
dbVals[i-1] = Marshal.AllocHGlobal((int)colSize+1);
try
{
@@ -218,10 +216,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, (int)sqlLen_or_IndPtr[i-1]);
sqlRet = DB2ClientPrototypes.SQLBindCol(hwndStmt, i, DB2ClientConstants.SQL_C_CHAR, dbVals[i-1],(short)colSize+1, ref sqlLen_or_IndPtr[i-1]);
break;
default:
sqlRet = DB2ClientPrototypes.SQLBindCol(hwndStmt, i, (short)sqlDataType, dbVals[i-1],(short)colSize+1, (int)sqlLen_or_IndPtr[i-1]);
sqlRet = DB2ClientPrototypes.SQLBindCol(hwndStmt, i, (short)sqlDataType, dbVals[i-1],(short)colSize+1, ref sqlLen_or_IndPtr[i-1]);
break;
}
util.DB2CheckReturn(sqlRet, DB2ClientConstants.SQL_HANDLE_STMT, hwndStmt, "DB2ClientDataReader - SQLBindCol");
@@ -230,8 +228,8 @@ namespace DB2ClientCS
{
System.Console.Write(e.Message);
}
isClosed = false;
}
isClosed = false;
}
/// <summary>
/// FetchResults does what it says.
@@ -239,7 +237,7 @@ namespace DB2ClientCS
/// <param name="dbVals"></param>
/// <param name="sqlLen_or_IndPtr"></param>
/// <param name="rs"></param>
private void FetchResults(byte[][] dbVals, IntPtr[] sqlLen_or_IndPtr, DataTable rs)
private void FetchResults(IntPtr[] dbVals, IntPtr[] sqlLen_or_IndPtr, DataTable rs)
{
short sqlRet = 0;
DB2ClientUtils util = new DB2ClientUtils();
@@ -251,12 +249,14 @@ namespace DB2ClientCS
{
DataRow newRow = rs.NewRow();
for (short y=1;y<=numCols;y++)
newRow[y-1] = System.Text.Encoding.Default.GetString(dbVals[y-1]);
newRow[y-1] = Marshal.PtrToStringAnsi(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,10 +369,6 @@ 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;
}
public DB2ClientException(short sqlHandleType, IntPtr sqlHandle, string Message)
unsafe 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")]
internal static extern short SQLAllocHandle(short handleType, IntPtr inputHandle, ref IntPtr outputHandle);
unsafe public static extern short SQLAllocHandle(short handleType, IntPtr inputHandle, ref IntPtr outputHandle);
[DllImport("db2cli.Dll", EntryPoint = "SQLConnect")]
internal static extern short SQLConnect(IntPtr sqlHdbc, string serverName, short serverNameLength, string userName, short userNameLength, string authentication, short authenticationLength);
unsafe public 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")]
internal static extern short SQLDisconnect(IntPtr sqlHdbc);
unsafe public static extern short SQLDisconnect(IntPtr sqlHdbc);
[DllImport("db2cli.dll", EntryPoint = "SQLGetDiagRec")]
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);
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);
[DllImport("db2cli.Dll", EntryPoint = "SQLSetConnectAttr")]
internal static extern short SQLSetConnectAttr(IntPtr sqlHdbc, long sqlAttr, [In] IntPtr sqlValuePtr, long sqlValueLength);
unsafe public static extern short SQLSetConnectAttr(IntPtr sqlHdbc, long sqlAttr, [In] IntPtr sqlValuePtr, long sqlValueLength);
[DllImport("db2cli.Dll", EntryPoint = "SQLEndTran")]
internal static extern short SQLEndTran (short handleType, IntPtr handle, short fType);
unsafe public static extern short SQLEndTran (short handleType, IntPtr handle, short fType);
[DllImport("db2cli.Dll", EntryPoint = "SQLCancel")]
internal static extern short SQLCancel(IntPtr handle);
unsafe public static extern short SQLCancel(IntPtr handle);
[DllImport("db2cli.dll", EntryPoint = "SQLNumResultCols")]
internal static extern short SQLNumResultCols(IntPtr handle, ref int numCols);
unsafe public static extern short SQLNumResultCols(IntPtr handle, ref int numCols);
[DllImport("db2cli.Dll", EntryPoint = "SQLFetch")]
internal static extern short SQLFetch(IntPtr handle);
unsafe public static extern short SQLFetch(IntPtr handle);
[DllImport("db2cli.dll", EntryPoint = "SQLRowCount")]
internal static extern short SQLRowCount(IntPtr stmtHandle, ref int numRows);
unsafe public static extern short SQLRowCount(IntPtr stmtHandle, ref int numRows);
[DllImport("db2cli.dll", EntryPoint = "SQLExecute")]
internal static extern short SQLExecute(IntPtr handle);
unsafe public static extern short SQLExecute(IntPtr handle);
[DllImport ("db2cli.dll", EntryPoint = "SQLExecDirect")]
internal static extern short SQLExecDirect(IntPtr stmtHandle, string stmt, int length);
unsafe public static extern short SQLExecDirect(IntPtr stmtHandle, string stmt, int length);
[DllImport("db2cli.Dll", EntryPoint = "SQLDescribeCol")]
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 );
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 );
[DllImport("db2cli.dll", EntryPoint = "SQLBindCol")]
internal static extern short SQLBindCol(IntPtr stmtHandle, ushort colNum, int dataType, [Out] byte[] dataBufferPtr, int dataBufferLength, int StrLen_or_IndPtr);
unsafe public static extern short SQLBindCol(IntPtr stmtHandle, ushort colNum, int dataType,[In][Out] IntPtr dataBufferPtr, int dataBufferLength, ref IntPtr StrLen_or_IndPtr);
[DllImport("db2cli.dll", EntryPoint = "SQLDriverConnect")]
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);
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);
[DllImport("db2cli.dll", EntryPoint = "SQLPrepare")]
internal static extern short SQLPrepare(IntPtr stmtHandle, string stmt, int length);
unsafe public static extern short SQLPrepare(IntPtr stmtHandle, string stmt, int length);
[DllImport("db2cli.dll", EntryPoint = "SQLDescribeParam")]
internal static extern short SQLDescribeParam(IntPtr stmtHandle, short paramNumber,ref IntPtr dataType, ref IntPtr paramSize, ref IntPtr decimalDigits, ref IntPtr nullable);
unsafe public 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")]
internal static extern short SQLNumParams(IntPtr stmtHandle, ref IntPtr numParams);
unsafe public 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")]
internal static extern short SQLBindParameter(IntPtr stmtHandle, ushort paramNumber,
unsafe public 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>
public class DB2ClientTransaction : IDbTransaction
unsafe public class DB2ClientTransaction : IDbTransaction
{
DB2ClientUtils util = new DB2ClientUtils();
IsolationLevel IL = IsolationLevel.Unspecified;
-4
View File
@@ -1,7 +1,3 @@
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
+6 -5
View File
@@ -149,17 +149,18 @@ namespace Mono.PEToolkit {
coffHdr.Write (writer);
peHdr.Write (writer);
WriteSections (writer);
if (this.IsCLI) {
writer.BaseStream.Position = RVAToVA (peHdr.CLIHdrDir.virtAddr);
corHdr.Write (writer);
long pos = RVAToVA (corHdr.MetaData.virtAddr);
writer.BaseStream.Position = pos;
mdRoot.Write (writer);
/*
mdRoot = new MetaDataRoot(this);
reader.BaseStream.Position = RVAToVA(corHdr.MetaData.virtAddr);
mdRoot.Read(reader);
*/
}
}
@@ -1,11 +1,3 @@
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
+1 -33
View File
@@ -50,33 +50,10 @@ 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
@@ -175,15 +152,6 @@ 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,9 +141,10 @@ namespace Mono.PEToolkit.Metadata {
} else {
VersionString = String.Empty;
}
flags = reader.ReadInt16();
nStreams = reader.ReadInt16();
streams = new Hashtable(nStreams);
// load all streams into memory
@@ -167,44 +168,6 @@ 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
@@ -1,4 +0,0 @@
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
@@ -1,31 +0,0 @@
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,39 +1,3 @@
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
@@ -0,0 +1,30 @@
//
// 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
}
}
@@ -0,0 +1,30 @@
//
// 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,45 +20,142 @@ using System.Runtime.InteropServices;
using System.Text;
namespace System.Data.OracleClient.Oci {
internal sealed class OciBindHandle : OciHandle, IDisposable
internal sealed class OciBindHandle : IOciHandle, IDisposable
{
#region Fields
bool disposed = false;
IntPtr handle;
string name;
IntPtr value;
OciStatementHandle statement;
OciDataType type;
int size;
int indicator;
#endregion // Fields
#region Constructors
public OciBindHandle (OciHandle parent, IntPtr newHandle)
: base (OciHandleType.Bind, parent, newHandle)
public OciBindHandle (string name)
{
this.name = name;
this.value = IntPtr.Zero;
this.indicator = 0;
}
#endregion // Constructors
#region Properties
public IntPtr Value {
get { return value; }
set { this.value = value; }
public IntPtr Handle {
get { return handle; }
set { handle = value; }
}
#endregion // Properties
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; }
}
#endregion
#region Methods
protected override void Dispose (bool disposing)
[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)
{
if (!disposed) {
try {
Marshal.FreeHGlobal (value);
disposed = true;
} finally {
base.Dispose (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;
}
}
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,12 +21,10 @@ using System.Runtime.InteropServices;
using System.Text;
namespace System.Data.OracleClient.Oci {
internal sealed class OciDefineHandle : OciHandle, IDisposable
internal sealed class OciDefineHandle : IOciHandle, IDisposable
{
#region Fields
bool disposed = false;
IntPtr handle;
IntPtr value;
short indicator;
@@ -35,30 +33,61 @@ namespace System.Data.OracleClient.Oci {
OciDataType definedType;
int definedSize;
int rlenp;
short scale;
OciErrorHandle errorHandle;
sbyte scale;
OciStatementHandle statement;
OciLobLocator lobLocator;
byte[] date;
#endregion // Fields
#region Constructors
public OciDefineHandle (OciHandle parent, IntPtr newHandle)
: base (OciHandleType.Define, parent, newHandle)
public OciDefineHandle (OciStatementHandle statement, int position)
{
}
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);
parameter.Dispose ();
statement.FreeParameterHandle (parameterHandle);
}
#endregion // Constructors
@@ -73,16 +102,20 @@ namespace System.Data.OracleClient.Oci {
get { return definedSize; }
}
public OciErrorHandle ErrorHandle {
get { return errorHandle; }
set { errorHandle = value; }
public IntPtr Handle {
get { return handle; }
set { handle = value; }
}
public OciHandleType HandleType {
get { return OciHandleType.Define; }
}
public bool IsNull {
get { return (indicator == -1); }
}
public short Scale {
public sbyte Scale {
get { return scale; }
}
@@ -124,21 +157,12 @@ 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 = 7;
DefineDate (position);
definedSize = 20;
DefineChar (position); // HANDLE AS CHAR FOR NOW
return;
case OciDataType.Clob:
case OciDataType.Blob:
@@ -151,31 +175,6 @@ 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;
@@ -183,20 +182,20 @@ namespace System.Data.OracleClient.Oci {
int status = 0;
status = OCIDefineByPos (Parent,
out handle,
ErrorHandle,
position + 1,
value,
definedSize,
ociType,
ref indicator,
ref rlenp,
IntPtr.Zero,
0);
status = OCIDefineByPos (statement.Handle,
out handle,
statement.ErrorHandle.Handle,
position,
value,
definedSize,
ociType,
ref indicator,
ref rlenp,
IntPtr.Zero,
0);
if (status != 0) {
OciErrorInfo info = ErrorHandle.HandleError ();
OciErrorInfo info = statement.ErrorHandle.HandleError ();
throw new OracleException (info.ErrorCode, info.ErrorMessage);
}
}
@@ -208,21 +207,19 @@ namespace System.Data.OracleClient.Oci {
definedSize = -1;
lobLocator = (OciLobLocator) Parent.Parent.Allocate (OciHandleType.LobLocator);
lobLocator = (OciLobLocator) statement.Environment.AllocateDescriptor (OciDescriptorType.LobLocator);
if (lobLocator == null) {
OciErrorInfo info = ErrorHandle.HandleError ();
OciErrorInfo info = statement.Environment.HandleError ();
throw new OracleException (info.ErrorCode, info.ErrorMessage);
}
value = lobLocator.Handle;
lobLocator.ErrorHandle = ErrorHandle;
lobLocator.Service = ((OciStatementHandle) Parent).Service;
lobLocator.ErrorHandle = statement.ErrorHandle;
lobLocator.Service = statement.Service;
status = OCIDefineByPosPtr (Parent,
status = OCIDefineByPosPtr (statement.Handle,
out handle,
ErrorHandle,
position + 1,
statement.ErrorHandle.Handle,
position,
ref value,
definedSize,
ociType,
@@ -232,22 +229,14 @@ namespace System.Data.OracleClient.Oci {
0);
if (status != 0) {
OciErrorInfo info = ErrorHandle.HandleError ();
OciErrorInfo info = statement.ErrorHandle.HandleError ();
throw new OracleException (info.ErrorCode, info.ErrorMessage);
}
}
[MonoTODO ("This will be an override when this is properly derived from OciHandle.")]
protected override void Dispose (bool disposing)
public void Dispose ()
{
if (!disposed) {
try {
Marshal.FreeHGlobal (value);
disposed = true;
} finally {
base.Dispose (disposing);
}
}
Marshal.FreeHGlobal (value);
}
public OracleLob GetOracleLob ()
@@ -290,31 +279,15 @@ namespace System.Data.OracleClient.Oci {
return Double.Parse (String.Copy ((string) tmp));
break;
case OciDataType.Date:
return UnpackDate ();
tmp = Marshal.PtrToStringAnsi (Value, Size);
if (tmp != null)
return DateTime.Parse ((string) tmp);
break;
}
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,32 +16,44 @@
//
using System;
using System.Runtime.InteropServices;
namespace System.Data.OracleClient.Oci {
internal abstract class OciDescriptorHandle : OciHandle
internal abstract class OciDescriptorHandle : IOciDescriptorHandle
{
#region Fields
IntPtr handle;
OciEnvironmentHandle environment;
OciDescriptorType type;
#endregion // Fields
#region Constructors
public OciDescriptorHandle (OciHandleType type, OciHandle parent, IntPtr newHandle)
: base (type, parent, newHandle)
public OciDescriptorHandle (OciDescriptorType type, OciEnvironmentHandle environment, IntPtr newHandle)
{
this.type = type;
this.environment = environment;
this.handle = newHandle;
}
#endregion // Constructors
#region Methods
#region Properties
[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 OciEnvironmentHandle Environment {
get { return environment; }
}
#endregion // Methods
public IntPtr Handle {
get { return handle; }
set { handle = value; }
}
public OciDescriptorType HandleType {
get { return type; }
}
#endregion // Properties
}
}
@@ -0,0 +1,45 @@
//
// 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,8 +19,14 @@ using System;
using System.Runtime.InteropServices;
namespace System.Data.OracleClient.Oci {
internal class OciEnvironmentHandle : OciHandle, IDisposable
internal class OciEnvironmentHandle : IOciHandle, IDisposable
{
#region Fields
IntPtr handle;
#endregion // Fields
#region Constructors
public OciEnvironmentHandle ()
@@ -29,35 +35,143 @@ namespace System.Data.OracleClient.Oci {
}
public OciEnvironmentHandle (OciEnvironmentMode mode)
: base (OciHandleType.Environment, null, IntPtr.Zero)
{
int status = 0;
IntPtr newHandle = IntPtr.Zero;
status = OCIEnvCreate (out newHandle,
mode,
IntPtr.Zero,
IntPtr.Zero,
IntPtr.Zero,
IntPtr.Zero,
0,
IntPtr.Zero);
this.handle = IntPtr.Zero;
SetHandle (newHandle);
status = OCIEnvCreate (out handle, mode,
IntPtr.Zero,
IntPtr.Zero,
IntPtr.Zero,
IntPtr.Zero,
0,
IntPtr.Zero);
}
#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")]
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 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;
}
public OciErrorInfo HandleError ()
{
@@ -68,7 +182,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,18 +19,12 @@ using System;
using System.Runtime.InteropServices;
namespace System.Data.OracleClient.Oci {
internal sealed class OciErrorHandle : OciHandle, IDisposable
internal sealed class OciErrorHandle : OciHandle, IOciHandle, IDisposable
{
#region Fields
bool disposed = false;
#endregion // Fields
#region Constructors
public OciErrorHandle (OciHandle parent, IntPtr handle)
: base (OciHandleType.Error, parent, handle)
public OciErrorHandle (OciEnvironmentHandle environment, IntPtr handle)
: base (OciHandleType.Error, environment, handle)
{
}
@@ -38,12 +32,9 @@ namespace System.Data.OracleClient.Oci {
#region Methods
protected override void Dispose (bool disposing)
public void Dispose ()
{
if (!disposed) {
disposed = true;
base.Dispose (disposing);
}
Environment.FreeHandle (this);
}
public OciErrorInfo HandleError ()
@@ -16,53 +16,38 @@
//
using System;
using System.Runtime.InteropServices;
namespace System.Data.OracleClient.Oci {
internal abstract class OciHandle : IDisposable
internal abstract class OciHandle : IOciHandle
{
#region Fields
bool disposed = false;
IntPtr handle;
OciHandle parent;
OciEnvironmentHandle environment;
OciHandleType type;
#endregion // Fields
#region Constructors
public OciHandle (OciHandleType type, OciHandle parent, IntPtr newHandle)
public OciHandle (OciHandleType type, OciEnvironmentHandle environment, IntPtr newHandle)
{
this.type = type;
this.parent = parent;
this.environment = environment;
this.handle = newHandle;
}
~OciHandle ()
{
Dispose (false);
}
#endregion // Constructors
#region Properties
public OciHandle Parent {
get { return parent; }
public OciEnvironmentHandle Environment {
get { return environment; }
}
/*
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 {
@@ -70,257 +55,5 @@ 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,31 +35,6 @@ namespace System.Data.OracleClient.Oci {
DirectPathContext = 0x0e,
DirectPathColumnArray = 0x0f,
DirectPathStream = 0x10,
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
Process = 0x11
}
}
@@ -20,11 +20,10 @@ using System.Data.OracleClient;
using System.Runtime.InteropServices;
namespace System.Data.OracleClient.Oci {
internal sealed class OciLobLocator : OciDescriptorHandle, IDisposable
internal sealed class OciLobLocator : OciDescriptorHandle, IOciDescriptorHandle, IDisposable
{
#region Fields
bool disposed = false;
OciErrorHandle errorHandle;
OciServiceHandle service;
OciDataType type;
@@ -33,8 +32,8 @@ namespace System.Data.OracleClient.Oci {
#region Constructors
public OciLobLocator (OciHandle parent, IntPtr handle)
: base (OciHandleType.LobLocator, parent, handle)
public OciLobLocator (OciEnvironmentHandle environment, IntPtr handle)
: base (OciDescriptorType.LobLocator, environment, handle)
{
}
@@ -66,15 +65,6 @@ 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,
@@ -148,26 +138,6 @@ 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;
@@ -309,6 +279,11 @@ namespace System.Data.OracleClient.Oci {
return (int) amount;
}
public void Dispose ()
{
Environment.FreeDescriptor (this);
}
#endregion // Methods
}
}
@@ -1,85 +0,0 @@
//
// 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,12 +19,11 @@ using System;
using System.Runtime.InteropServices;
namespace System.Data.OracleClient.Oci {
internal sealed class OciServerHandle : OciHandle, IDisposable
internal sealed class OciServerHandle : OciHandle, IOciHandle, IDisposable
{
#region Fields
bool disposed = false;
bool attached = false;
bool attached;
OciErrorHandle errorHandle;
string tnsname;
@@ -32,9 +31,10 @@ namespace System.Data.OracleClient.Oci {
#region Constructors
public OciServerHandle (OciHandle parent, IntPtr handle)
: base (OciHandleType.Server, parent, handle)
public OciServerHandle (OciEnvironmentHandle environment, IntPtr handle)
: base (OciHandleType.Server, environment, handle)
{
attached = false;
}
#endregion // Constructors
@@ -79,17 +79,14 @@ namespace System.Data.OracleClient.Oci {
return attached;
}
protected override void Dispose (bool disposing)
public void Dispose ()
{
if (!disposed) {
try {
if (attached)
OCIServerDetach (Handle, errorHandle, 0);
disposed = true;
} finally {
base.Dispose (disposing);
}
if (attached) {
OCIServerDetach (Handle,
errorHandle.Handle,
0);
}
Environment.FreeHandle (this);
}
#endregion // Methods
@@ -19,22 +19,20 @@ using System;
using System.Runtime.InteropServices;
namespace System.Data.OracleClient.Oci {
internal sealed class OciServiceHandle : OciHandle
internal sealed class OciServiceHandle : OciHandle, IOciHandle, IDisposable
{
#region Fields
bool disposed = false;
OciSessionHandle session;
OciServerHandle server;
OciSessionHandle sessionHandle;
OciServerHandle serverHandle;
OciErrorHandle errorHandle;
#endregion // Fields
#region Constructors
public OciServiceHandle (OciHandle parent, IntPtr handle)
: base (OciHandleType.Service, parent, handle)
public OciServiceHandle (OciEnvironmentHandle environment, IntPtr handle)
: base (OciHandleType.Service, environment, handle)
{
}
@@ -51,46 +49,34 @@ namespace System.Data.OracleClient.Oci {
#region Methods
protected override void Dispose (bool disposing)
public void Dispose ()
{
if (!disposed) {
try {
if (disposing) {
if (server != null)
server.Dispose ();
if (session != null)
session.Dispose ();
}
disposed = true;
} finally {
base.Dispose (disposing);
}
}
Environment.FreeHandle (this);
}
public bool SetServer (OciServerHandle handle)
{
server = handle;
serverHandle = handle;
int status = 0;
status = OciGlue.OCIAttrSet (Handle,
HandleType,
server,
serverHandle.Handle,
0,
OciAttributeType.Server,
errorHandle);
errorHandle.Handle);
return (status == 0);
}
public bool SetSession (OciSessionHandle handle)
{
session = handle;
sessionHandle = handle;
int status = 0;
status = OciGlue.OCIAttrSet (Handle,
HandleType,
session,
sessionHandle.Handle,
0,
OciAttributeType.Session,
errorHandle);
errorHandle.Handle);
return (status == 0);
}
@@ -19,14 +19,13 @@ using System;
using System.Runtime.InteropServices;
namespace System.Data.OracleClient.Oci {
internal sealed class OciSessionHandle : OciHandle, IDisposable
internal sealed class OciSessionHandle : OciHandle, IOciHandle, IDisposable
{
#region Fields
OciErrorHandle errorHandle;
OciServiceHandle serviceHandle;
bool begun = false;
bool disposed = false;
bool begun;
string username;
string password;
@@ -34,9 +33,10 @@ namespace System.Data.OracleClient.Oci {
#region Constructors
public OciSessionHandle (OciHandle parent, IntPtr handle)
: base (OciHandleType.Session, parent, handle)
public OciSessionHandle (OciEnvironmentHandle environment, IntPtr handle)
: base (OciHandleType.Session, environment, handle)
{
begun = false;
}
#endregion // Constructors
@@ -118,21 +118,15 @@ namespace System.Data.OracleClient.Oci {
return true;
}
protected override void Dispose (bool disposing)
public void Dispose ()
{
if (!disposed) {
try {
if (begun) {
OCISessionEnd (Service.Handle,
errorHandle.Handle,
Handle,
0);
}
disposed = false;
} finally {
base.Dispose (disposing);
}
if (begun) {
OCISessionEnd (Service.Handle,
errorHandle.Handle,
Handle,
0);
}
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, IDisposable
internal sealed class OciStatementHandle : OciHandle, IOciHandle, IDisposable
{
#region Fields
@@ -32,7 +32,6 @@ namespace System.Data.OracleClient.Oci {
ArrayList values;
ArrayList parameters;
bool disposed = false;
bool moreResults;
int columnCount;
@@ -40,8 +39,8 @@ namespace System.Data.OracleClient.Oci {
#region Constructors
public OciStatementHandle (OciHandle parent, IntPtr handle)
: base (OciHandleType.Statement, parent, handle)
public OciStatementHandle (OciEnvironmentHandle environment, IntPtr handle)
: base (OciHandleType.Statement, environment, handle)
{
parameters = new ArrayList ();
language = OciStatementLanguage.NTV;
@@ -81,41 +80,25 @@ namespace System.Data.OracleClient.Oci {
#region Methods
[DllImport ("oci")]
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);
public static extern int OCIDescriptorFree (IntPtr descp,
[MarshalAs (UnmanagedType.U4)] OciDescriptorType type);
[DllImport ("oci")]
static extern int OCIDescriptorFree (IntPtr descp,
[MarshalAs (UnmanagedType.U4)] OciHandleType type);
public 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 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);
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);
[DllImport ("oci")]
public static extern int OCIStmtFetch (IntPtr stmtp,
@@ -133,15 +116,7 @@ namespace System.Data.OracleClient.Oci {
[MarshalAs (UnmanagedType.U4)] OciStatementLanguage language,
[MarshalAs (UnmanagedType.U4)] OciStatementMode mode);
protected override void Dispose (bool disposing)
{
if (!disposed) {
disposed = true;
base.Dispose (disposing);
}
}
public OciParameterDescriptor GetParameter (int position)
public IntPtr CreateParameterHandle (int position)
{
IntPtr handle = IntPtr.Zero;
int status = 0;
@@ -150,88 +125,47 @@ namespace System.Data.OracleClient.Oci {
OciHandleType.Statement,
ErrorHandle.Handle,
out handle,
position + 1);
position);
if (status != 0) {
OciErrorInfo info = ErrorHandle.HandleError ();
throw new OracleException (info.ErrorCode, info.ErrorMessage);
}
OciParameterDescriptor output = new OciParameterDescriptor (this, handle);
output.ErrorHandle = ErrorHandle;
return output;
return handle;
}
public OciDefineHandle GetDefineHandle (int position)
public void FreeBindHandle (IntPtr handle)
{
OciDefineHandle defineHandle = new OciDefineHandle (this, IntPtr.Zero);
defineHandle.ErrorHandle = ErrorHandle;
defineHandle.DefineByPosition (position);
return defineHandle;
}
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;
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);
//status = OCIDescriptorFree (handle, OciDescriptorType.Parameter);
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;
public void FreeParameterHandle (IntPtr handle)
{
int status = 0;
status = OCIDescriptorFree (handle, OciDescriptorType.Parameter);
if (status != 0) {
OciErrorInfo info = ErrorHandle.HandleError ();
throw new OracleException (info.ErrorCode, info.ErrorMessage);
}
}
void Define ()
{
values = new ArrayList ();
for (int i = 0; i < columnCount; i += 1)
values.Add (GetDefineHandle (i));
values.Add (new OciDefineHandle (this, i + 1));
}
public void Dispose ()
{
Environment.FreeHandle (this);
}
public bool ExecuteQuery ()
@@ -279,12 +213,192 @@ namespace System.Data.OracleClient.Oci {
void GetColumnCount ()
{
columnCount = GetAttributeInt32 (OciAttributeType.ParameterCount, ErrorHandle);
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;
}
public OciStatementType GetStatementType ()
{
return (OciStatementType) GetAttributeInt32 (OciAttributeType.StatementType, ErrorHandle);
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;
}
public bool Fetch ()
@@ -19,11 +19,10 @@ using System;
using System.Runtime.InteropServices;
namespace System.Data.OracleClient.Oci {
internal sealed class OciTransactionHandle : OciHandle, IDisposable
internal sealed class OciTransactionHandle : OciHandle, IOciHandle, IDisposable
{
#region Fields
bool disposed = false;
OciErrorHandle errorHandle;
OciServiceHandle serviceHandle;
@@ -31,8 +30,8 @@ namespace System.Data.OracleClient.Oci {
#region Constructors
public OciTransactionHandle (OciHandle parent, IntPtr handle)
: base (OciHandleType.Transaction, parent, handle)
public OciTransactionHandle (OciEnvironmentHandle environment, IntPtr handle)
: base (OciHandleType.Transaction, environment, handle)
{
}
@@ -73,12 +72,12 @@ namespace System.Data.OracleClient.Oci {
public void AttachToServiceContext ()
{
int status = 0;
status = OciGlue.OCIAttrSet (Service,
status = OciGlue.OCIAttrSet (Service.Handle,
OciHandleType.Service,
this,
Handle,
0,
OciAttributeType.Transaction,
ErrorHandle);
ErrorHandle.Handle);
if (status != 0) {
OciErrorInfo info = ErrorHandle.HandleError ();
throw new OracleException (info.ErrorCode, info.ErrorMessage);
@@ -91,10 +90,10 @@ namespace System.Data.OracleClient.Oci {
AttachToServiceContext ();
status = OCITransStart (Service,
ErrorHandle,
60,
OciTransactionFlags.New);
status = OCITransStart (Service.Handle,
ErrorHandle.Handle,
60,
OciTransactionFlags.New);
if (status != 0) {
OciErrorInfo info = ErrorHandle.HandleError ();
@@ -106,7 +105,9 @@ namespace System.Data.OracleClient.Oci {
{
int status = 0;
AttachToServiceContext ();
status = OCITransCommit (Service, ErrorHandle, 0);
status = OCITransCommit (Service.Handle,
ErrorHandle.Handle,
0);
if (status != 0) {
OciErrorInfo info = ErrorHandle.HandleError ();
@@ -114,19 +115,18 @@ namespace System.Data.OracleClient.Oci {
}
}
protected override void Dispose (bool disposing)
public void Dispose ()
{
if (!disposed) {
disposed = true;
base.Dispose (disposing);
}
Environment.FreeHandle (this);
}
public void Rollback ()
{
int status = 0;
AttachToServiceContext ();
status = OCITransRollback (Service, ErrorHandle, 0);
status = OCITransRollback (Service.Handle,
ErrorHandle.Handle,
0);
if (status != 0) {
OciErrorInfo info = ErrorHandle.HandleError ();
@@ -67,6 +67,54 @@ 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,7 +267,8 @@ namespace System.Data.OracleClient {
public string GetName (int i)
{
return statement.GetParameter (i).GetName ();
OciColumnInfo columnInfo = statement.DescribeColumn (i);
return columnInfo.ColumnName;
}
[MonoTODO]
@@ -314,19 +315,18 @@ namespace System.Data.OracleClient {
for (int i = 0; i < statement.ColumnCount; i += 1) {
DataRow row = schemaTable.NewRow ();
OciColumnInfo columnInfo = statement.DescribeColumn (i);
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 ();
row ["ColumnName"] = columnInfo.ColumnName;
row ["ColumnOrdinal"] = i + 1;
row ["ColumnSize"] = (int) columnInfo.ColumnSize;
row ["NumericPrecision"] = (short) columnInfo.Precision;
row ["NumericScale"] = (short) columnInfo.Scale;
// FIXME: "DataType" need to implement
//row ["DataType"] = OciGlue.OciDataTypeToDbType (columnInfo.DataType);
row ["DataType"] = typeof(string);
row ["AllowDBNull"] = parameter.GetIsNull ();
row ["BaseColumnName"] = parameter.GetName ();
row ["DataType"] = typeof(string);
row ["AllowDBNull"] = columnInfo.AllowDBNull;
row ["BaseColumnName"] = columnInfo.BaseColumnName;
schemaTable.Rows.Add (row);
}
@@ -79,8 +79,10 @@ namespace System.Data.OracleClient {
public int ChunkSize {
[MonoTODO]
get {
AssertConnectionIsOpen ();
AssertObjectNotDisposed ();
if (Connection.State == ConnectionState.Closed)
throw new InvalidOperationException ();
if (!isOpen)
throw new ObjectDisposedException ("OracleLob");
return locator.GetChunkSize ();
}
}
@@ -99,16 +101,20 @@ namespace System.Data.OracleClient {
public bool IsTemporary {
get {
AssertConnectionIsOpen ();
AssertObjectNotDisposed ();
if (Connection.State == ConnectionState.Closed)
throw new InvalidOperationException ();
if (!isOpen)
throw new ObjectDisposedException ("OracleLob");
throw new NotImplementedException ();
}
}
public override long Length {
get {
AssertConnectionIsOpen ();
AssertObjectNotDisposed ();
if (Connection.State == ConnectionState.Closed)
throw new InvalidOperationException ();
if (!isOpen)
throw new ObjectDisposedException ("OracleLob");
if (length >= 0)
return length;
return locator.GetLength (LobType == OracleType.Blob);
@@ -119,26 +125,28 @@ namespace System.Data.OracleClient {
get { return type; }
}
internal OciLobLocator Locator {
get { return locator; }
}
public override long Position {
get {
AssertConnectionIsOpen ();
AssertObjectNotDisposed ();
if (Connection.State == ConnectionState.Closed)
throw new InvalidOperationException ();
if (!isOpen)
throw new ObjectDisposedException ("OracleLob");
return position;
}
set {
AssertConnectionIsOpen ();
AssertObjectNotDisposed ();
if (!isOpen)
throw new ObjectDisposedException ("OracleLob");
if (value > Length)
throw new ArgumentOutOfRangeException ();
position = value;
}
}
public object Value {
get {
AssertObjectNotDisposed ();
if (!isOpen)
throw new ObjectDisposedException ("OracleLob");
if (IsNull)
return DBNull.Value;
@@ -165,38 +173,6 @@ 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);
@@ -204,11 +180,8 @@ namespace System.Data.OracleClient {
public void BeginBatch (OracleLobOpenMode mode)
{
AssertConnectionIsOpen ();
AssertObjectNotDisposed ();
locator.BeginBatch (mode);
isBatched = true;
locator.BeginBatch (mode);
}
[MonoTODO]
@@ -224,28 +197,22 @@ namespace System.Data.OracleClient {
isOpen = false;
}
[MonoTODO]
public long CopyTo (OracleLob destination)
{
return CopyTo (0, destination, 0, Length);
throw new NotImplementedException ();
}
[MonoTODO]
public long CopyTo (OracleLob destination, long destinationOffset)
{
return CopyTo (0, destination, destinationOffset, Length);
throw new NotImplementedException ();
}
[MonoTODO]
public long CopyTo (long sourceOffset, OracleLob destination, long destinationOffset, long amount)
{
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);
throw new NotImplementedException ();
}
[MonoTODO]
@@ -256,9 +223,6 @@ namespace System.Data.OracleClient {
public void EndBatch ()
{
AssertConnectionIsOpen ();
AssertObjectNotDisposed ();
locator.EndBatch ();
isBatched = false;
}
@@ -270,14 +234,16 @@ namespace System.Data.OracleClient {
public long Erase (long offset, long amount)
{
if (offset < 0 || amount < 0)
throw new ArgumentOutOfRangeException ("Must be a positive value.");
if (offset < 0)
throw new ArgumentOutOfRangeException ();
if (amount < 0)
throw new ArgumentOutOfRangeException ();
if (offset + amount > Length)
throw new ArgumentOutOfRangeException ();
AssertAmountIsValid (offset, "offset");
AssertAmountIsValid (amount, "amount");
if (offset > UInt32.MaxValue)
throw new ArgumentOutOfRangeException ();
if (amount > UInt32.MaxValue)
throw new ArgumentOutOfRangeException ();
return (long) locator.Erase ((uint) offset + 1, (uint) amount);
}
@@ -288,14 +254,6 @@ 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];
@@ -332,10 +290,18 @@ namespace System.Data.OracleClient {
[MonoTODO]
public override void SetLength (long value)
{
AssertAmountIsValid (value, "value");
AssertTransactionExists ();
AssertConnectionIsOpen ();
AssertObjectNotDisposed ();
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");
locator.Trim ((uint) value);
length = value;
@@ -345,25 +311,38 @@ namespace System.Data.OracleClient {
{
if (buffer == null)
throw new ArgumentNullException ("Buffer is null.");
if (offset < 0 || count < 0)
throw new ArgumentOutOfRangeException ("Must be a positive value.");
if (offset < 0)
throw new ArgumentOutOfRangeException ("Offset parameter must be positive.");
if (count < 0)
throw new ArgumentOutOfRangeException ("Count parameter must be positive.");
if (offset + count > buffer.Length)
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)
value = buffer;
else {
value = new byte[count];
Array.Copy (buffer, offset, value, 0, count);
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");
position += locator.Write (value, (uint) offset, (uint) value.Length, LobType);
if (offset + count == buffer.Length && offset == 0)
position += locator.Write (buffer, (uint) Position, (uint) buffer.Length, LobType);
else {
byte[] copy = new byte [count];
Array.Copy (buffer, offset, copy, 0, count);
position += locator.Write (copy, (uint) Position, (uint) copy.Length, LobType);
}
}
#endregion // Methods
@@ -28,7 +28,6 @@ namespace System.Data.OracleClient {
string name;
OracleType oracleType = OracleType.VarChar;
OciDataType ociType;
int size;
ParameterDirection direction;
bool isNullable;
@@ -55,6 +54,7 @@ namespace System.Data.OracleClient {
public OracleParameter (string name, object value)
{
bindHandle = new OciBindHandle (name);
this.name = name;
this.value = value;
SourceVersion = DataRowVersion.Current;
@@ -78,6 +78,7 @@ 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;
@@ -123,8 +124,8 @@ namespace System.Data.OracleClient {
}
public string ParameterName {
get { return name; }
set { name = value; }
get { return bindHandle.Name; }
set { bindHandle.Name = value; }
}
public byte Precision {
@@ -166,7 +167,7 @@ namespace System.Data.OracleClient {
internal void Bind (OciStatementHandle handle)
{
bindHandle = handle.GetBindHandle (ParameterName, value, ociType);
bindHandle.Bind (handle, value);
}
[MonoTODO]
@@ -224,61 +225,61 @@ namespace System.Data.OracleClient {
switch (type) {
case DbType.AnsiString:
oracleType = OracleType.VarChar;
ociType = OciDataType.VarChar;
bindHandle.Type = OciDataType.VarChar;
break;
case DbType.AnsiStringFixedLength:
oracleType = OracleType.Char;
ociType = OciDataType.Char;
bindHandle.Type = OciDataType.Char;
break;
case DbType.Binary:
case DbType.Guid:
oracleType = OracleType.Raw;
ociType = OciDataType.Raw;
bindHandle.Type = OciDataType.Raw;
break;
case DbType.Boolean:
case DbType.Byte:
oracleType = OracleType.Byte;
ociType = OciDataType.Integer;
bindHandle.Type = OciDataType.Integer;
break;
case DbType.Currency:
case DbType.Decimal:
case DbType.Int64:
oracleType = OracleType.Number;
ociType = OciDataType.Number;
bindHandle.Type = OciDataType.Number;
break;
case DbType.Date:
case DbType.DateTime:
case DbType.Time:
oracleType = OracleType.DateTime;
ociType = OciDataType.Char;
bindHandle.Type = OciDataType.Char;
break;
case DbType.Double:
oracleType = OracleType.Double;
ociType = OciDataType.Float;
bindHandle.Type = OciDataType.Float;
break;
case DbType.Int16:
oracleType = OracleType.Int16;
ociType = OciDataType.Integer;
bindHandle.Type = OciDataType.Integer;
break;
case DbType.Int32:
oracleType = OracleType.Int32;
ociType = OciDataType.Integer;
bindHandle.Type = OciDataType.Integer;
break;
case DbType.Object:
oracleType = OracleType.Blob;
ociType = OciDataType.Blob;
bindHandle.Type = OciDataType.Blob;
break;
case DbType.Single:
oracleType = OracleType.Float;
ociType = OciDataType.Float;
bindHandle.Type = OciDataType.Float;
break;
case DbType.String:
oracleType = OracleType.NVarChar;
ociType = OciDataType.VarChar;
bindHandle.Type = OciDataType.VarChar;
break;
case DbType.StringFixedLength:
oracleType = OracleType.NChar;
ociType = OciDataType.Char;
bindHandle.Type = OciDataType.Char;
break;
default:
throw new ArgumentException (exception);
@@ -296,76 +297,76 @@ namespace System.Data.OracleClient {
case OracleType.LongRaw:
case OracleType.Raw:
dbType = DbType.Binary;
ociType = OciDataType.Raw;
bindHandle.Type = OciDataType.Raw;
break;
case OracleType.Byte:
dbType = DbType.Byte;
ociType = OciDataType.Integer;
bindHandle.Type = OciDataType.Integer;
break;
case OracleType.Char:
dbType = DbType.AnsiStringFixedLength;
ociType = OciDataType.Char;
bindHandle.Type = OciDataType.Char;
break;
case OracleType.Clob:
case OracleType.LongVarChar:
case OracleType.RowId:
case OracleType.VarChar:
dbType = DbType.AnsiString;
ociType = OciDataType.VarChar;
bindHandle.Type = OciDataType.VarChar;
break;
case OracleType.Cursor:
case OracleType.IntervalDayToSecond:
dbType = DbType.Object;
ociType = OciDataType.Blob;
bindHandle.Type = OciDataType.Blob;
break;
case OracleType.DateTime:
case OracleType.Timestamp:
case OracleType.TimestampLocal:
case OracleType.TimestampWithTZ:
dbType = DbType.DateTime;
ociType = OciDataType.Char;
bindHandle.Type = OciDataType.Char;
break;
case OracleType.Double:
dbType = DbType.Double;
ociType = OciDataType.Float;
bindHandle.Type = OciDataType.Float;
break;
case OracleType.Float:
dbType = DbType.Single;
ociType = OciDataType.Float;
bindHandle.Type = OciDataType.Float;
break;
case OracleType.Int16:
dbType = DbType.Int16;
ociType = OciDataType.Integer;
bindHandle.Type = OciDataType.Integer;
break;
case OracleType.Int32:
case OracleType.IntervalYearToMonth:
dbType = DbType.Int32;
ociType = OciDataType.Integer;
bindHandle.Type = OciDataType.Integer;
break;
case OracleType.NChar:
dbType = DbType.StringFixedLength;
ociType = OciDataType.Char;
bindHandle.Type = OciDataType.Char;
break;
case OracleType.NClob:
case OracleType.NVarChar:
dbType = DbType.String;
ociType = OciDataType.VarChar;
bindHandle.Type = OciDataType.VarChar;
break;
case OracleType.Number:
dbType = DbType.VarNumeric;
ociType = OciDataType.Number;
bindHandle.Type = OciDataType.Number;
break;
case OracleType.SByte:
dbType = DbType.SByte;
ociType = OciDataType.Integer;
bindHandle.Type = OciDataType.Integer;
break;
case OracleType.UInt16:
dbType = DbType.UInt16;
ociType = OciDataType.Integer;
bindHandle.Type = OciDataType.Integer;
break;
case OracleType.UInt32:
dbType = DbType.UInt32;
ociType = OciDataType.Integer;
bindHandle.Type = OciDataType.Integer;
break;
default:
throw new ArgumentException (exception);
+3 -1
View File
@@ -1,9 +1,12 @@
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
@@ -14,7 +17,6 @@ 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,8 +1,3 @@
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,7 +362,10 @@ namespace System.Data.Common {
public override int Update (DataSet dataSet)
{
return Update (dataSet, DefaultSourceTableName);
int result = 0;
foreach (DataTable table in dataSet.Tables)
result += Update (table);
return result;
}
public int Update (DataTable dataTable)
@@ -1,7 +1,3 @@
2003-03-04 Gonzalo Paniagua Javier <[email protected]>
* SqlException.cs: implemented GetObjectData ().
2003-02-16 Daniel Morgan <[email protected]>
* ChangeLog: added this file
@@ -99,13 +99,10 @@ 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)
{
if (si == null)
throw new ArgumentNullException ("si");
si.AddValue ("errors", errors);
base.GetObjectData (si, context);
throw new NotImplementedException ();
}
#endregion // Methods
@@ -4,7 +4,7 @@
// Author:
// Dennis Hayes ([email protected])
//
// (C) 2002/3 Ximian, Inc
// (C) 2002 Ximian, Inc
//
using System;
@@ -13,69 +13,13 @@ namespace System.Drawing.Drawing2D
/// <summary>
/// Summary description for AdjustableArrowCap.
/// </summary>
public sealed class AdjustableArrowCap : CustomLineCap
public class AdjustableArrowCap
{
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()
{
//
// TODO: Add constructor logic here
//
}
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/3 Ximian, Inc
// (C) 2002 Ximian, Inc
//
using System;
@@ -13,71 +13,13 @@ namespace System.Drawing.Drawing2D
/// <summary>
/// Summary description for Blend.
/// </summary>
public sealed class Blend
public class Blend
{
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;
}
public Blend()
{
//
// TODO: Add constructor logic here
//
}
}
}
@@ -1,15 +1,3 @@
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
@@ -68,4 +56,4 @@
* Matrix.cs : MonoTODO everywhere.
* TODOAttribute.cs : Add here too.
* TODOAttribute.cs : Add here too.
@@ -4,77 +4,22 @@
// Author:
// Dennis Hayes ([email protected])
//
// (C) 2002/3 Ximian, Inc
// (C) 2002 Ximian, Inc
//
using System;
namespace System.Drawing.Drawing2D
{
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;
}
/// <summary>
/// Summary description for ColorBlend.
/// </summary>
public class ColorBlend
{
public ColorBlend()
{
//
// TODO: Add constructor logic here
//
}
}
}
@@ -5,7 +5,7 @@
// Stefan Maierhofer <[email protected]>
// Dennis Hayes ([email protected])
//
// (C) 2002/3 Ximian, Inc
// (C) 2002 Ximian, Inc
//
using System;
@@ -17,9 +17,9 @@ namespace System.Drawing.Drawing2D {
{
Complement = 5,
Exclude = 4,
Intersect = 1,
Intersect =4,
Replace = 0,
Union = 2,
Xor = 3
Xor =3
}
}
@@ -5,7 +5,7 @@
// Stefan Maierhofer <[email protected]>
// Dennis Hayes ([email protected])
//
// (C) 2002/3 Ximian, Inc
// (C) 2002 Ximian, Inc
//
using System;
@@ -13,8 +13,9 @@ namespace System.Drawing.Drawing2D {
/// <summary>
/// Summary description for CompostingMode.
/// </summary>
public enum CompositingMode {
SourceCopy = 1,
SourceOver = 0
}
public enum CompositingMode {
SourceCopy,
SourceOver
}
}
@@ -1,11 +1,11 @@
//
// System.Drawing.Drawing2D.CompostingQuality.cs
// System.Drawing.CompostingQuality.cs
//
// Author:
// Stefan Maierhofer <[email protected]>
// Dennis Hayes ([email protected])
//
// (C) 2002/3 Ximian, Inc
// (C) 2002 Ximian, Inc
//
using System;
@@ -14,11 +14,11 @@ namespace System.Drawing.Drawing2D {
/// Summary description for CompostingQuality.
/// </summary>
public enum CompositingQuality {
AssumeLinear = 4,
Default = 0,
GammaCorrected = 3,
HighQuality = 2,
HighSpeed = 1,
Invalid = -1
AssumeLinear,
Default,
GammaCorrected,
HighQuality,
HighSpeed,
Invalid
}
}
@@ -5,7 +5,7 @@
// Stefan Maierhofer <[email protected]>
// Dennis Hayes ([email protected])
//
// (C) 2002/3 Ximian, Inc
// (C) 2002 Ximian, Inc
//
using System;
@@ -14,8 +14,8 @@ namespace System.Drawing.Drawing2D {
/// Summary description for CoordinateSpace.
/// </summary>
public enum CoordinateSpace {
Device = 2,
Page = 1,
World = 0
Device,
Page,
World
}
}
@@ -4,25 +4,22 @@
// Author:
// Dennis Hayes ([email protected])
//
// (C) 2002/3 Ximian, Inc
// (C) 2002 Ximian, Inc
//
using System;
namespace System.Drawing.Drawing2D {
namespace System.Drawing.Drawing2D
{
/// <summary>
/// Summary description for CustomLineCap.
/// </summary>
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) {
public class CustomLineCap
{
public CustomLineCap()
{
//
// TODO: Add constructor logic here
//
}
}
}
@@ -5,7 +5,7 @@
// Stefan Maierhofer <[email protected]>
// Dennis Hayes ([email protected])
//
// (C) 2002/3 Ximian, Inc
// (C) 2002 Ximian, Inc
//
using System;
@@ -4,7 +4,7 @@
// Author:
// Dennis Hayes ([email protected])
//
// (C) 2002/3 Ximian, Inc
// (C) 2002 Ximian, Inc
//
using System;
@@ -14,11 +14,11 @@ namespace System.Drawing.Drawing2D
/// Summary description for DashStyle.
/// </summary>
public enum DashStyle {
Custom = 5,
Dash = 1,
DashDot = 3,
DashDotDot = 4,
Dot = 2,
Solid = 0
Custom,
Dash,
DashDot,
DashDotDot,
Dot,
Solid
}
}
@@ -5,7 +5,7 @@
// Stefan Maierhofer <[email protected]>
// Dennis Hayes ([email protected])
//
// (C) 2002/3 Ximian, Inc
// (C) 2002 Ximian, Inc
//
using System;
@@ -15,7 +15,7 @@ namespace System.Drawing.Drawing2D {
/// Summary description for FillMode.
/// </summary>
public enum FillMode {
Alternate = 0,
Winding = 1
Alternate,
Winding
}
}
@@ -5,7 +5,7 @@
// Stefan Maierhofer <[email protected]>
// Dennis Hayes ([email protected])
//
// (C) 2002/3 Ximian, Inc
// (C) 2002 Ximian, Inc
//
using System;
@@ -14,7 +14,7 @@ namespace System.Drawing.Drawing2D {
/// Summary description for FlushIntention.
/// </summary>
public enum FlushIntention {
Flush = 0,
Sync = 1
Flush,
Sync
}
}
@@ -4,7 +4,7 @@
// Author:
// Dennis Hayes ([email protected])
//
// (C) 2002/3 Ximian, Inc
// (C) 2002 Ximian, Inc
//
using System;
@@ -17,6 +17,9 @@ namespace System.Drawing.Drawing2D
{
public GraphicsContainer()
{
//
// TODO: Add constructor logic here
//
}
}
}
@@ -4,7 +4,7 @@
// Author:
// Dennis Hayes ([email protected])
//
// (C) 2002/3 Ximian, Inc
// (C) 2002 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/3 Ximian, Inc
// (C) 2002 Ximian, Inc
//
using System;
@@ -17,6 +17,9 @@ namespace System.Drawing.Drawing2D
{
public GraphicsPathIterator()
{
//
// TODO: Add constructor logic here
//
}
}
}
@@ -4,7 +4,7 @@
// Author:
// Dennis Hayes ([email protected])
//
// (C) 2002/3 Ximian, Inc
// (C) 2002 Ximian, Inc
//
using System;
@@ -17,6 +17,9 @@ namespace System.Drawing.Drawing2D
{
public GraphicsState()
{
//
// TODO: Add constructor logic here
//
}
}
}
@@ -4,7 +4,7 @@
// Author:
// Dennis Hayes ([email protected])
//
// (C) 2002/3 Ximian, Inc
// (C) 2002 Ximian, Inc
//
using System;
@@ -17,6 +17,9 @@ 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/3 Ximian, Inc
// (C) 2002 Ximian, Inc
//
using System;
@@ -14,62 +14,62 @@ namespace System.Drawing.Drawing2D {
/// <summary>
/// Summary description for HatchStyle.
/// </summary>
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
}
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
}
}
@@ -5,7 +5,7 @@
// Stefan Maierhofer <[email protected]>
// Dennis Hayes ([email protected])
//
// (C) 2002/3 Ximian, Inc
// (C) 2002 Ximian, Inc
//
using System;
@@ -14,14 +14,14 @@ namespace System.Drawing.Drawing2D {
/// Summary description for InterpolationMode.
/// </summary>
public enum InterpolationMode {
Bicubic = 4,
Bilinear = 3,
Default = 0,
High = 2,
HighQualityBicubic = 7,
HighQualityBilinear = 6,
Invalid = -1,
Low = 1,
NearestNeighbour = 5
Bicubic,
Bilinear,
Default,
High,
HighQualityBicubic,
HighQualityBilinear,
Invalid,
Low,
NearestNeighbour
}
}
@@ -5,7 +5,7 @@
// Stefan Maierhofer <[email protected]>
// Dennis Hayes ([email protected])
//
// (C) 2002/3 Ximian, Inc
// (C) 2002 Ximian, Inc
//
using System;
@@ -14,16 +14,16 @@ namespace System.Drawing.Drawing2D {
/// Summary description for LineCap.
/// </summary>
public enum LineCap {
AnchorMask = 240,
ArrowAnchor = 20,
Custom = 255,
DiamondAnchor = 19,
Flat = 0,
NoAnchor = 16,
Round = 2,
RoundAnchor = 18,
Square = 1,
SquareAnchor = 17,
Triangle = 3
AnchorMask,
ArrowAnchor,
Custom,
DiamondAnchor,
Flat,
NoAnchor,
Round,
RoundAnchor,
Square,
SquareAnchor,
Triangle
}
}
@@ -5,7 +5,7 @@
// Stefan Maierhofer <[email protected]>
// Dennis Hayes ([email protected])
//
// (C) 2002/3 Ximian, Inc
// (C) 2002 Ximian, Inc
//
using System;
@@ -14,9 +14,9 @@ namespace System.Drawing.Drawing2D {
/// Summary description for LineJoin.
/// </summary>
public enum LineJoin {
Bevel = 1,
Miter = 0,
MiterClipped = 3,
Round = 2
Bevel,
Miter,
MiterClipped,
Round
}
}
@@ -4,11 +4,11 @@
// Author:
// Dennis Hayes ([email protected])
//
// (C) 2002/3 Ximian, Inc
// (C) 2002 Ximian, Inc
//
using System;
namespace System.Drawing2D
namespace System.Drawing.Drawing2D
{
/// <summary>
/// Summary description for LinearGradientBrush.
@@ -17,6 +17,9 @@ namespace System.Drawing2D
{
public LinearGradientBrush()
{
//
// TODO: Add constructor logic here
//
}
}
}
@@ -5,7 +5,7 @@
// Stefan Maierhofer <[email protected]>
// Dennis Hayes ([email protected])
//
// (C) 2002/3 Ximian, Inc
// (C) 2002 Ximian, Inc
//
using System;
@@ -14,9 +14,9 @@ namespace System.Drawing.Drawing2D {
/// Summary description for LinearGradientMode.
/// </summary>
public enum LinearGradientMode {
BackwardDiagonal = 3,
ForwardDiagonal = 2,
Horizontal = 0,
Vertical = 1
BackwardDiagonal,
ForwardDiagonal,
Horizontal,
Vertical
}
}
@@ -5,7 +5,7 @@
// Stefan Maierhofer <[email protected]>
// Dennis Hayes ([email protected])
//
// (C) 2002/3 Ximian, Inc
// (C) 2002 Ximian, Inc
//
using System;
@@ -14,7 +14,7 @@ namespace System.Drawing.Drawing2D {
/// Summary description for MatrixOrder.
/// </summary>
public enum MatrixOrder {
Append = 1,
Prepend = 0
Append,
Prepend
}
}
@@ -4,7 +4,7 @@
// Author:
// Dennis Hayes ([email protected])
//
// (C) 2002/3 Ximian, Inc
// (C) 2002 Ximian, Inc
//
using System;
@@ -17,6 +17,9 @@ namespace System.Drawing.Drawing2D
{
public PathData()
{
//
// TODO: Add constructor logic here
//
}
}
}
@@ -4,7 +4,7 @@
// Author:
// Dennis Hayes ([email protected])
//
// (C) 2002/3 Ximian, Inc
// (C) 2002 Ximian, Inc
//
using System;
@@ -17,6 +17,9 @@ 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/3 Ximian, Inc
// (C) 2002 Ximian, Inc
//
using System;
@@ -14,13 +14,13 @@ namespace System.Drawing.Drawing2D {
/// Summary description for PathPointType.
/// </summary>
public enum PathPointType {
Bezier = 3,
Bezier3 = 3,
CloseSubpath = 128,
DashMode = 16,
Line = 1,
PathMarker = 32,
PathTypeMask = 7,
Start = 0
Bezier,
Bezier3,
CloseSubpath,
DashMode,
Line,
PathMarker,
PathTypeMask,
Start
}
}
@@ -1,21 +1,21 @@
//
// 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
}
}
//
// 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
}
}
@@ -4,8 +4,9 @@
// Author:
// Dennis Hayes ([email protected])
//
// (C) 2002/3 Ximian, Inc
//using System;
// (C) 2002 Ximian, Inc
//
using System;
namespace System.Drawing.Drawing2D
{
@@ -13,10 +14,10 @@ namespace System.Drawing.Drawing2D
/// Summary description for PenType.
/// </summary>
public enum PenType {
HatchFill = 1,
LinearGradient = 4,
PathGradient = 3,
SolidColor = 0,
TextureFill = 2
HatchFill,
LinearGradient,
PathGradient,
SolidColor,
TextureFill
}
}
@@ -5,7 +5,7 @@
// Stefan Maierhofer <[email protected]>
// Dennis Hayes ([email protected])
//
// (C) 2002/3 Ximian, Inc
// (C) 2002 Ximian, Inc
//
using System;
@@ -14,12 +14,12 @@ namespace System.Drawing.Drawing2D {
/// Summary description for PixelOffsetMode.
/// </summary>
public enum PixelOffsetMode {
Default = 0,
Half = 4,
HighQuality = 2,
HighSpeed = 1,
Invalid = -1,
None = 3
Default,
Half,
HighQuality,
HighSpeed,
Invalid,
None
}
}
@@ -5,7 +5,7 @@
// Stefan Maierhofer <[email protected]>
// Dennis Hayes ([email protected])
//
// (C) 2002/3 Ximian, Inc
// (C) 2002 Ximian, Inc
//
using System;
@@ -14,9 +14,9 @@ namespace System.Drawing.Drawing2D {
/// Summary description for QualityMode.
/// </summary>
public enum QualityMode {
Default = 0,
Hight = 2,
Invalid = -1,
Low = 1
Default,
Hight,
Invalid,
Low
}
}
@@ -4,7 +4,7 @@
// Author:
// Dennis Hayes ([email protected])
//
// (C) 2002/3 Ximian, Inc
// (C) 2002 Ximian, Inc
//
using System;
@@ -17,6 +17,9 @@ 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/3 Ximian, Inc
// (C) 2002 Ximian, Inc
//
using System;
@@ -14,11 +14,11 @@ namespace System.Drawing.Drawing2D {
/// Summary description for SmoothingMode.
/// </summary>
public enum SmoothingMode {
AntiAlias = 4,
Default = 0,
HighQuality = 2,
HighSpeed = 1,
Invalid = -1,
None = 3
AntiAlias,
Default,
HighQuality,
HighSpeed,
Invalid,
None
}
}
@@ -1,5 +1,5 @@
//
// System.Drawing.WarpMode.cs
// System.Drawing.Drawing2D.WarpMode.cs
//
// Author:
// Stefan Maierhofer <[email protected]>
@@ -14,7 +14,7 @@ namespace System.Drawing.Drawing2D {
/// Summary description for WarpMode.
/// </summary>
public enum WarpMode {
Bilinear = 1,
Perspective = 0
Bilinear,
Perspective
}
}
@@ -5,7 +5,7 @@
// Stefan Maierhofer <[email protected]>
// Dennis Hayes ([email protected])
//
// (C) 2002/3 Ximian, Inc
// (C) 2002 Ximian, Inc
//
using System;
@@ -1,8 +1,3 @@
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,22 +34,5 @@ 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.
@@ -1,30 +0,0 @@
<?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.
@@ -1,71 +0,0 @@
//
// 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
@@ -1 +0,0 @@
./System.Management/ManagementNamedValueCollection.cs
-13
View File
@@ -1,13 +0,0 @@
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
Loaded 100 of 305 files, more files were not shown because too many files have changed in this diff. Show more