Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
[mono.git] / mcs / class / README
1 The class libraries are grouped together in the assemblies they belong.
2
3 Each directory here represents an assembly, and inside each directory we
4 divide the code based on the namespace they implement.
5
6 In addition, each assembly directory contains a Test directory that holds the
7 NUnit tests for that assembly. 
8
9 The nant build file for an assembly creates two versions of the dll for that
10 assembly. One version is a "full" dll.  The full dll contains (almost) all 
11 of the classes, regardless of how complete the classes are. The name of this
12 dll is the normal name you would expect, like "corlib.dll" or "System.dll".
13 These full dll's are created in the /mcs/class/lib directory.
14
15 The other dll which is built is a "restricted" dll.  The restricted dll
16 omits incomplete classes that would prevent the NUnit testrunner from actually
17 running the tests. These restricted dll's are created in the Test directory
18 of their respective assembly and named with a "_res" suffix.  So, for example,
19 the NUnit-testable dll for corlib is /mcs/class/corlib/Test/corlib_res.dll.
20
21 The final dll which is built is the one which houses the actual NUnit tests.
22 This dll is built from all of the classes in the Test directory and below, and
23 is named with a "_test" suffix. So, for example, the NUnit tests for corlib
24 are in /mcs/class/corlib/Test/corlib_test.dll. This dll is also linked with 
25 the restricted dll found in the same directory.
26
27
28 * Missing implementation bits
29
30         If you implement a class and you are missing implementation bits,
31         please put in the code the word "TODO" and a description of what
32         is missing to be implemented.
33
34 * Tagging buggy code
35
36         If there is a bug in your implementation tag the problem by using
37         the word "FIXME" in the code, together with a description of the 
38         problem.
39
40         Do not use XXX or obscure descriptions, because otherwise people
41         will not be able to understand what you mean.
42
43 * Tagging Lame specs
44
45         Sometimes the specification will be lame (consider Version.ToString (fieldCount)
46         where there is no way of knowing how many fields are available, making the API
47         not only stupid, but leading to unreliable code).
48
49         In those cases, use the keyword "LAMESPEC".
50
51 * Coding consideration
52
53         Use 8 space tabs for writing your code (hopefully we can keep
54         this consistent).  If you are modifying someone else's code, try
55         to keep the coding style similar.
56
57         Please use code that looks like this:
58
59         bool Method (int argument_1, int argument_2)
60         {
61                 if (argument_1 == argument_2)
62                         throw new Exception (Locale.GetText ("They are equal!");
63
64                 if (argument_1 < argument_2) {
65                         if (argument_1 * 3 > 4)
66                                 return true;
67                         else
68                                 return false;
69                 }
70         }