[Mono-list] difference between corlib.dll and System.dll and other questions

Paolo Molaro lupus@ximian.com
Sun, 17 Mar 2002 13:18:55 +0100


On 03/14/02 Ulrich Kunitz wrote:
> (1) corlib.dll or System.dll?
> 
> Classes from the System.Globalization namespace can be found in
> corlib.dll or System.dll. How can I decide, where to put the classes?
> Looking with ildasm.exe into mscorlib.dll? The *Calendar classes are not
> part of the ECMA all.xml, so it isn't obvious.

Do not disassemble mscorlib, if you're going to contribute to mono.
http://www.msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/cpref_start.asp
has some documentation for classes not in the ECMA spec.

> (2) How to call a namespace for helper classes?
> 
> I've some helper classes in a seperate namespace. Can I call it 
> System.Globalization.CalendricalCalculations? I used the algorithms

Use MonoXXX.

> (3) Does Mono have a registry?
> 
> The .net calendar classes are using registry entries (e.g. HKCU/Control
> Panel/International/AddHijriDate) to set defaults. Currently I'm
> providing defaults in the source code and added a new property for
> AddHijriDate to control the value. Way to go?

Until we have a configuration mechanism it's ok. Add a comment for
the entries that would need a sort of registry lookup.

> (4) How compatible is Mono to .net bugs and limitations?
> 
> The GregorianCalendar class of .net has a bug in the argument handling
> of some member. I fixed it in my implementation, which could break
> broken code who uses wrong arguments.
> 
> For some non-obvious reason the .net HebrewCalendar implementation
> allows only a window (gregorian calendar years 1582 to 2240). I could do
> better than that, currently I decided to be compatible to .net and throw
> a ArgumentOutOfRange exception for such cases. I hope nobody expects me to
> support always the same exception message string than .net.

Bugs in the ms implementation should be reported to them so that they
can fix them. I'd say, if their bugs result in exceptions, we should not
be bug-compatible with that particular bug, but we should decide case by
case.

lupus

-- 
-----------------------------------------------------------------
lupus@debian.org                                     debian/rules
lupus@ximian.com                             Monkeys do it better