System.RuntimeTypeHandle.GetRuntimeType C# (CSharp) Method

GetRuntimeType() private method

private GetRuntimeType ( ) : RuntimeType
return RuntimeType
        internal RuntimeType GetRuntimeType()
        {            
            if(!IsNullHandle())
                return(System.RuntimeType)Type.GetTypeFromHandle(this);
            else 
                return null;
        }

Usage Example

Example #1
0
 protected virtual MethodInfo GetMethodImpl()
 {
     if (this._methodBase == null)
     {
         RuntimeMethodHandle methodHandle  = this.FindMethodHandle();
         RuntimeTypeHandle   declaringType = methodHandle.GetDeclaringType();
         if ((declaringType.IsGenericTypeDefinition() || declaringType.HasInstantiation()) && ((methodHandle.GetAttributes() & MethodAttributes.Static) == MethodAttributes.PrivateScope))
         {
             if (!(this._methodPtrAux == IntPtr.Zero))
             {
                 declaringType = base.GetType().GetMethod("Invoke").GetParameters()[0].ParameterType.TypeHandle;
             }
             else
             {
                 Type baseType = this._target.GetType();
                 Type genericTypeDefinition = declaringType.GetRuntimeType().GetGenericTypeDefinition();
                 while (true)
                 {
                     if (baseType.IsGenericType && (baseType.GetGenericTypeDefinition() == genericTypeDefinition))
                     {
                         break;
                     }
                     baseType = baseType.BaseType;
                 }
                 declaringType = baseType.TypeHandle;
             }
         }
         this._methodBase = (MethodInfo)RuntimeType.GetMethodBase(declaringType, methodHandle);
     }
     return((MethodInfo)this._methodBase);
 }
All Usage Examples Of System.RuntimeTypeHandle::GetRuntimeType