[Mono-list] ECMA compliance (and OCXT)

Marcey, Joel I joel.i.marcey@intel.com
Thu, 29 Nov 2001 09:07:00 -0800


Hey Serge,

>>So far I noticed only one real error in the library file:
>>Both signatures for System.Type (IL and C#) claims that it extends Object,
>>whereas it's base class is MemberInfo, this makes overriding DeclaringType
&
>>ReflectedType properties illegal (later in member's signatures).
>>I downloaded OCL code (ver. 0.2.0), Type extends MemberInfo there (so I
>>guess it's generated from the older file?).

Actually you hit upon a very unique case within the CLI classes. The short
answer is that Type extends either Object or MemberInfo depending on what
Libraries your specific CLI implementation supports. As you know, in version
1 of the standard there are two profiles, Kernel and Compact, each of which
contains a set of libraries. All conformant CLI implementations must support
the Kernel profile which includes the Base Class Library and the Runtime
Infrastructure Library. Both System.Type and System.Object are part of the
Base Class Library. Now, if your implementation supports the Compact profile
or, even more specifically, the Reflection library (which is part of the
Compact Profile), the type System.Reflection.MemberInfo comes into play.
Then System.Type will extend MemberInfo. Remember, there is no issue with
inserting a class into the middle of a hierarchy as long as the class that
is inserted eventually inherits from the original class. In other words, if
originally the hierarchy looks like:

Object <- Type

there is no issue with the insertion of MemberInfo in the hierarchy once
your implementation supports Reflection

Object <- MemberInfo <- Type


Here is the snippet from the XML that is relevant:

<Type Name="Type" FullName="System.Type" FullNameSP="System_Type">
  <TypeSignature Language="ILASM" Value=".class public abstract serializable
Type extends System.Object" /> 
  <TypeSignature Language="C#" Value="public abstract class Type : Object"
/> 
  <MemberOfLibrary>BCL</MemberOfLibrary>
:
:
 <Base>
  <BaseTypeName>System.Object</BaseTypeName> 
  <ExcludedBaseTypeName>System.Reflection.MemberInfo</ExcludedBaseTypeName> 
  <ExcludedLibraryName>Reflection</ExcludedLibraryName> 
  </Base>
:
:

The tags <ExcludedBaseTypeName> and <ExcludedLibraryName> are saying that if
you support Reflection, Type then inherits from MemberInfo.

Does this make sense?

>>Just an idea. Maybe it's worth considering rendering documentation in
>>xsl:fo? Theoretically, this would make it possible to convert it into
>>different "printable" formats.

Good idea. When I get some free time I will research this a little bit.

Thanks,
- Joel Marcey

** The views and statements expressed here do not necessarily reflect
those of Intel Corporation, its subsidiaries or its employees.