mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-17 19:10:23 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ac6a0aff32 |
No files matched your search
+10
-14
@@ -1,17 +1,13 @@
|
||||
aclocal.m4
|
||||
config.cache
|
||||
config.guess
|
||||
config.h
|
||||
config.h.in
|
||||
config.log
|
||||
config.status
|
||||
config.sub
|
||||
configure
|
||||
libtool
|
||||
ltmain.sh
|
||||
ltconfig
|
||||
Makefile
|
||||
Makefile.in
|
||||
mono-*.tar.gz
|
||||
stamp-h
|
||||
config.cache
|
||||
stamp-h.in
|
||||
config.status
|
||||
aclocal.m4
|
||||
configure
|
||||
stamp-h
|
||||
libtool
|
||||
Makefile.in
|
||||
config.log
|
||||
config.h.in
|
||||
mono-*.tar.gz
|
||||
@@ -1,102 +1,3 @@
|
||||
Mon Sep 10 20:19:00 CEST 2001 Paolo Molaro <[email protected]>
|
||||
|
||||
* configure.in: check for sizeof(void*) and for the architecture.
|
||||
|
||||
2001-09-05 Dick Porter <[email protected]>
|
||||
|
||||
* autogen.sh: Fixed the section that adds $ACLOCAL_FLAGS to the
|
||||
aclocal invocation, so putting aclocal files in /usr/local works
|
||||
|
||||
2001-08-30 Dietmar Maurer <[email protected]>
|
||||
|
||||
* *: removed the libffi dependency, mono now compiles on cygwin
|
||||
|
||||
* mono/wrapper/build-dll: new file.
|
||||
|
||||
2001-08-28 Dietmar Maurer <[email protected]>
|
||||
|
||||
* mono/tests/console.cs: impl.
|
||||
|
||||
* mono/tests/box.cs: impl.
|
||||
|
||||
* mono/tests/stream-writer.cs: impl.
|
||||
|
||||
Mon Aug 27 20:24:26 CEST 2001 Paolo Molaro <[email protected]>
|
||||
|
||||
* mono/tests/*: New test cases, mostly for virtual method dispatch.
|
||||
Use make testb for the slow benchmarking programs,
|
||||
make test for the usual regression test checks.
|
||||
|
||||
2001-08-22 Rodrigo Moya <[email protected]>
|
||||
|
||||
* mono/cil/Makefile.am:
|
||||
* mono/wrapper/Makefile.am: use correct variables for installation
|
||||
directories
|
||||
|
||||
Tue Aug 21 18:54:06 CEST 2001 Paolo Molaro <[email protected]>
|
||||
|
||||
* mono/tests/exceptions*: enhanced and added more tests for
|
||||
exceptions.
|
||||
|
||||
2001-08-20 Miguel de Icaza <[email protected]>
|
||||
|
||||
* mono/Makefile.am (SUBDIRS): Remove `test' from here to allow us
|
||||
to pass make distcheck
|
||||
|
||||
* mono/wrapper/Makefile.am (EXTRA_DIST): Include genwrapper.pl
|
||||
|
||||
* configure.in, Makefile.am, runtime/Makefile.am (dist-hook,
|
||||
install-data-hook): Added mechanism to distribute and install the
|
||||
dll files.
|
||||
|
||||
2001-08-20 Dietmar Maurer <[email protected]>
|
||||
|
||||
* mono/tests/stream.cs: new tests for the Stream class
|
||||
|
||||
* configure.in: I really need LIBTOOL for libmonowrapper.so, so I
|
||||
added it again.
|
||||
|
||||
2001-08-16 Alex Graveley <[email protected]>
|
||||
|
||||
* configure.in: Replace AM_PROG_LIBTOOL with AC_PROG_RANLIB. This
|
||||
removes libtool dependency on all of Mono.
|
||||
|
||||
2001-08-10 Dietmar Maurer <[email protected]>
|
||||
|
||||
* mono/tests/array.cs: more array tests
|
||||
|
||||
2001-08-09 Dietmar Maurer <[email protected]>
|
||||
|
||||
* mono/tests/array.cs: more array tests
|
||||
|
||||
2001-08-06 Dietmar Maurer <[email protected]>
|
||||
|
||||
* mono/tests/pinvoke.cs: we can now print strings ;-)
|
||||
|
||||
* mono/tests/array.cs: new test for arrays
|
||||
|
||||
2001-08-02 Alex Graveley <[email protected]>
|
||||
|
||||
* libffi/*: Import libffi CVS version, with minor changes to make it
|
||||
compile.
|
||||
|
||||
* mono/interpreter/Makefile.am: Link against
|
||||
../../libffi/.libs/libffi.a.
|
||||
|
||||
* Makefile.am: Add libffi
|
||||
|
||||
* autogen.sh: Replace with adapted gnome autogen.sh
|
||||
|
||||
* configure.in: Add AC_CONFIG_SUBDIRS(libffi).
|
||||
|
||||
2001-08-02 Dietmar Maurer <[email protected]>
|
||||
|
||||
* mono/tests/pinvoke.cs: impl.
|
||||
|
||||
Wed Aug 1 22:34:52 CEST 2001 Paolo Molaro <[email protected]>
|
||||
|
||||
* configure.in, mono/tests: added some tests for the interpreter.
|
||||
|
||||
2001-07-15 Sean MacIsaac <[email protected]>
|
||||
|
||||
* doc/download: added instructions for cygwin
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
SUBDIRS = mono doc runtime
|
||||
SUBDIRS = mono doc
|
||||
+6
-120
@@ -1,120 +1,6 @@
|
||||
#!/bin/sh
|
||||
# Run this to generate all the initial makefiles, etc.
|
||||
# Ripped off from GNOME macros version
|
||||
|
||||
DIE=0
|
||||
|
||||
srcdir=`dirname $0`
|
||||
test -z "$srcdir" && srcdir=.
|
||||
|
||||
if [ -n "$MONO_PATH" ]; then
|
||||
ACLOCAL_FLAGS="-I $MONO_PATH/share/aclocal $ACLOCAL_FLAGS"
|
||||
PATH="$MONO_PATH/bin:$PATH"
|
||||
export PATH
|
||||
fi
|
||||
|
||||
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "**Error**: You must have \`autoconf' installed to compile Mono."
|
||||
echo "Download the appropriate package for your distribution,"
|
||||
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
|
||||
DIE=1
|
||||
}
|
||||
|
||||
(grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && {
|
||||
(libtool --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "**Error**: You must have \`libtool' installed to compile Mono."
|
||||
echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz"
|
||||
echo "(or a newer version if it is available)"
|
||||
DIE=1
|
||||
}
|
||||
}
|
||||
|
||||
grep "^AM_GNU_GETTEXT" $srcdir/configure.in >/dev/null && {
|
||||
grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
|
||||
(gettext --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "**Error**: You must have \`gettext' installed to compile Mono."
|
||||
echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
|
||||
echo "(or a newer version if it is available)"
|
||||
DIE=1
|
||||
}
|
||||
}
|
||||
|
||||
(automake --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "**Error**: You must have \`automake' installed to compile Mono."
|
||||
echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
|
||||
echo "(or a newer version if it is available)"
|
||||
DIE=1
|
||||
NO_AUTOMAKE=yes
|
||||
}
|
||||
|
||||
|
||||
# if no automake, don't bother testing for aclocal
|
||||
test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "**Error**: Missing \`aclocal'. The version of \`automake'"
|
||||
echo "installed doesn't appear recent enough."
|
||||
echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
|
||||
echo "(or a newer version if it is available)"
|
||||
DIE=1
|
||||
}
|
||||
|
||||
if test "$DIE" -eq 1; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$*"; then
|
||||
echo "**Warning**: I am going to run \`configure' with no arguments."
|
||||
echo "If you wish to pass any to it, please specify them on the"
|
||||
echo \`$0\'" command line."
|
||||
echo
|
||||
fi
|
||||
|
||||
case $CC in
|
||||
xlc )
|
||||
am_opt=--include-deps;;
|
||||
esac
|
||||
|
||||
|
||||
if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
|
||||
if test -z "$NO_LIBTOOLIZE" ; then
|
||||
echo "Running libtoolize..."
|
||||
libtoolize --force --copy
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Running aclocal $aclocalinclude ..."
|
||||
aclocal $aclocalinclude || {
|
||||
echo
|
||||
echo "**Error**: aclocal failed. This may mean that you have not"
|
||||
echo "installed all of the packages you need, or you may need to"
|
||||
echo "set ACLOCAL_FLAGS to include \"-I \$prefix/share/aclocal\""
|
||||
echo "for the prefix where you installed the packages whose"
|
||||
echo "macros were not found"
|
||||
exit 1
|
||||
}
|
||||
|
||||
if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
|
||||
echo "Running autoheader..."
|
||||
autoheader || { echo "**Error**: autoheader failed."; exit 1; }
|
||||
fi
|
||||
|
||||
echo "Running automake --gnu $am_opt ..."
|
||||
automake --add-missing --gnu $am_opt ||
|
||||
{ echo "**Error**: automake failed."; exit 1; }
|
||||
echo "Running autoconf ..."
|
||||
autoconf || { echo "**Error**: autoconf failed."; exit 1; }
|
||||
|
||||
|
||||
conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
|
||||
|
||||
if test x$NOCONFIGURE = x; then
|
||||
echo Running $srcdir/configure $conf_flags "$@" ...
|
||||
$srcdir/configure $conf_flags "$@" \
|
||||
&& echo Now type \`make\' to compile $PKG_NAME || exit 1
|
||||
else
|
||||
echo Skipping configure process.
|
||||
fi
|
||||
libtoolize --automake
|
||||
automake -a
|
||||
autoheader
|
||||
aclocal $ACLOCAL_FLAGS
|
||||
autoconf
|
||||
./configure $*
|
||||
+5
-42
@@ -1,10 +1,8 @@
|
||||
AC_INIT(README)
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AM_INIT_AUTOMAKE(mono, 0.6)
|
||||
AM_INIT_AUTOMAKE(mono, 0.5)
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_STDC
|
||||
AC_PROG_INSTALL
|
||||
@@ -13,8 +11,6 @@ AC_PROG_INSTALL
|
||||
AC_HEADER_STDC
|
||||
AM_PROG_LIBTOOL
|
||||
|
||||
AC_CHECK_SIZEOF(void *)
|
||||
|
||||
dnl ***************************
|
||||
dnl *** Checks for glib 1.2 ***
|
||||
dnl ***************************
|
||||
@@ -33,37 +29,10 @@ GMODULE_LIBS=`glib-config --libs gmodule`
|
||||
AC_SUBST(GMODULE_CFLAGS)
|
||||
AC_SUBST(GMODULE_LIBS)
|
||||
|
||||
AC_CHECK_LIB(ffi, ffi_prep_cif, ,[
|
||||
AC_MSG_ERROR(libffi 1.20 or higher is required.)])
|
||||
|
||||
CFLAGS='-g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations'
|
||||
|
||||
TARGET="unknown"
|
||||
|
||||
case "$host" in
|
||||
#mips-sgi-irix5.* | mips-sgi-irix6.*) TARGET=MIPS;;
|
||||
i*86-*-*) TARGET=X86; arch_target=x86;;
|
||||
#sparc-sun-4*) TARGET=SPARC;;
|
||||
#sparc-sun-*) TARGET=SPARC;;
|
||||
#sparc*-*-linux*) TARGET=SPARC;;
|
||||
#alpha*-*-linux* | alpha*-*-osf*) TARGET=ALPHA;;
|
||||
#m68k-*-linux*) TARGET=M68K;;
|
||||
#powerpc-*-linux* | powerpc-*-sysv*) TARGET=POWERPC;;
|
||||
#arm-*-linux-*) TARGET=ARM;;
|
||||
esac
|
||||
|
||||
if test ${TARGET} = unknown; then
|
||||
CFLAGS="$CFLAGS -DNO_PORT"
|
||||
AC_MSG_WARN("mono has not been ported to $host: some things may not work.")
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(MIPS_GCC, test ${TARGET}${ac_cv_prog_gcc} = MIPSyes)
|
||||
AM_CONDITIONAL(MIPS_SGI, test ${TARGET}${ac_cv_prog_gcc} = MIPSno)
|
||||
AM_CONDITIONAL(SPARC, test x$TARGET = xSPARC)
|
||||
AM_CONDITIONAL(X86, test x$TARGET = xX86)
|
||||
AM_CONDITIONAL(ALPHA, test x$TARGET = xALPHA)
|
||||
AM_CONDITIONAL(M68K, test x$TARGET = xM68K)
|
||||
AM_CONDITIONAL(POWERPC, test x$TARGET = xPOWERPC)
|
||||
AM_CONDITIONAL(ARM, test x$TARGET = xARM)
|
||||
|
||||
AC_SUBST(arch_target)
|
||||
AC_SUBST(CFLAGS)
|
||||
|
||||
AC_OUTPUT([
|
||||
@@ -72,13 +41,7 @@ mono/Makefile
|
||||
mono/metadata/Makefile
|
||||
mono/dis/Makefile
|
||||
mono/cil/Makefile
|
||||
mono/arch/Makefile
|
||||
mono/arch/x86/Makefile
|
||||
mono/cli/Makefile
|
||||
mono/interpreter/Makefile
|
||||
mono/tests/Makefile
|
||||
mono/wrapper/Makefile
|
||||
mono/monoburg/Makefile
|
||||
mono/jit/Makefile
|
||||
runtime/Makefile
|
||||
doc/Makefile
|
||||
])
|
||||
+21
-65
@@ -5,10 +5,6 @@
|
||||
programs and create an internal tree representation of the
|
||||
program. MCS can parse itself.
|
||||
|
||||
MCS now does type checking at the class, interface and struct
|
||||
levels and can resolve the class hierarchy and as of last week
|
||||
can generate interface code.
|
||||
|
||||
Work is progressing quickly on various fronts in the C#
|
||||
compiler. Recently I started using the System.Reflection API
|
||||
to load system type definitions and avoid self-population of
|
||||
@@ -46,11 +42,10 @@
|
||||
have to postpone this decision until the above steps
|
||||
are finished.
|
||||
|
||||
* Code generation: The compiler recently started generating IL
|
||||
executables that contain interfaces. Work is
|
||||
progressing in other areas.
|
||||
|
||||
The code generation is done through the System.Reflection.Emit API.
|
||||
* Code generation: nothing done so far, but I do not
|
||||
expect this to be hard, as I will just use
|
||||
System.Reflection.Emit to generate the code.
|
||||
|
||||
</ul>
|
||||
|
||||
<a name="tasks">
|
||||
@@ -72,20 +67,27 @@
|
||||
* Jay does not work correctly with `error'
|
||||
productions, making parser errors hard to point. It
|
||||
would be best to port the Bison-To-Java compiler to
|
||||
become Bison-to-C# compiler.
|
||||
|
||||
Nick Drochak has started a project on SourceForge for this.
|
||||
You can find the project at: <a href="http://sourceforge.net/projects/jb2csharp/">
|
||||
http://sourceforge.net/projects/jb2csharp/</a>
|
||||
become Bison-to-C# compiler ([email protected]
|
||||
might have more information)
|
||||
</ul>
|
||||
|
||||
Critical tasks:
|
||||
|
||||
<ul>
|
||||
* Resolve "base" classes and "base" interfaces for
|
||||
classes, structs and interfaces.
|
||||
|
||||
Once this is done, we can actually do the semantic
|
||||
analysis, because otherwise we do not know who our
|
||||
parents are.
|
||||
</ul>
|
||||
|
||||
Interesting and Fun hacks to the compiler:
|
||||
|
||||
<ul>
|
||||
* Finishing the JB port from Java to C#. If you are
|
||||
interested in working on this, please contact the project admin on SourceForge:
|
||||
<a href="http://sourceforge.net/projects/jb2csharp/">
|
||||
http://sourceforge.net/projects/jb2csharp/</a>
|
||||
interested in working on this, please contact Brian
|
||||
Jepson (bjepson at oreilly d-o-t com).
|
||||
|
||||
More on JB at: <a href="http://www.cs.colorado.edu/~dennis/software/jb.html">
|
||||
http://www.cs.colorado.edu/~dennis/software/jb.html</a>
|
||||
@@ -99,6 +101,8 @@
|
||||
features of C# that help reduce the number of bugs
|
||||
in applications. It is one interesting hack.
|
||||
|
||||
* TypeRefManager. This exists currently in its infancy only.
|
||||
|
||||
* Enum resolutions: it is another fun hack, as enums can be defined
|
||||
in terms of themselves (<tt>enum X { a = b + 1, b = 5 }</tt>).
|
||||
|
||||
@@ -140,53 +144,5 @@ A: No, currently I am using Jay which is a port of Berkeley Yacc to
|
||||
In the future I want to port one of the Bison/Java ports to C# for
|
||||
the parser.
|
||||
|
||||
Q: Should someone work on a GCC front-end to C#?
|
||||
|
||||
A: I would love if someone does, and we would love to help anyone that
|
||||
takes on that task, but we do not have the time or expertise to
|
||||
build a C# compiler with the GCC engine. I find it a lot more fun
|
||||
personally to work on C# on a C# compiler, which has an intrinsic
|
||||
beauty.
|
||||
|
||||
We can provide help and assistance to anyone who would like to work
|
||||
on this task.
|
||||
|
||||
Q: Should someone make a GCC backend that will generate CIL images?
|
||||
|
||||
A: I would love to see a backend to GCC that generates CIL images. It
|
||||
would provide a ton of free compilers that would generate CIL
|
||||
code. This is something that people would want to look into
|
||||
anyways for Windows interoperation in the future.
|
||||
|
||||
Again, we would love to provide help and assistance to anyone
|
||||
interested in working in such a project.
|
||||
|
||||
Q: What about making a front-end to GCC that takes CIL images and
|
||||
generates native code?
|
||||
|
||||
A: I would love to see this, specially since GCC supports this same
|
||||
feature for Java Byte Codes. You could use the metadata library
|
||||
from Mono to read the byte codes (ie, this would be your
|
||||
"front-end") and generate the trees that get passed to the
|
||||
optimizer.
|
||||
|
||||
Ideally our implementation of the CLI will be available as a shared
|
||||
library that could be linked with your application as its runtime
|
||||
support.
|
||||
|
||||
Again, we would love to provide help and assistance to anyone
|
||||
interested in working in such a project.
|
||||
|
||||
Q: But would this work around the GPL in the GCC compiler and allow
|
||||
people to work on non-free front-ends?
|
||||
|
||||
A: People can already do this by targeting the JVM byte codes (there
|
||||
are about 130 compilers for various languages that target the JVM).
|
||||
|
||||
Q: Why are you writing a JIT engine instead of a front-end to GCC?
|
||||
|
||||
A: The JIT engine and runtime engine will be able to execute CIL
|
||||
executables generated on Windows.
|
||||
|
||||
You might also want to look at the <a href="faq.html#gcc">GCC</a>
|
||||
section on the main FAQ
|
||||
@@ -1,112 +0,0 @@
|
||||
* CVS Access
|
||||
|
||||
If you are an active Mono developer, you can get a CVS account
|
||||
that hosts the Mono source code.
|
||||
|
||||
Send an e-mail to miguel with your public SSH key for this
|
||||
purpose. Please specify if the key was generated with SSH1 or SSH2.
|
||||
|
||||
If you are using SSH2, please generate your key using:
|
||||
|
||||
<pre>
|
||||
ssh-keygen -t rsa
|
||||
</pre>
|
||||
|
||||
And mail me the id_rsa.pub file.
|
||||
|
||||
If you are using SSH1, run:
|
||||
<pre>
|
||||
ssh-keygen
|
||||
</pre>
|
||||
|
||||
And mail me your identity.pub file.
|
||||
|
||||
You will need CVS and SSH. Windows users can get both by
|
||||
installing Cygwin (<a
|
||||
href="http://www.cygwin.com">http://www.cygwin.com</a>)
|
||||
|
||||
Unix users will probably have those tools installed already.
|
||||
|
||||
** Checking out the sources
|
||||
|
||||
To check out the sources for the first time from the
|
||||
repository, use this command:
|
||||
|
||||
<pre>
|
||||
export CVS_RSH=ssh
|
||||
export [email protected]:/cvs/public
|
||||
cvs -z3 co mcs mono
|
||||
</pre>
|
||||
|
||||
** Updating your sources
|
||||
|
||||
Every day people will be making changes, to get your latest
|
||||
updated sources, use:
|
||||
|
||||
<pre>
|
||||
cvs -z3 update -Pd mcs mono
|
||||
</pre>
|
||||
|
||||
Note: The '-z3' enables compression for the whole cvs action.
|
||||
The '-Pd' makes the update operation (P)rune directories that
|
||||
have been deleted and get new (d)irectories added to the
|
||||
repository.
|
||||
|
||||
** Making patches
|
||||
|
||||
Usually you will want to make a patch to contribute, and let
|
||||
other people review it before commiting it. To obtain such a
|
||||
"patch", you type:
|
||||
|
||||
<pre>
|
||||
cd directory-you-want-to-diff
|
||||
cvs -z3 diff -u > file.diff
|
||||
mail [email protected] < file.diff
|
||||
</pre>
|
||||
|
||||
** Commiting your work
|
||||
|
||||
Once you get approval to commit to the CVS, or if you are
|
||||
commiting code that you are the maintainer of, you will want
|
||||
to commit your code to CVS.
|
||||
|
||||
To do this, you have to "add" any new files that you created:
|
||||
|
||||
<pre>
|
||||
cvs add new-file.cs
|
||||
</pre>
|
||||
|
||||
And then commit your changes to the repository:
|
||||
|
||||
<pre>
|
||||
cvs commit file-1.cs file-2.cs
|
||||
</pre>
|
||||
|
||||
** The Mailing List
|
||||
|
||||
To keep track of the various development and changes to the
|
||||
CVS tree, you can subscribe to the [email protected].
|
||||
To subscribe, send an email message to
|
||||
[email protected] and in the body of the
|
||||
message put `subscribe'.
|
||||
|
||||
This will send you an email message every time a change is
|
||||
made to the CVS repository, together with the information that
|
||||
the author of the changes submitted.
|
||||
|
||||
** Recommendations
|
||||
|
||||
Please do not commit code that would break the compile to the
|
||||
CVS, because that normally wastes everybody's time.
|
||||
|
||||
Make sure that you add all the files before you do a commit.
|
||||
|
||||
Use ChangeLog entries so we can keep textual descriptions of
|
||||
your work, and use the contents of your ChangeLog file as the
|
||||
CVS commit message (ie, paste the contents of this into the
|
||||
editor buffer).
|
||||
|
||||
If you are making changes to someone else's code, please make
|
||||
sure you get in touch with the maintainer of that code before
|
||||
applying patches. You want to avoid commiting conflicting
|
||||
work to someone else's code.
|
||||
+1
-10
@@ -26,13 +26,7 @@
|
||||
If nobody is working on it, mail <a
|
||||
href="mailto:[email protected]">[email protected]</a>
|
||||
with the class you want to implement and CC <a
|
||||
href="mailto:[email protected]">[email protected]</a>.
|
||||
|
||||
You can also track live the activities of the Mono CVS module
|
||||
by subscribing to the <a
|
||||
href="http://mail.ximian.com/mailman/listinfo/mono-cvs-list">mono-cvs-list</a>
|
||||
|
||||
|
||||
href="mailto:[email protected]">[email protected]</a>
|
||||
|
||||
** Layout
|
||||
|
||||
@@ -131,9 +125,6 @@
|
||||
the correctness of the class library, compiler, and JIT
|
||||
engine.
|
||||
|
||||
Please write your regression tests using <a
|
||||
href="http://nunit.sourceforge.net">NUnit</a>
|
||||
|
||||
** Coding conventions
|
||||
|
||||
Please follow the conventions on the ECMA specification (On
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
* Contacting the Mono team.
|
||||
|
||||
You can contact the Mono Team by sending e-mail to `<a
|
||||
href="mailto:[email protected]">[email protected]</a>'.
|
||||
href="mailto:[email protected]">mailto:[email protected]</a>'.
|
||||
|
||||
You can contact the general forum of discussion by sending
|
||||
e-mail to <a href="mailto:[email protected]">[email protected]</a>
|
||||
|
||||
+1
-46
@@ -10,7 +10,7 @@
|
||||
href="tools.html">the tools</a>, the <a
|
||||
href="testing.html">testing framework</a>
|
||||
|
||||
* <b>Writers:</b> You can help us bywriting <a
|
||||
* <b>Writers:</b> You can help us with writing <a
|
||||
href="documentation.html">documentation</a>.
|
||||
</ul>
|
||||
|
||||
@@ -18,19 +18,6 @@
|
||||
something that would help tremendously would be to help with
|
||||
small duties in the project that need to be addressed.
|
||||
|
||||
** To start contributing
|
||||
|
||||
To start developing classes or to contribute to the compiler,
|
||||
you only need Windows and the .NET Beta 2 SDK. Please notice
|
||||
that you do not need Visual Studio (although you can use it if
|
||||
you want).
|
||||
|
||||
You can get it <a href="http://msdn.microsoft.com/downloads/default.asp?url=/downloads/sample.asp?url=/msdn-files/027/000/976/msdncompositedoc.xml&frame=true">here</a>
|
||||
|
||||
Alternatively you can use the <a
|
||||
href="#compile-service">compilation service</a> that was setup by
|
||||
Derek.
|
||||
|
||||
** Bug reporting
|
||||
|
||||
If you find bugs in Mono, please make sure you enter a bug
|
||||
@@ -53,38 +40,6 @@
|
||||
packaged up in the official `distribution'
|
||||
</ul>
|
||||
|
||||
<a name="compile-service">
|
||||
* C# Compilation Service
|
||||
|
||||
If you are working on a class for the Mono project, but do not
|
||||
have a C# compiler available or a Windows machine to run the
|
||||
.NET SDK, you can use the compilation service that Derek
|
||||
Holden setup in the following URL: <a
|
||||
href="http://toilet.2y.net:8080/">http://toilet.2y.net:8080/</a>
|
||||
|
||||
The service will let you compile a source file and get back a
|
||||
list of errors in the class file. You will not be able to run
|
||||
the code, but at least you can get some code written that will
|
||||
help us further down the line.
|
||||
|
||||
You can contact (and thank) Derek for this service by sending
|
||||
him nice email at <a
|
||||
href="mailto:[email protected]">[email protected]</a>
|
||||
|
||||
* Books on C# and DotNet.
|
||||
|
||||
<ul>
|
||||
* Dotnet Books (<a href="http://www.dotnetbooks.com">http://www.dotnetbooks.com</a>)
|
||||
|
||||
* Dotnet Resources (<a href="http://www.dotnetexperts.com/resources/">
|
||||
http://www.dotnetexperts.com/resources</a>)
|
||||
|
||||
* O'Really C# Essentials (<a href="http://www.oreilly.com/catalog/csharpess/">
|
||||
http://www.oreally.com/catalog/csharpess</a>)
|
||||
|
||||
* O'Really .NET Essentials (<a href="http://www.oreilly.com/catalog/dotnetfrmess/">
|
||||
http://www.oreally.com/catalog/dotnetfrmess</a>)
|
||||
|
||||
* Special note
|
||||
|
||||
If you have looked at Microsoft's implementation of .NET or
|
||||
|
||||
-190
@@ -1,190 +0,0 @@
|
||||
* Developer FAQ
|
||||
|
||||
** New classes
|
||||
|
||||
Q: Should we write classes which are not part of the .NET or ECMA specs?
|
||||
|
||||
A: Yes. The ECMA and .NET specifications are far from complete, and
|
||||
to produce a complete platform we will need a number of other
|
||||
classes and components.
|
||||
|
||||
Any new classes that are not part of .NET or ECMA should be
|
||||
designed to be reusable on anyone's CLI implementation. So that
|
||||
Windows developers can also use any new classes that we come up
|
||||
with.
|
||||
|
||||
We have a few existing <a href="ideas.html">Ideas on missing
|
||||
classes</a>
|
||||
|
||||
** Language Compatibility
|
||||
|
||||
Q: What is the magic that allow multiple languages to co-exist?
|
||||
|
||||
A: From Fergus Henderson:
|
||||
|
||||
<i><blockquote>
|
||||
There are different levels of interoperability.
|
||||
The ECMA spec defines different categories of
|
||||
CLS (Common Language Specification) conformance.
|
||||
There are also some useful categories that don't
|
||||
correspond to any of the levels defined in the ECMA spec.
|
||||
In increasing degree of difficulty, your language implementation
|
||||
can
|
||||
|
||||
<ul>
|
||||
* (a) just generate IL
|
||||
|
||||
* (b) be a CLS "consumer", which means that it can read in
|
||||
meta-data describing component interfaces,
|
||||
and that it provides a way to declare variables of
|
||||
CLS-complaint types and to call CLS-complaint methods.
|
||||
|
||||
* (c) be a CLS "extender", which means that it can in addition
|
||||
derive from CLS-compliant classes
|
||||
and implement CLS-compliant interfaces
|
||||
|
||||
* (d) be able to produce components with *any* CLS-compliant
|
||||
component interface.
|
||||
</ul>
|
||||
|
||||
Supporting some of these may require extending your language. However,
|
||||
you can get quite a lot of interoperability by just putting appropriate
|
||||
functionality in your compiler, without extending your language.
|
||||
|
||||
For some things, e.g. ASP.NET, your language implementation also needs to be
|
||||
able to
|
||||
|
||||
<ul>
|
||||
* (e) consume CodeDom trees. CodeDom trees are an abstract
|
||||
representation of programs in a form similar to a C# parse
|
||||
tree, with embedded code snippets (unparsed strings).
|
||||
Given a CodeDom tree, with the snippets in your language,
|
||||
your language implementation needs to generate a (i) .NET
|
||||
assembly and possibly also (ii) a source file in your language.
|
||||
|
||||
* (f) produce CodeDom trees. For some applications,
|
||||
your language implementation also needs to be able to
|
||||
round-trip from CodeDom -> your language -> CodeDom.
|
||||
</ul>
|
||||
|
||||
and for some things it needs to
|
||||
|
||||
<ul>
|
||||
* (g) generate *verifiable* IL
|
||||
</ul>
|
||||
|
||||
So when you hear all the hype about how language XYZ is a
|
||||
".NET language", make sure you ask which of these different
|
||||
things are supported.
|
||||
|
||||
[For the record, Mercury currently supports (a). We're working on
|
||||
(b) and (g), and on parts of (c) and (e). We're never going to do (f), I very
|
||||
strongly doubt we'll ever do (d), and for (c) we might only ever support
|
||||
implementing interfaces, not deriving from classes.]
|
||||
|
||||
</blockquote></i>
|
||||
|
||||
** PInvoke
|
||||
|
||||
Q: What are the two major initiatives to implement PInvoke?
|
||||
|
||||
A: Fergus Henderson answers:
|
||||
|
||||
<i><blockquote>
|
||||
Many of the .NET APIs will need to be implemented using code that calls C/Unix
|
||||
APIs, such as stat(). The standard way of interfacing with native code from
|
||||
.NET code is to use "PInvoke". However, there is a difficulty: many of
|
||||
these APIs are defined in terms of types such as C's `long' or `size_t'
|
||||
or the Posix `struct stat' whose representation varies depending on the
|
||||
platform (architecture/OS/C compiler). There's no *portable* way of
|
||||
accessing those from .NET managed code.
|
||||
|
||||
So, there are a couple of different approaches.
|
||||
One possibility is to access such routines by writing a wrapper, e.g. in C,
|
||||
that provides the same functionality without using types with a system-dependent
|
||||
representation. The wrapper can then be directly accessed from portable
|
||||
.NET code. The .NET code remains both source- and binary-portable;
|
||||
the wrapper code is source-portable, but needs to be compiled
|
||||
seperately for each target platform. The drawback of this approach is
|
||||
that you have to write a lot of cumbersome wrapper code.
|
||||
|
||||
Another possibility is to extend the .NET VM with support for an
|
||||
additional custom attribute, e.g. "[PosixType]". The VM would then
|
||||
represent types tagged with this attribute in the same way that the
|
||||
underlying system represents those types. With this approach, no
|
||||
wrapper code would be needed. A drawback of this approach is that it
|
||||
pushes quite a bit of complexity into the VM; the VM would have to know
|
||||
the native representation of all types annotated with this attribute.
|
||||
Another drawback is that code using this extension might not work on
|
||||
different VMs.
|
||||
|
||||
There have also been some other suggestions, but those are the two that
|
||||
I think are the best.
|
||||
</blockquote></i>
|
||||
|
||||
Q: What is the problem implementing PInvoke?
|
||||
|
||||
A: Again, from Fergus Henderson:
|
||||
|
||||
<i><blockquote>
|
||||
There's no problem implementing PInvoke as specified in the ECMA
|
||||
specs and/or MS documentation. It's just that PInvoke by itself
|
||||
doesn't solve all of the problems; in particular it doesn't solve
|
||||
the problem of C types whose representation is different on different
|
||||
systems.
|
||||
</blockquote></i>
|
||||
|
||||
** CVS use
|
||||
|
||||
Q: Why do we keep ChangeLogs and make the CVS commit messages be the
|
||||
same? One could be generated from the other
|
||||
|
||||
A: There are a number of reasons for keeping ChangeLog files as well as
|
||||
CVS commit files:
|
||||
|
||||
<ul>
|
||||
* Offline programming: when people are traveling, CVS logs are
|
||||
not available.
|
||||
|
||||
* Slow CVS access: Many people work over modem lines (very
|
||||
typical for contributors in Europe, Asia, Latin America)
|
||||
using CVS is slow and might not be available to you (cvs
|
||||
server down, no anoncvs server available).
|
||||
|
||||
* ChangeLogs travel in a released tarball package, so it is
|
||||
possible to study the rationale of changes even after a
|
||||
project is long "released", or you only have the sources for
|
||||
the code.
|
||||
|
||||
* ChangeLog are not metadata for each file, they are live
|
||||
files that you can browse in the package that is being
|
||||
distributed.
|
||||
</ul>
|
||||
|
||||
Making the CVS commit message be the same as the ChangeLog has other
|
||||
benefits:
|
||||
|
||||
<ul>
|
||||
* You can track down with `cvs log' what things were changed,
|
||||
and match those to meaningful reports on the intentions of
|
||||
the commit.
|
||||
|
||||
* When reading the commits-list, you can get a glimpse of the
|
||||
changes without having to diff out or cvs update your tree.
|
||||
|
||||
* You can read off-line the changes that are being made
|
||||
(asyncrouns operation).
|
||||
</ul>
|
||||
|
||||
This mechanism works very well for GNOME and other projects.
|
||||
|
||||
Q: Should I use any of the special RCS keywords like $Id: devel-faq,v 1.1 2001/07/31 21:13:05 miguel Exp $, $Author: miguel $,
|
||||
$Date: 2001/07/31 21:13:05 $, or $Revision: 1.1 $?
|
||||
|
||||
A: Please avoid using those in the source code in the CVS. They
|
||||
are not really useful, and they cause a lot of conflicts when
|
||||
people have separate CVS trees.
|
||||
|
||||
It was a nightmare with the Linux kernel when two people had their
|
||||
private CVS trees and were submitting patches to the core.
|
||||
|
||||
+15
-51
@@ -12,7 +12,7 @@
|
||||
|
||||
In order to make mcs and the class libraries you will need the
|
||||
GNU make tools. These may be obtained for the Windows
|
||||
environment from <a href="http://www.cygwin.com">cygwin.com</a>.
|
||||
environment from <a href="www.cygwin.com">cygwin.com</a>.
|
||||
|
||||
You will also need to get GLIB, from: <a
|
||||
href="ftp://ftp.gtk.org/pub/gtk/v1.2/glib-1.2.10.tar.gz">ftp://ftp.gtk.org/pub/gtk/v1.2/glib-1.2.10.tar.gz</a>
|
||||
@@ -20,52 +20,16 @@ href="ftp://ftp.gtk.org/pub/gtk/v1.2/glib-1.2.10.tar.gz">ftp://ftp.gtk.org/pub/g
|
||||
<a name="sources">
|
||||
** Sources
|
||||
|
||||
We provide both <a href="#packaged">packaged and tested</a>
|
||||
tarballs (those are known to compile and pass `make
|
||||
distcheck') as well as <a href="snapshots">daily snapshots</a> done
|
||||
at 10pm Boston Time
|
||||
|
||||
<a name="snapshots">
|
||||
*** Snapshots
|
||||
|
||||
The daily snapshots are available <a
|
||||
href="http://www.go-mono.com/snapshots">here</a>. These
|
||||
snapshots are done every day at 10pm EST (Boston Time).
|
||||
|
||||
They are not guaranteed to build, but most of the time they
|
||||
should. They should give you a window to see what we are up to.
|
||||
|
||||
You might also want to track our development using the <a
|
||||
href="http://mail.ximian.com/mailman/listinfo/mono-cvs-list">mono-cvs-list</a>
|
||||
mailing list.
|
||||
|
||||
<a name="packaged">
|
||||
*** Released and tested packages
|
||||
Currently we will be providing CVS snapshots every day, until
|
||||
we make the first tarball release.
|
||||
|
||||
<ul>
|
||||
<a name="august-22">
|
||||
<b>August 22, 2001</b>
|
||||
<ul>
|
||||
* <a href="archive/mono-0.6.tar.gz">mono-0.6.tar.gz</a>: Mono Runtime 0.6 release.
|
||||
* <a href="archive/mono-compiler-classes-0.6.tar.gz">mono-compiler-classes-0.6.tar.gz</a>: Mono Compiler and Classes 0.6 release.
|
||||
* <a href="archive/mono-0.6">Release Notes.</a>
|
||||
</ul>
|
||||
|
||||
|
||||
<a name="july-29">
|
||||
<b>July 29, 2001</b>
|
||||
<ul>
|
||||
* <a href="archive/mono-0.5.tar.gz">mono-0.5.tar.gz</a>: Mono Runtime 0.5 release.
|
||||
* <a href="archive/mono-0.5">Release Notes.</a>
|
||||
</ul>
|
||||
|
||||
|
||||
<a name="july-22">
|
||||
<b>July 22, 2001</b>
|
||||
<ul>
|
||||
* <a href="archive/mcs-22-Jul-2001.tar.gz">mcs-22-Jul-2001.tar.gz</a>: CVS snapshot.
|
||||
* <a href="archive/mcs-Jul-22-Jul-19-2001.tar.gz">Differences since 19</a>: CVS snapshot.
|
||||
* <a href="archive/mcs-22">Release Notes.</a>
|
||||
* <a href="archive/mcs-22">Release Notes</a>
|
||||
</ul>
|
||||
|
||||
<a name="july-19">
|
||||
@@ -73,7 +37,7 @@ href="ftp://ftp.gtk.org/pub/gtk/v1.2/glib-1.2.10.tar.gz">ftp://ftp.gtk.org/pub/g
|
||||
<ul>
|
||||
* <a href="archive/mcs-19-Jul-2001.tar.gz">mcs-19-Jul-2001.tar.gz</a>: CVS snapshot.
|
||||
* <a href="archive/mcs-Jul-17-Jul-19-2001.tar.gz">Differences since 17</a>: CVS snapshot.
|
||||
* <a href="archive/mcs-19">Release Notes.</a>
|
||||
* <a href="archive/mcs-19">Release Notes</a>
|
||||
</ul>
|
||||
|
||||
<a name="july-17">
|
||||
@@ -81,7 +45,7 @@ href="ftp://ftp.gtk.org/pub/gtk/v1.2/glib-1.2.10.tar.gz">ftp://ftp.gtk.org/pub/g
|
||||
<ul>
|
||||
* <a href="archive/mcs-17-Jul-2001.tar.gz">mcs-17-Jul-2001.tar.gz</a>: CVS snapshot.
|
||||
* <a href="archive/mcs-Jul-15-Jul-17-2001.tar.gz">Differences since 15</a>: CVS snapshot.
|
||||
* <a href="archive/mcs-17">Release Notes.</a>
|
||||
* <a href="archive/mcs-17">Release Notes</a>
|
||||
</ul>
|
||||
|
||||
<a name="july-15">
|
||||
@@ -89,7 +53,7 @@ href="ftp://ftp.gtk.org/pub/gtk/v1.2/glib-1.2.10.tar.gz">ftp://ftp.gtk.org/pub/g
|
||||
<ul>
|
||||
* <a href="archive/mcs-15-Jul-2001.tar.gz">mcs-15-Jul-2001.tar.gz</a>: CVS snapshot.
|
||||
* <a href="archive/mono-0.4.tar.gz">mono-0.4.tar.gz</a>: Packaged Source Code.
|
||||
* <a href="archive/mono-0.4">Release Notes.</a>
|
||||
* <a href="archive/mono-0.4">Release Notes</a>
|
||||
</ul>
|
||||
|
||||
<a name="july-14">
|
||||
@@ -115,7 +79,7 @@ href="ftp://ftp.gtk.org/pub/gtk/v1.2/glib-1.2.10.tar.gz">ftp://ftp.gtk.org/pub/g
|
||||
follow these instructions:
|
||||
|
||||
<ul>
|
||||
* Install <a href="http://www.cygwin.com">CygWin</a> first.
|
||||
* Install <a href="http://www.cygwin.org">CygWin</a> first.
|
||||
|
||||
* Untar the MCS distribution (see below for information).
|
||||
|
||||
@@ -125,7 +89,7 @@ href="ftp://ftp.gtk.org/pub/gtk/v1.2/glib-1.2.10.tar.gz">ftp://ftp.gtk.org/pub/g
|
||||
To compile the mono runtime on windows:
|
||||
|
||||
<ul>
|
||||
* Install <a href="http://www.cygwin.com">CygWin</a> first.
|
||||
* Install <a href="http://www.cygwin.org">CygWin</a> first.
|
||||
|
||||
* Once installed, in a terminal window or a cygwin
|
||||
window (a shortcut should be on your desktop), untar the glib
|
||||
@@ -138,7 +102,7 @@ tar xzvf glib-1.2.10.tar.gz
|
||||
* Configure, compile and install glib, like this:
|
||||
|
||||
<pre>
|
||||
./configure --prefix=/usr
|
||||
./configure --prefix=/usr/bin
|
||||
make
|
||||
make install
|
||||
</pre>
|
||||
@@ -156,11 +120,6 @@ tar xzvf mono-XXX.tar.gz
|
||||
make
|
||||
make install
|
||||
</pre>
|
||||
|
||||
* Some people observed problems with autoconf 2.52. Installing
|
||||
autoconf 2.13 helped in those cases (don't forget to do a
|
||||
`make maintainer-clean' after the update)
|
||||
|
||||
</ul>
|
||||
|
||||
To compile the mono runtime on Unix:
|
||||
@@ -183,5 +142,10 @@ make install
|
||||
</pre>
|
||||
</ul>
|
||||
|
||||
** CVS
|
||||
|
||||
We are trying to figure out where to put our CVS repository.
|
||||
We are debating between the GNOME CVS or SourceForge. Watch
|
||||
this spot.
|
||||
|
||||
|
||||
@@ -69,9 +69,6 @@ Q: What does Mono stand for?
|
||||
|
||||
A: Mono is the word for `Monkey' in Spanish. We like monkeys.
|
||||
|
||||
It only means a number of other things: monochromatic (hence the
|
||||
gray theme used in the Web site).
|
||||
|
||||
Q: When will you ship it?
|
||||
|
||||
A: We do not know when the code will be shipped. The more
|
||||
@@ -240,16 +237,6 @@ A: No. That just means that applications might use that API to
|
||||
documented and whether we will be able to talk to
|
||||
passport.com
|
||||
|
||||
Q: But that must mean that you are tied to Passport!
|
||||
|
||||
A: All the contrary. The implementation could keep the interface (for
|
||||
the sake of simplicity, lets say it implements the method `Login'
|
||||
and `GetUserName').
|
||||
|
||||
We could implement `Login' and `GetUserName' by talking to XNS or
|
||||
any other decentralized systems. Or any other system that the
|
||||
industry standarizes on.
|
||||
|
||||
Q: What is your opinion?
|
||||
|
||||
A: You can read my personal <a href="passport.html">opinion on
|
||||
@@ -314,15 +301,6 @@ Q: Will Mono include compatibility with Bonobo components?
|
||||
A: Yes, we will provide a set of classes for implementing and using
|
||||
Bonobo components from within Mono.
|
||||
|
||||
Q: Does Mono replace Bonobo?
|
||||
|
||||
A: Bonobo is very focused on cross-application component reuse. Mono
|
||||
will provide a Bonobo framework to allow you to develop Bonobo
|
||||
components and use Bonobo components on Unix.
|
||||
|
||||
Mono should allow you to write Bonobo components more easily, just
|
||||
like .NET on Windows allows you to export .NET components to COM.
|
||||
|
||||
** Mono and the Web
|
||||
|
||||
Q: Is Mono a way of running Java applets?
|
||||
@@ -499,12 +477,6 @@ A: Initial contact between David Stutz and Miguel de Icaza happened.
|
||||
to discuss the same issue. And we are glad to have good contacts
|
||||
to ask questions about the specs.
|
||||
|
||||
Q: Is Microsoft paying Ximian to do this?
|
||||
|
||||
A: No, we are doing this for purely selfish reasons. We are upgrading
|
||||
our development platform to build better applications on Unix and other
|
||||
systems.
|
||||
|
||||
Q: Do you fear that Microsoft will change the spec and render Mono useless?
|
||||
|
||||
A: No. Microsoft proved with the CLI and the C# language that it was
|
||||
@@ -558,29 +530,6 @@ Q: Are you writing Mono from the ECMA specs?
|
||||
A: yes, we are writing them from the ECMA specs and the published
|
||||
materials in print about .NET
|
||||
|
||||
Q: What happens if Microsoft `Embraces and Extends' the CLI standard
|
||||
and keeps Mono out of the play?
|
||||
|
||||
A: There are various explanations to this question. The first one is
|
||||
that the benefits that you can get from the CLI are going to be
|
||||
there with or without `embracing and extending'. We might not be
|
||||
able to run every .NET Windows application on Mono. But remember:
|
||||
it was already easy for someone to just use PInvoke to tie their
|
||||
application to Windows.
|
||||
|
||||
The bottom line is that the advantages of having a CLI runtime will
|
||||
be with us, no matter if Microsoft forks their version to be
|
||||
incompatible.
|
||||
|
||||
Q: What if Microsoft changes the interface, and all of a sudden
|
||||
applications break?
|
||||
|
||||
A: If they change their released API, every application that was
|
||||
developed against it will break.
|
||||
|
||||
That being said, Microsoft have a pretty good record of keeping
|
||||
backwards binary compatibility.
|
||||
|
||||
** Acronyms
|
||||
|
||||
Q: What is the difference between CLR (Common Language Runtime) and
|
||||
@@ -604,9 +553,6 @@ A: I would love if someone does, and we would love to help anyone that
|
||||
personally to work on C# on a C# compiler, which has an intrinsic
|
||||
beauty.
|
||||
|
||||
We can provide help and assistance to anyone who would like to work
|
||||
on this task.
|
||||
|
||||
Q: Should someone make a GCC backend that will generate CIL images?
|
||||
|
||||
A: I would love to see a backend to GCC that generates CIL images. It
|
||||
@@ -614,9 +560,6 @@ A: I would love to see a backend to GCC that generates CIL images. It
|
||||
code. This is something that people would want to look into
|
||||
anyways for Windows interoperation in the future.
|
||||
|
||||
Again, we would love to provide help and assistance to anyone
|
||||
interested in working in such a project.
|
||||
|
||||
Q: What about making a front-end to GCC that takes CIL images and
|
||||
generates native code?
|
||||
|
||||
@@ -630,9 +573,6 @@ A: I would love to see this, specially since GCC supports this same
|
||||
library that could be linked with your application as its runtime
|
||||
support.
|
||||
|
||||
Again, we would love to provide help and assistance to anyone
|
||||
interested in working in such a project.
|
||||
|
||||
Q: But would this work around the GPL in the GCC compiler and allow
|
||||
people to work on non-free front-ends?
|
||||
|
||||
@@ -688,20 +628,6 @@ A: We can not predict the future, but a conservative estimate is that
|
||||
expected to contain the same object types independently of how the
|
||||
instructions was reached.
|
||||
|
||||
|
||||
** Mono and Portable.NET
|
||||
|
||||
Q: What are the differences between Mono and Portable.NET?
|
||||
|
||||
A: Most of Mono is being written using C#, the only pieces written in
|
||||
C are those who have to absolutely be built using C (The JIT
|
||||
engine, the runtime, the interfaces to the garbage collection
|
||||
system).
|
||||
|
||||
The C# compiler and the tools will become reusable C# components.
|
||||
|
||||
Portable.NET is building its components out of C pieces.
|
||||
|
||||
** Assorted questions
|
||||
|
||||
Q: You say that the CLI allows multiple languages to execute on the
|
||||
|
||||
@@ -1,20 +1,16 @@
|
||||
<a href="http://www.ximian.com">Ximian</a> announced the
|
||||
launch of the Mono project, an effort to create an Open Source
|
||||
implementation of the .NET Development Framework.
|
||||
|
||||
Mono includes: <a href="c-sharp.html">a compiler</a> for the
|
||||
C# language, a <a href="runtime.html">runtime</a> for the
|
||||
Common Language Infrastructure and a set of <a
|
||||
href="class-library.html">class libraries</a>
|
||||
launch of the Mono project, an effort to create a <a
|
||||
href="http://www.gnu.org/philosophy/free-sw.html">Free
|
||||
Software</a> (sometimes called open source) implementation of
|
||||
the .NET Development Framework.
|
||||
|
||||
You can read our <a href="rationale.html">rationale</a> for
|
||||
this project. If you have questions about the project, please
|
||||
read our list of <a href="faq.html">Frequently Asked
|
||||
Questions</a> or <a href="mailto:[email protected]">contact us.</a>
|
||||
Questions</a> or contact us.
|
||||
|
||||
You might also want to <a href="download.html">Download the
|
||||
source</a> for our work so far. Or you can grab a <a
|
||||
href="snapshots">snapshot</a> of our current work.
|
||||
source</a> for our work so far.
|
||||
|
||||
You might want to <a
|
||||
href="resources.html#mailing">subscribe</a> to our mono-list
|
||||
@@ -23,76 +19,7 @@
|
||||
You can contact the team at: <a
|
||||
href="mailto:[email protected]">[email protected]</a>
|
||||
|
||||
** Sep 17, 2001
|
||||
|
||||
Mike Kestner's Gtk# (Gtk-sharp) was checked into the CVS
|
||||
repository. Gtk# can run a simple hello world application.
|
||||
The binding is nice, as it maps Gtk+ signals to delegates in
|
||||
C#. You can see the Gtk# Hello World program <a href="src/HelloWorld.cs">here</a>
|
||||
|
||||
Gtk-sharp should be available on the next snapshot set.
|
||||
|
||||
** Sep 10, 2001
|
||||
|
||||
Dietmar checked in his CIL tree/forest regeneration and most
|
||||
importantly, the x86 instruction selector burg grammar.
|
||||
|
||||
|
||||
** Sep 5, 2001
|
||||
|
||||
The MCS compiler <b>can compile the sample Hello World</b>
|
||||
application and generate a Windows/CIL executable that runs!
|
||||
|
||||
This executable runs with the Mono Interpreter of course (see
|
||||
August 28)
|
||||
|
||||
** Sep 4, 2001
|
||||
|
||||
Dietmar checked into CVS the `monoburg' architecture
|
||||
independent instruction selector for the JIT engine.
|
||||
|
||||
** Aug 28, 2001
|
||||
|
||||
<b>.NET Hello World is working under Mono!</b> The latest snapshots
|
||||
will let you run it.
|
||||
|
||||
Hello World consits of 1821 CIL instructions,
|
||||
performs 66 subroutine calls and loads 12 classes from the corlib.dll
|
||||
|
||||
Good work Mono team!
|
||||
|
||||
** Aug 23, 2001
|
||||
|
||||
Lloyd Dupont has announced his OpenGL bindings for C#, they
|
||||
are available here: <a
|
||||
href="http://csgl.sourceforge.net">http://csgl.sourceforge.net</a>
|
||||
|
||||
** Aug 22, 2001
|
||||
|
||||
New version of the Mono Runtime, Compiler and Classes has been
|
||||
<a
|
||||
href="download.html#august-22">released.</a> Check the <a
|
||||
href="archive/mono-0.6">0.6 announcement</a>.
|
||||
|
||||
** Aug 20, 2001
|
||||
|
||||
A new <a href="contributing.html#compile-service">Compilation
|
||||
service</a> has been made available by Derek to allow people
|
||||
without access to the <a
|
||||
href="http://msdn.microsoft.com/downloads/default.asp?url=/downloads/sample.asp?url=/msdn-files/027/000/976/msdncompositedoc.xml&frame=true">.NET SDK</a>
|
||||
|
||||
** Aug 3, 2001
|
||||
|
||||
Daily snapshots of mcs and mono are now available, they will
|
||||
run every night at 10pm Boston time.
|
||||
|
||||
** Jul 29, 2001
|
||||
|
||||
Mono Runtime 0.5 has been <a
|
||||
href="download.html#july-29">released.</a> Check the <a
|
||||
href="archive/mono-0.5">release notes</a>
|
||||
|
||||
** Jul 25, 2001
|
||||
** JUl 25, 2001
|
||||
|
||||
The slides for <A href="Presentations/O-Reilly">my
|
||||
presentation</a> at <a href="http://www.oreilly.com">O'Reilly
|
||||
|
||||
+14
-57
@@ -1,19 +1,3 @@
|
||||
* Updates
|
||||
|
||||
For an analysis of security problems with passport, check <a
|
||||
href="http://avirubin.com/passport.html">http://avirubin.com/passport.html</a>.
|
||||
The bottom line is that you should not put any sensitive
|
||||
information on passport.
|
||||
|
||||
I have received many comments from people, and I have updated
|
||||
the page accordingly. From removing incorrect statements, to
|
||||
fixing typos, to include mentions to other software pieces.
|
||||
|
||||
I also corrected my statement about IIS and a trojan horse, I
|
||||
should read a more educated press in the future. My apologies
|
||||
to Microsoft and its employees on this particular topic. IIS
|
||||
did not have a trojan horse built in.
|
||||
|
||||
* Microsoft Hailstorm and Passport
|
||||
|
||||
Microsoft Passport is a centralized database hosted by
|
||||
@@ -30,7 +14,7 @@
|
||||
|
||||
** Passport
|
||||
|
||||
Passport is important not because of it being a breakthrough
|
||||
Passport is important not because of it being breaktrough
|
||||
technologically speaking, but because the company is in a
|
||||
position to drive most people toward being suscribers of it.
|
||||
|
||||
@@ -91,7 +75,12 @@
|
||||
at the corporate level policy, but also the fact that
|
||||
the source code for Microsoft products is not
|
||||
available, means that trojans or worms could be built
|
||||
into the products by malicious engineers.
|
||||
into the products by malicious engineers. This is not
|
||||
unheard of, as the <a
|
||||
href="http://slashdot.org/articles/00/04/14/0619206.shtml">Microsoft
|
||||
Internet Server</a> had a trojan horse built into that
|
||||
allowed anyone that knew about this to control any
|
||||
server running IIS.
|
||||
|
||||
* <b>Security:</b> With a centralized system like
|
||||
Passport, imagine the repercussions of a malicious
|
||||
@@ -102,21 +91,7 @@
|
||||
Hackers have already <a
|
||||
href="http://slashdot.org/articles/00/10/27/1147248.shtml">broken
|
||||
into Microsoft</a> in the past. And the company was
|
||||
unable to figure out for how long their systems had
|
||||
been hacked.
|
||||
|
||||
Security holes have been found in <a
|
||||
href="http://slashdot.org/articles/00/04/14/0619206.shtml">IIS
|
||||
in the past.</a> If all the world's data is stored on
|
||||
a central location, when a single security hole is
|
||||
detected, it would allow an intruder to install a
|
||||
backdoor within seconds into the corporate network
|
||||
without people ever noticing.
|
||||
|
||||
Microsoft itself has been recently hit by worms,
|
||||
imagine if all your business depended on a single
|
||||
provider for providing all or your authentication
|
||||
needs
|
||||
unable to figure out for how long their systems had been hacked.
|
||||
</ul>
|
||||
|
||||
Microsoft might or might not realize this. The idea behind
|
||||
@@ -137,15 +112,6 @@
|
||||
system should not create an internet `blackout' in the
|
||||
case of failure.
|
||||
|
||||
A distributed system using different software
|
||||
platforms and different vendors would be more
|
||||
resistent to an attack, as holes in a particular
|
||||
implementation of the server software would not affect
|
||||
every person at the same time.
|
||||
|
||||
A security hole attack might not even be relevant to
|
||||
other software vendors software.
|
||||
|
||||
* <b>Allow for multiple registrars:</b> Users should
|
||||
be able to choose a registrar (their banks, local
|
||||
phone company, service provider, Swiss bank, or any
|
||||
@@ -163,14 +129,10 @@
|
||||
possibility of replicating and caching public information
|
||||
about the user.
|
||||
|
||||
For instant messaging (another piece of the Hailstorm bit),
|
||||
For instant messaging (another pieces of the Hailstorm bit),
|
||||
you want to use a non-centralized system like Sun's <a
|
||||
href="http://www.jxta.org">JXTA</a>. Some people mailed me to
|
||||
mention Jabber as a messaging platform and other people
|
||||
pointed out to the <a
|
||||
href="http://java.sun.com/products/jms/">Java Message
|
||||
Service</a>. The JMS does support a number of very
|
||||
interesting features that are worth researching.
|
||||
mention Jabber as a messaging platform.
|
||||
|
||||
It could also just use the user e-mail address as the `key' to
|
||||
choose the registrar (msn.com, hotmail.com -> passport.com;
|
||||
@@ -201,7 +163,7 @@
|
||||
** Deploying it
|
||||
|
||||
The implementation of such a system should be a pretty
|
||||
straightforward task once security cryptographers have
|
||||
straightforward tasks once security cryptographers have
|
||||
designed such a beast.
|
||||
|
||||
The major problems are:
|
||||
@@ -226,7 +188,7 @@
|
||||
|
||||
** Passport and Mono
|
||||
|
||||
The .NET class libraries include a Passport class that
|
||||
The .NET class libraries includes a Passport class that
|
||||
applications might use to authenticate with Passport. Since
|
||||
we do not have information at this point on the exact protocol
|
||||
of Passport, it is not even feasible to implement it.
|
||||
@@ -249,7 +211,7 @@
|
||||
|
||||
A few people have said: `Mono will allow Passport to be
|
||||
available for Linux and that is bad'. This is plain
|
||||
missinformation.
|
||||
miss-information.
|
||||
|
||||
Currently, you can obtain Passport for Linux from Microsoft
|
||||
itself and deploy it today on your Web server. Mono does not
|
||||
@@ -269,12 +231,7 @@
|
||||
|
||||
Nat Friedman (Ximian's co-founder) has his own ideas on how a
|
||||
competing system to Passport could be designed, but I will let
|
||||
<a href="http://www.nat.org/">him</a> post his own story.
|
||||
|
||||
** Other Passport Comments
|
||||
|
||||
An interesting study on the security of passport is available at: <a
|
||||
href="http://avirubin.com/passport.html">http://avirubin.com/passport.html</a>
|
||||
<a href="http://www.nat.org/gym">him</a> post his own story.
|
||||
|
||||
** Other Alternatives
|
||||
|
||||
|
||||
+2
-26
@@ -7,16 +7,6 @@
|
||||
If you want to send suggestions for links, address them to <a
|
||||
mailto="[email protected]">[email protected]</a>.
|
||||
|
||||
** Mono related sites.
|
||||
|
||||
Sergey's web page on Mono resources:
|
||||
|
||||
<a href="http://mono.eurosoft.od.ua">http://mono.eurosoft.od.ua</a>
|
||||
|
||||
Got Dot Net:
|
||||
|
||||
<a href="http://www.gotdotnet.com">Got Dot Net</a>
|
||||
|
||||
** ECMA Documentation.
|
||||
|
||||
You can get the documentation for the ECMA specs from a number of sites:
|
||||
@@ -55,12 +45,6 @@
|
||||
href="http://mail.ximian.com/mailman/listinfo/mono-announce-list">mono-announce-list:</a></b>
|
||||
Announcements of Mono developments.
|
||||
* <b><a
|
||||
href="http://mail.ximian.com/mailman/listinfo/mono-gc-list">mono-gc-list:</a></b>
|
||||
Discussion on the GC system of Mono.
|
||||
* <b><a
|
||||
href="http://mail.ximian.com/mailman/listinfo/mono-cvs-list">mono-cvs-list:</a></b>
|
||||
Track the CVS activity of Mono on this mailing list. You can get <a href="http://www.go-mono.com/snapshots">daily snapshots</a> as well.
|
||||
* <b><a
|
||||
href="http://mail.ximian.com/mailman/listinfo/mono-docs-list">mono-docs-list:</a></b>
|
||||
Discussion on the documentation of Mono.
|
||||
* <b><a
|
||||
@@ -91,26 +75,18 @@
|
||||
href="http://www.icsharpcode.net/OpenSource/SD/default.asp">Sharp
|
||||
Develop:</a> an IDE for the C# language written in C#.
|
||||
|
||||
* <a
|
||||
href="http://janet-js.sourceforge.net/">Janet:</a>
|
||||
an implemention of ECMAScript (the standarized
|
||||
version of JavaScript) in C#
|
||||
|
||||
* <a
|
||||
href="http://www.southern-storm.com.au/portable_net.html">Portable.NET:</a>
|
||||
Another implementation of the CLI and C# compiler.
|
||||
|
||||
* <a href="http://nunit.sourceforge.net">NUnit:</a> A
|
||||
testing framework for .NET classes.
|
||||
testing framework for .NET classes.
|
||||
|
||||
* <a href="http://www.kaffe.org">Kaffe:</a> A popular
|
||||
Free Software JIT engine for Java.
|
||||
|
||||
* <a href="http://www.intel.com/research/mrl/orp">ORP:</a> A research
|
||||
JIT/VM/GC system from Intel.
|
||||
|
||||
* C# bindings for OpenGL are available here: <a
|
||||
href="http://csgl.sourceforge.net">http://csgl.sourceforge.net</a>
|
||||
JIT/VM/GC system from Intel.
|
||||
</ul>
|
||||
|
||||
** GNOME Documentation
|
||||
|
||||
+14
-17
@@ -20,15 +20,15 @@
|
||||
|
||||
<ul>
|
||||
|
||||
* Milestone 1: <b> Done</b> Fully read and parse all CIL byte-codes
|
||||
and metadata tokens (ie, a disassembler).
|
||||
* Milestone 1: Fully read and parse all CIL byte-codes
|
||||
and metadata tokens (ie, a disassembler).
|
||||
|
||||
* Milestone 2: Complete an interpreter for CIL byte
|
||||
codes. This interpreter can be used temporarly to
|
||||
run CIL byte code on a system where no JIT is
|
||||
available.
|
||||
|
||||
* Milestone 3: Define an <i>lburg</i>-like instruction
|
||||
* Milestone 3: Define an <i>lburg</i> instruction
|
||||
selector for the JITer for Intel. Although slower
|
||||
at JITing than a streaming JITer, it generates
|
||||
better code. The same grammar can later be used for
|
||||
@@ -71,7 +71,7 @@
|
||||
href="http://www.gnu.org/software/lightning/">GNU
|
||||
Lightning</a>
|
||||
|
||||
* <a href="http://www.eecs.harvard.edu/~nr/toolkit/">NJ Machine
|
||||
* href="http://www.eecs.harvard.edu/~nr/toolkit/">NJ Machine
|
||||
Toolkit</a>.).
|
||||
|
||||
* VCODE.
|
||||
@@ -87,11 +87,6 @@
|
||||
href="http://www.amazon.com/exec/obidos/ASIN/0471941484/o/qid=992556433/sr=2-1/ref=aps_sr_b_1_1/103-5866388-0492603">Garbage
|
||||
Collection.</a>
|
||||
|
||||
Another consideration is to use the same interface that ORP
|
||||
uses to its Garbage Collection system and reuse that GC system
|
||||
instead of rolling our own, as the ORP system is pretty advanced
|
||||
and is independent of the rest of ORP.
|
||||
|
||||
Although using a conservative garbage collector like Bohem's
|
||||
would work, all the type information is available at runtime,
|
||||
so we can actually implement a better collector than a
|
||||
@@ -106,8 +101,8 @@
|
||||
http://research.sun.com/techrep/1998/abstract-70.html</a>
|
||||
|
||||
* "A Generational Mostly-concurrent Garbage Collector":
|
||||
<a href="http://research.sun.com/techrep/2000/abstract-88.html">
|
||||
http://research.sun.com/techrep/2000/abstract-88.html</a>
|
||||
<a href="http://http://research.sun.com/techrep/2000/abstract-88.html">
|
||||
http://http://research.sun.com/techrep/2000/abstract-88.html</a>
|
||||
|
||||
* Details on The Microsoft .NET Garbage Collection Implementation:<br>
|
||||
<a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnmag00/html/GCI.asp">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnmag00/html/GCI.asp</a>
|
||||
@@ -119,6 +114,7 @@
|
||||
Paolo Molaro found a few interesting links:
|
||||
|
||||
<ul>
|
||||
|
||||
* On compilation of stack-based languages:<br>
|
||||
<a href="http://www.complang.tuwien.ac.at/projects/rafts.html">
|
||||
http://www.complang.tuwien.ac.at/projects/rafts.html</a>
|
||||
@@ -135,10 +131,11 @@
|
||||
|
||||
** PInvoke
|
||||
|
||||
PInvoke is the mechanism we are using to wrap Unix API calls
|
||||
as well as talking to system libraries.
|
||||
PInvoke will be supported, and will be used to wrap Unix API
|
||||
calls, these in turn are required for reusing some of the
|
||||
GNOME libraries that will reduce the work we have to do to
|
||||
deliver a complete class library.
|
||||
|
||||
We hvae implemented PInvoke through libffi, but we are likely
|
||||
going to roll our own system as the runtime matures, specially
|
||||
as the interpreter is approaching completion, and we move into
|
||||
the JITer.
|
||||
To implement PInvoke we are looking into using the <a
|
||||
href="http://sources.redhat.com/libffi">Foreign Function
|
||||
Interface</a> Library from Cygnus.
|
||||
+1
-2
@@ -6,12 +6,11 @@
|
||||
2,Class Status,class-status.html,class-status.src
|
||||
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
|
||||
0,Contributing,contributing.html,contributing.src
|
||||
1,Documentation,documentation.html,documentation.src
|
||||
1,Test Suite,testing.html,testing.src
|
||||
1,Tools,tools.html,tools.src
|
||||
0,Download,download.html,download.src
|
||||
0,Resources,resources.html,resources.src
|
||||
1,Ideas,ideas.html,ideas.src
|
||||
1,Passport,passport.html,passport.src
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
$q = 1;
|
||||
|
||||
# Modified by Edwin Lima ([email protected]; [email protected])
|
||||
# Date: 08/21/01, The Netherlands
|
||||
# $f: Variable used as a flag to create the list of questions on top of the question-answers set. This
|
||||
# is the only way that I found to scan the questions which have a <CR><LF>, in such a way that I will not
|
||||
# scan the answer together at same time.
|
||||
# @aname: Buffer used to store the question-answers set to print them out just after the print of the
|
||||
# questions.
|
||||
# @href: Buffer used to store the anchors (only questions) to the questions-answers set on the bottom
|
||||
# of the page.
|
||||
# I opened explicitly the file for input (input.txt) but U can change this as it was originally.
|
||||
#
|
||||
#
|
||||
|
||||
#comment this line if you are not open the file explicitly
|
||||
#open(IN, "input.txt") || die "cannot open file input.txt" ;
|
||||
|
||||
print("<A name=TOP>") ;
|
||||
|
||||
#Uncomment line bellow to make it work as it was originally.
|
||||
while (<>){
|
||||
|
||||
#comment line bellow
|
||||
|
||||
#while (<IN>){
|
||||
chop;
|
||||
if (/^\* (.*)$/){
|
||||
push(@aname,"<h1>$1</h1>\n");
|
||||
# print $body;
|
||||
} elsif (/^\*\* (.*)$/) {
|
||||
push(@aname, "<h2>$1</h2>\n");
|
||||
push(@href, "<h2>$1</h2>\n");
|
||||
} elsif (/^\*\*\* (.*)$/) {
|
||||
push(@aname, "<h3>$1</h3>\n");
|
||||
|
||||
} elsif (/^$/) {
|
||||
push(@aname, "<p>\n");
|
||||
# push(@href, "<p>\n"); NOT NEEDED
|
||||
} elsif (/^\t\t\* (.*)$/) {
|
||||
push(@aname, "<li>$1\n");
|
||||
} elsif (/^Q: (.*)$/){
|
||||
push(@aname, "<p><a name=\"q$q\"></a><b>Question $q:</b> $1\n");
|
||||
push(@href,"<p><a href=\"#q$q\"><b>Question $q:</b></a> $1\n");
|
||||
$f=1;
|
||||
$q++;
|
||||
} elsif (/^A: (.*)$/){
|
||||
push(@aname,"<P>\n<A HREF=#TOP>Top</A>\n<P>");
|
||||
push(@aname,"$1\n");
|
||||
$f=0;
|
||||
} elsif (/^TODO=(.*),$/){
|
||||
push(@aname, "<a name=\"$1\">\n");
|
||||
#push(@href, "<a name=\"$1\">\n");
|
||||
} else {
|
||||
push(@aname,"$_\n");
|
||||
if ($f==1) {
|
||||
push(@href,"$_\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach $line (@href) #"\n\n";
|
||||
{
|
||||
print $line;
|
||||
}
|
||||
|
||||
foreach $line (@aname) #"\n\n";
|
||||
{
|
||||
print $line;
|
||||
}
|
||||
|
||||
|
||||
#comment this line if you are not open the file explicitly
|
||||
# close(IN) || die "cannot close file" ;
|
||||
|
||||
@@ -4,7 +4,6 @@ SOURCES= \
|
||||
../class-status \
|
||||
../contact \
|
||||
../c-sharp \
|
||||
../ccvs \
|
||||
../documentation \
|
||||
../download \
|
||||
../faq \
|
||||
@@ -35,7 +34,6 @@ clean:
|
||||
|
||||
push:
|
||||
scp *.html [email protected]:/web/cvsmodules/mono
|
||||
scp *.html [email protected]:/home/groups/m/mo/mononet/htdocs
|
||||
|
||||
push2:
|
||||
scp *.html primates:public_html/xxx
|
||||
@@ -30,7 +30,7 @@
|
||||
<tr>
|
||||
<td><img src="images/pixel.gif"></td><!-- left border -->
|
||||
<td colspan="4">
|
||||
<a href="http://www.go-mono.com"><img src="images/mono.gif" border="0"></a></td>
|
||||
<a href="/"><img src="images/mono.gif" border="0"></a></td>
|
||||
<td><img src="images/pixel.gif"></td><!-- right border -->
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -1,151 +0,0 @@
|
||||
Just some thoughts for the JITer:
|
||||
|
||||
General issues:
|
||||
===============
|
||||
|
||||
We are designing a JIT compiler, so we have to consider two things:
|
||||
|
||||
- the quality of the generated code
|
||||
- the time needed to generate that code
|
||||
|
||||
The current approach is to keep the JITer as simple as possible, and thus as
|
||||
fast as possible. The generated code quality will suffer from that.
|
||||
|
||||
We do not map local variables to registers at the moment, and this makes the
|
||||
whole JIT much easier, for example we do not need to identify basic block
|
||||
boundaries or the lifetime of local variables, or select the variables which
|
||||
are worth to put into a register.
|
||||
|
||||
Register allocation is thus done only inside the trees of the forest, and each
|
||||
tree can use the full set of registers. We simply split a tree if we get out of
|
||||
registers, for example the following tree:
|
||||
|
||||
|
||||
add(R0)
|
||||
/ \
|
||||
/ \
|
||||
a(R0) add(R1)
|
||||
/ \
|
||||
/ \
|
||||
b(R1) add(R2)
|
||||
/ \
|
||||
/ \
|
||||
c(R2) b(R3)
|
||||
|
||||
can be transformed to:
|
||||
|
||||
|
||||
stloc(t1) add(R0)
|
||||
| / \
|
||||
| / \
|
||||
add(R0) a(R0) add(R1)
|
||||
/ \ / \
|
||||
/ \ / \
|
||||
c(R0) b(R1) b(R1) t1(R2)
|
||||
|
||||
|
||||
Please notice that the split trees use less registers than the original
|
||||
tree.
|
||||
|
||||
Triggering JIT compilation:
|
||||
===========================
|
||||
|
||||
The current approach is to call functions indirectly. The address to call is
|
||||
stored in the MonoMethod structure. For each method we create a trampoline
|
||||
function. When called, this function does the JIT compilation and replaces the
|
||||
trampoline with the compiled method address.
|
||||
|
||||
Register Allocation:
|
||||
====================
|
||||
|
||||
With lcc you can assign a fixed register to a tree before register
|
||||
allocation. For example this is needed by call, which return the value always
|
||||
in EAX on x86. The current implementation works without such system, due to
|
||||
special forest generation.
|
||||
|
||||
|
||||
X86 Register Allocation:
|
||||
========================
|
||||
|
||||
We can use 8bit or 16bit registers on the x86. If we use that feature we have
|
||||
more registers to allocate, which maybe prevents some register spills. We
|
||||
currently ignore that ability and always allocate 32 bit registers, because I
|
||||
think we would gain very little from that optimisation and it would complicate
|
||||
the code.
|
||||
|
||||
Different Register Sets:
|
||||
========================
|
||||
|
||||
Most processors have more that one register set, at least one for floating
|
||||
point values, and one for integers. Should we support architectures with more
|
||||
that two sets? Does someone knows such an architecture?
|
||||
|
||||
64bit Integer Values:
|
||||
=====================
|
||||
|
||||
I can imagine two different implementation. On possibility would be to treat
|
||||
long (64bit) values simply like any other value type. This implies that we
|
||||
call class methods for ALU operations like add or sub. Sure, this method will
|
||||
be be a bit inefficient.
|
||||
|
||||
The more performant solution is to allocate two 32bit registers for each 64bit
|
||||
value. We add a new non terminal to the monoburg grammar called long_reg. The
|
||||
register allocation routines takes care of this non terminal and allocates two
|
||||
registers for them.
|
||||
|
||||
|
||||
Forest generation:
|
||||
==================
|
||||
|
||||
It seems that trees generated from the CIL language have some special
|
||||
properties, i.e. the trees already represents basic blocks, so there can be no
|
||||
branches to the inside of such a tree. All results of those trees are stored to
|
||||
memory.
|
||||
|
||||
One idea was to drive the code generation directly from the CIL code, without
|
||||
generating an intermediate forest of trees. I think this is not possible,
|
||||
because you always have to gather some attributes and attach it to the
|
||||
instruction (for example the register allocation info). So I thing generating a
|
||||
tree is the right thing and that also works perfectly with monoburg. IMO we
|
||||
would not get any benefit from trying to feed monoburg directly with CIL
|
||||
instructions.
|
||||
|
||||
DAG handling:
|
||||
=============
|
||||
|
||||
Monoburg can't handle DAGs, instead we need real trees as input for
|
||||
the code generator. So we have two problems:
|
||||
|
||||
1.) DUP instruction: This one is obvious - we need to store the value
|
||||
into a temporary variable to solve the problem.
|
||||
|
||||
2.) function calls: Chapter 12.8, page 343 of "A retargetable C compiler"
|
||||
explains that: "because listing a call node will give it a hidden reference
|
||||
from the code list". I don't understand that (can someone explain that?), but
|
||||
there is another reason to save return values to temporaries: Consider the
|
||||
following code:
|
||||
|
||||
x = f(y) + g(z); // all functions return integers
|
||||
|
||||
We could generate such a tree for this expression: STLOC(ADD(CALL,CALL))
|
||||
|
||||
The problem is that both calls returns the value in the same register,
|
||||
so it is non trivial to generate code for that tree. We must copy one
|
||||
register into another one, which make register allocation more complex.
|
||||
The easier solution is store the result of function calls to
|
||||
temporaries. This leads to the following forest:
|
||||
|
||||
STLOC(CALL)
|
||||
STLOC(CALL)
|
||||
STLOC(ADD (LDLOC, LDLOC))
|
||||
|
||||
This is what lcc is doing, if I understood 12.8, page 342, 343?
|
||||
|
||||
Value Types:
|
||||
============
|
||||
|
||||
The only CLI instructions which can handle value types are loads and stores,
|
||||
either to local variable, to the stack or to array elements. Value types with a
|
||||
size smaller than sizeof(int) are handled like any other basic type. For other
|
||||
value types we load the base address and emit block copies to store them.
|
||||
|
||||
@@ -7,6 +7,3 @@ Class Libraries:
|
||||
Miguel de Icaza ([email protected])
|
||||
Sean MacIsaac ([email protected])
|
||||
Vladimir Vukicevic ([email protected])
|
||||
Garrett Rooney ([email protected])
|
||||
Bob Smith ([email protected])
|
||||
John Barnette ([email protected])
|
||||
+1
-20
@@ -1,21 +1,2 @@
|
||||
|
||||
This contains the Mono C# compiler as well as the Mono runtime
|
||||
library.
|
||||
|
||||
Layout:
|
||||
|
||||
class/
|
||||
Class libraries
|
||||
|
||||
errors/
|
||||
Sample programs that should generate errors by the compiler.
|
||||
|
||||
jay/
|
||||
Yacc-based parser generator.
|
||||
|
||||
mcs/
|
||||
The Mono C# compiler
|
||||
|
||||
tests/
|
||||
Sample tests
|
||||
|
||||
This is the Ximian MCS C# compiler written in C#
|
||||
@@ -1,22 +0,0 @@
|
||||
//
|
||||
// System.Data.AcceptRejectRule.cs
|
||||
//
|
||||
// Author:
|
||||
// Christopher Podurgiel ([email protected])
|
||||
//
|
||||
// (C) Chris Podurgiel
|
||||
//
|
||||
|
||||
namespace System.Data
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Determines the action that occurs when the AcceptChanges or RejectChanges method is invoked on a DataTable with a ForeignKeyConstraint.
|
||||
/// </summary>
|
||||
public enum AcceptRejectRule
|
||||
{
|
||||
Cascade,
|
||||
None
|
||||
}
|
||||
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,42 +0,0 @@
|
||||
2001-08-30 Christopher Podurgiel <[email protected]>
|
||||
*AcceptRejectRule.cs: Added
|
||||
*CommandBehavior.cs: Added
|
||||
*CommandType.cs: Added
|
||||
*ConnectionState.cs: Added
|
||||
*DataColumnChangeEventHandler.cs: Added
|
||||
*DataRowAction.cs: Added
|
||||
*DataRowChangeEventHandler.cs: Added
|
||||
*DataRowState.cs: Added
|
||||
*DataRowVersion.cs: Added
|
||||
*DataViewRowState.cs: Added
|
||||
*DbType.cs: Added
|
||||
*FillErrorEventHandler.cs: Added
|
||||
*IColumnMapping.cs: Added
|
||||
*IColumnMappingCollection.cs: Added
|
||||
*IDataAdapter.cs: Added
|
||||
*IDataParameter.cs: Added
|
||||
*IDataParameterCollection.cs: Added
|
||||
*IDataReader.cs: Added
|
||||
*IDataRecord.cs: Added
|
||||
*IDbCommand.cs: Added
|
||||
*IDbConnection.cs: Added
|
||||
*IDbDataAdapter.cs: Added
|
||||
*IDbTransaction.cs: Added
|
||||
*IsolationLevel.cs: Added
|
||||
*ITableMapping.cs: Added
|
||||
*ITableMappingCollection.cs: Added
|
||||
*MappingType.cs: Added
|
||||
*MergeFailedEventHandler.cs: Added
|
||||
*MissingMappingAction.cs: Added
|
||||
*MissingSchemaAction.cs: Added
|
||||
*ParameterDirection.cs: Added
|
||||
*PropertyAttributes.cs: Added
|
||||
*Rule.cs: Added
|
||||
*SchemaType.cs: Added
|
||||
*SqlDbType.cs: Added
|
||||
*StateChangeEventHandler.cs: Added
|
||||
*StatementType.cs: Added
|
||||
*UpdateRowSource.cs: Added
|
||||
*UpdateStatus.cs: Added
|
||||
*XmlReadMode.cs: Added
|
||||
*XmlWriteMode.cs: Added
|
||||
@@ -1,26 +0,0 @@
|
||||
//
|
||||
// System.Data.CommandBehavior.cs
|
||||
//
|
||||
// Author:
|
||||
// Christopher Podurgiel ([email protected])
|
||||
//
|
||||
// (C) Chris Podurgiel
|
||||
//
|
||||
|
||||
namespace System.Data
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Specifies a description of the results and the affect on the database of the query command.
|
||||
/// This enumeration has a FlagsAttribute that allows a bitwise combination of its member values.
|
||||
/// </summary>
|
||||
public enum CommandBehavior
|
||||
{
|
||||
CloseConnection,
|
||||
KeyInfo,
|
||||
SchemaOnly,
|
||||
SequentialAccess,
|
||||
SingleResult,
|
||||
SingleRow
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
//
|
||||
// System.Data.CommandType.cs
|
||||
//
|
||||
// Author:
|
||||
// Christopher Podurgiel ([email protected])
|
||||
//
|
||||
// (C) Chris Podurgiel
|
||||
//
|
||||
|
||||
namespace System.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Specifies how a command string is interpreted.
|
||||
/// </summary>
|
||||
public enum CommandType
|
||||
{
|
||||
StoredProcedure,
|
||||
TableDirect,
|
||||
Text
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
//
|
||||
// System.Data.ConnectionState.cs
|
||||
//
|
||||
// Author:
|
||||
// Christopher Podurgiel ([email protected])
|
||||
//
|
||||
// (C) Chris Podurgiel
|
||||
//
|
||||
|
||||
namespace System.Data
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Returns the current state of the connection to a data source.
|
||||
/// This enumeration has a FlagsAttribute that allows a bitwise combination of its member values.
|
||||
/// </summary>
|
||||
public enum ConnectionState
|
||||
{
|
||||
Broken,
|
||||
Closed,
|
||||
Connecting,
|
||||
Executing,
|
||||
Fetching,
|
||||
Open
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
//
|
||||
// System.Data.DataColumnChangeEventHandler.cs
|
||||
//
|
||||
// Author:
|
||||
// Christopher Podurgiel ([email protected])
|
||||
//
|
||||
// (C) Chris Podurgiel
|
||||
//
|
||||
|
||||
namespace System.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents the method that will handle the the ColumnChanging event.
|
||||
/// </summary>
|
||||
public delegate void DataColumnChangeEventHandler(object sender, DataColumnChangeEventArgs e);
|
||||
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
//
|
||||
// System.Data.DataRowAction.cs
|
||||
//
|
||||
// Author:
|
||||
// Christopher Podurgiel ([email protected])
|
||||
//
|
||||
// (C) Chris Podurgiel
|
||||
//
|
||||
|
||||
namespace System.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Describes the action taken on a DataRow.
|
||||
/// This enumeration has a FlagsAttribute that allows a bitwise combination of its member values.
|
||||
/// </summary>
|
||||
public enum DataRowAction
|
||||
{
|
||||
Add,
|
||||
Change,
|
||||
Commit,
|
||||
Delete,
|
||||
Nothing,
|
||||
Rollback
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
//
|
||||
// System.Data.DataRowChangeEventHandler.cs
|
||||
//
|
||||
// Author:
|
||||
// Christopher Podurgiel ([email protected])
|
||||
//
|
||||
// (C) Chris Podurgiel
|
||||
//
|
||||
|
||||
namespace System.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents the method that will handle the RowChanging, RowChanged, RowDeleting, and RowDeleted events of a DataTable.
|
||||
/// </summary>
|
||||
public delegate void DataRowChangeEventHandler(object sender, DataRowChangeEventArgs e);
|
||||
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
//
|
||||
// System.Data.DataRowState.cs
|
||||
//
|
||||
// Author:
|
||||
// Christopher Podurgiel ([email protected])
|
||||
//
|
||||
// (C) Chris Podurgiel
|
||||
//
|
||||
|
||||
namespace System.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the state of a DataRow object.
|
||||
/// </summary>
|
||||
public enum DataRowState
|
||||
{
|
||||
Added,
|
||||
Deleted,
|
||||
Detached,
|
||||
Modified,
|
||||
Unchanged
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
//
|
||||
// System.Data.DataRowVersion.cs
|
||||
//
|
||||
// Author:
|
||||
// Christopher Podurgiel ([email protected])
|
||||
//
|
||||
// (C) Chris Podurgiel
|
||||
//
|
||||
|
||||
namespace System.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Describes the version of a DataRow.
|
||||
/// </summary>
|
||||
public enum DataRowVersion
|
||||
{
|
||||
Current,
|
||||
Default,
|
||||
Original,
|
||||
Proposed
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
//
|
||||
// System.Data.DataViewRowState.cs
|
||||
//
|
||||
// Author:
|
||||
// Christopher Podurgiel ([email protected])
|
||||
//
|
||||
// (C) Chris Podurgiel
|
||||
//
|
||||
|
||||
namespace System.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Describes the version of data in a DataRow.
|
||||
/// This enumeration has a FlagsAttribute that allows a bitwise combination of its member values.
|
||||
/// </summary>
|
||||
public enum DataViewRowState
|
||||
{
|
||||
Added,
|
||||
CurrentRows,
|
||||
Deleted,
|
||||
ModifiedCurrent,
|
||||
ModifiedOriginal,
|
||||
None,
|
||||
OriginalRows,
|
||||
Unchanged
|
||||
}
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
//
|
||||
// System.Data.DbType.cs
|
||||
//
|
||||
// Author:
|
||||
// Christopher Podurgiel ([email protected])
|
||||
//
|
||||
// (C) Chris Podurgiel
|
||||
//
|
||||
|
||||
namespace System.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the data type of a field, a property, or a Parameter object of a .NET data provider.
|
||||
/// </summary>
|
||||
public enum DbType
|
||||
{
|
||||
AnsiString,
|
||||
Binary,
|
||||
Boolean,
|
||||
Byte,
|
||||
Currency,
|
||||
Date,
|
||||
DateTime,
|
||||
Decimal,
|
||||
Double,
|
||||
Guid,
|
||||
Int16,
|
||||
Int32,
|
||||
Int64,
|
||||
Object,
|
||||
SByte,
|
||||
Single,
|
||||
String,
|
||||
Time,
|
||||
UInt16,
|
||||
UInt32,
|
||||
UInt64,
|
||||
VarNumeric
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
//
|
||||
// System.Data.FillErrorEventHandler.cs
|
||||
//
|
||||
// Author:
|
||||
// Christopher Podurgiel ([email protected])
|
||||
//
|
||||
// (C) Chris Podurgiel
|
||||
//
|
||||
|
||||
namespace System.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents the method that will handle the FillError event.
|
||||
/// </summary>
|
||||
public delegate void FillErrorEventHandler(object sender, FillErrorEventArgs e);
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
//
|
||||
// System.Data.IColumnMapping.cs
|
||||
//
|
||||
// Author:
|
||||
// Christopher Podurgiel ([email protected])
|
||||
//
|
||||
// (C) Chris Podurgiel
|
||||
//
|
||||
|
||||
namespace System.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Associates a data source column with a DataSet column, and is implemented by the DataColumnMapping class, which is used in common by .NET data providers.
|
||||
/// </summary>
|
||||
public interface IColumnMapping
|
||||
{
|
||||
string DataSetColumn
|
||||
{
|
||||
get
|
||||
{
|
||||
}
|
||||
set
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
string SourceColumn
|
||||
{
|
||||
get
|
||||
{
|
||||
}
|
||||
set
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
//
|
||||
// System.Data.IColumnMappingCollection.cs
|
||||
//
|
||||
// Author:
|
||||
// Christopher Podurgiel ([email protected])
|
||||
//
|
||||
// (C) Chris Podurgiel
|
||||
//
|
||||
|
||||
namespace System.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains a collection of ColumnMapping objects, and is implemented by the DataColumnMappingCollection, which is used in common by .NET data providers.
|
||||
/// </summary>
|
||||
public interface IColumnMappingCollection : IList, ICollection, IEnumerable
|
||||
{
|
||||
IColumnMapping Add(string sourceColumnName, string dataSetColumnName)
|
||||
{
|
||||
}
|
||||
|
||||
bool Contains(string sourceColumnName)
|
||||
{
|
||||
}
|
||||
|
||||
IColumnMapping GetByDataSetColumn(string dataSetColumnName)
|
||||
{
|
||||
}
|
||||
|
||||
int IndexOf(string sourceColumnName)
|
||||
{
|
||||
}
|
||||
|
||||
void RemoveAt(string sourceColumnName)
|
||||
{
|
||||
}
|
||||
|
||||
object this[string index]
|
||||
{
|
||||
get
|
||||
{
|
||||
}
|
||||
set
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
//
|
||||
// System.Data.IDataAdapter.cs
|
||||
//
|
||||
// Author:
|
||||
// Christopher Podurgiel ([email protected])
|
||||
//
|
||||
// (C) Chris Podurgiel
|
||||
//
|
||||
|
||||
namespace System.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Allows an object to implement a DataAdapter, and represents a set of methods and mapping action-related properties used to fill and refresh a DataSet and update a data source.
|
||||
/// </summary>
|
||||
public interface IDataAdapter
|
||||
{
|
||||
int Fill(DataSet dataSet)
|
||||
{
|
||||
}
|
||||
|
||||
DataTable[] FillSchema(DataSet dataSet, SchemaType schemaType)
|
||||
{
|
||||
}
|
||||
|
||||
IDataParameter[] GetFillParameters();
|
||||
|
||||
int Update(DataSet dataSet)
|
||||
{
|
||||
}
|
||||
|
||||
MissingMappingAction MissingMappingAction
|
||||
{
|
||||
get
|
||||
{
|
||||
}
|
||||
set
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
MissingSchemaAction MissingSchemaAction
|
||||
{
|
||||
get
|
||||
{
|
||||
}
|
||||
set
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
ITableMappingCollection TableMappings
|
||||
{
|
||||
get
|
||||
{
|
||||
}
|
||||
set
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
//
|
||||
// System.Data.IDataParameter.cs
|
||||
//
|
||||
// Author:
|
||||
// Christopher Podurgiel ([email protected])
|
||||
//
|
||||
// (C) Chris Podurgiel
|
||||
//
|
||||
|
||||
namespace System.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a parameter to a Command object, and optionally, its mapping to DataSet columns; and is implemented by .NET data providers that access data sources.
|
||||
/// </summary>
|
||||
public interface IDataParameter
|
||||
{
|
||||
|
||||
DbType DbType
|
||||
{
|
||||
get
|
||||
{
|
||||
}
|
||||
set
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
ParameterDirection Direction
|
||||
{
|
||||
get
|
||||
{
|
||||
}
|
||||
set
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
bool IsNullable
|
||||
{
|
||||
get
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
string ParameterName
|
||||
{
|
||||
get
|
||||
{
|
||||
}
|
||||
set
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
string SourceColumn
|
||||
{
|
||||
get
|
||||
{
|
||||
}
|
||||
set
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
DataRowVersion SourceVersion
|
||||
{
|
||||
get
|
||||
{
|
||||
}
|
||||
set
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
//
|
||||
// System.Data.IDataParameterCollection.cs
|
||||
//
|
||||
// Author:
|
||||
// Christopher Podurgiel ([email protected])
|
||||
//
|
||||
// (C) Chris Podurgiel
|
||||
//
|
||||
|
||||
namespace System.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Collects all parameters relevant to a Command object and their mappings to DataSet columns, and is implemented by .NET data providers that access data sources.
|
||||
/// </summary>
|
||||
public interface IDataParameterCollection : IList, ICollection, IEnumerable
|
||||
{
|
||||
void RemoveAt(string parameterName)
|
||||
{
|
||||
}
|
||||
|
||||
int IndexOf(string parameterName)
|
||||
{
|
||||
}
|
||||
|
||||
bool Contains(string parameterName)
|
||||
{
|
||||
}
|
||||
|
||||
object this[string parameterName]
|
||||
{
|
||||
get
|
||||
{
|
||||
}
|
||||
set
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
//
|
||||
// System.Data.IDataReader.cs
|
||||
//
|
||||
// Author:
|
||||
// Christopher Podurgiel ([email protected])
|
||||
//
|
||||
// (C) Chris Podurgiel
|
||||
//
|
||||
|
||||
namespace System.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides a means of reading one or more forward-only streams of result sets obtained by executing a command at a data source, and is implemented by .NET data providers that access relational databases.
|
||||
/// </summary>
|
||||
public interface IDataReader : IDataRecord
|
||||
{
|
||||
void Close()
|
||||
{
|
||||
}
|
||||
|
||||
DataTable GetSchemaTable()
|
||||
{
|
||||
}
|
||||
|
||||
bool NextResult()
|
||||
{
|
||||
}
|
||||
|
||||
bool Read()
|
||||
{
|
||||
}
|
||||
|
||||
int Depth
|
||||
{
|
||||
get
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
bool IsClosed
|
||||
{
|
||||
get
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
int RecordsAffected
|
||||
{
|
||||
get
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,126 +0,0 @@
|
||||
//
|
||||
// System.Data.IDataRecord.cs
|
||||
//
|
||||
// Author:
|
||||
// Christopher Podurgiel ([email protected])
|
||||
//
|
||||
// (C) Chris Podurgiel
|
||||
//
|
||||
|
||||
namespace System.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides access to the column values within each row for a DataReader, and is implemented by .NET data providers that access relational databases.
|
||||
/// </summary>
|
||||
public interface IDataRecord
|
||||
{
|
||||
bool GetBoolean(int i)
|
||||
{
|
||||
}
|
||||
|
||||
byte GetByte(int i)
|
||||
{
|
||||
}
|
||||
|
||||
long GetBytes(int i, long fieldOffset, byte[] buffer, int bufferOffset, int length)
|
||||
{
|
||||
}
|
||||
|
||||
char GetChar(int i)
|
||||
{
|
||||
}
|
||||
|
||||
long GetChars(int i, long fieldOffset, char[] buffer, int bufferOffset, int length)
|
||||
{
|
||||
}
|
||||
|
||||
IDataReader GetDate(int i)
|
||||
{
|
||||
}
|
||||
|
||||
string GetDataTypeName(int i)
|
||||
{
|
||||
}
|
||||
|
||||
DateTime GetDateTime(int i)
|
||||
{
|
||||
}
|
||||
|
||||
decimal GetDecimal(int i)
|
||||
{
|
||||
}
|
||||
|
||||
double GetDouble(int i)
|
||||
{
|
||||
}
|
||||
|
||||
Type GetFieldType(int i)
|
||||
{
|
||||
}
|
||||
|
||||
float GetFloat(int i)
|
||||
{
|
||||
}
|
||||
|
||||
Guid GetGuid(int i)
|
||||
{
|
||||
}
|
||||
|
||||
short GetInt16(int i)
|
||||
{
|
||||
}
|
||||
|
||||
int GetInt32(int i)
|
||||
{
|
||||
}
|
||||
|
||||
long GetInt64(int i)
|
||||
{
|
||||
}
|
||||
|
||||
string GetName(int i)
|
||||
{
|
||||
}
|
||||
|
||||
int GetOrdinal(string name)
|
||||
{
|
||||
}
|
||||
|
||||
string GetString(int i)
|
||||
{
|
||||
}
|
||||
|
||||
object GetValue(int i)
|
||||
{
|
||||
}
|
||||
|
||||
int GetValues(object[] values)
|
||||
{
|
||||
}
|
||||
|
||||
bool IsDBNull(int i)
|
||||
{
|
||||
}
|
||||
|
||||
int FieldCount
|
||||
{
|
||||
get
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
object this[string name]
|
||||
{
|
||||
get
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
object this[int i]
|
||||
{
|
||||
get
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,113 +0,0 @@
|
||||
//
|
||||
// System.Data.IDBCommand.cs
|
||||
//
|
||||
// Author:
|
||||
// Christopher Podurgiel ([email protected])
|
||||
//
|
||||
// (C) Chris Podurgiel
|
||||
//
|
||||
|
||||
namespace System.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a SQL statement that is executed while connected to a data source, and is implemented by .NET data providers that access relational databases.
|
||||
/// </summary>
|
||||
public interface IDBCommand
|
||||
{
|
||||
void Cancel()
|
||||
{
|
||||
}
|
||||
|
||||
IDataParameter CreateParameter()
|
||||
{
|
||||
}
|
||||
|
||||
int ExecuteNonQuery()
|
||||
{
|
||||
}
|
||||
|
||||
IDataReader ExecuteReader()
|
||||
{
|
||||
}
|
||||
|
||||
IDataReader ExecuteReader(CommandBehavior behavior)
|
||||
{
|
||||
}
|
||||
|
||||
object ExecuteScalar()
|
||||
{
|
||||
}
|
||||
|
||||
void Prepare()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
string CommandText
|
||||
{
|
||||
get
|
||||
{
|
||||
}
|
||||
set
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
int CommandTimeout
|
||||
{
|
||||
get
|
||||
{
|
||||
}
|
||||
set
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
CommandTpe CommandType
|
||||
{
|
||||
get
|
||||
{
|
||||
}
|
||||
set
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
IDbConnection Connection
|
||||
{
|
||||
get
|
||||
{
|
||||
}
|
||||
set
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
IDataParameterCollection Parameters
|
||||
{
|
||||
get
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
IDbTransaction Transaction
|
||||
{
|
||||
get
|
||||
{
|
||||
}
|
||||
set
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
UpdateRowSource UpdatedRowSource
|
||||
{
|
||||
get
|
||||
{
|
||||
}
|
||||
set
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,74 +0,0 @@
|
||||
//
|
||||
// System.Data.IDBConnection.cs
|
||||
//
|
||||
// Author:
|
||||
// Christopher Podurgiel ([email protected])
|
||||
//
|
||||
// (C) Chris Podurgiel
|
||||
//
|
||||
|
||||
namespace System.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents an open connection to a data source, and is implemented by .NET data providers that access relational databases.
|
||||
/// </summary>
|
||||
public interface IDBConnection
|
||||
{
|
||||
IDbTransaction BeginTransaction()
|
||||
{
|
||||
}
|
||||
|
||||
IDbTransaction BeginTransaction(IsolationLevel il)
|
||||
{
|
||||
}
|
||||
|
||||
void ChangeDatabase(string databaseName)
|
||||
{
|
||||
}
|
||||
|
||||
void Close()
|
||||
{
|
||||
}
|
||||
|
||||
IDbCommand CreateCommand()
|
||||
{
|
||||
}
|
||||
|
||||
void Open()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
string ConnectionString
|
||||
{
|
||||
get
|
||||
{
|
||||
}
|
||||
set
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
int ConnectionTimeout
|
||||
{
|
||||
get
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
string Database
|
||||
{
|
||||
get
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
ConnectionState State
|
||||
{
|
||||
get
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
//
|
||||
// System.Data.IDbDataAdapter.cs
|
||||
//
|
||||
// Author:
|
||||
// Christopher Podurgiel ([email protected])
|
||||
//
|
||||
// (C) Chris Podurgiel
|
||||
//
|
||||
|
||||
namespace System.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a set of command-related properties that are used to fill the DataSet and update a data source, and is implemented by .NET data providers that access relational databases.
|
||||
/// </summary>
|
||||
public interface IDbDataAdapter : IDataAdapter
|
||||
{
|
||||
|
||||
IDbCommand DeleteCommand
|
||||
{
|
||||
get
|
||||
{
|
||||
}
|
||||
set
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
IDbCommand InsertCommand
|
||||
{
|
||||
get
|
||||
{
|
||||
}
|
||||
set
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
IDbCommand SelectCommand
|
||||
{
|
||||
get
|
||||
{
|
||||
}
|
||||
set
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
IDbCommand UpdateCommand
|
||||
{
|
||||
get
|
||||
{
|
||||
}
|
||||
set
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
//
|
||||
// System.Data.IDbTransaction.cs
|
||||
//
|
||||
// Author:
|
||||
// Christopher Podurgiel ([email protected])
|
||||
//
|
||||
// (C) Chris Podurgiel
|
||||
//
|
||||
|
||||
namespace System.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a transaction to be performed at a data source, and is implemented by .NET data providers that access relational databases.
|
||||
/// </summary>
|
||||
public interface IDbTransaction
|
||||
{
|
||||
|
||||
void Commit()
|
||||
{
|
||||
}
|
||||
|
||||
void Rollback()
|
||||
{
|
||||
}
|
||||
|
||||
IsolationLevel IsolationLevel
|
||||
{
|
||||
get
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
//
|
||||
// System.Data.ITableMapping.cs
|
||||
//
|
||||
// Author:
|
||||
// Christopher Podurgiel ([email protected])
|
||||
//
|
||||
// (C) Chris Podurgiel
|
||||
//
|
||||
|
||||
namespace System.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Associates a source table with a table in a DataSet, and is implemented by the DataTableMapping class, which is used in common by .NET data providers.
|
||||
/// </summary>
|
||||
public interface ITableMapping
|
||||
{
|
||||
|
||||
IColumnMappingCollection ColumnMappings
|
||||
{
|
||||
get
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
string DataSetTable
|
||||
{
|
||||
get
|
||||
{
|
||||
}
|
||||
set
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
string SourceTable
|
||||
{
|
||||
get
|
||||
{
|
||||
}
|
||||
set
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
//
|
||||
// System.Data.ITableMappingCollection.cs
|
||||
//
|
||||
// Author:
|
||||
// Christopher Podurgiel ([email protected])
|
||||
//
|
||||
// (C) Chris Podurgiel
|
||||
//
|
||||
|
||||
namespace System.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains a collection of TableMapping objects, and is implemented by the DataTableMappingCollection, which is used in common by .NET data providers.
|
||||
/// </summary>
|
||||
public interface ITableMappingCollection : IList, ICollection, IEnumerable
|
||||
{
|
||||
ITableMapping Add(string sourceTableName, string dataSetTableName)
|
||||
{
|
||||
}
|
||||
|
||||
bool Contains(string sourceTableName)
|
||||
{
|
||||
}
|
||||
|
||||
ITableMapping GetByDataSetTable(string dataSetTableName)
|
||||
{
|
||||
}
|
||||
|
||||
int IndexOf(string sourceTableName)
|
||||
{
|
||||
}
|
||||
|
||||
void RemoveAt(string sourceTableName)
|
||||
{
|
||||
}
|
||||
|
||||
object this[string index]
|
||||
{
|
||||
get
|
||||
{
|
||||
}
|
||||
set
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
//
|
||||
// System.Data.IsolationLevel.cs
|
||||
//
|
||||
// Author:
|
||||
// Christopher Podurgiel ([email protected])
|
||||
//
|
||||
// (C) Chris Podurgiel
|
||||
//
|
||||
|
||||
namespace System.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Specifies the transaction locking behavior for the connection.
|
||||
/// This enumeration has a FlagsAttribute that allows a bitwise combination of its member values.
|
||||
/// </summary>
|
||||
public enum IsolationLevel
|
||||
{
|
||||
Chaos,
|
||||
ReadCommitted,
|
||||
ReadUnCommitted,
|
||||
RepeatableRead,
|
||||
Serializable,
|
||||
Unspecified
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
//
|
||||
// System.Data.MappingType.cs
|
||||
//
|
||||
// Author:
|
||||
// Christopher Podurgiel ([email protected])
|
||||
//
|
||||
// (C) Chris Podurgiel
|
||||
//
|
||||
|
||||
namespace System.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Specifies how a DataColumn is mapped.
|
||||
/// </summary>
|
||||
public enum MappingType
|
||||
{
|
||||
Attribute,
|
||||
Element,
|
||||
Hidden,
|
||||
SimpleContent
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
//
|
||||
// System.Data.MergeFailedEventHandler.cs
|
||||
//
|
||||
// Author:
|
||||
// Christopher Podurgiel ([email protected])
|
||||
//
|
||||
// (C) Chris Podurgiel
|
||||
//
|
||||
|
||||
namespace System.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents the method that will handle the MergeFailed event.
|
||||
/// </summary>
|
||||
public delegate void MergeFailedEventHandler(object sender, MergeFailedEventArgs e);
|
||||
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
//
|
||||
// System.Data.MissingMappingAction.cs
|
||||
//
|
||||
// Author:
|
||||
// Christopher Podurgiel ([email protected])
|
||||
//
|
||||
// (C) Chris Podurgiel
|
||||
//
|
||||
|
||||
namespace System.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Determines the action that occurs when a mapping is missing from a source table or a source column.
|
||||
/// </summary>
|
||||
public enum MissingMappingAction
|
||||
{
|
||||
Error,
|
||||
Ignore,
|
||||
Passthrough
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
//
|
||||
// System.Data.MissingSchemaAction.cs
|
||||
//
|
||||
// Author:
|
||||
// Christopher Podurgiel ([email protected])
|
||||
//
|
||||
// (C) Chris Podurgiel
|
||||
//
|
||||
|
||||
namespace System.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Specifies the action to take when adding data to the DataSet and the required DataTable or DataColumn is missing.
|
||||
/// </summary>
|
||||
public enum MissingSchemaAction
|
||||
{
|
||||
Add,
|
||||
AddWithKey,
|
||||
Error,
|
||||
Ignore
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
//
|
||||
// System.Data.ParameterDirection.cs
|
||||
//
|
||||
// Author:
|
||||
// Christopher Podurgiel ([email protected])
|
||||
//
|
||||
// (C) Chris Podurgiel
|
||||
//
|
||||
|
||||
namespace System.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Specifies the type of a parameter within a query relative to the DataSet.
|
||||
/// </summary>
|
||||
public enum ParameterDirection
|
||||
{
|
||||
Input,
|
||||
InputOutput,
|
||||
Output,
|
||||
ReturnValue
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
//
|
||||
// System.Data.PropertyAttributes.cs
|
||||
//
|
||||
// Author:
|
||||
// Christopher Podurgiel ([email protected])
|
||||
//
|
||||
// (C) Chris Podurgiel
|
||||
//
|
||||
|
||||
namespace System.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Specifies the attributes of a property.
|
||||
/// This enumeration has a FlagsAttribute that allows a bitwise combination of its member values
|
||||
/// </summary>
|
||||
public enum PropertyAttributes
|
||||
{
|
||||
NotSupported,
|
||||
Optional,
|
||||
Read,
|
||||
Required,
|
||||
Write
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
//
|
||||
// System.Data.Rule.cs
|
||||
//
|
||||
// Author:
|
||||
// Christopher Podurgiel ([email protected])
|
||||
//
|
||||
// (C) Chris Podurgiel
|
||||
//
|
||||
|
||||
namespace System.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Indicates the action that occurs when a ForeignKeyConstraint is enforced.
|
||||
/// </summary>
|
||||
public enum Rule
|
||||
{
|
||||
Cascade,
|
||||
None,
|
||||
SetDefault,
|
||||
SetNull
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
//
|
||||
// System.Data.SchemaType.cs
|
||||
//
|
||||
// Author:
|
||||
// Christopher Podurgiel ([email protected])
|
||||
//
|
||||
// (C) Chris Podurgiel
|
||||
//
|
||||
|
||||
namespace System.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Specifies how to handle existing schema mappings when performing a FillSchema operation.
|
||||
/// </summary>
|
||||
public enum SchemaType
|
||||
{
|
||||
Mapped,
|
||||
Source
|
||||
}
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
//
|
||||
// System.Data.SqlDbType.cs
|
||||
//
|
||||
// Author:
|
||||
// Christopher Podurgiel ([email protected])
|
||||
//
|
||||
// (C) Chris Podurgiel
|
||||
//
|
||||
|
||||
namespace System.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Specifies SQL Server data types.
|
||||
/// </summary>
|
||||
public enum SqlDbType
|
||||
{
|
||||
BigInt,
|
||||
Binary,
|
||||
Bit,
|
||||
Char,
|
||||
DateTime,
|
||||
Decimal,
|
||||
Float,
|
||||
Image,
|
||||
Int,
|
||||
Money,
|
||||
NChar,
|
||||
NText,
|
||||
NVarChar,
|
||||
Real,
|
||||
SmallDateTime,
|
||||
SmallInt,
|
||||
SmallMoney,
|
||||
Text,
|
||||
Timestamp,
|
||||
TinyInt,
|
||||
UniqueIdentifier,
|
||||
VarBinary,
|
||||
VarChar,
|
||||
Variant
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
//
|
||||
// System.Data.StateChangeEventHandler.cs
|
||||
//
|
||||
// Author:
|
||||
// Christopher Podurgiel ([email protected])
|
||||
//
|
||||
// (C) Chris Podurgiel
|
||||
//
|
||||
|
||||
namespace System.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents the method that will handle the StateChange event.
|
||||
/// </summary>
|
||||
public delegate void StateChangeEventHandler(object sender, StateChangeEventArgs e);
|
||||
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
//
|
||||
// System.Data.StatementType.cs
|
||||
//
|
||||
// Author:
|
||||
// Christopher Podurgiel ([email protected])
|
||||
//
|
||||
// (C) Chris Podurgiel
|
||||
//
|
||||
|
||||
namespace System.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Specifies the type of SQL query to be used by the OleDbRowUpdatedEventArgs, OleDbRowUpdatingEventArgs, SqlRowUpdatedEventArgs, or SqlRowUpdatingEventArgs class.
|
||||
/// </summary>
|
||||
public enum StatementType
|
||||
{
|
||||
Delete,
|
||||
Insert,
|
||||
Select,
|
||||
Update
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
//
|
||||
// System.Data.UpdateRowSource.cs
|
||||
//
|
||||
// Author:
|
||||
// Christopher Podurgiel ([email protected])
|
||||
//
|
||||
// (C) Chris Podurgiel
|
||||
//
|
||||
|
||||
namespace System.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Specifies how query command results are applied to the row being updated.
|
||||
/// </summary>
|
||||
public enum UpdateRowSource
|
||||
{
|
||||
Both,
|
||||
FirstReturnedRecord,
|
||||
None,
|
||||
OutputParameters
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
//
|
||||
// System.Data.UpdateStatus.cs
|
||||
//
|
||||
// Author:
|
||||
// Christopher Podurgiel ([email protected])
|
||||
//
|
||||
// (C) Chris Podurgiel
|
||||
//
|
||||
|
||||
namespace System.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Specifies the action to take with regard to the current and remaining rows during an Update.
|
||||
/// </summary>
|
||||
public enum UpdateStatus
|
||||
{
|
||||
Continue,
|
||||
ErrorsOccurred,
|
||||
SkipAllRemainingRows,
|
||||
SkipCurrentRow
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
//
|
||||
// System.Data.XmlReadMode.cs
|
||||
//
|
||||
// Author:
|
||||
// Christopher Podurgiel ([email protected])
|
||||
//
|
||||
// (C) Chris Podurgiel
|
||||
//
|
||||
|
||||
namespace System.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Specifies how to read XML data and a relational schema into a DataSet.
|
||||
/// </summary>
|
||||
public enum XmlReadMode
|
||||
{
|
||||
Auto,
|
||||
DiffGram,
|
||||
Fragment,
|
||||
IgnoreSchema,
|
||||
InferSchema,
|
||||
ReadSchema
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
//
|
||||
// System.Data.XmlWriteMode.cs
|
||||
//
|
||||
// Author:
|
||||
// Christopher Podurgiel ([email protected])
|
||||
//
|
||||
// (C) Chris Podurgiel
|
||||
//
|
||||
|
||||
namespace System.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Use the members of this enumeration when setting the WriteMode parameter of the WriteXml method.
|
||||
/// </summary>
|
||||
public enum XmlWriteMode
|
||||
{
|
||||
DiffGram,
|
||||
IgnoreSchema,
|
||||
WriteSchema
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
@@ -1,258 +0,0 @@
|
||||
//
|
||||
// System.Drawing.Drawing2D.Matrix.cs
|
||||
//
|
||||
// Author:
|
||||
// Stefan Maierhofer <[email protected]>
|
||||
//
|
||||
// (C) Ximian, Inc. http://www.ximian.com
|
||||
//
|
||||
|
||||
namespace System.Drawing.Drawing2D
|
||||
{
|
||||
|
||||
public enum CombineMode
|
||||
{
|
||||
Complement,
|
||||
Exclude,
|
||||
Intersect,
|
||||
Replace,
|
||||
Union,
|
||||
Xor
|
||||
}
|
||||
|
||||
public enum CompositingMode
|
||||
{
|
||||
SourceCopy,
|
||||
SourceOver
|
||||
}
|
||||
|
||||
public enum CompositingQuality
|
||||
{
|
||||
AssumeLinear,
|
||||
Default,
|
||||
GammaCorrected,
|
||||
HighQuality,
|
||||
HighSpeed,
|
||||
Invalid
|
||||
}
|
||||
|
||||
public enum CoordinateSpace
|
||||
{
|
||||
Device,
|
||||
Page,
|
||||
World
|
||||
}
|
||||
|
||||
public enum DashCap
|
||||
{
|
||||
Flat,
|
||||
Round,
|
||||
Triangle
|
||||
}
|
||||
|
||||
public enum DashStyle
|
||||
{
|
||||
Custom,
|
||||
Dash,
|
||||
DashDot,
|
||||
DashDotDot,
|
||||
Dot,
|
||||
Solid
|
||||
}
|
||||
|
||||
public enum FillMode
|
||||
{
|
||||
Alternate,
|
||||
Winding
|
||||
}
|
||||
|
||||
public enum FlushIntention
|
||||
{
|
||||
Flush,
|
||||
Sync
|
||||
}
|
||||
|
||||
public enum HatchStyle
|
||||
{
|
||||
BackwardDiagonal,
|
||||
Cross,
|
||||
DarkDownwardDiagonal,
|
||||
DarkHorizontal,
|
||||
DarkUpwardDiagonal,
|
||||
DarkVertical,
|
||||
DashedDownwardDiagonal,
|
||||
DashedHorizontal,
|
||||
DashedUpwardDiagonal,
|
||||
DashedVertical,
|
||||
DiagonalBrick,
|
||||
DiagonalCross,
|
||||
Divot,
|
||||
DottedDiamond,
|
||||
DottedGrid,
|
||||
ForwardDiagonal,
|
||||
Horizontal,
|
||||
HorizontalBrick,
|
||||
LargeCheckerBoard,
|
||||
LargeConfetti,
|
||||
LargeGrid,
|
||||
LightDownwardDiagonal,
|
||||
LightHorizontal,
|
||||
LightUpwardDiagonal,
|
||||
LightVertical,
|
||||
Max,
|
||||
Min,
|
||||
NarrowHorizontal,
|
||||
NarrowVertical,
|
||||
OutlinedDiamond,
|
||||
Percent05,
|
||||
Percent10,
|
||||
Percent20,
|
||||
Percent25,
|
||||
Percent30,
|
||||
Percent40,
|
||||
Percent50,
|
||||
Percent60,
|
||||
Percent70,
|
||||
Percent75,
|
||||
Percent80,
|
||||
Percent90,
|
||||
Plaid,
|
||||
Shingle,
|
||||
SmallCheckerBoard,
|
||||
SmallConfetti,
|
||||
SmallGrid,
|
||||
SolidDiamond,
|
||||
Sphere,
|
||||
Trellis,
|
||||
Vertical,
|
||||
Wave,
|
||||
Weave,
|
||||
WideDownwardDiagonal,
|
||||
WideUpwardDiagonal,
|
||||
ZigZag
|
||||
}
|
||||
|
||||
public enum InterpolationMode
|
||||
{
|
||||
Bicubic,
|
||||
Bilinear,
|
||||
Default,
|
||||
High,
|
||||
HighQualityBicubic,
|
||||
HighQualityBilinear,
|
||||
Invalid,
|
||||
Low,
|
||||
NearestNeighbour
|
||||
}
|
||||
|
||||
public enum LinearGradientMode
|
||||
{
|
||||
BackwardDiagonal,
|
||||
ForwardDiagonal,
|
||||
Horizontal,
|
||||
Vertical
|
||||
}
|
||||
|
||||
public enum LineCap
|
||||
{
|
||||
AnchorMask,
|
||||
ArrowAnchor,
|
||||
Custom,
|
||||
DiamondAnchor,
|
||||
Flat,
|
||||
NoAnchor,
|
||||
Round,
|
||||
RoundAnchor,
|
||||
Square,
|
||||
SquareAnchor,
|
||||
Triangle
|
||||
}
|
||||
|
||||
public enum LineJoin
|
||||
{
|
||||
Bevel,
|
||||
Miter,
|
||||
MiterClipped,
|
||||
Round
|
||||
}
|
||||
|
||||
public enum MatrixOrder
|
||||
{
|
||||
Append,
|
||||
Prepend
|
||||
}
|
||||
|
||||
public enum PathPointType
|
||||
{
|
||||
Bezier,
|
||||
Bezier3,
|
||||
CloseSubpath,
|
||||
DashMode,
|
||||
Line,
|
||||
PathMarker,
|
||||
PathTypeMask,
|
||||
Start
|
||||
}
|
||||
|
||||
public enum PenAlignment
|
||||
{
|
||||
Center,
|
||||
Inset,
|
||||
Left,
|
||||
Outset,
|
||||
Right
|
||||
}
|
||||
|
||||
public enum PenType
|
||||
{
|
||||
HatchFill,
|
||||
LinearGradient,
|
||||
PathGradient,
|
||||
SolidColor,
|
||||
TextureFill
|
||||
}
|
||||
|
||||
public enum PixelOffsetMode
|
||||
{
|
||||
Default,
|
||||
Half,
|
||||
HighQuality,
|
||||
HighSpeed,
|
||||
Invalid,
|
||||
None
|
||||
}
|
||||
|
||||
public enum QualityMode
|
||||
{
|
||||
Default,
|
||||
Hight,
|
||||
Invalid,
|
||||
Low
|
||||
}
|
||||
|
||||
public enum SmoothingMode
|
||||
{
|
||||
AntiAlias,
|
||||
Default,
|
||||
HighQuality,
|
||||
HighSpeed,
|
||||
Invalid,
|
||||
None
|
||||
}
|
||||
|
||||
public enum WarpMode
|
||||
{
|
||||
Bilinear,
|
||||
Perspective
|
||||
}
|
||||
|
||||
public enum WrapMode
|
||||
{
|
||||
Clamp,
|
||||
Tile,
|
||||
TileFlipX,
|
||||
TileFlipXY,
|
||||
TileFlipY
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,452 +0,0 @@
|
||||
//
|
||||
// System.Drawing.Drawing2D.Matrix.cs
|
||||
//
|
||||
// Author:
|
||||
// Stefan Maierhofer <[email protected]>
|
||||
//
|
||||
// (C) Ximian, Inc. http://www.ximian.com
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Drawing.Drawing2D
|
||||
{
|
||||
public sealed class Matrix : MarshalByRefObject, IDisposable
|
||||
{
|
||||
// initialize to identity
|
||||
private float[] m = {1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f};
|
||||
|
||||
// constructors
|
||||
public Matrix() { }
|
||||
|
||||
/* TODO: depends on System.Drawing.Drawing2D.Rectangle
|
||||
public Matrix(Rectangle rect , Point[] plgpts)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
*/
|
||||
|
||||
/* TODO: depends on System.Drawing.Drawing2D.RectangleF
|
||||
public Matrix(RectangleF rect , PointF[] pa)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
*/
|
||||
public Matrix(float m11, float m12,
|
||||
float m21, float m22,
|
||||
float dx, float dy)
|
||||
{
|
||||
m[0] = m11; m[1] = m12;
|
||||
m[2] = m21; m[3] = m22;
|
||||
m[4] = dx; m[5] = dy;
|
||||
}
|
||||
|
||||
// properties
|
||||
public float[] Elements
|
||||
{
|
||||
get { return m; }
|
||||
}
|
||||
|
||||
public bool IsIdentity
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( (m[0] == 1.0f) && (m[1] == 0.0f) &&
|
||||
(m[2] == 0.0f) && (m[3] == 1.0f) &&
|
||||
(m[4] == 0.0f) && (m[5] == 0.0f) )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsInvertible
|
||||
{
|
||||
get
|
||||
{
|
||||
// matrix M is invertible if det(M) != 0
|
||||
float det = m[0] * m[3] - m[2] * m[1];
|
||||
if (det != 0.0f) return true;
|
||||
else return false;
|
||||
}
|
||||
}
|
||||
|
||||
public float OffsetX
|
||||
{
|
||||
get { return m[4]; }
|
||||
}
|
||||
|
||||
public float OffsetY
|
||||
{
|
||||
get { return m[5]; }
|
||||
}
|
||||
|
||||
// methods
|
||||
public Matrix Clone()
|
||||
{
|
||||
return new Matrix(m[0], m[1], m[2], m[3], m[4], m[5]);
|
||||
}
|
||||
|
||||
public void Dispose() { }
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj is Matrix)
|
||||
{
|
||||
float[] a = ((Matrix)obj).Elements;
|
||||
if ( m[0] == a[0] && m[1] == a[1] &&
|
||||
m[2] == a[2] && m[3] == a[3] &&
|
||||
m[4] == a[4] && m[5] == a[5] )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
~Matrix() {}
|
||||
|
||||
[StructLayout(LayoutKind.Explicit)]
|
||||
internal struct BitConverter
|
||||
{
|
||||
[FieldOffset(0)] public float f;
|
||||
[FieldOffset(0)] public int i;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
BitConverter b;
|
||||
// compiler is not smart
|
||||
b.i = 0;
|
||||
int h = 0;
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
b.f = m[i];
|
||||
h ^= b.i >> i;
|
||||
}
|
||||
return h;
|
||||
}
|
||||
|
||||
public void Invert()
|
||||
{
|
||||
float det = m[0] * m[3] - m[2] * m[1];
|
||||
if (det != 0.0f) // if invertible
|
||||
{
|
||||
float[] r =
|
||||
{
|
||||
m[3] / det,
|
||||
-m[1] / det,
|
||||
-m[2] / det,
|
||||
m[0] / det,
|
||||
(-m[3] * m[4] + m[1] * m[5]) / det,
|
||||
(m[2] * m[4] - m[0] * m[5]) / det
|
||||
};
|
||||
m = r;
|
||||
}
|
||||
}
|
||||
|
||||
public void Multiply(Matrix matrix)
|
||||
{
|
||||
Multiply(matrix, MatrixOrder.Prepend);
|
||||
}
|
||||
|
||||
public void Multiply(Matrix matrix, MatrixOrder order)
|
||||
{
|
||||
switch (order)
|
||||
{
|
||||
case MatrixOrder.Prepend:
|
||||
// this = matrix * this
|
||||
float[] p = matrix.Elements;
|
||||
float[] r0 =
|
||||
{
|
||||
p[0] * m[0] + p[1] * m[2],
|
||||
p[0] * m[1] + p[1] * m[3],
|
||||
p[2] * m[0] + p[3] * m[2],
|
||||
p[2] * m[1] + p[3] * m[3],
|
||||
p[4] * m[0] + p[5] * m[2] + m[4],
|
||||
p[4] * m[1] + p[5] * m[3] + m[5]
|
||||
};
|
||||
m = r0;
|
||||
break;
|
||||
case MatrixOrder.Append:
|
||||
// this = this * matrix
|
||||
float[] a = matrix.Elements;
|
||||
float[] r1 =
|
||||
{
|
||||
m[0] * a[0] + m[1] * a[2],
|
||||
m[0] * a[1] + m[1] * a[3],
|
||||
m[2] * a[0] + m[3] * a[2],
|
||||
m[2] * a[1] + m[3] * a[3],
|
||||
m[4] * a[0] + m[5] * a[2] + a[4],
|
||||
m[4] * a[1] + m[5] * a[3] + a[5]
|
||||
};
|
||||
m = r1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void Reset()
|
||||
{
|
||||
m[0] = 1.0f; m[1] = 0.0f;
|
||||
m[2] = 0.0f; m[3] = 1.0f;
|
||||
m[4] = 0.0f; m[5] = 0.0f;
|
||||
}
|
||||
|
||||
public void Rotate(float angle)
|
||||
{
|
||||
Rotate(angle, MatrixOrder.Prepend);
|
||||
}
|
||||
|
||||
public void Rotate(float angle, MatrixOrder order)
|
||||
{
|
||||
angle *= (float)(Math.PI / 180.0); // degrees to randians
|
||||
float cos = (float)Math.Cos(angle);
|
||||
float sin = (float)Math.Sin(angle);
|
||||
switch (order)
|
||||
{
|
||||
case MatrixOrder.Prepend:
|
||||
// this = rotation * this
|
||||
float[] r0 =
|
||||
{
|
||||
cos * m[0] + sin * m[2],
|
||||
cos * m[1] + sin * m[3],
|
||||
-sin * m[0] + cos * m[2],
|
||||
-sin * m[1] + cos * m[3],
|
||||
m[4],
|
||||
m[5]
|
||||
};
|
||||
m = r0;
|
||||
break;
|
||||
case MatrixOrder.Append:
|
||||
// this = this * rotation
|
||||
float[] r1 =
|
||||
{
|
||||
m[0] * cos + m[1] * -sin,
|
||||
m[0] * sin + m[1] * cos,
|
||||
m[2] * cos + m[3] * -sin,
|
||||
m[2] * sin + m[3] * cos,
|
||||
m[4] * cos + m[5] * -sin,
|
||||
m[4] * sin + m[5] * cos
|
||||
};
|
||||
m = r1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void RotateAt(float angle, PointF point)
|
||||
{
|
||||
RotateAt(angle, point, MatrixOrder.Prepend);
|
||||
}
|
||||
|
||||
public void RotateAt(float angle, PointF point, MatrixOrder order)
|
||||
{
|
||||
angle *= (float)(Math.PI / 180.0); // degrees to randians
|
||||
float cos = (float)Math.Cos(angle);
|
||||
float sin = (float)Math.Sin(angle);
|
||||
float e4 = -point.X * cos + point.Y * sin + point.X;
|
||||
float e5 = -point.X * sin - point.Y * cos + point.Y;
|
||||
switch (order)
|
||||
{
|
||||
case MatrixOrder.Prepend:
|
||||
// this = rotation * this
|
||||
float[] r0 =
|
||||
{
|
||||
cos * m[0] + sin * m[2],
|
||||
cos * m[1] + sin * m[3],
|
||||
-sin * m[0] + cos * m[2],
|
||||
-sin * m[1] + cos * m[3],
|
||||
e4 * m[0] + e5 * m[2] + m[4],
|
||||
e4 * m[1] + e5 * m[3] + m[5]
|
||||
};
|
||||
m = r0;
|
||||
break;
|
||||
case MatrixOrder.Append:
|
||||
// this = this * rotation
|
||||
float[] r1 =
|
||||
{
|
||||
m[0] * cos + m[1] * -sin,
|
||||
m[0] * sin + m[1] * cos,
|
||||
m[2] * cos + m[3] * -sin,
|
||||
m[2] * sin + m[3] * cos,
|
||||
m[4] * cos + m[5] * -sin + e4,
|
||||
m[4] * sin + m[5] * cos + e5
|
||||
};
|
||||
m = r1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void Scale(float scaleX, float scaleY)
|
||||
{
|
||||
Scale(scaleX, scaleY, MatrixOrder.Prepend);
|
||||
}
|
||||
|
||||
public void Scale(float scaleX, float scaleY, MatrixOrder order)
|
||||
{
|
||||
switch (order)
|
||||
{
|
||||
case MatrixOrder.Prepend:
|
||||
// this = scale * this
|
||||
m[0] *= scaleX; m[1] *= scaleX;
|
||||
m[2] *= scaleY; m[3] *= scaleY;
|
||||
break;
|
||||
case MatrixOrder.Append:
|
||||
// this = this * scale
|
||||
m[0] *= scaleX; m[1] *= scaleY;
|
||||
m[2] *= scaleX; m[3] *= scaleY;
|
||||
m[4] *= scaleX; m[5] *= scaleY;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void Shear(float shearX, float shearY)
|
||||
{
|
||||
Shear(shearX, shearY, MatrixOrder.Prepend);
|
||||
}
|
||||
|
||||
// LAMESPEC: quote from beta 2 sdk docs: "[To be supplied!]"
|
||||
//
|
||||
// assuming transformation matrix:
|
||||
//
|
||||
// (1 shearY 0)
|
||||
// (shearX 1 0)
|
||||
// (0 0 1)
|
||||
//
|
||||
public void Shear(float shearX, float shearY, MatrixOrder order)
|
||||
{
|
||||
switch (order)
|
||||
{
|
||||
case MatrixOrder.Prepend:
|
||||
// this = shear * this
|
||||
float[] r0 =
|
||||
{
|
||||
m[0] + shearY * m[2],
|
||||
m[1] + shearY * m[3],
|
||||
shearX * m[0] + m[2],
|
||||
shearX * m[1] + m[3],
|
||||
m[4],
|
||||
m[5]
|
||||
};
|
||||
m = r0;
|
||||
break;
|
||||
case MatrixOrder.Append:
|
||||
// this = this * shear
|
||||
float[] r1 =
|
||||
{
|
||||
m[0] + m[1] * shearX,
|
||||
m[0] * shearY + m[1],
|
||||
m[2] + m[3] * shearX,
|
||||
m[2] * shearY + m[3],
|
||||
m[4] + m[5] * shearX ,
|
||||
m[4] * shearY + m[5]
|
||||
};
|
||||
m = r1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void TransformPoints(Point[] pts)
|
||||
{
|
||||
for (int i = 0; i < pts.Length; i++)
|
||||
{
|
||||
float x = (float)pts[i].X;
|
||||
float y = (float)pts[i].Y;
|
||||
pts[i].X = (int)(x * m[0] + y * m[2] + m[4]);
|
||||
pts[i].Y = (int)(x * m[1] + y * m[3] + m[5]);
|
||||
}
|
||||
}
|
||||
|
||||
public void TransformPoints(PointF[] pts)
|
||||
{
|
||||
for (int i = 0; i < pts.Length; i++)
|
||||
{
|
||||
float x = pts[i].X;
|
||||
float y = pts[i].Y;
|
||||
pts[i].X = x * m[0] + y * m[2] + m[4];
|
||||
pts[i].Y = x * m[1] + y * m[3] + m[5];
|
||||
}
|
||||
}
|
||||
|
||||
public void TransformVectors(Point[] pts)
|
||||
{
|
||||
for (int i = 0; i < pts.Length; i++)
|
||||
{
|
||||
float x = (float)pts[i].X;
|
||||
float y = (float)pts[i].Y;
|
||||
pts[i].X = (int)(x * m[0] + y * m[2]);
|
||||
pts[i].Y = (int)(x * m[1] + y * m[3]);
|
||||
}
|
||||
}
|
||||
|
||||
public void TransformVectors(PointF[] pts)
|
||||
{
|
||||
for (int i = 0; i < pts.Length; i++)
|
||||
{
|
||||
float x = pts[i].X;
|
||||
float y = pts[i].Y;
|
||||
pts[i].X = x * m[0] + y * m[2];
|
||||
pts[i].Y = x * m[1] + y * m[3];
|
||||
}
|
||||
}
|
||||
|
||||
public void Translate(float offsetX, float offsetY)
|
||||
{
|
||||
Translate(offsetX, offsetY, MatrixOrder.Prepend);
|
||||
}
|
||||
|
||||
public void Translate(float offsetX, float offsetY, MatrixOrder order)
|
||||
{
|
||||
switch (order)
|
||||
{
|
||||
case MatrixOrder.Prepend:
|
||||
// this = translation * this
|
||||
m[4] = offsetX * m[0] + offsetY * m[2] + m[4];
|
||||
m[5] = offsetX * m[1] + offsetY * m[3] + m[5];
|
||||
break;
|
||||
case MatrixOrder.Append:
|
||||
// this = this * translation
|
||||
m[4] += offsetX;
|
||||
m[5] += offsetY;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// LAMESPEC: quote from beta 2 sdk docs: "[To be supplied!]"
|
||||
public void VectorTransformPoints(Point[] pts)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// some simple test (TODO: remove)
|
||||
/*
|
||||
public static void Main()
|
||||
{
|
||||
PointF[] p = {new PointF(1.0f, 2.0f)};
|
||||
Console.WriteLine("(" + p[0].X + " " + p[0].Y + ")");
|
||||
Matrix m = new Matrix();
|
||||
|
||||
m.Translate(1.0f, 1.0f);
|
||||
m.Scale(2.0f, 2.0f);
|
||||
m.Rotate(180.0f);
|
||||
|
||||
m.TransformPoints(p);
|
||||
Console.WriteLine("(" + p[0].X + " " + p[0].Y + ")");
|
||||
m.Invert();
|
||||
m.TransformPoints(p);
|
||||
Console.WriteLine("(" + p[0].X + " " + p[0].Y + ")");
|
||||
|
||||
Matrix a = new Matrix(1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f);
|
||||
Matrix b = new Matrix(2.0f, 0.0f, 0.0f, 2.0f, 0.0f, 0.0f);
|
||||
|
||||
Console.WriteLine("h(a) = " + a.GetHashCode());
|
||||
Console.WriteLine("h(b) = " + b.GetHashCode());
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
Enums.cs
|
||||
Matrix.cs
|
||||
Whitespace-only changes.
Whitespace-only changes.
@@ -1,8 +0,0 @@
|
||||
2001-08-17 Mike Kestner <[email protected]>
|
||||
|
||||
* PointF.cs, Size.cs, SizeF.cs : New struct implementations.
|
||||
|
||||
2001-08-16 Mike Kestner <[email protected]>
|
||||
|
||||
* Point.cs : New. Implementation of System.Drawing.Point struct.
|
||||
|
||||
@@ -1,339 +0,0 @@
|
||||
//
|
||||
// System.Drawing.Point.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Kestner ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc. http://www.ximian.com
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace System.Drawing {
|
||||
|
||||
public struct Point {
|
||||
|
||||
// Private x and y coordinate fields.
|
||||
int cx, cy;
|
||||
|
||||
// -----------------------
|
||||
// Public Shared Members
|
||||
// -----------------------
|
||||
|
||||
/// <summary>
|
||||
/// Empty Shared Field
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// An uninitialized Point Structure.
|
||||
/// </remarks>
|
||||
|
||||
public static readonly Point Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Ceiling Shared Method
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Produces a Point structure from a PointF structure by
|
||||
/// taking the ceiling of the X and Y properties.
|
||||
/// </remarks>
|
||||
|
||||
public static Point Ceiling (PointF value)
|
||||
{
|
||||
int x, y;
|
||||
checked {
|
||||
x = (int) Math.Ceiling (value.X);
|
||||
y = (int) Math.Ceiling (value.Y);
|
||||
}
|
||||
|
||||
return new Point (x, y);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Round Shared Method
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Produces a Point structure from a PointF structure by
|
||||
/// rounding the X and Y properties.
|
||||
/// </remarks>
|
||||
|
||||
public static Point Round (PointF value)
|
||||
{
|
||||
int x, y;
|
||||
checked {
|
||||
x = (int) Math.Round (value.X);
|
||||
y = (int) Math.Round (value.Y);
|
||||
}
|
||||
|
||||
return new Point (x, y);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Truncate Shared Method
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Produces a Point structure from a PointF structure by
|
||||
/// truncating the X and Y properties.
|
||||
/// </remarks>
|
||||
|
||||
// LAMESPEC: Should this be floor, or a pure cast to int?
|
||||
|
||||
public static Point Truncate (PointF value)
|
||||
{
|
||||
int x, y;
|
||||
checked {
|
||||
x = (int) value.X;
|
||||
y = (int) value.Y;
|
||||
}
|
||||
|
||||
return new Point (x, y);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Addition Operator
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Translates a Point using the Width and Height
|
||||
/// properties of the given <typeref>Size</typeref>.
|
||||
/// </remarks>
|
||||
|
||||
public static Point operator + (Point pt, Size sz)
|
||||
{
|
||||
return new Point (pt.X + sz.Width, pt.Y + sz.Height);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Equality Operator
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Compares two Point objects. The return value is
|
||||
/// based on the equivalence of the X and Y properties
|
||||
/// of the two points.
|
||||
/// </remarks>
|
||||
|
||||
public static bool operator == (Point pt_a, Point pt_b)
|
||||
{
|
||||
return ((pt_a.X == pt_b.X) && (pt_a.Y == pt_b.Y));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Inequality Operator
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Compares two Point objects. The return value is
|
||||
/// based on the equivalence of the X and Y properties
|
||||
/// of the two points.
|
||||
/// </remarks>
|
||||
|
||||
public static bool operator != (Point pt_a, Point pt_b)
|
||||
{
|
||||
return ((pt_a.X != pt_b.X) || (pt_a.Y != pt_b.Y));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Subtraction Operator
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Translates a Point using the negation of the Width
|
||||
/// and Height properties of the given Size.
|
||||
/// </remarks>
|
||||
|
||||
public static Point operator - (Point pt, Size sz)
|
||||
{
|
||||
return new Point (pt.X - sz.Width, pt.Y - sz.Height);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Point to Size Conversion
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Returns a Size based on the Coordinates of a given
|
||||
/// Point. Requires explicit cast.
|
||||
/// </remarks>
|
||||
|
||||
public static explicit operator Size (Point pt)
|
||||
{
|
||||
return new Size (pt.X, pt.Y);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Point to PointF Conversion
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Creates a PointF based on the coordinates of a given
|
||||
/// Point. No explicit cast is required.
|
||||
/// </remarks>
|
||||
|
||||
public static implicit operator PointF (Point pt)
|
||||
{
|
||||
return new PointF (pt.X, pt.Y);
|
||||
}
|
||||
|
||||
|
||||
// -----------------------
|
||||
// Public Constructors
|
||||
// -----------------------
|
||||
|
||||
/// <summary>
|
||||
/// Point Constructor
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Creates a Point from an integer which holds the X
|
||||
/// coordinate in the high order 16 bits and the Y
|
||||
/// coordinate in the low order 16 bits.
|
||||
/// </remarks>
|
||||
|
||||
public Point (int dw)
|
||||
{
|
||||
cx = dw >> 16;
|
||||
cy = dw & 0xffff;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Point Constructor
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Creates a Point from a Size value.
|
||||
/// </remarks>
|
||||
|
||||
public Point (Size sz)
|
||||
{
|
||||
cx = sz.Width;
|
||||
cy = sz.Height;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Point Constructor
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Creates a Point from a specified x,y coordinate pair.
|
||||
/// </remarks>
|
||||
|
||||
public Point (int x, int y)
|
||||
{
|
||||
cx = x;
|
||||
cy = y;
|
||||
}
|
||||
|
||||
// -----------------------
|
||||
// Public Instance Members
|
||||
// -----------------------
|
||||
|
||||
/// <summary>
|
||||
/// IsEmpty Property
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Indicates if both X and Y are zero.
|
||||
/// </remarks>
|
||||
|
||||
public bool IsEmpty {
|
||||
get {
|
||||
return ((cx == 0) && (cy == 0));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// X Property
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// The X coordinate of the Point.
|
||||
/// </remarks>
|
||||
|
||||
public int X {
|
||||
get {
|
||||
return cx;
|
||||
}
|
||||
set {
|
||||
cx = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Y Property
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// The Y coordinate of the Point.
|
||||
/// </remarks>
|
||||
|
||||
public int Y {
|
||||
get {
|
||||
return cy;
|
||||
}
|
||||
set {
|
||||
cy = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Equals Method
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Checks equivalence of this Point and another object.
|
||||
/// </remarks>
|
||||
|
||||
public override bool Equals (object o)
|
||||
{
|
||||
if (!(o is Point))
|
||||
return false;
|
||||
|
||||
return (this == (Point) o);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// GetHashCode Method
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Calculates a hashing value.
|
||||
/// </remarks>
|
||||
|
||||
public override int GetHashCode ()
|
||||
{
|
||||
return cx^cy;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Offset Method
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Moves the Point a specified distance.
|
||||
/// </remarks>
|
||||
|
||||
public void Offset (int dx, int dy)
|
||||
{
|
||||
cx += dx;
|
||||
cy += dy;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ToString Method
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Formats the Point as a string in coordinate notation.
|
||||
/// </remarks>
|
||||
|
||||
public override string ToString ()
|
||||
{
|
||||
return String.Format ("[{0},{1}]", cx, cy);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,204 +0,0 @@
|
||||
//
|
||||
// System.Drawing.PointF.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Kestner ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc. http://www.ximian.com
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace System.Drawing {
|
||||
|
||||
public struct PointF {
|
||||
|
||||
// Private x and y coordinate fields.
|
||||
float cx, cy;
|
||||
|
||||
// -----------------------
|
||||
// Public Shared Members
|
||||
// -----------------------
|
||||
|
||||
/// <summary>
|
||||
/// Empty Shared Field
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// An uninitialized PointF Structure.
|
||||
/// </remarks>
|
||||
|
||||
public static readonly PointF Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Addition Operator
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Translates a PointF using the Width and Height
|
||||
/// properties of the given Size.
|
||||
/// </remarks>
|
||||
|
||||
public static PointF operator + (PointF pt, Size sz)
|
||||
{
|
||||
return new PointF (pt.X + sz.Width, pt.Y + sz.Height);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Equality Operator
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Compares two PointF objects. The return value is
|
||||
/// based on the equivalence of the X and Y properties
|
||||
/// of the two points.
|
||||
/// </remarks>
|
||||
|
||||
public static bool operator == (PointF pt_a, PointF pt_b)
|
||||
{
|
||||
return ((pt_a.X == pt_b.X) && (pt_a.Y == pt_b.Y));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Inequality Operator
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Compares two PointF objects. The return value is
|
||||
/// based on the equivalence of the X and Y properties
|
||||
/// of the two points.
|
||||
/// </remarks>
|
||||
|
||||
public static bool operator != (PointF pt_a, PointF pt_b)
|
||||
{
|
||||
return ((pt_a.X != pt_b.X) || (pt_a.Y != pt_b.Y));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Subtraction Operator
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Translates a PointF using the negation of the Width
|
||||
/// and Height properties of the given Size.
|
||||
/// </remarks>
|
||||
|
||||
public static PointF operator - (PointF pt, Size sz)
|
||||
{
|
||||
return new PointF (pt.X - sz.Width, pt.Y - sz.Height);
|
||||
}
|
||||
|
||||
// -----------------------
|
||||
// Public Constructor
|
||||
// -----------------------
|
||||
|
||||
/// <summary>
|
||||
/// PointF Constructor
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Creates a PointF from a specified x,y coordinate pair.
|
||||
/// </remarks>
|
||||
|
||||
public PointF (float x, float y)
|
||||
{
|
||||
cx = x;
|
||||
cy = y;
|
||||
}
|
||||
|
||||
// -----------------------
|
||||
// Public Instance Members
|
||||
// -----------------------
|
||||
|
||||
/// <summary>
|
||||
/// IsEmpty Property
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Indicates if both X and Y are zero.
|
||||
/// </remarks>
|
||||
|
||||
public bool IsEmpty {
|
||||
get {
|
||||
return ((cx == 0.0) && (cy == 0.0));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// X Property
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// The X coordinate of the PointF.
|
||||
/// </remarks>
|
||||
|
||||
public float X {
|
||||
get {
|
||||
return cx;
|
||||
}
|
||||
set {
|
||||
cx = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Y Property
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// The Y coordinate of the PointF.
|
||||
/// </remarks>
|
||||
|
||||
public float Y {
|
||||
get {
|
||||
return cy;
|
||||
}
|
||||
set {
|
||||
cy = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Equals Method
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Checks equivalence of this PointF and another object.
|
||||
/// </remarks>
|
||||
|
||||
public override bool Equals (object o)
|
||||
{
|
||||
if (!(o is PointF))
|
||||
return false;
|
||||
|
||||
return (this == (PointF) o);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// GetHashCode Method
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Calculates a hashing value.
|
||||
/// </remarks>
|
||||
|
||||
public override int GetHashCode ()
|
||||
{
|
||||
return (int) cx ^ (int) cy;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ToString Method
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Formats the PointF as a string in coordinate notation.
|
||||
/// </remarks>
|
||||
|
||||
public override string ToString ()
|
||||
{
|
||||
return String.Format ("[{0},{1}]", cx, cy);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,309 +0,0 @@
|
||||
//
|
||||
// System.Drawing.Size.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Kestner ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc. http://www.ximian.com
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace System.Drawing {
|
||||
|
||||
public struct Size {
|
||||
|
||||
// Private height and width fields.
|
||||
int wd, ht;
|
||||
|
||||
// -----------------------
|
||||
// Public Shared Members
|
||||
// -----------------------
|
||||
|
||||
/// <summary>
|
||||
/// Empty Shared Field
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// An uninitialized Size Structure.
|
||||
/// </remarks>
|
||||
|
||||
public static readonly Size Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Ceiling Shared Method
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Produces a Size structure from a SizeF structure by
|
||||
/// taking the ceiling of the Width and Height properties.
|
||||
/// </remarks>
|
||||
|
||||
public static Size Ceiling (SizeF value)
|
||||
{
|
||||
int w, h;
|
||||
checked {
|
||||
w = (int) Math.Ceiling (value.Width);
|
||||
h = (int) Math.Ceiling (value.Height);
|
||||
}
|
||||
|
||||
return new Size (w, h);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Round Shared Method
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Produces a Size structure from a SizeF structure by
|
||||
/// rounding the Width and Height properties.
|
||||
/// </remarks>
|
||||
|
||||
public static Size Round (SizeF value)
|
||||
{
|
||||
int w, h;
|
||||
checked {
|
||||
w = (int) Math.Round (value.Width);
|
||||
h = (int) Math.Round (value.Height);
|
||||
}
|
||||
|
||||
return new Size (w, h);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Truncate Shared Method
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Produces a Size structure from a SizeF structure by
|
||||
/// truncating the Width and Height properties.
|
||||
/// </remarks>
|
||||
|
||||
public static Size Truncate (SizeF value)
|
||||
{
|
||||
int w, h;
|
||||
checked {
|
||||
w = (int) value.Width;
|
||||
h = (int) value.Height;
|
||||
}
|
||||
|
||||
return new Size (w, h);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Addition Operator
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Addition of two Size structures.
|
||||
/// </remarks>
|
||||
|
||||
public static Size operator + (Size sz1, Size sz2)
|
||||
{
|
||||
return new Size (sz1.Width + sz2.Width,
|
||||
sz1.Height + sz2.Height);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Equality Operator
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Compares two Size objects. The return value is
|
||||
/// based on the equivalence of the Width and Height
|
||||
/// properties of the two Sizes.
|
||||
/// </remarks>
|
||||
|
||||
public static bool operator == (Size sz_a, Size sz_b)
|
||||
{
|
||||
return ((sz_a.Width == sz_b.Width) &&
|
||||
(sz_a.Height == sz_b.Height));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Inequality Operator
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Compares two Size objects. The return value is
|
||||
/// based on the equivalence of the Width and Height
|
||||
/// properties of the two Sizes.
|
||||
/// </remarks>
|
||||
|
||||
public static bool operator != (Size sz_a, Size sz_b)
|
||||
{
|
||||
return ((sz_a.Width != sz_b.Width) ||
|
||||
(sz_a.Height != sz_b.Height));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Subtraction Operator
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Subtracts two Size structures.
|
||||
/// </remarks>
|
||||
|
||||
public static Size operator - (Size sz1, Size sz2)
|
||||
{
|
||||
return new Size (sz1.Width - sz2.Width,
|
||||
sz1.Height - sz2.Height);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Size to Point Conversion
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Returns a Point based on the dimensions of a given
|
||||
/// Size. Requires explicit cast.
|
||||
/// </remarks>
|
||||
|
||||
public static explicit operator Point (Size sz)
|
||||
{
|
||||
return new Point (sz.Width, sz.Height);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Size to SizeF Conversion
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Creates a SizeF based on the dimensions of a given
|
||||
/// Size. No explicit cast is required.
|
||||
/// </remarks>
|
||||
|
||||
public static implicit operator SizeF (Size sz)
|
||||
{
|
||||
return new SizeF (sz.Width, sz.Height);
|
||||
}
|
||||
|
||||
|
||||
// -----------------------
|
||||
// Public Constructors
|
||||
// -----------------------
|
||||
|
||||
/// <summary>
|
||||
/// Size Constructor
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Creates a Size from a Point value.
|
||||
/// </remarks>
|
||||
|
||||
public Size (Point pt)
|
||||
{
|
||||
wd = pt.X;
|
||||
ht = pt.Y;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Size Constructor
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Creates a Size from specified dimensions.
|
||||
/// </remarks>
|
||||
|
||||
public Size (int width, int height)
|
||||
{
|
||||
wd = width;
|
||||
ht = height;
|
||||
}
|
||||
|
||||
// -----------------------
|
||||
// Public Instance Members
|
||||
// -----------------------
|
||||
|
||||
/// <summary>
|
||||
/// IsEmpty Property
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Indicates if both Width and Height are zero.
|
||||
/// </remarks>
|
||||
|
||||
public bool IsEmpty {
|
||||
get {
|
||||
return ((wd == 0) && (ht == 0));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Width Property
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// The Width coordinate of the Size.
|
||||
/// </remarks>
|
||||
|
||||
public int Width {
|
||||
get {
|
||||
return wd;
|
||||
}
|
||||
set {
|
||||
wd = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Height Property
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// The Height coordinate of the Size.
|
||||
/// </remarks>
|
||||
|
||||
public int Height {
|
||||
get {
|
||||
return ht;
|
||||
}
|
||||
set {
|
||||
ht = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Equals Method
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Checks equivalence of this Size and another object.
|
||||
/// </remarks>
|
||||
|
||||
public override bool Equals (object o)
|
||||
{
|
||||
if (!(o is Size))
|
||||
return false;
|
||||
|
||||
return (this == (Size) o);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// GetHashCode Method
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Calculates a hashing value.
|
||||
/// </remarks>
|
||||
|
||||
public override int GetHashCode ()
|
||||
{
|
||||
return wd^ht;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ToString Method
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Formats the Size as a string in coordinate notation.
|
||||
/// </remarks>
|
||||
|
||||
public override string ToString ()
|
||||
{
|
||||
return String.Format ("[{0},{1}]", wd, ht);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,249 +0,0 @@
|
||||
//
|
||||
// System.Drawing.SizeF.cs
|
||||
//
|
||||
// Author:
|
||||
// Mike Kestner ([email protected])
|
||||
//
|
||||
// (C) Ximian, Inc. http://www.ximian.com
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace System.Drawing {
|
||||
|
||||
public struct SizeF {
|
||||
|
||||
// Private height and width fields.
|
||||
float wd, ht;
|
||||
|
||||
// -----------------------
|
||||
// Public Shared Members
|
||||
// -----------------------
|
||||
|
||||
/// <summary>
|
||||
/// Empty Shared Field
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// An uninitialized SizeF Structure.
|
||||
/// </remarks>
|
||||
|
||||
public static readonly SizeF Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Addition Operator
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Addition of two SizeF structures.
|
||||
/// </remarks>
|
||||
|
||||
public static SizeF operator + (SizeF sz1, SizeF sz2)
|
||||
{
|
||||
return new SizeF (sz1.Width + sz2.Width,
|
||||
sz1.Height + sz2.Height);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Equality Operator
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Compares two SizeF objects. The return value is
|
||||
/// based on the equivalence of the Width and Height
|
||||
/// properties of the two Sizes.
|
||||
/// </remarks>
|
||||
|
||||
public static bool operator == (SizeF sz_a, SizeF sz_b)
|
||||
{
|
||||
return ((sz_a.Width == sz_b.Width) &&
|
||||
(sz_a.Height == sz_b.Height));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Inequality Operator
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Compares two SizeF objects. The return value is
|
||||
/// based on the equivalence of the Width and Height
|
||||
/// properties of the two Sizes.
|
||||
/// </remarks>
|
||||
|
||||
public static bool operator != (SizeF sz_a, SizeF sz_b)
|
||||
{
|
||||
return ((sz_a.Width != sz_b.Width) ||
|
||||
(sz_a.Height != sz_b.Height));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Subtraction Operator
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Subtracts two SizeF structures.
|
||||
/// </remarks>
|
||||
|
||||
public static SizeF operator - (SizeF sz1, SizeF sz2)
|
||||
{
|
||||
return new SizeF (sz1.Width - sz2.Width,
|
||||
sz1.Height - sz2.Height);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// SizeF to PointF Conversion
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Returns a PointF based on the dimensions of a given
|
||||
/// SizeF. Requires explicit cast.
|
||||
/// </remarks>
|
||||
|
||||
public static explicit operator PointF (SizeF sz)
|
||||
{
|
||||
return new PointF (sz.Width, sz.Height);
|
||||
}
|
||||
|
||||
|
||||
// -----------------------
|
||||
// Public Constructors
|
||||
// -----------------------
|
||||
|
||||
/// <summary>
|
||||
/// SizeF Constructor
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Creates a SizeF from a PointF value.
|
||||
/// </remarks>
|
||||
|
||||
public SizeF (PointF pt)
|
||||
{
|
||||
wd = pt.X;
|
||||
ht = pt.Y;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// SizeF Constructor
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Creates a SizeF from an existing SizeF value.
|
||||
/// </remarks>
|
||||
|
||||
public SizeF (SizeF sz)
|
||||
{
|
||||
wd = sz.Width;
|
||||
ht = sz.Height;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// SizeF Constructor
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Creates a SizeF from specified dimensions.
|
||||
/// </remarks>
|
||||
|
||||
public SizeF (float width, float height)
|
||||
{
|
||||
wd = width;
|
||||
ht = height;
|
||||
}
|
||||
|
||||
// -----------------------
|
||||
// Public Instance Members
|
||||
// -----------------------
|
||||
|
||||
/// <summary>
|
||||
/// IsEmpty Property
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Indicates if both Width and Height are zero.
|
||||
/// </remarks>
|
||||
|
||||
public bool IsEmpty {
|
||||
get {
|
||||
return ((wd == 0.0) && (ht == 0.0));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Width Property
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// The Width coordinate of the SizeF.
|
||||
/// </remarks>
|
||||
|
||||
public float Width {
|
||||
get {
|
||||
return wd;
|
||||
}
|
||||
set {
|
||||
wd = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Height Property
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// The Height coordinate of the SizeF.
|
||||
/// </remarks>
|
||||
|
||||
public float Height {
|
||||
get {
|
||||
return ht;
|
||||
}
|
||||
set {
|
||||
ht = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Equals Method
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Checks equivalence of this SizeF and another object.
|
||||
/// </remarks>
|
||||
|
||||
public override bool Equals (object o)
|
||||
{
|
||||
if (!(o is SizeF))
|
||||
return false;
|
||||
|
||||
return (this == (SizeF) o);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// GetHashCode Method
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Calculates a hashing value.
|
||||
/// </remarks>
|
||||
|
||||
public override int GetHashCode ()
|
||||
{
|
||||
return (int) wd ^ (int) ht;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ToString Method
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Formats the SizeF as a string in coordinate notation.
|
||||
/// </remarks>
|
||||
|
||||
public override string ToString ()
|
||||
{
|
||||
return String.Format ("[{0},{1}]", wd, ht);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,4 @@
|
||||
all: windows
|
||||
|
||||
windows:
|
||||
$(CSC) /target:library /out:System.Drawing.dll /nowarn:1595 /recurse:*.cs
|
||||
|
||||
clean:
|
||||
if test -e System.Drawing.dll; then \
|
||||
rm System.Drawing.dll; \
|
||||
fi; \
|
||||
$(csc) /target:library /out:System.Drawing.dll /nowarn:1595 /recurse:*.cs
|
||||
@@ -1,16 +1,3 @@
|
||||
2001-08-22 Bob Smith <[email protected]>
|
||||
|
||||
* Added directory: System.Web.UI.HtmlControls
|
||||
* Added directory: Test
|
||||
|
||||
2001-08-17 Bob Smith <[email protected]>
|
||||
|
||||
* Added directory: System.Web.UI
|
||||
|
||||
2001-08-09 Bob Smith <[email protected]>
|
||||
|
||||
* Added directory: System.Web
|
||||
|
||||
2001-07-20 Patrik Torstensson ([email protected])
|
||||
|
||||
* Added directory: System.Web.Caching
|
||||
@@ -1,19 +0,0 @@
|
||||
/* System.Web.Configuration
|
||||
* Authors:
|
||||
* Leen Toelen ([email protected])
|
||||
* Copyright (C) 2001 Leen Toelen
|
||||
*/
|
||||
|
||||
namespace System.Web.Configuration {
|
||||
|
||||
/// <summary>
|
||||
/// Defines the AuthenticationMode for a Web Application.
|
||||
/// </summary>
|
||||
public enum AuthenticationMode{
|
||||
Forms,
|
||||
None,
|
||||
Passport,
|
||||
Windows
|
||||
}
|
||||
|
||||
} //namespace System.Web.Configuration
|
||||
@@ -1,44 +0,0 @@
|
||||
/* System.Web.Configuration
|
||||
* Authors:
|
||||
* Leen Toelen ([email protected])
|
||||
* Copyright (C) 2001 Leen Toelen
|
||||
*/
|
||||
using System;
|
||||
using System.Configuration;
|
||||
|
||||
namespace System.Web.Configuration
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for ClientTargetSectionHandler.
|
||||
/// </summary>
|
||||
public class ClientTargetSectionHandler: NameValueSectionHandler
|
||||
{
|
||||
/// <summary>
|
||||
/// ClientTargetSectionHandler Constructor
|
||||
/// </summary>
|
||||
public ClientTargetSectionHandler(){}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name of the key in the key-value pair.
|
||||
/// </summary>
|
||||
protected override string KeyAttributeName
|
||||
{
|
||||
get
|
||||
{
|
||||
return "alias";
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the value for the key in the key-value pair.
|
||||
/// </summary>
|
||||
protected override string ValueAttributeName
|
||||
{
|
||||
get
|
||||
{
|
||||
return "userAgent";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
} //namespace System.Web.Configuration
|
||||
@@ -1,18 +0,0 @@
|
||||
/* System.Web.Configuration
|
||||
* Authors:
|
||||
* Leen Toelen ([email protected])
|
||||
* Copyright (C) 2001 Leen Toelen
|
||||
*/
|
||||
|
||||
namespace System.Web.Configuration {
|
||||
|
||||
/// <summary>
|
||||
/// Defines the password encryption format.
|
||||
/// </summary>
|
||||
public enum FormsAuthPasswordFormat{
|
||||
Clear,
|
||||
MD5,
|
||||
SHA1
|
||||
}
|
||||
|
||||
} //namespace System.Web.Configuration
|
||||
@@ -1,19 +0,0 @@
|
||||
/* System.Web.Configuration
|
||||
* Authors:
|
||||
* Leen Toelen ([email protected])
|
||||
* Copyright (C) 2001 Leen Toelen
|
||||
*/
|
||||
|
||||
namespace System.Web.Configuration {
|
||||
|
||||
/// <summary>
|
||||
/// Defines the method used for securing web forms.
|
||||
/// </summary>
|
||||
public enum FormsProtectionEnum{
|
||||
All,
|
||||
Encryption,
|
||||
None,
|
||||
Validation
|
||||
}
|
||||
|
||||
} //namespace System.Web.Configuration
|
||||
@@ -1,4 +0,0 @@
|
||||
AuthenticationMode.cs
|
||||
ClientTargetSectionHandler.cs
|
||||
FormsAuthPasswordFormat.cs
|
||||
FormsProtectionEnum.cs
|
||||
Whitespace-only changes.
Whitespace-only changes.
@@ -1,19 +0,0 @@
|
||||
//
|
||||
// System.Web.Hosting.AppDomainFactory.cs
|
||||
//
|
||||
// Author:
|
||||
// Bob Smith <[email protected]>
|
||||
//
|
||||
// (C) Bob Smith
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace System.Web.Hosting
|
||||
{
|
||||
public sealed class AppDomainFactory : IAppDomainFactory
|
||||
{
|
||||
public AppDomainFactory();
|
||||
public object Create(string module, string typeName, string appId, string appPath, string strUrlOfAppOrigin, int iZone);
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
//
|
||||
// System.Web.Hosting.ApplicationHost.cs
|
||||
//
|
||||
// Author:
|
||||
// Bob Smith <[email protected]>
|
||||
//
|
||||
// (C) Bob Smith
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace System.Web.Hosting
|
||||
{
|
||||
public sealed class ApplicationHost
|
||||
public static object CreateApplicationHost(Type hostType, string virtualDir, string physicalDir);
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
2001-08-30 Bob Smith <[email protected]>
|
||||
|
||||
* AppDomainFactory.cs: Stubbed.
|
||||
* ApplicationHost.cs: Stubbed.
|
||||
* IAppDomainFactory.cs: Stubbed.
|
||||
* IISAPIRuntime.cs: Stubbed.
|
||||
* ISAPIRuntime.cs: Implemented.
|
||||
* SimpleWorkerRequest.cs: Implemented.
|
||||
@@ -1,18 +0,0 @@
|
||||
//
|
||||
// System.Web.Hosting.IAppDomainFactory.cs
|
||||
//
|
||||
// Author:
|
||||
// Bob Smith <[email protected]>
|
||||
//
|
||||
// (C) Bob Smith
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace System.Web.Hosting
|
||||
{
|
||||
public interface IAppDomainFactory
|
||||
{
|
||||
object Create(in string module, in string typeName, in string appId, in string appPath, in string strUrlOfAppOrigin, in int iZone);
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
//
|
||||
// System.Web.Hosting.IISAPIRuntime.cs
|
||||
//
|
||||
// Author:
|
||||
// Bob Smith <[email protected]>
|
||||
//
|
||||
// (C) Bob Smith
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace System.Web.Hosting
|
||||
{
|
||||
public interface IISAPIRuntime
|
||||
{
|
||||
void DoGCCollect();
|
||||
int ProcessRequest(in IntPtr ecb, in int useProcessModel);
|
||||
void StartProcessing();
|
||||
void StopProcessing();
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
//
|
||||
// System.Web.Hosting.ISAPIRuntime.cs
|
||||
//
|
||||
// Author:
|
||||
// Bob Smith <[email protected]>
|
||||
//
|
||||
// (C) Bob Smith
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace System.Web.Hosting
|
||||
{
|
||||
public sealed class ISAPIRuntime : IISAPIRuntime
|
||||
{
|
||||
public ISAPIRuntime();
|
||||
public void DoGCCollect();
|
||||
public int ProcessRequest(IntPtr ecb, int iWRType);
|
||||
public void StartProcessing();
|
||||
public void StopProcessing();
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
//
|
||||
// System.Web.Hosting.SimpleWorkerRequest.cs
|
||||
//
|
||||
// Author:
|
||||
// Bob Smith <[email protected]>
|
||||
//
|
||||
// (C) Bob Smith
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace System.Web.Hosting
|
||||
{
|
||||
public class SimpleWorkerRequest : HttpWorkerRequest
|
||||
{
|
||||
public SimpleWorkerRequest(string page, string query, TextWriter output);
|
||||
public SimpleWorkerRequest(string appVirtualDir, string appPhysicalDir, string page, string query, TextWriter output);
|
||||
public override string MachineConfigPath {get;}
|
||||
public override void EndOfRequest();
|
||||
public override void FlushResponse(bool finalFlush);
|
||||
public override string GetAppPath();
|
||||
public override string GetAppPathTranslated();
|
||||
public override string GetFilePath();
|
||||
public override string GetFilePathTranslated();
|
||||
public override string GetHttpVerbName();
|
||||
public override string GetHttpVersion();
|
||||
public override string GetLocalAddress();
|
||||
public override int GetLocalPort();
|
||||
public override string GetPathInfo();
|
||||
public override string GetQueryString();
|
||||
public override string GetRawUrl();
|
||||
public override string GetRemoteAddress();
|
||||
public override int GetRemotePort();
|
||||
public override string GetServerVariable(string name);
|
||||
public override string GetUriPath();
|
||||
public override IntPtr GetUserToken();
|
||||
public override string MapPath(string path);
|
||||
public override void SendKnownResponseHeader(int index, string value);
|
||||
public override void SendResponseFromFile(IntPtr handle, long offset, long length);
|
||||
public override void SendResponseFromFile(string filename, long offset, long length);
|
||||
public override void SendResponseFromMemory(byte[] data, int length);
|
||||
public virtual void SendResponseFromMemory(IntPtr data, int length);
|
||||
public override void SendStatus(int statusCode, string statusDescription);
|
||||
public override void SendUnknownResponseHeader(string name, string value);
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
2001-09-03 Leen Toelen <[email protected]>
|
||||
|
||||
* HtmlAnchor.cs: Initial implementation.
|
||||
* HtmlTextArea.cs: Initial implementation.
|
||||
|
||||
2001-08-22 Bob Smith <[email protected]>
|
||||
|
||||
* HtmlContainerControl.cs: Initial implementation.
|
||||
* HtmlControl.cs: Initial implementation.
|
||||
* HtmlGenericControl.cs: Initial implementation.
|
||||
@@ -1,107 +0,0 @@
|
||||
/* System.Web.Configuration
|
||||
* Authors:
|
||||
* Leen Toelen ([email protected])
|
||||
* Copyright (C) 2001 Leen Toelen
|
||||
*/
|
||||
using System;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
|
||||
namespace System.Web.UI.HtmlControls{
|
||||
|
||||
public class HtmlAnchor : HtmlContainerControl, IPostBackDataHandler{
|
||||
|
||||
private static object EventServerClick = new Object();
|
||||
|
||||
public HtmlAnchor(): base("a"){}
|
||||
|
||||
protected virtual void OnServerClick(EventArgs e){
|
||||
EventHandler handler;
|
||||
handler = (EventHandler) Events[EventServerClick];
|
||||
if(handler != null){
|
||||
handler.Invoke(this, e);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void RenderAttributes(HtmlTextWriter writer){
|
||||
if ((EventHandler) Events[EventServerClick] != null){
|
||||
Attributes.Remove("href");
|
||||
RenderAttributes(writer);
|
||||
writer.WriteAttribute(Page.GetPostBackClientHyperlink(this,""),"href");
|
||||
}
|
||||
else{
|
||||
PreProcessRelativeReferenceAttribute(writer,"href");
|
||||
RenderAttributes(writer);
|
||||
}
|
||||
}
|
||||
|
||||
//FIXME: not sure about the accessor
|
||||
public void RaisePostBackEvent(string eventArgument){
|
||||
OnServerClick(EventArgs.Empty);
|
||||
}
|
||||
|
||||
public event EventHandler ServerClick{
|
||||
add{
|
||||
Events.AddHandler(EventServerClick, value);
|
||||
}
|
||||
remove{
|
||||
Events.RemoveHandler(EventServerClick, value);
|
||||
}
|
||||
}
|
||||
|
||||
public int HRef{
|
||||
get{
|
||||
string attr = Attributes["href"];
|
||||
if (attr != null){
|
||||
return attr;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
set{
|
||||
//MapIntegerAttributeToString(value) accessible constraint is "assembly"
|
||||
Attributes["href"] = MapIntegerAttributeToString(value);
|
||||
}
|
||||
}
|
||||
|
||||
public string Name{
|
||||
get{
|
||||
string attr = Attributes["name"];
|
||||
if (attr != null){
|
||||
return attr;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
set{
|
||||
Attributes["name"] = MapStringAttributeToString(value);
|
||||
}
|
||||
}
|
||||
|
||||
public string Target{
|
||||
get{
|
||||
string attr = Attributes["target"];
|
||||
if (attr != null){
|
||||
return attr;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
set{
|
||||
Attributes["target"] = MapStringAttributeToString(value);
|
||||
}
|
||||
}
|
||||
|
||||
public string Title{
|
||||
get{
|
||||
string attr = Attributes["title"];
|
||||
if (attr != null){
|
||||
return attr;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
set{
|
||||
Attributes["title"] = MapStringAttributeToString(value);
|
||||
}
|
||||
}
|
||||
|
||||
} // class HtmlAnchor
|
||||
} // namespace System.Web.UI.HtmlControls
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
/* System.Web.Configuration
|
||||
* Authors:
|
||||
* Leen Toelen ([email protected])
|
||||
* Copyright (C) 2001 Leen Toelen
|
||||
*/
|
||||
using System;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
|
||||
namespace System.Web.UI.HtmlControls{
|
||||
|
||||
public class HtmlButton : HtmlContainerControl, IPostBackDataHandler{
|
||||
|
||||
private static object EventServerClick = new Object();
|
||||
|
||||
public HtmlButton(): base("button"){}
|
||||
|
||||
protected virtual void OnServerClick(EventArgs e){
|
||||
EventHandler handler;
|
||||
handler = (EventHandler) Events[EventServerClick];
|
||||
if(handler != null){
|
||||
handler.Invoke(this, e);
|
||||
}
|
||||
}
|
||||
|
||||
//FIXME: check function
|
||||
protected override void RenderAttributes(HtmlTextWriter writer){
|
||||
if (Page != null && Events[EventServerClick] != null){
|
||||
Util.WriteOnClickAttribute(
|
||||
writer,
|
||||
this,
|
||||
false,
|
||||
true,
|
||||
CausesValidation == false? Page.Validators.Count > 0: false);
|
||||
}
|
||||
RenderAttributes(writer);
|
||||
|
||||
}
|
||||
|
||||
//FIXME: not sure about the accessor
|
||||
public void RaisePostBackEvent(string eventArgument){
|
||||
if (CausesValidation = false){
|
||||
Page.Validate();
|
||||
}
|
||||
OnServerClick(EventArgs.Empty);
|
||||
}
|
||||
|
||||
public event EventHandler ServerClick{
|
||||
add{
|
||||
Events.AddHandler(EventServerClick, value);
|
||||
}
|
||||
remove{
|
||||
Events.RemoveHandler(EventServerClick, value);
|
||||
}
|
||||
}
|
||||
|
||||
public bool CausesValidation{
|
||||
get{
|
||||
object causesVal = ViewState["CausesValidation"];
|
||||
if (causesVal != null){
|
||||
return (Boolean) causesVal;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
set{
|
||||
ViewState["CausesValidation"] = (Boolean) value;
|
||||
}
|
||||
}
|
||||
|
||||
} // class HtmlButton
|
||||
} // namespace System.Web.UI.HtmlControls
|
||||
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
//
|
||||
// System.Web.UI.HtmlControls.HtmlContainerControl.cs
|
||||
//
|
||||
// Author:
|
||||
// Bob Smith <[email protected]>
|
||||
//
|
||||
// (C) Bob Smith
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
|
||||
//LAMESPEC: The dox talk about HttpException but are very ambigious.
|
||||
//TODO: Check to see if Render really is overridden instead of a LiteralControl being added. It apears that this is the
|
||||
//case due to testing. Anything inside the block is overwritten by the content of this control, so it doesnt apear
|
||||
//to do anything with children.
|
||||
// a doc references this. add? protected override ControlCollection CreateControlCollection();
|
||||
|
||||
//TODO: If Test.InnerText = Test.InnerHtml without ever assigning anything into InnerHtml, you get this:
|
||||
// Exception Details: System.Web.HttpException: Cannot get inner content of Message because the contents are not literal.
|
||||
//[HttpException (0x80004005): Cannot get inner content of Message because the contents are not literal.]
|
||||
// System.Web.UI.HtmlControls.HtmlContainerControl.get_InnerHtml() +278
|
||||
// ASP.test3_aspx.AnchorBtn_Click(Object Source, EventArgs E) in \\genfs2\www24\bobsmith11\test3.aspx:6
|
||||
// System.Web.UI.HtmlControls.HtmlAnchor.OnServerClick(EventArgs e) +108
|
||||
// System.Web.UI.HtmlControls.HtmlAnchor.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +26
|
||||
// System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
|
||||
// System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +149
|
||||
// System.Web.UI.Page.ProcessRequestMain() +660
|
||||
|
||||
|
||||
namespace System.Web.UI.HtmlControls
|
||||
{
|
||||
public abstract class HtmlContainerControl : HtmlControl
|
||||
{
|
||||
private string _innterHtml = "";
|
||||
private string _innterText = "";
|
||||
private bool _doText = false;
|
||||
private bool _doChildren = true;
|
||||
public HtmlContainerControl() : base(); {}
|
||||
public HtmlContainerControl(string tag) : base(tag) {}
|
||||
public virtual string InnerHtml
|
||||
{
|
||||
get
|
||||
{
|
||||
return _innerHtml;
|
||||
}
|
||||
set
|
||||
{
|
||||
_innerHtml = value;
|
||||
_doText = false;
|
||||
_doChildren = false;
|
||||
}
|
||||
}
|
||||
public virtual string InnerText
|
||||
{
|
||||
get
|
||||
{
|
||||
return _innerText;
|
||||
}
|
||||
set
|
||||
{
|
||||
_innerText = value;
|
||||
_doText = true;
|
||||
_doChildren = false;
|
||||
}
|
||||
}
|
||||
public override Render(HtmlTextWriter writer)
|
||||
{
|
||||
if(_doChildren) RenderChildren(writer);
|
||||
else if(_doText) Page.Server.HtmlEncode(_innerText, writer);
|
||||
else writer.Write(_innerHtml);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loaded 100 of 746 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user