Compare commits

..
1 Commits
Author SHA1 Message Date
nobody c47f6de70e This commit was manufactured by cvs2svn to create tag 'MCS_0_10'.
svn path=/tags/MCS_0_10/mcs/; revision=3384
2002-03-27 02:06:09 +00:00
4256 changed files with 43256 additions and 417646 deletions

No files matched your search

-160
View File
@@ -1,163 +1,3 @@
2002-08-12 Dick Porter <[email protected]>
* mono.pc.in: Add $includedir to Cflags
Fri Jul 19 18:38:38 CEST 2002 Paolo Molaro <[email protected]>
* configure.in, Makefile.am, mono.pc.in: add a mono.pc file for use
with pkg-config.
* */Makefile.am: makefile overhaul to create a shared libmono library.
* */*.h: do not include config.h in headers that should be installed.
2002-07-12 Dick Porter <[email protected]>
* acconfig.h:
* configure.in: Check the size of sockaddr_un.sun_path
2002-06-23 Miguel de Icaza <[email protected]>
* man/Makefile.am (man_MANS): Added new man page
* man/mono-config.5: New manual page describing the mono-config
file format.
2002-06-10 Jaroslaw Kowalski <[email protected]>
* configure.in: added checks for MSG_NOSIGNAL
2002-05-30 Daniel Morgan <[email protected]>
* doc/ado-net: update the ado-net web page on go-mono.com
input parameters support, beginnings of Mono.Data.MySQL
and System.Data.OleDb, updated the sample source code,
and output from a PostgresTest
2002-05-21 Martin Baulig <[email protected]>
* mono.1: Documented the "--debug-args" debugging arguments.
2002-05-21 Martin Baulig <[email protected]>
* mono.1: Updated to reflect my latest changes and beautified this a bit.
(FIXME: There are still command line argument which aren't documented here.)
2002-05-19 Daniel Morgan <[email protected]>
* doc/ado-net: updated page to include C# code snippets using
System.Data. Update status: handle reading NULL values, DataSet/DataAdapter
works, executing/reading multiple results, and stored procedures.
And other tweaks about the providers.
2002-05-19 Martin Baulig <[email protected]>
* mono/Makefile.am (SUBDIRS): Added `os', it's referenced by
interpreter/Makefile.am.
Wed May 15 12:22:09 CEST 2002 Paolo Molaro <[email protected]>
* configure.in: search for pthread functions also in libc_r (patch
from Garrett Rooney <[email protected]>).
2002-05-11 Daniel Morgan <[email protected]>
* doc/ado-net: added instructions for installing PostgreSQL on Linux
and for using nant to re-compile just the System.Data.dll assembly
on Windows.
2002-05-10 Rodrigo Moya <[email protected]>
* doc/ado-net: added instructions for compiling System.Data.dll
(a subset of) on Linux.
2002-05-10 Daniel Morgan <[email protected]>
* doc/ado-net: added links
2002-05-09 Dick Porter <[email protected]>
* configure.in: Set CPPFLAGS not CFLAGS (bug 23767)
2002-05-05 Daniel Morgan <[email protected]>
* doc/ado-net: correct formatting
* doc/index: added credit i forgot to add
2002-05-05 Daniel Morgan <[email protected]>
* doc/ado-net: i did not format it correctly earlier, i
tried added various tags where appropriate.
* doc/index: added news item for May 5, 2002 - ado.net able
to retrieve data now
2002-05-05 Daniel Morgan <[email protected]>
* doc/ado-net: updated the current status which
I kept forgetting to do.
2002-05-05 Daniel Morgan <[email protected]>
* doc/ado-net: updated to includes an example for
running ipc-daemon as a Windows service. Thanks
to gonzalo.
2002-05-05 Daniel Morgan <[email protected]>
* doc/ado-net: updated to include installation of
PostgreSQL DBMS under cygwin. It is a TODO for Linux though.
Also included notes on running the System.Data/Test/PostgresTest.cs
that should work on a lot of Mono installations that have
PostgreSQL installed. If not please let me, rodrigo, or gonzalo
know.
2002-05-01 Rodrigo Moya <[email protected]>
* doc/ado-net: updated a little bit.
2002-04-30 Jeffrey Stedfast <[email protected]>
* configure.in: Added checks for timezone stuff.
2002-04-30 Dick Porter <[email protected]>
* acconfig.h:
* configure.in: Added option to disable using shared memory for
handles
2002-04-28 Gonzalo Paniagua Javier <[email protected]>
* configure.in: fix for conditional "THREADS_PTHREAD" was never
defined problem under cygwin with latest version of automake and
autoconf. Patch from Jeroen Janssen <[email protected]>.
2002-04-23 Gonzalo Paniagua Javier <[email protected]>
* configure.in: removed -Wshadow from CFLAGS.
2002-04-12 Rodrigo Moya <[email protected]>
* status/maintainers.xml: added danmorg and myself for System.Data.*
classes.
* status/class.xml: added System.Data.* classes.
2002-04-08 Dick Porter <[email protected]>
* configure.in: Set -mno-cygwin here rather than in the build script
2002-04-05 Dietmar Maurer <[email protected]>
* mono/tests/remoting2.cs: new test for async invoke of proxy calls
2002-03-29 Martin Baulig <[email protected]>
* doc/jit-debug, docs/jit-debug-sample, docs/jit-debug-sample2:
New files, added documentation for the debugging code.
* doc/web/commands: Added the debugging pages.
* docs/jit-debug: Removed, this is now on the web site.
2002-03-24 Martin Baulig <[email protected]>
* man/mcs.1: Documented the new --debug option and added a section
+1 -7
View File
@@ -1,9 +1,3 @@
AUTOMAKE_OPTIONS = foreign
SUBDIRS = mono doc docs runtime scripts man
EXTRA_DIST= mono.pc.in
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA= mono.pc
DISTCLEANFILES= mono.pc
SUBDIRS = mono doc runtime scripts man
-5
View File
@@ -1,6 +1,5 @@
#undef HAVE_INET_PTON
#undef HAVE_INET_ATON
#undef HAVE_MSG_NOSIGNAL
#undef HAVE_SOL_IP
#undef HAVE_SOL_TCP
#undef HAVE_IP_PKTINFO
@@ -14,7 +13,3 @@
#undef NAME_DEV_RANDOM
#undef HAVE_CRYPT_RNG
#undef HAVE_BOEHM_GC
#undef DISABLE_SHARED_HANDLES
#undef HAVE_TIMEZONE
#undef HAVE_TM_GMTOFF
#undef MONO_SIZEOF_SUNPATH
+27 -114
View File
@@ -2,26 +2,9 @@
AC_INIT(README)
AC_CANONICAL_SYSTEM
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(mono, 0.13)
AM_INIT_AUTOMAKE(mono, 0.10)
AM_MAINTAINER_MODE
dnl ****************************************
dnl *** Check if we're building on win32 ***
dnl ****************************************
AC_MSG_CHECKING([if building for some Win32 platform])
case "$host" in
*-*-mingw*|*-*-cygwin*)
platform_win32=yes
AC_DEFINE(PLATFORM_WIN32)
CC="gcc -mno-cygwin"
;;
*)
platform_win32=no
;;
esac
AC_MSG_RESULT($platform_win32)
AM_CONDITIONAL(PLATFORM_WIN32, test x$platform_win32 = xyes)
AC_CHECK_TOOL(CC, gcc, gcc)
AC_PROG_CC
AM_PROG_CC_STDC
@@ -47,16 +30,13 @@ AM_PROG_LIBTOOL
AC_CHECK_HEADERS(sys/filio.h sys/sockio.h netdb.h utime.h)
AC_CHECK_HEADERS(iconv.h)
AC_CHECK_HEADERS(giconv.h)
# for mono/metadata/debug-symfile.c
AC_CHECK_HEADERS(elf.h)
# not 64 bit clean in cross-compile
AC_CHECK_SIZEOF(void *, 4)
CFLAGS='-g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual -Wcast-align -Wwrite-strings'
CFLAGS='-g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations'
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
if test "x$PKG_CONFIG" = "xno"; then
@@ -99,7 +79,7 @@ AC_SUBST(GMODULE_CFLAGS)
AC_SUBST(GMODULE_LIBS)
AC_CHECK_LIB(gc, GC_malloc, found_boehm="yes")
gc=auto
gc=none
AC_ARG_WITH(gc, [ --with-gc=boehm,none],[gc=$with_gc])
case "x$gc" in
@@ -112,9 +92,6 @@ case "x$gc" in
AC_SUBST(HAVE_BOEHM_GC)
LIBS="$LIBS -lgc"
;;
xnone)
AC_MSG_WARN("Compiling mono without GC.")
;;
*)
dnl When the JIT works with libgc, use this chunk.
dnl # If libgc was found, use it. Otherwise just warn.
@@ -130,6 +107,22 @@ dnl AC_MSG_WARN("Compiling mono without GC.")
;;
esac
dnl ****************************************
dnl *** Check if we're building on win32 ***
dnl ****************************************
AC_MSG_CHECKING([if building for some Win32 platform])
case "$host" in
*-*-mingw*|*-*-cygwin*)
platform_win32=yes
AC_DEFINE(PLATFORM_WIN32)
;;
*)
platform_win32=no
;;
esac
AC_MSG_RESULT($platform_win32)
AM_CONDITIONAL(PLATFORM_WIN32, test x$platform_win32 = xyes)
if test x$platform_win32 = xno; then
dnl ******************************************************************
dnl *** Check for large file support ***
@@ -138,7 +131,7 @@ if test x$platform_win32 = xno; then
# Check that off_t can represent 2**63 - 1 correctly, working around
# potential compiler bugs. Defines LARGE_FILE_SUPPORT, adds $1 to
# CPPFLAGS and sets $large_offt to yes if the test succeeds
# CFLAGS and sets $large_offt to yes if the test succeeds
large_offt=no
AC_DEFUN(LARGE_FILES, [
large_CPPFLAGS=$CPPFLAGS
@@ -160,7 +153,7 @@ if test x$platform_win32 = xno; then
], [
AC_MSG_RESULT(ok)
AC_DEFINE(HAVE_LARGE_FILE_SUPPORT)
large_CPPFLAGS="$large_CPPFLAGS $1"
CFLAGS="$CFLAGS $1"
large_offt=yes
], [
AC_MSG_RESULT(no)
@@ -183,21 +176,6 @@ if test x$platform_win32 = xno; then
dnl *****************************
AC_CHECK_LIB(socket, socket, LIBS="$LIBS -lsocket")
dnl *******************************
dnl *** Checks for MSG_NOSIGNAL ***
dnl *******************************
AC_MSG_CHECKING(for MSG_NOSIGNAL)
AC_TRY_COMPILE([#include <sys/socket.h>], [
int f = MSG_NOSIGNAL;
], [
# Yes, we have it...
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_MSG_NOSIGNAL)
], [
# We'll have to use signals
AC_MSG_RESULT(no)
])
dnl *****************************
dnl *** Checks for SOL_IP ***
dnl *****************************
@@ -265,33 +243,10 @@ if test x$platform_win32 = xno; then
AC_CHECK_FUNCS(inet_pton inet_aton)
dnl ***********************************************
dnl *** Checks for size of sockaddr_un.sun_path ***
dnl ***********************************************
# AC_CHECK_SIZEOF can't cope with struct members :-(
AC_MSG_CHECKING(size of sockaddr_un.sun_path)
AC_CACHE_VAL(cv_mono_sizeof_sunpath,
[AC_TRY_RUN([
#include <stdio.h>
#include <sys/un.h>
int main(void) {
struct sockaddr_un sock_un;
FILE *f=fopen("conftestval", "w");
if(!f) exit(1);
fprintf(f, "%d\n", sizeof(sock_un.sun_path));
exit(0);
}
], cv_mono_sizeof_sunpath=`cat conftestval`,
cv_mono_sizeof_sunpath=0,
cv_mono_sizeof_sunpath=0)])dnl
AC_MSG_RESULT($cv_mono_sizeof_sunpath)
AC_DEFINE_UNQUOTED(MONO_SIZEOF_SUNPATH, $cv_mono_sizeof_sunpath)
dnl *****************************
dnl *** Checks for libpthread ***
dnl *****************************
AC_SEARCH_LIBS(pthread_create, pthread c_r, [
AC_SEARCH_LIBS(pthread_create, pthread, [
AM_CONDITIONAL(THREADS_PTHREAD, true)
AC_DEFINE(HAVE_PTHREAD)
@@ -330,7 +285,7 @@ if test x$platform_win32 = xno; then
])
])
CPPFLAGS=$orig_CPPFLAGS
CPPFLAGS="$CPPFLAGS $pthread_CFLAGS"
CFLAGS="$CFLAGS $pthread_CFLAGS"
# Need PTHREAD_MUTEX_RECURSIVE
pthread_CFLAGS=""
@@ -366,7 +321,7 @@ if test x$platform_win32 = xno; then
])
])
CPPFLAGS=$orig_CPPFLAGS
CPPFLAGS="$CPPFLAGS $pthread_CFLAGS"
CFLAGS="$CFLAGS $pthread_CFLAGS"
], [
AC_MSG_ERROR([libpthread is required on non-win32 hosts])
])
@@ -375,34 +330,7 @@ if test x$platform_win32 = xno; then
dnl *** Checks for semaphore lib ***
dnl ********************************
AC_CHECK_LIB(rt, sem_init, LIBS="$LIBS -lrt")
dnl ********************************
dnl *** Checks for timezone stuff **
dnl ********************************
AC_CACHE_CHECK(for timezone variable, ac_cv_var_timezone,
AC_TRY_COMPILE([
#include <time.h>
], [
timezone = 1;
], ac_cv_var_timezone=yes, ac_cv_var_timezone=no))
if test $ac_cv_var_timezone = yes; then
AC_DEFINE(HAVE_TIMEZONE)
else
AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff,
AC_TRY_COMPILE([
#include <time.h>
], [
struct tm tm;
tm.tm_gmtoff = 1;
], ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no))
if test $ac_cv_struct_tm_gmtoff = yes; then
AC_DEFINE(HAVE_TM_GMTOFF)
else
AC_ERROR(unable to find a way to determine timezone)
fi
fi
else
AM_CONDITIONAL(THREADS_PTHREAD, false)
# This is a kludge, we really ought to test for libws2_32, but
# I can't make AC_CHECK_LIB link (the symbols seem to be mangled
# with @num suffixes)
@@ -496,14 +424,6 @@ else
fi
fi
AC_MSG_CHECKING([if inter-process shared handles are requested])
AC_ARG_ENABLE(shared-handles, [ --disable-shared-handles disable inter-process shared handles], try_shared_handles=$enableval, try_shared_handles=yes)
AC_MSG_RESULT($try_shared_handles)
if test "x$try_shared_handles" != "xyes"; then
AC_DEFINE(DISABLE_SHARED_HANDLES)
AC_SUBST(DISABLE_SHARED_HANDLES)
fi
TARGET="unknown"
ACCESS_UNALIGNED="yes"
@@ -514,11 +434,11 @@ sparc*-*-*) TARGET=SPARC; arch_target=sparc; ACCESS_UNALIGNED="no";;
#alpha*-*-linux* | alpha*-*-osf*) TARGET=ALPHA; ACCESS_UNALIGNED="no";;
#m68k-*-linux*) TARGET=M68K;;
powerpc-*-linux* | powerpc-*-sysv*) TARGET=POWERPC; arch_target=ppc;;
arm-*-linux-* | armv4l-*-linux-*) TARGET=ARM; arch_target=arm; ACCESS_UNALIGNED="no";;
arm-*-linux-*) TARGET=ARM; arch_target=arm; ACCESS_UNALIGNED="no";;
esac
if test ${TARGET} = unknown; then
CPPFLAGS="$CPPFLAGS -DNO_PORT"
CFLAGS="$CFLAGS -DNO_PORT"
AC_MSG_WARN("mono has not been ported to $host: some things may not work.")
fi
@@ -537,37 +457,30 @@ AM_CONDITIONAL(ARM, test x$TARGET = xARM)
AC_SUBST(arch_target)
AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_OUTPUT([
Makefile
mono.pc
mono/Makefile
mono/utils/Makefile
mono/metadata/Makefile
mono/dis/Makefile
mono/cil/Makefile
mono/arch/Makefile
mono/os/Makefile
mono/os/win32/Makefile
mono/os/unix/Makefile
mono/arch/x86/Makefile
mono/arch/ppc/Makefile
mono/arch/sparc/Makefile
mono/arch/arm/Makefile
mono/interpreter/Makefile
mono/tests/Makefile
mono/benchmark/Makefile
mono/wrapper/Makefile
mono/monoburg/Makefile
mono/monograph/Makefile
mono/jit/Makefile
mono/io-layer/Makefile
mono/handles/Makefile
runtime/Makefile
scripts/Makefile
man/Makefile
doc/Makefile
docs/Makefile
])
echo "
+2 -2
View File
@@ -1,7 +1,7 @@
WEB_FILES= \
ado-net c-sharp class-library contact contributing documentation download \
c-sharp class-library contact contributing documentation download \
faq gcc-frontend ideas index passport rationale resources \
roadmap runtime status team testing thanks tools porting anoncvs monodoc-xml winforms
roadmap runtime status team testing thanks tools porting anoncvs monodoc-xml
OTHERS= pending resources-pending todo mono-build.sh mono-build-w32.sh
-796
View File
@@ -1,796 +0,0 @@
* ADO.NET
The coordinator for the ADO.NET implementation is <a
href="mailto:[email protected]">Rodrigo Moya</a>, with
the collaboration of <a href="mailto:[email protected]">Daniel
Morgan</a> and <a href="mailto:[email protected]">Tim Coleman</a>.
* Action plan
The current plan to implement ADO.NET is as follows:
<b>Step 1:</b> Initial <a href="http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemdatasqlclient.asp?frame=true">System.Data.SqlClient</a> Provider:
<ul>
* Initial implementation of System.Data.SqlClient is based on
the <a href="http://www.postgresql.org/idocs/">PostgreSQL C API</a> which is a
client API to the PostgreSQL DBMS. PostgreSQL was chosen so we could quickly
create and test the System.Data classes.
* Once the <a href="http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemdatasqlclient.asp?frame=true">System.Data.SqlClient</a>
code is functional and is usable by other people, we willl move it to
Mono.Data.PostgreSQL, and will convert the existing
System.Data.SqlClient to be just a wrapper around
Mono.Data.PostgreSQL.
</ul>
<b>Step 2:</b> <a href="http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemDataOleDb.asp?frame=true">System.Data.OleDb</a> Provider:
<ul>
* <p>On Unix systems: System.Data.OleDb will use the
<a href="http://www.gnome-db.org/">LibGDA</a>
engine.
<p>LibGDA is a data access engine like ADO/OLE-DB, but for Unix. The
GDA in libGDA stands for GNU/GNOME Data Access, but it does not require GNOME.
It only requires glib2 and libxml2. LibGDA is used by
libgnomedb, GNOME-DB, and gaSQL.
<p>There is work under way to get libgda working under
Windows using Cygwin by the GNOME-DB developers.
<p>LibGDA has providers for MySQL, PostgreSQL, XML, ODBC,
and MDB Tools (MS Access support).
* On Windows systems: System.Data.OleDb will use OLE-DB as
its engine. It may have the option of using libgda too.
</ul>
<b>Step 3:</b> <a href="http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemdatasqlclient.asp?frame=true">System.Data.SqlClient</a> Provider:
<ul>
* <p>System.Data.SqlClient will then become a managed
provider for Microsoft SQL Server, both on Windows and
Linux, to be compatible with applications written
for the Microsoft .NET Development Framework.
<p>Once Step 1 has been completed and the PostgreSQL
provider support has been moved to its own place at
System.Data.PostgreSQL, we will use
<a href="http://www.freetds.org/">FreeTDS</a> as the basis
for providing access to Microsoft SQL Server databases.
<P>FreeTDS is a C API for Unix and Windows that implements
the TDS (Tabular Data Stream) protocol used in accessing
Microsoft SQL Server and Sybase databases. A .NET Data Provider could be
created for Sybase databases as well, but this would be put in Mono.Data.Sybase.
</ul>
<b>Step 4:</b> <a href="http://msdn.microsoft.com/downloads/sample.asp?url=/MSDN-FILES/027/001/668/msdncompositedoc.xml&frame=true">System.Data.Odbc</a> Provider:
<ul>
* We will create a .NET Managaed Provider for ODBC
in System.Data.Odbc for those using ODBC.
On Unix and Windows, <a href="http://www.unixodbc.org/">unixODBC</a> mabye used.
iODBC is an alternative to using unixODBC.
<p>unixODBC works on Unix and Windows. Well, I have not actually
used it on Cygwin, but it does build and install without problems.
<p>unixODBC has providers for:
Oracle, Microsoft SQL Server and Sybase via FreeTDS,
MySQL, PostgreSQL, Informix, IBM DB2 (Universal Database),
Interbase, miniSQL (mSQL), AdabasD, Empress, YARD SQL, and others.
</ul>
<b>Step 5:</b> Other System.Data providers:
<ul>
* <p>The idea in Microsoft .NET System.Data is to have
a managed provider for each supported DBMS. System.Data.SqlClient
for Microsoft SQL Server.
System.Data.OracleClient for Oracle 8i and 9i.
<p>We will need to have Mono.Data.MySQL, Mono.Data.PostgreSQL,
Mono.Data.DB2, and Mono.Data.miniSQL. Others,
of course, are welcomed.
<p>System.Data has been designed so
non-database providers can be created too.
</ul>
* Current Status
<p>We are working on Steps 1, 2, and 5. We have only just begun on
steps 2 and 5 though. We still have tons and tons of stuff to do.
If you have any ideas, let us know.
<p>For Step 1, the PostgreSQL is starting to come together - it
still needs a lot of work.
<p>For Step 2, Rodrigo Moya has begun System.Data.OleDb which will use libgda
which is an OLE-DB/ADO data access for Unix. The C-Sharp bindings to libgda
currently work - meaning they can compile, run, and you can connect to a
PostgreSQL database via libgda via the C-Sharp bindings to libgda. He has also
added class stubs for System.Data.OleDb to cvs.
<p>For Step 3, we need someone to start the FreeTDS .NET Data Provider so
we can have data access to Microsoft SQL Server and Sybase databases, or either
add the support in libgda.
<p>For Step 4, we need someone to start the unixODBC .NET Data Provider, or add
the support in libgda.
<p>For Step 5, we have just begun creating a Mono.Data .NET Provider - a MySQL
.NET Provider that uses the MySQL C Client Library. This provider is
found in Mono.Data.MySql. We can currently connect and do a SQL INSERT and insert
a row into a MySQL database. However, it currently only works on Cygwin because
the MySQL client library libmySQL.dll is different
from the library on Linux libmysqlclient.dll. Another problem, mysql thread functions
do not load for some reason. Also, the provider only runs if you use "mint" (the Mono
runtime interpreter). It does not work on "mono" (the Mono Just-In-Time compiler).
The C# Bindings to MySQL are thanks to Brad Meril.
<p>We are able to do simple CREATE TABLE, DROP TABLE, UPDATE, INSERT, and
DELETE SQL commands using the ExecuteNonQuery method in SqlCommand.
<p>We can execute multiple queries and do a NextResult() in SqlDataReader()
to get the next result set.
<p>We are also able to do simple aggregate functions,
ie, count(), sum(), min(), and max()
in a simple SELECT SQL query using the ExecuteScalar() now.
<p>We are also able to retrieve data with a simple SELECT SQL query
using ExecuteReader() which returns a SqlDataReader. We are able to
use GetSchemaTable() to get the meta data about the table columns.
We are able to Read() to get each row from the result set.
<p>Here is a sample of code that is based on PostgresTest.cs and
TestSqlDataReader.cs tests:
<pre>
static void SelectData (IDbConnection cnc) {
IDbCommand selectCommand = cnc.CreateCommand();
IDataReader reader;
selectCommand.CommandType = CommandType.Text;
selectCommand.CommandText =
"select * from pg_user;" +
"select * from pg_tables;" +
"select * from pg_database";
reader = selectCommand.ExecuteReader ();
do {
// get the DataTable that holds
// the schema
DataTable dt = rdr.GetSchemaTable();
if(rdr.RecordsAffected != -1) {
// Results for
// SQL INSERT, UPDATE, DELETE Commands
// have RecordsAffected >= 0
Console.WriteLine("Result is from a SQL Command (INSERT,UPDATE,DELETE). Records Affected: " + rdr.RecordsAffected);
}
else if (dt == null)
Console.WriteLine("Result is from a SQL Command not (INSERT,UPDATE,DELETE). Records Affected: " + rdr.RecordsAffected);
else {
// Results for
// SQL not INSERT, UPDATE, nor DELETE
// have RecordsAffected = -1
Console.WriteLine("Result is from a SQL SELECT Query. Records Affected: " + rdr.RecordsAffected);
// Results for a SQL Command (CREATE TABLE, SET, etc)
// will have a null reference returned from GetSchemaTable()
//
// Results for a SQL SELECT Query
// will have a DataTable returned from GetSchemaTable()
results++;
Console.WriteLine("Result Set " + results + "...");
// number of columns in the table
Console.WriteLine(" Total Columns: " +
dt.Columns.Count);
// display the schema
foreach (DataRow schemaRow in dt.Rows) {
foreach (DataColumn schemaCol in dt.Columns)
Console.WriteLine(schemaCol.ColumnName +
" = " +
schemaRow[schemaCol]);
Console.WriteLine();
}
int nRows = 0;
string output, metadataValue, dataValue;
// Read and display the rows
Console.WriteLine("Gonna do a Read() now...");
while(rdr.Read()) {
Console.WriteLine(" Row " + nRows + ": ");
for(c = 0; c < rdr.FieldCount; c++) {
// column meta data
DataRow dr = dt.Rows[c];
metadataValue =
" Col " +
c + ": " +
dr["ColumnName"];
// column data
if(rdr.IsDBNull(c) == true)
dataValue = " is NULL";
else
dataValue =
": " +
rdr.GetValue(c);
// display column meta data and data
output = metadataValue + dataValue;
Console.WriteLine(output);
}
nRows++;
}
Console.WriteLine(" Total Rows: " +
nRows);
}
} while(rdr.NextResult());
Console.WriteLine("Total Result sets: " + results);
rdr.Close();
}
</pre>
<p>We are able to get
String data (char, character, text, varchar), Int16 (smallint),
Int32 (integer), Int64 (bigint), DateTime (time, date, timestamp),
Boolean (boolean), Single (float), and Double (double).
More data types will come later. Note, the types that do work still
need thorough testing.
<p>Rows that are returned which contain columns that are NULL are handled now.
The SqlDataReader method IsDBNull() needs to be called to determine
if a field IS NULL before trying to read data from that field.
<p>Calling PostgreSQL stored procedures works. It does not work perfectly. It may not
even work to specification - yet. If you want to test it yourself, look at
TestSqlDataReader.cs or PostgresTest.cs in
mcs/class/System.Data/Test.
<p>Below, I have some sample code you can
use to call a PostgreSQL stored procedure named "version". This stored
procedure returns a string containing the PostgreSQL server version. Notice
the CommandType is StoredProcedure and the method ExecuteScalar() is called.
<p>ExecuteScalar() is a lightweight method in class SqlCommand that only returns
one row and one column as one object - even if there is more than row or column.
<pre>
static string GetDatabaseServerVersion (SqlConnection cnc)
{
SqlCommand cmd = cnc.CreateCommand ();
string data;
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "version";
data = (string) cmd.ExecuteScalar ();
return data;
}
</pre>
<p>We have the beginnings of Parameters support PostgreSQL. Only
Input Parameters are currently supported. Output, Input/Output,
and Return parameters still need to be done.
<p>A lot of functionality in System.Data is missing, but the
infrastructure is starting to come together.
<p>A lot of Exceptions need to be thrown for various exceptions. However,
SqlException, SqlErrorCollection, and SqlError have been partially
implemented.
<p>Tim Coleman and Rodrigo Moya got the beginnings of the
SqlDataAdapter/DataSet/DataTable/DataRow to work. Currently,
the SqlDataAdapter can Fill() relational data into a DataTable in a DataSet.
See the test mcs/class/System.Data/Test/TestSqlDataAdapter.cs to see it in action.
Below, I show a snippets from the test:
<pre>
string connectionString;
string sqlQuery;
SqlDataAdapter adapter;
DataSet dataSet = null;
connectionString =
"host=localhost;" +
"dbname=test;" +
"user=postgres";
sqlQuery = "select * from pg_tables";
adapter = new SqlDataAdapter (sqlQuery,
connectionString);
dataSet = new DataSet ();
adapter.Fill (dataSet);
if (dataSet != null) {
foreach (DataRow row in dataSet.Tables["Table"].Rows)
Console.WriteLine("tablename: " + row["tablename"]);
}
</pre>
<p>We do need help on the DataSet/DataAdaptor/DataTable/DataRelation/XML
functionality so we can integrate with
the ASP.NET controls and Windows.Forms controls by allowing the controls to bind
to a data source. Gonzalo, Gaurav, Leen, Patrik, Duncan, and others are
working very hard on the ASP.NET support. If you want to help,
contact <a href="mailto:[email protected]">Gonzalo Paniagua Javier</a>
<P>Need to add XML support in System.Data. This involves working on
the classes: DataSet and XmlDataDocument and the ExecuteXmlReader() in SqlCommand.
<p>The System.Data.dll gets built with the rest of the class library.
To compile the System.Data.dll assembly separately, you need:
<b>On Unix</b>
<ul>
* update your mono sources. Be sure you have latest mcs.exe
and .dll's, since there have been many fixes needed for
compilation on Linux.
* compile System.Data.dll:
<pre>
cd mcs/class/System.Data<br>
mcs --target library -o System.Data.dll @list
</pre>
</ul>
<b>On Windows</b>
<ul>
* update your mono sources. Be sure you have latest mcs.exe
and .dll's. You can use the same method as Linux,
or you can use NAnt.
* To use NAnt:
<pre>
cd mcs/class/System.Data
../../nant/NAnt.exe
</pre>
This will automatically copy the System.Data.dll to Test.
If you need to do a clean for the System.Data.dll assembly,<br><br>
<pre>
cd mcs/class/System.Data
../../nant/NAnt.exe clean
</pre>
</ul>
* Testing
<p>In order to test System.Data.SqlClient, you will need to have
access to a remote PostgreSQL DBMS, or you will have to install
one locally. PostgreSQL is the DBMS used for the initial
implementation of System.Data.SqlClient.
<p>Why? Because it is open source, has a client
library that is easy to use, PostgreSQL is easy to install on
Unix and Windows (using the Cygwin install program), not difficult to setup after
installation, and it runs under: Linux,
Windows (via cygwin and ipc-daemon), Unix, and
others. This allowed us to create the
System.Data functionality in Mono much quicker.
<p>If you plan on using a remote PostgreSQL DBMS Server,
than you will need to have the PostgreSQL client software on your
local computer that includes libpq.so (pq.dll on Windows).
<p>The System.Data tests use this connection string to connect
to the PostgreSQL database named "test" at host "localhost" as
user "postgres".
<pre>
"host=localhost;dbname=test;user=postgres"
</pre>
<p>Installation instructions for PostgreSQL DBMS:
<b>On Unix</b>
<ul>
* Read the PostgreSQL Installation Instructions
at \usr\doc\postgresql-x.x.x\html\installation.html
* Depending on your Unix system,
PostgreSQL maybe already installed, a database user 'postgres' created,
a linux user 'postgres' created and initdb ran. Or maybe not.
<pre>
su
adduser postgres
mkdir /usr/local/pgsql/data
chown postgres /usr/local/pgsql/data
su - postgres
initdb -D /usr/local/pgsql/data
postmaster -i -D /usr/local/pgsql/data
createdb test
psql test
</pre>
* Make sure you have a database user named postgres. It is best to install
the PostgreSQL DBMS under linux user postgres. When you run the postmaster,
run it under the user postgres as well. If this was not done, then you
will need to create a user named postgres for the System.Data tests.
* If you already installed PostgeSQL and you do not have a database
user named postgres, then you can create user postgres using psql:
<pre>
psql test
create user postgres with password 'fun2db';
</pre>
* The postmaster must be run with -i option.
* In the /usr/local/pgsql/data/pg_hba.conf file, you need
to have the AUTH_TYPE set to md5. You can read more on this at
/usr/doc/postgresql-7.2.1/html/client-authentication.html
or wherever your
PostgreSQL html docs are located. See the 2nd line below,
host 127.0.0.1 has an AUTH_TYPE md5 in pg_hba.conf.
<pre>
# TYPE DATABASE IP_ADDRESS MASK AUTH_TYPE
local all trust
host all 127.0.0.1 255.255.255.255 md5
</pre>
* If you can not find your PostgreSQL documentation locally or you
did not install it, then you
can get it <a href="http://www.postgresql.org/idocs/">here</a>.
</ul>
<b>On Windows</b>
<ul>
* Use the <a href="http://www.cygwin.com/">Cygwin</a> installer to
install the PostgreSQL DBMS. It is
found in the database category.
* <p>Read the file postgres-x.x.README at /usr/doc/Cygwin and read
the requirements to install PostgreSQL. Those requirements
are included with cygwin except cygipc. A default installtion
of cygwin does not install everything you will need, so on the
safe side, just include everything when installing cygwin.
* <p>The -x.x in postgres-x.x is the version of your PostgreSQL DBMS.
* <p>Once Cygwin has installed the PostgreSQL DBMS on your computer,
read the file FAQ_MSWIN which is available
in /usr/doc/postgres-x.x
* <p>Important notes from this file are:
<ul>
<p><b>2.</b> - Install the latest <a href="http://www.neuro.gatech.edu/users/cwilson/cygutils/OBSOLETE/V1.1/cygipc/index.html">CygIPC</a> package.
<p>The cygipc package contains the ipc-daemon you will need
to run before you can
run the PostgreSQL DBMS Server daemon (postmaster) or run
initdb which initializes the PostgreSQL database.
<p><b>3.</b> The Cygwin bin directory has to be placed in
the path before the Windows program directories,
for example, C:\cygwin\bin
<p><b>My own note.</b> In the Windows control panel, I set
the environment variables PATH to my cygwin /usr/local/bin,
/usr/bin, and /bin. I also set my LD_LIBRARY_PATH to
/usr/local/lib and /usr/lib. For example:
<p>
<pre>
PATH=c:\cygwin\usr\local\bin;c:\cygwin\usr\bin;c:\cygwin\bin;
LD_LIBRARY_PATH=c:\cygwin\usr\local\lib;c:\cygwin\usr\lib;
</pre>
<p><b>4.</b> Start the ipc-daemon that came with the cygipc
package. There
are two ways to do this: run it from the command line as:
<p>
<pre>
ipc-daemon &
</pre>
<p>or you can set it up as a Windows service. See the
file cygrunsrv.README at /usr/doc/Cygwin on how to do this
for ipc-daemon and postmaster. Note the
troubleshooting section at the end of
the cygrunsrv.README file.
<p>To install ipc-daemon as a service,
you just have to run
<p>
<pre>
ipc-daemon --install-as-service' (--remove-as-service)
</pre>
<p>and then run
<pre>
net start ipc-daemon
</pre>
</ul>
<p>Read the installation.html file
at /usr/doc/postgresql-x.x/html/installation.html
<p>You will see in this file that you will need to
run the following commands:
<p>
<pre>
mkdir /usr/local/pgsql/data
initdb -D /usr/local/pgsql/data
postmaster -D /usr/local/pgsql/data
createdb test
psql test
</pre>
<p>When you need to connect to the database,
you will need ipc-daemon and postmaster running. Start ipc-daemon
before any of the command above. If you restart your computer, you
need to start ipc-daemon and postmaster either manually or as a
service.
<p>psql is a command-line PostgreSQL client tool to
enter and run SQL commands and queries.
<p>If there is no database user named postgres, create a user named
postgres with the following SQL command in the client tool psql:
<p>
<pre>
psql test
create user postgres with password 'fun2db';
</pre>
<p>The only reason I say this is so you can easily use the System.Data tests
without having to change the database, userid, etc.
</ul>
<p>In the path mcs/class/System.Data/Test
there is a PostgreSQL test program named
PostgreTest.cs. Thanks goes to Gonzalo for creating the original
PostgreSQL test.
<p>To use it to test System.Data, you
modify the file to your PostgreSQL database
connection requirements:
<p>
<ul>
<li><b>dbname</b> database, ie., test</li>
<li><b>host</b> hostname of the PostgreSQL DBMS Server to connect to, ie., localhost</li>
<li><b>user</b> username, ie., someuser</li>
<li><b>password</b> password, ie., mypass1234</li>
</ul>
<p>The connection string is in OLE-DB connection string format. Internally,
SqlConnection converts this to the PostgreSQL connection string format.
<p>
<pre>
OLE-DB: "host=localhost;dbname=test;user=joe;password=smoe"
PostgreSQL: "host=localhost dbname=test user=joe password=smoe"
</pre>
<p>
Note that OLE-DB includes the semicolons while PostgreSQL's connection
string does not.
<p>
To compile the PostgresTest.cs program, do:
<p>
<pre>
mcs PostgresTest.cs -r System.Data.dll
</pre>
<p>
To run using mint, do:
<p>
<pre>
mint PostgresTest.exe
</pre>
<p>
To run using mono, do:
<pre>
mono PostgresTest.exe
</pre>
<p>Below, I show how the output from PostgresTest. I have omitted a lot
of the meta data for the columns except two columns. The classes
used were from System.Data.SqlClient and were used to connect to a
PostgreSQL database and retrieve data.
<p>
<pre>
danmorg@DANPC ~/mono/mcs/class/System.Data/Test
$ mcs PostgresTest.cs -r System.Data.dll
danmorg@DANPC ~/mono/mcs/class/System.Data/Test
$ mono PostgresTest.exe
Postgres provider specific tests...
Drop table:
Error (don't worry about this one)SqlError:PGRES_FATAL_ERROR ERROR: table "mono
_postgres_test" does not exist
<Stack Trace>
Create table with all supported types:
OK
Insert values for all known types:
OK
Update values:
OK
Insert values for all known types:
OK
Aggregate: count(*)
Agg Result: 2
Aggregate: min(text_value)
Agg Result: This is a text
Aggregate: max(int4_value)
Agg Result: 1048000
Aggregate: sum(int4_value)
Agg Result: 1048003
Select values from the database:
Result is from a SELECT SQL Query. Records Affected: -1
Result Set 1...
Total Columns: 28
ColumnName = boolean_value
ColumnOrdinal = 1
ColumnSize = 1
NumericPrecision = 0
NumericScale = 0
IsUnique = False
IsKey =
BaseCatalogName =
BaseColumnName = boolean_value
BaseSchemaName =
BaseTableName =
DataType = System.Boolean
AllowDBNull = False
ProviderType = 16
IsAliased = False
IsExpression = False
IsIdentity = False
IsAutoIncrement = False
IsRowVersion = False
IsHidden = False
IsLong = False
IsReadOnly = False
...
ColumnName = null_timestamp_value
ColumnOrdinal = 28
ColumnSize = 8
NumericPrecision = 0
NumericScale = 0
IsUnique = False
IsKey =
BaseCatalogName =
BaseColumnName = null_timestamp_value
BaseSchemaName =
BaseTableName =
DataType = System.DateTime
AllowDBNull = False
ProviderType = 1184
IsAliased = False
IsExpression = False
IsIdentity = False
IsAutoIncrement = False
IsRowVersion = False
IsHidden = False
IsLong = False
IsReadOnly = False
Gonna do a Read() now...
Row 0:
Col 0: boolean_value: False
Col 1: int2_value: 5
Col 2: int4_value: 3
Col 3: bigint_value: 9
Col 4: float_value: 3.141590
Col 5: double_value: 3.14159
Col 6: numeric_value: 123456789012.345
Col 7: char_value: Mono.Data!
Col 8: varchar_value: It was not me!
Col 9: text_value: We got data!
Col 10: point_value: (1,0)
Col 11: time_value: 01/01/1 21:13:14
Col 12: date_value: 02/29/2000 00:00:00
Col 13: timestamp_value: 02/29/2004 14:00:11
Col 14: null_boolean_value is NULL
Col 15: null_int2_value is NULL
Col 16: null_int4_value is NULL
Col 17: null_bigint_value is NULL
Col 18: null_float_value is NULL
Col 19: null_double_value is NULL
Col 20: null_numeric_value is NULL
Col 21: null_char_value is NULL
Col 22: null_varchar_value is NULL
Col 23: null_text_value is NULL
Col 24: null_point_value is NULL
Col 25: null_time_value is NULL
Col 26: null_date_value is NULL
Col 27: null_timestamp_value is NULL
Row 1:
Col 0: boolean_value: True
Col 1: int2_value: -22
Col 2: int4_value: 1048000
Col 3: bigint_value: 123456789012345
Col 4: float_value: 3.141590
Col 5: double_value: 3.14159
Col 6: numeric_value: 123456789012.345
Col 7: char_value: This is a char
Col 8: varchar_value: This is a varchar
Col 9: text_value: This is a text
Col 10: point_value: (1,0)
Col 11: time_value: 01/01/1 21:13:14
Col 12: date_value: 02/29/2000 00:00:00
Col 13: timestamp_value: 02/29/2004 14:00:11
Col 14: null_boolean_value is NULL
Col 15: null_int2_value is NULL
Col 16: null_int4_value is NULL
Col 17: null_bigint_value is NULL
Col 18: null_float_value is NULL
Col 19: null_double_value is NULL
Col 20: null_numeric_value is NULL
Col 21: null_char_value is NULL
Col 22: null_varchar_value is NULL
Col 23: null_text_value is NULL
Col 24: null_point_value is NULL
Col 25: null_time_value is NULL
Col 26: null_date_value is NULL
Col 27: null_timestamp_value is NULL
Total Rows Retrieved: 2
Total Result sets: 1
Call ExecuteReader with a SQL Command. (Not INSERT,UPDATE,DELETE
).
Result is from a SQL Command not (INSERT,UPDATE,DELETE). Records Affected: -1
Total Result sets: 0
Call ExecuteReader with a SQL Command. (Is INSERT,UPDATE,DELETE)
.
Result is from a SQL Command (INSERT,UPDATE,DELETE). Records Affected: 1
Total Result sets: 0
Calling stored procedure version()
Result: PostgreSQL 7.2.1 on i686-pc-cygwin, compiled by GCC 2.95.3-5
Database Server Version: PostgreSQL 7.2.1 on i686-pc-cygwin, compiled by GCC 2.9
5.3-5
Clean up...
Drop table...
OK
RESULT: 0
</pre>
-122
View File
@@ -1,122 +0,0 @@
* ASP.NET
ASP.NET support is divided in two pieces:
<ul>
* Web Forms (Web Applications infrastructure).
* Web Services (the SOAP-based rpc system).
</ul>
There is work underway for both systems. The Web Forms
support is more advanced at this point, and various ".aspx"
programs can be run using the Mono runtime and the XSP page
parser.
Tim started work on the Web Services early this week.
Although we have a SoapFormatter as part of the remoting
infrastructure already (contributed by Jesus), most people
will be using the ASP.NET Web-services support. Work for the
supporting class libraries just started recently.
* Web Forms: The pieces
There are a couple of components to the puzzle:
<ul>
* .aspx page parser (converts .aspx to C# code).
* System.Web.HttpRuntime support.
* Web controls (System.Web.UI.HtmlControls and
System.Web.UI.WebControls).
* Underlying infrastructure for the controls (System.Web.UI).
* HttpRuntime.ProcessRequest is the core of the ASP.NET
implementation.
</ul>
Gonzalo has been working on an ASP.NET parser that takes .aspx
files and generated the code required to run them (the code lives in
module `xsp' along with a little web server for testing).
Most of the runtime support was mostly written by Patrik Torstensson
(now at Intel). This was interesting, because in order to implement
some of its features, Patrik had to go into the runtime/JIT engine and
he spent a few weeks doing work there.
The classes for running ASP.NET are being actively written.
Gaurav, Leen and Patrik worked in the core of the classes
required to run ASP.NET web application as well as a small
embeddable web server.
Duncan got our System.Web assembly to compile.
** HttpRuntime
Patrik has authored most of the HttpRuntime support (both on
the System.Web and on the foundation) but it is still not
ready to run.
** XSP
Currently XSP provides the .aspx compiler to C#. It would be
interesting to see if it makes sense to extend the ASP.NET
syntax to make it simpler to develop applications.
Gonzalo is in charge of the compiler.
** Controls
A lot of work has been put in the various classes that
implement the controls (UI.HtmlControls and UI.WebControls),
but they have been coded mostly in the dark, and without being
able to test them in real life: Gaurav and Leen worked very
hard on this namespace, but needs to be finished.
We can now render all HtmlControls and some WebControls. Work is
ongoing to make all WebControls render HTML.
** Extending ASP.NET
Currently you have to reference in your ASP.NET the control
and all of its properties, which works fine if you have a GUI
designer, but is harder for people used to develop using text
editors.
Since we have a parser, we could extend this parser to allow
people to still use ASP.NET controls, using a simpler syntax.
For example people doing blogs and editing their templates
over the web probably do not want to use direct ASP.NET but a
wrapper around it.
** Roadmap
1. The Parser.
2. Get the parser to generate output compatible with ASP.NET.
3. Run the sample output with the real Microsoft runtime
but using our generated page.
4. Run the sample with our classes with the .NET runtime.
<b>We are here</b>.
5. Finish HttpRuntime.
6. Running our sample code with our classes with our runtime.
** How to Help
Currently we are testing and fixing HtmlControls, WebControls and
validators.
In the CVS module XSP you can find the aspx to C# page parser,
a little web server used for testing and a directory containing
sample aspx pages.
You have some documentation under doc directory and in the README
file of each directory. They explain how to test our System.Web.
Testing is really easy!
-5
View File
@@ -2,11 +2,6 @@
A Programmer's Introduction to C# - Second Edition: Eric Gunnerson
* Remoting
<a href="http://www.dotnetremoting.cc/book/AdvancedDotNetRemoting.asp">
Advanced .NET Remoting: Ingo Rammer</a>
* Compiler Implementation
Compilers - Principles, Techniques, and Tools: Alfred V. Aho, Ravi Sethi,
-3
View File
@@ -11,9 +11,6 @@
for the first time on December 28 2001. MCS became self hosting
on January 3rd, 2002.
The Mono Runtime and the Mono execution engine were able to make
our compiler self hosting on March 12, 2002.
A test suite is maintained to track the progress of
the compiler and various programs are routinely compiled and
ran.
+5
View File
@@ -2,6 +2,11 @@
** Summary
<em>
[This documentation is in progress. Comments to
<a href="mailto:[email protected]">[email protected]</a>.]
</em>
While using inline XML tags to document classes is certainly
convenient, properly verbose documentation quickly overwhelms
the code, making the source quite difficult to read. Furthermore,
+1 -7
View File
@@ -20,11 +20,6 @@
You can see what needs to be done in the class libraries <a href="class-status.html">here</a>
* IRC Channel
Many developers get together on the <b>#mono</b> irc channel
on the <b>irc.gnome.org</b> server.
** To start contributing
As a programmer, you can contribute in three different scenarios to Mono:
@@ -66,8 +61,7 @@
world that only has a test suite.
To get started writing tests see the <a href="testing.html">Test Suite</a>
section. <a href="mono-contribution-howto.html">Here</a> there is a good All-In-One introduction to the art of writing tests.
section.
*** Contributing to the runtime engine
+1 -28
View File
@@ -32,31 +32,4 @@
** Class Library documentation
We are moving to a new setup for documenting the class libraries,
and you can read about it <a href="classlib-doc.html">here</a>.
A few words of warning and advice for class documentors:
A well-documented API can ease hours of frustration; as Mono
matures, robust and complete class library documentation will
become increasingly important. As you write API documentation,
whether it is embedded in source files or in external Monodoc XML,
please keep the following in mind:
Plagarism, even if it's unintentional, is a Bad Thing(TM).
Microsoft's .NET Framework Class Library documentation is an
excellent resource for understanding the behavior and properties of
a type, and a lot of hard work went in to creating this (copyrighted)
resource. Please don't copy from Microsoft's reference when
documenting a type.
To avoid this, I (<a href="mailto:[email protected]">[email protected]</a>)
suggest that you read the complete Microsoft documentation for a type,
ponder it for a while, and write the Mono documentation in your own
words. While it's certainly okay to refer to the Microsoft
documentation to clarify your understanding of behavior or properties,
please don't open the Microsoft docs and refer to them for each member
you document.
There's a lot of domain expertise among the class library contributors;
let's put the same personal stamp on the class library documentation
that we have on the class libraries themselves.
you can read about it <a href="classlib-doc.html">here</a>
+13 -62
View File
@@ -13,7 +13,7 @@
In order to make mcs and the class libraries you will need a computer
running Windows with the <strong>GNU make tools</strong> from the
<strong>Cygwin</strong> environment, <strong>Microsoft's .NET Framework
SDK</strong>, <strong>GLIB 2.0</strong> and
SDK</strong>, <strong>GLIB 1.3</strong> and
<strong>pkg-config</strong>.
When installing Cygwin, don't forget to include
@@ -27,34 +27,23 @@
Stay up to date on the Mono team's development using the
<a href="http://lists.ximian.com/mailman/listinfo/mono-cvs-list">
mono-cvs-list</a> mailing list. The CVS source code can also
be browsed <a href="http://cvs.hispalinux.es/cgi-bin/cvsweb/?cvsroot=Mono#dirlist">here</a>
be browsed <a href="http://cvs.hispalinux.es/cgi-bin/cvsweb/mcs/mcs/cfold.cs?cvsroot=Mono">here</a>
<a name="jun-7">
<b>Mono 0.13</b>
<a name="feb-22">
<b>Mono 0.9</b>
New packaged versions of the Mono C# compiler and Mono runtime
are now available. The latest version is 0.13.
are now available. The latest version is 0.9.
<ul>
* <a href="archive/mono-0.13">Mono 0.13 release notes</a>
* <a href="archive/mono-0.9">Mono 0.9 release notes</a>
* <a href="archive/mcs-0.13.tar.gz">mcs-0.13.tar.gz</a>
Mono C# compiler with class library source code.
* <a href="archive/mono-0.13.tar.gz">mono-0.13.tar.gz</a>
Mono runtime.
* <a href="archive/mcs-0.9.tar.gz">mcs-0.9.tar.gz</a>
Mono C# compiler
* <a href="archive/mono-0.9.tar.gz">mono-0.9.tar.gz</a>
Mono runtime
</ul>
* Snapshots
Volunteers package up daily the sources:
<ul>
* <a href="http://www.atoker.com/mono">Debian Linux</a>
* <a href="http://mono.baselabs.org/index.php/software">Red Hat Linux</a>
* <a href="http://www.superin.formativ.net/mono/mono.htm">Windows</a> (works without cygwin!)
</ul>
<a name="snapshots">
For up to date sources, it is recommended that you use the Mono
source code from either the
@@ -100,11 +89,6 @@
set your CVSROOT environment variable before running the script to
select a particular cvs server.
** Mono Regression Test Suite
You can get binaries for the Mono Regression Test Suite <a
href="archive/mono-tests.tar.gz">here</a>
<a name="install">
** Building the software manually
@@ -262,42 +246,9 @@ make install</strong>
<a name="oldreleases">
*** Old releases.
*** Very old releases.
<ul>
<ul>
<a name="apr-24">
<b>Mono 0.11; April 24, 2002</b>
* <a href="archive/mono-0.11">Mono 0.11 release notes</a>
* <a href="archive/mcs-0.11.tar.gz">mcs-0.11.tar.gz</a>
Mono C# compiler
* <a href="archive/mono-0.11.tar.gz">mono-0.11.tar.gz</a>
Mono runtime
</ul>
<ul>
<a name="mar-27">
<b>Mono 0.10; March 27, 2002</b>
* <a href="archive/mono-0.10">Mono 0.10 release notes</a>
* <a href="archive/mcs-0.10.tar.gz">mcs-0.10.tar.gz</a>
Mono C# compiler
* <a href="archive/mono-0.10.tar.gz">mono-0.10.tar.gz</a>
Mono runtime
</ul>
<ul>
<a name="feb-22">
<b>Mono 0.9; February 22, 2002</b>
* <a href="archive/mono-0.9">Mono 0.9 release notes</a>
* <a href="archive/mcs-0.9.tar.gz">mcs-0.9.tar.gz</a>
Mono C# compiler
* <a href="archive/mono-0.9.tar.gz">mono-0.9.tar.gz</a>
Mono runtime
</ul>
<ul>
<a name="feb-11">
<b>February 11, 2002</b>
* <a href="archive/mcs-0.8.tar.gz">mcs-0.8.tar.gz</a>
+27 -518
View File
@@ -2,12 +2,9 @@
<a href="#ximian">The Ximian Role in the Mono project</a><br>
<a href="#gnome">Mono and GNOME</a><br>
<a href="#gui">Building GUI applications with Mono</a><br>
<a href="#winforms">Mono and WinForms</a><br>
<a href="#msft">Mono and Microsoft</a><br>
<a href="#pnpproject">Mono and the Portable.NET Project</a><br>
<a href="#webservices">Web Services</a><br>
<a href="#asp">Mono and ASP.NET</a><br>
<a href="#ado">Mono and ADO.NET</a><br>
<a href="#devel">Development Tools and Issues</a><br>
<a href="#java">Mono and Java</a><br>
<a href="#extending">Extending Mono</a><br>
@@ -19,9 +16,6 @@
<a href="#patents">Patents</a><br>
<a href="#etc">Miscellaneous Questions</a><br>
A <a
href="http://www.es.gnome.org/documentacion/articulos/MONO-PUF/MONO-PUF/">spanish
translation</a> is also available
<a name="basics"></a>
** Basics
@@ -29,9 +23,9 @@ translation</a> is also available
Q: What is Mono exactly?
A: The Mono Project is an open development initiative sponsored by
Ximian that is working to develop an open source, Unix
Ximian that is working to develop an open source, Linux-based
version of the Microsoft .NET development platform. Its objective
is to enable Unix developers to build and
is to enable Linux developers to build and
deploy cross-platform .NET Applications. The project will
implement various technologies developed by Microsoft that have now
been submitted to the ECMA for standardization.
@@ -67,7 +61,7 @@ A: Mono contains a number of components useful for building new
Windows has compilers that target the virtual machine from <a
href="http://msdn.microsoft.com/net/thirdparty/default.asp#lang">a
number of languages:</a> Managed C++, Java Script, Eiffel,
Component Pascal, APL, Cobol, Perl, Python, Scheme,
Component Pascal, APL, Cobol, Oberon, Perl, Python, Scheme,
Smalltalk, Standard ML, Haskell, Mercury and Oberon.
The CLR and the Common Type System (CTS) enables applications and
@@ -109,26 +103,19 @@ Q: Is Mono usable?
A: The JIT engine is usable on Intel x86 machines. An interpreter
can be used on other non-Intel x86 machines.
The class libraries are mature enough to run some real applications
(the compiler for instance, and every day more and more applications
are natively developed with Mono).
The class libraries are not yet mature enough to run real applications,
but if you are interested in trying out Mono, you can definetly start
testing things out as many programs run.
The C# compiler has made significant progress, it can even compile
itself now, but it can not yet be ran with our class libraries as
they are missing some features.
Q: When will you ship it?
A: Different parts of Mono will achieve usability at different stages,
once we are comfortable with the compiler, we will release "Mono Core",
which contains everything needed to develop applications with the base
class libraries. This should be available at some point during 2002.
Other higher level class libraries (ASP.NET, ADO.NET) will
be released when they become stable.
Q: What major components will you include in Mono?
A: Hopefully everything that Microsoft ships on their Framework
(ADO.NET, ASP.NET), and
we encourage third party developers to create reusable components that
work on both Mono and Windows.
A: It is premature to target a shipdate for the code, but we
anticipate that it will be available some time in the middle of
2002.
Q: How can I contribute?
@@ -145,10 +132,6 @@ A: We are interested in providing the best tools for programmers to
Project white paper</a>.
the project.
Q: Miguel said once that Mono was being implemented in COBOL. Is that true?.
A: No. It was a joke.
<a name="ximian"></a>
@@ -182,13 +165,6 @@ Q: Will Ximian offer Mono commercially?
A: When Mono is ready to be shipped Ximian will offer a commercial
support and services for Mono.
Q: Does Ximian provide consulting services around Mono?
A: Yes, Ximian does provide consulting services around Mono to
make it suitable to your needs. Porting the runtime engine,
customizing it, working on specific classes or tuning the code
for your particular needs.
Q: Will you wait until Mono is finished?
A: Mono will ship on various stages as they mature. Some people
@@ -243,22 +219,13 @@ Q: But will I be able to build GNOME applications?
A: Yes, we will enable people to write GNOME applications using Mono.
Q: Do you have C# bindings for GNOME?.
A: Yes, we currently bind libgnome, libgnomecanvas, and libgnomeui --
although I dare say I have no idea how functional the bindings are
outside of what I tested in the sample app. I imagine other libraries
under the GNOME framework will be added on an as-needed (and as-requested)
basis...although a truly good bonobo binding will have to wait on the CORBA
remoting support which has been started recently.
<a name="gui"></a>
** GUI applications
Q: Will Mono enable GUI applications to be authored?
A: Yes, you will be able to build GUI applications. Indeed, that is our
main focus. We will provide both the Windows.Forms API and the Gtk# API.
main focus. We will provide both the Windows.Forms API and the Gtk# AP(I.
Q: What is the difference between Gtk# and System.Windows.Forms?
@@ -272,75 +239,6 @@ A: As long as your applications are 100% .NET and do not make use
of P/Invoke to call Win32 functions, your smart client applications
will run on Mono platforms.
Q: Where can I learn mora about Gtk#?
A: The following <a href="http://gtk-sharp.sourceforge.net>link</a> sends you to the page of the project.
Q: What can I do with Gtk#?.
A: Gtk# is becoming very usable and you can create applications and
applets like those you see in a GNOME desktop environment. It's
easy to install so it's worth a try.
Q: How can I compile my HelloWorld.cs which uses Gtk#?.
A: Try: mcs --unsafe -o HelloWorld.exe -r glib-sharp -r pango-sharp -r
atk-sharp -r gdk-sharp -r gtk-sharp -r gdk-imaging-sharp
HelloWorld.cs
Q: Is there any way how to connect DataAdapter to some GTK# controls?
A: There is a sample file called `DbClient' in gtk-sharp/samples that you
might to look at. It is a sample program in Gtk# that adds/updates/deletes
information on a Postgress database. When we have the new table/tree widgets,
I am sure someone would write an adapter for System.Data (in Gtk2 the
tree/list widgets are written using a view/model, so you only need to write
a model that maps to the database). You can have a look at
gtk-sharp/sample/DbClient, where there is a GTK# application that uses
System.Data. It does not use DataAdapter, but DataReader though.
<a name="winforms"></a>
** Mono and WinForms
Q: Can you tell me why aren't you implementing WinForms?.
A: (This is based in an original mail to mono-list written by Miguel de
Icaza. You should read it for completion, but the core part is here).
First, Windows.Forms is packed with quirks and is not that great of a
toolkit in the first place. Up to the point of the unconfirmed rumor
that Microsoft is working on a replacement for it.
Once the runtime is done, we will very likely start contributing to
the Gtk# project ourselves, and we will likely start doing feasibility
work on getting Mono used by Gnome developers: full gnome apps and
extending existing applications.
Those interested in hacking on Windows.Forms are welcome to do so,
but Ximian will not likely look at it in the near future; if there is
enough demand, or I can be convinced that Windows.Forms is useful for
something Ximian might re-evaluate our resource allocation for this
task.
By doing native ports, we could use the same API on all those systems.
Also, Gtk is mature enough, we know this because we have built an entire
desktop (and all sorts of very window system-specific hacks), and we
have built a bunch of productivity applications with it.
Q: What about VCL?.
Someone mentioned VCL. The only problem with the VCL is that it can
only be used for GPL applications (or I guess you could license it from
Borland for your app), and would have to be ported from Delphi to C#
(or someone would have to write a CIL compiler for it).
Q: What about doing something like the eclipse project (www.eclipse.org)?
A: The Eclipse toolkit is not a general purpose toolkit.  It will require a
lot of work before it is such a thing.  It is a toolkit used to
implement a development environment.
<a name="msft"></a>
** Mono and Microsoft
@@ -438,25 +336,6 @@ A: No, it will not. Microsoft Office is a Windows application. To
learn more about running Windows applications on Intel Unix systems
refer to <a href="http://www.winehq.com">the Wine Project</a>.
Q: Will I be able to compile a Microsoft VB.NET application and execute
the resultant MSIL file under MONO on Linux without converting to C#
and recompiling?
A: Once we have a complete VisualBasic runtime, yes.
Q: Can mono run the WebMatrix ?
A: No. That requires winforms (we don't have).
Q: Does mono have something like Passport ? (ie PassportIdentity class,somewhere
in System.Web ?) . Will mono have a server side Passport/Similar framework
for XSP as well as client classes ?
A: Not yet, but the client side API for authentication is not the problem.
We will likely have a lot of other authentication APIs, like the Liberty
Aliance APIs. The problem is people on the web provider end that might use
this for authentication.
<a name="pnpproject"></a>
** Mono and Portable.NET
@@ -464,48 +343,8 @@ Q: What are the differences between Mono and Portable.NET?
A: Most of Mono is being written using C#, with only
a few parts written in C (The JIT engine, the runtime, the
interfaces to the garbage collection system).
It is easier to describe what is unique about Mono:
<ul>
<li> A self-hosting C# compiler written in C#, which is clean, easy
to maintain.
<li> A multi-platform runtime engine: both a JIT engine and an
interpreter exist. The JIT engine runs currently on x86
systems, while the interpreter works on Sparc, StrongARM and
PowerPC systems.
<li> Supports Linux, Windows and Solaris at this point.
<li> The JIT engine is written using a portable instruction
selector which not only generates good code (we are told
that we are faster than Rotor, but it is hard to tell) but
is also the foundation to retarget the JIT engine to other
systems.
The system employed is described in various compiler
books and it is very similar to what is described in the
book that covers LCC, the Ansi C retargetable C compiler.
<li> The JIT engine supports inlining, constant folding and propagation,
<li> Full support for remoting in the runtime, but the class
libraries are still behind.
<li> The C# compiler, the JIT engine and the class libraries are
mature enough that the whole system is self-hosting, ie, that
it can be fully developed with itself at this point.
<li> We are not yet done, and there is a lot of work left to be
done
<li> We have a great community of developers, without which Mono
would not be possible.
<li> We will provide an ahead of time compilation mode in the
future.
</ul>
interfaces to the garbage collection system). The Portable.NET
Project is using C for development.
<a name="webservices"></a>
** Web Services
@@ -554,10 +393,6 @@ Q: Can I serialize my objects to other things other than XML?
A: Yes, although the serializing tools have not yet been planned, and
you would probably have to implement them yourself.
Q: Will Mono use ORBit?
A: No. Mono will be using a new implementation of CORBA that isn't still started.
<a name="devel"></a>
** Development Tools and Issues
@@ -596,172 +431,6 @@ A: The CIL is better suited to be JITed than JVM byte codes, but you
can interpret them as trivially as you can interpret JVM byte
codes.
Q: Isn't it a little bit confusing to have the name of "XSP" (the same
as in the Apache Project) for the ASP.NET support in Mono?.
A: In Mono, xsp is just the name of the C# code generator for ASP.NET
pages. In the Apache Project, it is a term for the "eXtensible Server
Pages" technology so as they are very different things, they don't
conflict.
Q: What about using something like Jabber instead of the System.Messaging
namespace?.
A: In short, MSMQ is not something like Jabber, but asynchronous messaging
through queues. Usefull queues do more than serialize messages, they are
also platform bridges.
Q: Are you supporting XMLDocument and relatives?.
A: Currently, we aren't implementing them yet. It would require updates to
most of the XmlNode derivatives so it's not a trivial task. We are
currently focusing on getting XPath support working.
Q: Is there any plan to develop an aspx server for Mono?.
A: The webserver turned out to be very simple compared to the rest of the
work. Gonzalo has got the page generator mostly done (a module called
xsp, who has nothing to do with the XSP term used in the Apache Project).
Patrik has done a lot of the work to get the ProcessRequest to work.
You can try to help in the final touches to the System.Web classes and
writing regression tests for the widgets we have.
Q: Is there any way I can develop the class libraries using linux yet?
A: Yes. Some class libraries can be developed on Linux. Search for
Paolo's post (he lists which classes can be compiled fine now).
Q: Is there any way I can install a known working copy of mono in /usr,
and an experimental copy somewhere else, and have both copies use
their own libraries? (I'm still not very good at library paths in
linux)
A: Yes. Just use two installation prefixes.
Q: How should I write tests or a tests suite?
A: If you do a test suite for C#, you might want to keep it
independent of the Mono C# compiler, so that other compiler
implementations can later use it.
Q: Is the current stage the implementation of mono_create_trampoline
function? Hence the sparc-codegen.h is reasonably complete? Is
mono/arch/x86/* the best reference material for this stuff?
A: sparc-codegen.h is basically complete. We may want to add some
convenience macros along the way, but it has all the stuff you need.
And yes, or, the ppc/ dir, since the ppc call convention is more similar
to the sparc one than the x86 one. The current issues with the sparc
code are. roughly:
1) it needs to handle overflowing the out registers (the additional
arguments need to be put on the stack)
2) it needs to flush the icache where the generated code is stored
3) it needs to implement mono_create_method_pointer to get delegates
working
4) it needs a couple of updates (mono_method_pointer_get is no longer
needed, for example)
Q: Would it be too terrible to have another corlib signed as mscorlib?
A: We rename corlib to mscorlib also when saving the PE files, in fact,
the runtime can execute program created by mono just fine.
Q: How do I build corlib under Linux?
A: You can build your own (see the web site on how to get the mcs
project from cvs), but in order to build them using mcs you need a
set of working class libraries. After building the runtime (using
mono-build.sh) get them from the nightly build and put them (and
mcs.exe) in your mono/install/lib directory. Then you should be able
to do: cd mcs, then: make -f makefile.gnu, then: cp mcs/mcs.exe
class/lib/*.dll ../install/lib Also, you should know that you can
either get your dose of DLLs from MonoCharge, or from
http://primates.ximian.com/~miguel/runtime. MonoCharge is updated
automatically, while the later is only updated when Miguel is around
Once you have the DLLs, you can use `make -f makefile.gnu' as described
before to self-host.
Q: Is there a relatively straightforward way to repeat the steps taken
by Paolo to get Mono completely self-hosted on linux?
A: To build the compiler and class libraries in Linux, run:
<ul><li>make -f makefile.gnu. To install them, run: </li>
<li>make -f makefile.gnu install</li>
<li>You can also specify a prefix:</li>
<li>make -f makefile.gnu install prefix=/opt</li>
</ul>
If you want to produce and distribute a monocharge tarball, run:
make -f makefile.gnu dist
Of course you have to run these in the top level mcs directory.
Q: Is it possible to build a C# file to some sort of intermediate format which
can linked into a final module, like the traditional .c -> .o -> .so path?
A: You could do: mcs /target:module file1.cs, mcs /target:module file2.cs,
mcs /target:exe file1.dll file2.dll /out:mybin.exe
Q: Is there any plans for implementing remoting in the near future?, When will
work in System.Runtime.Remoting.dll start?
A: The remoting infrastructure is in place. Some of the channels and
formatters are not.
Q: I'm wondering if there are any plans to start using nant to build the
class lib + test lib. i think that every project neeed/should use an
automated build process and nant + a couple of tools enables this. is
the problem that the compiler can't run nant yet?
A: Maybe well be doing some sort of automated build process + testing when
the summer finish.
<a name="asp">
** Mono and ASP.NET
Q: Is Mono supporting ASP.NET?
A: Yes. The development of the support for ASP.NET comes in various stages,
here is what Gonzalo has been working on: 1. The Parser. 2. Getting the
parser to generate output compatible with ASP.NET. 3. Running the sample
output with the real Microsoft runtime but using our generated page. 4.
Running the sample with our classes with the .NET runtime. 5. Running
our sample code with our classes with our runtime. This is the process
we are following. Currently Gonzalo has reached point 5.
Q: Do I need install cygwin to work on ASP.NET in mono or Linux is enough since
it is self host right now.
A: Linux is enough.
Q: Any plan to make ASP.NET in mono works with Apache in linux?.
A: Yes, we have plans to do so, but we need to wait for Patrik's patches to
HttpRuntime. Once that is there, writing a mod_mono should be trivial
(look at mono/samples/embed for a sample embedded application).
<a name="ado">
** Mono and ADO.NET
Q: What is the status of ADO.NET support?. Could I start migrating
applications from MS.NET to Mono?.
A: You could start right now using the ADO.NET support in mono, of course,
if you want to help filling the missing gaps while you develop your app
:-) Well, what I mean is that we're not that far to having full ADO.NET
support in Mono, and we've got a lot of working things, so if we could
get more help, we'd finish it really soon :-)
Q: In developing the data architecture for the application are there and
objects I should stay away from in order to insure the smoothest possible
transition (minimum code rewrite) to Mono's ADO.NET implementation? (For
example, strongly typed datasets versus untyped datasets, etc...)
A: we are implementing all the classes in Microsoft .NET's System.Data, so
you can be sure that things will work the same in Mono as with the MS's
implementation. We'll maybe provide extra classes to fix some things
we've found missing while developing ADO.NET in Mono, but if you keep
using the MS's System.Data classes, things will work out of the box with
no changes (or at least that's the plan :-)
<a name="java">
** Mono and Java
@@ -813,24 +482,6 @@ A: Yes, it is possible. Here are a few starting point:
be translated into the equivalent "meaning" in CLR-land.
</ul>
Q: Could mono become a hybrid cil/java platform?
A: No. It is quite far from the philosophy of the project. The idea of Mono
is, to have only _one_ VM, on which all can run. And if there existing a
binary-converter from Java-.class to IL and if there existing something
like J-Sharp on Mono, you can write programs in Java, which than can run
on Mono. You do not need two bindings (like your example: GTK-Sharp _and_
Java-Gnome). You need only _one_ of it (GTK-Sharp). Thats the idea of Mono.
An other point is, that there are no people, who use OpenSource-JVMs. They
all prefer Suns original. But for Unix there don't exist a .NET-Framework.
So it is possible, that in the future Mono is the standard .NET for unixes.
Q: Do you plan to implement a Javascript compiler?
A: Yes. Eto Demerzal has started a Rhino port to C#.
After this is completed, we will begin developing
the Javascript compiler.
<a name="extending"></a>
** Extending Mono
@@ -858,20 +509,7 @@ A: Embracing a good technology is good. Extending technologies in
If you have innovative ideas, and want to create new classes, we
encourage you to make those classes operate correctly well in both
Mono and .NET.
Q: Is there any way I can develop the class libraries using linux yet?
A: Yes. Some class libraries can be developed on Linux. Search for
Paolo's post (he lists which classes can be compiled fine now).
Q: Is there any way I can install a known working copy of mono in /usr,
and an experimental copy somewhere else, and have both copies use
their own libraries? (I'm still not very good at library paths in
linux)
A: Yes. Just use two installation prefixes.
Mono and .NET
<a name="portability"></a>
** Portability
@@ -882,7 +520,7 @@ A: Currently, we are doing our work on Linux-based systems and
Windows. We do not expect many Linux-isms in the code, so it
should be easy to port Mono to other UNIX variants.
Q: What about Mono on non Linux-based systems?
Q: What about Mono on non X-based systems?
A: Our main intention at Ximian is to be able to develop GNOME
applications with Mono, but if you are interested in providing a
@@ -890,27 +528,11 @@ A: Our main intention at Ximian is to be able to develop GNOME
MacOS X for example), we would gladly integrate them, as long
they are under an open source license.
Q: What operating systems/CPUs do you support
Q: Will Mono run on Windows?
A: Mono currently runs on Linux, Windows, Solaris and FreeBSD.
There is a JIT engine available for x86 processors that can
generate code and optimizations tailored for a particular CPU.
Interpreters exist for the SPARC, PowerPC and StrongARM cpus.
Q: Does Mono run on Windows?
A: Yes. The Compiler and the runtime both run on Windows.
Q: When will mono and mcs compile on Linux?.
A: That happend a long time ago. Know you can download and compile
them or even install them from already made binary packages for
Windows and for Linux (RPM/DEB).
Q: Will I require Cygwin to run mono?
A: No. While you'll need it to compile it, it runs without cygwin and does not even require cygwin1.dll
A: We hope so. Currently some parts of Mono only run on Windows
(the C# compiler is a .NET executable) and other parts have only
been compiled on Linux, but work on Windows with Cygwin.
Q: Will Mono depend on GNOME?
@@ -919,28 +541,6 @@ A: It will depend only if you are using a particular assembly (for
in Mono for implementing a `Hello World Enterprise P2P Web
Service', you will not need any GNOME components.
Q: Is anyone working on porting Mono to IA-64?
A: Nobody is working on such port.
Q: If I were about to start a Mono port to IA-64,would the same lburg code
generator work for IA-64 also? or anything else need to be used for code
generation(as the processor architecture is totally different from IA32)
A: The lburg approach can be use for any processor architecture. But you might
think in another better approach.
Q: Do you plan to port Rhino to C#?.
A: Eto Demerzal has started a Rhino port to C#.
Q: Has anyone succeeded in building a Mac version of the C# environment.
If so can you explain how?
A: You could try to check with the Darwin people, or the Fink people.
Mono/C# is self hosting on Linux/PPC which is the hard part, so it
should be relatively simple to get it to work on macos
<a name="reuse"></a>
** Reusing Existing Code
@@ -956,53 +556,11 @@ A: At this time, we are investigating whether we can use elements of
defined API that splits the JIT from the GC system and the actual
byte code implementation.
We are using some pieces of ORP (Their code generation interface)
and we use it as a source of inspiration for optimizations. Paolo
and Dietmar consider ORP as being one of the best JIT engines out
there (and their research work and papers are very useful if you are
interested in JIT technology).
Q: What about using GNU Lightning?
A: We are not using GNU Lightning. Our JIT is using an instruction
selector based on tree-pattern matching, and a code generation
interface that is very tied to the current architecture.
Q: Will I be able to use Microsoft SQL Server 2000 or will I need to switch
to a specific Open Source Database. Will I need to recode?
A: There should not be any need to recode.
Q: What do I need to watch out for when programming in VB.NET so that I'm
sure to be able to run those apps on Linux?
A: Not making any PInvoke or DLL calls should and not using anything in
the Microsoft.* namespaces should suffice. Also do not use any
Methods/Classes marked as "This type/method supports the .NET Framework
infrastructure and is not intended to be used directly from your code."
even if you know what these classes/methods do.
Q: Will built-in reporting be supported for crystal reports? This is a
heavily used part of our system.
A: Probably not. Crystal Reports are propriety. Someone may try to emulate
the behaviour, but no-one has yet volunteered.
Q: Who about writing to the registry? As I understand it, Linux does not have
a counterpart to the registry. Should I avoid relying on that feature?
A: Try to avoid it. Although there would be a emulation for registry in
Mono too. GNOME does have a registry like mechanism for configuration. But
Even if gnome has a configuration system similar to the registry, the keys
will not be equal, so you will probably end up having to do some runtime
detection, and depending on this load an assembly that has your
platform-specific hacks.
Q: System.Data.SqlClient with FreeTDS, will you port parts of these to C# and
use them?
A: if their license is compatible with mono's, yes, we'd think about porting
them. If not, we'll continue with the plan of using FreeTDS.
A: We are also researching <a
href="http://www.gnu.org/software/lightning/lightning.html">GNU
Lightning</a>.
<a name="gcc"></a>
** Mono and GCC
@@ -1106,8 +664,8 @@ A: No. First, its basic functional capabilities have pre-existed too
open source software community with good development tools, which
is the primary reason for developing Mono.
<a name="etc"></a>
** Miscellaneous Questions
<a name="etc"></a> **
Miscellaneous Questions
Q: You say that the CLI allows multiple languages to execute on the
same environment. Isn't this the purpose of CORBA?
@@ -1130,52 +688,3 @@ Q: Will you support COM?
A: The runtime will support XPCOM on Unix systems and COM on Windows.
Most of the code for dynamic trampolines exists already.
Q: Will Ximian offer certifications on Mono or related technologies?.
A: It's possible. But there is no plan about this. So the short answer is no.
Q: Are there any Boehm's gc binaries?
A: Yes. You can find them <a href="http://java.thn.htu.se/~toor/">here</a>
Q: I have get into trouble when trying to build the site in my Linux box, what
can I do?.
A: Try to change the line "./mono-rss.exe ../index deploy/index.rss" for
"mono ./mono-rss.exe ../index deploy/index.rss"
Q: How can I report a bug?
A: The best thing is to track down the bug and provide a simple test to
reproduce the bug. You can then add the bug to bugzilla:
http://bugzilla.ximian.com/enter_bug.cgi or simply send it to
[email protected].
Q: Does mcs support the same command line options as the MS C#
compiler?
A: The Mono C# compiler on CVS now supports the same command line
arguments as the Microsoft C# compiler does.
Q: I am thinking about making a VS.NET solution and include as
projects both the library and the System.Xml.dll project
file: is that the best way (sure at the beginning, when the
compiler was not self hosting, you made something similar...)?
A: Jason and Krall did check in VS.NET files that you can use
to compile our System.XML and even to run the System.XML tests
(which is way cool, and way simple).
Q: How about getting searchable archives on lists.ximian.com?
A: You mean like http://www.go-mono.com/mailing-lists.html?
Q: I downloaded the lastest snapshot and did a make and make install on
mono which ran normal but when I tried to do the same with mcs it
errored out with a message saying Mono and Runtime out of sync.
A: You need to compile first the class libraries and install them with your
existing compiler and then the runtime.
-23
View File
@@ -1,23 +0,0 @@
* Mono Hackers Hall Of Fame
Without the help, the skills and the time of many passionate developers outside of
the Ximian Mono team, Mono would not be where it is today.
Many of them do it for fun, some do it because they really want a nice CLR they
can hack on, some do it because they need a working solution to some development
issues and mono is the ideal tool for the job.
Some of them may start contributing because they want a mention in the
<b>Mono Hackers Hall Of Fame</b>! Whatever the cause, join us in a big<br>
<h1 align="center">Thank you!</h1>
* Mono Hackers
** Nick Drochak
The first, deserved, entry in the <b>Mono Hackers Hall Of Fame</b> is for
Nick Drochak, who joined us in the first days of Mono and built the testing
infrastructure for the C# assemblies, fixed tons of bugs and even adventured
himself in the lands of the C runtime. His work is invaluable for keeping
Mono on the right track through the daily changes in the codebase.
+87 -819
View File
File diff suppressed because it is too large. Load diff
-62
View File
@@ -1,62 +0,0 @@
* Java
It would be interesting to support the Java language as part
of the Mono project.
You have to think of Java as various pieces: Java the
language and Java the virtual machine.
It is possible to compile Java to .NET, as shown by the
Microsoft J# compiler. We could then allow the migration of
Java applications to the Mono runtime.
** Native compiler
Although a native compiler can be built, and probably should be
built using an existing compiler, a short term solution is to
build a translator from Java class files to the ECMA CIL images.
This has the advantage that we can use an existing and tested
Java compiler to generate the code, and then we can use an automated
code compiler that compiles Java VM bytecodes to CIL bytecodes.
** The translator.
It would be interesting to write a semantic translator that
converts java byte codes into CIL opcodes. This is possible
because the Java byte codes are a subset of the CIL ones.
A semantic tree needs to be constructed (very much in the
spirit of what is done in mono_analize_stack in
<tt>mono/mono/jit/jit.c</tt>. Once such a semantic tree is
constructed, we could generate the equivalent Java code.
This has a number of interesting side effects: people can
continue to use their existing Java compilers to compile their
code, and a simple tool that converts their .class files into
a .NET assembly can be used.
** Libraries
We could translate the GNU Classpath libraries with the above
tools to provide the Java runtime required to host into the
Mono runtime. Some special treatment would be required for
core data types like integers, arrays and strings, and of
course reuse where possible existing classes from .NET to make
them compatible.
** JILC - Java to IL Compiler
This is an attempt to make the java bytecode available for the
.NET environment.
The project attempts to generate the IL code / bytecode from the
compiled java class files. It has reached the stage of code-generation.
The issues that needs to be addressed is the mapping of java objects
to the IL objects, eg: java.lang.String to System.String.
Gaurav Vaish and Abhaya Agarwal are currently leading this project.
The project is currently hosted at <a href="http://sourceforge.net/projects/jilc">SourceForge.Net</a>.
The official home page of the project is
<a href="http://jilc.sourceforge.net">http://jilc.sourceforge.net</a>.
-181
View File
@@ -1,181 +0,0 @@
* How to debug your C# application with the JIT engine
To debug a C# application you need to run the JIT in your debugger.
Before you can do anything useful in a debugger, you need a symbol
file which tells your debugger about functions, types, line numbers
and such. Unfortunately, this symbol file needs to be recreated each
time the JIT compiles a new method since it doesn't know anything
about this method (especially not its memory address) before actually
compiling it.
You have two ways of creating a symbol file:
** Letting the JIT dynamically create the symbol file
This'll give you a symbol file which is suitable for debugging IL byte
code - you won't see your C# source code.
However, this method has the advantage that it works with every assembly,
no matter whether it has been compiled with Mono's C# compiler (MCS) or
with any other compiler. It's currently the only way to debug
<tt>corlib.dll</tt> or any other library which cannot be compiled with
our compiler yet.
All that you need is a dump of the IL bytecode for each assembly (including
all assemblies this assembly is referencing). This is done by using the
<tt>monodis</tt> utility:
<pre>
monodis /home/export/martin/MONO-LINUX/lib/corlib.dll > corlib.il<br>
monodis /home/export/martin/MONO-LINUX/lib/System.dll > System.il<br>
monodis /home/export/martin/MONO-LINUX/bin/mcs.exe > mcs.il
</pre>
Make sure that all the .il files have the same name as their corresponding
assembly and that they're all created in the current directory.
The JIT supports two different debugging file formats:
<ul>
* STABS: This is a very simple debugging format, but it may be the only one
which is supported on your system. It is limited to source files of no more
than 65.535 lines and it's type support is also very limited. You should only
use this if your debugger doesn't support DWARF 2.
To generate STABS output, use the <tt>--stabs</tt> command line argument.
* DWARF 2: The DWARF 2 debugging format is a very powerful debugging format
which can handle source files of arbitrary size and has a highly sophisticated
type support. It's the recommended format unless you need to use STABS because
your debugger doesn't support DWARF 2.
To generate DWARF 2 output, use the <tt>--dwarf</tt> command line argument.
</ul>
You need to regenerate the symbol file each time the JIT compiled a new
method and each time you restart the JIT. You cannot reuse your symbol file
if you start the JIT a second file, not even if you're running the same
application with the same input data a second time.
Regenerating the symbol file is done by calling the JIT's
<tt>mono_debug_make_symbols ()</tt> function from within your debugger and
then reloading the symbol files. This function creates a <tt>filename-dwarf.s</tt>
(or <tt>filename-stabs.s</tt>) assembler input file in the current directory and
an object file in <tt>/tmp/filename.o</tt> - you need to tell your debugger to
add this object file as symbol file.
If you're using the GNU debugger, this is done like this:
<pre>
call mono_debug_make_symbols ()
add-symbol-file /tmp/corlib.o
add-symbol-file /tmp/mcs.o
add-symbol-file /tmp/Mono.CSharp.Debugger.o
</pre>
You can also write a GDB macro like this:
<pre>
define reload
call mono_debug_make_symbols ()
add-symbol-file /tmp/corlib.o
add-symbol-file /tmp/mcs.o
add-symbol-file /tmp/Mono.CSharp.Debugger.o
end
</pre>
Then you can just say <tt>reload</tt> to have GDB recreate the symbol file.
There's also an <a href="jit-debug-sample.html">example debugging session</a> using
the GNU debugger.
** Using a symbol file which have been created by the Mono C# compiler
If you compiled your application with Mono's C# compiler (MCS), you can tell it to
create a symbol file which is then processed and rewritten by the JIT engine.
To do this, you must give MCS the <tt>-g</tt> option:
<pre>
$ mcs -g Foo.cs
</pre>
This creates a <tt>Foo-debug.s</tt> assembler input file.
To use this in the JIT, you must first copy it to the target machine (the machine
where you want to run the JIT to debug your application) and run it through the
assembler to produce an object file <tt>Foo-debug.o</tt>. This object file must be
in the current directory.
Then start the JIT in your debugger and give it the <tt>--dwarf-plus</tt> command
line argument.
Each time you call <tt>mono_debug_make_symbols ()</tt> from withing your debugger,
the JIT will read this <tt>Foo-debug.o</tt>, fix some machine dependent things like
memory addresses etc. in it and write it back to disk.
If you're using the GNU debugger, you'll want to use a macro like this:
<pre>
define relocate
call mono_debug_make_symbols ()
add-symbol-file /tmp/corlib.o
add-symbol-file mcs-debug.o
add-symbol-file Mono.CSharp.Debugger-debug.o
end
</pre>
If there is no <tt>assembly-debug.o</tt> file, but an <tt>assembly.il</tt> one, the
JIT will fall back to normal DWARF 2 (in the example above, <tt>corlib.dll</tt> was
compiled with Microsoft's compiler and the JIT is thus using DWARF to debug it).
This debugging method only works if you compiled your assembly with MCS, but it'll
allow you to actually debug your C# source code :-)
Here's an <a href="jit-debug-sample2.html">example debugging session</a> using
the GNU debugger.
** Breakpoints and single stepping
The JIT has a <tt>--debug</tt> command line argument to insert a breakpoint at the
beginning of this method. It takes a <tt>Namespace.Class:Method</tt> argument which
is the method. This argument can be given multiple times.
However, once your application is stopped in GDB you may want to insert a breakpoint
the next time the JIT compiles a method. There's a global variable
<tt>mono_debug_insert_breakpoint</tt> which you can modify in your debugger.
If this variable is set to a non-zero value, the JIT's <tt>arch_compile_method</tt>
will insert a breakpoint the next time it is called, ie. at the top of the next
method it compiles. If this value has a positive value, it acts as a counter and is
decremented after inserting the breakpoint - setting it to a negative value will let
the JIT insert the breakpoint each time it compiles a new method.
There's also global variable <tt>mono_debug_last_breakpoint_address</tt> which always
contains the address of the last inserted breakpoint. You may manually override this
address with a <tt>nop</tt> instruction to delete the breakpoint.
For instance, I have a GDB macro called <tt>enter</tt> which I use to enter a method
rather than stepping over it:
<pre>
define enter
set mono_debug_insert_breakpoint = 1
continue
set *mono_debug_last_breakpoint_address = 0x90
relocate
frame
</pre>
Btw. speaking of single stepping - you should use your debuggers <tt>next</tt> command,
not its <tt>step</tt> command for single stepping unless you compiled the JIT without
debugging support. The reason for this is that the JIT creates machine code which contains
calls to JIT methods such as <tt>mono_object_new_wrapper</tt> at places where you don't
expect them - so unless the JIT is compiled at least without line numbers, your debugger
will enter such methods if you use <tt>step</tt> rather than <tt>next</tt>.
-86
View File
@@ -1,86 +0,0 @@
* A debugging session using a dynamically generated symbol file.
Let's assume we have the following C# application which we want to debug:
<pre>
using System;
public class Foo
{
public struct MyStruct {
int a;
long b;
double c;
}
public static void Main ()
{
Int32 value = 5;
long test = 512;
MyStruct my_struct;
my_struct.a = 5;
my_struct.b = test;
my_struct.c = 23323.5235;
}
}
</pre>
First of all, we need to compile it and create the .il files:
<pre>
$ mcs ./Foo.cs
$ monodis /home/export/martin/MONO-LINUX/lib/corlib.dll > corlib.il
$ monodis Foo.exe > Foo.il
</pre>
Now we can start the JIT in the debugger:
<pre>
$ gdb ~/monocvs/mono/mono/jit/mono
(gdb) r --dwarf --debug Foo:Main ./Foo.exe
Starting program: /home/martin/monocvs/mono/mono/jit/mono --dwarf --debug Foo:Main ./Foo.exe
0x081e8911 in ?? ()
(gdb) call mono_debug_make_symbols ()
(gdb) add-symbol-file /tmp/Foo.o
Reading symbols from /tmp/Foo.o...done.
Current language: auto; currently c++
(gdb) frame
#0 Foo.Main () at Foo.il:26
26 // method line 2
(gdb) n
Foo.Main () at Foo.il:38
38 IL_0000: ldc.i4.5
(gdb) list
33 .maxstack 2
34 .locals (
35 int32 V_0,
36 int64 V_1,
37 valuetype MyStruct V_2)
38 IL_0000: ldc.i4.5
39 IL_0001: stloc.0
40 IL_0002: ldc.i4 512
41 IL_0007: conv.i8
42 IL_0008: stloc.1
43 IL_0009: ldloca.s 2
44 IL_000b: ldc.i4.5
45 IL_000c: stfld int32 .MyStruct::a
46 IL_0011: ldloca.s 2
47 IL_0013: ldloc.1
48 IL_0014: stfld int64 .MyStruct::b
49 IL_0019: ldloca.s 2
50 IL_001b: ldc.r8 23323.5
51 IL_0024: stfld float64 .MyStruct::c
52 IL_0029: ret
(gdb) until 52
Foo.Main () at Foo.il:53
53 }
(gdb) info locals
V_0 = 5
V_1 = 512
V_2 = {a = 5, b = 512, c = 23323.523499999999}
</pre>
As you see in this example, you need to know IL code to use this debugging method - but
it may be the only way to debug a library.
-70
View File
@@ -1,70 +0,0 @@
* A debugging session using a symbol file which has been created by MCS.
Let's assume we have the following C# application which we want to debug:
<pre>
using System;
public class Foo
{
public struct MyStruct {
int a;
long b;
double c;
}
public static void Main ()
{
Int32 value = 5;
long test = 512;
MyStruct my_struct;
my_struct.a = 5;
my_struct.b = test;
my_struct.c = 23323.5235;
}
}
</pre>
First of all, we need to compile it with MCS, assemble the generated .s file and
create the .il files for all referenced assemblies which were not compiled with MCS:
<pre>
$ mcs -g ./Foo.cs
$ as -o Foo-debug.o Foo-debug.s
$ monodis /home/export/martin/MONO-LINUX/lib/corlib.dll > corlib.il
</pre>
Now we can start the JIT in the debugger:
<pre>
$ gdb ~/monocvs/mono/mono/jit/mono
(gdb) r --dwarf-plus --debug Foo:Main ./Foo.exe
Starting program: /home/martin/monocvs/mono/mono/jit/mono --dwarf-plus --debug Foo:Main ./Foo.exe
Program received signal SIGTRAP, Trace/breakpoint trap.
0x081e8681 in ?? ()
(gdb) call mono_debug_make_symbols ()
(gdb) add-symbol-file Foo-debug.o
(gdb) add-symbol-file /tmp/corlib.o
` (gdb) frame
#0 Main () at ./Foo.cs:11
11 public static void Main ()
(gdb) n
Main () at ./Foo.cs:13
13 Int32 value = 5;
(gdb)
14 long test = 512;
(gdb)
17 my_struct.a = 5;
(gdb)
18 my_struct.b = test;
(gdb)
19 my_struct.c = 23323.5235;
(gdb)
20 }
(gdb) info locals
value = 5
test = 512
my_struct = { a = 5, b = 512, c = 23323.5235 }
</pre>
-117
View File
@@ -1,117 +0,0 @@
* Compilers for other languages
Here are some other free compilers for other languages that
target .NET and should work with Mono with no problem:
<ul>
* <a href="#ComponentPascal">Component Pascal</a>
* <a href="#MonoLogo">MonoLogo</a>
* <a href="#Oberon">Oberon</a>
* <a href="#Forth">Forth</a>
</ul>
Languages we would like to have supported, with links to resources:
<ul>
* <a href="#JavaScript">Java Script</a>
* <a href="java.html">Java</a>
* <a href="#c">C</a>
</ul>
Some experimental languages:
<ul>
* <a href="#Tachy">Tachy</a> (scheme-like)
</ul>
<a name="MonoLogo">
** MonoLogo
An implementation of Logo for Mono (and .NET)
The <A href="http://monologo.sf.net">Mono Logo</a> compiler is
hosted in the <a href="ccvs.html">Mono CVS</a> repository
and also available on the <a href="anoncvs.html">AnonCVS</a> mirrors.
<a name="Oberon">
** Oberon
This Oberon compiler is written in Oberon.NET (another self
hosting compiler).
The main site <a href="http://www.oberon.ethz.ch/oberon.net/">http://www.oberon.ethz.ch/oberon.net/</a>
Download:
<a href="http://www.oberon.ethz.ch/oberon.net/download/">http://www.oberon.ethz.ch/oberon.net/download/</a>
Examples:
<a href="http://www.oberon.ethz.ch/oberon.net/examples/">http://www.oberon.ethz.ch/oberon.net/examples/</a>
<a href="http://www.superin.formativ.net/mono/oberon/oberon.zip">http://www.superin.formativ.net/mono/oberon/oberon.zip</a>
<a name="ComponentPascal">
** Component Pascal
The Component Pascal compiler: <a
href="http://www2.fit.qut.edu.au/CompSci/PLAS/ComponentPascal">Home
Page</a>, you can <a
href="http://www2.fit.qut.edu.au/CompSci/PLAS/ComponentPascal/gpcp1.1.4-netRTM.zip">
download it</a>
<a name="Forth">
** Delta Forth
The Delta Forth.NET project: <a
href="www.dataman.ro/dforth">Home
Page</a> and <a href="http://www.dataman.ro/dforth/index.html">more
details here</a>.
<a name="Tachy">
** Tachy
A subset of Scheme language called <a
href="http://radio.weblogs.com/0101156/stories/2002/03/19/tachy.html">Tachy</a>
* Missing languages
Here is a list of a few languages that we would like to see
supported. We will try to maintain a set of links here with
technical information for those interested in porting,
implementing or adapting a compiler for any of these
languages:
<a name="JavaScript">
* Java Script
The Mozilla project has an implementation of JavaScript
written in Java called <a
href="http://www.mozilla.org/rhino/">Rhino</a>.
You could port this code from Java to C#.
Note that since JavaScript allows for evaluation at runtime,
the compiler has to be built as a class that can be invoked at
runtime.
<a name="c">
* C
Ideally GCC could be modified to generate CIL, but it is a
big task. That would give us various compilers in one pass.
Rumor is that the next version of the LCC compiler will
include an IL backend. We do not know how extensive the support
for integration with .NET will be, but it would be an interesting
excercise to add an extension to C to call into .NET code.
LCC is not an open source compiler, but it is free as long as you
do not profit from selling it.
<a name="Java">
* Java
We have a <a href="java.html">separate page</a> for Java.
+12 -124
View File
@@ -1,10 +1,6 @@
* Mailing Lists
Most of the mailing lists are in english, but there is also
Mono Hispano that has lists in Spanish. <a
href="http://mono.es.gnome.org/mailman/listinfo/mono-hispano">Mono Hispano list</a>
There are a number of mailing lists for Mono in English:
There are a number of mailing lists for Mono
<table>
<tr>
@@ -62,6 +58,16 @@
Discussion on the documentation of Mono.
</td>
</tr>
<tr>
<td>
<b><a
href="http://lists.ximian.com/mailman/listinfo/mono-patches">mono-patches</a></b>
</td>
<td>
Track the development of Mono in realtime: receive patches to the Mono repository
by email.
</td>
</tr>
<tr>
<td>
<b><a href="http://lists.ximian.com/mailman/listinfo/mono-bugs">mono-bugs</a></b>
@@ -81,122 +87,4 @@
list at Develop.com:</a></b> The guys at Develop Mentor run
this general purpose mailing list.
</ul>
</ul>
* Google search of the archives
<!-- Google Search with mods -->
<center>
<table>
<tr>
<td><a href="http://www.google.com/search"><img src="mailing-lists_files/Logo_40wht.gif" border="0" alt="Google" align="middle"></a></td>
<td>
<table>
<tr><td>
<FORM method=GET action=http://www.google.com/custom>
<TABLE bgcolor=#FFFFFF cellspacing=0 border=0>
<tr valign=top>
<td>
<INPUT TYPE=text name=q size=31 maxlength=255 value="">
<INPUT TYPE=hidden name=q size=31 maxlength=255 value="mono">
<INPUT type=submit name=sa VALUE="Search">
<input type="hidden" name="cof" value="GIMP:#00ff00;T:#ffffff;LW:401;BIMG:http://www.go-mono.com/images/bgsquares.gif;ALC:#ffffff;L:http://www.go-mono.com/images/mono.gif;GFNT:#cc7700;LC:#ee9900;LH:80;BGC:#444444;AH:center;VLC:#cccccc;S:http://www.go-mono.com;GALT:#eeee00;AWFID:45753ce73241ef7a;">
<font face="arial,sans-serif" size="-1"><input type="hidden" name="domains" value="www.go-mono.com;lists.ximian.com"><br><input type="radio" name="sitesearch" value="www.go-mono.com"> Search www.go-mono.com <input type="radio" name="sitesearch" value="lists.ximian.com"> Search lists.ximian.com </font><br>
</td></tr></TABLE>
</FORM>
</tr></td>
<tr><td>
<FORM method=GET action=http://www.google.com/custom>
<TABLE bgcolor=#FFFFFF cellspacing=0 border=0>
<tr valign=top>
<td>
<INPUT TYPE=text name=q size=31 maxlength=255 value="">
<INPUT TYPE=hidden name=q size=31 maxlength=255 value="mono-list">
<INPUT type=submit name=sa VALUE="Search">
<input type="hidden" name="cof" value="GIMP:#00ff00;T:#ffffff;LW:401;BIMG:http://www.go-mono.com/images/bgsquares.gif;ALC:#ffffff;L:http://www.go-mono.com/images/mono.gif;GFNT:#cc7700;LC:#ee9900;LH:80;BGC:#444444;AH:center;VLC:#cccccc;S:http://www.go-mono.com;GALT:#eeee00;AWFID:45753ce73241ef7a;">
<font face=arial,sans-serif size=-1><input type=hidden name=domains value="lists.ximian.com"><br> <input type=hidden name=sitesearch value="lists.ximian.com"> Search mono-<b>list</b> </font><br>
</td></tr></TABLE>
</FORM>
</tr></td>
<tr><td>
<FORM method=GET action=http://www.google.com/custom>
<TABLE bgcolor=#FFFFFF cellspacing=0 border=0>
<tr valign=top>
<td>
<INPUT TYPE=text name=q size=31 maxlength=255 value="">
<INPUT TYPE=hidden name=q size=31 maxlength=255 value="mono-announce-list">
<INPUT type=submit name=sa VALUE="Search">
<input type="hidden" name="cof" value="GIMP:#00ff00;T:#ffffff;LW:401;BIMG:http://www.go-mono.com/images/bgsquares.gif;ALC:#ffffff;L:http://www.go-mono.com/images/mono.gif;GFNT:#cc7700;LC:#ee9900;LH:80;BGC:#444444;AH:center;VLC:#cccccc;S:http://www.go-mono.com;GALT:#eeee00;AWFID:45753ce73241ef7a;">
<font face=arial,sans-serif size=-1><input type=hidden name=domains value="lists.ximian.com"><br> <input type=hidden name=sitesearch value="lists.ximian.com"> Search mono-<b>announce-list</b> </font><br>
</td></tr></TABLE>
</FORM>
</tr></td>
<tr><td>
<FORM method=GET action=http://www.google.com/custom>
<TABLE bgcolor=#FFFFFF cellspacing=0 border=0>
<tr valign=top>
<td>
<INPUT TYPE=text name=q size=31 maxlength=255 value="">
<INPUT TYPE=hidden name=q size=31 maxlength=255 value="mono-bugs">
<INPUT type=submit name=sa VALUE="Search">
<input type="hidden" name="cof" value="GIMP:#00ff00;T:#ffffff;LW:401;BIMG:http://www.go-mono.com/images/bgsquares.gif;ALC:#ffffff;L:http://www.go-mono.com/images/mono.gif;GFNT:#cc7700;LC:#ee9900;LH:80;BGC:#444444;AH:center;VLC:#cccccc;S:http://www.go-mono.com;GALT:#eeee00;AWFID:45753ce73241ef7a;">
<font face=arial,sans-serif size=-1><input type=hidden name=domains value="lists.ximian.com"><br> <input type=hidden name=sitesearch value="lists.ximian.com"> Search mono-<b>bugs</b> </font><br>
</td></tr></TABLE>
</FORM>
</tr></td>
<tr><td>
<FORM method=GET action=http://www.google.com/custom>
<TABLE bgcolor=#FFFFFF cellspacing=0 border=0>
<tr valign=top>
<td>
<INPUT TYPE=text name=q size=31 maxlength=255 value="">
<INPUT TYPE=hidden name=q size=31 maxlength=255 value="mono-gc-list">
<INPUT type=submit name=sa VALUE="Search">
<input type="hidden" name="cof" value="GIMP:#00ff00;T:#ffffff;LW:401;BIMG:http://www.go-mono.com/images/bgsquares.gif;ALC:#ffffff;L:http://www.go-mono.com/images/mono.gif;GFNT:#cc7700;LC:#ee9900;LH:80;BGC:#444444;AH:center;VLC:#cccccc;S:http://www.go-mono.com;GALT:#eeee00;AWFID:45753ce73241ef7a;">
<font face=arial,sans-serif size=-1><input type=hidden name=domains value="lists.ximian.com"><br> <input type=hidden name=sitesearch value="lists.ximian.com"> Search mono-<b>gc-list</b> </font><br>
</td></tr></TABLE>
</FORM>
</tr></td>
<tr><td>
<FORM method=GET action=http://www.google.com/custom>
<TABLE bgcolor=#FFFFFF cellspacing=0 border=0>
<tr valign=top>
<td>
<INPUT TYPE=text name=q size=31 maxlength=255 value="">
<INPUT TYPE=hidden name=q size=31 maxlength=255 value="mono-cvs-list">
<INPUT type=submit name=sa VALUE="Search">
<input type="hidden" name="cof" value="GIMP:#00ff00;T:#ffffff;LW:401;BIMG:http://www.go-mono.com/images/bgsquares.gif;ALC:#ffffff;L:http://www.go-mono.com/images/mono.gif;GFNT:#cc7700;LC:#ee9900;LH:80;BGC:#444444;AH:center;VLC:#cccccc;S:http://www.go-mono.com;GALT:#eeee00;AWFID:45753ce73241ef7a;">
<font face=arial,sans-serif size=-1><input type=hidden name=domains value="lists.ximian.com"><br> <input type=hidden name=sitesearch value="lists.ximian.com"> Search mono-<b>cvs-list</b> </font><br>
</td></tr></TABLE>
</FORM>
</tr></td>
<tr><td>
<FORM method=GET action=http://www.google.com/custom>
<TABLE bgcolor=#FFFFFF cellspacing=0 border=0>
<tr valign=top>
<td>
<INPUT TYPE=text name=q size=31 maxlength=255 value="">
<INPUT TYPE=hidden name=q size=31 maxlength=255 value="mono-patches">
<INPUT type=submit name=sa VALUE="Search">
<input type="hidden" name="cof" value="GIMP:#00ff00;T:#ffffff;LW:401;BIMG:http://www.go-mono.com/images/bgsquares.gif;ALC:#ffffff;L:http://www.go-mono.com/images/mono.gif;GFNT:#cc7700;LC:#ee9900;LH:80;BGC:#444444;AH:center;VLC:#cccccc;S:http://www.go-mono.com;GALT:#eeee00;AWFID:45753ce73241ef7a;">
<font face=arial,sans-serif size=-1><input type=hidden name=domains value="lists.ximian.com"><br> <input type=hidden name=sitesearch value="lists.ximian.com"> Search mono-<b>patches</b> </font><br>
</td></tr></TABLE>
</FORM>
</tr></td>
</table>
</tr>
</table>
</center>
<!-- /Google Search with mods -->
</ul>
-36
View File
@@ -1,36 +0,0 @@
* Mono for beginners
Hinne Hettema and Jaime Anguiano Olarra are providing us with
nice and complete set of documents (HOWTOs) about how to install,
configure, run and test the software developed by the Mono Project.
You can read them online, get PDF versions or get the XML sources.
HTML Format (read it online)
For <a href="mono-beginning/t1.html">RPM Linux based systems</a>
For <a href="mono-beginning-windows/t1.html">Microsoft Windows</a>
PDF Format
For <a href="mono-beginning.pdf">RPM Linux based systems</a>
For <a href="mono-beginning-windows.pdf">Microsoft Windows</a>
XML Source
For <a href="mono-beginning.xml">RPM Linux based systems</a>
For <a href="mono-beginning-windows.xml">Microsoft Windows</a>
Currently Hinne is working on a Mono Tools HOWTO. Which will be
very useful for the hackers that would like to get in touch with
Mono and Jaime is working out a Mono Beginning HOWTO for Debian
users.
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+2 -7
View File
@@ -42,11 +42,6 @@ fi
cvs checkout mono || exit -1
if [ ! -z "${AUTO_STABLE}" -o -e /usr/autotool/stable ]; then
export AUTO_STABLE=${AUTO_STABLE:-/usr/autotool/stable}
export AUTO_DEVEL=${AUTO_STABLE}
fi
# Need to install pkgconfig and set ACLOCAL_FLAGS if there is not a
# pkgconfig installed already. Otherwise set PKG_CONFIG_PATH to the
# glib we're about to install in $here/install. This script could
@@ -125,8 +120,8 @@ export CPPFLAGS
export LDFLAGS
# Make sure we build native w32, not cygwin
#CC="gcc -mno-cygwin"
#export CC
CC="gcc -mno-cygwin"
export CC
# --prefix is used to set the class library dir in mono, and it needs
# to be in windows-native form. It also needs to have '\' turned into
+4 -5
View File
@@ -60,7 +60,6 @@ function install_package() {
tarfile=$1
dirname=$2
name=$3
configure_options=$4
echo "Installing $name..."
if [ ! -f $here/$tarfile ]; then
@@ -71,7 +70,7 @@ function install_package() {
if [ ! -d $here/$dirname ]; then
# Build and install package
tar xzf $here/$tarfile || exit -1
(cd $here/$dirname; ./configure --prefix=$here/install $configure_options || exit -1; make || exit -1; make install || exit -1)
(cd $here/$dirname; ./configure --prefix=$here/install || exit -1; make || exit -1; make install || exit -1)
success=$?
if [ $success -ne 0 ]; then
echo "***** $name build failure. Run rm -rf $here/$dirname to have this script attempt to build $name again next time"
@@ -121,19 +120,19 @@ export LDFLAGS
# Grab pkg-config-0.8, glib-1.3.12 if necessary
if [ $install_pkgconfig = "yes" ]; then
install_package pkgconfig-0.8.0.tar.gz pkgconfig-0.8.0 pkgconfig ""
install_package pkgconfig-0.8.0.tar.gz pkgconfig-0.8.0 pkgconfig
else
echo "Not installing pkgconfig, you already seem to have it installed"
fi
if [ $install_glib = "yes" ]; then
install_package glib-1.3.13.tar.gz glib-1.3.13 glib ""
install_package glib-1.3.13.tar.gz glib-1.3.13 glib
else
echo "Not installing glib, you already seem to have it installed"
fi
if [ $install_libgc = "yes" ]; then
LIBS="-ldl" install_package gc6.0.tar.gz gc6.0 libgc "--enable-threads=pthreads"
install_package gc6.0.tar.gz gc6.0 libgc
# make install didnt do the headers!
mkdir -p $here/install/include/gc
cp -r $here/gc6.0/include/* $here/install/include/gc
-551
View File
@@ -1,551 +0,0 @@
<Mono newbie coders start file>
<h1> A little help for mono newbie coders </h1>
For those who are new to Mono and are impatient to contribute
with code (uhh... you are brave!!) here is the document you
should read.
You will see all Mono hackers say the same (great minds have
similar way of thinking): First, DO WRITE TESTS!!!. In order
to do that:
<ul>
* Start with the NUnit Tests Guidelines. In the cvs
they are located at: mcs/class/doc/NUnitGuideli...
* But wait, this is a document for impatient
people. So EVERYTHING should be here. Well, it is.
</ul>
<h2> The NUnit Tests Guidelines document </h2>
Mono NUnit Test Guidelines and Best Practices
Authors: Nick Drochak <[email protected]>
Martin Baulig <[email protected]>
Last Update: 2002-03-02
Rev: 0.3
<b> Purpose </b>
This document captures all the good ideas people have had
about writing NUnit tests for the mono project. This document
will be useful for anyone who writes or maintains unit tests.
<b> Other resources </b>
- mcs/class/README has an explanation of the build process and
how it relates to the tests.
- http://nunit.sourceforge.net is the place to find out about
NUnit
<b> Getting Started </b>
If you are new to writing NUnit tests, there is a template
you may use to help get started. The file is:
mcs/class/doc/TemplateTest.cs
(2.- This is the point two!. This file is just after the end
of the guidelines. Copy/paste it in another buffer. And keep
reading.)
Save a copy of this file in the appropriate test subdirecty
(see below), and replace all the [text] markers with
appropriate code. Comments in the template are there to guide
you. You should also look at existing tests to see how other
people have written them.
mcs/class/corlib/Test/System.Collections/CollectionBaseTest.cs
is a small one that might help.
(3.- You reached the third point. And as expected, it's just
here to tell you that the content of CollectionBaseTest.cs is
after the TemplateTest.cs code at the end of these
guidelines.)
The directory that will contain your new file depends on the
assembly/namespace of the class for which you are creating the
tests. Under mcs/class there is a directory for each assembly.
In each assembly there is a Test directory, e.g.
mcs/class/corlib/Test. In the Test directory there are
sub-directories for each namespace in the assembly, e.g.
mcs/class/corlib/Test/Sytem. Put your new test file in the
appropriate sub-directory under Test for the class you are
testing.
Once your test class is complete, you need to add it to the
AllTests.cs file in the same directory as your new test. Add a
call to "suite.AddTest()" passing the name of your new test
class's suite property as the parameter. You will see examples
in the AllTests.cs file, so just copy and paste inside there.
Once all of that is done, you can do a 'make test' from the top
mcs directory. Your test class will be automagically included
in the build and the tests will be run along with all the
others.
<b> Tips </b>
<b> Provide an unique error message for Assert() </b>
Include an unique message for each Assert() so that when the
assert fails, it is trivial to locate the failing one.
Otherwise, it may be difficult to determine which part of the
test is failing. A good way to ensure unique messages is to use
something like #A01, #A02 etc.
Bad:
<pre>
AssertEquals("array match", compare[0], i1[0]);
AssertEquals("array match", compare[1], i1[1]);
AssertEquals("array match", compare[2], i1[2]);
AssertEquals("array match", compare[3], i1[3]);
</pre>
Good:
<pre>
AssertEquals("#A01", compare[0], i1[0]);
AssertEquals("#A02", compare[1], i1[1]);
AssertEquals("#A03", compare[2], i1[2]);
AssertEquals("#A04", compare[3], i1[3]);
</pre>
Once you used such a number in an Assert(), don't change it
later on - people might use it it identify the test in bug
reports or in mailing lists.
<b> Use AssertEquals() to compare things, not Assert(). </b>
Never compare two values with Assert() - if the test fails,
people have no idea what went wrong while AssertEquals()
reports the failed value.
Bad:
<pre>
Assert ("A01", myTicks[0] == t1.Ticks);
</pre>
Good:
<pre>
AssertEquals ("A01", myTicks[0], t1.Ticks);
</pre>
<b> Constructors </b>
When writing your testcase, please make sure to provide a
constructor which takes no arguments:
<pre>
public class DateTimeTest : TestCase
{
public DateTimeTest() : base ("[MonoTests.System.DateTimeTest]") {}
public DateTimeTest (string name): base(name) {}
public static ITest Suite
{
get {
TestSuite suite = new TestSuite ();
return suite;
}
}
}
</pre>
<b> Namespace </b>
Please keep the namespace within each test directory
consistent - all tests which are referenced in the same
AllTests.cs must be in the same namespace. Of course you can
use subnamespaces as you like - especially for subdirectories
of your testsuite.
For instance, if your AllTests.cs is in namespace "MonoTests"
and you have a subdirectory called "System", you can put all
the tests in that dir into namespace "MonoTests.System".
<b> Test your test with the microsoft runtime </b>
If possible, try to run your testsuite with the Microsoft
runtime on Windows and make sure all tests in it pass. This is
especially important if you're writing a totally new testcase
- without this check you can never be sure that your testcase
contains no bugs ....
Don't worry if you're writing your test on Linux, other people
can test it for you on Windows.
Sometimes you may discover that a test doesn't show the
expected result when run with the Microsoft runtime - either
because there is a bug in their runtime or something is
misleading or wrong in their documentation. In this case,
please put a detailed description of the problem to
mcs/class/doc/API-notes and do also report it to the list -
we'll forward this to the Microsoft people from time to time
to help them fix their documentation and runtime.
<pre>
-------------------- TemplateTest.cs begins ----------
// this is a template for making NUnit tests. Text enclosed
// in square brackets (and the brackets themselves) should be
// replaced by appropiate code.
// [File Name].cs - NUnit Test Cases for [explain here]
//
// [Author Name] ([Author email Address])
//
// (C) [Copyright holder]
//
// these are the standard namespaces you will need. You may
// need to add more depending on your tests.
using NUnit.Framework;
using System;
// all test namespaces start with "MonoTests." Append the
// Namespace that contains the class you are testing, e.g.
// MonoTests.System.Collections
namespace MonoTests.[Namespace]
{
// the class name should end with "Test" and start with the name
// of the class you are testing, e.g. CollectionBaseTest
public class [Class to be tested]Test : TestCase {
// there should be two constructors for your class. The first
// one (without parameters) should set the name to something
// unique.
// Of course the name of the method is the same as the name of
// the class
public [Constructor]() : base ("[Namespace.Class]") {}
public [Constructor](string name) : base(name) {}
// this method is run before each Test* method is called. You
// can put variable initialization, etc. here that is common to
// each test.
// Just leave the method empty if you don't need to use it.
protected override void SetUp() {}
// this method is run after each Test* method is called. You
// can put clean-up code, etc. here. Whatever needs to be done
// after each test. Just leave the method empty if you don't need
// to use it.
protected override void TearDown() {}
// this property is required. You need change the parameter for
// typeof() below to be your class.
public static ITest Suite {
get {
return new TestSuite(typeof([Classname here]));
}
}
// this is just one of probably many test methods in your test
// class. each test method must start with "Test". All methods
// in your class which start with "Test" will be automagically
// called by the NUnit framework.
public void Test[Something] {
// inside here you will exercise your class and then
// call Assert()
}
}
---------------------- TemplateTest.cs ends --------------
---------------------- CollectionBaseTest.cs begins ------
//
// System.Collections.CollectionBase
// Test suite for System.Collections.CollectionBase
//
// Author:
// Nick D. Drochak II
//
// (C) 2001 Nick D. Drochak II
//
using System;
using System.Collections;
using NUnit.Framework;
namespace MonoTests.System.Collections
{
public class CollectionBaseTest : TestCase
{
public CollectionBaseTest () : base
("System.Collection.CollectionBase testsuite")
{}
public CollectionBaseTest (String name) : base (name)
{}
// We need a concrete class to test the abstract base
// class
public class ConcreteCollection : CollectionBase
{
// These fields are used as markers to test
// the On* hooks.
public bool onClearFired;
public bool onClearCompleteFired;
public bool onInsertFired;
public int onInsertIndex;
public bool onInsertCompleteFired;
public int onInsertCompleteIndex;
public bool onRemoveFired;
public int onRemoveIndex;
public bool onRemoveCompleteFired;
public int onRemoveCompleteIndex;
public bool onSetFired;
public int onSetOldValue;
public int onSetNewValue;
public bool onSetCompleteFired;
public int onSetCompleteOldValue;
public int onSetCompleteNewValue;
// This constructor is used to test OnValid()
public ConcreteCollection()
{
IList listObj;
listObj = this;
listObj.Add(null);
}
// This constructor puts consecutive integers into the list
public ConcreteCollection(int i) {
IList listObj;
listObj = this;
int j;
for (j = 0; j< i; j++) {
listObj.Add(j);
}
}
// A helper method to look at a value in the
// list at a specific index
public int PeekAt(int index)
{
IList listObj;
listObj = this;
return (int) listObj[index];
}
// Mark the flag if this hook is fired
protected override void OnClear() {
this.onClearFired = true;
}
// Mark the flag if this hook is fired
protected override void OnClearComplete()
{
this.onClearCompleteFired = true;
}
// Mark the flag, and save the paramter if
// this hook is fired
protected override void OnInsert(int index,
object value)
{
this.onInsertFired = true;
this.onInsertIndex = index;
}
// Mark the flag, and save the paramter if
// this hook is fired
protected override void OnInsertComplete(int index,
object value)
{
this.onInsertCompleteFired = true;
this.onInsertCompleteIndex = index;
}
// Mark the flag, and save the paramter if this hook
// is fired
protected override void OnRemove(int index,
object value)
{
this.onRemoveFired = true;
this.onRemoveIndex = index;
}
// Mark the flag, and save the paramter if this hook
// is fired
protected override void OnRemoveComplete(int index,
object value)
{
this.onRemoveCompleteFired = true;
this.onRemoveCompleteIndex = index;
}
// Mark the flag, and save the paramters if this hook
// is fired
protected override void OnSet(int index, object oldValue,
object newValue)
{
this.onSetFired = true;
this.onSetOldValue = (int) oldValue;
this.onSetNewValue = (int) newValue;
}
// Mark the flag, and save the paramters if this hook
// is fired
protected override void OnSetComplete(int index,
object oldValue,
object newValue)
{
this.onSetCompleteFired = true;
this.onSetCompleteOldValue = (int) oldValue;
this.onSetCompleteNewValue = (int) newValue;
}
} // public class ConcreteCollection
public static ITest Suite {
get {
return new TestSuite
(typeof(CollectionBaseTest));
}
}
// Check the count property
public void TestCount() {
ConcreteCollection myCollection;
myCollection = new ConcreteCollection(4);
Assert(4 == myCollection.Count);
}
// Make sure GetEnumerator returns an object
public void TestGetEnumerator() {
ConcreteCollection myCollection;
myCollection = new ConcreteCollection(4);
Assert(null != myCollection.GetEnumerator());
}
// OnValid disallows nulls
public void TestOnValid() {
ConcreteCollection myCollection;
try {
myCollection = new ConcreteCollection();
}
catch (ArgumentNullException) {
}
}
// Test various Insert paths
public void TestInsert() {
ConcreteCollection myCollection;
int numberOfItems;
numberOfItems = 3;
// The constructor inserts
myCollection = new ConcreteCollection(numberOfItems);
Assert(myCollection.onInsertFired);
Assert(myCollection.onInsertCompleteFired);
// Using the IList interface, check inserts in the middle
IList listObj = myCollection;
listObj.Insert(1, 9);
Assert(myCollection.onInsertIndex == 1);
Assert(myCollection.onInsertCompleteIndex == 1);
Assert(myCollection.PeekAt(1) == 9);
}
// Test Clear and it's hooks
public void TestClear()
{
ConcreteCollection myCollection;
int numberOfItems;
numberOfItems = 1;
myCollection = new ConcreteCollection(numberOfItems);
myCollection.Clear();
Assert(myCollection.Count == 0);
Assert(myCollection.onClearFired);
Assert(myCollection.onClearCompleteFired);
}
// Test RemoveAt, other removes and the hooks
public void TestRemove()
{
ConcreteCollection myCollection;
int numberOfItems;
numberOfItems = 3;
// Set up a test collection
myCollection = new ConcreteCollection(numberOfItems);
// The list is 0-based. So if we remove the second one
myCollection.RemoveAt(1);
// We should see the original third one in it's place
Assert(myCollection.PeekAt(1) == 2);
Assert(myCollection.onRemoveFired);
Assert(myCollection.onRemoveIndex == 1);
Assert(myCollection.onRemoveCompleteFired);
Assert(myCollection.onRemoveCompleteIndex == 1);
IList listObj = myCollection;
listObj.Remove(0);
// Confirm parameters are being passed to the hooks
Assert(myCollection.onRemoveIndex == 0);
Assert(myCollection.onRemoveCompleteIndex == 0);
}
// Test the random access feature
public void TestSet()
{
ConcreteCollection myCollection;
int numberOfItems;
numberOfItems = 3;
myCollection = new ConcreteCollection(numberOfItems);
IList listObj = myCollection;
listObj[0] = 99;
Assert((int) listObj[0] == 99);
Assert(myCollection.onSetFired);
Assert(myCollection.onSetCompleteFired);
Assert(myCollection.onSetOldValue == 0);
Assert(myCollection.onSetCompleteOldValue == 0);
Assert(myCollection.onSetNewValue == 99);
Assert(myCollection.onSetCompleteNewValue == 99);
}
}
}
----------------------- CollectionBaseTest.cs ends --------
</pre>
<ul>
* If you use Emacs, you might want to use the .emacs
file and the package developed by Brad Merrill
mailto:[email protected]. It will allow you to
highlight and indent in C# style in your Emacs
editor. (XEmacs will still work but it'll also
complain).
* CSharpDevelop is a GPLed IDE developed by IC#Code.
Search for it at sourceforge if you are interested
in it.
* For those who Java: "A comparison of Microsoft's
C# programming language to Sun Microsystem's Java
Programming language" by Dare Obasanjo is a really good
(very complete) text to read.
* Suggest this point and more, now I can't think of
anything more.
</ul>
Enjoy!!.
(c) 2002, <a href="mailto:[email protected]">Jaime Anguiano Olarra</a>.
The parts included in this document are property of their
respective authors.
Note: The identation of the source code has been changed a bit
so it could fit better in the website. Anyway, as nothing more
changed, the files should work as expected.
+31 -72
View File
@@ -1,96 +1,55 @@
* JIT Compiler
<a
href="http://citeseer.nj.nec.com/vitek97efficient.html">
href="http://cui.unige.ch/OSG/publications/OO-articles/TechnicalReports/98/efficient.pdf">
Efficient Type Inclusion Tests: Jahn Vitek, R. Nigel Horspool, Andres
Krall</a>
<a
href="http://citeseer.nj.nec.com/cytron91efficiently.html">
href="http://citeseer.nj.nec.com/rd/2822939%2C410249%2C1%2C0.25%2CDownload/http%253A%252F%252Fciteseer.nj.nec.com/cache/papers/cs/20094/http%253AzSzzSzwww.math.tau.ac.ilzSz%257EguyzSzjava-optzSzssa.pdf/cytron91efficiently.pdf">
Efficiently Computing Static Single Assignment Form and the Control
Dependence Graph: Ron Cytron, Jeanne Ferrante</a>
<a
href="http://citeseer.nj.nec.com/193349.html">
Practical Improvements to the Construction and Destruction of Static Single Assignment Form: Preston Briggs,
Keith Cooper, Timothy Harvey, Taylor Simpson</a>
<a
href="http://citeseer.nj.nec.com/krall98efficient.html">
Efficient JavaVM Just-in-Time Compilation: Andreas Krall</a>
<a
href="http://citeseer.nj.nec.com/452617.html">Java for
Large-Scale Scientific Computations: Andreas Krall, Phillip Thomsich</a>
<a
href="http://citeseer.nj.nec.com/117522.html">
Engineering Simple, Efficient Code Generator Generator: Christopher
W. Fraser, David R. Hanson, Todd A. Proebsting</a>
<a
href="http://citeseer.nj.nec.com/proebsting92code.html">
Code Generation Techniques: Todd Alan Proebsting</a>
<a
href="http://citeseer.nj.nec.com/74629.html">Fast,
Effective Code Generation in a Just-In-Time Java Compiler: Ali-Reza
Adl-Tabatabai Guei-Yuan Lueh, Vishesh M. Parikh, James M. Stichnoth...</a>
<a
href="http://citeseer.nj.nec.com/bodik00abcd.html">
ABCD: Eliminating Array-Bounds Checks on Demand: Rastislav Bodik, Rajiv Gupta, Vivek Sarkar</a>
* Register Allocation
<a
href="http://citeseer.nj.nec.com/poletto99linear.html">
Linear Scan Register Allocation: Massimiliano Poletto, Vivek Sarkar</a>
<a
href="http://citeseer.nj.nec.com/traub98quality.html">
Quality and Speed in Linear-scan Register Allocation: Omri Traub, Glenn
Holloway, Michael D. Smith</a>
* Loop Transformations
<a
href="http://citeseer.nj.nec.com/bacon93compiler.html">
Compiler Transformations for High-Performance Computing: David Bacon</a>
* Interpreter
<a
href="http://citeseer.nj.nec.com/470069.html">
vmgen-A Generator of Efficient Virtual Machine Interpreters: M. Anton
Ertl, David Gregg, Andreas Krall, Bernd Paysan</a>
* Synchronization
<a
href="http://citeseer.nj.nec.com/krall98monitors.html">
href="http://citeseer.nj.nec.com/rd/14269422%2C217684%2C1%2C0.25%2CDownload/http%253A%252F%252Fciteseer.nj.nec.com/cache/papers/cs/9476/http%253AzSzzSzwww.cs.ucsb.eduzSzconferenceszSzjava98zSzpaperszSzcacao.pdf/krall98monitors.pdf">
Monitors and Exceptions - How to implement Java efficiently: Andreas Krall,
Mark Probst</a>
<a
href="http://citeseer.nj.nec.com/bacon98thin.html">
Thin Locks: Featherweight Synchronization for Java: David Bacon</a>
href="http://citeseer.nj.nec.com/rd/78588775%2C217642%2C1%2C0.25%2CDownload/http%253A%252F%252Fciteseer.nj.nec.com/cache/papers/cs/9476/http%253AzSzzSzwww.complang.tuwien.ac.atzSzandizSzpact_98.pdf/krall98efficient.pdf">
Efficient JavaVM Just-in-Time Compilation: Andreas Krall</a>
<a
href="http://citeseer.nj.nec.com/278639.html">
Featherweight Monitors with Bacon Bits: David Bacon</a>
* Garbage Collection
href="http://www.complang.tuwien.ac.at/andi/scicom_01.ps">Java for
Large-Scale Scientific Computations: Andreas Krall, Phillip Thomsich</a>
<a
href="http://citeseer.nj.nec.com/wilson92uniprocessor.html">
Uniprocessor Garbage Collection Techniques: Paul Wilson</a>
href="http://citeseer.nj.nec.com/rd/62076894%2C117522%2C1%2C0.25%2CDownload/http%253A%252F%252Fciteseer.nj.nec.com/cache/papers/cs/642/ftp%253AzSzzSzftp.cs.princeton.eduzSzpubzSzlcczSzcontribzSziburg.pdf/fraser92engineering.pdf">
Engineering Simple, Efficient Code Generator Generator: Christopher
W. Fraser, David R. Hanson, Todd A. Proebsting</a>
<a
href="http://citeseer.nj.nec.com/41666.html">
A Language-Independent Garbage Collector Toolkit: Richard Hudson, Eliot Moss, Amer Diwan, Christopher Weight</a>
href="http://citeseer.nj.nec.com/rd/8408515%2C54698%2C1%2C0.25%2CDownload/http%253A%252F%252Fciteseer.nj.nec.com/cache/papers/cs/815/http%253AzSzzSzcuiwww.unige.chzSzOSGzSzpeoplezSzjvitekzSzResourceszSzArchivezSzProebsting.pdf/proebsting92code.pdf">
Code Generation Techniques: Todd Alan Proebsting</a>
* Register Allocation
<a
href="http://citeseer.nj.nec.com/seligmann95incremental.html">
Incremental Collection of Mature Objects: Richard Hudson, Eliot Moss</a>
href="http://citeseer.nj.nec.com/rd/28309937%2C283402%2C1%2C0.25%2CDownload/http%253A%252F%252Fciteseer.nj.nec.com/cache/papers/cs/12458/http%253AzSzzSzwww.pdos.lcs.mit.eduzSzpaperszSztoplas-linearscan.pdf/poletto99linear.pdf">
Linear Scan Register Allocation: Massimiliano Poletto, Vivek Sarkar</a>
<a
href="http://citeseer.nj.nec.com/rd/19916683%2C91122%2C1%2C0.25%2CDownload/http%253A%252F%252Fciteseer.nj.nec.com/cache/papers/cs/468/http%253AzSzzSzwww.eecs.harvard.eduzSzhubezSzpaperszSzpldi98-binpack.pdf/traub98quality.pdf">
Quality and Speed in Linear-scan Register Allocation: Omri Traub, Glenn
Holloway, Michael D. Smith</a>
* Interpreter
<a
href="http://citeseer.nj.nec.com/rd/62076894%2C470069%2C1%2C0.25%2CDownload/http%253A%252F%252Fciteseer.nj.nec.com/cache/papers/cs/24640/http%253AzSzzSzwww.complang.tuwien.ac.atzSzpaperszSzertlzPz01.pdf/ertl01vmgen.pdf">
vmgen-A Generator of Efficient Virtual Machine Interpreters: M. Anton
Ertl, David Gregg, Andreas Krall, Bernd Paysan</a>
-15
View File
@@ -1,15 +0,0 @@
* Plans
Here we are tracking some plans to particular pieces of
technology that are part of Mono.
This is just a repository of information that is handy for
contributors.
Currently you can read our plans for <a
href="ado-net.html">ADO.NET</a>, <a
href="asp-net">ASP.NET</a>, <a href="java.html">Java</a> and
<a href="winforms.html">WinForms</a>.
-33
View File
@@ -1,33 +0,0 @@
* Mono PowerPC Port
** Status
It passes and compiles the same amount of mono tests as on the x86 architecture.
mcs is self hosting on Linux/PPC.
*** Interpreter
Up to date.
*** Jitter
Start the port
** Documentation
*** PowerPC architecture:
<A HREF="http://e-www.motorola.com/brdata/PDFDB/docs/MPCFPE32B.pdf">PowerPC Programming environments manual</A><BR>
<A HREF="http://e-www.motorola.com/brdata/PDFDB/docs/MPC7410UM.pdf">G4 (7410) User's manual</A>
There's a very nice introduction to PowerPC assembly language
at <a
href="http://www-106.ibm.com/developerworks/library/l-ppc/">http://www-106.ibm.com/developerworks/library/l-ppc/</a>.
*** Calling conventions:
<a href="http://www.esofta.com/softspecs.html">The PowerPC SystemV ABI specification</a>
-24
View File
@@ -1,24 +0,0 @@
* Open Projects
The .NET framework is a good first in terms of a new
development foundation, but it falls short of providing
higher-level components or building blocks for people to
reuse.
A few ideas of projects and classes that would be useful to
develop applications follows:
** EOG component
** XmlStorageSystem component
* Gtk# related projects
Gnome Canvas Bindings.
Bezier Canvas Item Binding.
* Graphical bindings
Binding for the Libart library
+3 -42
View File
@@ -104,19 +104,10 @@
There are a number of related projects to Mono:
<ul>
* <a
href="http://qtcsharp.sourceforge.net">Qt#:</a>
C# bindings for the Qt toolkit.
* <a
href="http://www.icsharpcode.net/OpenSource/SD/default.asp">Sharp
Develop:</a> an IDE for the C# language written in C#.
* <a
href="http://www.improve-technologies.com/alpha/esharp/">Eclipse
Plugin for C#</a>
* <a
href="http://janet-js.sourceforge.net/">Janet:</a>
an implemention of ECMAScript (the standarized
@@ -142,13 +133,11 @@
href="http://www.southern-storm.com.au/portable_net.html">Portable.NET:</a>
Another implementation of the CLI and C# compiler.
* A Free (GFDL) tutorial on C# in Spanish with examples, slides, and extras (under development). Get it <a href="http://geneura.ugr.es/~jaime/csharp/">here</a>.
</ul>
** GNOME Documentation
Documentation on GNOME, and the GNOME APIs is available from
Documnetation on GNOME, and the GNOME APIs is available from
the <a href="http://developer.gnome.org">developer</a> site at
GNOME:
@@ -162,34 +151,6 @@
* <A
href="http://developer.gnome.org/arch/">Architecture Overview</a>
</ul>
** Assembly Language Manuals online
<ul>
* <a href="http://www.agner.org/assem/#optimize">
Pentium optimization tutorial</a> by Agner Fog
* <a href="http://webster.cs.ucr.edu/">
Art of Assembly</a> (x86 only)
* Documentation for various CPUs
(<a href="http://www.mit.edu/afs/sipb/contrib/doc/specs/ic/cpu/">
x86, IA64, MIPS, ARM, Alpha</a>)
* <a href="http://www.heyrick.co.uk/assembler/">
ARM Assembler</a> tutorial
* PowerPC
<a href="http://www-3.ibm.com/chips/techlib/techlib.nsf/techdocs/852569B20050FF7785256996007558C6">
Compiler Writer's Guide</a>
* <a href="http://www.lightsoft.co.uk/Fantasm/Beginners/begin1.html">
Beginners Guide to PowerPC Assembler</a>
</ul>
** Win32
<ul>
* Win32 <a href="http://www.jorgon.freeserve.co.uk/ExceptFrame.htm">
Structured Exception Handling (SEH)</a> internals (x86 specific)
</ul>
+10 -42
View File
@@ -16,8 +16,14 @@
easy-to-port runtime engine.
</ul>
Currently we are using the Bohem conservative garbage
collector, but we working on incorporating the ORP GC engine.
Currently both runtimes are missing garbage collection. We
are planning on using the ORP GC engine and deploy it by
middle January.
* COM and XPCOM
We plan on adding support for XPCOM on Unix and COM on Microsoft
Windows later in our development process.
** Executing MSIL/CIL images
@@ -54,38 +60,18 @@
layout the code to support non-IA32 architectures. Our work
will be focused on getting a IA32 version running first.
The JIT engine works on Linux and Win32, although you
The JIT engine should work on Linux and Win32, although you
will need to install the CygWin32 development tools to get a
Unix-like compilation environment (mostly we use GNU make in
a few of the makefiles).
** JIT Engine (<b>updated, July 8th, 2002</b>)
** JIT Engine (<b>updated, March 26th, 2002</b>)
The JIT engine uses a code-generator generator approach for
compilation. Given the properties of CIL byte codes, we can
take full advantage of a real instruction selector for our
code generator.
The JIT engine implements a number of optimizations:
<ul>
* Opcode cost estimates (our architecture allows
us to generate different code paths depending
on the target CPU dynamically).
* Inlining.
* Constant folding.
Although compilers typically do
constant folding, the combination of inlining with
constant folding gives some very good results.
* Linear scan register allocation. In the past,
register allocation was our achilles heel, but now
we have left this problem behind.
</ul>
There are a couple of books that deal with this technique: "A
Retargetable C Compiler" and "Advanced Compiler Design and
Implementation" are good references. You can also get a
@@ -179,21 +165,3 @@
Initially we used libffi, but it was fairly slow, so we have
reused parts of the JIT work to create efficient PInvoke trampolines.
** Remoting
Mono has support for remoting and proxy objects, just like
.NET does. The runtime provides these facilities.
** Porting
If you are interested in porting the Mono runtime to other
platforms, you might find the pre-compiled <a
href="archive/mono-tests.tar.gz">Mono regression test
suite</a> useful to debug your implementation.
* COM and XPCOM
We plan on adding support for XPCOM on Unix and COM on Microsoft
Windows later in our development process.
+1 -1
View File
@@ -11,7 +11,7 @@
* The Mono JIT engine (<b>mono</b>. The JIT engine is
the real
virtual machine that we support. It is
currently functional, and we are improving its speed,
functionaly currently, and we are improving its speed,
and making it feature complete.
* A CIL bytecode interpreter (<b>mint</b>). This
-15
View File
@@ -9,38 +9,23 @@
2,System,class-status-System.html,class-status-System.src,cm/cormissing.css,cm/cormissing.js
2,System.Xml,class-status-System.Xml.html,class-status-System.Xml.src,cm/cormissing.css,cm/cormissing.js
2,System.Data,class-status-System.Data.html,class-status-System.Data.src,cm/cormissing.css,cm/cormissing.js
2,System.Drawing,class-status-System.Drawing.html,class-status-System.Drawing.src,cm/cormissing.css,cm/cormissing.js
2,System.Web,class-status-System.Web.html,class-status-System.Web.src,cm/cormissing.css,cm/cormissing.js
2,System.Web.Services,class-status-System.Web.Services.html,class-status-System.Web.Services.src,cm/cormissing.css,cm/cormissing.js
1,C# Compiler,c-sharp.html,c-sharp.src
1,Status,status.html,status.src
0,Download,download.html,download.src
1,CVS access,ccvs.html,ccvs.src
1,AnonCVS access,anoncvs.html,anoncvs.src
0,Contributing,contributing.html,contributing.src
1,Hackers,hackers.html,hackers.src
1,Documentation,documentation.html,documentation.src
1,Class Docs,classlib-doc.html,classlib-doc.src
1,Doc format,monodoc-xml.html,monodoc-xml.src
1,Test Suite,testing.html,testing.src
1,Tools,tools.html,tools.src
1,Porting,porting.html,porting.src
2,PowerPC,ppc.html,ppc.src
1,HOWTO,mono-contribution-howto.html,mono-contribution-howto.src
0,Plans,plans.html,plans.src
1,ADO.NET,ado-net.html,ado-net.src
1,ASP.NET,asp-net.html,asp-net.src
1,Java,java.html,java.src
1,Windows.Forms,winforms.html,winforms.src
0,Resources,resources.html,resources.src
1,Beginning,mono-beginning.html,mono-beginning.src
1,Mailing Lists,mailing-lists.html,mailing-lists.src
1,Ideas,ideas.html,ideas.src
1,Passport,passport.html,passport.src
1,Books,books.html,books.src
1,Papers,papers.html,papers.src
1,Languages,languages.html,languages.src
1,Debugging,jit-debug.html,jit-debug.src
2,Example 1,jit-debug-sample.html,jit-debug-sample.src
2,Example 2,jit-debug-sample2.html,jit-debug-sample2.src
0,Contact,contact.html,contact.src
-2
View File
@@ -123,8 +123,6 @@
.s_ .r_,
.s_ .x,
.s_ .x_,
.s_ .i,
.s_ .i_,
.e_ .r,
.e_ .r_,
+17 -13
View File
@@ -61,20 +61,24 @@ function getChildrenByTagName (elt, strTag)
function viewAll (elt, dictTypes)
{
var fView = false;
var rgImages = getChildrenByTagName (elt, 'IMG');
var cImages = rgImages.length;
for (var iImage = 0; iImage < cImages; iImage++)
{
var strImage = trimSrc (rgImages [iImage].src);
if (dictTypes [strImage])
{
fView = true;
break;
}
}
var rgElts = getChildrenByTagName (elt, 'DIV');
var cElts = rgElts.length;
if (cElts != 0)
if (cElts == 0)
{
var rgImages = getChildrenByTagName (elt, 'IMG');
var cImages = rgImages.length;
for (var iImage = 0; iImage < cImages; iImage++)
{
var image = rgImages [iImage];
var strImage = trimSrc (rgImages [iImage].src);
if (dictTypes [strImage])
{
fView = true;
break;
}
}
}
else
{
var iElt;
for (iElt = 0; iElt < cElts; iElt ++)
@@ -318,7 +322,7 @@ function filterTree ()
dictTypes ['se'] = true;
if (eltExtra.checked)
dictTypes ['sx'] = true;
// dictTypes ['sc'] = true;
dictTypes ['sc'] = true;
viewAll (document.getElementById ('ROOT'), dictTypes);
}
-5
View File
@@ -15,11 +15,6 @@ while (<>){
print "<p>\n";
} elsif (/^\t\t\* (.*)$/) {
print "<li>$1\n";
} elsif (/^\@item (.*)$/){
$name = $link = $1;
$link =~ s/ //g;
print "<a name=\"$link\">\n";
print "<h2>$name</h2>\n";
} elsif (/^Q: (.*)$/){
print "<p><a name=\"q$q\"></a><b>Question $q:</b> $1\n";
$q++;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 429 B

+33 -86
View File
@@ -1,99 +1,49 @@
CSCRIPT = $(SYSTEMROOT)/system32/cscript.exe
CSC=csc
CORCOMPARE=../../../mcs/tools/corcompare
OBJECTS= \
deploy/ado-net.html \
deploy/anoncvs.html \
deploy/asp-net.html \
deploy/books.html \
deploy/contributing.html \
deploy/class-status.html \
deploy/class-status-corlib.html \
deploy/class-status-System.html \
deploy/class-status-System.Xml.html \
deploy/class-status-System.Drawing.html \
deploy/class-status-System.Data.html \
deploy/class-status-System.Web.html \
deploy/class-status-System.Web.Services.html \
deploy/class-library.html \
deploy/classlib-doc.html \
deploy/contact.html \
deploy/c-sharp.html \
deploy/ccvs.html \
deploy/documentation.html \
deploy/download.html \
deploy/faq.html \
deploy/gcc-frontend.html \
deploy/hackers.html \
deploy/index.html \
deploy/ideas.html \
deploy/java.html \
deploy/jit-debug.html \
deploy/jit-debug-sample.html \
deploy/jit-debug-sample2.html \
deploy/languages.html \
deploy/mailing-lists.html \
deploy/mono-beginning.html \
deploy/mono-contribution-howto.html \
deploy/monodoc-xml.html \
deploy/papers.html \
deploy/passport.html \
deploy/plans.html \
deploy/porting.html \
deploy/ppc.html \
deploy/rationale.html \
deploy/resources.html \
deploy/roadmap.html \
deploy/runtime.html \
deploy/status.html \
deploy/testing.html \
deploy/tools.html \
deploy/winforms.html
# deploy/class-status-System.html \
deploy/anoncvs.html \
deploy/contributing.html \
deploy/class-status.html \
deploy/class-status-corlib.html \
deploy/class-status-System.html \
deploy/class-status-System.Xml.html \
deploy/class-status-System.Data.html \
deploy/class-status-System.Web.html \
deploy/class-library.html \
deploy/classlib-doc.html \
deploy/contact.html \
deploy/c-sharp.html \
deploy/ccvs.html \
deploy/documentation.html \
deploy/download.html \
deploy/faq.html \
deploy/gcc-frontend.html \
deploy/index.html \
deploy/ideas.html \
deploy/mailing-lists.html \
deploy/monodoc-xml.html \
deploy/passport.html \
deploy/rationale.html \
deploy/resources.html \
deploy/roadmap.html \
deploy/runtime.html \
deploy/status.html \
deploy/testing.html \
deploy/porting.html \
deploy/tools.html \
deploy/books.html \
deploy/papers.html
NON_HTML_SOURCES= \
../mono-build.sh \
../mono-build-w32.sh
all: $(OBJECTS) deploy/index.rss
all: $(OBJECTS)
perl process.pl commands template.html.in deploy
tutorial: mono-beginning.html.stamp mono-beginning.pdf
cp -a mono-beginning mono-beginning.xml mono-beginning.pdf deploy
tutorial-windows: mono-beginning-windows.html.stamp mono-beginning-windows.pdf
cp -a mono-beginning-windows.xml mono-beginning-windows.pdf deploy
mono-beginning.html.stamp: mono-beginning.xml
db2html mono-beginning.xml
touch mono-beginning.html.stamp
mono-beginning.pdf: mono-beginning.xml
db2pdf mono-beginning.xml
mono-beginning.xml: ../mono-beginning.xml
cp ../mono-beginning.xml .
mono-beginning-windows.html.stamp: mono-beginning-windows.xml
db2html mono-beginning-windows.xml
touch mono-beginning-windows.html.stamp
mono-beginning-windows.pdf: mono-beginning-windows.xml
db2pdf mono-beginning-windows.xml
mono-beginning-windows.xml: ../mono-beginning-windows.xml
cp ../mono-beginning-windows.xml .
deploy/index.rss: mono-rss.exe ../index
./mono-rss.exe ../index deploy/index.rss
mono-rss.exe: mono-rss.cs rss.cs
$(CSC) mono-rss.cs rss.cs
clean:
rm -f $(OBJECTS) $(patsubst deploy/%.html,src/%.src, $(OBJECTS)) src/*.xml src/*.html.in ../class-status-* ../class-status
@@ -138,6 +88,3 @@ src/corlib.xml: ../../../mcs/class/lib/corlib_cmp.dll $(CORCOMPARE)/CorCompare.e
../class-status: ../class-status.in
cp -f $< $@
make-rss:
$(CSC) make-rss.cs -o
-103
View File
@@ -1,103 +0,0 @@
//
// Generates the Mono RSS feed
//
// Miguel de Icaza
//
using System;
using System.IO;
using System.Xml;
using RSS;
class X {
static RSS.RSS rss;
static Channel c;
static int item_count;
static void PopulateRSS (StreamReader input)
{
string s;
while ((s = input.ReadLine ()) != null){
if (s.StartsWith ("@item "))
break;
}
if (s == null || !s.StartsWith ("@item ")){
Console.WriteLine ("Could not find beginning of text to RSS");
return;
}
Item i = null;
string description = "";
do {
if (s.StartsWith ("@item ")){
if (item_count++ > 25)
break;
if (i != null){
i.Description = description;
description = "";
}
string title = s.Substring (6);
string link = "http://www.go-mono.com/index.html#";
foreach (char ch in title){
if (ch != ' ')
link += ch;
}
i = c.NewItem ();
i.Title = title;
i.Link = link;
} else {
description += "\n" + (s == "\n" ? "<p>" : s);
}
} while ((s = input.ReadLine ()) != null);
if (i != null){
i.Description = description;
}
}
static void MakeRSS (string input, string output)
{
rss = new RSS.RSS ();
c = rss.NewChannel ("Mono Project News", "http://www.go-mono.com");
c.Title = "Mono Project News";
c.Link = "http://www.go-mono.com";
c.Description =
"News from the Mono project: a portable implementation of the .NET Framework";
c.WebMaster = "[email protected]";
c.ManagingEditor = "[email protected]";
string t = File.GetLastWriteTime (input).ToString ("r");
c.PubDate = t;
c.LastBuildDate = t;
using (FileStream fs = new FileStream (input, FileMode.Open)){
using (StreamReader input_stream = new StreamReader (fs)){
PopulateRSS (input_stream);
}
}
rss.XmlDocument.Save (output);
}
static int Main (string [] args)
{
switch (args.Length){
case 0:
MakeRSS ("index", "index.rss");
break;
case 2:
MakeRSS (args [0], args [1]);
break;
default:
Console.WriteLine ("Usage is: mono-rss [input output.rss]");
return 1;
}
return 0;
}
}
-262
View File
@@ -1,262 +0,0 @@
//
// RSS.cs: Some utility classes to generate RSS feeds
//
// (C) 2002 Miguel de Icaza ([email protected])
//
//
using System;
using System.Xml;
using System.IO;
namespace RSS {
public class Item {
XmlDocument doc;
XmlNode item;
XmlText title, link, description;
public Item (XmlDocument doc, XmlNode item)
{
this.doc = doc;
this.item = item;
}
XmlText MakeTextElement (string name)
{
XmlNode node = doc.CreateElement (name);
XmlText text = doc.CreateTextNode ("");
item.AppendChild (node);
node.AppendChild (text);
return text;
}
public string Title {
get {
if (title == null)
return null;
return title.Value;
}
set {
if (title == null)
title = MakeTextElement ("title");
title.Value = value;
}
}
public string Link {
get {
if (link == null)
return null;
return link.Value;
}
set {
if (link == null)
link = MakeTextElement ("link");
link.Value = value;
}
}
public string Description {
get {
if (description == null)
return null;
return description.Value;
}
set {
if (description == null)
description = MakeTextElement ("description");
description.Value = value;
}
}
}
public class Channel {
XmlDocument doc;
XmlNode channel;
XmlText title, link, description, language, pubDate, lastBuildDate;
XmlText managingEditor, webMaster;
XmlText MakeTextElement (string name)
{
XmlNode node = doc.CreateElement (name);
XmlText text = doc.CreateTextNode ("");
channel.AppendChild (node);
node.AppendChild (text);
return text;
}
public Channel (XmlDocument doc, XmlNode node)
{
this.channel = node;
this.doc = doc;
title = MakeTextElement ("title");
link = MakeTextElement ("link");
description = MakeTextElement ("description");
}
public Item NewItem ()
{
XmlNode node = doc.CreateElement ("item");
Item item;
channel.AppendChild (node);
item = new Item (doc, node);
return item;
}
public string Title {
get {
return title.Value;
}
set {
title.Value = value;
}
}
public string Link {
get {
return link.Value;
}
set {
link.Value = value;
}
}
public string Description {
get {
return description.Value;
}
set {
description.Value = value;
}
}
#region Optional Values
public string ManagingEditor {
get {
if (managingEditor == null)
return null;
return managingEditor.Value;
}
set {
if (managingEditor == null)
managingEditor = MakeTextElement ("managingEditor");
managingEditor.Value = value;
}
}
public string WebMaster {
get {
if (webMaster == null)
return null;
return webMaster.Value;
}
set {
if (webMaster == null)
webMaster = MakeTextElement ("webMaster");
webMaster.Value = value;
}
}
public string PubDate {
get {
if (pubDate == null)
return null;
return pubDate.Value;
}
set {
if (pubDate == null)
pubDate = MakeTextElement ("pubDate");
pubDate.Value = value;
}
}
public string LastBuildDate {
get {
if (lastBuildDate == null)
return null;
return lastBuildDate.Value;
}
set {
if (lastBuildDate == null)
lastBuildDate = MakeTextElement ("lastBuildDate");
lastBuildDate.Value = value;
}
}
public string Language {
get {
if (language == null)
return null;
return language.Value;
}
set {
if (language == null)
language = MakeTextElement ("language");
language.Value = value;
}
}
#endregion
}
class RSS {
XmlDocument doc;
XmlNode rss;
const string rss_base =
"<?xml version=\"1.0\"?> <rss version=\"0.92\"></rss>";
public RSS ()
{
doc = new XmlDocument ();
doc.LoadXml (rss_base);
rss = doc.DocumentElement;
}
public Channel NewChannel (string title, string url)
{
XmlNode node = doc.CreateElement ("channel");
Channel c;
rss.AppendChild (node);
c = new Channel (doc, node);
return c;
}
public XmlDocument XmlDocument {
get {
return doc;
}
}
}
}
+21 -27
View File
@@ -1,4 +1,3 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>#TITLE#</title>
@@ -36,28 +35,25 @@
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td><img src="images/pixel.gif" alt=""></td><!-- left border -->
<td><img src="images/pixel.gif"></td><!-- left border -->
<td colspan="4">
<a href="http://www.go-mono.com"><img src="images/mono.gif"
alt="mono-logo" border="0"></a></td>
<td><img src="images/pixel.gif" alt=""></td><!-- right border -->
<a href="http://www.go-mono.com"><img src="images/mono.gif" border="0"></a></td>
<td><img src="images/pixel.gif"></td><!-- right border -->
</tr>
<tr>
<td><img src="images/pixel.gif" width="1" height="1" alt=""></td>
<td colspan="3" bgcolor="black"><img src="images/pixel.gif"
height="2" alt=""></td>
<td bgcolor="black"><img src="images/pixel.gif" width="1" alt=""></td>
<td><img src="images/pixel.gif" alt=""></td>
<td><img src="images/pixel.gif" width="1" height="1"></td>
<td colspan="3" bgcolor="black"><img src="images/pixel.gif" height="2"></td>
<td bgcolor="black"><img src="images/pixel.gif" width="1"></td>
<td><img src="images/pixel.gif"></td>
</tr>
<tr>
<td width="100"><img src="images/pixel.gif" alt=""></td>
<td width="100"><img src="images/pixel.gif"></td>
<td valign="top">
<table cellpadding="2" valign="top" cellspacing="0" border="0">
#MENU#
</table>
</td>
<td bgcolor="black" width="1"><img src="images/pixel.gif"
width="1" alt=""></td>
<td bgcolor="black" width="1"><img src="images/pixel.gif" width="1"></td>
<td bgcolor="white" align="left" width="80%" valign="top">
<table cellpadding="16">
<tr><td>
@@ -65,26 +61,24 @@
</td></tr>
</table>
</td>
<td bgcolor="black"><img src="images/pixel.gif" width="1" alt=""></td>
<td width="100"><img src="images/pixel.gif" alt=""></td>
<td bgcolor="black"><img src="images/pixel.gif" width="1"></td>
<td width="100"><img src="images/pixel.gif"></td>
</tr>
<tr>
<td colspan="2">
<img src="images/pixel.gif" alt=""></td>
<td colspan="2" bgcolor="black"><img src="images/pixel.gif"
height="1" alt=""></td>
<td bgcolor="black"><img src="images/pixel.gif" width="1" alt=""></td>
<td><img src="images/pixel.gif" alt=""></td>
<img src="images/pixel.gif"></td>
<td colspan="2" bgcolor="black"><img src="images/pixel.gif" height="1"></td>
<td bgcolor="black"><img src="images/pixel.gif" width="1"></td>
<td><img src="images/pixel.gif"></td>
</tr>
<tr>
<td colspan="2"></td>
<td colspan="2" align="center">
<a class="footnote" href="mailto:[email protected]">[email protected]</a>
</td>
<td colspan="2"></td>
<td colspan="2"></td>
<td colspan="2" align="center">
<a class="footnote" href="mailto: [email protected]">[email protected]</a>
</td>
<td colspan="2"></td>
</tr>
</tr>
</tr>
</table>
</body>
-90
View File
@@ -1,90 +0,0 @@
* System.Windows.Forms
System.Windows.Forms eventually will support multiple
toolkits. Ximian will be delivering a product that will allow
for System.Windows.Forms applications to integrate with GNOME
through Gtk and MacOS X using Cocoa.
There are no current plans to support embedded devices, but
Gtk/FrameBuffer is an option. If you have suggestions or
recommendations, please let us <a
href="mailto:[email protected]">let us know</a>
* Contributing
Currently Ximian developers are busy making our JIT engine
feature complete, and dealing with the low-level details of
the Mono runtime.
If you are interested in contributing, you can start stubbing
out classes and providing enumerations. That will help us
significantly when we start working on the actual bindings.
Christian Meyer is currently organizing this effort.
* System.Drawing
Using existing libraries to implement some of the functionality required
<ul>
* gdk-pixbuf is a generic image loader that loads an image
and leaves it into an RGB buffer. It hides all the details
about what image file format is being loaded.
* Libart is a general framework for rendering RGB/RGBA
buffers into RGB buffers and rendering postscript-like paths into
RGB/RGBA buffers.
</ul>
We want to use gdk-pixbuf as the image loader for the image
classes, and then we need operations to render that into the
windowing system (Gtk+, MacOS, etc). But notice how there is
very little dependnecies in Gdk-pixbuf on gtk, and libart has
none.
They are pretty independent from a windowing system
(gdk-pixbuf comes with some "helper" routines for rendering
data into a pixmap and to load pixmaps into RGB buffers).
A few things to keep in mind:
<ul>
* gdk-pixbuf can be used to load images for Gtk+,
MacOS X and Windows, it should be pretty portable,
although we might need in the future to back-port
some new features from Gtk head.
* Libart is probably only going to be used with X11,
as the MacOS X provides the same features in Quartz,
and Win32 *probably* has that in GDI+. If not, we
should use libart in Win32 as well (or for older
Windows systems).
</ul>
* Directory Layout
System.Drawing (assembly directory)
System.Drawing.Blah
Common code for "Blah"
Stubs for "Blah" to ease ports.
Gtk
System.Drawing.Blah.
Gtk ports of "System.Drawing.Blah"
MacOS
System.Drawing.Blah
MacOS ports of "System.Drawing.Blah"
Win32
System.Drawing.Blah
Win32 ports of "System.Drawing.Blah"
Then we use nant targets to include/exclude the right set of
files to create the assembly.
* Open questions:
I believe that the graphics contexts that are used to render
can accept either libart-like rendering operations and
X11-like rendering operations. This complicates matters, but
I am not sure. Someone needs to investigate this.
-2
View File
@@ -1,2 +0,0 @@
Makefile
Makefile.in
-3
View File
@@ -1,3 +0,0 @@
EXTRA_DIST = gc-issues jit-thoughts object-layout unmanaged-calls \
exceptions jit-trampolines stack-alignment embedded-api
-227
View File
@@ -1,227 +0,0 @@
Embedding the Mono runtime, preliminary version
Miguel de Icaza, Paolo Molaro.
This document describes how to embed the Mono runtime in your
application, and how to invoke CIL methods from C, and how to
invoke C code from CIL.
* Embedding the runtime.
Embedding the runtime consists of various steps:
* Compiling and linking the Mono runtime
* Initializing the Mono runtime
* Optionally expose C code to the C#/CIL universe.
These are discussed in detail next.
** Compiling and Linking
To embed the runtime, you have to link your code against the
Mono runtime libraries. To do this, you want to pass the
flags returned by pkg-config to your compiler:
pkg-config --cflags --libs mono
Like this:
gcc sample.c `pkg-config --cflags --libs mono`
You can separate the compilation flags from the linking flags, for
instance, you can use the following macros in your makefile:
CFLAGS=`pkg-config --cflags mono`
LDFLAGS=`pkg-config --libs mono`
** Initializing the Mono runtime
To initialize the runtime, call mono_jit_init, like this:
MonoDomain *domain;
domain = mono_jit_init ("domain-name");
That will return a MonoDomain where your code will be
executed. You can create multiple domains. Each domain is
isolated from the other domains and code in one domain will
not interfere with code in other domains. This is useful if
you want to host different applications in your program.
Then you can load an assembly containing code into the domain:
MonoAssembly *assembly;
assembly = mono_domain_assembly_open ("file.dll");
if (!assembly)
error ();
In the above example, the contents of `file.dll' will be
loaded into the domain. This only loads the code, but it will
not execute anything yet. You can replace `file.dll' with
another transport file, like `file.exe'
To start executing code, you must invoke a method in the
assembly, or if you have provided a static Main method (an
entry point), you can use the convenience function:
retval = mono_jit_exec (domain, assembly, argc - 1, argv + 1);
If you want to invoke a different method, look at the
`Invoking Methods in the CIL universe' section later on.
** Shutting down the runtime
To shutdown the Mono runtime, you have to clean up all the
domains that were created, use this function:
mono_jit_cleanup (domain);
* Exposing C code to the CIL universe
The Mono runtime provides two mechanisms to expose C code to
the CIL universe: internal calls and native C code. Internal
calls are tightly integrated with the runtime, and have the
least overhead, as they use the same data types that the
runtime uses.
The other option is to use the Platform Invoke (P/Invoke) to
call C code from the CIL universe, using the standard P/Invoke
mechanisms.
To register an internal call, use this call in the C code:
mono_add_internal_call ("Hello::Sample", sample);
Now, you need to declare this on the C# side:
using System;
using System.Runtime.CompilerServices;
class Hello {
[MethodImplAttribute(MethodImplOptions.InternalCall)]
extern static string Sample ();
}
Since this routine returns a string, here is the C definition:
static MonoString*
Sample ()
{
return mono_string_new (mono_domain_get (), "Hello!");
}
Notice that we have to return a `MonoString', and we use the
`mono_string_new' API call to obtain this from a string.
* Invoking Methods in the CIL universe
Calling a method in the CIL universe from C requires a number of steps:
* Obtaining the MonoMethod handle to the method.
* The method invocation.
** Obtaining a MonoMethod
To get a MonoMethod there are several ways.
You can get a MonoClass (the structure representing a type)
using:
MonoClass *
mono_class_from_name (MonoImage *image, const char* name_space, const char *name);
and then loop in the returned class method array until you get
the one you're looking for. There are examples of such
searches as static functions in several C files in
metadata/*.c: we need to expose one through the API and remove
the duplicates.
The other, simpler, way is to use the functions in
debug-helpers.h: there are examples of their use in monograph,
mint and the jit as well. You basically use a string
description of the method, like:
"System.Object:GetHashCode()"
and create a MonoMethodDesc out of it with:
MonoMethodDesc* mono_method_desc_new (const char *name, gboolean include_namespace);
You can then use:
MonoMethod* mono_method_desc_search_in_class (MonoMethodDesc *desc, MonoClass *klass);
MonoMethod* mono_method_desc_search_in_image (MonoMethodDesc *desc, MonoImage *image);
to search for the method in a class or in an image. You would
tipically do this just once at the start of the program and
store the result for reuse somewhere.
** Invoking a Method
There are two functions to call a managed method:
MonoObject*
mono_runtime_invoke (MonoMethod *method, void *obj, void **params,
MonoObject **exc);
and
MonoObject*
mono_runtime_invoke_array (MonoMethod *method, void *obj, MonoArray *params,
MonoObject **exc);
obj is the 'this' pointer, it should be NULL for static
methods, a MonoObject* for object instances and a pointer to
the value type for value types.
The params array contains the arguments to the method with the
same convention: MonoObject* pointers for object instances and
pointers to the value type otherwise. The _invoke_array
variant takes a C# object[] as the params argument (MonoArray
*params): in this case the value types are boxed inside the
respective reference representation.
From unmanaged code you'll usually use the
mono_runtime_invoke() variant.
Note that this function doesn't handle virtual methods for
you, it will exec the exact method you pass: we still need to
expose a function to lookup the derived class implementation
of a virtual method (there are examples of this in the code,
though).
You can pass NULL as the exc argument if you don't want to
catch exceptions, otherwise, *exc will be set to the exception
thrown, if any. if an exception is thrown, you can't use the
MonoObject* result from the function.
If the method returns a value type, it is boxed in an object
reference.
We have plans for providing an additional method that returns
an unmanaged->managed thunk like this:
void* mono_method_get_unmanaged_thunk (MonoMethod *method);
You'll be able to store the returned pointer in a function
pointer with the proper signature and call that directly from
C:
typedef gint32 (*GetHashCode) (MonoObject *obj);
GetHashCode func = mono_method_get_unmanaged_thunk (System_Object_GetHashCode_method);
gint32 hashvalue = func (myobject);
It may not be possible to manage exceptions in that case,
though. I need to think more about it.
* Samples
See the sample programs inmono/sample/embed for examples of
embedding the Mono runtime in your application.
+1 -1
View File
@@ -16,7 +16,7 @@ unmanaged code. That way we can recover from exceptions inside unmanaged code.
void handle_exception ((struct sigcontext *ctx, gpointer obj)
{
if (ctx->bp < mono_end_of_stack) {
if (ctx->ip < mono_end_of_stack) {
/* unhandled exception */
abort ();
}
-31
View File
@@ -1,31 +0,0 @@
* GC issues you need to be careful about when hacking on the mono runtime.
mono currently uses the Boehm garbage collection library. This is a conservative
GC package: this means that the memory is searched for possible memory references
to chunks allocated with the GC. Not all the memory is searched, but only the memory
allocated with the GC itself (unless you use the 'atomic' variant of the allocation
routines), the stack and global variables. Also, if the last reference to an object
is stored in an area of themory that is not searched, the object may be freed resulting
in memory corruption ind segfaults.
In particular, memory allocated with system's malloc() is not searched, so you need to be
careful NOT to store object references in memory allocated with malloc() (unless you are sure
that the object reference will be live at the same time in some other area under the control
of the GC (on the stack or in a global variable, for example). Since g_malloc()
ultimately calls system malloc() the data structures in GLib are not safe to
use to store object references.
Occasionally, you'll need to store some object reference from C code: in this case,
you must make sure that the store location is searched by the GC. You can safely
use thread local storage areas, global variables, stack variables. If you need a more
complicated data structure, you can use a hash table: MonoGHashTable.
This hash table has the same interface as GHashTable from GLib, just stick the "mono_"
prefix in function calls and the "Mono" prefix in the hash table type name.
This hash table ensures that object references stored in it are tracked by the GC, as long
as the pointer to the hash is tracked itself.
Other data structures that are allocated with the GC and are safe to use to store pointers
to GC-allocated memory, are MonoDomain (keeps track of many domain specfic objects)
and MonoVTable (referenced by MonoDomain: keeps track of the static data of a type
since that can hold references to objects).
-59
View File
@@ -1,59 +0,0 @@
* How to map C# types for use in the C implementation of internal calls
C# type C type
char gunichar2
bool MonoBoolean
sbyte signed char
byte guchar
short gint16
ushort guint16
int gint32
uint guint32
long gint64
ulong guint64
IntPtr/UIntPtr gpointer
object MonoObject*
string MonoString*
For ref and out paramaters you'll use the corresponding pointer type.
Arrays of any type must be described with a MonoArray* and the elements
must be accessed with the mono_array_* macros.
Any other type that has a matching C structure representation, should use
a pointer to the struct instead of a generic MonoObject pointer.
Instance methods that are internal calls will receive as first argument
the instance object, so you must account for it in the C method signature:
[MethodImplAttribute(MethodImplOptions.InternalCall)]
public extern override int GetHashCode ();
becaomes:
gint32 ves_icall_System_String_GetHashCode (MonoString *this);
* How to hook internal calls with the runtime
Once you require an internal call in corlib, you need to create a C
implementation for it and register it in a static table in metadata/icall.c.
Add an entry in the table like:
"System.String::GetHashCode", ves_icall_System_String_GetHashCode,
Note that you need to include the full namespace.name of the class.
If there are overloaded methods, you need also to specify the signature
of _all_ of them:
[MethodImplAttribute(MethodImplOptions.InternalCall)]
public extern override void DoSomething ();
[MethodImplAttribute(MethodImplOptions.InternalCall)]
public extern override void DoSomething (bool useful);
should be mapped with:
"Namespace.ClassName::DoSomething()", ves_icall_Namespace_ClassName_DoSomething,
"Namespace.ClassName::DoSomething(bool)", ves_icall_Namespace_ClassName_DoSomething_bool,
+73
View File
@@ -0,0 +1,73 @@
How to use the debug support in the jit.
----------------------------------------
You need to run mono inside gdb. The following command line swicthes
are available:
--stabs
--dwarf
--debug className:methodName
--stabs will create an assemblyname-stabs.s file for each assembly the
CLR program uses. Note that to properly display source code lines,
you need to disassemble the CLR executables with monodis before running
mono. Each IL assembly file needs to have the name <assemblyname>.il.
--dwarf will create an assemblyname-dwarf.s file for each assembly the
CLR program uses. Note that to properly display source code lines,
you need to disassemble the CLR executables with monodis before running
mono. Each IL assembly file needs to have the name <assemblyname>.il.
--debug className:methodName will insert a breakpoin at the beginning of
methodName's code, so that control is trasnfered to the debugger as soon
as it is entered. You may use this switch multiple times.
So, suppose you use the --debug switch, or hit a segfault inside a
jitted method. In a shell you need to compile the stab/dwarf information
created with the --stabs or --dwarf option with the assembler:
as assemblyname-stabs.s -o assemblyname-stabs.o
or
as assemblyname-dwarf.s -o assemblyname-dwarf.o
Now, inside gdb, you can load the debug information with:
add-symbol-file assemblyname-stabs.o 0
or
add-symbol-file assemblyname-dwarf.o 0
And at this point the debugger should be able to print a correct
backtrace, you should be able to inspect method parameters and local
variables, disassemble methods and step through the code.
Using the DWARF 2 debugging format (with the --dwarf) argument is the
recommended one since it supports source files with more than 65.536
lines (for instance corlib.il) and you'll also get much better type
support with it. [FIXME: I'm still working on this, but it's already
making good progress. Martin].
However, some systems or debuggers may not support the DWARF 2 format,
in this case just use stabs.
Note that apparently you can't unload a symbol file from gdb, so you
need to restart it if you restart the program to debug.
Name mangling.
-------------
Currently CLR methods are exposed as C functions, so, if they are not
static, their first argument will be called 'this'.
Method names are mangled in the following way: a long name is created
concatting namespace, class name and method name. '.' chars are changed
to underscaore '_'. To allow for overloading, the address of the
MonoMethod from wich the method was created is appended to the end of
the name (i's also handy since you can use the address in gdb to inspect
the MonoMethod).
[This will change with DWARF 2 since this format is capable of storing
the full type name as it's seen by the programming language and doesn't
need any mangling. Martin]
-64
View File
@@ -1,64 +0,0 @@
Register Allocation
===================
The current JIT implementation uses a tree matcher to generate code. We use a
simple algorithm to allocate registers in trees, and limit the number of used
temporary register to 4 when evaluating trees. So we can use 2 registers for
global register allocation.
Register Allocation for Trees
=============================
We always evaluate trees from left to right. When there are no more registers
available we need to spill values to memory. Here is the simplified algorithm.
gboolean
tree_allocate_regs (tree, exclude_reg)
{
if (!tree_allocate_regs (tree->left, -1))
return FALSE;
if (!tree_allocate_regs (tree->right, -1)) {
tree->left->spilled == TRUE;
free_used_regs (tree->left);
if (!tree_allocate_regs (tree->right, tree->left->reg))
return FALSE;
}
free_used_regs (tree->left);
free_used_regs (tree->right);
/* try to allocate a register (reg != exclude_reg) */
if ((tree->reg = next_free_reg (exclude_reg)) != -1)
return TRUE;
return FALSE;
}
The emit routing actually spills the registers:
tree_emit (tree)
{
tree_emit (tree->left);
if (tree->left->spilled)
save_reg (tree->left->reg);
tree_emit (tree->right);
if (tree->left->spilled)
restore_reg (tree->left->reg);
emit_code (tree);
}
Global Register Allocation
==========================
TODO.
+1 -1
View File
@@ -50,7 +50,7 @@ LDC.1 (5,1) [5,0]
STLOC.0 (5) [1,0]
STLOC.1 () [1,5]
A simple forest generation generates:
The current forest generation generates:
STLOC.0(LDC.1)
STLOC.1(LDLOC.0)
-98
View File
@@ -1,98 +0,0 @@
=pod
=head1 Internal design document for the mono_handle_d
This document is designed to hold the design of the mono_handle_d and
not as an api reference.
=head2 Primary goal and purpose
The mono_handle_d is a process which takes care of the (de)allocation
of scratch shared memory and handles (of files, threads, mutexes,
sockets etc. see L<WapiHandleType>) and refcounts of the
filehandles. It is designed to be run by a user and to be fast, thus
minimal error checking on input is done and will most likely crash if
given a faulty package. No effort has been, or should be, made to have
the daemon talking to machine of different endianness/size of int.
=head2 How to start the daemon
To start the daemon you either run the mono_handle_d executable or try
to attach to the shared memory segment via L<_wapi_shm_attach> which
will start a daemon if one does not exist.
=head1 Internal details
The daemon works by opening a socket and listening to clients. These
clients send packages over the socket complying to L<struct
WapiHandleRequest>.
=head2 Possible requests
=over
=item WapiHandleRequest_New
Find a handle in the shared memory segment that is free and allocate
it to the specified type. To destroy use
L</WapiHandleRequest_Close>. A L<WapiHandleResponse> with
.type=WapiHandleResponseType_New will be sent back with .u.new.handle
set to the handle that was allocated. .u.new.type is the type that was
requested.
=item WapiHandleRequestType_Open
Increase the ref count of an already created handle. A
L<WapiHandleResponse> with .type=WapiHandleResponseType_Open will be sent
back with .u.new.handle set to the handle, .u.new.type is set to the
type of handle this is.
=item WapiHandleRequestType_Close
Decrease the ref count of an already created handle. A
L<WapiHandleResponse> with .type=WapiHandleResponseType_Close will be
sent back with .u.close.destroy set to TRUE if ref count for this
client reached 0.
=item WapiHandleRequestType_Scratch
Allocate a shared memory area of size .u.scratch.length in bytes. A
L<WapiHandleResponse> with .type=WapiHandleResponseType_Scratch will be
sent back with .u.scratch.idx set to the index into the shared
memory's scratch area where to memory begins. (works just like
malloc(3))
=item WapiHandleRequestType_Scratch
Deallocate a shared memory area, this must have been allocated before
deallocating. A L<WapiHandleResponse> with
.type=WapiHandleResponseType_ScratchFree will be sent back (works just
like free(3))
=back
=head1 Why a daemon
From an email:
Dennis: I just have one question about the daemon... Why does it
exist? Isn't it better performancewise to just protect the shared area
with a mutex when allocation a new handle/shared mem segment or
changing refcnt? It will however be a less resilient to clients that
crash (the deamon cleans up ref'd handles if socket closes)
Dick: It's precisely because with a mutex the shared memory segment
can be left in a locked state. Also, it's not so easy to clean up
shared memory without it (you can't just mark it deleted when creating
it, because you can't attach any more readers to the same segment
after that). I did some minimal performance testing, and I don't
think the daemon is particularly slow.
=head1 Authors
Documentaion: Dennis Haney
Implementation: Dick Porter
=cut
-26
View File
@@ -1,26 +0,0 @@
Runtime support for Remoting
============================
The runtime supports a special objects called "TransparentProxy". You can
create objects of this type by calling GetTransparentProxy() on a "RealProxy"
object.
LDFLD/STFLD for transparent proxies
===================================
Access to fields must be redirected to the remote object. System.Object has
some special methods for that:
void FieldGetter (string typeName, string fieldName, ref object val);
void FieldSetter (string typeName, string fieldName, object val);
This methods are never called on actual object. The are only used to pack
LDFLD/STFLD operations into method call messages, which are then passed to the
RealProxy::Invoke() method.
There are two helper methods which can be used by the JIT and the interpreter
to convert LDFLD/STFLD operations into messages and then call
RealProxy::Invoke(): mono_store_remote_field() and mono_load_remote_field().
+1 -1
View File
@@ -1,4 +1,4 @@
man_MANS = mcs.1 mono.1 monostyle.1 mono-config.5
man_MANS = mcs.1 mono.1
EXTRA_DIST = $(man_MANS)
+26 -71
View File
@@ -11,13 +11,6 @@ compiler, and a set of source files. Extra options or arguments can
be provided in a response file. Response files are referenced by
prepending the @ symbol to the response file name.
.PP
The Mono C# compiler accepts the same options than the Microsoft C#
compiler does. Those options can start with a slash or a dash
(/checked is the same as -checked). Additionally to this, the
GNU-like options are supported, those begin with "--". All
MCS-specific flags which are not available in the Microsoft C#
compiler are available only with the GNU-style options.
.PP
C# source files must end with a ".cs" extension. Compilation of C#
source code requires all the files that make up a library, module or
executable to be provided on the command line. There is no support
@@ -36,26 +29,17 @@ Executables are not bound to a specific CPU or operating system.
.I \-\-about
Displays information about the Mono C# compiler
.TP
.I -checked, -checked+
.I \-\-checked
Sets the default compilation mode to `checked'. This makes all
the math operations checked (the default is unchecked).
.TP
.I -checked-
Sets the default compilation mode to `unchecked'. This makes all
the math operations unchecked (this is the default).
.I \-\-define SYMBOL
Defines a symbol named SYMBOL. This can be tested in the source code
by the pre-processor.
.TP
.I \-define:SYMLIST, -d:SYMLIST
Defines the symbol listed by the semi-colon separeted list SYMLIST
SYMBOL. This can be tested in the source code by the pre-processor,
or can be used by methods that have been tagged with the Conditional
attribute.
.TP
.I \-debug, \-debug+, \-g
.I \-\-debug or \-g
Generate debugging information.
.TP
.I \-debug-
Do not generate debugging information.
.TP
.I \-\-fatal
This is used for debugging the compiler. This makes the error emission
generate an exception that can be caught by a debugger.
@@ -64,51 +48,46 @@ generate an exception that can be caught by a debugger.
Generates a stack trace at the time the error is reported, useful for
debugging the compiler.
.TP
.I -lib:PATHLIST
Each path specified in the comma-separated list will direct the
compiler to look for libraries in that specified path.
.TP
.I \-L PATH
Directs the compiler to look for libraries in the specified path.
Multiple paths can be provided by using the option multiple times.
Multiple paths can be provided.
.TP
.I \-nostdlib, -nostdlib+
.I \-\-nostdlib
Use this flag if you want to compile the core library. This makes the
compiler load its internal types from the assembly being compiled.
.TP
.I \-noconfig, \-noconfig+
.I \-\-noconfig
Disables the default compiler configuration to be loaded. The
compiler by default has references to the system assemblies.
.TP
.I \-nowarn:WARNLIST
Makes the compiler ignore warnings specified in the comma-separeted
list WARNLIST>
.I \-\-nowarn XXX
Makes the compiler ignore warning XXX.
.TP
.I -out:FNAME, -o FNAME
.I \-o FNAME
Names the output file to be generated.
.TP
.I \-\-optimize
Turns on optimizations in the compiler.
.TP
.I \-\-parse
Used for benchmarking. The compiler will only parse its input files.
.TP
.I \-\-probe X L
Probes for the code to generate an error named `X' in line `L'. This
is only used by the test suite.
.TP
.I /resource:RESOURCE
Embeds to the given resource file.
.TP
.I /linkresource:RESOURCE
Links to the given resource file.
.TP
.I \-recurse:PATTERN, --recurse PATTERN
.I \-\-recurse PATTERN
Does recursive compilation using the specified pattern. In Unix the
shell will perform globbing, so you migth want to use it like this:
.PP
.nf
bash$ mcs -recurse:'*.cs'
bash$ mcs --recurse '*.cs'
.fi
.TP
.I \-target:KIND, \-t:KIND
.I \-\-resource FILE
Adds FILE as a resource of the resulting assembly.
.TP
.I \-\-target KIND
Used to specify the desired target. The possible values are: exe,
winexe, library and module.
.TP
@@ -116,17 +95,17 @@ winexe, library and module.
Another debugging flag. Used to display the times at various points
in the compilation process.
.TP
.I \-unsafe, -unsafe+
.I \-\-unsafe
Enables compilation of unsafe code.
.TP
.I \-warnaserror, \-warnaserror+
.I \-\-werror
Treat warnings as errors.
.TP
.I \-warn:LEVEL
.I \-\-wlevel LEVEL
Sets the warning level. 0 is the lowest warning level, and 4 is the
highest. The default is 2.
.TP
.I -r:ASSEMBLY, \-r ASSEMBLY
.I \-r ASSEMBLY
Reference the named assembly. Use this to use classes from the named
assembly in your program. The assembly will be loaded from either the
system directory where all the assemblies live, or from the path
@@ -139,30 +118,6 @@ Debugging. Turns on verbose yacc parsing.
Use this to stop option parsing, and allow option-looking parameters
to be passed on the command line.
.PP
.SH SPECIAL DEFINES
The
.B TRACE
and
.B DEBUG
defines have a special meaning to the compiler.
.PP
By default calls to methods and properties in the
System.Diagnostics.Trace class are not generated unless the TRACE
symbol is defined (either through a "#define TRACE") in your source
code, or by using the
.I "--define TRACE"
in the command line.
.PP
By default calls to methods and properties in the
System.Diagnostics.Debug class are not generated unless the DEBUG
symbol is defined (either through a "#define DEBUG") in your source
code, or by using the
.I "--define DEBUG"
in the command line.
.PP
Note that the effect of defining TRACE and DEBUG is a global setting,
even if they are only defined in a single file.
.PP
.SH DEBUGGING SUPPORT
When use the "--debug" or "-g" flag, MCS will create an assembler file
FILE-debug.s containing debugging information where FILE is the name of
@@ -174,8 +129,8 @@ During compilation the MCS compiler defines the __MonoCS__ symbol,
this can be used by pre-processor instructions to compile Mono C#
compiler specific code.
.SH AUTHORS
The Mono C# Compiler was written by Miguel de Icaza, Ravi Pratap and
Martin Baulig at Ximian.
The Mono C# Compiler was written by Miguel de Icaza and Ravi Pratap at
Ximian.
.PP
.SH LICENSE
The Mono Compiler Suite is released under the terms of the GNU GPL.
-36
View File
@@ -1,36 +0,0 @@
.\"
.\" mono configuration page.
.\" (C) Ximian, Inc.
.\" Author:
.\" Miguel de Icaza ([email protected])
.\"
.TH Mono "Mono 1.0"
.SH NAME
mono-config \- Mono runtime file format configuration
.SH DESCRIPTION
The Mono runtime will load configuration data from the
installation prefix /etc/mono/config file, the ~/.mono/config or from
the file pointed by the MONO_CONFIG environment variable.
.PP
This file controls the behavior of the runtime.
.PP
The file contains an XML-like file with various sections, all of them
contained inside a
.B<configuration>
section (It actually uses GMarkup
to parse the file).
.SH <dllmap> directive
You use the dllmap directive to map shared libraries referenced by
P/Invoke in your assemblies to a different shared library.
.PP
This is typically used to map Windows libraries to Unix library names.
.SH EXAMPLES
The following example maps references to the `cygwin1.dll' shared
library to the `libc.so.6' file.
.nf
<configuration>
<dllmap dll="cygwin1.dll" target="libc.so.6"/>
</configuration>
.fi
.SH SEE ALSO
.BR mono(1), monodis(1), mint(1)
+17 -93
View File
@@ -1,5 +1,5 @@
.\"
.\" mono manual page.
.\" mint manual page.
.\" (C) Ximian, Inc.
.\" Author:
.\" Miguel de Icaza ([email protected])
@@ -11,9 +11,7 @@ mono \- Mono ECMA-CLI Just in Time compiler.
.PP
.B mono
[\-\-help] [\-d] [\-\-debug-asm] [\-\-debug-forest] [\-\-trace-calls]
[\-\-compile name] [\-\-ncompile num] [\-\-noinline] [\-\-profile]
[\-\-debug=[format]] [\-\-debug-args args] [\-\-break name] [\-\-precompile name]
[\-\-config filename]
[\-\-stabs] [\-\-compile cname] [\-\-ncompile num] [\-\-debug]
program.exe [arguments...]
.SH DESCRIPTION
The \fImono\fP program is a Just in Time compiler for ECMA CLI byte
@@ -34,14 +32,6 @@ to sharing code. This results in slower code, but enables code
sharing across application domains. The default is to maximize for
speed, but disallow JITed code sharing across domains. See
System.LoaderOptimization for more information
.TP
.I "--config filename"
Load the specified configuration file instead of the default one(s).
The default files are /etc/mono/config and ~/.mono/config or the file
specified in the MONO_CONFIG environment variable, if set.
.TP
.I "--noinline"
Disables the code inliner.
.SH DEBUGGING OPTIONS
The following options are used to debug, or perfomance test the JIT
compiler:
@@ -56,100 +46,34 @@ Displays the generated code as methods are invoked.
Displays the basic blocks and the forest of trees that is
created from a stream of CIL opcodes.
.TP
.I "--compile name"
Compiles the method on the given class (namespace.name:methodname) or
all classes in the given image (@imagename).
.I "--stabs"
Writes out stabs debug information
.TP
.I "--ncompile"
Compiles the method a number of times. If no argument is specified,
the method will be compiled a thousand times.
.SH DEVELOPMENT OPTIONS
The following options are used to debug a JITed application. They're
only useful when running the JIT in a debugger:
.I "--dwarf"
Writes out dwarf debug information
.TP
.I "--debug=[format]"
Writes out debug information in the given format or in the default format.
See DEBUGGING FORMATS for details.
.TP
.I "--debug-args args"
Comma-separated list of additional arguments for the symbol writer.
See DEBUGGING FORMATS for details.
.TP
.I "--break method"
Inserts a breakpoint before the method whose name is `method'
(namespace.class:methodname).
.TP
.I "--precompile name"
Compiles the given class (namespace.name), method (namespace.name:methodname)
or all classes in the given image (@imagename) before executing the main
application.
.TP
.I "--profile"
Collect profiling information and dump it at the end of the process.
.SH DEBUGGING FORMATS
The following debugging formats are currently supported:
.TP
.I "stabs"
Writes out stabs debug information.
.TP
.I "dwarf"
Writes out dwarf debug information.
.TP
.I "dwarf-plus"
.I "--dwarf-plus"
Uses an extended debugging information file which has been generated
by MCS. This extended debugging information will allow you to debug
C# source code rather than IL code. To use it, just run the JIT in
your debugger and call "mono_debug_make_symbols" each time the program
stops.
.PP
The "stabs" and "dwarf" formats support the following options:
.TP
.I "filename=FILENAME"
Write debugging information into FILENAME. This file must be run through
the assembler to create an object file.
.I "--debug method"
Debugs the method whose name is `method'
.TP
.I "objfile=FILENAME"
When automatically assembling the symbol file, write the resulting object
file into FILENAME.
.I "--compile"
Compiles the method on the given class (namespace.name:methodname).
.TP
.I "dont_assemble"
Normally, the symbol file is automatically assembled to an object file
when you call "mono_debug_make_symbols". Use this option to disable this
behaviour.
.TP
.I "install_il_files"
Put the generated *.il files in the same directory than the assembly they
came from. The default is to put them into the current working directory.
.TP
.I "dont_update_il_files"
Normally, the *.il files are recreated if their assemblies have changed
when you call "mono_debug_make_symbols". Use this option to disable this
behaviour.
.TP
.I "dont_create_il_files"
Update the *.il files if their assemblies have changed, but only if the
file already exists.
.PP
The "dwarf-plus" format supports the following options:
.TP
.I "dont_fallback"
Don't fallback to normal dwarf2 if the symbol file cannot be found.
.PP
.I "--ncompile"
Compiles the method a number of times. If no argument is specified,
the method will be compiled a thousand times.
.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
Windows, the assemblies are loaded from the directory where mono and
mint live.
.PP
/etc/mono/config, ~/.mono/config
.IP
Mono runtime configuration file. See the mono-config(5) manual page
for more information.
Assemblies are lodaed from the installation lib directory. If you set
`prefix' to /usr, the assemblies will be located in /usr/lib.
.SH MAILING LISTS
Visit http://mail.ximian.com/mailman/mono-list for details.
.SH WEB SITE
Visit: http://www.go-mono.com for details
.SH SEE ALSO
.BR mcs(1), mint(1), monodis(1), mono-config(5)
.BR mint(1), monodis(1)
-43
View File
@@ -1,43 +0,0 @@
.\"
.\" monostyle manual page.
.\" (C) Adam Treat ([email protected])
.\"
.TH monostyle 1
.SH NAME
monostyle \- Mono's C# code beautifier.
.SH SYNOPSIS
.PP
.B monostyle
-f file.cs -l <true|false> > output.cs
.SH DESCRIPTION
monostyle will parse a C# source code file and correct brace formatting
reflective of the Mono Project's coding standard. To use: invoke monostyle
by passing a C# source code file with '-f file.cs' and specify whether to
use linespacing with '-l <true|false>. To output to a file just redirect
with '>'.
.PP
Mono's Coding Standard
.PP
* The opening brace following a namespace, class, struct, enum, property or
flow control unit should be at the end of the declaration line.
.PP
* The opening brace for a function should be on the line following the function.
.PP
* Please use white space around operators and a space between function names
and their parameters.
.SH OPTIONS
.TP
.I \-\-file
The csharp source file to parse.
.TP
.I \-\-line
Specifies wether to use line spacing.
.PP
.SH AUTHORS
Adam Treat ([email protected])
.PP
.SH LICENSE
MonoStyle is released under the terms of the GNU GPL.
.PP
.SH SEE ALSO
mono(1), mint(1)
-3
View File
@@ -1,9 +1,7 @@
C# Compiler:
Miguel de Icaza ([email protected])
Ravi Pratap ([email protected])
Class Libraries:
Patrik Torstensson <[email protected]>
Gaurav Vaish <[email protected]>
Jeff Stedfast ([email protected])
Joe Shaw ([email protected])
@@ -13,4 +11,3 @@ Class Libraries:
Garrett Rooney ([email protected])
Bob Smith ([email protected])
John Barnette ([email protected])
Daniel Morgan <[email protected]>
+1 -71
View File
@@ -1,73 +1,3 @@
2002-08-12 Piers Haken <[email protected]>
* class/library.make: use 'find' to specify source files, instead of static files
* */makefile.gnu: specify include/exclude patterns for source files
2002-08-07 Peter Williams <[email protected]>
* class/library.make (.makefrag): Fix this rule a bit; was using
$^ instead of $<
2002-07-29 Peter Williams <[email protected]>
* makefile.gnu: 'make install' wasn't actually working due to $@,
fix it.
2002-07-29 Martin Baulig <[email protected]>
* makefile.gnu: Don't force people to install. The default must also
be `all' and not `install'.
2002-07-26 Alp Toker <[email protected]>
* INSTALL: Wrote a guide to mcs installation.
* README: Updated to reflect the new INSTALL guide.
2002-07-23 Alp Toker <[email protected]>
* makefile.gnu: Added an install target (which sets permissions and
respects prefix) and a dist target which produces a tarball. Also
fixed a few other makefile issues.
2002-07-22 Peter Williams <[email protected]>
* class/library.make: Oops, the deps weren't right -- touching a .cs
file didn't cause the libraries to be rebuilt.
(clean): Robustify this rule a bit.
2002-07-20 Martin Baulig <[email protected]>
* class/makefile.gnu: Added System.Data.
2002-07-20 Martin Baulig <[email protected]>
* class/library.make: Put $(MONO_PATH_PREFIX) in front of the MONO_PATH.
* class/*/makefile.gnu: Set MONO_PATH_PREFIX=../lib:
2002-07-19 Martin Baulig <[email protected]>
* makefile.gnu (DIRS): Added nunit.
2002-07-19 Martin Baulig <[email protected]>
Added the super-cool set of makefiles from Peter Williams which run on
GNU/Linux without NAnt. I named them `makefile.gnu' and not `GNUmakefile'
since this won't break the windows build.
To compile stuff on GNU/Linux, just do a `make -f makefile.gnu'.
* mcs-tool, */makefile.gnu, class/library.make: New files.
2002-07-19 Martin Baulig <[email protected]>
* */makefile (NANT): Use a variable `NANT' so the user can override it with
`make NANT=/usr/local/bin/NAnt.exe'.
2002-05-09 Daniel Morgan <[email protected]>
* AUTHORS: add me to class libraries list
2002-03-26 Dick Porter <[email protected]>
* makefile (linux): Abandon the build if any of the subdir makes fail
@@ -88,4 +18,4 @@
2002-01-20 Nick Drochak <[email protected]>
* add nunit directory to the list of dirs to build in
* add nunit directory to the list of dirs to build in
-53
View File
@@ -1,53 +0,0 @@
Basic Installation
==================
The Mono project has developed mono, an x86-specific CL JIT compiler and
mint, a portable CLI interpreter. The build process of each of these
depends on nothing more than a C compiler, glib2 and libgc.
However, to provide a working runtime environment, these programs must
be supplemented by corlib, a CLR assembly to which they are closely
tied. This package provides the C# sources for corlib as well as some
additional assemblies and mcs, the Mono C# compiler.
To build this package, you must already have a C# compiler installed.
Build instructions for *NIX and Microsoft Windows follow.
Building mcs on *NIX
====================
mcs provides a set of makefiles which make it easy to build and install
mcs on *NIX systems like Linux or FreeBSD where mcs is already
installed.
To build the compiler and class libraries, run:
make -f makefile.gnu
The libraries will be placed in the directory class/lib/ and the mcs
compiler executable in mcs/.
To install them, run the following, where prefix identifies where you
want the files installed:
make -f makefile.gnu install prefix=/usr/local
If you are tracking Mono's development, you may sometimes need to share
the compiled libraries with others. If you want to produce an easily
distributable tarball, run:
make -f makefile.gnu dist
Building mcs on Windows
=======================
It is also possible to build mcs on Windows using the Microsoft .NET
framework. This may be convenient if you do not have access to a working
mcs setup. To build the compiler and class libraries, run:
make
The libraries will be placed in the directory class/lib/ and the mcs
compiler executable in mcs/. They can then be copied to /usr/lib and
/usr/bin or wherever desired on the target system.
-53
View File
@@ -1,53 +0,0 @@
Basic Installation
==================
The Mono project has developed mono, an x86-specific CL JIT compiler and
mint, a portable CLI interpreter. The build process of each of these
depends on nothing more than a C compiler, glib2 and libgc.
However, to provide a working runtime environment, these programs must
be supplemented by corlib, a CLR assembly to which they are closely
tied. This package provides the C# sources for corlib as well as some
additional assemblies and mcs, the Mono C# compiler.
To build this package, you must already have a C# compiler installed.
Build instructions for *NIX and Microsoft Windows follow.
Building mcs on *NIX
====================
mcs provides a set of makefiles which make it easy to build and install
mcs on *NIX systems like Linux or FreeBSD where mcs is already
installed.
To build the compiler and class libraries, run:
make -f makefile.gnu
The libraries will be placed in the directory class/lib/ and the mcs
compiler executable in mcs/.
To install them, run the following, where prefix identifies where you
want the files installed:
make -f makefile.gnu install prefix=/usr/local
If you are tracking Mono's development, you may sometimes need to share
the compiled libraries with others. If you want to produce an easily
distributable tarball, run:
make -f makefile.gnu dist
Building mcs on Windows
=======================
It is also possible to build mcs on Windows using the Microsoft .NET
framework. This may be convenient if you do not have access to a working
mcs setup. To build the compiler and class libraries, run:
make
The libraries will be placed in the directory class/lib/ and the mcs
compiler executable in mcs/. They can then be copied to /usr/lib and
/usr/bin or wherever desired on the target system.
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 448 B

-2
View File
@@ -2,8 +2,6 @@
This contains the Mono C# compiler as well as the Mono runtime
library.
See INSTALL for a guide to building and installing mcs.
Layout:
class/
-16
View File
@@ -1,16 +0,0 @@
2002-05-12 Rafael Teixeira <[email protected]>
* Microsoft.VisualBasic.Strings: Strings.cs - Merged all method implementations provided
by Martin Adoue, with method signatures (specially attributes) provided
by Chris J. Breisch. Some tweaking for the Mid member (two overloads versus third optional parameter).
2002-05-18 Chris J Breisch <[email protected]>
* Microsoft.VisualBasic: *.cs/Test/*.cs - Cleaned up code, added
implementations for Collection.cs, Conversion.cs and NUnit Tests
for both
@@ -1,40 +0,0 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- NAnt build file for System.dll -->
<project name="System" default="build">
<property name="debug" value="false"/>
<target name="build">
<mkdir dir="../lib"/>
<csc target="library" output="../lib/Microsoft.VisualBasic.dll" debug="${debug}">
<arg value="/nowarn:1595"/>
<arg value="/noconfig"/> <!-- don't reference ms assemblies -->
<!-- cor compare dies with these currently -->
<!--<arg value="/nostdlib"/>--> <!-- don't reference mscorlib -->
<!--<arg value="/lib:../lib/"/>-->
<!--<arg value="/r:..\lib\corlib.dll"/>-->
<!--<arg value="/r:..\lib\System.dll"/>-->
<arg value="/r:System.dll"/>
<sources>
<includes name="**/*.cs"/>
<excludes name="Test/**"/>
</sources>
<references>
<!--<includes name="../lib/corlib.dll"/>-->
<!--<includes name="../lib/System.dll"/>-->
</references>
</csc>
<copy file="../lib/Microsoft.VisualBasic.dll" tofile="Test/Microsoft.VisualBasic.dll"/>
</target>
<target name="test" depends="build">
<nant basedir="Test" target="test"/>
</target>
<target name="clean">
<nant basedir="Test" target="clean"/>
<delete file="../lib/Microsoft.VisualBasic.dll" failonerror="false"/>
</target>
</project>
@@ -1,18 +0,0 @@
//
// AppWinStyle.cs
//
// Author:
// Chris J Breisch ([email protected])
//
// (C) 2002 Chris J Breisch
//
namespace Microsoft.VisualBasic {
public enum AppWinStyle : short {
Hide = 0,
NormalFocus = 1,
MinimizedFocus = 2,
MaximizedFocus = 3,
NormalNoFocus = 4,
MinimizedNoFocus = 6
};
}
@@ -1,16 +0,0 @@
//
// CallType.cs
//
// Author:
// Chris J Breisch ([email protected])
//
// (C) 2002 Chris J Breisch
//
namespace Microsoft.VisualBasic {
public enum CallType : int {
Method = 1,
Get = 2,
Let = 4,
Set = 8
};
}
@@ -1,314 +0,0 @@
//
// Collection.cs
//
// Author:
// Chris J Breisch ([email protected])
//
// (C) 2002 Chris J Breisch
//
using System;
using System.Runtime.InteropServices;
using System.Collections;
using System.ComponentModel;
namespace Microsoft.VisualBasic {
sealed public class Collection : ICollection, IList {
//
// <summary>
// Collection : The BASIC Collection Object
// </summary>
//
// <remarks>
// </remarks>
// Declarations
private Hashtable m_Hashtable = new Hashtable();
private ArrayList m_HashIndexers = new ArrayList();
internal bool Modified = false;
private class ColEnumerator: IEnumerator
//
// <summary>
// ColEnumerator : This internal class is used
// for enumerating through our Collection
// </summary>
//
// <remarks>
// </remarks>
{
private int Index;
private Collection Col;
private object Item;
public ColEnumerator(Collection coll)
{
Col = coll;
Index = 0;
Col.Modified = false;
}
public void Reset()
{
if (Col.Modified)
{
// FIXME : spec says throw exception, MS doesn't
// throw new InvalidOperationException();
}
Index = 0;
}
public bool MoveNext()
{
if (Col.Modified)
{
// FIXME : spec says throw exception, MS doesn't
// throw new InvalidOperationException();
}
Index++;
try {
Item = Col[Index];
}
catch {
// do nothing
}
return Index <= Col.Count;
}
public object Current {
get {
if (Index == 0) {
// FIXME : spec says throw InvalidOperation,
// but MS throws IndexOutOfRange
throw new IndexOutOfRangeException();
// throw new InvalidOperationException();
}
else {
return Item;
}
}
}
// The current property on the IEnumerator interface:
object IEnumerator.Current {
get {
return(Current);
}
}
}
// Constructors
// Properties
System.Boolean IList.IsReadOnly {
get {return false;}
}
System.Boolean ICollection.IsSynchronized {
get {return m_Hashtable.IsSynchronized;}
}
System.Object ICollection.SyncRoot {
get {return m_Hashtable.SyncRoot;}
}
System.Boolean IList.IsFixedSize {
get {return false;}
}
public System.Int32 Count {
get {return m_HashIndexers.Count;}
}
[ReadOnly(true)]
[System.Runtime.CompilerServices.IndexerName("Item")]
public System.Object this [System.Int32 Index] {
get {
try {
// Collections are 1-based
return m_Hashtable[m_HashIndexers[Index-1]];
}
catch {
throw new IndexOutOfRangeException();
}
}
set {throw new NotImplementedException();}
}
[System.Runtime.CompilerServices.IndexerName("Item")]
public System.Object this [System.Object Index]
{
get {
if (Index is string) {
if (m_HashIndexers.IndexOf(Index) < 0) {
// throw new IndexOutOfRangeException();
// FIXME : Spec Says IndexOutOfRange...MS throws Argument
throw new ArgumentException();
}
return m_Hashtable[Index];
}
else {
throw new ArgumentException();
}
}
}
// Methods
System.Int32 IList.IndexOf (System.Object value)
{
int LastPos = 0;
bool Found = false;
while (!Found) {
LastPos = m_HashIndexers.IndexOf(value.GetHashCode(), LastPos);
if (LastPos == -1) {
Found = true;
} else if (m_Hashtable[m_HashIndexers[LastPos]] == value) {
Found = true;
}
}
return LastPos;
}
System.Boolean IList.Contains (System.Object value)
{
return m_Hashtable.ContainsValue(value);
}
void IList.Clear ()
{
m_Hashtable.Clear();
m_HashIndexers.Clear();
}
public void Remove (System.String Key)
{
int Index;
try {
Index = m_HashIndexers.IndexOf(Key) + 1;
Remove(Index);
}
catch {
throw new ArgumentException();
}
}
public void Remove (System.Int32 Index)
{
try {
// Collections are 1-based
m_Hashtable.Remove(m_HashIndexers[Index-1]);
m_HashIndexers.RemoveAt(Index-1);
Modified = true;
}
catch {
throw new IndexOutOfRangeException();
}
}
void IList.Remove (System.Object value)
{
if (!(value is string)) {
throw new ArgumentException();
}
Remove((string)value);
}
void IList.RemoveAt (System.Int32 index)
{
Remove(index);
}
void IList.Insert (System.Int32 index, System.Object value)
{
Insert(index, value, value.GetHashCode().ToString());
}
void Insert(System.Int32 index, System.Object value, string Key)
{
m_HashIndexers.Insert(index -1, Key);
m_Hashtable.Add(Key, value);
Modified = true;
}
System.Int32 IList.Add (System.Object Item)
{
return Add(Item, Item.GetHashCode().ToString());
}
System.Int32 Add(System.Object Item, string Key)
{
m_Hashtable.Add(Key, Item);
Modified = true;
return m_HashIndexers.Add(Key);
}
private int GetIndexPosition(System.Object Item)
{
int Position = int.MinValue;
if (Item is string) {
Position = m_HashIndexers.IndexOf(Item) + 1;
}
else if (Item is int) {
Position = Convert.ToInt32(Item);
}
else {
throw new InvalidCastException();
}
if (Position < 0) {
throw new ArgumentException();
}
return Position;
}
public void Add (System.Object Item,
[Optional] [DefaultValue(null)] String Key,
[Optional] [DefaultValue(null)] System.Object Before,
[Optional] [DefaultValue(null)] System.Object After)
{
int Position = int.MinValue;
// check for valid args
if (Before != null && After != null) {
throw new ArgumentException();
}
if (Key != null && m_HashIndexers.IndexOf(Key) != -1) {
throw new ArgumentException();
}
if (Before != null) {
Position = GetIndexPosition(Before);
}
if (After != null) {
Position = GetIndexPosition(After) + 1;
}
if (Key == null) {
Key = Item.GetHashCode().ToString();
}
if (Position > (m_HashIndexers.Count+1) || Position == int.MinValue) {
Add(Item, Key);
}
else {
Insert(Position, Item, Key);
}
}
void ICollection.CopyTo (System.Array array, System.Int32 index)
{
System.Array NewArray =
Array.CreateInstance(typeof(System.Object),
m_HashIndexers.Count - index);
// Collections are 1-based
for (int i = index -1; i < m_HashIndexers.Count; i++) {
NewArray.SetValue(m_Hashtable[m_HashIndexers[i]], i - index);
}
}
public IEnumerator GetEnumerator ()
{
return new ColEnumerator(this);
}
};
}
@@ -1,35 +0,0 @@
//
// ComClassAttribute.cs
//
// Author:
// Chris J Breisch ([email protected])
//
// (C) 2002 Chris J Breisch
//
using System;
namespace Microsoft.VisualBasic {
[System.AttributeUsageAttribute(System.AttributeTargets.Class)]
sealed public class ComClassAttribute : System.Attribute {
// Declarations
// Constructors
[MonoTODO]
ComClassAttribute(System.String _ClassID) { throw new NotImplementedException (); }
[MonoTODO]
ComClassAttribute(System.String _ClassID, System.String _InterfaceID) { throw new NotImplementedException (); }
[MonoTODO]
ComClassAttribute(System.String _ClassID, System.String _InterfaceID, System.String _EventId) { throw new NotImplementedException (); }
// Properties
[MonoTODO]
public System.String EventID { get { throw new NotImplementedException (); } }
[MonoTODO]
public System.Boolean InterfaceShadows { get { throw new NotImplementedException (); } }
[MonoTODO]
public System.String ClassID { get { throw new NotImplementedException (); } }
[MonoTODO]
public System.String InterfaceID { get { throw new NotImplementedException (); } }
// Methods
// Events
};
}
@@ -1,26 +0,0 @@
//
// CompareMethod.cs
//
// Author:
// Martin Adoue ([email protected])
//
// (C) 2002 Martin Adoue
//
namespace Microsoft.VisualBasic {
/// <summary>
/// The CompareMethod enumeration contains constants used to determine the
/// way strings are compared when using functions such as InStr and StrComp.
/// These constants can be used anywhere in your code.
/// </summary>
public enum CompareMethod : int {
/// <summary>
/// Performs a binary comparison
/// </summary>
Binary = 0,
/// <summary>
/// Performs a textual comparison
/// </summary>
Text = 1
};
}
@@ -1,120 +0,0 @@
//
// Constants.cs
//
// Author:
// Chris J Breisch ([email protected])
//
// (C) 2002 Chris J Breisch
//
namespace Microsoft.VisualBasic {
[Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute]
sealed public class Constants {
// Declarations
public const System.Int32 vbObjectError = (System.Int32)(-2147221504);
public const System.String vbCrLf = "\n\r";
public const System.String vbNewLine = "\n\r";
public const System.String vbCr = "\n";
public const System.String vbLf = "\r";
public const System.String vbBack = "\b";
public const System.String vbFormFeed = "\f";
public const System.String vbTab = "\t";
public const System.String vbVerticalTab = "\v";
public const System.String vbNullChar = "\0";
public const System.String vbNullString = (System.String)null;
public const Microsoft.VisualBasic.AppWinStyle vbHide = (Microsoft.VisualBasic.AppWinStyle)(0);
public const Microsoft.VisualBasic.AppWinStyle vbNormalFocus = (Microsoft.VisualBasic.AppWinStyle)(1);
public const Microsoft.VisualBasic.AppWinStyle vbMinimizedFocus = (Microsoft.VisualBasic.AppWinStyle)(2);
public const Microsoft.VisualBasic.AppWinStyle vbMaximizedFocus = (Microsoft.VisualBasic.AppWinStyle)(3);
public const Microsoft.VisualBasic.AppWinStyle vbNormalNoFocus = (Microsoft.VisualBasic.AppWinStyle)(4);
public const Microsoft.VisualBasic.AppWinStyle vbMinimizedNoFocus = (Microsoft.VisualBasic.AppWinStyle)(6);
public const Microsoft.VisualBasic.CallType vbMethod = (Microsoft.VisualBasic.CallType)(1);
public const Microsoft.VisualBasic.CallType vbGet = (Microsoft.VisualBasic.CallType)(2);
public const Microsoft.VisualBasic.CallType vbLet = (Microsoft.VisualBasic.CallType)(4);
public const Microsoft.VisualBasic.CallType vbSet = (Microsoft.VisualBasic.CallType)(8);
public const Microsoft.VisualBasic.CompareMethod vbBinaryCompare = (Microsoft.VisualBasic.CompareMethod)(0);
public const Microsoft.VisualBasic.CompareMethod vbTextCompare = (Microsoft.VisualBasic.CompareMethod)(1);
public const Microsoft.VisualBasic.DateFormat vbGeneralDate = (Microsoft.VisualBasic.DateFormat)(0);
public const Microsoft.VisualBasic.DateFormat vbLongDate = (Microsoft.VisualBasic.DateFormat)(1);
public const Microsoft.VisualBasic.DateFormat vbShortDate = (Microsoft.VisualBasic.DateFormat)(2);
public const Microsoft.VisualBasic.DateFormat vbLongTime = (Microsoft.VisualBasic.DateFormat)(3);
public const Microsoft.VisualBasic.DateFormat vbShortTime = (Microsoft.VisualBasic.DateFormat)(4);
public const Microsoft.VisualBasic.FirstDayOfWeek vbUseSystemDayOfWeek = (Microsoft.VisualBasic.FirstDayOfWeek)(0);
public const Microsoft.VisualBasic.FirstDayOfWeek vbSunday = (Microsoft.VisualBasic.FirstDayOfWeek)(1);
public const Microsoft.VisualBasic.FirstDayOfWeek vbMonday = (Microsoft.VisualBasic.FirstDayOfWeek)(2);
public const Microsoft.VisualBasic.FirstDayOfWeek vbTuesday = (Microsoft.VisualBasic.FirstDayOfWeek)(3);
public const Microsoft.VisualBasic.FirstDayOfWeek vbWednesday = (Microsoft.VisualBasic.FirstDayOfWeek)(4);
public const Microsoft.VisualBasic.FirstDayOfWeek vbThursday = (Microsoft.VisualBasic.FirstDayOfWeek)(5);
public const Microsoft.VisualBasic.FirstDayOfWeek vbFriday = (Microsoft.VisualBasic.FirstDayOfWeek)(6);
public const Microsoft.VisualBasic.FirstDayOfWeek vbSaturday = (Microsoft.VisualBasic.FirstDayOfWeek)(7);
public const Microsoft.VisualBasic.FileAttribute vbNormal = (Microsoft.VisualBasic.FileAttribute)(0);
public const Microsoft.VisualBasic.FileAttribute vbReadOnly = (Microsoft.VisualBasic.FileAttribute)(1);
public const Microsoft.VisualBasic.FileAttribute vbHidden = (Microsoft.VisualBasic.FileAttribute)(2);
public const Microsoft.VisualBasic.FileAttribute vbSystem = (Microsoft.VisualBasic.FileAttribute)(4);
public const Microsoft.VisualBasic.FileAttribute vbVolume = (Microsoft.VisualBasic.FileAttribute)(8);
public const Microsoft.VisualBasic.FileAttribute vbDirectory = (Microsoft.VisualBasic.FileAttribute)(16);
public const Microsoft.VisualBasic.FileAttribute vbArchive = (Microsoft.VisualBasic.FileAttribute)(32);
public const Microsoft.VisualBasic.FirstWeekOfYear vbUseSystem = (Microsoft.VisualBasic.FirstWeekOfYear)(0);
public const Microsoft.VisualBasic.FirstWeekOfYear vbFirstJan1 = (Microsoft.VisualBasic.FirstWeekOfYear)(1);
public const Microsoft.VisualBasic.FirstWeekOfYear vbFirstFourDays = (Microsoft.VisualBasic.FirstWeekOfYear)(2);
public const Microsoft.VisualBasic.FirstWeekOfYear vbFirstFullWeek = (Microsoft.VisualBasic.FirstWeekOfYear)(3);
public const Microsoft.VisualBasic.VbStrConv vbUpperCase = (Microsoft.VisualBasic.VbStrConv)(1);
public const Microsoft.VisualBasic.VbStrConv vbLowerCase = (Microsoft.VisualBasic.VbStrConv)(2);
public const Microsoft.VisualBasic.VbStrConv vbProperCase = (Microsoft.VisualBasic.VbStrConv)(3);
public const Microsoft.VisualBasic.VbStrConv vbWide = (Microsoft.VisualBasic.VbStrConv)(4);
public const Microsoft.VisualBasic.VbStrConv vbNarrow = (Microsoft.VisualBasic.VbStrConv)(8);
public const Microsoft.VisualBasic.VbStrConv vbKatakana = (Microsoft.VisualBasic.VbStrConv)(16);
public const Microsoft.VisualBasic.VbStrConv vbHiragana = (Microsoft.VisualBasic.VbStrConv)(32);
public const Microsoft.VisualBasic.VbStrConv vbSimplifiedChinese = (Microsoft.VisualBasic.VbStrConv)(256);
public const Microsoft.VisualBasic.VbStrConv vbTraditionalChinese = (Microsoft.VisualBasic.VbStrConv)(512);
public const Microsoft.VisualBasic.VbStrConv vbLinguisticCasing = (Microsoft.VisualBasic.VbStrConv)(1024);
public const Microsoft.VisualBasic.TriState vbUseDefault = (Microsoft.VisualBasic.TriState)(-2);
public const Microsoft.VisualBasic.TriState vbTrue = (Microsoft.VisualBasic.TriState)(-1);
public const Microsoft.VisualBasic.TriState vbFalse = (Microsoft.VisualBasic.TriState)(0);
public const Microsoft.VisualBasic.VariantType vbEmpty = (Microsoft.VisualBasic.VariantType)(0);
public const Microsoft.VisualBasic.VariantType vbNull = (Microsoft.VisualBasic.VariantType)(1);
public const Microsoft.VisualBasic.VariantType vbInteger = (Microsoft.VisualBasic.VariantType)(3);
public const Microsoft.VisualBasic.VariantType vbLong = (Microsoft.VisualBasic.VariantType)(20);
public const Microsoft.VisualBasic.VariantType vbSingle = (Microsoft.VisualBasic.VariantType)(4);
public const Microsoft.VisualBasic.VariantType vbDouble = (Microsoft.VisualBasic.VariantType)(5);
public const Microsoft.VisualBasic.VariantType vbCurrency = (Microsoft.VisualBasic.VariantType)(6);
public const Microsoft.VisualBasic.VariantType vbDate = (Microsoft.VisualBasic.VariantType)(7);
public const Microsoft.VisualBasic.VariantType vbString = (Microsoft.VisualBasic.VariantType)(8);
public const Microsoft.VisualBasic.VariantType vbObject = (Microsoft.VisualBasic.VariantType)(9);
public const Microsoft.VisualBasic.VariantType vbBoolean = (Microsoft.VisualBasic.VariantType)(11);
public const Microsoft.VisualBasic.VariantType vbVariant = (Microsoft.VisualBasic.VariantType)(12);
public const Microsoft.VisualBasic.VariantType vbDecimal = (Microsoft.VisualBasic.VariantType)(14);
public const Microsoft.VisualBasic.VariantType vbByte = (Microsoft.VisualBasic.VariantType)(17);
public const Microsoft.VisualBasic.VariantType vbUserDefinedType = (Microsoft.VisualBasic.VariantType)(36);
public const Microsoft.VisualBasic.VariantType vbArray = (Microsoft.VisualBasic.VariantType)(8192);
public const Microsoft.VisualBasic.MsgBoxResult vbOK = (Microsoft.VisualBasic.MsgBoxResult)(1);
public const Microsoft.VisualBasic.MsgBoxResult vbCancel = (Microsoft.VisualBasic.MsgBoxResult)(2);
public const Microsoft.VisualBasic.MsgBoxResult vbAbort = (Microsoft.VisualBasic.MsgBoxResult)(3);
public const Microsoft.VisualBasic.MsgBoxResult vbRetry = (Microsoft.VisualBasic.MsgBoxResult)(4);
public const Microsoft.VisualBasic.MsgBoxResult vbIgnore = (Microsoft.VisualBasic.MsgBoxResult)(5);
public const Microsoft.VisualBasic.MsgBoxResult vbYes = (Microsoft.VisualBasic.MsgBoxResult)(6);
public const Microsoft.VisualBasic.MsgBoxResult vbNo = (Microsoft.VisualBasic.MsgBoxResult)(7);
public const Microsoft.VisualBasic.MsgBoxStyle vbOKOnly = (Microsoft.VisualBasic.MsgBoxStyle)(0);
public const Microsoft.VisualBasic.MsgBoxStyle vbOKCancel = (Microsoft.VisualBasic.MsgBoxStyle)(1);
public const Microsoft.VisualBasic.MsgBoxStyle vbAbortRetryIgnore = (Microsoft.VisualBasic.MsgBoxStyle)(2);
public const Microsoft.VisualBasic.MsgBoxStyle vbYesNoCancel = (Microsoft.VisualBasic.MsgBoxStyle)(3);
public const Microsoft.VisualBasic.MsgBoxStyle vbYesNo = (Microsoft.VisualBasic.MsgBoxStyle)(4);
public const Microsoft.VisualBasic.MsgBoxStyle vbRetryCancel = (Microsoft.VisualBasic.MsgBoxStyle)(5);
public const Microsoft.VisualBasic.MsgBoxStyle vbCritical = (Microsoft.VisualBasic.MsgBoxStyle)(16);
public const Microsoft.VisualBasic.MsgBoxStyle vbQuestion = (Microsoft.VisualBasic.MsgBoxStyle)(32);
public const Microsoft.VisualBasic.MsgBoxStyle vbExclamation = (Microsoft.VisualBasic.MsgBoxStyle)(48);
public const Microsoft.VisualBasic.MsgBoxStyle vbInformation = (Microsoft.VisualBasic.MsgBoxStyle)(64);
public const Microsoft.VisualBasic.MsgBoxStyle vbDefaultButton1 = (Microsoft.VisualBasic.MsgBoxStyle)(0);
public const Microsoft.VisualBasic.MsgBoxStyle vbDefaultButton2 = (Microsoft.VisualBasic.MsgBoxStyle)(256);
public const Microsoft.VisualBasic.MsgBoxStyle vbDefaultButton3 = (Microsoft.VisualBasic.MsgBoxStyle)(512);
public const Microsoft.VisualBasic.MsgBoxStyle vbApplicationModal = (Microsoft.VisualBasic.MsgBoxStyle)(0);
public const Microsoft.VisualBasic.MsgBoxStyle vbSystemModal = (Microsoft.VisualBasic.MsgBoxStyle)(4096);
public const Microsoft.VisualBasic.MsgBoxStyle vbMsgBoxHelp = (Microsoft.VisualBasic.MsgBoxStyle)(16384);
public const Microsoft.VisualBasic.MsgBoxStyle vbMsgBoxRight = (Microsoft.VisualBasic.MsgBoxStyle)(524288);
public const Microsoft.VisualBasic.MsgBoxStyle vbMsgBoxRtlReading = (Microsoft.VisualBasic.MsgBoxStyle)(1048576);
public const Microsoft.VisualBasic.MsgBoxStyle vbMsgBoxSetForeground = (Microsoft.VisualBasic.MsgBoxStyle)(65536);
// Constructors
// Properties
// Methods
// Events
};
}
@@ -1,27 +0,0 @@
//
// ControlChars.cs
//
// Author:
// Chris J Breisch ([email protected])
//
// (C) 2002 Chris J Breisch
//
namespace Microsoft.VisualBasic {
sealed public class ControlChars {
// Declarations
public const System.String CrLf = "\n\r";
public const System.String NewLine = "\n\r";
public const System.Char Cr = '\n';
public const System.Char Lf = '\r';
public const System.Char Back = '\b';
public const System.Char FormFeed = '\f';
public const System.Char Tab = '\t';
public const System.Char VerticalTab = '\v';
public const System.Char NullChar = '\0';
public const System.Char Quote = '"';
// Constructors
// Properties
// Methods
// Events
};
}
@@ -1,616 +0,0 @@
//
// Conversion.cs
//
// Author:
// Chris J Breisch ([email protected])
//
// (C) 2002 Chris J Breisch
//
using System;
using System.Text.RegularExpressions;
namespace Microsoft.VisualBasic {
[Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute]
sealed public class Conversion {
//
// <summary>
// Collection : The BASIC Collection Object
// </summary>
//
// <remarks>
// </remarks>
// Declarations
private static readonly char[] _HexDigits = {
'0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', 'A', 'B', 'C', 'D', 'E', 'F'
};
private static readonly char[] _OctDigits = {
'0', '1', '2', '3', '4', '5', '6', '7'
};
private static readonly long[] _Maxes = {
32767, 2147483647, 9223372036854775807
};
private enum SizeIndexes {
Int16 = 0,
Int32 = 1,
Int64 = 2
};
// Constructors
// Properties
// Methods
[MonoTODO]
public static string ErrorToString () {
throw new NotImplementedException ();
}
[MonoTODO]
public static string ErrorToString (
System.Int32 ErrorNumber) {
throw new NotImplementedException ();
}
// Return whether d is +/- Could do this with a macro,
// but this is cleaner
private static int Sign(double d) { return d > 0 ? 1 : -1;}
// try to cast an Object to a string...used in several places
private static string CastToString (System.Object Expression) {
try {
return (string)Expression;
}
catch {
throw new InvalidCastException();
}
}
// Fix on Integer types doesn't do anything
public static short Fix (short Number) { return Number; }
public static int Fix (int Number) { return Number; }
public static long Fix (long Number) { return Number; }
// Fix on other numberic types = Sign(Number) * Int(Abs(Number))
public static double Fix (double Number) {
return Sign(Number) * Int (Math.Abs (Number));
}
public static float Fix (float Number) {
return Sign(Number) * Int (Math.Abs (Number));
}
public static decimal Fix (decimal Number) {
return Sign((double)Number) * Int (Math.Abs (Number));
}
// Fix on an Object type is trickier
// first we have to cast it to the right type
public static System.Object Fix (System.Object Number)
{
// always start out by throwing an exception
// if Number is null
if (Number == null) {
throw new ArgumentNullException ("Number",
"Value cannot be null");
}
TypeCode TC = Type.GetTypeCode (Number.GetType ());
// switch on TypeCode and call appropriate Fix method
switch (TC) {
case TypeCode.Decimal:
return Fix (Convert.ToDecimal (Number));
case TypeCode.Double:
return Fix (Convert.ToDouble (Number));
case TypeCode.Single:
return Fix (Convert.ToSingle (Number));
case TypeCode.String:
return Fix (Double.Parse (
CastToString (Number)));
// for integer types, don't need to do anything
case TypeCode.Byte:
case TypeCode.Int16:
case TypeCode.Int32:
case TypeCode.Int64:
case TypeCode.SByte:
case TypeCode.UInt16:
case TypeCode.UInt32:
case TypeCode.UInt64:
return Number;
// spec defines Empty as returning 0
case TypeCode.Empty:
return 0;
// we can't convert these types
case TypeCode.Boolean:
case TypeCode.Char:
case TypeCode.DateTime:
case TypeCode.DBNull:
case TypeCode.Object:
default:
throw new ArgumentException (
"Type of argument 'Number' is '"
+ Number.GetType().FullName +
"', which is not numeric.");
}
}
// Int on Integer types doesn't do anything
public static short Int (short Number) { return Number; }
public static int Int (int Number) { return Number; }
public static long Int (long Number) { return Number; }
// Int on other numberic types is same thing as "Floor"
public static double Int (double Number) {
return (double) Math.Floor(Number);
}
public static float Int (float Number) {
return (float) Math.Floor(Number);
}
public static decimal Int (decimal Number) {
return Decimal.Floor(Number);
}
// doing an Int on an Object is trickier
// first we have to cast to the correct type
public static System.Object Int (System.Object Number) {
// always start out by throwing an exception
// if Number is null
if (Number == null) {
throw new ArgumentNullException("Number",
"Value cannot be null");
}
TypeCode TC = Type.GetTypeCode (Number.GetType ());
// switch on TypeCode and call appropriate Int method
switch (TC) {
case TypeCode.Decimal:
return Int (Convert.ToDecimal (Number));
case TypeCode.Double:
return Int (Convert.ToDouble (Number));
case TypeCode.Single:
return Int (Convert.ToSingle (Number));
case TypeCode.String:
return Int (Double.Parse (
CastToString(Number)));
// Int on integer types does nothing
case TypeCode.Byte:
case TypeCode.Int16:
case TypeCode.Int32:
case TypeCode.Int64:
case TypeCode.SByte:
case TypeCode.UInt16:
case TypeCode.UInt32:
case TypeCode.UInt64:
return Number;
// Spec defines Empty as returning 0
case TypeCode.Empty:
return 0;
// otherwise, it's we can't cast to a numeric
case TypeCode.Boolean:
case TypeCode.Char:
case TypeCode.DateTime:
case TypeCode.DBNull:
case TypeCode.Object:
default:
throw new ArgumentException (
"Type of argument 'Number' is '" +
Number.GetType().FullName +
"', which is not numeric.");
}
}
// we use this internally to get a string
// representation of a number in a specific base
private static string ToBase (ulong Number, int Length,
char[] BaseDigits, uint Base) {
int i;
ulong r;
// we use a char array here for performance
char [] c = new Char[Length];
string s = null;
for (i = Length - 1; i >= 0; i--) {
r = Number % Base;
Number = Number / Base;
c[i] = BaseDigits[r];
if (Number == 0) {
s = new string (c, i, Length - i);
break;
}
}
if (s == null) {
return new string (c);
}
else {
return s;
}
}
// convert a number to Hex
// a little bit of magic goes on here with negative #'s
private static string ToHex(long Number, int Digits,
SizeIndexes Size) {
ulong UNumber;
if (Number < 0) {
// we add maxint of the Number's type
// twice and then 2 more...this has the
// effect of turning it into a ulong
// that has the same hex representation
UNumber = (ulong)((Number + 2) +
_Maxes[(int)Size]) +
(ulong)_Maxes[(int)Size];
}
else {
UNumber = (ulong)Number;
}
return ToBase(UNumber, Digits, _HexDigits, 16);
}
// call our private function,
// passing it the size of the item to convert
public static string Hex (short Number) {
return ToHex(Number, 4, SizeIndexes.Int16);
}
public static string Hex (byte Number) {
return ToHex(Number, 2, SizeIndexes.Int16);
}
public static string Hex (int Number) {
return ToHex(Number, 8, SizeIndexes.Int32);
}
public static string Hex (long Number) {
return ToHex(Number, 16, SizeIndexes.Int64);
}
// Objects are trickier
// first we have to cast to appropriate type
public static System.String Hex (System.Object Number) {
// always start out by throwing an exception
// if Number is null
if (Number == null) {
throw new ArgumentNullException ("Number",
"Value cannot be null");
}
TypeCode TC = Type.GetTypeCode (Number.GetType ());
switch (TC) {
// try to parse the string as an Int32,
// then an Int64, if that fails
case TypeCode.String:
try {
return Hex (
Int32.Parse (
CastToString (Number)));
}
catch {
return Hex (
Int64.Parse (
CastToString (Number)));
}
// for the int types,
// just call the normal "Hex" for that type
case TypeCode.Byte:
return Hex ((byte)Number);
case TypeCode.Int16:
return Hex ((short)Number);
case TypeCode.Int32:
return Hex ((int)Number);
case TypeCode.Int64:
return Hex ((long)Number);
// empty is defined as returning 0
case TypeCode.Empty:
return "0";
// we can't do any of these types
case TypeCode.Boolean:
case TypeCode.Char:
case TypeCode.DBNull:
case TypeCode.DateTime:
case TypeCode.Decimal:
case TypeCode.Double:
case TypeCode.Object:
case TypeCode.SByte:
case TypeCode.Single:
case TypeCode.UInt16:
case TypeCode.UInt32:
case TypeCode.UInt64:
default:
throw new ArgumentException (
"Type of argument 'Number' is '" +
Number.GetType().FullName +
"', which is not numeric.");
}
}
// ToOct works just like ToHex, only in Octal.
private static string ToOct(long Number, int Digits,
SizeIndexes Size) {
ulong UNumber;
if (Number < 0) {
// for neg numbers add the maxint of
// the appropriate size twice, and then two more
// this has the effect of turning it
// into a ulong with the same oct representation
UNumber = (ulong)((Number + 2) +
_Maxes[(int)Size]) +
(ulong)(_Maxes[(int)Size]);
}
else {
UNumber = (ulong)Number;
}
return ToBase (UNumber, Digits, _OctDigits, 8);
}
// call ToOct with appropriate information
public static string Oct (short Number) {
return ToOct(Number, 6, SizeIndexes.Int16);
}
public static string Oct (byte Number) {
return ToOct(Number, 3, SizeIndexes.Int16);
}
public static string Oct (int Number) {
return ToOct(Number, 11, SizeIndexes.Int32);
}
public static string Oct (long Number) {
return ToOct(Number, 22, SizeIndexes.Int64);
}
// Objects are always trickier
// first need to cast to appropriate type
public static string Oct (System.Object Number) {
// first, always throw an exception if Number is null
if (Number == null) {
throw new ArgumentNullException("Number",
"Value cannot be null");
}
TypeCode TC = Type.GetTypeCode (Number.GetType ());
switch (TC) {
// try to parse a string as an Int32
// and then an Int64
case TypeCode.String:
try {
return Oct (
Int32.Parse (
CastToString (Number)));
}
catch {
return Oct (
Int64.Parse (
CastToString (Number)));
}
// integer types just call the appropriate "Oct"
case TypeCode.Byte:
return Oct ((byte)Number);
case TypeCode.Int16:
return Oct ((short)Number);
case TypeCode.Int32:
return Oct ((int)Number);
case TypeCode.Int64:
return Oct ((long)Number);
// Empty is defined as returning 0
case TypeCode.Empty:
return "0";
// We can't convert these to Octal
case TypeCode.Boolean:
case TypeCode.Char:
case TypeCode.DBNull:
case TypeCode.DateTime:
case TypeCode.Decimal:
case TypeCode.Double:
case TypeCode.Object:
case TypeCode.SByte:
case TypeCode.Single:
case TypeCode.UInt16:
case TypeCode.UInt32:
case TypeCode.UInt64:
default:
throw new ArgumentException (
"Type of argument 'Number' is '" +
Number.GetType().FullName +
"', which is not numeric.");
}
}
// Str is pretty easy now that we have a language
// with a ToString method()
public static string Str (System.Object Number) {
// check for null as always and throw an exception
if (Number == null) {
throw new ArgumentNullException("Number");
}
switch (Type.GetTypeCode (Number.GetType ())) {
// for unsigned types, just call ToString
case TypeCode.Byte:
case TypeCode.UInt16:
case TypeCode.UInt32:
case TypeCode.UInt64:
return Number.ToString();
// for signed types, we have to leave a
// space for the missing + sign
case TypeCode.Decimal:
return ((decimal)Number > 0 ? " " : "")
+ Number.ToString();
case TypeCode.Double:
return ((double)Number > 0 ? " " : "")
+ Number.ToString();
case TypeCode.Int16:
return ((short)Number > 0 ? " " : "")
+ Number.ToString();
case TypeCode.Int32:
return ((int)Number > 0 ? " " : "")
+ Number.ToString();
case TypeCode.Int64:
return ((long)Number > 0 ? " " : "")
+ Number.ToString();
case TypeCode.SByte:
return ((sbyte)Number > 0 ? " " : "")
+ Number.ToString();
case TypeCode.Single:
return ((float)Number > 0 ? " " : "")
+ Number.ToString();
// can't cast anything else to a Number
default:
throw new InvalidCastException(
"Argument 'Number' cannot be converted to a numeric value.");
}
}
// The Val function is pretty bizarre
// Val ("&HFF") = 255
// Val ("&O377") = 255
// Val ("1234 Any Street") = 1234
// Val (" 12 45 . 90 7 E + 0 0 2 ") = 1245.907e+002 = 124590.7
public static double Val (string InputStr) {
int i;
int Base;
int NumChars = 0;
char c;
int Length = InputStr.Length;
char[] Number = new char[Length];
bool FoundRadixPrefix = false;
Regex NumberReg;
Match NumberMatch;
Base = 10;
Number[0] = '\0';
// go through string
for (i = 0; i < Length; i++) {
c = InputStr[i];
// look for Radix prefix "&"
if (i == 0 && c == '&') {
FoundRadixPrefix = true;
}
// look for an H or O following the prefix
else if (FoundRadixPrefix && i == 1 &&
(char.ToLower(c) == 'h' ||
char.ToLower(c) == 'o')) {
if (c == 'H') {
Base = 16;
}
else {
Base = 8;
}
}
// if we didn't find a radix prefix,
// ignore whitespace
else if (char.IsWhiteSpace(c) && (Base == 10)) {
continue;
}
// mash what's left together
else {
Number[NumChars++] = c;
}
}
// now we have a string to parse
switch (Base) {
// FIXME : for Octal and Hex,
// Regex is probably overkill
// Even for base 10, it might be faster
// to write our own parser
case 8:
NumberReg = new Regex ("^[0-7]*");
NumberMatch = NumberReg.Match (
new string(Number, 0, NumChars));
break;
case 16:
NumberReg = new Regex ("^[0-9a-f]*",
RegexOptions.IgnoreCase);
NumberMatch = NumberReg.Match (
new string(Number, 0, NumChars));
break;
case 10:
default:
NumberReg = new Regex (
"^[+-]?\\d*\\.?\\d*(e?[+-]?\\d*)",
RegexOptions.IgnoreCase);
NumberMatch = NumberReg.Match (
new string(Number, 0, NumChars));
break;
}
// we found a match, try to convert it
if (NumberMatch.Success) {
try {
switch (Base) {
case 10:
return
Convert.ToDouble (
NumberMatch.Value);
case 8:
case 16:
return (double)
Convert.ToInt64 (
NumberMatch.Value,
Base);
default:
return (double)0;
}
}
catch {
throw new OverflowException();
}
}
else {
return (double)0;
}
}
// Val on a char type is pretty simple '9' = 9, 'a' = exception
public static int Val (char Expression) {
if (char.IsDigit(Expression)) {
return Expression - '0';
}
else {
throw new ArgumentException();
}
}
// if it's an object, and we can't convert
// it to a string, it's an exception
public static double Val (System.Object Expression) {
// always check for null first
if (Expression == null) {
throw new ArgumentNullException ("Expression",
"Value cannot be null");
}
try {
return Val (CastToString (Expression));
}
catch {
throw new ArgumentException(
"Type of argument 'Expression' is '" +
Expression.GetType().FullName +
"', which can nt be converted to numeric.");
}
}
// Events
}
}
@@ -1,478 +0,0 @@
//
// DateAndTime.cs
//
// Author:
// Chris J Breisch ([email protected])
//
// (C) 2002 Chris J Breisch
//
using System;
using System.Runtime.InteropServices;
using System.ComponentModel;
using System.Globalization;
namespace Microsoft.VisualBasic
{
[Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute]
sealed public class DateAndTime {
public static string DateString {
get {
return DateTime.Today.ToString("MM-dd-yyyy");
}
set {
string [] formats = { "M-d-yyyy", "M-d-y", "M/d/yyyy", "M/d/y" };
try {
DateTime dtToday = DateTime.ParseExact(value, formats,
DateTimeFormatInfo.CurrentInfo,
DateTimeStyles.None);
Today = dtToday;
}
catch {
throw new InvalidCastException();
}
}
}
public static System.DateTime Today {
get { return DateTime.Today; }
set {
// FIXME: This needs to use some OS specific code
// I've already written it for Windows
// and Unix won't be hard, but need an
// OS object from the compiler
// OS specific code needs to check permissions
// too, and throw an ArgumentOutOfRangeException
// if no permissions
// DateTime dtNow = DateTime.Now;
//
// SysTime.LocalTime = new DateTime(value.Year,
// value.Month, value.Day, dtNow.Hour,
// dtNow.Minute, dtNow.Second, dtNow.Millisecond);
throw new NotImplementedException();
}
}
public static double Timer {
get {
DateTime DTNow = DateTime.Now;
return DTNow.Hour * 3600 + DTNow.Minute * 60 +
DTNow.Second + DTNow.Millisecond /
1000D;
}
}
public static System.DateTime Now {
get { return DateTime.Now; }
}
public static System.DateTime TimeOfDay {
get {
TimeSpan TSpan = DateTime.Now.TimeOfDay;
return new DateTime(1, 1, 1, TSpan.Hours,
TSpan.Minutes, TSpan.Seconds,
TSpan.Milliseconds);
}
set {
// FIXME: This needs to use some OS specific code
// I've already written it for Windows
// and Unix won't be hard, but need an
// OS object from the compiler
// OS specific code needs to check permissions
// too, and throw an ArgumentOutOfRangeException
// if no permissions
// DateTime dtToday = DateTime.Today;
//
// SysTime.LocalTime = new DateTime(dtToday.Year,
// dtToday.Month, dtToday.Day, value.Hour,
// value.Minute, value.Second, value.Millisecond);
throw new NotImplementedException();
}
}
public static string TimeString {
get { return DateTime.Now.ToString("HH:mm:ss"); }
set {
string format = "HH:mm:ss";
try {
DateTime dtToday = DateTime.ParseExact(value, format,
DateTimeFormatInfo.CurrentInfo,
DateTimeStyles.None);
TimeOfDay = dtToday;
}
catch {
throw new InvalidCastException();
}
}
}
// Methods
public static System.DateTime DateAdd (DateInterval Interval,
double Number, System.DateTime DateValue) {
switch (Interval) {
case DateInterval.Year:
return DateValue.AddYears((int)Number);
case DateInterval.Quarter:
return DateValue.AddMonths((int)Number * 3);
case DateInterval.Month:
return DateValue.AddMonths((int)Number);
case DateInterval.WeekOfYear:
return DateValue.AddDays(Number * 7);
case DateInterval.Day:
case DateInterval.DayOfYear:
case DateInterval.Weekday:
return DateValue.AddDays(Number);
case DateInterval.Hour:
return DateValue.AddHours(Number);
case DateInterval.Minute:
return DateValue.AddMinutes(Number);
case DateInterval.Second:
return DateValue.AddSeconds(Number);
default:
throw new ArgumentException();
}
}
private static DayOfWeek GetDayRule(FirstDayOfWeek StartOfWeek, DayOfWeek DayRule)
{
switch (StartOfWeek) {
case FirstDayOfWeek.System:
return DayRule;
case FirstDayOfWeek.Sunday:
return DayOfWeek.Sunday;
case FirstDayOfWeek.Monday:
return DayOfWeek.Monday;
case FirstDayOfWeek.Tuesday:
return DayOfWeek.Tuesday;
case FirstDayOfWeek.Wednesday:
return DayOfWeek.Wednesday;
case FirstDayOfWeek.Thursday:
return DayOfWeek.Thursday;
case FirstDayOfWeek.Friday:
return DayOfWeek.Friday;
case FirstDayOfWeek.Saturday:
return DayOfWeek.Saturday;
default:
throw new ArgumentException();
}
}
private static CalendarWeekRule GetWeekRule(FirstWeekOfYear StartOfYear, CalendarWeekRule WeekRule)
{
switch (StartOfYear) {
case FirstWeekOfYear.System:
return WeekRule;
case FirstWeekOfYear.FirstFourDays:
return CalendarWeekRule.FirstFourDayWeek;
case FirstWeekOfYear.FirstFullWeek:
return CalendarWeekRule.FirstFullWeek;
case FirstWeekOfYear.Jan1:
return CalendarWeekRule.FirstDay;
default:
throw new ArgumentException();
}
}
public static long DateDiff (DateInterval Interval,
System.DateTime Date1, System.DateTime Date2,
[Optional] [DefaultValue(FirstDayOfWeek.Sunday)]
FirstDayOfWeek StartOfWeek,
[Optional] [DefaultValue(FirstWeekOfYear.Jan1)]
FirstWeekOfYear StartOfYear)
{
int YearMonths;
int YearQuarters;
int YearWeeks;
CalendarWeekRule WeekRule = CalendarWeekRule.FirstDay;
DayOfWeek DayRule = DateTimeFormatInfo.CurrentInfo.FirstDayOfWeek;
Calendar CurCalendar = CultureInfo.CurrentCulture.Calendar;
switch (Interval) {
case DateInterval.Year:
return Date2.Year - Date1.Year;
case DateInterval.Quarter:
YearQuarters = (Date2.Year - Date1.Year) * 4;
return Date2.Month / 4 - Date1.Month / 4 + YearQuarters;
case DateInterval.Month:
YearMonths = (Date2.Year - Date1.Year) * 12;
return Date2.Month - Date1.Month + YearMonths;
case DateInterval.WeekOfYear:
YearWeeks = (Date2.Year - Date1.Year) * 53;
DayRule = GetDayRule(StartOfWeek, DayRule);
WeekRule = GetWeekRule(StartOfYear, WeekRule);
return CurCalendar.GetWeekOfYear(Date2, WeekRule, DayRule) -
CurCalendar.GetWeekOfYear(Date1,WeekRule, DayRule) +
YearWeeks;
case DateInterval.Weekday:
return ((TimeSpan)(Date2.Subtract(Date1))).Days / 7;
case DateInterval.DayOfYear:
case DateInterval.Day:
return ((TimeSpan)(Date2.Subtract(Date1))).Days;
case DateInterval.Hour:
return ((TimeSpan)(Date2.Subtract(Date1))).Hours;
case DateInterval.Minute:
return ((TimeSpan)(Date2.Subtract(Date1))).Minutes;
case DateInterval.Second:
return ((TimeSpan)(Date2.Subtract(Date1))).Seconds;
default:
throw new ArgumentException();
}
}
private static int ConvertWeekDay(DayOfWeek Day, int Offset)
{
int Weekday = (int)Day + Offset;
if (Weekday > 7) {
Weekday -= 7;
}
switch((DayOfWeek)Weekday) {
case DayOfWeek.Sunday:
return (int)FirstDayOfWeek.Sunday;
case DayOfWeek.Monday:
return (int)FirstDayOfWeek.Monday;
case DayOfWeek.Tuesday:
return (int)FirstDayOfWeek.Tuesday;
case DayOfWeek.Wednesday:
return (int)FirstDayOfWeek.Wednesday;
case DayOfWeek.Thursday:
return (int)FirstDayOfWeek.Thursday;
case DayOfWeek.Friday:
return (int)FirstDayOfWeek.Friday;
case DayOfWeek.Saturday:
return (int)FirstDayOfWeek.Saturday;
default:
throw new ArgumentException();
}
}
public static int DatePart
(
Microsoft.VisualBasic.DateInterval Interval,
System.DateTime DateValue,
[Optional] [DefaultValue(FirstDayOfWeek.Sunday)]
FirstDayOfWeek StartOfWeek,
[Optional] [DefaultValue(FirstWeekOfYear.Jan1)]
FirstWeekOfYear StartOfYear) {
CalendarWeekRule WeekRule = CalendarWeekRule.FirstDay;
DayOfWeek DayRule = DateTimeFormatInfo.CurrentInfo.FirstDayOfWeek;
Calendar CurCalendar = CultureInfo.CurrentCulture.Calendar;
switch (Interval) {
case DateInterval.Year:
return DateValue.Year;
case DateInterval.Quarter:
return DateValue.Month / 4 + 1;
case DateInterval.Month:
return DateValue.Month;
case DateInterval.WeekOfYear:
DayRule = GetDayRule(StartOfWeek, DayRule);
WeekRule = GetWeekRule(StartOfYear, WeekRule);
return CurCalendar.GetWeekOfYear(DateValue, WeekRule, DayRule);
case DateInterval.Weekday:
return ConvertWeekDay(DateValue.DayOfWeek, (int)DayRule);
case DateInterval.DayOfYear:
return DateValue.DayOfYear;
case DateInterval.Day:
return DateValue.Day;
case DateInterval.Hour:
return DateValue.Hour;
case DateInterval.Minute:
return DateValue.Minute;
case DateInterval.Second:
return DateValue.Second;
default:
throw new ArgumentException();
}
}
private static DateInterval DateIntervalFromString(string Interval)
{
switch (Interval) {
case "yyyy":
return DateInterval.Year;
case "q":
return DateInterval.Quarter;
case "m":
return DateInterval.Month;
case "ww":
return DateInterval.WeekOfYear;
case "w":
return DateInterval.Weekday;
case "d":
return DateInterval.Day;
case "y":
return DateInterval.DayOfYear;
case "h":
return DateInterval.Hour;
case "n":
return DateInterval.Minute;
case "s":
return DateInterval.Second;
default:
throw new ArgumentException();
}
}
public static System.DateTime DateAdd (string Interval,
double Number, System.Object DateValue)
{
if (DateValue == null) {
throw new ArgumentNullException("DateValue", "Value can not be null.");
}
if (!(DateValue is DateTime)) {
throw new InvalidCastException();
}
return DateAdd(DateIntervalFromString(Interval), Number, (DateTime)DateValue);
}
public static System.Int64 DateDiff (string Interval,
System.Object Date1, System.Object Date2,
[Optional] [DefaultValue(FirstDayOfWeek.Sunday)]
FirstDayOfWeek StartOfWeek,
[Optional] [DefaultValue(FirstWeekOfYear.Jan1)]
FirstWeekOfYear StartOfYear)
{
if (Date1 == null) {
throw new ArgumentNullException("Date1", "Value can not be null.");
}
if (Date2 == null) {
throw new ArgumentNullException("Date2", "Value can not be null.");
}
if (!(Date1 is DateTime)) {
throw new InvalidCastException();
}
if (!(Date2 is DateTime)) {
throw new InvalidCastException();
}
return DateDiff(DateIntervalFromString(Interval), (DateTime)Date1,
(DateTime)Date2, StartOfWeek, StartOfYear);
}
public static System.Int32 DatePart (string Interval,
System.Object DateValue,
[Optional] [DefaultValue(FirstDayOfWeek.Sunday)]
FirstDayOfWeek StartOfWeek,
[Optional] [DefaultValue(FirstWeekOfYear.Jan1)]
FirstWeekOfYear StartOfYear)
{
if (DateValue == null) {
throw new ArgumentNullException("DateValue", "Value can not be null.");
}
if (!(DateValue is DateTime)) {
throw new InvalidCastException();
}
return DatePart(DateIntervalFromString(Interval),
(DateTime)DateValue, StartOfWeek, StartOfYear);
}
public static System.DateTime DateSerial (int Year, int Month, int Day)
{
return new DateTime(Year, Month, Day);
}
public static System.DateTime TimeSerial (int Hour, int Minute, int Second)
{
return new DateTime(1, 1, 1, Hour, Minute, Second);
}
public static System.DateTime DateValue (string StringDate)
{
return DateTime.Parse(StringDate);
}
public static System.DateTime TimeValue (string StringTime)
{
return DateTime.Parse(StringTime);
}
public static int Year (System.DateTime DateValue)
{
return DateValue.Year;
}
public static int Month (System.DateTime DateValue)
{
return DateValue.Month;
}
public static int Day (System.DateTime DateValue)
{
return DateValue.Day;
}
public static int Hour (System.DateTime TimeValue)
{
return TimeValue.Hour;
}
public static int Minute (System.DateTime TimeValue)
{
return TimeValue.Minute;
}
public static int Second (System.DateTime TimeValue)
{
return TimeValue.Second;
}
public static int Weekday (System.DateTime DateValue,
[Optional] [DefaultValue(FirstDayOfWeek.Sunday)]
FirstDayOfWeek StartOfWeek)
{
return DatePart(DateInterval.Weekday, DateValue, StartOfWeek, FirstWeekOfYear.System);
}
public static System.String MonthName (int Month,
[Optional] [DefaultValue(false)] bool Abbreviate)
{
if (Month < 1 || Month > 13) {
throw new ArgumentException();
}
if (Abbreviate) {
return CultureInfo.CurrentCulture.DateTimeFormat.GetAbbreviatedMonthName(Month);
}
else {
return CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(Month);
}
}
public static System.String WeekdayName (int Weekday,
[Optional] [DefaultValue(false)] System.Boolean Abbreviate,
[Optional] [DefaultValue(FirstDayOfWeek.System)]
FirstDayOfWeek FirstDayOfWeekValue)
{
if (Weekday < 1 || Weekday > 7) {
throw new ArgumentException();
}
Weekday += (int)FirstDayOfWeekValue;
if (Weekday > 7) {
Weekday -= 7;
}
if (Abbreviate) {
return CultureInfo.CurrentCulture.DateTimeFormat.GetAbbreviatedDayName((DayOfWeek)Weekday);
}
else {
return CultureInfo.CurrentCulture.DateTimeFormat.GetDayName((DayOfWeek)Weekday);
}
}
}
}
@@ -1,37 +0,0 @@
//
// DateFormat.cs
//
// Author:
// Martin Adoue ([email protected])
//
// (C) 2002 Martin Adoue
//
namespace Microsoft.VisualBasic {
/// <summary>
/// When you call the DateValue function, you can use the following
/// enumeration members in your code in place of the actual values.
/// </summary>
public enum DateFormat : int {
/// <summary>
/// For real numbers, displays a date and time. If the number has no fractional part, displays only a date. If the number has no integer part, displays time only. Date and time display is determined by your computer's regional settings.
/// </summary>
GeneralDate = 0,
/// <summary>
/// Displays a date using the long-date format specified in your computer's regional settings.
/// </summary>
LongDate = 1,
/// <summary>
/// Displays a date using the short-date format specified in your computer's regional settings.
/// </summary>
ShortDate = 2,
/// <summary>
/// Displays a time using the long-time format specified in your computer's regional settings.
/// </summary>
LongTime = 3,
/// <summary>
/// Displays a time using the short-time format specified in your computer's regional settings.
/// </summary>
ShortTime = 4
};
}
@@ -1,22 +0,0 @@
//
// DateInterval.cs
//
// Author:
// Chris J Breisch ([email protected])
//
// (C) 2002 Chris J Breisch
//
namespace Microsoft.VisualBasic {
public enum DateInterval : int {
Year = 0,
Quarter = 1,
Month = 2,
DayOfYear = 3,
Day = 4,
WeekOfYear = 5,
Weekday = 6,
Hour = 7,
Minute = 8,
Second = 9
};
}
@@ -1,14 +0,0 @@
//
// DueDate.cs
//
// Author:
// Chris J Breisch ([email protected])
//
// (C) 2002 Chris J Breisch
//
namespace Microsoft.VisualBasic {
public enum DueDate : int {
EndOfPeriod = 0,
BegOfPeriod = 1
};
}
@@ -1,41 +0,0 @@
//
// ErrObject.cs
//
// Author:
// Chris J Breisch ([email protected])
//
// (C) 2002 Chris J Breisch
//
using System;
namespace Microsoft.VisualBasic
{
sealed public class ErrObject {
// Declarations
// Constructors
// Properties
[MonoTODO]
public System.Int32 HelpContext { get { throw new NotImplementedException (); } set { throw new NotImplementedException (); } }
[MonoTODO]
public System.Int32 LastDllError { get { throw new NotImplementedException (); } }
[MonoTODO]
public System.Int32 Number { get { throw new NotImplementedException (); } set { throw new NotImplementedException (); } }
[MonoTODO]
public System.Int32 Erl { get { throw new NotImplementedException (); } }
[MonoTODO]
public System.String Source { get { throw new NotImplementedException (); } set { throw new NotImplementedException (); } }
[MonoTODO]
public System.String HelpFile { get { throw new NotImplementedException (); } set { throw new NotImplementedException (); } }
[MonoTODO]
public System.String Description { get { throw new NotImplementedException (); } set { throw new NotImplementedException (); } }
// Methods
[MonoTODO]
public System.Exception GetException () { throw new NotImplementedException (); }
[MonoTODO]
public void Clear () { throw new NotImplementedException (); }
[MonoTODO]
public void Raise (System.Int32 Number, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(null)] System.Object Source, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(null)] System.Object Description, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(null)] System.Object HelpFile, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(null)] System.Object HelpContext) { throw new NotImplementedException (); }
// Events
};
}
@@ -1,20 +0,0 @@
//
// FileAttribute.cs
//
// Author:
// Chris J Breisch ([email protected])
//
// (C) 2002 Chris J Breisch
//
namespace Microsoft.VisualBasic {
[System.FlagsAttribute]
public enum FileAttribute : int {
Normal = 0,
ReadOnly = 1,
Hidden = 2,
System = 4,
Volume = 8,
Directory = 16,
Archive = 32
};
}
@@ -1,189 +0,0 @@
//
// FileSystem.cs
//
// Author:
// Chris J Breisch ([email protected])
//
// (C) 2002 Chris J Breisch
//
using System;
namespace Microsoft.VisualBasic
{
[Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute]
sealed public class FileSystem {
// Declarations
// Constructors
// Properties
// Methods
[MonoTODO]
public static void ChDir (System.String Path) { throw new NotImplementedException (); }
[MonoTODO]
public static void ChDrive (System.Char Drive) { throw new NotImplementedException (); }
[MonoTODO]
public static void ChDrive (System.String Drive) { throw new NotImplementedException (); }
[MonoTODO]
public static System.String CurDir () { throw new NotImplementedException (); }
[MonoTODO]
public static System.String CurDir (System.Char Drive) { throw new NotImplementedException (); }
[MonoTODO]
public static System.String Dir () { throw new NotImplementedException (); }
[MonoTODO]
public static System.String Dir (System.String Pathname, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(0)] Microsoft.VisualBasic.FileAttribute Attributes) { throw new NotImplementedException (); }
[MonoTODO]
public static void MkDir (System.String Path) { throw new NotImplementedException (); }
[MonoTODO]
public static void RmDir (System.String Path) { throw new NotImplementedException (); }
[MonoTODO]
public static void FileCopy (System.String Source, System.String Destination) { throw new NotImplementedException (); }
[MonoTODO]
public static System.DateTime FileDateTime (System.String PathName) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Int64 FileLen (System.String PathName) { throw new NotImplementedException (); }
[MonoTODO]
public static Microsoft.VisualBasic.FileAttribute GetAttr (System.String PathName) { throw new NotImplementedException (); }
[MonoTODO]
public static void Kill (System.String PathName) { throw new NotImplementedException (); }
[MonoTODO]
public static void SetAttr (System.String PathName, Microsoft.VisualBasic.FileAttribute Attributes) { throw new NotImplementedException (); }
[MonoTODO]
public static void FileOpen (System.Int32 FileNumber, System.String FileName, Microsoft.VisualBasic.OpenMode Mode, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(-1)] Microsoft.VisualBasic.OpenAccess Access, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(-1)] Microsoft.VisualBasic.OpenShare Share, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(-1)] System.Int32 RecordLength) { throw new NotImplementedException (); }
[MonoTODO]
public static void FileClose (params System.Int32[] FileNumbers) { throw new NotImplementedException (); }
[MonoTODO]
public static void FileGetObject (System.Int32 FileNumber, ref System.Object Value, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(-1)] ref System.Int64 RecordNumber) { throw new NotImplementedException (); }
[MonoTODO]
public static void FileGet (System.Int32 FileNumber, ref System.ValueType Value, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(-1)] ref System.Int64 RecordNumber) { throw new NotImplementedException (); }
[MonoTODO]
public static void FileGet (System.Int32 FileNumber, ref System.Array Value, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(-1)] ref System.Int64 RecordNumber, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(false)] ref System.Boolean ArrayIsDynamic, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(false)] ref System.Boolean StringIsFixedLength) { throw new NotImplementedException (); }
[MonoTODO]
public static void FileGet (System.Int32 FileNumber, ref System.Boolean Value, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(-1)] ref System.Int64 RecordNumber) { throw new NotImplementedException (); }
[MonoTODO]
public static void FileGet (System.Int32 FileNumber, ref System.Byte Value, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(-1)] ref System.Int64 RecordNumber) { throw new NotImplementedException (); }
[MonoTODO]
public static void FileGet (System.Int32 FileNumber, ref System.Int16 Value, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(-1)] ref System.Int64 RecordNumber) { throw new NotImplementedException (); }
[MonoTODO]
public static void FileGet (System.Int32 FileNumber, ref System.Int32 Value, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(-1)] ref System.Int64 RecordNumber) { throw new NotImplementedException (); }
[MonoTODO]
public static void FileGet (System.Int32 FileNumber, ref System.Int64 Value, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(-1)] ref System.Int64 RecordNumber) { throw new NotImplementedException (); }
[MonoTODO]
public static void FileGet (System.Int32 FileNumber, ref System.Char Value, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(-1)] ref System.Int64 RecordNumber) { throw new NotImplementedException (); }
[MonoTODO]
public static void FileGet (System.Int32 FileNumber, ref System.Single Value, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(-1)] ref System.Int64 RecordNumber) { throw new NotImplementedException (); }
[MonoTODO]
public static void FileGet (System.Int32 FileNumber, ref System.Double Value, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(-1)] ref System.Int64 RecordNumber) { throw new NotImplementedException (); }
[MonoTODO]
public static void FileGet (System.Int32 FileNumber, ref System.Decimal Value, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(-1)] ref System.Int64 RecordNumber) { throw new NotImplementedException (); }
[MonoTODO]
public static void FileGet (System.Int32 FileNumber, ref System.String Value, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(-1)] ref System.Int64 RecordNumber, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(false)] ref System.Boolean StringIsFixedLength) { throw new NotImplementedException (); }
[MonoTODO]
public static void FileGet (System.Int32 FileNumber, ref System.DateTime Value, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(-1)] ref System.Int64 RecordNumber) { throw new NotImplementedException (); }
[MonoTODO]
public static void FilePutObject (System.Int32 FileNumber, System.Object Value, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(-1)] System.Int64 RecordNumber) { throw new NotImplementedException (); }
[MonoTODO]
[System.ObsoleteAttribute("Use FilePutObject to write Object types, or coerce FileNumber and RecordNumber to Integer for writing non-Object types", false)]
public static void FilePut (System.Object FileNumber, System.Object Value, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(-1)] System.Object RecordNumber) { throw new NotImplementedException (); }
[MonoTODO]
public static void FilePut (System.Int32 FileNumber, System.ValueType Value, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(-1)] System.Int64 RecordNumber) { throw new NotImplementedException (); }
[MonoTODO]
public static void FilePut (System.Int32 FileNumber, System.Array Value, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(-1)] System.Int64 RecordNumber, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(false)] System.Boolean ArrayIsDynamic, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(false)] System.Boolean StringIsFixedLength) { throw new NotImplementedException (); }
[MonoTODO]
public static void FilePut (System.Int32 FileNumber, System.Boolean Value, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(-1)] System.Int64 RecordNumber) { throw new NotImplementedException (); }
[MonoTODO]
public static void FilePut (System.Int32 FileNumber, System.Byte Value, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(-1)] System.Int64 RecordNumber) { throw new NotImplementedException (); }
[MonoTODO]
public static void FilePut (System.Int32 FileNumber, System.Int16 Value, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(-1)] System.Int64 RecordNumber) { throw new NotImplementedException (); }
[MonoTODO]
public static void FilePut (System.Int32 FileNumber, System.Int32 Value, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(-1)] System.Int64 RecordNumber) { throw new NotImplementedException (); }
[MonoTODO]
public static void FilePut (System.Int32 FileNumber, System.Int64 Value, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(-1)] System.Int64 RecordNumber) { throw new NotImplementedException (); }
[MonoTODO]
public static void FilePut (System.Int32 FileNumber, System.Char Value, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(-1)] System.Int64 RecordNumber) { throw new NotImplementedException (); }
[MonoTODO]
public static void FilePut (System.Int32 FileNumber, System.Single Value, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(-1)] System.Int64 RecordNumber) { throw new NotImplementedException (); }
[MonoTODO]
public static void FilePut (System.Int32 FileNumber, System.Double Value, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(-1)] System.Int64 RecordNumber) { throw new NotImplementedException (); }
[MonoTODO]
public static void FilePut (System.Int32 FileNumber, System.Decimal Value, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(-1)] System.Int64 RecordNumber) { throw new NotImplementedException (); }
[MonoTODO]
public static void FilePut (System.Int32 FileNumber, System.String Value, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(-1)] System.Int64 RecordNumber, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(false)] System.Boolean StringIsFixedLength) { throw new NotImplementedException (); }
[MonoTODO]
public static void FilePut (System.Int32 FileNumber, System.DateTime Value, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(-1)] System.Int64 RecordNumber) { throw new NotImplementedException (); }
[MonoTODO]
public static void Print (System.Int32 FileNumber, params System.Object[] Output) { throw new NotImplementedException (); }
[MonoTODO]
public static void PrintLine (System.Int32 FileNumber, params System.Object[] Output) { throw new NotImplementedException (); }
[MonoTODO]
public static void Input (System.Int32 FileNumber, ref System.Object Value) { throw new NotImplementedException (); }
[MonoTODO]
public static void Input (System.Int32 FileNumber, ref System.Boolean Value) { throw new NotImplementedException (); }
[MonoTODO]
public static void Input (System.Int32 FileNumber, ref System.Byte Value) { throw new NotImplementedException (); }
[MonoTODO]
public static void Input (System.Int32 FileNumber, ref System.Int16 Value) { throw new NotImplementedException (); }
[MonoTODO]
public static void Input (System.Int32 FileNumber, ref System.Int32 Value) { throw new NotImplementedException (); }
[MonoTODO]
public static void Input (System.Int32 FileNumber, ref System.Int64 Value) { throw new NotImplementedException (); }
[MonoTODO]
public static void Input (System.Int32 FileNumber, ref System.Char Value) { throw new NotImplementedException (); }
[MonoTODO]
public static void Input (System.Int32 FileNumber, ref System.Single Value) { throw new NotImplementedException (); }
[MonoTODO]
public static void Input (System.Int32 FileNumber, ref System.Double Value) { throw new NotImplementedException (); }
[MonoTODO]
public static void Input (System.Int32 FileNumber, ref System.Decimal Value) { throw new NotImplementedException (); }
[MonoTODO]
public static void Input (System.Int32 FileNumber, ref System.String Value) { throw new NotImplementedException (); }
[MonoTODO]
public static void Input (System.Int32 FileNumber, ref System.DateTime Value) { throw new NotImplementedException (); }
[MonoTODO]
public static void Write (System.Int32 FileNumber, params System.Object[] Output) { throw new NotImplementedException (); }
[MonoTODO]
public static void WriteLine (System.Int32 FileNumber, params System.Object[] Output) { throw new NotImplementedException (); }
[MonoTODO]
public static System.String InputString (System.Int32 FileNumber, System.Int32 CharCount) { throw new NotImplementedException (); }
[MonoTODO]
public static System.String LineInput (System.Int32 FileNumber) { throw new NotImplementedException (); }
[MonoTODO]
public static void Lock (System.Int32 FileNumber) { throw new NotImplementedException (); }
[MonoTODO]
public static void Lock (System.Int32 FileNumber, System.Int64 Record) { throw new NotImplementedException (); }
[MonoTODO]
public static void Lock (System.Int32 FileNumber, System.Int64 FromRecord, System.Int64 ToRecord) { throw new NotImplementedException (); }
[MonoTODO]
public static void Unlock (System.Int32 FileNumber) { throw new NotImplementedException (); }
[MonoTODO]
public static void Unlock (System.Int32 FileNumber, System.Int64 Record) { throw new NotImplementedException (); }
[MonoTODO]
public static void Unlock (System.Int32 FileNumber, System.Int64 FromRecord, System.Int64 ToRecord) { throw new NotImplementedException (); }
[MonoTODO]
public static void FileWidth (System.Int32 FileNumber, System.Int32 RecordWidth) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Int32 FreeFile () { throw new NotImplementedException (); }
[MonoTODO]
public static void Seek (System.Int32 FileNumber, System.Int64 Position) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Int64 Seek (System.Int32 FileNumber) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Boolean EOF (System.Int32 FileNumber) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Int64 Loc (System.Int32 FileNumber) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Int64 LOF (System.Int32 FileNumber) { throw new NotImplementedException (); }
[MonoTODO]
public static Microsoft.VisualBasic.TabInfo TAB () { throw new NotImplementedException (); }
[MonoTODO]
public static Microsoft.VisualBasic.TabInfo TAB (System.Int16 Column) { throw new NotImplementedException (); }
[MonoTODO]
public static Microsoft.VisualBasic.SpcInfo SPC (System.Int16 Count) { throw new NotImplementedException (); }
[MonoTODO]
public static Microsoft.VisualBasic.OpenMode FileAttr (System.Int32 FileNumber) { throw new NotImplementedException (); }
[MonoTODO]
public static void Reset () { throw new NotImplementedException (); }
[MonoTODO]
public static void Rename (System.String OldPath, System.String NewPath) { throw new NotImplementedException (); }
// Events
};
}
@@ -1,48 +0,0 @@
//
// Financial.cs
//
// Author:
// Chris J Breisch ([email protected])
//
// (C) 2002 Chris J Breisch
//
using System;
namespace Microsoft.VisualBasic
{
[Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute]
sealed public class Financial {
// Declarations
// Constructors
// Properties
// Methods
[MonoTODO]
public static System.Double DDB (System.Double Cost, System.Double Salvage, System.Double Life, System.Double Period, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(2)] System.Double Factor) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Double FV (System.Double Rate, System.Double NPer, System.Double Pmt, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(0)] System.Double PV, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(0)] Microsoft.VisualBasic.DueDate Due) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Double IPmt (System.Double Rate, System.Double Per, System.Double NPer, System.Double PV, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(0)] System.Double FV, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(0)] Microsoft.VisualBasic.DueDate Due) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Double IRR (ref System.Double[] ValueArray, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(0.1)] ref System.Double Guess) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Double MIRR (ref System.Double[] ValueArray, ref System.Double FinanceRate, ref System.Double ReinvestRate) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Double NPer (System.Double Rate, System.Double Pmt, System.Double PV, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(0)] System.Double FV, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(0)] Microsoft.VisualBasic.DueDate Due) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Double NPV (System.Double Rate, ref System.Double[] ValueArray) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Double Pmt (System.Double Rate, System.Double NPer, System.Double PV, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(0)] System.Double FV, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(0)] Microsoft.VisualBasic.DueDate Due) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Double PPmt (System.Double Rate, System.Double Per, System.Double NPer, System.Double PV, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(0)] System.Double FV, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(0)] Microsoft.VisualBasic.DueDate Due) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Double PV (System.Double Rate, System.Double NPer, System.Double Pmt, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(0)] System.Double FV, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(0)] Microsoft.VisualBasic.DueDate Due) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Double Rate (System.Double NPer, System.Double Pmt, System.Double PV, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(0)] System.Double FV, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(0)] Microsoft.VisualBasic.DueDate Due, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(0.1)] System.Double Guess) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Double SLN (System.Double Cost, System.Double Salvage, System.Double Life) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Double SYD (System.Double Cost, System.Double Salvage, System.Double Life, System.Double Period) { throw new NotImplementedException (); }
// Events
};
}
@@ -1,20 +0,0 @@
//
// FirstDayOfWeek.cs
//
// Author:
// Chris J Breisch ([email protected])
//
// (C) 2002 Chris J Breisch
//
namespace Microsoft.VisualBasic {
public enum FirstDayOfWeek : int {
System = 0,
Sunday = 1,
Monday = 2,
Tuesday = 3,
Wednesday = 4,
Thursday = 5,
Friday = 6,
Saturday = 7
};
}
@@ -1,16 +0,0 @@
//
// FirstWeekOfYear.cs
//
// Author:
// Chris J Breisch ([email protected])
//
// (C) 2002 Chris J Breisch
//
namespace Microsoft.VisualBasic {
public enum FirstWeekOfYear : int {
System = 0,
Jan1 = 1,
FirstFourDays = 2,
FirstFullWeek = 3
};
}
@@ -1,30 +0,0 @@
//
// Globals.cs
//
// Author:
// Chris J Breisch ([email protected])
//
// (C) 2002 Chris J Breisch
//
using System;
namespace Microsoft.VisualBasic
{
[Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute]
sealed public class Globals {
// Declarations
// Constructors
// Properties
[MonoTODO]
public static System.String ScriptEngine { get { throw new NotImplementedException (); } }
[MonoTODO]
public static System.Int32 ScriptEngineMajorVersion { get { throw new NotImplementedException (); } }
[MonoTODO]
public static System.Int32 ScriptEngineMinorVersion { get { throw new NotImplementedException (); } }
[MonoTODO]
public static System.Int32 ScriptEngineBuildVersion { get { throw new NotImplementedException (); } }
// Methods
// Events
};
}
@@ -1,57 +0,0 @@
//
// Information.cs
//
// Author:
// Chris J Breisch ([email protected])
//
// (C) 2002 Chris J Breisch
//
using System;
namespace Microsoft.VisualBasic
{
[Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute]
sealed public class Information {
// Declarations
// Constructors
// Properties
// Methods
[MonoTODO]
public static Microsoft.VisualBasic.ErrObject Err () { throw new NotImplementedException (); }
[MonoTODO]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public static System.Int32 Erl () { throw new NotImplementedException (); }
[MonoTODO]
public static System.Boolean IsArray (System.Object VarName) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Boolean IsDate (System.Object Expression) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Boolean IsDBNull (System.Object Expression) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Boolean IsNothing (System.Object Expression) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Boolean IsError (System.Object Expression) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Boolean IsReference (System.Object Expression) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Boolean IsNumeric (System.Object Expression) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Int32 LBound (System.Array Array, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(1)] System.Int32 Rank) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Int32 UBound (System.Array Array, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(1)] System.Int32 Rank) { throw new NotImplementedException (); }
[MonoTODO]
public static System.String TypeName (System.Object VarName) { throw new NotImplementedException (); }
[MonoTODO]
public static System.String SystemTypeName (System.String VbName) { throw new NotImplementedException (); }
[MonoTODO]
public static System.String VbTypeName (System.String UrtName) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Int32 QBColor (System.Int32 Color) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Int32 RGB (System.Int32 Red, System.Int32 Green, System.Int32 Blue) { throw new NotImplementedException (); }
[MonoTODO]
public static Microsoft.VisualBasic.VariantType VarType (System.Object VarName) { throw new NotImplementedException (); }
// Events
};
}
@@ -1,39 +0,0 @@
//
// Interaction.cs
//
// Author:
// Chris J Breisch ([email protected])
//
// (C) 2002 Chris J Breisch
//
namespace Microsoft.VisualBasic {
[Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute]
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Auto)]
sealed public class Interaction {
// Declarations
// Constructors
// Properties
// Methods
public static System.Int32 Shell (System.String Pathname, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(2)] Microsoft.VisualBasic.AppWinStyle Style, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(false)] System.Boolean Wait, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(-1)] System.Int32 Timeout) { return 0;}
public static void AppActivate (System.Int32 ProcessId) { }
public static void AppActivate (System.String Title) { }
public static System.String Command () { return "";}
public static System.String Environ (System.Int32 Expression) { return "";}
public static System.String Environ (System.String Expression) { return "";}
public static void Beep () { }
public static System.String InputBox (System.String Prompt, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue("")] System.String Title, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue("")] System.String DefaultResponse, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(-1)] System.Int32 XPos, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(-1)] System.Int32 YPos) { return "";}
public static Microsoft.VisualBasic.MsgBoxResult MsgBox (System.Object Prompt, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(0)] Microsoft.VisualBasic.MsgBoxStyle Buttons, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(null)] System.Object Title) { return 0;}
public static System.Object CallByName (System.Object ObjectRef, System.String ProcName, Microsoft.VisualBasic.CallType UseCallType, params System.Object[] Args) { return null;}
public static System.Object Choose (System.Double Index, params System.Object[] Choice) { return null;}
public static System.Object IIf (System.Boolean Expression, System.Object TruePart, System.Object FalsePart) { return null;}
public static System.String Partition (System.Int64 Number, System.Int64 Start, System.Int64 Stop, System.Int64 Interval) { return "";}
public static System.Object Switch (params System.Object[] VarExpr) { return null;}
public static void DeleteSetting (System.String AppName, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(null)] System.String Section, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(null)] System.String Key) { }
public static System.String[,] GetAllSettings (System.String AppName, System.String Section) { return null;}
public static System.String GetSetting (System.String AppName, System.String Section, System.String Key, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue("")] System.String Default) { return "";}
public static void SaveSetting (System.String AppName, System.String Section, System.String Key, System.String Setting) { }
public static System.Object CreateObject (System.String ProgId, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue("")] System.String ServerName) { return null;}
public static System.Object GetObject ([System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(null)] System.String PathName, [System.Runtime.InteropServices.Optional] [System.ComponentModel.DefaultValue(null)] System.String Class) { return null;}
// Events
};
}
@@ -1,26 +0,0 @@
//
// BooleanType.cs
//
// Author:
// Chris J Breisch ([email protected])
//
// (C) 2002 Chris J Breisch
//
using System;
namespace Microsoft.VisualBasic.CompilerServices
{
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
[Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute]
sealed public class BooleanType {
// Declarations
// Constructors
// Properties
// Methods
public static System.Boolean FromString (System.String Value) { return System.Boolean.Parse(Value); }
[MonoTODO]
public static System.Boolean FromObject (System.Object Value) { throw new NotImplementedException(); }
// Events
};
}
@@ -1,26 +0,0 @@
//
// ByteType.cs
//
// Author:
// Chris J Breisch ([email protected])
//
// (C) 2002 Chris J Breisch
//
using System;
namespace Microsoft.VisualBasic.CompilerServices
{
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
[Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute]
sealed public class ByteType {
// Declarations
// Constructors
// Properties
// Methods
public static System.Byte FromString (System.String Value) { return System.Byte.Parse(Value); }
[MonoTODO]
public static System.Byte FromObject (System.Object Value) { throw new NotImplementedException(); }
// Events
};
}
@@ -1,27 +0,0 @@
//
// CharArrayType.cs
//
// Author:
// Chris J Breisch ([email protected])
//
// (C) 2002 Chris J Breisch
//
using System;
namespace Microsoft.VisualBasic.CompilerServices
{
[Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
sealed public class CharArrayType {
// Declarations
// Constructors
// Properties
// Methods
[MonoTODO]
public static System.Char[] FromString (System.String Value) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Char[] FromObject (System.Object Value) { throw new NotImplementedException (); }
// Events
};
}
@@ -1,27 +0,0 @@
//
// CharType.cs
//
// Author:
// Chris J Breisch ([email protected])
//
// (C) 2002 Chris J Breisch
//
using System;
namespace Microsoft.VisualBasic.CompilerServices
{
[Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
sealed public class CharType {
// Declarations
// Constructors
// Properties
// Methods
[MonoTODO]
public static System.Char FromString (System.String Value) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Char FromObject (System.Object Value) { throw new NotImplementedException (); }
// Events
};
}
@@ -1,28 +0,0 @@
//
// DateType.cs
//
// Author:
// Chris J Breisch ([email protected])
//
// (C) 2002 Chris J Breisch
//
using System;
namespace Microsoft.VisualBasic.CompilerServices
{
[Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
sealed public class DateType {
// Declarations
// Constructors
// Properties
// Methods
public static System.DateTime FromString (System.String Value) { return System.DateTime.Parse(Value); }
[MonoTODO]
public static System.DateTime FromString (System.String Value, System.Globalization.CultureInfo culture) { throw new NotImplementedException (); }
[MonoTODO]
public static System.DateTime FromObject (System.Object Value) { throw new NotImplementedException (); }
// Events
};
}
@@ -1,34 +0,0 @@
//
// DecimalType.cs
//
// Author:
// Chris J Breisch ([email protected])
//
// (C) 2002 Chris J Breisch
//
using System;
namespace Microsoft.VisualBasic.CompilerServices
{
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
[Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute]
sealed public class DecimalType {
// Declarations
// Constructors
// Properties
// Methods
[MonoTODO]
public static System.Decimal FromBoolean (System.Boolean Value) { throw new NotImplementedException (); }
public static System.Decimal FromString (System.String Value) { return System.Decimal.Parse(Value); }
[MonoTODO]
public static System.Decimal FromString (System.String Value, System.Globalization.NumberFormatInfo NumberFormat) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Decimal FromObject (System.Object Value) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Decimal FromObject (System.Object Value, System.Globalization.NumberFormatInfo NumberFormat) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Decimal Parse (System.String Value, System.Globalization.NumberFormatInfo NumberFormat) { throw new NotImplementedException (); }
// Events
};
}
@@ -1,33 +0,0 @@
//
// DoubleType.cs
//
// Author:
// Chris J Breisch ([email protected])
//
// (C) 2002 Chris J Breisch
//
using System;
namespace Microsoft.VisualBasic.CompilerServices
{
[Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
sealed public class DoubleType {
// Declarations
// Constructors
// Properties
// Methods
public static System.Double FromString (System.String Value) { return System.Double.Parse(Value); }
[MonoTODO]
public static System.Double FromString (System.String Value, System.Globalization.NumberFormatInfo NumberFormat) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Double FromObject (System.Object Value) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Double FromObject (System.Object Value, System.Globalization.NumberFormatInfo NumberFormat) { throw new NotImplementedException (); }
public static System.Double Parse (System.String Value) { return System.Double.Parse(Value); }
[MonoTODO]
public static System.Double Parse (System.String Value, System.Globalization.NumberFormatInfo NumberFormat) { throw new NotImplementedException (); }
// Events
};
}
@@ -1,20 +0,0 @@
//
// ExceptionUtils.cs
//
// Author:
// Chris J Breisch ([email protected])
//
// (C) 2002 Chris J Breisch
//
namespace Microsoft.VisualBasic.CompilerServices {
[Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Auto)]
sealed public class ExceptionUtils {
// Declarations
// Constructors
// Properties
// Methods
// Events
};
}
@@ -1,41 +0,0 @@
//
// FlowControl.cs
//
// Author:
// Chris J Breisch ([email protected])
//
// (C) 2002 Chris J Breisch
//
using System;
namespace Microsoft.VisualBasic.CompilerServices
{
[Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
sealed public class FlowControl {
// Declarations
// Constructors
// Properties
// Methods
[MonoTODO]
public static System.Boolean ForNextCheckR4 (System.Single count, System.Single limit, System.Single StepValue) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Boolean ForNextCheckR8 (System.Double count, System.Double limit, System.Double StepValue) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Boolean ForNextCheckDec (System.Decimal count, System.Decimal limit, System.Decimal StepValue) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Boolean ForLoopInitObj (System.Object Counter, System.Object Start, System.Object Limit, System.Object StepValue, ref System.Object LoopForResult, ref System.Object CounterResult) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Boolean ForNextCheckObj (System.Object Counter, System.Object LoopObj, ref System.Object CounterResult) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Collections.IEnumerator ForEachInArr (System.Array ary) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Collections.IEnumerator ForEachInObj (System.Object obj) { throw new NotImplementedException (); }
[MonoTODO]
public static System.Boolean ForEachNextObj (ref System.Object obj, ref System.Collections.IEnumerator enumerator) { throw new NotImplementedException (); }
[MonoTODO]
public static void CheckForSyncLockOnValueType (System.Object obj) { throw new NotImplementedException (); }
// Events
};
}
@@ -1,24 +0,0 @@
//
// HostServices.cs
//
// Author:
// Chris J Breisch ([email protected])
//
// (C) 2002 Chris J Breisch
//
using System;
namespace Microsoft.VisualBasic.CompilerServices
{
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
sealed public class HostServices {
// Declarations
// Constructors
// Properties
[MonoTODO]
public static Microsoft.VisualBasic.CompilerServices.IVbHost VBHost { get { throw new NotImplementedException (); } set { throw new NotImplementedException (); } }
// Methods
// Events
};
}
Loaded 100 of 4256 files, more files were not shown because too many files have changed in this diff. Show more