System.RuntimeTypeHandle.HasInstantiation C# (CSharp) Method

HasInstantiation() private method

private HasInstantiation ( ) : bool
return bool
        internal extern bool HasInstantiation();
        

Usage Example

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