public override void FromXml(SecurityElement e) { this.AccessInfo = new NavigationAccessList(); if (e.Children != null) { foreach (SecurityElement securityElement in e.Children) { if (securityElement.Tag == "Node" && securityElement.Attributes.ContainsKey("NodeID")) { this.AccessInfo.Items.Add(securityElement.Attributes["NodeID"].ToString()); } } } }
public override IPermission Intersect(IPermission target) { NavigationPermission navigationPermission = target as NavigationPermission; if (navigationPermission == null) { throw new ArgumentException(string.Format("Incorrect permission is passed: '{0}' instead of '{1}'", target.GetType(), base.GetType())); } NavigationAccessList navigationAccessList = new NavigationAccessList(); NavigationPermission navigationPermission2 = new NavigationPermission(); foreach (string current in this.AccessInfo.Items) { if (navigationPermission.AccessInfo.Items.Contains(current)) { navigationAccessList.Items.Add(current); } } navigationPermission2.AccessInfo = navigationAccessList; return navigationPermission2; }