コード例 #1
0
        internal static void GetZoneAndOriginHelper(CompressedStack cs, PermissionSet grantSet, PermissionSet refusedSet, ArrayList zoneList, ArrayList originList)
        {
            if (cs != null)
            {
                cs.GetZoneAndOrigin(zoneList, originList, PermissionToken.GetToken(typeof(ZoneIdentityPermission)), PermissionToken.GetToken(typeof(UrlIdentityPermission)));
                return;
            }
            ZoneIdentityPermission zoneIdentityPermission = (ZoneIdentityPermission)grantSet.GetPermission(typeof(ZoneIdentityPermission));
            UrlIdentityPermission  urlIdentityPermission  = (UrlIdentityPermission)grantSet.GetPermission(typeof(UrlIdentityPermission));

            if (zoneIdentityPermission != null)
            {
                zoneList.Add(zoneIdentityPermission.SecurityZone);
            }
            if (urlIdentityPermission != null)
            {
                originList.Add(urlIdentityPermission.Url);
            }
        }
コード例 #2
0
 internal static void GetZoneAndOriginHelper(CompressedStack cs, PermissionSet grantSet, PermissionSet refusedSet, ArrayList zoneList, ArrayList originList)
 {
     if (cs != null)
     {
         cs.GetZoneAndOrigin(zoneList, originList, PermissionToken.GetToken(typeof(ZoneIdentityPermission)), PermissionToken.GetToken(typeof(UrlIdentityPermission)));
     }
     else
     {
         ZoneIdentityPermission identityPermission1 = (ZoneIdentityPermission)grantSet.GetPermission(typeof(ZoneIdentityPermission));
         UrlIdentityPermission  identityPermission2 = (UrlIdentityPermission)grantSet.GetPermission(typeof(UrlIdentityPermission));
         if (identityPermission1 != null)
         {
             zoneList.Add((object)identityPermission1.SecurityZone);
         }
         if (identityPermission2 == null)
         {
             return;
         }
         originList.Add((object)identityPermission2.Url);
     }
 }