mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-18 03:51:19 -10:00
Compare commits
126
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3a24638a91 | ||
|
|
9b614b0cee | ||
|
|
1c98a14e94 | ||
|
|
be0f108da0 | ||
|
|
13b5cdf600 | ||
|
|
16f05aed1d | ||
|
|
bef83794c8 | ||
|
|
0d8874def6 | ||
|
|
7fc6d7d59d | ||
|
|
e904d2e669 | ||
|
|
134bd1a356 | ||
|
|
c99279c286 | ||
|
|
4c4489afd7 | ||
|
|
a7347925bc | ||
|
|
753b849c64 | ||
|
|
87a3e5cc91 | ||
|
|
dbd8f3fba3 | ||
|
|
7d573efc35 | ||
|
|
b717b59aa6 | ||
|
|
a05bb67043 | ||
|
|
a78aa4d06e | ||
|
|
65527b12de | ||
|
|
6f3fae0c17 | ||
|
|
8723f67783 | ||
|
|
f19fbdbf57 | ||
|
|
18af4a09c1 | ||
|
|
c9422522e9 | ||
|
|
ce8a3a0f64 | ||
|
|
90ef332cd6 | ||
|
|
4ca231c005 | ||
|
|
9cacf09b7e | ||
|
|
c844124d37 | ||
|
|
5f3cf20c99 | ||
|
|
4d1415ac0b | ||
|
|
5b9ac905de | ||
|
|
e2a54347cd | ||
|
|
7923199f14 | ||
|
|
c9b0722ff5 | ||
|
|
bbc981c763 | ||
|
|
58b09f265b | ||
|
|
16e3d27af5 | ||
|
|
97ddf06aca | ||
|
|
7bba496b84 | ||
|
|
b7b6bb8acb | ||
|
|
755c5801c1 | ||
|
|
baa7349309 | ||
|
|
a5285dcf24 | ||
|
|
c894cb6c02 | ||
|
|
5b51743061 | ||
|
|
621c73c413 | ||
|
|
bcb9869445 | ||
|
|
54efb994f5 | ||
|
|
dd9ff4ef68 | ||
|
|
2943ad1c68 | ||
|
|
ee93e49101 | ||
|
|
ca7a32387b | ||
|
|
120ca25443 | ||
|
|
b2de01dca8 | ||
|
|
82c52f966c | ||
|
|
9dc433169c | ||
|
|
7ac4448936 | ||
|
|
502f70b1e8 | ||
|
|
afb8ad5494 | ||
|
|
76d2890a78 | ||
|
|
3011d1514a | ||
|
|
25b5d7a7ff | ||
|
|
4ba499dd31 | ||
|
|
5be19b0b75 | ||
|
|
65d237b06c | ||
|
|
1377915cbe | ||
|
|
4268f0f50f | ||
|
|
b2d20162e4 | ||
|
|
d7c95a0a26 | ||
|
|
25f95f44fc | ||
|
|
71dd46fc12 | ||
|
|
473bcdddac | ||
|
|
6e15e0374e | ||
|
|
0d8c271277 | ||
|
|
3d6ecf4066 | ||
|
|
5a8951e8cf | ||
|
|
920ab84779 | ||
|
|
773162244e | ||
|
|
b9b369acf3 | ||
|
|
204210f834 | ||
|
|
5b7ac1ccdd | ||
|
|
0bf65263f7 | ||
|
|
65225b88cc | ||
|
|
3c8a3d1b06 | ||
|
|
e04016adac | ||
|
|
3be6fe1b03 | ||
|
|
b36357e896 | ||
|
|
eb6fb07489 | ||
|
|
f10919de96 | ||
|
|
a6fd721478 | ||
|
|
ee38e09230 | ||
|
|
50046bca16 | ||
|
|
96202e2729 | ||
|
|
6b52f46149 | ||
|
|
f2f2beb463 | ||
|
|
fb90b4929c | ||
|
|
3094b32e9d | ||
|
|
3de382ae0c | ||
|
|
f9a34404ea | ||
|
|
5cf1344d16 | ||
|
|
995519a513 | ||
|
|
64b3b484ac | ||
|
|
14ed085f94 | ||
|
|
fe9fb1dd93 | ||
|
|
dc79f25c40 | ||
|
|
983d92c25f | ||
|
|
4198d71a3f | ||
|
|
28074f5a04 | ||
|
|
848b7aa0f5 | ||
|
|
aceaacc0ab | ||
|
|
854d04f65c | ||
|
|
df2b2b9f32 | ||
|
|
0f10ad8249 | ||
|
|
6049b85acc | ||
|
|
2df9c2fb52 | ||
|
|
184e5b1172 | ||
|
|
3ba10d5488 | ||
|
|
0fae05ddc8 | ||
|
|
0273a2dd78 | ||
|
|
2680ce3385 | ||
|
|
8ed037b794 | ||
|
|
dc0764172a |
No files matched your search
+11
@@ -0,0 +1,11 @@
|
||||
config.h
|
||||
Makefile
|
||||
config.cache
|
||||
stamp-h.in
|
||||
config.status
|
||||
aclocal.m4
|
||||
configure
|
||||
stamp-h
|
||||
libtool
|
||||
Makefile.in
|
||||
config.log
|
||||
@@ -0,0 +1 @@
|
||||
Miguel de Icaza ([email protected])
|
||||
@@ -0,0 +1,18 @@
|
||||
Wed Jul 11 00:36:36 CEST 2001 Paolo Molaro <[email protected]>
|
||||
|
||||
* status/*: scripts and data to create statistics about the
|
||||
class library status.
|
||||
|
||||
2001-07-09 Alex Graveley <[email protected]>
|
||||
|
||||
* doc/makefile (clean): Add clean target.
|
||||
* doc/web/makefile (clean): Ditto.
|
||||
|
||||
2001-07-09 Alex Graveley <[email protected]>
|
||||
|
||||
* doc/makefile (all-docs): Fix typo.
|
||||
|
||||
2001-05-30 Miguel de Icaza <[email protected]>
|
||||
|
||||
* NEWS:
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
SUBDIRS = mono doc
|
||||
@@ -0,0 +1,13 @@
|
||||
2001-07-12 Miguel de Icaza <[email protected]>
|
||||
|
||||
New XSLT file from Sergey Chaban for CIL opcodes
|
||||
|
||||
Paolo got the beginning of an interpreter in.
|
||||
|
||||
Further work on the dissasembler.
|
||||
|
||||
Fix various parts of the metadata library
|
||||
|
||||
2001-05-30 Miguel de Icaza <[email protected]>
|
||||
|
||||
Project started
|
||||
@@ -0,0 +1,8 @@
|
||||
This is MonoNet.
|
||||
|
||||
Ximian's portable implementation of .NET
|
||||
|
||||
|
||||
----------
|
||||
|
||||
To edit the go-mono website, see doc/README.
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
libtoolize --automake
|
||||
automake -a
|
||||
autoheader
|
||||
aclocal
|
||||
autoconf
|
||||
./configure $*
|
||||
@@ -0,0 +1,37 @@
|
||||
AC_INIT(README)
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AM_INIT_AUTOMAKE(mono, 0.3)
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_STDC
|
||||
AC_PROG_INSTALL
|
||||
|
||||
# Set STDC_HEADERS
|
||||
AC_HEADER_STDC
|
||||
AM_PROG_LIBTOOL
|
||||
|
||||
dnl ***************************
|
||||
dnl *** Checks for glib 1.2 ***
|
||||
dnl ***************************
|
||||
AM_PATH_GLIB(1.2.0,,
|
||||
AC_MSG_ERROR([Cannot find GLIB: Is glib-config in path?]))
|
||||
|
||||
GLIB_CFLAGS=`glib-config --cflags glib`
|
||||
GLIB_LIBS=`glib-config --libs glib`
|
||||
|
||||
AC_SUBST(GLIB_CFLAGS)
|
||||
AC_SUBST(GLIB_LIBS)
|
||||
|
||||
CFLAGS='-g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations'
|
||||
AC_SUBST(CFLAGS)
|
||||
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
mono/Makefile
|
||||
mono/metadata/Makefile
|
||||
mono/dis/Makefile
|
||||
mono/cil/Makefile
|
||||
mono/interpreter/Makefile
|
||||
doc/Makefile
|
||||
])
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
To edit the website appearance:
|
||||
|
||||
cd doc/web
|
||||
edit template.html.in
|
||||
make
|
||||
|
||||
To edit website content:
|
||||
|
||||
cd doc (this directory)
|
||||
edit files carefully
|
||||
cd web
|
||||
make
|
||||
|
||||
To publish changes:
|
||||
|
||||
cd web
|
||||
make push
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
* MCS: The Ximian C# compiler
|
||||
|
||||
MCS began as an experiment to learn the features of C# by
|
||||
writing a large C# program. MCS is currently able to parse C#
|
||||
programs and create an internal tree representation of the
|
||||
program. MCS can parse itself.
|
||||
|
||||
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
|
||||
types in the compiler and dropped my internal Type
|
||||
representation in favor of using the CLI's System.Type.
|
||||
|
||||
** Phases of the compiler
|
||||
|
||||
The compiler has a number of phases:
|
||||
|
||||
<ul>
|
||||
* Lexical analyzer: hand-coded lexical analyzer that
|
||||
provides tokens to the parser.
|
||||
|
||||
* The Parser: the parser is implemented using Jay (A
|
||||
Berkeley Yacc port to Java, that I ported to C#).
|
||||
The parser does minimal work and syntax checking,
|
||||
and only constructs a parsed tree.
|
||||
|
||||
Each language element gets its own class. The code
|
||||
convention is to use an uppercase name for the
|
||||
language element. So a C# class and its associated
|
||||
information is kept in a "Class" class, a "struct"
|
||||
in a "Struct" class and so on. Statements derive
|
||||
from the "Statement" class, and Expressions from the
|
||||
Expr class.
|
||||
|
||||
* Parent class resolution: before the actual code
|
||||
generation, we need to resolve the parents and
|
||||
interfaces for interface, classe and struct
|
||||
definitions.
|
||||
|
||||
* Semantic analysis: since C# can not resolve in a
|
||||
top-down pass what identifiers actually mean, we
|
||||
have to postpone this decision until the above steps
|
||||
are finished.
|
||||
|
||||
* 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">
|
||||
** Current pending tasks
|
||||
|
||||
Simple tasks:
|
||||
|
||||
<ul>
|
||||
* Array declarations are currently being ignored,
|
||||
|
||||
* PInvoke declarations are not supported.
|
||||
|
||||
* Pre-processing is not supported.
|
||||
|
||||
* Attribute declarations and passing currently ignored.
|
||||
|
||||
* Compiler does not pass around line/col information from tokenizer for error reporting.
|
||||
|
||||
* 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 ([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 tasks:
|
||||
|
||||
<ul>
|
||||
* Finishing the JB port from Java to C#. If you are
|
||||
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>
|
||||
|
||||
JB will allow us to move from the Berkeley Yacc
|
||||
based Jay to a Bison-based compiler (better error
|
||||
reporting and recovery).
|
||||
</ul>
|
||||
|
||||
** Questions and Answers
|
||||
|
||||
Q: Why not write a C# front-end for GCC?
|
||||
|
||||
A: I wanted to learn about C#, and this was an exercise in this
|
||||
task. The resulting compiler is highly object-oriented, which has
|
||||
lead to a very nice, easy to follow and simple implementation of
|
||||
the compiler.
|
||||
|
||||
I found that the design of this compiler is very similar to
|
||||
Guavac's implementation.
|
||||
|
||||
Targeting the CIL/MSIL byte codes would require to re-architecting
|
||||
GCC, as GCC is mostly designed to be used for register machines.
|
||||
|
||||
The GCC Java engine that generates Java byte codes cheats: it does
|
||||
not use the GCC backend; it has a special backend just for Java, so
|
||||
you can not really generate Java bytecodes from the other languages
|
||||
supported by GCC.
|
||||
|
||||
Q: If your C# compiler is written in C#, how do you plan on getting
|
||||
this working on a non-Microsoft environment.
|
||||
|
||||
We will do this through an implementation of the CLI Virtual
|
||||
Execution System for Unix (our JIT engine).
|
||||
|
||||
Q: Do you use Bison?
|
||||
|
||||
A: No, currently I am using Jay which is a port of Berkeley Yacc to
|
||||
Java that I later ported to C#. This means that error recovery is
|
||||
not as nice as I would like to, and for some reason error
|
||||
productions are not being caught.
|
||||
|
||||
In the future I want to port one of the Bison/Java ports to C# for
|
||||
the parser.
|
||||
|
||||
Q: How do I compile it?
|
||||
|
||||
A: Compiling MCS currently requires you to run my port of <a
|
||||
href="http://primates.ximian.com/~miguel/code/jay.cs.tar.gz">Jay to
|
||||
C#</a> on a Unix system to generate the parser, and then you need
|
||||
to use Microsoft's .NET csc.exe compiler to compile the compiler.
|
||||
|
||||
You only need to compile the compiler compiler (C code), the
|
||||
samples are Java samples that I did not port, and you do not need
|
||||
them.
|
||||
|
||||
It might be simple to port Jay.cs to Windows, but I have not tried
|
||||
this.
|
||||
|
||||
You might also want to look at the <a href="faq.html#gcc">GCC</a>
|
||||
section on the main FAQ
|
||||
@@ -0,0 +1,149 @@
|
||||
* The Class Library
|
||||
|
||||
The Class Library should be compatible with Microsoft's .NET
|
||||
implementation.
|
||||
|
||||
We will write as much code as possible in C#. We may need to
|
||||
interface with code written in C to gain access to the
|
||||
functionality of
|
||||
libraries like libart, Gtk+, and libc.
|
||||
|
||||
** Layout
|
||||
|
||||
The Class Library resides in the `mcs' module in the directoy
|
||||
`class'.
|
||||
|
||||
Each directory in the directory represents the assembly where
|
||||
the code belongs to, and inside each directory we divide the
|
||||
code based on the namespace they implement.
|
||||
|
||||
There are two cases when we should consider portability: when
|
||||
we are dealing with a couple of classes only that differ from
|
||||
system to system (Consider System.Net and System.IO for Win32
|
||||
and Unix). In those cases we will just place the files for
|
||||
example on <t>corlib/System/System.IO/Unix-Console.cs</t> and
|
||||
<t>corlib/System/System.IO/Win32-Console.cs</t>.
|
||||
|
||||
For classes that might differ more (for example, the
|
||||
implementation of Windows.Forms), we might have different
|
||||
directories altogether: <t>System.Windows.Forms/Win32</t>,
|
||||
<t>System.Windows.Forms/Gtk+</t> and
|
||||
<t>System.Windows.Forms/Cocoa</t>.
|
||||
|
||||
** Using existing components from GNOME.
|
||||
|
||||
Our current plan is to implement the GUI tools on top of
|
||||
Gtk+. The only obstacle here is that applications from Windows
|
||||
might expect to be able to pull the HWND property from the
|
||||
widgets and use PInvoke to call Windows functions.
|
||||
|
||||
** Class Library and Win32 dependencies.
|
||||
|
||||
There are a few spots where the Win32 foundation is exposed to
|
||||
the class library (for example, the HDC and HWND properties in
|
||||
the GDI+). Casual inspection suggests that these can be
|
||||
safely mapped to Gdk's GC and GdkWindow pointers without
|
||||
breaking anything.
|
||||
|
||||
The only drawback is that support for PInvoke of Win32 code
|
||||
won't be available. An alternate solution would be to use
|
||||
portions of Wine, or even to use Wine as our toolkit.
|
||||
|
||||
*** Initial GDI+ and WinForms implementation
|
||||
|
||||
The initial implementation will use Gtk+ as the underlying
|
||||
toolkit. Since GTK+ has already been ported to many windowing
|
||||
systems other than X (including frame buffer, Win32, and BeOS)
|
||||
its use should cover most applications for most users.
|
||||
|
||||
*** Database access
|
||||
|
||||
We will implement ADO.NET functionality by reusing <a
|
||||
href="http://www.gnome-db.org">GNOME-DB</a>. This is an ideal
|
||||
choice, since GNOME-DB was implemented precisely to provide an
|
||||
ADO-like system for GNOME.
|
||||
|
||||
*** Component Integration
|
||||
|
||||
We will provide a new namespace to use GNOME specific features
|
||||
as well as a namespace to host Bonobo interfaces and classes
|
||||
in Mono.
|
||||
|
||||
** Licensing
|
||||
|
||||
The class library will be licensed under the terms of the GNU
|
||||
LGPL. Some people have pointed out that the plain LGPL is
|
||||
troublesome for embedded use of the Mono class libraries. So
|
||||
we are considering to use the GPL with a special exception
|
||||
(like the <a
|
||||
href="http://www.gnu.org/software/classpath/classpath.html">GNU
|
||||
Classpath</a> project did.
|
||||
|
||||
The exception to the GPL would be:
|
||||
|
||||
<i>The library is distributed under the terms of the GNU General
|
||||
Public License with the following exception:
|
||||
|
||||
If you link this library against your own program, then you do not
|
||||
need to release the source code for that program. However, any
|
||||
changes that you make to the library itself, or to any native
|
||||
methods upon which the library relies, must be re-distributed in
|
||||
accordance with the terms of the GPL.</i>
|
||||
|
||||
If you are going to contribute, please keep in mind that we
|
||||
might require you to agree that Ximian might adjust the
|
||||
license to enable the use of the class libraries on embedded
|
||||
systems or to develop proprietary applications using Mono.
|
||||
|
||||
We suggest that you assign the copyright of your work to the
|
||||
GNOME Foundation or the Free Software Foundation to simplify
|
||||
defending the code in case it is used inappropiately.
|
||||
|
||||
** Class Library testing
|
||||
|
||||
We need to write regression tests that will verify
|
||||
the correctness of the class library, compiler, and JIT
|
||||
engine.
|
||||
|
||||
** Coding conventions
|
||||
|
||||
Please follow the conventions on the ECMA specification (On
|
||||
the Annex Partition) for your coding your libraries.
|
||||
|
||||
Use 8 space tabs for writing your code (hopefully we can keep
|
||||
this consistent). If you are modifying someone else's code, try
|
||||
to keep the coding style similar.
|
||||
|
||||
For a rationale on 8 space tabs, read Linus Torvald's Coding
|
||||
Style guidelines in the Linux kernel source for a rationale.
|
||||
|
||||
*** Missing implementation bits
|
||||
|
||||
If you implement a class and you are missing implementation bits,
|
||||
please put in the code the word "TODO" and a description of what
|
||||
is missing to be implemented.
|
||||
|
||||
*** Tagging buggy code
|
||||
|
||||
If there is a bug in your implementation tag the problem by using
|
||||
the word "FIXME" in the code, together with a description of the
|
||||
problem.
|
||||
|
||||
Do not use XXX or obscure descriptions, because otherwise people
|
||||
will not be able to understand what you mean.
|
||||
|
||||
*** Tagging Lame specs
|
||||
|
||||
Sometimes the specification will be lame (consider Version.ToString (fieldCount)
|
||||
where there is no way of knowing how many fields are available, making the API
|
||||
not only stupid, but leading to unreliable code).
|
||||
|
||||
In those cases, use the keyword "LAMESPEC".
|
||||
|
||||
** Contributing
|
||||
|
||||
We welcome contributions to the the Class Library. To get
|
||||
started, check the status page for information about which
|
||||
APIs are being worked on, and how to get in touch with
|
||||
individual maintainers.
|
||||
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
* Contacting the Mono team.
|
||||
|
||||
You can contact the Mono Team by sending e-mail to `<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>
|
||||
|
||||
You can contact me (Miguel de Icaza) by sending e-mail to <a
|
||||
href="mailto:[email protected]">[email protected]</a>. My web
|
||||
page is <a
|
||||
href="http://primates.ximian.com/~miguel">http://primates.ximian.com/~miguel"</a>
|
||||
|
||||
You can also <a
|
||||
href="http://www.ximian.com/about/contact.php3">reach Ximian.</a>
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
* Contributing to the Mono project
|
||||
|
||||
There are many ways in which you can help in the Mono project:
|
||||
|
||||
<ul>
|
||||
* <b>Programmers:</b> You can work on a free
|
||||
implementation of the <a
|
||||
href="class-library.html">class libraries</a>, the
|
||||
<a href="runtime.html">runtime engine</a>, <a
|
||||
href="tools.html">the tools</a>, the <a
|
||||
href="testing.html">testing framework</a>
|
||||
|
||||
* <b>Writers:</b> You can help us with writing <a
|
||||
href="documentation.html">documentation</a>.
|
||||
</ul>
|
||||
|
||||
Those are just broad things that need to be worked on, but
|
||||
something that would help tremendously would be to help with
|
||||
small duties in the project that need to be addressed.
|
||||
|
||||
** Small tasks
|
||||
|
||||
A few smaller tasks are here, dropped in no particular order:
|
||||
<ul>
|
||||
* <b>MCS compilation process:</b> Currently MCS does
|
||||
not build with a single `make' command. This should
|
||||
be fixed (this being part of the `Joel Test' that
|
||||
software has to pass).
|
||||
|
||||
* <b>Mono/doc and web site:</b> They need to be
|
||||
packaged up in the official `distribution'
|
||||
|
||||
* <b>Enthusiasts: </b>
|
||||
</ul>
|
||||
|
||||
* Special note
|
||||
|
||||
If you have looked at Microsoft's implementation of .NET or
|
||||
their shared source code, you may not be able to contribute
|
||||
to Mono. Details will follow when we know more about this.
|
||||
|
||||
In general be careful when you are implementing free software
|
||||
and you have access to proprietary code. We need to make sure
|
||||
that we are not using someone else's copyrighted code
|
||||
accidentally.
|
||||
|
||||
Please do not use the <b>ildasm</b> program to disassemble
|
||||
proprietary code when you are planning to reimplement a class
|
||||
for Mono. If you have done this, we might not be able to use
|
||||
your code.
|
||||
|
||||
Please stick to published documentation for implementing any
|
||||
classes.
|
||||
@@ -0,0 +1,50 @@
|
||||
* Documentation
|
||||
|
||||
Although most of the concepts from Microsoft.NET can
|
||||
be applied to the completed Mono platform, we do need to
|
||||
have a complete set of free documentation written specifically
|
||||
for Mono.
|
||||
|
||||
The documentation license we have chosen is the GNU Free
|
||||
Documentation License (FDL), the standard for most documents
|
||||
in the free software world.
|
||||
|
||||
We need documentation on a number of topics:
|
||||
|
||||
<ul>
|
||||
|
||||
* The development tools (compilers, assembler tools,
|
||||
language reference, design time features).
|
||||
|
||||
* Frequently Asked Question compilations.
|
||||
|
||||
* HOWTO documents.
|
||||
|
||||
* The Class Libraries
|
||||
|
||||
* Tutorials on Mono and the specifics of running it.
|
||||
|
||||
* A guide to Mono as compared to the Microsoft.NET
|
||||
Framework SDK
|
||||
|
||||
</ul>
|
||||
|
||||
** Class Library documentation
|
||||
|
||||
When contributing to the Class Library effort, please use the
|
||||
inline XML documentation tags to document your classes so we
|
||||
can automatically generate the documentation from the class
|
||||
libraries.
|
||||
|
||||
If you provide examples, please do not embed them into the
|
||||
source code, as that will make the source code harder to read
|
||||
and maintain. Instead, put examples for your code into a
|
||||
subdirectory of the class libraries. Make your sample
|
||||
code a full standalone application that people can compile.
|
||||
Ideally the Mono documentation browser will let you edit, modify
|
||||
and run the sample programs.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
* Software Availability
|
||||
|
||||
The Virtual Execution System is available in package `mono'.
|
||||
Currently this contains a metadata library and the
|
||||
disassembler. Please reffer to our <a
|
||||
href="runtime.html">Runtime</a> description for more details
|
||||
on this part of the project.
|
||||
|
||||
The code for the C# compiler as well as the language error
|
||||
test suite and the class library are in the `mcs' package, we
|
||||
will move this later into `mono' itself.
|
||||
|
||||
The mcs compiler requires the `jay' parser generator, this is
|
||||
available in module `jay'.
|
||||
|
||||
** Sources
|
||||
|
||||
Currently we will be providing CVS snapshots every day, until
|
||||
we make the first tarball release.
|
||||
|
||||
<ul>
|
||||
<b>July 12th, 2001</b>
|
||||
<ul>
|
||||
* <a href="archive/jay.cs.tar.gz">archive/jay.cs.tar.gz</a>: Sources to Jay.
|
||||
* <a href="archive/mcs-12-Jul-2001.tar.gz">mcs-12-Jul-2001.tar.gz</a>: CVS snapshot.
|
||||
* <a href="archive/mono-0.3.tar.gz">mono-0.3.tar.gz</a>: Packaged Source Code.
|
||||
</ul>
|
||||
|
||||
<b>July 8th, 2001</b>
|
||||
|
||||
<ul>
|
||||
* <a href="archive/jay.cs.tar.gz">archive/jay.cs.tar.gz</a>: Sources.
|
||||
* <a href="archive/mcs-08-Jul-2001.tar.gz">mcs-08-Jul-2001.tar.gz</a>: CVS Snapshot
|
||||
* <a href="archive/mono-08-Jul-2001.tar.gz">mono-08-Jul-2001.tar.gz</a>: CVS Snapshot
|
||||
</ul>
|
||||
</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.
|
||||
@@ -0,0 +1,609 @@
|
||||
** Basics
|
||||
|
||||
Q: Is Mono the same as Microsoft's .NET initiative?
|
||||
|
||||
A: It is not.
|
||||
|
||||
.NET is a company-wide initiative at Microsoft that
|
||||
encompasses many different areas. The .NET development framework,
|
||||
Passport, Biztalk, new server products, and anything that is
|
||||
remotely connected to .NET gets the ".NET-stamping" treatment.
|
||||
Some components of Microsoft's .NET initiative have been announced
|
||||
and some others are in the works.
|
||||
|
||||
Mono is a project to implement several technologies developed by
|
||||
Microsoft that have now been submitted to the ECMA Standards Body.
|
||||
|
||||
Q: What technologies are included in Mono?
|
||||
|
||||
A: Mono contains a number of components useful for building new
|
||||
software:
|
||||
|
||||
<ul>
|
||||
* A Common Language Infrastructure (CLI) virtual
|
||||
machine that contains a class loader, Just-in-time
|
||||
compiler, and a garbage collecting runtime.
|
||||
|
||||
* A class library that can work with any language
|
||||
which works on the CLR.
|
||||
|
||||
* A compiler for the C# language. In the future we
|
||||
might work on other compilers that target the Common
|
||||
Language Runtime.
|
||||
|
||||
Windows has compilers that target the
|
||||
virtual machine from
|
||||
<a href="http://msdn.microsoft.com/net/thirdparty/default.asp#lang">a
|
||||
number of languages:</a> Managed C++, Java Script,
|
||||
Eiffel, Component Pascal, APL, Cobol, Oberon, Perl,
|
||||
Python, Scheme, Smalltalk, Standard ML, Haskell,
|
||||
Mercury and Oberon.
|
||||
</ul>
|
||||
|
||||
The CLR and the Common Type System (CTS) enables applications and
|
||||
libraries to be written in a number of languages. Classes and
|
||||
methods created in one language can be used from a different
|
||||
language.
|
||||
|
||||
This means for example that if you define a class to do algebraic
|
||||
manipulation in C#, that class can be reused from any other
|
||||
language that supports the CLI. You could create a class in C#,
|
||||
subclass it in C++ and instantiate it in an Eiffel program.
|
||||
|
||||
A single object system, threading system, class libraries, and
|
||||
garbage collection system can be shared across all these languages.
|
||||
|
||||
Q: Where can I find the specification for these technologies?
|
||||
|
||||
A: You can find the work-in-progress documentation from the T3G ECMA
|
||||
group here:
|
||||
|
||||
<a href="http://www.dotnetexperts.com">http://www.dotnetexperts.com</a>
|
||||
|
||||
Q: Will you implement the .NET Framework SDK class libraries?
|
||||
|
||||
A: Yes, we will be implementing the APIs of the .NET Framework SDK
|
||||
class libraries.
|
||||
|
||||
Q: What does Mono stand for?
|
||||
|
||||
A: Mono is the word for `Monkey' in Spanish. We like monkeys.
|
||||
|
||||
Q: When will you ship it?
|
||||
|
||||
A: We do not know when the code will be shipped. The more
|
||||
contributions we get to the project, the sooner it will ship.
|
||||
|
||||
A rough estimate is that we might be able to run our C# compiler on
|
||||
Linux by the end of the year. That means running the Windows
|
||||
Executable generated by a Microsoft .NET compiler on the Linux
|
||||
platform.
|
||||
|
||||
We expect that doing GUI applications will require more work on the
|
||||
class libraries. That could take another six months.
|
||||
|
||||
Q: How can I contribute?
|
||||
|
||||
A: Check the <a href="contributing.html">contributing</a> section.
|
||||
|
||||
Q: You guys should innovate instead of copying.
|
||||
|
||||
A: In this particular case, we see a clear advantage in the platform
|
||||
and we are interested in using the features of the CLI on open source systems.
|
||||
|
||||
We have decided that we should spend our limited resources towards
|
||||
implementing an existing specification instead of designing and
|
||||
implementing our own.
|
||||
|
||||
Designing and implementing our own would be possible, but it doesn't make
|
||||
sense to do that just because the specification comes from a
|
||||
proprietary vendor.
|
||||
|
||||
** Ximian
|
||||
|
||||
Q: Why is Ximian working on .NET?
|
||||
|
||||
A: We are interested in providing the best tools for programmers to
|
||||
develop applications for Free Operating Systems.
|
||||
|
||||
For more information, read the project <a
|
||||
href="rationale.html">rationale</a> page.
|
||||
|
||||
Q: Will Ximian be able to take on a project of this size?
|
||||
|
||||
A: Ximian will not be able to taken on the whole project on its own.
|
||||
Mono will be a free software/open source community project, that is
|
||||
the only way we can hope to implement something of this size. You
|
||||
can <a href="contributing.html">contribute</a> to this effort.
|
||||
|
||||
Q: What pieces will Ximian be working on?
|
||||
|
||||
A: We will focus on building a development and execution
|
||||
environment.
|
||||
|
||||
The idea is to get Mono to a state of that would allow
|
||||
third parties to actually be able to use it real-world development.
|
||||
|
||||
Q: Why does Ximian even care?
|
||||
|
||||
A: We like the features that the CLI and its related technologies
|
||||
bring to the table. An exciting addition to the developer toolkit.
|
||||
The goal of Mono is to bring this technology to non-Windows
|
||||
platforms (although we hope Mono will also run on Windows, for
|
||||
debugging and comparative purposes).
|
||||
|
||||
|
||||
** Licensing
|
||||
|
||||
Q: Will I be able to write proprietary applications that run with
|
||||
Mono?
|
||||
|
||||
A: Yes. We will make sure that the licensing will allow developers to
|
||||
create proprietary applications.
|
||||
|
||||
Q: What license is Mono on?
|
||||
|
||||
A: The C# Compiler is released under the terms of the GPL. The class
|
||||
libraries will be under the LGPL or the GPL with a special
|
||||
exception. The runtime libraries are under the LGPL.
|
||||
|
||||
Here is the exception for the class libraries:
|
||||
|
||||
The library is distributed under the terms of the GNU General
|
||||
Public License with the following exception:
|
||||
|
||||
If you link this library against your own program, then you do not
|
||||
need to release the source code for that program. However, any
|
||||
changes that you make to the library itself, or to any native
|
||||
methods upon which the library relies, must be re-distributed in
|
||||
accordance with the terms of the GPL.
|
||||
|
||||
This is similar in spirit to <a
|
||||
href="http://www.gnu.org/software/classpath/classpath.html">GNU
|
||||
Classpath.</a>
|
||||
|
||||
Q: Will you accept code under the XXX License?
|
||||
|
||||
A: If the XXX License is compatible with the license we use in that
|
||||
specific piece of code, then yes. If you want to use the BSD license, make
|
||||
sure you use the BSD license without the advertisement clause (The
|
||||
`Ousterhout License').
|
||||
|
||||
** Mono and .NET
|
||||
|
||||
Q: If applications use Mono, does that mean that I have to pay a service fee?
|
||||
|
||||
A: No. Mono is not related to Microsoft's initiative of
|
||||
software-as-a-service.
|
||||
|
||||
Q: If you implement .NET, will I depend on Microsoft Passport to run my software?
|
||||
|
||||
A: No. The .NET Framework is a runtime infrastructure and collection
|
||||
of class libraries. Passport may be required to access certain web
|
||||
services written for that framework, but only if the programmer
|
||||
chooses Passport as the authentication mechanism.
|
||||
|
||||
Q: Is .NET just a bunch of marketing slogans?
|
||||
|
||||
A: Although the `.NET initiative' is still quite nebulous, The .NET Framework
|
||||
has been available for some time. Mono is not an implementation of the .NET
|
||||
initiative, just the development framework.
|
||||
|
||||
Q: What is a 100% .NET application?
|
||||
|
||||
A: A `100% .NET application' is one that only uses the APIs defined
|
||||
under the System namespace and does not use PInvoke. These
|
||||
applications would in theory run unmodified on Windows, Linux,
|
||||
HP-UX, Solaris, MacOS X and others.
|
||||
|
||||
Q: But Microsoft will release a port of the real thing under the
|
||||
`Shared Source' license, why bother with anything else?
|
||||
|
||||
A: The Shared Source implementation will not be usable for commercial
|
||||
purposes. We are working towards an implementation that will grant
|
||||
a number of rights to recipients: use for any purpose,
|
||||
redistribution, modification, and redistribution of modifications.
|
||||
|
||||
This is what we call <a
|
||||
href="http://www.gnu.org/philosophy/free-sw.html">Free Software</a>
|
||||
|
||||
** Passport
|
||||
|
||||
Q: Is this a free implementation of Passport?
|
||||
|
||||
A: No. Passport is part of Microsoft's Hailstorm initiative. Mono
|
||||
is just a runtime, a compiler and a set of class libraries.
|
||||
|
||||
Q: Will the System.Web.Security.PassportIdentity class, mean
|
||||
that my software will depend on Passport?
|
||||
|
||||
A: No. That just means that applications might use that API to
|
||||
contact a Passport site.
|
||||
|
||||
As long as your application does not use Passport, you will not
|
||||
need Passport.
|
||||
|
||||
It might even be possible to implement that class with
|
||||
a set of dummy functions, or use an alternate Passport implementation.
|
||||
|
||||
We do not know at this time whether the Passport protocol is
|
||||
documented and whether we will be able to talk to
|
||||
passport.com
|
||||
|
||||
Q: What is your opinion?
|
||||
|
||||
A: You can read my personal <a href="passport.html">opinion on
|
||||
passport</a>.
|
||||
|
||||
** Mono and Windows
|
||||
|
||||
Q: Will Mono allow me to run Microsoft Office on Linux?
|
||||
|
||||
A: No, it will not. Microsoft Office is a Windows application. To
|
||||
run Windows applications on Intel Unix systems refer to <a
|
||||
href="http://www.winehq.com">the Wine Project</a>
|
||||
|
||||
** GNOME
|
||||
|
||||
Q: How is this related to GNOME?
|
||||
|
||||
A: In a number of ways:
|
||||
|
||||
* Mono will use existing
|
||||
components that have been developed for GNOME when it makes
|
||||
sense. For example on X systems, we will use Gtk+ and
|
||||
Libart to implement Winforms and the Drawing2D API.
|
||||
|
||||
For database access, we will use LibGDA (not really
|
||||
depending on GNOME, but related to).
|
||||
|
||||
* This project was born out of the need of providing improved
|
||||
tools for the GNOME community.
|
||||
|
||||
* We would like to add support to our CLR implementation to
|
||||
deal with GObjects (in GNOME 1.x, they are called
|
||||
GtkObjects), and allow Mono developers to provide GObjects
|
||||
or use and extend existing GObjects.
|
||||
|
||||
Q: Has the GNOME Foundation or the GNOME team adopted Mono?
|
||||
|
||||
A: Mono is too new to be adopted by those groups. We hope that the
|
||||
tools that we will provide will be adopted by free software
|
||||
programmers including the GNOME Foundation members and the GNOME
|
||||
project generally.
|
||||
|
||||
Q: Should GNOME programmers switch over to Mono?
|
||||
|
||||
A: Mono will not be ready even within the next six months, and a
|
||||
complete implementation is probably one year away.
|
||||
|
||||
We encourage GNOME developers to continue using the existing tools,
|
||||
libraries and components. Improvements made to GNOME will have an
|
||||
impact on Mono, as they will provide the "backend" for various
|
||||
classes.
|
||||
|
||||
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.
|
||||
|
||||
** Mono and the Web
|
||||
|
||||
Q: Is Mono a way of running Java applets?
|
||||
|
||||
A: No.
|
||||
|
||||
** Web Services
|
||||
|
||||
Q: Is Mono just a new way of writing Web Services?
|
||||
|
||||
A: No.
|
||||
|
||||
Q: If this implements the SDK classes, will I be able to write and
|
||||
execute .NET Web Services with this?
|
||||
|
||||
A: Yes, you will.
|
||||
|
||||
When the project is finished, you will be able to use the same
|
||||
technologies that are available through the .NET Framework SDK on
|
||||
Windows to write Web Services.
|
||||
|
||||
Q: What about Soup?
|
||||
|
||||
A: Soup is a library for GNOME applications to create SOAP server and
|
||||
SOAP clients. You can browse the source code for soup using <a
|
||||
href="http://cvs.gnome.org/bonsai">GNOME's Bonsai</a>
|
||||
|
||||
Q: Can I use CORBA?
|
||||
|
||||
A: Yes. The CLI contains enough information about a class that
|
||||
exposing it to other RPC systems (like CORBA) is really simple, and
|
||||
does not even require support from an object.
|
||||
|
||||
We will be implementing CORBA interoperation as an extension to the
|
||||
Mono classes so that we can integrate with Bonobo, just like
|
||||
Microsoft provides COM interoperation classes and support
|
||||
mechanisms.
|
||||
|
||||
Q: Can I serialize my objects to other things other than XML?
|
||||
|
||||
A: Yes, although the serializing tools have not yet been planned, and
|
||||
you would probably have to implement them yourself.
|
||||
|
||||
** Development Tools
|
||||
|
||||
Q: Will it be possible to use the CLI features without using bytecodes
|
||||
or the JIT?
|
||||
|
||||
A: Yes. The CLI engine will be made available as a shared library.
|
||||
The garbage collection engine, the threading abstraction, the
|
||||
object system, the dynamic type code system and the JIT will be
|
||||
available for C developers to integreate with their applications if
|
||||
they wish to do so.
|
||||
|
||||
Q: Will you have new development tools?
|
||||
|
||||
A: Hopefully Free Software enthusiasts will contribute tools to
|
||||
improve the developer environment. These tools could be developed
|
||||
initially using Microsoft implementation of the CLI and then
|
||||
executed later with Mono.
|
||||
|
||||
** Mono and Java
|
||||
|
||||
Q: What about using Java? After all there are many languages that
|
||||
target the Java VM.
|
||||
|
||||
A: You can get very good tools for doing Java development on free
|
||||
systems right now. <a href="http://www.redhat.com">Red Hat</a> has
|
||||
contributed a <a href="http://gcc.gnu.org">GCC</a> <a
|
||||
href="http://gcc.gnu.org/java">frontend for Java</a> that can take
|
||||
Java sources or Java byte codes and generate native executables; <a
|
||||
href="http://www.transvirtual.com">Transvirtual</a> has implemented
|
||||
<a href="http://www.kaffe.org">Kaffe</a> a JIT engine for Java;
|
||||
Intel also has a Java VM called <a
|
||||
href="http://www.intel.com/research/mrl/orp">ORP</a>.
|
||||
|
||||
The JVM is not designed to be a general purpose virtual machine.
|
||||
The Common Intermediate Language (CIL), on the other hand, is
|
||||
designed to be a target for a
|
||||
wide variety of programming languages, and has a set of rules
|
||||
designed to be optimal for JITers.
|
||||
|
||||
|
||||
Q: What kind of rules make the Common Intermediate Language useful for
|
||||
JITers?
|
||||
|
||||
A: The main rule is that the stack in the CLI is not a general purpose
|
||||
stack. You are not allowed to use it for other purposes than
|
||||
computing values and passing arguments to functions or return
|
||||
values.
|
||||
|
||||
At any given call or return instruction, the types on the stack
|
||||
have to be the same independently of the flow of execution of your
|
||||
code.
|
||||
|
||||
Q: I heard that the CIL is ideal for JITing and not efficient for
|
||||
interpreters, is this the case?
|
||||
|
||||
A: The CIL is better suited to be JITed than JVM byte codes, but you
|
||||
can interpret them as trivially as you can interpret JVM byte
|
||||
codes.
|
||||
|
||||
** Extending Mono
|
||||
|
||||
Q: Would you allow other classes other than those in the
|
||||
specification?
|
||||
|
||||
A: Yes. The Microsoft class collection is very big, but it is by no
|
||||
means complete. It would be nice to have a port of `Camel' (the
|
||||
Mail API used by Evolution inspired by Java Mail) for Mono
|
||||
applications.
|
||||
|
||||
You might also want to look into implementing CORBA for Mono. Not
|
||||
only because it would be useful, but because it sounds like a fun
|
||||
thing to do, given the fact that the CLI is such a type rich
|
||||
system.
|
||||
|
||||
For more information on extending Mono, see our <a
|
||||
href="ideas.html">ideas</a> page.
|
||||
|
||||
** Mono and portability
|
||||
|
||||
Q: Will Mono only work on Linux?
|
||||
|
||||
A: Currently, we are doing our work on Linux-based systems and
|
||||
Windows. We do not expect many Linux-isms in the code, so it
|
||||
should be easy to port Mono to other UNIX variants.
|
||||
|
||||
Q: What about Mono on non X-based systems?
|
||||
|
||||
A: Our main intention at Ximian is to be able to develop GNOME
|
||||
applications with Mono, but if you are interested in providing a
|
||||
port of the Winform classes to other platforms (frame buffer or
|
||||
MacOS X for example), we would gladly integrate them, as long
|
||||
they are under a Free Software License.
|
||||
|
||||
** Reusing existing Code
|
||||
|
||||
Q: What projects will you reuse or build upon?
|
||||
|
||||
A: We want to get Mono in the hands of programmers soon. We are
|
||||
interested in reusing existing open source software.
|
||||
|
||||
Q: What about Intel's research JIT framework, ORP?
|
||||
|
||||
A: At this time, we are investigating whether we can use elements of
|
||||
ORP for Mono. ORP is a research JIT engine that has a clear
|
||||
defined API that splits the JIT from the GC system and the actual
|
||||
byte code implementation. It is a research product.
|
||||
|
||||
Q: What about using GNU Lightning?
|
||||
|
||||
A: We are also researching <a
|
||||
href="http://www.gnu.org/software/lightning/lightning.html">GNU
|
||||
Lightning</a>.
|
||||
|
||||
** Ximian and Microsoft
|
||||
|
||||
Q: Didn't Miguel de Icaza say that `Unix Sucks'?
|
||||
|
||||
A: Yes, he did, as a catch phrase in his opening remark on the Ottawa
|
||||
Linux Symposium. His talk focused on various ways to improve Unix.
|
||||
|
||||
There is a paper describing some ways to improve Unix at:
|
||||
|
||||
<a href="http://primates.ximian.com/~miguel/bongo-bong.html">
|
||||
http://primates.ximian.com/~miguel/bongo-bong.html</a>
|
||||
|
||||
Q: Didn't Ximian's Miguel work for Microsoft?
|
||||
|
||||
A: Actually, Nat Friedman (Ximian's co-founder) did work as an
|
||||
intern for Microsoft for one summer but Miguel did not.
|
||||
|
||||
Q: Did Nat and Miguel meet at Microsoft?
|
||||
|
||||
A: They met online on the Linux IRC network; They met in person for
|
||||
the first time in 1997.
|
||||
|
||||
** Mono and Microsoft
|
||||
|
||||
Q: How can you expect Mono to compete with Microsoft, wont this
|
||||
require an effort too large?
|
||||
|
||||
A: You are right. Mono will never become a reality without the help
|
||||
of other contributors. Ximian is a small company that can not
|
||||
finish Mono alone. We will be working with members of the
|
||||
community to deliver the product.
|
||||
|
||||
Q: Is Microsoft and Corel involved in the Mono implementation?
|
||||
|
||||
A: No, they are not.
|
||||
|
||||
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
|
||||
|
||||
** Acronyms
|
||||
|
||||
Q: What is the difference between CLR (Common Language Runtime) and
|
||||
CLI (Common Language Infrastructure)?
|
||||
|
||||
A: CLI is the specification of an execution system. The Microsoft
|
||||
implementation of this specification is named CLR.
|
||||
|
||||
Unless we come up with our own acronym, we could just call ours
|
||||
also CLR, just because it would do exactly the same thing the
|
||||
Microsoft implementation does.
|
||||
|
||||
<a name="gcc">
|
||||
** Mono and GCC
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
** Mono and GNU
|
||||
|
||||
Q: Is Mono part of the GNU project?
|
||||
|
||||
A: Mono is a Ximian project, that is also part of the GNU project.
|
||||
|
||||
** Mono and Portability
|
||||
|
||||
Q: Will Mono work on other variants of Unix?
|
||||
|
||||
A: Yes. We do not expect to add any gratuitous incompatibilities.
|
||||
|
||||
Q: Will Mono run on Windows?
|
||||
|
||||
A: Hopefully yes. Currently some parts of Mono only run on Windows
|
||||
(the C# compiler is a .NET executable) and other parts have only
|
||||
been compiled on Linux, but work on Windows with Cygwin.
|
||||
|
||||
Q: Will Mono depend on GNOME?
|
||||
|
||||
A: It will depend only if you are using a particular assembly (for
|
||||
example, for doing GUI applications). If you are just interested
|
||||
in Mono for implementing a `Hello World Enterprise P2P Web
|
||||
Service', you will not need any GNOME component.
|
||||
|
||||
** Performance
|
||||
|
||||
Q: How fast will be Mono?
|
||||
|
||||
A: We can not predict the future, but a conservative estimate is that
|
||||
it would be at least `as fast as other JIT engines'.
|
||||
|
||||
Now, wishfully thinking I hope that we will ship various JITs with
|
||||
Mono just like Microsoft has done. A fast JITer when maximum
|
||||
performance is not needed, but fast load times are important; And
|
||||
an optimizing JITer that would be slower at generating code but
|
||||
produce more optimal output.
|
||||
|
||||
The CIL has some advantages over the Java byte code: it is really
|
||||
an intermediate representation and there are a number of
|
||||
restrictions on how you can emit CIL code that simplify creating
|
||||
better JIT engines.
|
||||
|
||||
For example, on the CIL the stack is not really an abstraction
|
||||
available for the code generator to use at will: it is just a way
|
||||
of creating a postfix representation of the parsed tree. At any
|
||||
given call point or return point, the contents of the stack are
|
||||
expected to contain the same object types independently of how the
|
||||
instructions was reached.
|
||||
|
||||
** Assorted questions
|
||||
|
||||
Q: You say that the CLI allows multiple languages to execute on the
|
||||
same environment. Isn't this the purpose of CORBA?
|
||||
|
||||
A: CORBA can be used for this purpose, but think of CORBA mostly as a
|
||||
inter-process (local machine or remote machine) communication
|
||||
system.
|
||||
|
||||
Think of the CLI to be targeted to interoperation of languages in
|
||||
the same process, and CORBA as being a nifty addition for
|
||||
out-of-process.
|
||||
|
||||
Sure, we have used CORBA for in-proc components, but the lack of an
|
||||
ABI for in-proc components does not translate into a good framework
|
||||
for in-proc systems
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
* The GCC front-end
|
||||
|
||||
The GCC front-end will accept input in a binary file with
|
||||
codes in the Common Intermediate Language (CIL), and generate
|
||||
native code.
|
||||
|
||||
This will allow pre-compilation and full optimization to take
|
||||
place before a program is executed.
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
* Ideas
|
||||
|
||||
Here are a few ideas of tools, classes and projects that you
|
||||
could start. More are forthcoming.
|
||||
|
||||
<a name="classes">
|
||||
** Classes
|
||||
|
||||
<ul>
|
||||
* Implement a JXTA protocol implementation:
|
||||
<a href="http://www.jxta.org">http://www.jxta.org</a>
|
||||
|
||||
* Implement a Mail API, similar to Camel or JavaMail (Camel has
|
||||
significant architecture features that are required on a real
|
||||
mailer).
|
||||
|
||||
You can check the current C
|
||||
<a href="http://cvs.gnome.org/bonsai/rview.cgi?dir=evolution%2Fcamel">
|
||||
Camel implementation</a>.
|
||||
|
||||
* Interfacing to Multimedia systems. You might want
|
||||
to look into the Quicktime API. I know <a
|
||||
href="mailto:[email protected]">Vladimir</a> has
|
||||
researched the problem before
|
||||
</ul>
|
||||
|
||||
<a name="projects">
|
||||
** Projects
|
||||
|
||||
<ul>
|
||||
* Implement an xmlStorageSystem for the CLI:
|
||||
<a href="http://www.soapware.org/xmlStorageSystem">
|
||||
http://www.soapware.org/xmlStorageSystem</a>
|
||||
|
||||
* Build a CORBA interoperability engine for the CLR.
|
||||
You do not need to do all of the work, just talking
|
||||
the protocol will get us a long way (<a
|
||||
href="http://www.omg.org">The OMG site</a> has the CORBA specs).
|
||||
|
||||
</ul>
|
||||
@@ -0,0 +1,32 @@
|
||||
** Jul 12, 2001
|
||||
|
||||
I keep getting questions about my opinion on Passport, even when
|
||||
Mono has <b>nothing</b> to do with it. I finally <a
|
||||
href="passport.html">wrote something.</a>
|
||||
|
||||
** Jul 9, 2001
|
||||
|
||||
Today <a href="http://www.ximian.com">Ximian</a> announced the
|
||||
launch of the Mono
|
||||
project, an effort to create a free software
|
||||
(sometimes called open source) implementation of the .NET
|
||||
Development Framework.
|
||||
|
||||
If you have questions about the
|
||||
project, please read our list of <a
|
||||
href="faq.html">Frequently Asked Questions</a>.
|
||||
|
||||
You might also want to <a href="download.html">Download the
|
||||
source</a> for our work so far.
|
||||
|
||||
You might want to <a
|
||||
href="resources.html#mailing">subscribe</a> to our mono-list
|
||||
and mono-announce-list
|
||||
|
||||
You can contact the team at: <a
|
||||
href="mailto:[email protected]">[email protected]</a>
|
||||
|
||||
** O'Reilly
|
||||
|
||||
Brian posted a story on <a
|
||||
href="http://www.oreillynet.com/dotnet">O'Reilly Network .NET</a>
|
||||
+234
@@ -0,0 +1,234 @@
|
||||
* Microsoft Hailstorm and Passport
|
||||
|
||||
Microsoft Passport is a centralized database hosted by
|
||||
Microsoft that enhances the consumer experience with the Web
|
||||
by providing a single logon system that they can use across a
|
||||
number of participant web sites.
|
||||
|
||||
As you might know by now from our extensive <a
|
||||
href="faq.html">FAQ</a>, the Mono project has nothing to do
|
||||
with Microsoft Hailstorm or <a
|
||||
href="http://www.passport.com">Microsoft Passport.</a>
|
||||
|
||||
Still a lot of people have asked us our opinion on them.
|
||||
|
||||
** Passport
|
||||
|
||||
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.
|
||||
|
||||
At the time of this writing passport is required to use the
|
||||
free mail service <a href="http://www.hotmail.com">Hotmail</a>
|
||||
to get customized support for the <a
|
||||
href="http://www.msn.com">MSN portal</a>, <a
|
||||
href="http://msdn.microsoft.com">Microsoft Developers
|
||||
Network</a> and according to the original announcement from
|
||||
Microsoft <a href="http://www.americanexpress.com">American
|
||||
Express</a> and <a href="http://www.ebay.com">EBay</a> will be
|
||||
adopting it.
|
||||
|
||||
There is already a <a
|
||||
href="http://www.passport.com/Directory/Default.asp?PPDir=C&lc=1033">Large
|
||||
list</a> of participating sites.
|
||||
|
||||
There are many current users of it and Microsoft will be
|
||||
driving more users towards Passport as it <a
|
||||
href="http://news.cnet.com/news/0-1003-200-6343275.html">integrates
|
||||
it</a> in their upcoming release of Windows.
|
||||
|
||||
Microsoft has also <a
|
||||
href="http://www.passport.com/Business/JoinPassportNetwork.asp?lc=1033">developed
|
||||
a toolkit</a> to enable current web merchants to integrate
|
||||
their services with passport.
|
||||
|
||||
To the end user, there is a clear benefit: they only have to
|
||||
log into a single network and not remember multiple passwords
|
||||
across sites on the internet. Companies that adopt passport
|
||||
will have a competition advantage over those that dont.
|
||||
Microsoft lists a list of <a
|
||||
href="http://www.passport.com/Business/Default.asp?lc=1033">benefits</a>
|
||||
to companies.
|
||||
|
||||
|
||||
** The problems of Passport
|
||||
|
||||
There are a number of concerns that different groups have over
|
||||
Passport. Sometimes I have some, sometimes I do not. But
|
||||
overall, consumers and businesses can have better solutions.
|
||||
|
||||
<ul>
|
||||
* <b>Single Point of Failure:</b> As more services and
|
||||
components depend on remote servers, functionality can
|
||||
grind to a halt if there is a failure on the
|
||||
centralized Passport system.
|
||||
|
||||
Such a failure was predicted, and we recently <a
|
||||
href="http://news.cnet.com/news/0-1005-200-6473003.html">witnessed</a>
|
||||
got a lot of people worried.
|
||||
|
||||
The outgage lasted for seven days. Think what this
|
||||
could do to your business.
|
||||
|
||||
* <b>Trust:</b> Not everyone trusts Microsoft to keep
|
||||
their information confidential. Concerns are not only
|
||||
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. 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
|
||||
hacker gaining access to the Passport database.
|
||||
Personal information and credit card information about
|
||||
almost everyone using a computer could be stored there.
|
||||
|
||||
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.
|
||||
</ul>
|
||||
|
||||
Microsoft might or might not realize this. The idea behind
|
||||
Passport is indeed a good one (I can start to get rid of my
|
||||
file that keeps track of the 30 logins and passwords or so
|
||||
that I use across the various services on the net myself).
|
||||
|
||||
** Alternatives to Microsoft Passport
|
||||
|
||||
An alternative to Microsoft Passport needs to take the above
|
||||
problems into consideration. Any solution of the form `We
|
||||
will just have a competing offering' will not work.
|
||||
|
||||
The system thus has to be:
|
||||
|
||||
<ul>
|
||||
* <b>Distributed:</b> The entire authentication
|
||||
system should not create an internet `blackout' in the
|
||||
case of failure.
|
||||
|
||||
* <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
|
||||
other entity they trust.
|
||||
|
||||
* <b>Mandate good security measures:</b> As a
|
||||
principle, only Open Source software should be used
|
||||
for servers in the registrar, and they should conform
|
||||
to a standard set of tools and software that can be
|
||||
examined by third parties.
|
||||
</ul>
|
||||
|
||||
An implementation of this protocol could use the DNS or a
|
||||
DNS-like setup to distribute the information of users with the
|
||||
possibility of replicating and caching public information
|
||||
about the user.
|
||||
|
||||
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. Jabber suffers from
|
||||
the same problems that a centralized Passport has. If you
|
||||
want to do things right, you want to start with a fully
|
||||
distributed system.
|
||||
|
||||
It could also just use the user e-mail address as the `key' to
|
||||
choose the registrar (msn.com, hotmail.com -> passport.com;
|
||||
aol.com -> aol.passport.com; you get the idea).
|
||||
|
||||
The <a
|
||||
href="http://www.soapware.org/xmlStorageSystem">xmlStorage</a>
|
||||
idea from <a href="http://www.scripting.com">Dave Winer</a>
|
||||
could be used to store the information.
|
||||
|
||||
A toolkit for various popular web servers could be provided,
|
||||
authenticated and should be open sourced (for those of you who
|
||||
think that a binary program would give more security and would
|
||||
prevent people from tampering: you are wrong. You can always
|
||||
use a proxy system that "behaves" like the binary, and passes
|
||||
information back and forth from the real program, and snoops
|
||||
in-transit information).
|
||||
|
||||
Good cryptographers need to be involved in this problem to
|
||||
figure out the details and the possible insecure pieces of a
|
||||
proposal like this.
|
||||
|
||||
** Implementation: In short
|
||||
|
||||
To keep it short: <b>DNS, JXTA, xmlStorage.</b>
|
||||
|
||||
|
||||
** Deploying it
|
||||
|
||||
The implementation of such a system should be a pretty
|
||||
straightforward tasks once security cryptographers have
|
||||
designed such a beast.
|
||||
|
||||
The major problems are:
|
||||
|
||||
<ul>
|
||||
* <b>People might just not care:</b> In a poll to US
|
||||
citizens a couple of decades ago, it was found that
|
||||
most people did not care about the rights they were
|
||||
given by the Bill of Rights, which lead to a number of
|
||||
laws to be passed in the US that eliminated most of
|
||||
the rights people had.
|
||||
|
||||
* <b>The industry will move way too slow:</b>
|
||||
Microsoft's implementation is out in the open now: it
|
||||
is being deployed, and soon it will be insinuated to
|
||||
many, many users. The industry needs to get together
|
||||
soon if they care about this issue.
|
||||
|
||||
By the time the industry reacts, it might be too
|
||||
late.
|
||||
</ul>
|
||||
|
||||
** Passport and Mono
|
||||
|
||||
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.
|
||||
|
||||
If at some point the information is disclosed, it could be
|
||||
implemented.
|
||||
|
||||
If a competing system to Passport existed, we could probably
|
||||
hide all the authentication information to use a number of
|
||||
different passport-like systems.
|
||||
|
||||
If a user does not want to use Passport at all, he could
|
||||
always turn it off (or completely remove the class from the
|
||||
library). After all, this is free software.
|
||||
|
||||
Currently, we are too far from the point where this is a real
|
||||
issue.
|
||||
|
||||
** Disclaimer
|
||||
|
||||
This is just a group of personal thoughts of mine that I have
|
||||
placed here because I get asked this question a lot lately.
|
||||
The views of this page are not a statement from my employer
|
||||
(Ximian, Inc).
|
||||
|
||||
This is not part of Mono. We are not trying to deal with this
|
||||
problem.
|
||||
|
||||
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/gym">him</a> post his own story.
|
||||
|
||||
** Other Alternatives
|
||||
|
||||
Some people have pointed out <a
|
||||
href="http://www.xns.org">XNS</a>
|
||||
|
||||
Send comments to me: Miguel de Icaza (<a
|
||||
href="mailto:[email protected]">[email protected]</a>)
|
||||
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
** Microsoft and GNU and Linux.
|
||||
|
||||
Q: Does this mean that Microsoft is better than Linux?
|
||||
|
||||
A: Many of us are working on <a
|
||||
href="http://www.gnu.org/philosophy/free-sw.html">free software<a>
|
||||
and want to have an <a href="http://www.opensource.org">open
|
||||
source</a> environment that we can change, modify, improve, learn
|
||||
from, and share with others. Some of us also think that this will
|
||||
lead on the long run to better software: more efficient, faster,
|
||||
more robust and more.
|
||||
|
||||
We are willing to take good ideas from any source they come from.
|
||||
|
||||
+173
@@ -0,0 +1,173 @@
|
||||
|
||||
* The Mono Project
|
||||
|
||||
** Background.
|
||||
|
||||
The GNOME project goal was to bring missing technologies to
|
||||
Unix and make it competitive in the current market place for
|
||||
desktop applications. We also realized early on that language
|
||||
independence was important, and that is why GNOME APIs were
|
||||
coded using a standard that allowed the APIs to be easily
|
||||
wrapped for other languages. Our APIs are available to most
|
||||
programming languages on Unix (Perl, Python, Scheme, C++,
|
||||
Objective-C, Ada).
|
||||
|
||||
Later on we decided to use better methods for encapsulating
|
||||
our APIs, and we started to use CORBA to define interfaces to
|
||||
components. We complemented it with policy and a set of
|
||||
standard GNOME interfaces for easily creating reusable,
|
||||
language independent components, controls and compound
|
||||
documents. This technology is known as <a
|
||||
href="http://www.ximian.com/tech/bonobo.php3">Bonobo</a>.
|
||||
Interfaces to Bonobo exist for C, Perl, Python, and
|
||||
Java.
|
||||
|
||||
CORBA is good when you define coarse interfaces, and most
|
||||
Bonobo interfaces are coarse. The only problem is that
|
||||
Bonobo/CORBA interfaces are not good for small interfaces.
|
||||
For example, an XML parsing Bonobo/CORBA component would be
|
||||
inefficient compared to a C API.
|
||||
|
||||
** Another explanation
|
||||
|
||||
I recently explained our motivations to Dave Winer, and he posted
|
||||
it <a
|
||||
href="http://scriptingnews.userland.com/stories/storyReader$1275">here</a>
|
||||
|
||||
** Microsoft's .NET
|
||||
|
||||
The Microsoft .NET initiative is confusing because it is a
|
||||
company wide effort that ranges from development tools to end
|
||||
user applications. .NET is a branding formative that
|
||||
has been applied to:
|
||||
|
||||
<ul>
|
||||
* The .NET development platform, a new platform for
|
||||
writing software.
|
||||
|
||||
* Web services.
|
||||
|
||||
* Microsoft Server Applications.
|
||||
|
||||
* New tools that use the new development platform.
|
||||
|
||||
* Hailstorm, the Passport centralized single-signon
|
||||
system that is being integrated into Windows XP.
|
||||
|
||||
</ul>
|
||||
|
||||
Mono is an implementation of the .NET development platform.
|
||||
|
||||
** The Common Language Infrastructure platform.
|
||||
|
||||
Microsoft has created a new development platform. The
|
||||
highlights of this new development platform are:
|
||||
|
||||
<ul>
|
||||
* A runtime environment that provides garbage
|
||||
collection, threading and a virtual machine
|
||||
specification (The Virtual Execution System, VES)
|
||||
|
||||
* A comprehensive class library.
|
||||
|
||||
* A new language, C#. Very similar to Java, C#
|
||||
allows programmers to use all the features available
|
||||
on the .NET runtime.
|
||||
|
||||
* A language specification that compilers can
|
||||
follow if they want to generate classes and code
|
||||
that can interoperate with other programming
|
||||
languages (The Common Language Specification: CLS)
|
||||
</ul>
|
||||
|
||||
The Common Language Infrastructure platform is similar to the
|
||||
goals we had in GNOME of giving language independence to
|
||||
programmers. It is more mature, documented, larger in scope,
|
||||
and has a consistent design.
|
||||
|
||||
Any API that is written using a CLS provider language can be
|
||||
used by any language that is a CLS consumer. Compilers
|
||||
generate code in a format called Common Intermediate Language
|
||||
(CIL) which is an intermediate representation of a compiled
|
||||
program and is easy to compile to native code or compiled
|
||||
using Just-in-Time (JIT) engines. The restrictions placed by
|
||||
the runtime on the CIL byte codes ensures that it is possible
|
||||
to do a good job at optimizing the code in a JIT compiler.
|
||||
|
||||
There is not really a lot of innovation in this platform: we
|
||||
have seen all of these concepts before, and we are all
|
||||
familiar with how these things work.
|
||||
|
||||
What makes the Common Language Infrastructure development
|
||||
platform interesting is that it is a good mix of technologies
|
||||
that have been nicely integrated.
|
||||
|
||||
The .NET development platform is essentially a new foundation
|
||||
for program development that gives Microsoft a room to grow
|
||||
for the coming years.
|
||||
|
||||
** ECMA standards.
|
||||
|
||||
Microsoft has submitted the
|
||||
specifications of C#, the runtime, the metadata and the
|
||||
other various bits of the .NET development platform to the
|
||||
<a href="http://www.ecma.ch">ECMA</a> for standarization.
|
||||
|
||||
You can get a copy of the specifications submitted to ECMA
|
||||
from: <a href="http://www.dotnetexperts.com/ecma">http://www.dotnetexperts.com/ecma</a>
|
||||
|
||||
** Mono: an Open Source Common Language Infrastructure implementation.
|
||||
|
||||
Ximian has begun work on Mono, a project that aims to bring
|
||||
the Common Language Infrastructure platform to free systems.
|
||||
|
||||
When the GNU project was launched, they picked the best
|
||||
operating system that was available out there, and they
|
||||
began to clone it: Unix.
|
||||
|
||||
The .NET development platform is a very rich, powerful, and
|
||||
well designed platform that would help improve the free
|
||||
software development platform. Just like the GNU project
|
||||
began to clone Unix sixteen years ago, we will be cloning the
|
||||
.NET development platform because it is a great platform to
|
||||
build on.
|
||||
|
||||
** What makes up Mono?
|
||||
|
||||
There are various pieces that will make up Mono:
|
||||
|
||||
<ul>
|
||||
* A C# compiler.
|
||||
|
||||
* The Virtual Execution System: that will have the
|
||||
Just-in-Time compiler, garbage collector, loader,
|
||||
threading engine.
|
||||
|
||||
A byte code interpreter will be provided for quickly
|
||||
porting Mono to new systems and debugging the JIT
|
||||
purposes, but it is not intended to be the ideal
|
||||
execution environment.
|
||||
|
||||
* An implemenation of the .NET class library.
|
||||
|
||||
* Visual development tools.
|
||||
|
||||
* A CIL GCC frontend.
|
||||
</ul>
|
||||
|
||||
** Why use GNOME components?
|
||||
|
||||
GNOME is an umbrella project that consists of infrastructural
|
||||
components (GUI toolkit, XML libraries, CORBA implementation,
|
||||
printing architecture, imaging system), a desktop environment,
|
||||
and productivity applications.
|
||||
|
||||
The GNOME infrastructural components can be used to quickly
|
||||
implement various pieces of the class libraries without reinventing
|
||||
the wheel, and since all those components are licensed under
|
||||
the terms of the GNU LGPL it is a perfect fit.
|
||||
|
||||
Libart will be used to implement the Drawing.2D API; Gtk+ and
|
||||
the GNOME libraries will be used to implement the WinForms
|
||||
API and of course Glib and libxml will be used in various
|
||||
places.
|
||||
+109
@@ -0,0 +1,109 @@
|
||||
|
||||
* Resources
|
||||
|
||||
There are a number of resources available for those of you who
|
||||
want to contribute to the Mono project. Here are a few links.
|
||||
|
||||
If you want to send suggestions for links, address them to <a
|
||||
mailto="[email protected]">[email protected]</a>.
|
||||
|
||||
** ECMA Documentation.
|
||||
|
||||
You can get the documentation for the ECMA specs from a number of sites:
|
||||
<ul>
|
||||
* <a href="http://msdn.microsoft.com/net/ecma">At MSDN</a>
|
||||
* <a href="http://www.dotnetexperts.com">Dot Net Experts</a>
|
||||
* <a href="http://developer.intel.com/software/idap/ecma">Intel</a>
|
||||
* <a href="http://lightning.csse.monash.edu.au/.net/CLI">Monash University</a>
|
||||
</ul>
|
||||
|
||||
These contain specifications for the assembler, the metadata,
|
||||
byte codes supported by the CLI virtual machine, the C#
|
||||
language and the core class libraries.
|
||||
|
||||
For details on the .NET class libraries, you can
|
||||
visit the Microsoft's Developer Network:
|
||||
|
||||
<ul>
|
||||
* <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/cpref_start.asp">.NET Framework Class Library</a>
|
||||
</ul>
|
||||
|
||||
You can also get this information if you install the Beta2
|
||||
release of the .NET Framework.
|
||||
|
||||
<a name="mailing">
|
||||
** Mailing Lists
|
||||
|
||||
There are a number of mailing lists for Mono
|
||||
|
||||
<ul>
|
||||
|
||||
* <b><a
|
||||
href="http://mail.ximian.com/mailman/listinfo/mono-list">mono-list:</a></b>
|
||||
The general Mono discussion list.
|
||||
* <b><a
|
||||
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-docs-list">mono-docs-list:</a></b>
|
||||
Discussion on the documentation of Mono.
|
||||
* <b><a
|
||||
href="http://discuss.develop.com/dotnet.html">Dotnet mailing
|
||||
list at Develop.com:</a></b> The guys at Develop Mentor run
|
||||
this general purpose mailing list.
|
||||
</ul>
|
||||
|
||||
** Discussion Groups.
|
||||
|
||||
<ul>
|
||||
|
||||
* <a href="http://www.oreillynet.com">O'Reilly
|
||||
Network</a> has a <a
|
||||
href="http://www.oreillynet.com/dotnet">section devoted to
|
||||
.NET</a>
|
||||
* <a
|
||||
href="http://msdn.microsoft.com/newsgroups">MSDN</a> also
|
||||
lists various newsgroups related to .NET</ul>
|
||||
</ul>
|
||||
|
||||
** Other .NET related projects
|
||||
|
||||
There are a number of related projects to Mono:
|
||||
|
||||
<ul>
|
||||
* <a
|
||||
href="http://www.icsharpcode.net/OpenSource/SD/default.asp">Sharp
|
||||
Develop:</a> an IDE for the C# language written in C#.
|
||||
|
||||
* <a
|
||||
href="http://www.southern-storm.com.au/portable_net.html">Portable.NET:</a>
|
||||
|
||||
* <a href="http://nunit.sourceforge.net">NUnit:</a> A
|
||||
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.
|
||||
</ul>
|
||||
|
||||
** GNOME Documentation
|
||||
|
||||
Documnetation on GNOME, and the GNOME APIs is available from
|
||||
the <a href="http://developer.gnome.org">developer</a> site at
|
||||
GNOME:
|
||||
|
||||
<ul>
|
||||
* <a href="http://developer.gnome.org/doc/API/">GNOME
|
||||
API documentation</a>
|
||||
|
||||
* <a href="http://developer.gnome.org/doc/books">GNOME
|
||||
Online books</a>
|
||||
|
||||
* <A
|
||||
href="http://developer.gnome.org/arch/">Architecture Overview</a>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
** MacOS Documentation
|
||||
|
||||
** Assembly Language Manuals online
|
||||
Intel
|
||||
MIPS
|
||||
SPARC
|
||||
|
||||
** Microsoft
|
||||
msdn.microsoft.com/net
|
||||
Research.microsoft.com
|
||||
|
||||
** Related Technologies
|
||||
|
||||
<ul>
|
||||
|
||||
* The CLI allows people to create Web Services using the SOAP
|
||||
protocol. SOAP is based on XML, XML schemas an the HTTP
|
||||
protocol.
|
||||
<ul>
|
||||
* XML specification.
|
||||
* XML Namespaces.
|
||||
* XML Schemas.
|
||||
* SOAP Specification.
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
** Compiler Information
|
||||
GCC
|
||||
GCC Sample front-end tutorial
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
* Roadmap
|
||||
|
||||
We are working on the following three projects at Ximian:
|
||||
|
||||
The C# Compiler (mcs/mcs)
|
||||
|
||||
A .NET compatible Class Library (mcs/class)
|
||||
|
||||
The JIT/interpreter (mono)
|
||||
|
||||
|
||||
|
||||
+118
@@ -0,0 +1,118 @@
|
||||
The MonoNet runtime
|
||||
|
||||
The MonoNet runtime will implement the JIT engine (and a byte
|
||||
code interpreter for quickly porting to new systems), the
|
||||
class loader, the garbage collector, threading system and
|
||||
metadata access libraries.
|
||||
|
||||
Currently the runtime contains the beginning of an image
|
||||
loader and metadata access entry points. Since Beta2 has been
|
||||
now released, it is possible to resume work using the ECMA
|
||||
specs and testing with Beta2-generated executables.
|
||||
|
||||
The runtime core will be implemented in C, in a library
|
||||
"libMonoVES.so".
|
||||
|
||||
** Executing MSIL/CIL images
|
||||
|
||||
The code will load an executable and map the references to
|
||||
external assemblies to our own version of the assemblies on
|
||||
GNU/Linux.
|
||||
|
||||
Our roadmap looks like this:
|
||||
|
||||
<ul>
|
||||
|
||||
* 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: IA32 translating-JIT engine.
|
||||
|
||||
* Milestone 4: non-Intel port of the JIT engine.
|
||||
|
||||
* Milestone 5: Optimizing JIT engine port for IA32.
|
||||
|
||||
* Milestone 6: non-Intel port of the Optimizing JIT
|
||||
engine.
|
||||
</ul>
|
||||
|
||||
A setup similar to the Kaffe JIT engine can be used to
|
||||
layout the code to support non-IA32 architectures. Our work
|
||||
will be focused on getting a IA32 version running first.
|
||||
|
||||
The JIT engine should work on Linux and Win32, although you
|
||||
might need to install the CygWin32 development tools to get a
|
||||
Unix-like compilation environment.
|
||||
|
||||
** JIT Engine
|
||||
|
||||
Currently we are evaluating various mechanisms for our JIT
|
||||
engine (<a
|
||||
href="http://www.intel.com/research/mrl/orp/">ORP</a>, <a
|
||||
href="http://www.gnu.org/software/lightning/">GNU
|
||||
Lightning</a>, and <a
|
||||
href="http://www.eecs.harvard.edu/~nr/toolkit/">NJ Machine
|
||||
Toolkit</a>.).
|
||||
|
||||
We have not made a decision yet, but we might want to use a
|
||||
Code Generator Generator for the Common Intermediate Language,
|
||||
as that is likely going to allow us to create better code
|
||||
(There are a couple of books that deal with this technique: "A
|
||||
Retargetable C Compiler" and "Advanced Compiler Design and
|
||||
Implementation").
|
||||
|
||||
** Garbage Collection
|
||||
|
||||
We have decided to implement a generational tracing garbage
|
||||
collector, which is very similar to the one being used by
|
||||
.NET. For an introduction to the garbage collection system
|
||||
used by Microsoft's CLR implementation, you can read this book
|
||||
on <a
|
||||
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>
|
||||
|
||||
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
|
||||
conservative collector.
|
||||
|
||||
<ul>
|
||||
* Garbage collection list and FAQ:<br>
|
||||
<a href="http://www.iecc.com/gclist/">http://www.iecc.com/gclist/</a>
|
||||
|
||||
* 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>
|
||||
<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>
|
||||
</ul>
|
||||
|
||||
** Useful links
|
||||
|
||||
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>
|
||||
|
||||
* A paper on fast JIT compilation of a stack-based language:<br>
|
||||
<a href="http://www.research.microsoft.com/~cwfraser/pldi99codegen.pdf">
|
||||
http://www.research.microsoft.com/~cwfraser/pldi99codegen.pdf</a>
|
||||
|
||||
* Vmgen generates much of the code for efficient virtual machine (VM)
|
||||
interpreters from simple descriptions of the VM instructions:<br>
|
||||
<a href="http://www.complang.tuwien.ac.at/anton/vmgen/">
|
||||
http://www.complang.tuwien.ac.at/anton/vmgen</a>
|
||||
</ul>
|
||||
|
||||
** PInvoke
|
||||
|
||||
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.
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
* Project Status
|
||||
|
||||
|
||||
Pieces of Mono that have been implemented:
|
||||
|
||||
<ul>
|
||||
* C# compiler: The C# parser can now generate parse
|
||||
trees. Next up: semantic analysis, compiler lever optimizations
|
||||
and code generation.
|
||||
|
||||
* Metadata library: Can currently parse and load
|
||||
information from .NET modules (executables and DLL
|
||||
files). It has a few bugs outstanding (table
|
||||
dimension computation is incorrect).
|
||||
|
||||
Parsing of Exception tables is missing.
|
||||
|
||||
It lacks Token to (Table, Index) mapping, but this
|
||||
should be trivial to write.
|
||||
|
||||
* Disassembler: Can disassemble .NET modules. Still
|
||||
lacking exception handling as well as useful debugging
|
||||
tools (hex dumping, token dumping).
|
||||
|
||||
* Class Libraries: Only a few classes have been
|
||||
implemented.
|
||||
</ul>
|
||||
|
||||
Tasks on the critical path:
|
||||
|
||||
<ul>
|
||||
* Method and Field resolution.
|
||||
|
||||
* Bytecode interpreter: Not implemented yet.
|
||||
|
||||
* Simple JIT: Not implemented yet.
|
||||
|
||||
* Garbage collection engine.
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
* Testing
|
||||
|
||||
All classes in Mono libraries should have comprehensive unit test
|
||||
suites to go with them. Unit testing is a software engineering
|
||||
methodology that makes it easier to build correct code. Every
|
||||
method in every class should have a set of tests to verify
|
||||
that they work correctly. Mono also needs a testing framework
|
||||
to make it easy to write and run lots of tests.
|
||||
|
||||
Try <a href="http://nunit.sourceforge.net">NUnit</a>
|
||||
|
||||
Why do unit testing? It becomes simple to run automated tests
|
||||
for the whole library. Unit tests are a safety net - you can
|
||||
change part of the code and verify that you haven't broken
|
||||
anything. Ideally, tests are written before the actual library
|
||||
code itself. And every time a bug is discovered, a test should
|
||||
be written to demonstrate the bug and its fix. Then, if
|
||||
you ever reintroduce the bug, you will know immediately. For
|
||||
more info, read <a
|
||||
href="http://nunit.sourceforge.net/doc/testinfected/testing.html">
|
||||
JUnit Test Infected: Programmers Love Writing Tests</a>.
|
||||
@@ -0,0 +1,6 @@
|
||||
* Thanks
|
||||
|
||||
We would like to thank Tim O'Reilly, Brian Jepson and Nathan
|
||||
Torkington for their help.
|
||||
|
||||
Dave Winer for provided interesting comments and a to read.
|
||||
@@ -0,0 +1,25 @@
|
||||
* Tools
|
||||
|
||||
We need a number of tools to make people productive using a
|
||||
Mono-based solution. Some of these tools can be developed on
|
||||
Windows before Mono is fully finished.
|
||||
|
||||
** Debugger
|
||||
|
||||
We will need a debugging API to debug CLI applications and
|
||||
then a debugger component that can be used in an IDE
|
||||
environment.
|
||||
|
||||
** Integrated Development Environment
|
||||
|
||||
There is already a project to create a C# development
|
||||
environment (SharpDevelop). People could work with the
|
||||
SharpDevelop hackers to produce a unified development environment.
|
||||
|
||||
** Help Browser
|
||||
|
||||
We need a good help browser that can be used to browse all the
|
||||
Mono documentation.
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
*.src
|
||||
*.html
|
||||
@@ -0,0 +1,16 @@
|
||||
0,Home,index.html,index.src
|
||||
1,FAQ,faq.html,faq.src
|
||||
0,Mono,rationale.html,rationale.src
|
||||
1,Runtime,runtime.html,runtime.src
|
||||
1,Classes,class-library.html,class-library.src
|
||||
1,C# Compiler,c-sharp.html,c-sharp.src
|
||||
1,Status,status.html,status.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
|
||||
0,Contact,contact.html,contact.src
|
||||
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/perl
|
||||
$q = 1;
|
||||
|
||||
while (<>){
|
||||
chop;
|
||||
if (/^\* (.*)$/){
|
||||
print "<h1>$1</h1>\n";
|
||||
} elsif (/^\*\* (.*)$/) {
|
||||
print "<h2>$1</h2>\n";
|
||||
} elsif (/^\*\*\* (.*)$/) {
|
||||
print "<h3>$1</h3>\n";
|
||||
} elsif (/^$/) {
|
||||
print "<p>\n";
|
||||
} elsif (/^\t\t\* (.*)$/) {
|
||||
print "<li>$1\n";
|
||||
} elsif (/^Q: (.*)$/){
|
||||
print "<p><a name=\"q$q\"><b>Question $q:</b> $1\n";
|
||||
$q++;
|
||||
} elsif (/^A: (.*)$/){
|
||||
print "$1\n";
|
||||
} else {
|
||||
print "$_\n";
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 4.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.5 KiB |
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 3.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 49 B |
Binary file not shown.
|
After Width: | Height: | Size: 157 B |
@@ -0,0 +1,38 @@
|
||||
SOURCES= \
|
||||
../contributing \
|
||||
../class-library \
|
||||
../contact \
|
||||
../c-sharp \
|
||||
../documentation \
|
||||
../download \
|
||||
../faq \
|
||||
../gcc-frontend \
|
||||
../index \
|
||||
../ideas \
|
||||
../passport \
|
||||
../rationale \
|
||||
../resources \
|
||||
../roadmap \
|
||||
../runtime \
|
||||
../status \
|
||||
../testing \
|
||||
../tools
|
||||
|
||||
all:
|
||||
-mkdir site
|
||||
for i in $(SOURCES); do \
|
||||
perl htmlify $$i > `basename $$i`.src; \
|
||||
done;
|
||||
|
||||
perl process.pl commands template.html.in .
|
||||
|
||||
clean:
|
||||
for i in $(SOURCES); do \
|
||||
rm -f `basename $$i`.src `basename $$i`.html; \
|
||||
done;
|
||||
|
||||
push:
|
||||
scp *.html [email protected]:/web/cvsmodules/mono
|
||||
|
||||
push2:
|
||||
scp *.html primates:public_html/xxx
|
||||
Executable
+73
@@ -0,0 +1,73 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
# Author:
|
||||
# Sean MacIsaac
|
||||
#
|
||||
|
||||
use strict;
|
||||
|
||||
my $full_expand = 1;
|
||||
my @template;
|
||||
my $n;
|
||||
|
||||
if ($#ARGV != 2) {
|
||||
print "process.pl command_file template_file directory_prefix\n";
|
||||
exit ();
|
||||
}
|
||||
|
||||
my $menu = "";
|
||||
|
||||
open COMMANDS, $ARGV[0] || die "Can not open $ARGV[0]";
|
||||
while (<COMMANDS>) {
|
||||
chop;
|
||||
my @command = split /,/;
|
||||
if ($command[0] != -1) {
|
||||
$menu .= "\t\t";
|
||||
if ($command[0] == 0){
|
||||
$menu .= "<tr><td valign=\"top\" class=\"navi\"><a class=\"navi\"";
|
||||
} else {
|
||||
$menu .= "<tr><td valign=\"top\" class=\"subnavi\">  <a class=\"subnavi\"";
|
||||
}
|
||||
$menu .= "HREF=\"$command[2]\">$command[1]</A></td></tr>\n\n";
|
||||
}
|
||||
}
|
||||
close COMMANDS;
|
||||
|
||||
open TEMPLATE, $ARGV[1] || die "Can not open $ARGV[1]";
|
||||
while (<TEMPLATE>) {
|
||||
push @template, $_;
|
||||
}
|
||||
close TEMPLATE;
|
||||
|
||||
open COMMANDS, $ARGV[0] || die "Can not open $ARGV[0]";
|
||||
while (<COMMANDS>) {
|
||||
chop;
|
||||
my @command = split /,/;
|
||||
|
||||
$n = $ARGV[2] . "/" . $command[2];
|
||||
open OUTPUT, ">" . $n || die "Can not create $n";
|
||||
|
||||
my $content = "";
|
||||
open INPUT, $command[3] || die "Can not open $command[3]";
|
||||
while (<INPUT>) {
|
||||
$content .= $_;
|
||||
}
|
||||
close INPUT;
|
||||
|
||||
my $line;
|
||||
my $temp;
|
||||
my $tit;
|
||||
my $title;
|
||||
|
||||
$tit = $command[1];
|
||||
foreach $line (@template) {
|
||||
$temp = $line;
|
||||
$title = "$tit / Mono";
|
||||
$temp =~ s/#TITLE#/$title/;
|
||||
$temp =~ s/#CONTENT#/$content/;
|
||||
$temp =~ s/#MENU#/$menu/;
|
||||
print OUTPUT $temp;
|
||||
}
|
||||
|
||||
close OUTPUT;
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>#TITLE#</title>
|
||||
<style type="text/css">
|
||||
<!--
|
||||
body { font-family: "trebuchet ms", lucida, verdana, helvetica;
|
||||
background-image: url("images/bgsquares.gif");
|
||||
background-attachment: fixed; }
|
||||
body, td, table { font-family: "trebuchet ms", lucida, verdana, helvetica;
|
||||
font-size: 12px; }
|
||||
|
||||
.navi { font-size: 14px; background: #444444; }
|
||||
.subnavi { font-size: 12px; }
|
||||
.footnote { font-size: 10px; color: #aaaaaa; }
|
||||
|
||||
a.navi { color: #ffffff; text-decoration: none; font-weight: bold; }
|
||||
a.navi:visited { color: #cccccc; }
|
||||
a.navi:hover { color: #ee9900; text-decoration: underline; }
|
||||
|
||||
a.subnavi { color: #ffffff; text-decoration: none; font-weight: bold; }
|
||||
a.subnavi:visited { color: #cccccc; }
|
||||
a.subnavi:hover { color: #ee9900; text-decoration: underline; }
|
||||
|
||||
// -->
|
||||
</style>
|
||||
</head>
|
||||
<body bgcolor="#555555" text="#000000">
|
||||
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td><img src="images/pixel.gif"></td><!-- left border -->
|
||||
<td colspan="4">
|
||||
<a href="/"><img src="images/mono.gif" border="0"></a></td>
|
||||
<td><img src="images/pixel.gif"></td><!-- right border -->
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="images/pixel.gif" width="1" height="1"></td>
|
||||
<td colspan="3" bgcolor="black"><img src="images/pixel.gif" height="2"></td>
|
||||
<td bgcolor="black"><img src="images/pixel.gif" width="1"></td>
|
||||
<td><img src="images/pixel.gif"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="100"><img src="images/pixel.gif"></td>
|
||||
<td valign="top">
|
||||
<table cellpadding="2" valign="top" cellspacing="0" border="0">
|
||||
#MENU#
|
||||
</table>
|
||||
</td>
|
||||
<td bgcolor="black" width="1"><img src="images/pixel.gif" width="1"></td>
|
||||
<td bgcolor="white">
|
||||
<table cellpadding="16">
|
||||
<tr><td>
|
||||
#CONTENT#
|
||||
</td></tr>
|
||||
</table>
|
||||
</td>
|
||||
<td bgcolor="black"><img src="images/pixel.gif" width="1"></td>
|
||||
<td width="100"><img src="images/pixel.gif"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<img src="images/pixel.gif"></td>
|
||||
<td colspan="2" bgcolor="black"><img src="images/pixel.gif" height="1"></td>
|
||||
<td bgcolor="black"><img src="images/pixel.gif" width="1"></td>
|
||||
<td><img src="images/pixel.gif"></td>
|
||||
</tr>
|
||||
|
||||
<td colspan="2"></td>
|
||||
<td colspan="2" align="center">
|
||||
<a class="footnote" href="mailto: [email protected]">[email protected]</a>
|
||||
</td>
|
||||
<td colspan="2"></td>
|
||||
</tr>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Executable
+1
@@ -0,0 +1 @@
|
||||
Miguel de Icaza ([email protected])
|
||||
Executable
+2
@@ -0,0 +1,2 @@
|
||||
|
||||
This is the Ximian MCS C# compiler written in C#
|
||||
@@ -0,0 +1,34 @@
|
||||
The class libraries are grouped together in the assemblies they belong.
|
||||
|
||||
Each directory here represents an assembly, and inside each directory we
|
||||
divide the code based on the namespace they implement.
|
||||
|
||||
* Missing implementation bits
|
||||
|
||||
If you implement a class and you are missing implementation bits,
|
||||
please put in the code the word "TODO" and a description of what
|
||||
is missing to be implemented.
|
||||
|
||||
* Tagging buggy code
|
||||
|
||||
If there is a bug in your implementation tag the problem by using
|
||||
the word "FIXME" in the code, together with a description of the
|
||||
problem.
|
||||
|
||||
Do not use XXX or obscure descriptions, because otherwise people
|
||||
will not be able to understand what you mean.
|
||||
|
||||
* Tagging Lame specs
|
||||
|
||||
Sometimes the specification will be lame (consider Version.ToString (fieldCount)
|
||||
where there is no way of knowing how many fields are available, making the API
|
||||
not only stupid, but leading to unreliable code).
|
||||
|
||||
In those cases, use the keyword "LAMESPEC".
|
||||
|
||||
* Coding consideration
|
||||
|
||||
Use 8 space tabs for writing your code (hopefully we can keep
|
||||
this consistent). If you are modifying someone else's code, try
|
||||
to keep the coding style similar.
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
all: windows
|
||||
|
||||
windows:
|
||||
$(csc) /target:library /out:System.Data.dll /nowarn:1595 /recurse:*.cs
|
||||
@@ -0,0 +1,4 @@
|
||||
all: windows
|
||||
|
||||
windows:
|
||||
$(csc) /target:library /out:System.Drawing.dll /nowarn:1595 /recurse:*.cs
|
||||
@@ -0,0 +1,4 @@
|
||||
all: windows
|
||||
|
||||
windows:
|
||||
$(csc) /target:library /out:System.Management.dll /nowarn:1595 /recurse:*.cs
|
||||
@@ -0,0 +1,51 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
//
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
//
|
||||
[assembly: AssemblyTitle("")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("")]
|
||||
[assembly: AssemblyCopyright("")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
//
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Revision
|
||||
// Build Number
|
||||
//
|
||||
// You can specify all the value or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.0.*")]
|
||||
|
||||
//
|
||||
// In order to sign your assembly you must specify a key to use. Refer to the
|
||||
// Microsoft .NET Framework documentation for more information on assembly signing.
|
||||
//
|
||||
// Use the attributes below to control which key is used for signing.
|
||||
//
|
||||
// Notes:
|
||||
// (*) If no key is specified - the assembly cannot be signed.
|
||||
// (*) KeyName refers to a key that has been installed in the Crypto Service
|
||||
// Provider (CSP) on your machine.
|
||||
// (*) If the key file and a key name attributes are both specified, the
|
||||
// following processing occurs:
|
||||
// (1) If the KeyName can be found in the CSP - that key is used.
|
||||
// (2) If the KeyName does not exist and the KeyFile does exist, the key
|
||||
// in the file is installed into the CSP and used.
|
||||
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
|
||||
// documentation for more information on this.
|
||||
//
|
||||
[assembly: AssemblyDelaySign(false)]
|
||||
[assembly: AssemblyKeyFile("")]
|
||||
[assembly: AssemblyKeyName("")]
|
||||
+237
@@ -0,0 +1,237 @@
|
||||
//
|
||||
// System.CodeDom.Compiler CodeGenerator class
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
|
||||
namespace System.CodeDom.Compiler {
|
||||
|
||||
using System.CodeDom;
|
||||
using System.Reflection;
|
||||
using System.IO;
|
||||
|
||||
public abstract class CodeGenerator : ICodeGenerator {
|
||||
protected TextWriter output;
|
||||
|
||||
protected virtual void ContinueOnNewLine (string st)
|
||||
{
|
||||
}
|
||||
|
||||
CodeGenerator ()
|
||||
{
|
||||
indent = 8;
|
||||
}
|
||||
|
||||
//
|
||||
// Code Generation methods
|
||||
//
|
||||
protected abstract void GenerateArrayCreateExpression (CodeArrayCreateExpression e);
|
||||
protected abstract void GenerateAssignStatement (CodeAssignStatement s);
|
||||
protected abstract void GenerateAttachEventStatement (CodeAttachEventStatement s);
|
||||
protected abstract void GenerateBaseReferenceExpression (CodeBaseReferenceExpression e);
|
||||
protected abstract void GenerateBinaryOperatorExpression (CodeBinaryOperatorExpression x);
|
||||
protected abstract void GenerateCastExpression (CodeCastExpression x);
|
||||
protected abstract void GenerateClasses (CodeNamespace x);
|
||||
protected abstract void GenerateCommentStatement (CodeCommentStatement x);
|
||||
protected abstract void GenerateConstructor (CodeConstructor x, CodeTypeDeclaration c);
|
||||
protected abstract void GenerateDelegateCreateExpression (CodeDelegateCreateExpression x);
|
||||
protected abstract void GenerateDelegateInvokeExpression (CodeDelegateInvokeExpression x);
|
||||
protected abstract void GenerateEvent (CodeMemberEvent x, CodeTypeDeclaration c);
|
||||
protected abstract void GenerateExpression (CodeExpression x);
|
||||
protected abstract void GenerateField (CodeMemberField x);
|
||||
protected abstract void GenerateFieldReferenceExpression (CodeFieldReferenceExpression x);
|
||||
protected abstract void GenerateIndexerExpression (CodeIndexerExpression x);
|
||||
protected abstract void GenerateLinePragmaStart (CodeLinePragma x);
|
||||
protected abstract void GenerateLinePragmaEnd (CodeLinePragma x);
|
||||
protected abstract void GenerateMethod (CodeMemberMethod m, CodeTypeDeclaration c);
|
||||
protected abstract void GenerateMethodInvokeExpression (CodeMethodInvokeExpression x);
|
||||
protected abstract void GenerateMethodReturnStatement (CodeMethodReturnStatement x);
|
||||
protected abstract void GenerateNamespace (CodeNamespace x);
|
||||
protected abstract void GenerateNamespaceStart (CodeNamespace x);
|
||||
protected abstract void GenerateNamespaceEnd (CodeNamespace x);
|
||||
protected abstract void GenerateNamespaceImport (CodeNamespaceImport i);
|
||||
protected abstract void GenerateNamespaceImports (CodeNamespace i);
|
||||
protected abstract void GenerateObjectCreateExpression (CodeObjectCreateExpression x);
|
||||
protected abstract void GenerateParameterDeclarationExpression (CodeParameterDeclarationExpression x);
|
||||
protected abstract void GeneratePrimitiveExpression (CodePrimitiveExpression x);
|
||||
protected abstract void GenerateProperty (CodeMemberProperty e, CodeTypeDeclaration c);
|
||||
protected abstract void GeneratePropertyReferenceExpression (CodePropertyReferenceExpression x);
|
||||
protected abstract void GenerateStatement (CodeStatement x);
|
||||
protected abstract void GenerateStatementCollection (CodeStatementCollection x);
|
||||
protected abstract void GenerateThisReferenceExpression (CodeThisReferenceExpression x);
|
||||
protected abstract void GenerateThrowExceptionStatement (CodeThrowExceptionStatement x);
|
||||
protected abstract void GenerateTryCatchFinallyStatement (CodeTryCatchFinallyStatement x);
|
||||
protected abstract void GenerateTypeOfExpression (CodeTypeOfExpression x);
|
||||
protected abstract void GenerateTypeReferenceExpression (CodeTypeReferenceExpression x);
|
||||
protected abstract void GenerateVariableDeclarationStatement (CodeVariableDeclarationStatement x);
|
||||
|
||||
//
|
||||
// Other members
|
||||
//
|
||||
protected abstract string GetNullToken ();
|
||||
|
||||
public abstract bool IsValidIdentifier (string value);
|
||||
|
||||
public static bool IsValidLanguateIndependentIdentifier (string value)
|
||||
{
|
||||
/* FIXME: implement */
|
||||
return true;
|
||||
}
|
||||
|
||||
//
|
||||
// Output functions
|
||||
//
|
||||
protected virtual void OutputAttributeArgument (CodeAttributeArgument arg)
|
||||
{
|
||||
}
|
||||
|
||||
protected virtual void OutputDirection (FieldDirection dir)
|
||||
{
|
||||
}
|
||||
|
||||
protected virtual void OutputExpressionList (CodeExpressionCollection c)
|
||||
{
|
||||
}
|
||||
|
||||
protected virtual void OutputExpressionLIst (CodeExpressionCollection c, bool useNewlines)
|
||||
{
|
||||
}
|
||||
|
||||
protected virtual void OutputFieldScopeModifier (MemberAttributes attrs)
|
||||
{
|
||||
}
|
||||
|
||||
protected virtual void OutputIdentifier (string ident)
|
||||
{
|
||||
}
|
||||
|
||||
protected virtual void OutputMemberAccessModifier (MemberAttributes attrs)
|
||||
{
|
||||
}
|
||||
|
||||
protected virtual void OutputMemberScopeModifier (MemberAttributes attrs)
|
||||
{
|
||||
}
|
||||
|
||||
protected virtual void OutputOperator (CodeBinaryOperatorType op)
|
||||
{
|
||||
}
|
||||
|
||||
protected virtual void OutputParameters (CodeParameterDeclarationExpressionCollection pars)
|
||||
{
|
||||
}
|
||||
|
||||
protected virtual void OutputType (string typeRef)
|
||||
{
|
||||
}
|
||||
|
||||
protected virtual void OutputTypeAttributes (TypeAttributes attrs)
|
||||
{
|
||||
}
|
||||
|
||||
protected virtual void OutputTypeNamePair (string typeRef, string name)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
protected abstract string QuoteLiteralString (string value);
|
||||
|
||||
public virtual void ValidateIdentifier (string value)
|
||||
{
|
||||
}
|
||||
|
||||
//
|
||||
// Properties
|
||||
//
|
||||
protected string currentClassName;
|
||||
protected string CurrentClassName {
|
||||
get {
|
||||
return currentClassName;
|
||||
}
|
||||
}
|
||||
|
||||
protected CodeTypeMember codeClassMember;
|
||||
protected CodeTypeMember CurrentMember {
|
||||
get {
|
||||
return codeClassMember;
|
||||
}
|
||||
}
|
||||
|
||||
protected string CurrentMemberName {
|
||||
get {
|
||||
return codeClassMember.Name;
|
||||
}
|
||||
}
|
||||
|
||||
int indent;
|
||||
protected int Indent {
|
||||
get {
|
||||
return indent;
|
||||
}
|
||||
|
||||
set {
|
||||
indent = value;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// This concept seems broken, I should not really be using
|
||||
// a flag, I should be "probing" what is being generated.
|
||||
// at least the Start/End
|
||||
// functions should not be abstract, or abstract could
|
||||
// have an implementation piece?
|
||||
//
|
||||
public bool isCurrentClass;
|
||||
protected bool IsCurrentClass {
|
||||
get {
|
||||
return isCurrentClass;
|
||||
}
|
||||
}
|
||||
|
||||
public bool isCurrentDelegate;
|
||||
protected bool IsCurrentDelegate {
|
||||
get {
|
||||
return isCurrentDelegate;
|
||||
}
|
||||
}
|
||||
public bool isCurrentEnum;
|
||||
protected bool IsCurrentEnum {
|
||||
get {
|
||||
return isCurrentEnum;
|
||||
}
|
||||
}
|
||||
public bool isCurrentInterface;
|
||||
protected bool IsCurrentInterface {
|
||||
get {
|
||||
return isCurrentInterface;
|
||||
}
|
||||
}
|
||||
|
||||
public bool isCurrentStruct;
|
||||
protected bool IsCurrentStruct {
|
||||
get {
|
||||
return isCurrentStruct;
|
||||
}
|
||||
}
|
||||
|
||||
protected TextWriter Output {
|
||||
get {
|
||||
return output;
|
||||
}
|
||||
|
||||
set {
|
||||
output = value;
|
||||
}
|
||||
}
|
||||
|
||||
public abstract void GenerateCodeFromExpression (TextWriter output, CodeExpression expression);
|
||||
|
||||
public abstract void GenerateCodeFromNamespace (TextWriter output, CodeExpression expression);
|
||||
|
||||
public abstract void GenerateCodeFromStatement (TextWriter output, CodeStatement expression);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
//
|
||||
// System.CodeDom.Compiler ICodeGenerator Interface
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
|
||||
namespace System.CodeDom.Compiler {
|
||||
using System.CodeDom;
|
||||
using System.IO;
|
||||
|
||||
public interface ICodeGenerator {
|
||||
|
||||
|
||||
// <summary>
|
||||
// Generates code for @expression on @output
|
||||
// </summary>
|
||||
void GenerateCodeFromExpression (TextWriter output, CodeExpression expression);
|
||||
|
||||
void GenerateCodeFromNamespace (TextWriter output, CodeExpression expression);
|
||||
|
||||
void GenerateCodeFromStatement (TextWriter output, CodeStatement expression);
|
||||
|
||||
bool IsValidIdentifier (string value);
|
||||
|
||||
void ValidateIdentifier (string value);
|
||||
}
|
||||
}
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
//
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
//
|
||||
[assembly: AssemblyTitle("")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("")]
|
||||
[assembly: AssemblyCopyright("")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
//
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Revision
|
||||
// Build Number
|
||||
//
|
||||
// You can specify all the value or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.0.*")]
|
||||
|
||||
//
|
||||
// In order to sign your assembly you must specify a key to use. Refer to the
|
||||
// Microsoft .NET Framework documentation for more information on assembly signing.
|
||||
//
|
||||
// Use the attributes below to control which key is used for signing.
|
||||
//
|
||||
// Notes:
|
||||
// (*) If no key is specified - the assembly cannot be signed.
|
||||
// (*) KeyName refers to a key that has been installed in the Crypto Service
|
||||
// Provider (CSP) on your machine.
|
||||
// (*) If the key file and a key name attributes are both specified, the
|
||||
// following processing occurs:
|
||||
// (1) If the KeyName can be found in the CSP - that key is used.
|
||||
// (2) If the KeyName does not exist and the KeyFile does exist, the key
|
||||
// in the file is installed into the CSP and used.
|
||||
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
|
||||
// documentation for more information on this.
|
||||
//
|
||||
[assembly: AssemblyDelaySign(false)]
|
||||
[assembly: AssemblyKeyFile("")]
|
||||
[assembly: AssemblyKeyName("")]
|
||||
@@ -0,0 +1,5 @@
|
||||
2001-07-12 Sean MacIsaac <[email protected]>
|
||||
|
||||
* All files implementing IList: Added IsFixedSize property.
|
||||
|
||||
* All files: Changed CodeDOM to CodeDom.
|
||||
+159
@@ -0,0 +1,159 @@
|
||||
//
|
||||
// System.CodeDOM Code@CONTAINEE@Collection Class implementation
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
|
||||
namespace System.CodeDOM {
|
||||
|
||||
using System.Collections;
|
||||
|
||||
public class Code@CONTAINEE@Collection : IList, ICollection, IEnumerable {
|
||||
|
||||
ArrayList @arrayname@;
|
||||
|
||||
//
|
||||
// Constructors
|
||||
//
|
||||
public Code@CONTAINEE@Collection ()
|
||||
{
|
||||
@arrayname@ = new ArrayList ();
|
||||
}
|
||||
|
||||
//
|
||||
// Properties
|
||||
//
|
||||
public int Count {
|
||||
get {
|
||||
return @arrayname@.Count;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Methods
|
||||
//
|
||||
public void Add (Code@CONTAINEE@ value)
|
||||
{
|
||||
@arrayname@.Add (value);
|
||||
}
|
||||
|
||||
public void AddRange (Code@CONTAINEE@ [] values)
|
||||
{
|
||||
foreach (Code@CONTAINEE@ ca in values)
|
||||
@arrayname@.Add (ca);
|
||||
|
||||
}
|
||||
|
||||
public void Clear ()
|
||||
{
|
||||
@arrayname@.Clear ();
|
||||
}
|
||||
|
||||
private class Enumerator : IEnumerator {
|
||||
private Code@CONTAINEE@Collection collection;
|
||||
private int currentIndex = -1;
|
||||
|
||||
internal Enumerator (Code@CONTAINEE@Collection collection)
|
||||
{
|
||||
this.collection = collection;
|
||||
}
|
||||
|
||||
public object Current {
|
||||
get {
|
||||
if (currentIndex == collection.Count)
|
||||
throw new InvalidOperationException ();
|
||||
return collection [currentIndex];
|
||||
}
|
||||
}
|
||||
|
||||
public bool MoveNext ()
|
||||
{
|
||||
if (currentIndex > collection.Count)
|
||||
throw new InvalidOperationException ();
|
||||
return ++currentIndex < collection.Count;
|
||||
}
|
||||
|
||||
public void Reset ()
|
||||
{
|
||||
currentIndex = -1;
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerator GetEnumerator ()
|
||||
{
|
||||
return new Code@CONTAINEE@Collection.Enumerator (this);
|
||||
}
|
||||
|
||||
//
|
||||
// IList method implementations
|
||||
//
|
||||
public int Add (object value)
|
||||
{
|
||||
return @arrayname@.Add (value);
|
||||
}
|
||||
|
||||
public bool Contains (Object value)
|
||||
{
|
||||
return @arrayname@.Contains (value);
|
||||
}
|
||||
|
||||
public int IndexOf (Object value)
|
||||
{
|
||||
return @arrayname@.IndexOf (value);
|
||||
}
|
||||
|
||||
public void Insert (int index, Object value)
|
||||
{
|
||||
@arrayname@ [index] = value;
|
||||
}
|
||||
|
||||
public object this[int index] {
|
||||
get {
|
||||
return @arrayname@ [index];
|
||||
}
|
||||
|
||||
set {
|
||||
@arrayname@ [index] = value;
|
||||
}
|
||||
}
|
||||
|
||||
public void Remove (object value)
|
||||
{
|
||||
@arrayname@.Remove (value);
|
||||
}
|
||||
|
||||
public void RemoveAt (int index)
|
||||
{
|
||||
@arrayname@.RemoveAt (index);
|
||||
}
|
||||
|
||||
//
|
||||
// ICollection method implementations
|
||||
//
|
||||
public void CopyTo (Array array, int index)
|
||||
{
|
||||
@arrayname@.CopyTo (array, index);
|
||||
}
|
||||
|
||||
public object SyncRoot {
|
||||
get {
|
||||
return @arrayname@.SyncRoot;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsReadOnly {
|
||||
get {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsSynchronized {
|
||||
get {
|
||||
return @arrayname@.IsSynchronized;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
//
|
||||
// System.CodeDom CodeArrayCreateExpression Class implementation
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
namespace System.CodeDom {
|
||||
|
||||
public class CodeArrayCreateExpression : CodeExpression {
|
||||
string createType;
|
||||
CodeExpressionCollection initializers;
|
||||
CodeExpression sizeExpression;
|
||||
int size;
|
||||
|
||||
//
|
||||
// Constructors
|
||||
//
|
||||
public CodeArrayCreateExpression ()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public CodeArrayCreateExpression (string createType, CodeExpression size)
|
||||
{
|
||||
this.createType = createType;
|
||||
this.sizeExpression = size;
|
||||
}
|
||||
|
||||
public CodeArrayCreateExpression (string createType, int size)
|
||||
{
|
||||
this.createType = createType;
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
public CodeArrayCreateExpression (string createType, CodeExpression [] initializers)
|
||||
{
|
||||
this.createType = createType;
|
||||
this.initializers = new CodeExpressionCollection ();
|
||||
|
||||
this.initializers.AddRange (initializers);
|
||||
}
|
||||
|
||||
//
|
||||
// Properties
|
||||
//
|
||||
public CodeExpression SizeExpression {
|
||||
get {
|
||||
return sizeExpression;
|
||||
}
|
||||
|
||||
set {
|
||||
sizeExpression = value;
|
||||
}
|
||||
}
|
||||
|
||||
public int Size {
|
||||
get {
|
||||
return size;
|
||||
}
|
||||
|
||||
set {
|
||||
size = value;
|
||||
}
|
||||
}
|
||||
|
||||
public CodeExpressionCollection Initializers {
|
||||
get {
|
||||
return initializers;
|
||||
}
|
||||
|
||||
set {
|
||||
initializers = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string CreateType {
|
||||
get {
|
||||
return createType;
|
||||
}
|
||||
|
||||
set {
|
||||
createType = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
//
|
||||
// System.CodeDom CodeArrayCreateExpression Class implementation
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
|
||||
namespace System.CodeDom {
|
||||
|
||||
public class CodeAssignStatement : CodeStatement {
|
||||
|
||||
CodeExpression left, right;
|
||||
|
||||
//
|
||||
// Constructors
|
||||
//
|
||||
public CodeAssignStatement ()
|
||||
{
|
||||
}
|
||||
|
||||
public CodeAssignStatement (CodeExpression left, CodeExpression right)
|
||||
{
|
||||
this.left = left;
|
||||
this.right = right;
|
||||
}
|
||||
|
||||
//
|
||||
// Properties
|
||||
//
|
||||
public CodeExpression Left {
|
||||
get {
|
||||
return left;
|
||||
}
|
||||
|
||||
set {
|
||||
left = value;
|
||||
}
|
||||
}
|
||||
|
||||
public CodeExpression Right {
|
||||
get {
|
||||
return right;
|
||||
}
|
||||
|
||||
set {
|
||||
right = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
//
|
||||
// System.CodeDom CodeAttachEventStatement Class implementation
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
namespace System.CodeDom {
|
||||
|
||||
public class CodeAttachEventStatement : CodeStatement {
|
||||
CodeExpression targetObject;
|
||||
string eventName;
|
||||
CodeExpression newListener;
|
||||
|
||||
public CodeAttachEventStatement ()
|
||||
{
|
||||
}
|
||||
|
||||
public CodeAttachEventStatement (CodeExpression targetObject,
|
||||
string eventName,
|
||||
CodeExpression newListener)
|
||||
{
|
||||
this.targetObject = targetObject;
|
||||
this.eventName = eventName;
|
||||
this.newListener = newListener;
|
||||
}
|
||||
|
||||
//
|
||||
// Properties
|
||||
//
|
||||
public string EventName {
|
||||
get {
|
||||
return eventName;
|
||||
}
|
||||
|
||||
set {
|
||||
eventName = value;
|
||||
}
|
||||
}
|
||||
|
||||
public CodeExpression NewListener {
|
||||
get {
|
||||
return newListener;
|
||||
}
|
||||
|
||||
set {
|
||||
newListener = value;
|
||||
}
|
||||
}
|
||||
|
||||
public CodeExpression TargetObject {
|
||||
get {
|
||||
return targetObject;
|
||||
}
|
||||
|
||||
set {
|
||||
targetObject = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
//
|
||||
// System.CodeDom CodeAttributeArgument Class implementation
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
|
||||
namespace System.CodeDom {
|
||||
|
||||
public class CodeAttributeArgument {
|
||||
string name;
|
||||
CodeExpression val;
|
||||
|
||||
//
|
||||
// Constructors
|
||||
//
|
||||
public CodeAttributeArgument ()
|
||||
{
|
||||
}
|
||||
|
||||
public CodeAttributeArgument (CodeExpression value)
|
||||
{
|
||||
}
|
||||
|
||||
public CodeAttributeArgument (string name, CodeExpression val)
|
||||
{
|
||||
this.name = name;
|
||||
this.val = val;
|
||||
}
|
||||
|
||||
//
|
||||
// Properties
|
||||
//
|
||||
|
||||
public string Name {
|
||||
get {
|
||||
return name;
|
||||
}
|
||||
|
||||
set {
|
||||
name = value;
|
||||
}
|
||||
}
|
||||
|
||||
public CodeExpression Value {
|
||||
get {
|
||||
return val;
|
||||
}
|
||||
|
||||
set {
|
||||
val = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,166 @@
|
||||
//
|
||||
// System.CodeDom CodeAttributeArgumentCollection Class implementation
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
|
||||
namespace System.CodeDom {
|
||||
|
||||
using System.Collections;
|
||||
|
||||
public class CodeAttributeArgumentCollection : IList, ICollection, IEnumerable {
|
||||
|
||||
ArrayList attributeArgs;
|
||||
|
||||
//
|
||||
// Constructors
|
||||
//
|
||||
public CodeAttributeArgumentCollection ()
|
||||
{
|
||||
attributeArgs = new ArrayList ();
|
||||
}
|
||||
|
||||
//
|
||||
// Properties
|
||||
//
|
||||
public int Count {
|
||||
get {
|
||||
return attributeArgs.Count;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsFixedSize {
|
||||
get {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Methods
|
||||
//
|
||||
|
||||
public void Add (CodeAttributeArgument value)
|
||||
{
|
||||
attributeArgs.Add (value);
|
||||
}
|
||||
|
||||
public void AddRange (CodeAttributeArgument [] values)
|
||||
{
|
||||
foreach (CodeAttributeArgument ca in values)
|
||||
attributeArgs.Add (ca);
|
||||
|
||||
}
|
||||
|
||||
public void Clear ()
|
||||
{
|
||||
attributeArgs.Clear ();
|
||||
}
|
||||
|
||||
private class Enumerator : IEnumerator {
|
||||
private CodeAttributeArgumentCollection collection;
|
||||
private int currentIndex = -1;
|
||||
|
||||
internal Enumerator (CodeAttributeArgumentCollection collection)
|
||||
{
|
||||
this.collection = collection;
|
||||
}
|
||||
|
||||
public object Current {
|
||||
get {
|
||||
if (currentIndex == collection.Count)
|
||||
throw new InvalidOperationException ();
|
||||
return collection [currentIndex];
|
||||
}
|
||||
}
|
||||
|
||||
public bool MoveNext ()
|
||||
{
|
||||
if (currentIndex > collection.Count)
|
||||
throw new InvalidOperationException ();
|
||||
return ++currentIndex < collection.Count;
|
||||
}
|
||||
|
||||
public void Reset ()
|
||||
{
|
||||
currentIndex = -1;
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerator GetEnumerator ()
|
||||
{
|
||||
return new CodeAttributeArgumentCollection.Enumerator (this);
|
||||
}
|
||||
|
||||
//
|
||||
// IList method implementations
|
||||
//
|
||||
public int Add (object value)
|
||||
{
|
||||
return attributeArgs.Add (value);
|
||||
}
|
||||
|
||||
public bool Contains (Object value)
|
||||
{
|
||||
return attributeArgs.Contains (value);
|
||||
}
|
||||
|
||||
public int IndexOf (Object value)
|
||||
{
|
||||
return attributeArgs.IndexOf (value);
|
||||
}
|
||||
|
||||
public void Insert (int index, Object value)
|
||||
{
|
||||
attributeArgs [index] = value;
|
||||
}
|
||||
|
||||
public object this[int index] {
|
||||
get {
|
||||
return attributeArgs [index];
|
||||
}
|
||||
|
||||
set {
|
||||
attributeArgs [index] = value;
|
||||
}
|
||||
}
|
||||
|
||||
public void Remove (object value)
|
||||
{
|
||||
attributeArgs.Remove (value);
|
||||
}
|
||||
|
||||
public void RemoveAt (int index)
|
||||
{
|
||||
attributeArgs.RemoveAt (index);
|
||||
}
|
||||
|
||||
//
|
||||
// ICollection method implementations
|
||||
//
|
||||
public void CopyTo (Array array, int index)
|
||||
{
|
||||
attributeArgs.CopyTo (array, index);
|
||||
}
|
||||
|
||||
public object SyncRoot {
|
||||
get {
|
||||
return attributeArgs.SyncRoot;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsReadOnly {
|
||||
get {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsSynchronized {
|
||||
get {
|
||||
return attributeArgs.IsSynchronized;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
//
|
||||
// System.CodeDom CodeAttributeBlock Class implementation
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
|
||||
namespace System.CodeDom {
|
||||
|
||||
public class CodeAttributeBlock {
|
||||
|
||||
CodeAttributeDeclarationCollection attributes;
|
||||
|
||||
//
|
||||
// Constructors
|
||||
//
|
||||
public CodeAttributeBlock ()
|
||||
{
|
||||
}
|
||||
|
||||
public CodeAttributeBlock (CodeAttributeDeclaration [] attributes)
|
||||
{
|
||||
this.attributes = new CodeAttributeDeclarationCollection ();
|
||||
this.attributes.AddRange (attributes);
|
||||
}
|
||||
|
||||
//
|
||||
// Prpoperties
|
||||
//
|
||||
public CodeAttributeDeclarationCollection Attributes {
|
||||
get {
|
||||
return attributes;
|
||||
}
|
||||
|
||||
set {
|
||||
attributes = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
//
|
||||
// System.CodeDom CodeAttributeDeclaration Class implementation
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
|
||||
namespace System.CodeDom {
|
||||
|
||||
public class CodeAttributeDeclaration {
|
||||
|
||||
string name;
|
||||
CodeAttributeArgumentCollection arguments;
|
||||
|
||||
//
|
||||
// Constructors
|
||||
//
|
||||
public CodeAttributeDeclaration ()
|
||||
{
|
||||
}
|
||||
|
||||
public CodeAttributeDeclaration (string name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public CodeAttributeDeclaration (string name, CodeAttributeArgument [] arguments)
|
||||
{
|
||||
this.name = name;
|
||||
this.arguments = new CodeAttributeArgumentCollection ();
|
||||
this.arguments.AddRange (arguments);
|
||||
}
|
||||
|
||||
//
|
||||
// Properties
|
||||
//
|
||||
public CodeAttributeArgumentCollection Arguments {
|
||||
get {
|
||||
return arguments;
|
||||
}
|
||||
|
||||
set {
|
||||
arguments = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string Name {
|
||||
get {
|
||||
return name;
|
||||
}
|
||||
|
||||
set {
|
||||
name = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,165 @@
|
||||
//
|
||||
// System.CodeDom CodeAttributeDeclarationCollection Class implementation
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
|
||||
namespace System.CodeDom {
|
||||
|
||||
using System.Collections;
|
||||
|
||||
public class CodeAttributeDeclarationCollection : IList, ICollection, IEnumerable {
|
||||
|
||||
ArrayList attributeDecls;
|
||||
|
||||
//
|
||||
// Constructors
|
||||
//
|
||||
public CodeAttributeDeclarationCollection ()
|
||||
{
|
||||
attributeDecls = new ArrayList ();
|
||||
}
|
||||
|
||||
//
|
||||
// Properties
|
||||
//
|
||||
public int Count {
|
||||
get {
|
||||
return attributeDecls.Count;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsFixedSize {
|
||||
get {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Methods
|
||||
//
|
||||
public void Add (CodeAttributeDeclaration value)
|
||||
{
|
||||
attributeDecls.Add (value);
|
||||
}
|
||||
|
||||
public void AddRange (CodeAttributeDeclaration [] values)
|
||||
{
|
||||
foreach (CodeAttributeDeclaration ca in values)
|
||||
attributeDecls.Add (ca);
|
||||
|
||||
}
|
||||
|
||||
public void Clear ()
|
||||
{
|
||||
attributeDecls.Clear ();
|
||||
}
|
||||
|
||||
private class Enumerator : IEnumerator {
|
||||
private CodeAttributeDeclarationCollection collection;
|
||||
private int currentIndex = -1;
|
||||
|
||||
internal Enumerator (CodeAttributeDeclarationCollection collection)
|
||||
{
|
||||
this.collection = collection;
|
||||
}
|
||||
|
||||
public object Current {
|
||||
get {
|
||||
if (currentIndex == collection.Count)
|
||||
throw new InvalidOperationException ();
|
||||
return collection [currentIndex];
|
||||
}
|
||||
}
|
||||
|
||||
public bool MoveNext ()
|
||||
{
|
||||
if (currentIndex > collection.Count)
|
||||
throw new InvalidOperationException ();
|
||||
return ++currentIndex < collection.Count;
|
||||
}
|
||||
|
||||
public void Reset ()
|
||||
{
|
||||
currentIndex = -1;
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerator GetEnumerator ()
|
||||
{
|
||||
return new CodeAttributeDeclarationCollection.Enumerator (this);
|
||||
}
|
||||
|
||||
//
|
||||
// IList method implementations
|
||||
//
|
||||
public int Add (object value)
|
||||
{
|
||||
return attributeDecls.Add (value);
|
||||
}
|
||||
|
||||
public bool Contains (Object value)
|
||||
{
|
||||
return attributeDecls.Contains (value);
|
||||
}
|
||||
|
||||
public int IndexOf (Object value)
|
||||
{
|
||||
return attributeDecls.IndexOf (value);
|
||||
}
|
||||
|
||||
public void Insert (int index, Object value)
|
||||
{
|
||||
attributeDecls [index] = value;
|
||||
}
|
||||
|
||||
public object this[int index] {
|
||||
get {
|
||||
return attributeDecls [index];
|
||||
}
|
||||
|
||||
set {
|
||||
attributeDecls [index] = value;
|
||||
}
|
||||
}
|
||||
|
||||
public void Remove (object value)
|
||||
{
|
||||
attributeDecls.Remove (value);
|
||||
}
|
||||
|
||||
public void RemoveAt (int index)
|
||||
{
|
||||
attributeDecls.RemoveAt (index);
|
||||
}
|
||||
|
||||
//
|
||||
// ICollection method implementations
|
||||
//
|
||||
public void CopyTo (Array array, int index)
|
||||
{
|
||||
attributeDecls.CopyTo (array, index);
|
||||
}
|
||||
|
||||
public object SyncRoot {
|
||||
get {
|
||||
return attributeDecls.SyncRoot;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsReadOnly {
|
||||
get {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsSynchronized {
|
||||
get {
|
||||
return attributeDecls.IsSynchronized;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
//
|
||||
// System.CodeDom CodeBaseReferenceExpression Class implementation
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
|
||||
namespace System.CodeDom {
|
||||
|
||||
public class CodeBaseReferenceExpression : CodeExpression {
|
||||
public CodeBaseReferenceExpression () {}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
//
|
||||
// System.CodeDom CodeBinaryOperatorExpression Class implementation
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
|
||||
namespace System.CodeDom {
|
||||
|
||||
public class CodeBinaryOperatorExpression : CodeExpression {
|
||||
|
||||
CodeExpression left, right;
|
||||
CodeBinaryOperatorType oper;
|
||||
|
||||
public enum CodeBinaryOperatorType {
|
||||
Add,
|
||||
Substract,
|
||||
Multiply,
|
||||
Divide,
|
||||
Modulus,
|
||||
Assign,
|
||||
IdentityInequality,
|
||||
IdentityEquality,
|
||||
ValueEquality,
|
||||
BitwiseOr,
|
||||
BitwiseAnd,
|
||||
BooleanOr,
|
||||
BooleanAnd,
|
||||
LessThan,
|
||||
LessThanOrEqual,
|
||||
GreatherThan,
|
||||
GreatherThanOrEqual,
|
||||
}
|
||||
|
||||
//
|
||||
// Constructors
|
||||
//
|
||||
public CodeBinaryOperatorExpression ()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
public CodeBinaryOperatorExpression (CodeExpression left,
|
||||
CodeBinaryOperatorType oper,
|
||||
CodeExpression right)
|
||||
{
|
||||
this.left = left;
|
||||
this.oper = oper;
|
||||
this.right = right;
|
||||
}
|
||||
|
||||
//
|
||||
// Properties
|
||||
//
|
||||
public CodeExpression Left {
|
||||
get {
|
||||
return left;
|
||||
}
|
||||
|
||||
set {
|
||||
left = value;
|
||||
}
|
||||
}
|
||||
|
||||
public CodeExpression Right {
|
||||
get {
|
||||
return right;
|
||||
}
|
||||
|
||||
set {
|
||||
right = value;
|
||||
}
|
||||
}
|
||||
|
||||
public CodeBinaryOperatorType Operator {
|
||||
get {
|
||||
return oper;
|
||||
}
|
||||
|
||||
set {
|
||||
oper = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
//
|
||||
// System.CodeDom CodeCastExpression Class implementation
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
|
||||
namespace System.CodeDom {
|
||||
|
||||
public class CodeCastExpression : CodeExpression {
|
||||
string targetType;
|
||||
CodeExpression expression;
|
||||
|
||||
//
|
||||
// Constructors
|
||||
//
|
||||
public CodeCastExpression ()
|
||||
{
|
||||
}
|
||||
|
||||
public CodeCastExpression (string targetType, CodeExpression expression)
|
||||
{
|
||||
this.targetType = targetType;
|
||||
this.expression = expression;
|
||||
}
|
||||
|
||||
//
|
||||
// Properties
|
||||
//
|
||||
public CodeExpression Expression {
|
||||
get {
|
||||
return expression;
|
||||
}
|
||||
|
||||
set {
|
||||
expression = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string TargetType {
|
||||
get {
|
||||
return targetType;
|
||||
}
|
||||
|
||||
set {
|
||||
targetType = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
//
|
||||
// System.CodeDom CodeCatchClaus Class implementation
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
|
||||
namespace System.CodeDom {
|
||||
|
||||
public class CodeCatchClause {
|
||||
|
||||
CodeParameterDeclarationExpression condition;
|
||||
CodeStatementCollection statements;
|
||||
|
||||
public CodeCatchClause ()
|
||||
{
|
||||
this.statements = new CodeStatementCollection ();
|
||||
}
|
||||
|
||||
public CodeCatchClause (CodeParameterDeclarationExpression condition,
|
||||
CodeStatement [] statements)
|
||||
{
|
||||
this.condition = condition;
|
||||
this.statements = new CodeStatementCollection ();
|
||||
this.statements.AddRange (statements);
|
||||
}
|
||||
|
||||
public CodeStatementCollection Statements {
|
||||
get {
|
||||
return statements;
|
||||
}
|
||||
}
|
||||
|
||||
public CodeParameterDeclarationExpression Condition {
|
||||
get {
|
||||
return condition;
|
||||
}
|
||||
|
||||
set {
|
||||
condition = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,165 @@
|
||||
//
|
||||
// System.CodeDom CodeCatchClauseCollection Class implementation
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
|
||||
namespace System.CodeDom {
|
||||
|
||||
using System.Collections;
|
||||
|
||||
public class CodeCatchClauseCollection : IList, ICollection, IEnumerable {
|
||||
|
||||
ArrayList catchClauses;
|
||||
|
||||
//
|
||||
// Constructors
|
||||
//
|
||||
public CodeCatchClauseCollection ()
|
||||
{
|
||||
catchClauses = new ArrayList ();
|
||||
}
|
||||
|
||||
//
|
||||
// Properties
|
||||
//
|
||||
public int Count {
|
||||
get {
|
||||
return catchClauses.Count;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsFixedSize {
|
||||
get {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Methods
|
||||
//
|
||||
public void Add (CodeCatchClause value)
|
||||
{
|
||||
catchClauses.Add (value);
|
||||
}
|
||||
|
||||
public void AddRange (CodeCatchClause [] values)
|
||||
{
|
||||
foreach (CodeCatchClause ca in values)
|
||||
catchClauses.Add (ca);
|
||||
|
||||
}
|
||||
|
||||
public void Clear ()
|
||||
{
|
||||
catchClauses.Clear ();
|
||||
}
|
||||
|
||||
private class Enumerator : IEnumerator {
|
||||
private CodeCatchClauseCollection collection;
|
||||
private int currentIndex = -1;
|
||||
|
||||
internal Enumerator (CodeCatchClauseCollection collection)
|
||||
{
|
||||
this.collection = collection;
|
||||
}
|
||||
|
||||
public object Current {
|
||||
get {
|
||||
if (currentIndex == collection.Count)
|
||||
throw new InvalidOperationException ();
|
||||
return collection [currentIndex];
|
||||
}
|
||||
}
|
||||
|
||||
public bool MoveNext ()
|
||||
{
|
||||
if (currentIndex > collection.Count)
|
||||
throw new InvalidOperationException ();
|
||||
return ++currentIndex < collection.Count;
|
||||
}
|
||||
|
||||
public void Reset ()
|
||||
{
|
||||
currentIndex = -1;
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerator GetEnumerator ()
|
||||
{
|
||||
return new CodeCatchClauseCollection.Enumerator (this);
|
||||
}
|
||||
|
||||
//
|
||||
// IList method implementations
|
||||
//
|
||||
public int Add (object value)
|
||||
{
|
||||
return catchClauses.Add (value);
|
||||
}
|
||||
|
||||
public bool Contains (Object value)
|
||||
{
|
||||
return catchClauses.Contains (value);
|
||||
}
|
||||
|
||||
public int IndexOf (Object value)
|
||||
{
|
||||
return catchClauses.IndexOf (value);
|
||||
}
|
||||
|
||||
public void Insert (int index, Object value)
|
||||
{
|
||||
catchClauses [index] = value;
|
||||
}
|
||||
|
||||
public object this[int index] {
|
||||
get {
|
||||
return catchClauses [index];
|
||||
}
|
||||
|
||||
set {
|
||||
catchClauses [index] = value;
|
||||
}
|
||||
}
|
||||
|
||||
public void Remove (object value)
|
||||
{
|
||||
catchClauses.Remove (value);
|
||||
}
|
||||
|
||||
public void RemoveAt (int index)
|
||||
{
|
||||
catchClauses.RemoveAt (index);
|
||||
}
|
||||
|
||||
//
|
||||
// ICollection method implementations
|
||||
//
|
||||
public void CopyTo (Array array, int index)
|
||||
{
|
||||
catchClauses.CopyTo (array, index);
|
||||
}
|
||||
|
||||
public object SyncRoot {
|
||||
get {
|
||||
return catchClauses.SyncRoot;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsReadOnly {
|
||||
get {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsSynchronized {
|
||||
get {
|
||||
return catchClauses.IsSynchronized;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Executable
+107
@@ -0,0 +1,107 @@
|
||||
//
|
||||
// System.CodeDom CodeClass Class implementation
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
|
||||
using System.Collections.Specialized;
|
||||
|
||||
namespace System.CodeDom {
|
||||
using System.Reflection;
|
||||
using System.Collections;
|
||||
|
||||
public class CodeClass : CodeClassMember {
|
||||
CodeClassMemberCollection members;
|
||||
TypeAttributes attrs;
|
||||
StringCollection baseTypes;
|
||||
bool isClass, isEnum, isInterface, isStruct;
|
||||
|
||||
string name;
|
||||
|
||||
//
|
||||
// Constructors
|
||||
//
|
||||
public CodeClass ()
|
||||
{
|
||||
}
|
||||
|
||||
public CodeClass (string name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
//
|
||||
// Properties
|
||||
//
|
||||
public TypeAttributes attributes {
|
||||
get {
|
||||
return attrs;
|
||||
}
|
||||
|
||||
set {
|
||||
attrs = value;
|
||||
}
|
||||
}
|
||||
|
||||
public StringCollection BaseTypes {
|
||||
get {
|
||||
return baseTypes;
|
||||
}
|
||||
|
||||
set {
|
||||
baseTypes = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsClass {
|
||||
get {
|
||||
return isClass;
|
||||
}
|
||||
|
||||
set {
|
||||
isClass = value;
|
||||
}
|
||||
}
|
||||
public bool IsEnum {
|
||||
get {
|
||||
return isEnum;
|
||||
}
|
||||
|
||||
set {
|
||||
isEnum = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsInterface {
|
||||
get {
|
||||
return isInterface;
|
||||
}
|
||||
|
||||
set {
|
||||
isInterface = value;
|
||||
}
|
||||
}
|
||||
public bool IsStruct {
|
||||
get {
|
||||
return isStruct;
|
||||
}
|
||||
|
||||
set {
|
||||
isStruct = value;
|
||||
}
|
||||
}
|
||||
|
||||
public CodeClassMemberCollection Members {
|
||||
get {
|
||||
return members;
|
||||
}
|
||||
|
||||
set {
|
||||
members = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+165
@@ -0,0 +1,165 @@
|
||||
//
|
||||
// System.CodeDom CodeClassCollection Class implementation
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
|
||||
namespace System.CodeDom {
|
||||
|
||||
using System.Collections;
|
||||
|
||||
public class CodeClassCollection : IList, ICollection, IEnumerable {
|
||||
|
||||
ArrayList classes;
|
||||
|
||||
//
|
||||
// Constructors
|
||||
//
|
||||
public CodeClassCollection ()
|
||||
{
|
||||
classes = new ArrayList ();
|
||||
}
|
||||
|
||||
//
|
||||
// Properties
|
||||
//
|
||||
public int Count {
|
||||
get {
|
||||
return classes.Count;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsFixedSize {
|
||||
get {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Methods
|
||||
//
|
||||
public void Add (CodeClass value)
|
||||
{
|
||||
classes.Add (value);
|
||||
}
|
||||
|
||||
public void AddRange (CodeClass [] values)
|
||||
{
|
||||
foreach (CodeClass ca in values)
|
||||
classes.Add (ca);
|
||||
|
||||
}
|
||||
|
||||
public void Clear ()
|
||||
{
|
||||
classes.Clear ();
|
||||
}
|
||||
|
||||
private class Enumerator : IEnumerator {
|
||||
private CodeClassCollection collection;
|
||||
private int currentIndex = -1;
|
||||
|
||||
internal Enumerator (CodeClassCollection collection)
|
||||
{
|
||||
this.collection = collection;
|
||||
}
|
||||
|
||||
public object Current {
|
||||
get {
|
||||
if (currentIndex == collection.Count)
|
||||
throw new InvalidOperationException ();
|
||||
return collection [currentIndex];
|
||||
}
|
||||
}
|
||||
|
||||
public bool MoveNext ()
|
||||
{
|
||||
if (currentIndex > collection.Count)
|
||||
throw new InvalidOperationException ();
|
||||
return ++currentIndex < collection.Count;
|
||||
}
|
||||
|
||||
public void Reset ()
|
||||
{
|
||||
currentIndex = -1;
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerator GetEnumerator ()
|
||||
{
|
||||
return new CodeClassCollection.Enumerator (this);
|
||||
}
|
||||
|
||||
//
|
||||
// IList method implementations
|
||||
//
|
||||
public int Add (object value)
|
||||
{
|
||||
return classes.Add (value);
|
||||
}
|
||||
|
||||
public bool Contains (Object value)
|
||||
{
|
||||
return classes.Contains (value);
|
||||
}
|
||||
|
||||
public int IndexOf (Object value)
|
||||
{
|
||||
return classes.IndexOf (value);
|
||||
}
|
||||
|
||||
public void Insert (int index, Object value)
|
||||
{
|
||||
classes [index] = value;
|
||||
}
|
||||
|
||||
public object this[int index] {
|
||||
get {
|
||||
return classes [index];
|
||||
}
|
||||
|
||||
set {
|
||||
classes [index] = value;
|
||||
}
|
||||
}
|
||||
|
||||
public void Remove (object value)
|
||||
{
|
||||
classes.Remove (value);
|
||||
}
|
||||
|
||||
public void RemoveAt (int index)
|
||||
{
|
||||
classes.RemoveAt (index);
|
||||
}
|
||||
|
||||
//
|
||||
// ICollection method implementations
|
||||
//
|
||||
public void CopyTo (Array array, int index)
|
||||
{
|
||||
classes.CopyTo (array, index);
|
||||
}
|
||||
|
||||
public object SyncRoot {
|
||||
get {
|
||||
return classes.SyncRoot;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsReadOnly {
|
||||
get {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsSynchronized {
|
||||
get {
|
||||
return classes.IsSynchronized;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// System.CodeDom CodeClassConstructor Class implementation
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
|
||||
namespace System.CodeDom {
|
||||
public class CodeClassConstructor : CodeMemberMethod {
|
||||
|
||||
public CodeClassConstructor ()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
//
|
||||
// System.CodeDom CodeClassDelegate Class implementation
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
|
||||
namespace System.CodeDom {
|
||||
|
||||
public class CodeClassDelegate : CodeClass {
|
||||
CodeParameterDeclarationExpressionCollection parameters;
|
||||
string returnType;
|
||||
string name;
|
||||
|
||||
//
|
||||
// Constructors
|
||||
//
|
||||
public CodeClassDelegate ()
|
||||
{
|
||||
}
|
||||
|
||||
public CodeClassDelegate (string name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
//
|
||||
// Properties
|
||||
//
|
||||
public CodeParameterDeclarationExpressionCollection Parameters {
|
||||
get {
|
||||
return parameters;
|
||||
}
|
||||
|
||||
set {
|
||||
parameters = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string ReturnType {
|
||||
get {
|
||||
return returnType;
|
||||
}
|
||||
|
||||
set {
|
||||
returnType = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
//
|
||||
// System.CodeDom CodeClassMember Class implementation
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
|
||||
namespace System.CodeDom {
|
||||
|
||||
public class CodeClassMember : CodeStatement {
|
||||
MemberAttributes attributes;
|
||||
CodeAttributeBlock customAttributes;
|
||||
|
||||
string name;
|
||||
|
||||
//
|
||||
// Yeah, this is a strange way of defining this
|
||||
//
|
||||
public enum MemberAttributes {
|
||||
Abstract = 0x0001,
|
||||
Final = 0x0002,
|
||||
Override = 0x0004,
|
||||
Const = 0x0005,
|
||||
Assembly = 0x1000,
|
||||
AccessMask = 0xf000,
|
||||
FamANDAssem = 0x2000,
|
||||
Family = 0x3000,
|
||||
FamORAssem = 0x4000,
|
||||
New = 0x0010,
|
||||
Private = 0x5000,
|
||||
Public = 0x6000,
|
||||
ScopeMask = 0x000f,
|
||||
Static = 0x0003,
|
||||
VTableMask = 0x00f0
|
||||
}
|
||||
|
||||
//
|
||||
// Constructors
|
||||
//
|
||||
public CodeClassMember ()
|
||||
{
|
||||
}
|
||||
|
||||
//
|
||||
// Properties
|
||||
//
|
||||
|
||||
public MemberAttributes Attributes {
|
||||
get {
|
||||
return attributes;
|
||||
}
|
||||
|
||||
set {
|
||||
attributes = value;
|
||||
}
|
||||
}
|
||||
|
||||
public CodeAttributeBlock CustomAttributes {
|
||||
get {
|
||||
return customAttributes;
|
||||
}
|
||||
|
||||
set {
|
||||
customAttributes = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string Name {
|
||||
get {
|
||||
return name;
|
||||
}
|
||||
|
||||
set {
|
||||
name = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,165 @@
|
||||
//
|
||||
// System.CodeDom CodeClassMemberCollection Class implementation
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
|
||||
namespace System.CodeDom {
|
||||
|
||||
using System.Collections;
|
||||
|
||||
public class CodeClassMemberCollection : IList, ICollection, IEnumerable {
|
||||
|
||||
ArrayList classMembers;
|
||||
|
||||
//
|
||||
// Constructors
|
||||
//
|
||||
public CodeClassMemberCollection ()
|
||||
{
|
||||
classMembers = new ArrayList ();
|
||||
}
|
||||
|
||||
//
|
||||
// Properties
|
||||
//
|
||||
public int Count {
|
||||
get {
|
||||
return classMembers.Count;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsFixedSize {
|
||||
get {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Methods
|
||||
//
|
||||
public void Add (CodeClassMember value)
|
||||
{
|
||||
classMembers.Add (value);
|
||||
}
|
||||
|
||||
public void AddRange (CodeClassMember [] values)
|
||||
{
|
||||
foreach (CodeClassMember ca in values)
|
||||
classMembers.Add (ca);
|
||||
|
||||
}
|
||||
|
||||
public void Clear ()
|
||||
{
|
||||
classMembers.Clear ();
|
||||
}
|
||||
|
||||
private class Enumerator : IEnumerator {
|
||||
private CodeClassMemberCollection collection;
|
||||
private int currentIndex = -1;
|
||||
|
||||
internal Enumerator (CodeClassMemberCollection collection)
|
||||
{
|
||||
this.collection = collection;
|
||||
}
|
||||
|
||||
public object Current {
|
||||
get {
|
||||
if (currentIndex == collection.Count)
|
||||
throw new InvalidOperationException ();
|
||||
return collection [currentIndex];
|
||||
}
|
||||
}
|
||||
|
||||
public bool MoveNext ()
|
||||
{
|
||||
if (currentIndex > collection.Count)
|
||||
throw new InvalidOperationException ();
|
||||
return ++currentIndex < collection.Count;
|
||||
}
|
||||
|
||||
public void Reset ()
|
||||
{
|
||||
currentIndex = -1;
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerator GetEnumerator ()
|
||||
{
|
||||
return new CodeClassMemberCollection.Enumerator (this);
|
||||
}
|
||||
|
||||
//
|
||||
// IList method implementations
|
||||
//
|
||||
public int Add (object value)
|
||||
{
|
||||
return classMembers.Add (value);
|
||||
}
|
||||
|
||||
public bool Contains (Object value)
|
||||
{
|
||||
return classMembers.Contains (value);
|
||||
}
|
||||
|
||||
public int IndexOf (Object value)
|
||||
{
|
||||
return classMembers.IndexOf (value);
|
||||
}
|
||||
|
||||
public void Insert (int index, Object value)
|
||||
{
|
||||
classMembers [index] = value;
|
||||
}
|
||||
|
||||
public object this[int index] {
|
||||
get {
|
||||
return classMembers [index];
|
||||
}
|
||||
|
||||
set {
|
||||
classMembers [index] = value;
|
||||
}
|
||||
}
|
||||
|
||||
public void Remove (object value)
|
||||
{
|
||||
classMembers.Remove (value);
|
||||
}
|
||||
|
||||
public void RemoveAt (int index)
|
||||
{
|
||||
classMembers.RemoveAt (index);
|
||||
}
|
||||
|
||||
//
|
||||
// ICollection method implementations
|
||||
//
|
||||
public void CopyTo (Array array, int index)
|
||||
{
|
||||
classMembers.CopyTo (array, index);
|
||||
}
|
||||
|
||||
public object SyncRoot {
|
||||
get {
|
||||
return classMembers.SyncRoot;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsReadOnly {
|
||||
get {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsSynchronized {
|
||||
get {
|
||||
return classMembers.IsSynchronized;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
//
|
||||
// System.CodeDom CodeCommentStatement Class implementation
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
|
||||
namespace System.CodeDom {
|
||||
|
||||
public class CodeCommentStatement : CodeStatement {
|
||||
string text;
|
||||
|
||||
//
|
||||
// Constructors
|
||||
//
|
||||
public CodeCommentStatement ()
|
||||
{
|
||||
}
|
||||
|
||||
public CodeCommentStatement (string text)
|
||||
{
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
string Text {
|
||||
get {
|
||||
return text;
|
||||
}
|
||||
|
||||
set {
|
||||
text = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
//
|
||||
// System.CodeDom CodeConstructor Class implementation
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
|
||||
namespace System.CodeDom {
|
||||
|
||||
public class CodeConstructor : CodeMemberMethod {
|
||||
CodeExpressionCollection baseConstructorArgs;
|
||||
CodeExpressionCollection chainedConstructorArgs;
|
||||
|
||||
//
|
||||
// Constructors
|
||||
//
|
||||
public CodeConstructor ()
|
||||
{
|
||||
}
|
||||
|
||||
public CodeExpressionCollection BaseConstructorArgs {
|
||||
get {
|
||||
return baseConstructorArgs;
|
||||
}
|
||||
|
||||
set {
|
||||
baseConstructorArgs = value;
|
||||
}
|
||||
}
|
||||
|
||||
public CodeExpressionCollection ChainedConstructorArgs {
|
||||
get {
|
||||
return chainedConstructorArgs;
|
||||
}
|
||||
|
||||
set {
|
||||
chainedConstructorArgs = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
//
|
||||
// System.CodeDom CodeDelegateCreateExpression Class implementation
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
|
||||
namespace System.CodeDom {
|
||||
|
||||
public class CodeDelegateCreateExpression : CodeExpression {
|
||||
string delegateType, methodName;
|
||||
CodeExpression targetObject;
|
||||
|
||||
//
|
||||
// Constructors
|
||||
//
|
||||
public CodeDelegateCreateExpression (string delegateType,
|
||||
CodeExpression targetObject,
|
||||
string methodName)
|
||||
{
|
||||
this.delegateType = delegateType;
|
||||
this.targetObject = targetObject;
|
||||
this.methodName = methodName;
|
||||
}
|
||||
|
||||
public CodeDelegateCreateExpression ()
|
||||
{
|
||||
}
|
||||
|
||||
//
|
||||
// Properties
|
||||
//
|
||||
|
||||
string DelegateType {
|
||||
get {
|
||||
return delegateType;
|
||||
}
|
||||
|
||||
set {
|
||||
delegateType = value;
|
||||
}
|
||||
}
|
||||
|
||||
string MethodName {
|
||||
get {
|
||||
return methodName;
|
||||
}
|
||||
|
||||
set {
|
||||
methodName = value;
|
||||
}
|
||||
}
|
||||
|
||||
CodeExpression TargetObject {
|
||||
get {
|
||||
return targetObject;
|
||||
}
|
||||
|
||||
set {
|
||||
targetObject = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
//
|
||||
// System.CodeDom CodeDelegateInvokeExpression Class implementation
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
|
||||
namespace System.CodeDom {
|
||||
|
||||
public class CodeDelegateInvokeExpression : CodeExpression {
|
||||
CodeExpressionCollection parameters;
|
||||
CodeExpression targetObject;
|
||||
|
||||
//
|
||||
// Constructors
|
||||
//
|
||||
public CodeDelegateInvokeExpression ()
|
||||
{
|
||||
}
|
||||
|
||||
public CodeDelegateInvokeExpression (CodeExpression targetObject,
|
||||
CodeExpression [] parameters)
|
||||
{
|
||||
this.targetObject = targetObject;
|
||||
this.parameters = new CodeExpressionCollection ();
|
||||
this.parameters.AddRange (parameters);
|
||||
}
|
||||
|
||||
public CodeDelegateInvokeExpression (CodeExpression targetObject)
|
||||
{
|
||||
this.targetObject = targetObject;
|
||||
}
|
||||
|
||||
//
|
||||
// Properties
|
||||
//
|
||||
public CodeExpression TargetObject {
|
||||
get {
|
||||
return targetObject;
|
||||
}
|
||||
|
||||
set {
|
||||
targetObject = value;
|
||||
}
|
||||
}
|
||||
|
||||
public CodeExpressionCollection Parameters {
|
||||
get {
|
||||
return parameters;
|
||||
}
|
||||
|
||||
set {
|
||||
parameters = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
//
|
||||
// System.CodeDom CodeDelegateInvokeStatement Class implementation
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
|
||||
namespace System.CodeDom {
|
||||
|
||||
public class CodeDelegateInvokeStatement : CodeStatement {
|
||||
CodeStatementCollection parameters;
|
||||
CodeStatement targetObject;
|
||||
CodeDelegateInvokeExpression delegateInvoke;
|
||||
|
||||
//
|
||||
// Constructors
|
||||
//
|
||||
public CodeDelegateInvokeStatement ()
|
||||
{
|
||||
}
|
||||
|
||||
public CodeDelegateInvokeStatement (CodeStatement targetObject)
|
||||
{
|
||||
this.targetObject = targetObject;
|
||||
}
|
||||
|
||||
public CodeDelegateInvokeStatement (CodeDelegateInvokeExpression delegateInvoke)
|
||||
{
|
||||
this.delegateInvoke = delegateInvoke;
|
||||
}
|
||||
|
||||
public CodeDelegateInvokeStatement (CodeStatement targetObject,
|
||||
CodeStatement [] parameters)
|
||||
{
|
||||
this.targetObject = targetObject;
|
||||
this.parameters = new CodeStatementCollection ();
|
||||
this.parameters.AddRange (parameters);
|
||||
}
|
||||
|
||||
//
|
||||
// Properties
|
||||
//
|
||||
public CodeDelegateInvokeExpression DelegateInvoke {
|
||||
get {
|
||||
return delegateInvoke;
|
||||
}
|
||||
|
||||
set {
|
||||
delegateInvoke = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
//
|
||||
// System.CodeDom CodeDetachEventStatement Class implementation
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
|
||||
namespace System.CodeDom {
|
||||
|
||||
public class CodeDetachEventStatement : CodeStatement {
|
||||
string eventName;
|
||||
CodeExpression targetObject, newListener;
|
||||
|
||||
//
|
||||
// Constructors
|
||||
//
|
||||
public CodeDetachEventStatement ()
|
||||
{
|
||||
}
|
||||
|
||||
public CodeDetachEventStatement (CodeExpression targetObject,
|
||||
string eventName,
|
||||
CodeExpression newListener)
|
||||
{
|
||||
this.targetObject = targetObject;
|
||||
this.eventName = eventName;
|
||||
this.newListener = newListener;
|
||||
}
|
||||
|
||||
public string EventName {
|
||||
get {
|
||||
return eventName;
|
||||
}
|
||||
|
||||
set {
|
||||
eventName = value;
|
||||
}
|
||||
}
|
||||
|
||||
public CodeExpression TargetObject {
|
||||
get {
|
||||
return targetObject;
|
||||
}
|
||||
|
||||
set {
|
||||
targetObject = value;
|
||||
}
|
||||
}
|
||||
|
||||
public CodeExpression NewListener {
|
||||
get {
|
||||
return newListener;
|
||||
}
|
||||
|
||||
set {
|
||||
newListener = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
//
|
||||
// System.CodeDom CodeExpression Class implementation
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
|
||||
namespace System.CodeDom {
|
||||
|
||||
public class CodeExpression {
|
||||
object userData;
|
||||
|
||||
//
|
||||
// Constructors
|
||||
//
|
||||
public CodeExpression ()
|
||||
{
|
||||
}
|
||||
|
||||
//
|
||||
// Properties
|
||||
//
|
||||
public object UserData {
|
||||
get {
|
||||
return userData;
|
||||
}
|
||||
|
||||
set {
|
||||
userData = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+165
@@ -0,0 +1,165 @@
|
||||
//
|
||||
// System.CodeDom CodeExpressionCollection Class implementation
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
|
||||
namespace System.CodeDom {
|
||||
|
||||
using System.Collections;
|
||||
|
||||
public class CodeExpressionCollection : IList, ICollection, IEnumerable {
|
||||
|
||||
ArrayList expressions;
|
||||
|
||||
//
|
||||
// Constructors
|
||||
//
|
||||
public CodeExpressionCollection ()
|
||||
{
|
||||
expressions = new ArrayList ();
|
||||
}
|
||||
|
||||
//
|
||||
// Properties
|
||||
//
|
||||
public int Count {
|
||||
get {
|
||||
return expressions.Count;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsFixedSize {
|
||||
get {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Methods
|
||||
//
|
||||
public void Add (CodeExpression value)
|
||||
{
|
||||
expressions.Add (value);
|
||||
}
|
||||
|
||||
public void AddRange (CodeExpression [] values)
|
||||
{
|
||||
foreach (CodeExpression ca in values)
|
||||
expressions.Add (ca);
|
||||
|
||||
}
|
||||
|
||||
public void Clear ()
|
||||
{
|
||||
expressions.Clear ();
|
||||
}
|
||||
|
||||
private class Enumerator : IEnumerator {
|
||||
private CodeExpressionCollection collection;
|
||||
private int currentIndex = -1;
|
||||
|
||||
internal Enumerator (CodeExpressionCollection collection)
|
||||
{
|
||||
this.collection = collection;
|
||||
}
|
||||
|
||||
public object Current {
|
||||
get {
|
||||
if (currentIndex == collection.Count)
|
||||
throw new InvalidOperationException ();
|
||||
return collection [currentIndex];
|
||||
}
|
||||
}
|
||||
|
||||
public bool MoveNext ()
|
||||
{
|
||||
if (currentIndex > collection.Count)
|
||||
throw new InvalidOperationException ();
|
||||
return ++currentIndex < collection.Count;
|
||||
}
|
||||
|
||||
public void Reset ()
|
||||
{
|
||||
currentIndex = -1;
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerator GetEnumerator ()
|
||||
{
|
||||
return new CodeExpressionCollection.Enumerator (this);
|
||||
}
|
||||
|
||||
//
|
||||
// IList method implementations
|
||||
//
|
||||
public int Add (object value)
|
||||
{
|
||||
return expressions.Add (value);
|
||||
}
|
||||
|
||||
public bool Contains (Object value)
|
||||
{
|
||||
return expressions.Contains (value);
|
||||
}
|
||||
|
||||
public int IndexOf (Object value)
|
||||
{
|
||||
return expressions.IndexOf (value);
|
||||
}
|
||||
|
||||
public void Insert (int index, Object value)
|
||||
{
|
||||
expressions [index] = value;
|
||||
}
|
||||
|
||||
public object this[int index] {
|
||||
get {
|
||||
return expressions [index];
|
||||
}
|
||||
|
||||
set {
|
||||
expressions [index] = value;
|
||||
}
|
||||
}
|
||||
|
||||
public void Remove (object value)
|
||||
{
|
||||
expressions.Remove (value);
|
||||
}
|
||||
|
||||
public void RemoveAt (int index)
|
||||
{
|
||||
expressions.RemoveAt (index);
|
||||
}
|
||||
|
||||
//
|
||||
// ICollection method implementations
|
||||
//
|
||||
public void CopyTo (Array array, int index)
|
||||
{
|
||||
expressions.CopyTo (array, index);
|
||||
}
|
||||
|
||||
public object SyncRoot {
|
||||
get {
|
||||
return expressions.SyncRoot;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsReadOnly {
|
||||
get {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsSynchronized {
|
||||
get {
|
||||
return expressions.IsSynchronized;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
//
|
||||
// System.CodeDom CodeFieldReferenceExpression Class implementation
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
|
||||
namespace System.CodeDom {
|
||||
|
||||
public class CodeFieldReferenceExpression : CodeExpression {
|
||||
CodeExpression targetObject;
|
||||
string fieldName;
|
||||
FieldDirection direction;
|
||||
|
||||
public enum FieldDirection {
|
||||
In,
|
||||
Out,
|
||||
Ref
|
||||
}
|
||||
|
||||
//
|
||||
// Constructors
|
||||
//
|
||||
public CodeFieldReferenceExpression ()
|
||||
{
|
||||
}
|
||||
|
||||
public CodeFieldReferenceExpression (CodeExpression targetObject,
|
||||
string fieldName)
|
||||
{
|
||||
this.targetObject = targetObject;
|
||||
this.fieldName = fieldName;
|
||||
}
|
||||
|
||||
//
|
||||
// Properties
|
||||
//
|
||||
public FieldDirection Direction {
|
||||
get {
|
||||
return direction;
|
||||
}
|
||||
|
||||
set {
|
||||
direction = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string FieldName {
|
||||
get {
|
||||
return fieldName;
|
||||
}
|
||||
|
||||
set {
|
||||
fieldName = value;
|
||||
}
|
||||
}
|
||||
|
||||
public CodeExpression TargetObject {
|
||||
get {
|
||||
return targetObject;
|
||||
}
|
||||
|
||||
set {
|
||||
targetObject = value;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
//
|
||||
// System.CodeDom CodeForLoopStatement Class implementation
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
|
||||
namespace System.CodeDom {
|
||||
|
||||
public class CodeForLoopStatement : CodeExpression {
|
||||
CodeStatement initStatement, incrementStatement;
|
||||
CodeExpression testExpression;
|
||||
CodeStatementCollection statements;
|
||||
|
||||
//
|
||||
// Constructors
|
||||
//
|
||||
public CodeForLoopStatement ()
|
||||
{
|
||||
statements = new CodeStatementCollection ();
|
||||
}
|
||||
|
||||
public CodeForLoopStatement (CodeStatement initStatement,
|
||||
CodeExpression testExpression,
|
||||
CodeStatement incrementStatement,
|
||||
CodeStatement [] statements)
|
||||
{
|
||||
this.initStatement = initStatement;
|
||||
this.testExpression = testExpression;
|
||||
this.incrementStatement = incrementStatement;
|
||||
this.statements = new CodeStatementCollection ();
|
||||
this.statements.AddRange (statements);
|
||||
}
|
||||
|
||||
//
|
||||
// Properties
|
||||
//
|
||||
|
||||
public CodeStatement InitStatement {
|
||||
get {
|
||||
return initStatement;
|
||||
}
|
||||
|
||||
set {
|
||||
initStatement = value;
|
||||
}
|
||||
}
|
||||
|
||||
public CodeStatement IncrementStatement {
|
||||
get {
|
||||
return incrementStatement;
|
||||
}
|
||||
|
||||
set {
|
||||
incrementStatement = value;
|
||||
}
|
||||
}
|
||||
|
||||
public CodeStatementCollection Statements {
|
||||
get {
|
||||
return statements;
|
||||
}
|
||||
}
|
||||
|
||||
public CodeExpression TestExpression {
|
||||
get {
|
||||
return testExpression;
|
||||
}
|
||||
|
||||
set {
|
||||
testExpression = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
//
|
||||
// System.CodeDom CodeIfStatement Class implementation
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
|
||||
namespace System.CodeDom {
|
||||
|
||||
public class CodeIfStatement : CodeStatement {
|
||||
|
||||
CodeExpression condition;
|
||||
CodeStatementCollection trueStatements;
|
||||
CodeStatementCollection falseStatements;
|
||||
|
||||
//
|
||||
// Constructors
|
||||
//
|
||||
public CodeIfStatement ()
|
||||
{
|
||||
trueStatements = new CodeStatementCollection ();
|
||||
falseStatements = new CodeStatementCollection ();
|
||||
}
|
||||
|
||||
public CodeIfStatement (CodeExpression condition, CodeStatement [] trueStatements)
|
||||
{
|
||||
this.condition = condition;
|
||||
this.trueStatements = new CodeStatementCollection ();
|
||||
this.trueStatements.AddRange (trueStatements);
|
||||
this.falseStatements = new CodeStatementCollection ();
|
||||
}
|
||||
|
||||
public CodeIfStatement (CodeExpression condition,
|
||||
CodeStatement [] trueStatements,
|
||||
CodeStatement [] falseStatements)
|
||||
{
|
||||
this.condition = condition;
|
||||
|
||||
this.trueStatements = new CodeStatementCollection ();
|
||||
this.trueStatements.AddRange (trueStatements);
|
||||
|
||||
this.falseStatements = new CodeStatementCollection ();
|
||||
this.falseStatements.AddRange (falseStatements);
|
||||
}
|
||||
|
||||
//
|
||||
// Properties
|
||||
//
|
||||
public CodeExpression Condition {
|
||||
get {
|
||||
return condition;
|
||||
}
|
||||
|
||||
set {
|
||||
condition = value;
|
||||
}
|
||||
}
|
||||
|
||||
public CodeStatementCollection FalseStatements {
|
||||
get {
|
||||
return falseStatements;
|
||||
}
|
||||
}
|
||||
|
||||
public CodeStatementCollection TrueStatements {
|
||||
get {
|
||||
return trueStatements;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
//
|
||||
// System.CodeDom CodeFieldReferenceExpression Class implementation
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
|
||||
namespace System.CodeDom {
|
||||
|
||||
public class CodeIndexerExpression : CodeExpression {
|
||||
CodeExpression targetObject;
|
||||
CodeExpression index;
|
||||
|
||||
//
|
||||
// Constructors
|
||||
//
|
||||
public CodeIndexerExpression ()
|
||||
{
|
||||
}
|
||||
|
||||
public CodeIndexerExpression (CodeExpression targetObject, CodeExpression index)
|
||||
{
|
||||
this.index = index;
|
||||
this.targetObject = targetObject;
|
||||
}
|
||||
|
||||
//
|
||||
// Properties
|
||||
//
|
||||
}
|
||||
}
|
||||
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
//
|
||||
// System.CodeDom CodeLinePragma Class implementation
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
using System;
|
||||
|
||||
namespace System.CodeDom {
|
||||
|
||||
// <summary>
|
||||
// Use objects of this class to keep track of locations where
|
||||
// statements are defined
|
||||
// </summary>
|
||||
public class CodeLinePragma {
|
||||
string fileName;
|
||||
int lineNumber;
|
||||
|
||||
public CodeLinePragma (string fileName, int lineNumber)
|
||||
{
|
||||
this.fileName = fileName;
|
||||
this.lineNumber = lineNumber;
|
||||
}
|
||||
|
||||
//
|
||||
// Properties
|
||||
//
|
||||
public string FileName {
|
||||
get {
|
||||
return fileName;
|
||||
}
|
||||
|
||||
set {
|
||||
fileName = value;
|
||||
}
|
||||
}
|
||||
|
||||
public int LineNumber {
|
||||
get {
|
||||
return lineNumber;
|
||||
}
|
||||
|
||||
set {
|
||||
lineNumber = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
//
|
||||
// System.CodeDom CodeLiteralClassMember Class implementation
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
|
||||
namespace System.CodeDom {
|
||||
|
||||
public class CodeLiteralClassMember : CodeClassMember {
|
||||
string text;
|
||||
|
||||
//
|
||||
// Constructors
|
||||
//
|
||||
public CodeLiteralClassMember ()
|
||||
{
|
||||
}
|
||||
|
||||
public CodeLiteralClassMember (string text)
|
||||
{
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
//
|
||||
// Properties
|
||||
//
|
||||
string Text {
|
||||
get {
|
||||
return text;
|
||||
}
|
||||
|
||||
set {
|
||||
text = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
//
|
||||
// System.CodeDom CodeLiteralExpression Class implementation
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
|
||||
namespace System.CodeDom {
|
||||
|
||||
public class CodeLiteralExpression : CodeExpression {
|
||||
string val;
|
||||
|
||||
//
|
||||
// Constructors
|
||||
//
|
||||
public CodeLiteralExpression ()
|
||||
{
|
||||
}
|
||||
|
||||
public CodeLiteralExpression (string value)
|
||||
{
|
||||
val = value;
|
||||
}
|
||||
|
||||
//
|
||||
// Properties
|
||||
//
|
||||
string Value {
|
||||
get {
|
||||
return val;
|
||||
}
|
||||
|
||||
set {
|
||||
val = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
//
|
||||
// System.CodeDom CodeLiteralNamespace Class implementation
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
|
||||
namespace System.CodeDom {
|
||||
|
||||
public class CodeLiteralNamespace : CodeNamespace {
|
||||
CodeLinePragma linePragma;
|
||||
string value;
|
||||
|
||||
//
|
||||
// Constructors
|
||||
//
|
||||
public CodeLiteralNamespace (string value)
|
||||
{
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
//
|
||||
// Properties
|
||||
//
|
||||
string Value {
|
||||
get {
|
||||
return value;
|
||||
}
|
||||
|
||||
set {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
|
||||
CodeLinePragma LinePragma {
|
||||
get {
|
||||
return linePragma;
|
||||
}
|
||||
|
||||
set {
|
||||
linePragma = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
//
|
||||
// System.CodeDom CodeLiteralStatement Class implementation
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
|
||||
namespace System.CodeDom {
|
||||
|
||||
public class CodeLiteralStatement : CodeStatement {
|
||||
string value;
|
||||
|
||||
//
|
||||
// Constructors
|
||||
//
|
||||
public CodeLiteralStatement (string value)
|
||||
{
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
//
|
||||
// Properties
|
||||
//
|
||||
string Value {
|
||||
get {
|
||||
return value;
|
||||
}
|
||||
|
||||
set {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
//
|
||||
// System.CodeDom CodeMemberEvent Class implementation
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
|
||||
namespace System.CodeDom {
|
||||
|
||||
public class CodeMemberEvent : CodeClassMember {
|
||||
string implementsType, type;
|
||||
bool privateImplements;
|
||||
|
||||
public CodeMemberEvent ()
|
||||
{
|
||||
}
|
||||
|
||||
public string ImplementsType {
|
||||
get {
|
||||
return implementsType;
|
||||
}
|
||||
|
||||
set {
|
||||
implementsType = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool PrivateImplements {
|
||||
get {
|
||||
return privateImplements;
|
||||
}
|
||||
|
||||
set {
|
||||
privateImplements = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string Type {
|
||||
get {
|
||||
return type;
|
||||
}
|
||||
|
||||
set {
|
||||
type = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
//
|
||||
// System.CodeDom CodeMemberField Class implementation
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
|
||||
namespace System.CodeDom {
|
||||
|
||||
public class CodeMemberField : CodeClassMember {
|
||||
CodeExpression initExpression;
|
||||
string type, name;
|
||||
|
||||
public CodeMemberField ()
|
||||
{
|
||||
}
|
||||
|
||||
public CodeMemberField (string type, string name)
|
||||
{
|
||||
this.type = type;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
//
|
||||
// Properties
|
||||
//
|
||||
public CodeExpression InitExpression {
|
||||
get {
|
||||
return initExpression;
|
||||
}
|
||||
|
||||
set {
|
||||
initExpression = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string Type {
|
||||
get {
|
||||
return type;
|
||||
}
|
||||
|
||||
set {
|
||||
type = name;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
//
|
||||
// System.CodeDom CodeMemberMethod Class implementation
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
|
||||
namespace System.CodeDom {
|
||||
|
||||
public class CodeMemberMethod : CodeClassMember {
|
||||
CodeParameterDeclarationExpressionCollection parameters;
|
||||
CodeStatementCollection statements;
|
||||
string implementsType;
|
||||
string returnType;
|
||||
bool privateImplements;
|
||||
|
||||
public CodeMemberMethod ()
|
||||
{
|
||||
}
|
||||
|
||||
public string ImplementsType {
|
||||
get {
|
||||
return implementsType;
|
||||
}
|
||||
|
||||
set {
|
||||
implementsType = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool PrivateImplements {
|
||||
get {
|
||||
return privateImplements;
|
||||
}
|
||||
|
||||
set {
|
||||
privateImplements = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string ReturnType {
|
||||
get {
|
||||
return returnType;
|
||||
}
|
||||
|
||||
set {
|
||||
returnType = value;
|
||||
}
|
||||
}
|
||||
|
||||
public CodeParameterDeclarationExpressionCollection Parameters {
|
||||
get {
|
||||
return parameters;
|
||||
}
|
||||
|
||||
set {
|
||||
parameters = value;
|
||||
}
|
||||
}
|
||||
|
||||
public CodeStatementCollection Statements {
|
||||
get {
|
||||
return statements;
|
||||
}
|
||||
|
||||
set {
|
||||
statements = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+108
@@ -0,0 +1,108 @@
|
||||
//
|
||||
// System.CodeDom CodeMemberProperty Class implementation
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
|
||||
namespace System.CodeDom {
|
||||
|
||||
public class CodeMemberProperty : CodeClassMember {
|
||||
CodeParameterDeclarationExpressionCollection parameters;
|
||||
CodeStatementCollection getStatements, setStatements;
|
||||
bool hasGet, hasSet;
|
||||
string implementsType, type;
|
||||
bool privateImplements;
|
||||
|
||||
public CodeMemberProperty ()
|
||||
{
|
||||
}
|
||||
|
||||
//
|
||||
// Properties
|
||||
//
|
||||
|
||||
public string ImplementsType {
|
||||
get {
|
||||
return implementsType;
|
||||
}
|
||||
|
||||
set {
|
||||
implementsType = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool PrivateImplements {
|
||||
get {
|
||||
return privateImplements;
|
||||
}
|
||||
|
||||
set {
|
||||
privateImplements = value;
|
||||
}
|
||||
}
|
||||
|
||||
public CodeParameterDeclarationExpressionCollection Parameters {
|
||||
get {
|
||||
return parameters;
|
||||
}
|
||||
|
||||
set {
|
||||
parameters = value;
|
||||
}
|
||||
}
|
||||
|
||||
public CodeStatementCollection SetStatements {
|
||||
get {
|
||||
return setStatements;
|
||||
}
|
||||
|
||||
set {
|
||||
setStatements = value;
|
||||
}
|
||||
}
|
||||
|
||||
public CodeStatementCollection GetStatements {
|
||||
get {
|
||||
return getStatements;
|
||||
}
|
||||
|
||||
set {
|
||||
getStatements = value;
|
||||
}
|
||||
}
|
||||
|
||||
public string Type {
|
||||
get {
|
||||
return type;
|
||||
}
|
||||
|
||||
set {
|
||||
type = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool HasGet {
|
||||
get {
|
||||
return hasGet;
|
||||
}
|
||||
|
||||
set {
|
||||
hasGet = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool HasSet {
|
||||
get {
|
||||
return hasSet;
|
||||
}
|
||||
|
||||
set {
|
||||
hasSet = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
//
|
||||
// System.CodeDom CodeMethodInvokeExpression Class implementation
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
|
||||
namespace System.CodeDom {
|
||||
|
||||
public class CodeMethodInvokeExpression : CodeExpression {
|
||||
string methodName;
|
||||
CodeExpression targetObject;
|
||||
CodeExpressionCollection parameters;
|
||||
|
||||
//
|
||||
// Constructors
|
||||
//
|
||||
public CodeMethodInvokeExpression () {}
|
||||
|
||||
public CodeMethodInvokeExpression (CodeExpression targetObject, string methodName)
|
||||
{
|
||||
this.targetObject = targetObject;
|
||||
this.methodName = methodName;
|
||||
}
|
||||
|
||||
public CodeMethodInvokeExpression (CodeExpression targetObject,
|
||||
string methodName,
|
||||
CodeExpression [] parameters)
|
||||
{
|
||||
this.targetObject = targetObject;
|
||||
this.methodName = methodName;
|
||||
this.parameters = new CodeExpressionCollection ();
|
||||
this.parameters.AddRange (parameters);
|
||||
}
|
||||
|
||||
public string MethodName {
|
||||
get {
|
||||
return methodName;
|
||||
}
|
||||
|
||||
set {
|
||||
methodName = value;
|
||||
}
|
||||
}
|
||||
|
||||
public CodeExpressionCollection Parameters {
|
||||
get {
|
||||
return parameters;
|
||||
}
|
||||
|
||||
set {
|
||||
parameters = value;
|
||||
}
|
||||
}
|
||||
|
||||
public CodeExpression TargetObject {
|
||||
get {
|
||||
return targetObject;
|
||||
}
|
||||
|
||||
set {
|
||||
targetObject = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
//
|
||||
// System.CodeDom CodeMethodInvokeStatement Class implementation
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
|
||||
namespace System.CodeDom {
|
||||
|
||||
public class CodeMethodInvokeStatement : CodeStatement {
|
||||
string methodName;
|
||||
CodeExpression targetObject;
|
||||
CodeExpressionCollection parameters;
|
||||
CodeMethodInvokeExpression methodInvoke;
|
||||
|
||||
//
|
||||
// Constructors
|
||||
//
|
||||
public CodeMethodInvokeStatement () {}
|
||||
|
||||
public CodeMethodInvokeStatement (CodeMethodInvokeExpression methodInvoke)
|
||||
{
|
||||
this.methodInvoke = methodInvoke;
|
||||
}
|
||||
|
||||
public CodeMethodInvokeStatement (CodeExpression targetObject, string methodName)
|
||||
{
|
||||
this.targetObject = targetObject;
|
||||
this.methodName = methodName;
|
||||
}
|
||||
|
||||
public CodeMethodInvokeStatement (CodeExpression targetObject,
|
||||
string methodName,
|
||||
CodeExpression [] parameters)
|
||||
{
|
||||
this.targetObject = targetObject;
|
||||
this.methodName = methodName;
|
||||
this.parameters = new CodeExpressionCollection ();
|
||||
this.parameters.AddRange (parameters);
|
||||
}
|
||||
|
||||
public string MethodName {
|
||||
get {
|
||||
return methodName;
|
||||
}
|
||||
|
||||
set {
|
||||
methodName = value;
|
||||
}
|
||||
}
|
||||
|
||||
public CodeExpressionCollection Parameters {
|
||||
get {
|
||||
return parameters;
|
||||
}
|
||||
|
||||
set {
|
||||
parameters = value;
|
||||
}
|
||||
}
|
||||
|
||||
public CodeExpression TargetObject {
|
||||
get {
|
||||
return targetObject;
|
||||
}
|
||||
|
||||
set {
|
||||
targetObject = value;
|
||||
}
|
||||
}
|
||||
|
||||
public CodeMethodInvokeExpression MethodInvoke {
|
||||
get {
|
||||
return methodInvoke;
|
||||
}
|
||||
|
||||
set {
|
||||
methodInvoke = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
//
|
||||
// System.CodeDom CodeReturnStatement Class implementation
|
||||
//
|
||||
// Author:
|
||||
// Miguel de Icaza ([email protected])
|
||||
//
|
||||
// (C) 2001 Ximian, Inc.
|
||||
//
|
||||
|
||||
namespace System.CodeDom {
|
||||
|
||||
public class CodeReturnStatement : CodeStatement {
|
||||
CodeExpression expression;
|
||||
|
||||
public CodeReturnStatement ()
|
||||
{
|
||||
}
|
||||
|
||||
public CodeReturnStatement (CodeExpression expression)
|
||||
{
|
||||
this.expression = expression;
|
||||
}
|
||||
|
||||
//
|
||||
// Properties
|
||||
//
|
||||
CodeExpression Expression {
|
||||
get {
|
||||
return expression;
|
||||
}
|
||||
|
||||
set {
|
||||
expression = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loaded 100 of 309 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user