示例#1
0
        internal Exception GetClasslibException(ExceptionIDs id)
        {
#if INPLACE_RUNTIME
            return(RuntimeExceptionHelpers.GetRuntimeException(id));
#else
            DynamicModule *dynamicModule = this.DynamicModule;
            if (dynamicModule != null)
            {
                IntPtr getRuntimeException = dynamicModule->GetRuntimeException;
                if (getRuntimeException != IntPtr.Zero)
                {
                    return(CalliIntrinsics.Call <Exception>(getRuntimeException, id));
                }
            }
            if (IsParameterizedType)
            {
                return(RelatedParameterType->GetClasslibException(id));
            }

            return(EH.GetClasslibExceptionFromEEType(id, GetAssociatedModuleAddress()));
#endif
        }
        internal Exception GetClasslibException(ExceptionIDs id)
        {
#if INPLACE_RUNTIME
            return(RuntimeExceptionHelpers.GetRuntimeException(id));
#else
            DynamicModule *dynamicModule = this.DynamicModule;
            if (dynamicModule != null)
            {
                delegate * < System.Runtime.ExceptionIDs, System.Exception > getRuntimeException = dynamicModule->GetRuntimeException;
                if (getRuntimeException != null)
                {
                    return(getRuntimeException(id));
                }
            }
            if (IsParameterizedType)
            {
                return(RelatedParameterType->GetClasslibException(id));
            }

            return(EH.GetClasslibExceptionFromEEType(id, GetAssociatedModuleAddress()));
#endif
        }