本文整理匯總了C#中System.Threading.CompressedStack.GetZoneAndOrigin方法的典型用法代碼示例。如果您正苦於以下問題:C# CompressedStack.GetZoneAndOrigin方法的具體用法?C# CompressedStack.GetZoneAndOrigin怎麽用?C# CompressedStack.GetZoneAndOrigin使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Threading.CompressedStack
的用法示例。
在下文中一共展示了CompressedStack.GetZoneAndOrigin方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: GetZoneAndOriginHelper
[System.Security.SecurityCritical] // auto-generated
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 zone = (ZoneIdentityPermission)grantSet.GetPermission( typeof( ZoneIdentityPermission ) );
UrlIdentityPermission url = (UrlIdentityPermission)grantSet.GetPermission( typeof( UrlIdentityPermission ) );
if (zone != null)
zoneList.Add( zone.SecurityZone );
if (url != null)
originList.Add( url.Url );
}
}
示例2: GetZoneAndOriginHelper
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 permission = (ZoneIdentityPermission) grantSet.GetPermission(typeof(ZoneIdentityPermission));
UrlIdentityPermission permission2 = (UrlIdentityPermission) grantSet.GetPermission(typeof(UrlIdentityPermission));
if (permission != null)
{
zoneList.Add(permission.SecurityZone);
}
if (permission2 != null)
{
originList.Add(permission2.Url);
}
}
}