private static void VerifyZone(System.Security.SecurityZone zone) { if ((zone < System.Security.SecurityZone.NoZone) || (zone > System.Security.SecurityZone.Untrusted)) { throw new ArgumentException(Environment.GetResourceString("Argument_IllegalZone")); } }
public Zone(System.Security.SecurityZone zone) { if ((zone < System.Security.SecurityZone.NoZone) || (zone > System.Security.SecurityZone.Untrusted)) { throw new ArgumentException(Environment.GetResourceString("Argument_IllegalZone")); } this.m_zone = zone; }
private void OnSerialized(StreamingContext ctx) { if ((ctx.State & ~(StreamingContextStates.CrossAppDomain | StreamingContextStates.Clone)) != 0) { this.m_serializedPermission = null; this.m_zone = System.Security.SecurityZone.NoZone; } }
private void OnSerializing(StreamingContext ctx) { if ((ctx.State & ~(StreamingContextStates.CrossAppDomain | StreamingContextStates.Clone)) != 0) { this.m_serializedPermission = this.ToXml().ToString(); this.m_zone = this.SecurityZone; } }
public ZoneIdentityPermission(PermissionState state) { this.m_zone = System.Security.SecurityZone.NoZone; if (state == PermissionState.Unrestricted) { this.m_zones = 0x1f; } else { if (state != PermissionState.None) { throw new ArgumentException(Environment.GetResourceString("Argument_InvalidPermissionState")); } this.m_zones = 0; } }
public void FromXml(SecurityElement e, PolicyLevel level) { if (e == null) { throw new ArgumentNullException("e"); } if (!e.Tag.Equals("IMembershipCondition")) { throw new ArgumentException(Environment.GetResourceString("Argument_MembershipConditionElement")); } lock (this) { this.m_zone = System.Security.SecurityZone.NoZone; this.m_element = e; } }
private void OnDeserialized(StreamingContext ctx) { if ((ctx.State & ~(StreamingContextStates.CrossAppDomain | StreamingContextStates.Clone)) != 0) { if (this.m_serializedPermission != null) { this.FromXml(SecurityElement.FromString(this.m_serializedPermission)); this.m_serializedPermission = null; } else { this.SecurityZone = this.m_zone; this.m_zone = System.Security.SecurityZone.NoZone; } } }
private void ParseZone() { lock (this) { if (this.m_element != null) { string str = this.m_element.Attribute("Zone"); this.m_zone = System.Security.SecurityZone.NoZone; if (str == null) { throw new ArgumentException(Environment.GetResourceString("Argument_ZoneCannotBeNull")); } this.m_zone = (System.Security.SecurityZone)Enum.Parse(typeof(System.Security.SecurityZone), str); VerifyZone(this.m_zone); this.m_element = null; } } }
private Zone(Zone zone) { this.m_url = zone.m_url; this.m_zone = zone.m_zone; }
private Zone(string url) { this.m_url = url; this.m_zone = System.Security.SecurityZone.NoZone; }
public ZoneIdentityPermission(System.Security.SecurityZone zone) { this.m_zone = System.Security.SecurityZone.NoZone; this.SecurityZone = zone; }
internal ZoneIdentityPermission(uint zones) { this.m_zone = System.Security.SecurityZone.NoZone; this.m_zones = zones & 0x1f; }
internal ZoneMembershipCondition() { this.m_zone = System.Security.SecurityZone.NoZone; }
public ZoneMembershipCondition(System.Security.SecurityZone zone) { VerifyZone(zone); this.SecurityZone = zone; }
private void ParseZone() { lock (this) { if (this.m_element != null) { string str = this.m_element.Attribute("Zone"); this.m_zone = System.Security.SecurityZone.NoZone; if (str == null) { throw new ArgumentException(Environment.GetResourceString("Argument_ZoneCannotBeNull")); } this.m_zone = (System.Security.SecurityZone) Enum.Parse(typeof(System.Security.SecurityZone), str); VerifyZone(this.m_zone); this.m_element = null; } } }