I'm a little overwhelmed by something, hope the CLR gearboxes can help. My mechanisms seem to be small.
I have a reflector utility that generates assembly nodes for Cola for .NET, and I find that classes have methods that differ only in a modifier such as virtual. Example from Oracle.DataAccess.dll, GetType () method:
class OracleTypeException : System.SystemException { virtual string ToString (); virtual System.Exception GetBaseException (); virtual void set_Source (string value); virtual void GetObjectData (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context); virtual System.Type GetType ();
What is it?
I was not able to reproduce this using C #, and this causes problems for Cola, since it considers GetType () to be an override, since the signature is identical.
My method reflector begins as follows:
static void DisplayMethod(MethodInfo m) { if ( // Filter out things Cola cannot yet import, like generics, pointers, etc. m.IsGenericMethodDefinition || m.ContainsGenericParameters || m.ReturnType.IsGenericType || !m.ReturnType.IsPublic || m.ReturnType.IsPointer || m.ReturnType.IsByRef || m.ReturnType.IsMarshalByRef || m.ReturnType.IsImport ) return; // generate stub signature // [snipped] }
SOLVE: Non-virtual GetType () comes from System.Object. The output class obscures System.Object.GetType () using a virtual method.
source share