System.Security.PermissionSetTriple.CheckDemandNoThrow C# (CSharp) Method

CheckDemandNoThrow() private method

private CheckDemandNoThrow ( CodeAccessPermission demand, PermissionToken permToken ) : bool
demand CodeAccessPermission
permToken PermissionToken
return bool
        internal bool CheckDemandNoThrow(CodeAccessPermission demand, PermissionToken permToken)
        {
            BCLDebug.Assert(AssertSet == null, "AssertSet not null");

            return CodeAccessSecurityEngine.CheckHelper(GrantSet, RefusedSet, demand, permToken, s_emptyRMH, null, SecurityAction.Demand, false);
        }
        internal bool CheckSetDemandNoThrow(PermissionSet demandSet)

Usage Example

Beispiel #1
0
        [System.Security.SecurityCritical]  // auto-generated
        internal bool CheckDemandNoThrow(CodeAccessPermission demand)
        {
            // AppDomain permissions - no asserts. So there should only be one triple to work with
            Contract.Assert(m_permSetTriples == null && m_firstPermSetTriple != null, "More than one PermissionSetTriple encountered in AD PermissionListSet");



            PermissionToken permToken = null;

            if (demand != null)
            {
                permToken = PermissionToken.GetToken(demand);
            }

            return(m_firstPermSetTriple.CheckDemandNoThrow(demand, permToken));
        }