当前位置: 首页>>代码示例>>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;未经允许,请勿转载。