Assert() public méthode

public Assert ( ) : void
Résultat void
Exemple #1
0
        private static PermissionSet ResolveCasPolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, out PermissionSet denied, out int securitySpecialFlags, bool checkExecutionPermission)
        {
            CodeAccessPermission.Assert(true);
            PermissionSet grantSet = ResolvePolicy(evidence, reqdPset, optPset, denyPset, out denied, checkExecutionPermission);

            securitySpecialFlags = GetSpecialFlags(grantSet, denied);
            return(grantSet);
        }
        [System.Security.SecurityCritical]  // auto-generated
        private static PermissionSet ResolveCasPolicy(Evidence evidence,
                                                      PermissionSet reqdPset,
                                                      PermissionSet optPset,
                                                      PermissionSet denyPset,
                                                      out PermissionSet denied,
                                                      out int securitySpecialFlags,
                                                      bool checkExecutionPermission)
        {
            Contract.Assert(AppDomain.CurrentDomain.IsLegacyCasPolicyEnabled);

            CodeAccessPermission.Assert(true);

            PermissionSet granted = ResolvePolicy(evidence,
                                                  reqdPset,
                                                  optPset,
                                                  denyPset,
                                                  out denied,
                                                  checkExecutionPermission);

            securitySpecialFlags = SecurityManager.GetSpecialFlags(granted, denied);
            return(granted);
        }