當前位置: 首頁>>代碼示例>>C#>>正文


C# System.RuntimeMethodHandleInternal類代碼示例

本文整理匯總了C#中System.RuntimeMethodHandleInternal的典型用法代碼示例。如果您正苦於以下問題:C# RuntimeMethodHandleInternal類的具體用法?C# RuntimeMethodHandleInternal怎麽用?C# RuntimeMethodHandleInternal使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


RuntimeMethodHandleInternal類屬於System命名空間,在下文中一共展示了RuntimeMethodHandleInternal類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: FrameDescSetHelper

 [System.Security.SecurityCritical]  // auto-generated
 private static bool FrameDescSetHelper(FrameSecurityDescriptor secDesc,
                                        PermissionSet demandSet,
                                        out PermissionSet alteredDemandSet,
                                        RuntimeMethodHandleInternal rmh)
 {
     return secDesc.CheckSetDemand(demandSet, out alteredDemandSet, rmh);
 }
開發者ID:nlh774,項目名稱:DotNetReferenceSource,代碼行數:8,代碼來源:SecurityRuntime.cs

示例2: FrameDescHelper

 [System.Security.SecurityCritical]  // auto-generated
 private static bool FrameDescHelper(FrameSecurityDescriptor secDesc,
                                        IPermission demandIn, 
                                        PermissionToken permToken,
                                        RuntimeMethodHandleInternal rmh)
 {
     return secDesc.CheckDemand((CodeAccessPermission) demandIn, permToken, rmh);
 }
開發者ID:nlh774,項目名稱:DotNetReferenceSource,代碼行數:8,代碼來源:SecurityRuntime.cs

示例3: RuntimeConstructorInfo

 internal RuntimeConstructorInfo(RuntimeMethodHandleInternal handle, RuntimeType declaringType, RuntimeType.RuntimeTypeCache reflectedTypeCache, MethodAttributes methodAttributes, System.Reflection.BindingFlags bindingFlags)
 {
     this.m_bindingFlags = bindingFlags;
     this.m_reflectedTypeCache = reflectedTypeCache;
     this.m_declaringType = declaringType;
     this.m_handle = handle.Value;
     this.m_methodAttributes = methodAttributes;
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:8,代碼來源:RuntimeConstructorInfo.cs

示例4: CheckDemand

 internal bool CheckDemand(CodeAccessPermission demand, PermissionToken permToken, RuntimeMethodHandleInternal rmh)
 {
     if (!CheckAssert(this.AssertSet, demand, permToken))
     {
         return false;
     }
     CodeAccessSecurityEngine.CheckHelper(this.GrantSet, this.RefusedSet, demand, permToken, rmh, null, SecurityAction.Demand, true);
     return true;
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:9,代碼來源:PermissionSetTriple.cs

示例5: CheckDemand

 internal bool CheckDemand(CodeAccessPermission demand, PermissionToken permToken, RuntimeMethodHandleInternal rmh)
 {
     bool flag = this.CheckDemand2(demand, permToken, rmh, false);
     if (flag)
     {
         flag = this.CheckDemand2(demand, permToken, rmh, true);
     }
     return flag;
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:9,代碼來源:FrameSecurityDescriptor.cs

示例6: MakeSecurityException

        [System.Security.SecurityCritical]  // auto-generated
#pragma warning disable 618
        internal static Exception MakeSecurityException(AssemblyName asmName, Evidence asmEvidence, PermissionSet granted, PermissionSet refused, RuntimeMethodHandleInternal rmh, SecurityAction action, Object demand, IPermission permThatFailed)
#pragma warning restore 618
        {
#if FEATURE_CAS_POLICY            
            // See if we need to throw a HostProtectionException instead
            HostProtectionPermission hostProtectionPerm = permThatFailed as HostProtectionPermission;
            if(hostProtectionPerm != null)
                return new HostProtectionException(GetResString("HostProtection_HostProtection"), HostProtectionPermission.protectedResources, hostProtectionPerm.Resources);

            // Produce relevant strings
            String message = "";
            MethodInfo method = null;
            try
            {
                if(granted == null && refused == null && demand == null)
                {
                    message = GetResString("Security_NoAPTCA");
                }
                else
                {
                    if(demand != null && demand is IPermission)
                        message = String.Format(CultureInfo.InvariantCulture,  GetResString("Security_Generic"), demand.GetType().AssemblyQualifiedName );
                    else if (permThatFailed != null)
                        message = String.Format(CultureInfo.InvariantCulture, GetResString("Security_Generic"), permThatFailed.GetType().AssemblyQualifiedName);
                    else
                        message = GetResString("Security_GenericNoType");
                }

                method = SecurityRuntime.GetMethodInfo(rmh);
            }
            catch(Exception e)
            {
                // Environment.GetResourceString will throw if we are ReadyForAbort (thread abort).  (We shouldn't do a Contract.Assert in this case or it will lock up the thread.)
                if(e is System.Threading.ThreadAbortException)
                throw;
            }

/*            catch(System.Threading.ThreadAbortException)
            {
                // Environment.GetResourceString will throw if we are ReadyForAbort (thread abort).  (We shouldn't do a BCLDebug.Assert in this case or it will lock up the thread.)
                throw;
            }
            catch
            {
            }
*/
            // make the exception object
            return new SecurityException(message, asmName, granted, refused, method, action, demand, permThatFailed, asmEvidence);
#else
            return new SecurityException(GetResString("Arg_SecurityException"));
#endif

        }
開發者ID:REALTOBIZ,項目名稱:mono,代碼行數:55,代碼來源:securityexception.cs

示例7: ThrowSecurityException

#pragma warning disable 618
        private static void ThrowSecurityException(RuntimeAssembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandleInternal rmh, SecurityAction action, Object demand, IPermission permThatFailed)
#pragma warning restore 618
        {
            AssemblyName asmName = null;
            Evidence asmEvidence = null;
            if (asm != null)
            {
                // Assert here because reflection will check grants and if we fail the check,
                // there will be an infinite recursion that overflows the stack.
                PermissionSet.s_fullTrust.Assert();
                asmName = asm.GetName();
            }
            throw SecurityException.MakeSecurityException(asmName, asmEvidence, granted, refused, rmh, action, demand, permThatFailed);
        }
開發者ID:kouvel,項目名稱:coreclr,代碼行數:15,代碼來源:CodeAccessSecurityEngine.cs

示例8: SignatureStruct

 public unsafe SignatureStruct(RuntimeMethodHandleInternal method, RuntimeType[] arguments, RuntimeType returnType, CallingConventions callingConvention)
 {
     this.m_pMethod = method;
     this.m_arguments = arguments;
     this.m_returnTypeORfieldType = returnType;
     this.m_managedCallingConvention = callingConvention;
     this.m_sig = null;
     this.m_pCallTarget = null;
     this.m_csig = 0;
     this.m_numVirtualFixedArgs = 0;
     this.m_64bitpad = 0;
     this.m_declaringType = null;
     this.m_keepalive = null;
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:14,代碼來源:SignatureStruct.cs

示例9: CheckDemand

 internal bool CheckDemand(CodeAccessPermission demand, PermissionToken permToken, RuntimeMethodHandleInternal rmh)
 {
     bool flag = true;
     if (this.m_permSetTriples != null)
     {
         for (int i = 0; (i < this.m_permSetTriples.Count) && flag; i++)
         {
             flag = ((PermissionSetTriple) this.m_permSetTriples[i]).CheckDemand(demand, permToken, rmh);
         }
     }
     else if (this.m_firstPermSetTriple != null)
     {
         flag = this.m_firstPermSetTriple.CheckDemand(demand, permToken, rmh);
     }
     return false;
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:16,代碼來源:PermissionListSet.cs

示例10: CheckDynamicMethodSetHelper

 private static bool CheckDynamicMethodSetHelper(System.Reflection.Emit.DynamicResolver dynamicResolver,
                                              PermissionSet demandSet,
                                              out PermissionSet alteredDemandSet,
                                              RuntimeMethodHandleInternal rmh)
 {
     System.Threading.CompressedStack creationStack = dynamicResolver.GetSecurityContext();
     bool result;
     try
     {
         result = creationStack.CheckSetDemandWithModificationNoHalt(demandSet, out alteredDemandSet, rmh);
     }
     catch (SecurityException ex)
     {
         throw new SecurityException(Environment.GetResourceString("Security_AnonymouslyHostedDynamicMethodCheckFailed"), ex);
     }
     
     return result;
 }
開發者ID:l1183479157,項目名稱:coreclr,代碼行數:18,代碼來源:SecurityRuntime.cs

示例11: GetMethodInfo

        [System.Security.SecurityCritical]  // auto-generated
        internal static MethodInfo GetMethodInfo(RuntimeMethodHandleInternal rmh)
        {
            if (rmh.IsNullHandle())
                return null;

#if _DEBUG
            try
            {
#endif
                // Assert here because reflection will check grants and if we fail the check,
                // there will be an infinite recursion that overflows the stack.
                PermissionSet.s_fullTrust.Assert();
                return (System.RuntimeType.GetMethodBase(RuntimeMethodHandle.GetDeclaringType(rmh), rmh) as MethodInfo);
#if _DEBUG
            }
            catch(Exception)
            {
                return null;
            }
#endif
        }
開發者ID:nlh774,項目名稱:DotNetReferenceSource,代碼行數:22,代碼來源:SecurityRuntime.cs

示例12: IsConstructor

 internal extern static bool IsConstructor(RuntimeMethodHandleInternal method);
開發者ID:jashook,項目名稱:coreclr,代碼行數:1,代碼來源:RuntimeHandles.cs

示例13: GetResolver

 internal extern static Resolver GetResolver(RuntimeMethodHandleInternal method);
開發者ID:jashook,項目名稱:coreclr,代碼行數:1,代碼來源:RuntimeHandles.cs

示例14: Destroy

 internal extern static void Destroy(RuntimeMethodHandleInternal method);
開發者ID:jashook,項目名稱:coreclr,代碼行數:1,代碼來源:RuntimeHandles.cs

示例15: IsDynamicMethod

 internal extern static bool IsDynamicMethod(RuntimeMethodHandleInternal method);
開發者ID:jashook,項目名稱:coreclr,代碼行數:1,代碼來源:RuntimeHandles.cs


注:本文中的System.RuntimeMethodHandleInternal類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。