system\security\permissionset.cs (45)
134FromXml(SecurityElement.FromString(m_serializedPermissionSet));
736static internal void SafeChildAdd( SecurityElement parent, ISecurityElementFactory child, bool copy )
746Contract.Assert( child is SecurityElement, "SecurityElement expected" );
747SecurityElement elChild = (SecurityElement)child;
823Contract.Assert( thisElem is SecurityElement, "SecurityElement expected" );
824SafeChildAdd( (SecurityElement)thisElem, otherElem, true );
832SecurityElement newElemUU = new SecurityElement( s_str_PermissionUnrestrictedUnion );
839SecurityElement newElemUU = new SecurityElement( s_str_PermissionUnrestrictedUnion );
846SecurityElement newElem = new SecurityElement( s_str_PermissionIntersection );
864SecurityElement newElem = new SecurityElement( s_str_PermissionUnrestrictedIntersection );
889SecurityElement newElem = new SecurityElement( s_str_PermissionUnrestrictedIntersection );
993SecurityElement newElem = new SecurityElement( s_str_PermissionIntersection );
997SecurityElement newElemUU = new SecurityElement( s_str_PermissionUnrestrictedUnion );
1005SecurityElement newElemUU = new SecurityElement( s_str_PermissionUnrestrictedUnion );
1025SecurityElement newElem = new SecurityElement( s_str_PermissionUnrestrictedIntersection );
1051SecurityElement newElem = new SecurityElement( s_str_PermissionUnrestrictedIntersection );
1160Contract.Assert( thisElem is SecurityElement, "SecurityElement expected" );
1161SafeChildAdd( (SecurityElement)thisElem, otherElem, true );
1165SecurityElement newElem;
1283SecurityElement newElem;
1730public virtual void FromXml( SecurityElement et )
1755internal virtual void FromXml( SecurityElement et, bool allowInternalOnly, bool ignoreTypeLoadFailures )
1774SecurityElement elem = (SecurityElement)et.Children[i];
1838permInSlot = CreatePerm( (SecurityElement)this.m_permSet.GetItem( token.m_index ) );
1843objectToInsert = CreatePerm( (SecurityElement)objectToInsert ).Union( permInSlot );
1987SecurityElement el = obj as SecurityElement;
2003IPermission tempPerm = CreatePerm( (SecurityElement)enumerator.Current, ignoreTypeLoadFailures);
2016IPermission tempPerm = CreatePerm( (SecurityElement)enumerator.Current, ignoreTypeLoadFailures);
2033IPermission tempPerm = CreatePerm( (SecurityElement)enumerator.Current, ignoreTypeLoadFailures );
2044finalPerm = XMLUtil.CreatePermission( GetPermissionElement((SecurityElement)enumerator.Current), PermissionState.Unrestricted, ignoreTypeLoadFailures );
2064IPermission tempPerm = CreatePerm( (SecurityElement)enumerator.Current, ignoreTypeLoadFailures );
2130private static SecurityElement GetPermissionElement( SecurityElement el )
2140return GetPermissionElement((SecurityElement)enumerator.Current);
2145internal static SecurityElement CreateEmptyPermissionSetXml()
2148SecurityElement elTrunk = new SecurityElement("PermissionSet");
2157internal SecurityElement ToXml(String permName)
2159SecurityElement elTrunk = new SecurityElement("PermissionSet");
2181internal SecurityElement InternalToXml()
2183SecurityElement elTrunk = new SecurityElement("PermissionSet");
2208elTrunk.AddChild( (SecurityElement)obj );
2217public virtual SecurityElement ToXml()
system\security\policy\policylevel.cs (43)
65private SecurityElement m_permSetElement;
510public SecurityElement ToXml() {
518SecurityElement e = new SecurityElement("PolicyLevel");
523SecurityElement elPermSets = new SecurityElement("NamedPermissionSets");
529SecurityElement elCodeGroup = NormalizeClassDeep(m_rootCodeGroup.ToXml(this), classes);
531SecurityElement elFullTrust = new SecurityElement("FullTrustAssemblies");
537SecurityElement elClasses = new SecurityElement("SecurityClasses");
540SecurityElement elClass = new SecurityElement("SecurityClass");
555public void FromXml(SecurityElement e) {
564SecurityElement eClasses = e.SearchForChildByTag("SecurityClasses");
569SecurityElement current = (SecurityElement)enumerator.Current;
583SecurityElement elFullTrust = e.SearchForChildByTag("FullTrustAssemblies");
590sn.FromXml((SecurityElement)enumerator.Current);
599SecurityElement elPermSets = e.SearchForChildByTag("NamedPermissionSets");
600SecurityElement permSetElement = null;
636SecurityElement elCodeGroup = e.SearchForChildByTag("CodeGroup");
703SecurityElement elem = FindElement(m_permSetElement, name);
821SecurityElement elRoot;
832elRoot = SecurityElement.FromString(data);
851SecurityElement elMscorlib = elRoot.SearchForChildByTag("mscorlib");
857SecurityElement elSecurity = elMscorlib.SearchForChildByTag("security");
863SecurityElement elPolicy = elSecurity.SearchForChildByTag("policy");
869SecurityElement elPolicyLevel = elPolicy.SearchForChildByTag("PolicyLevel");
1059private static SecurityElement CreateCodeGroupElement(string codeGroupType, string permissionSetName, SecurityElement mshipElement) {
1060SecurityElement root = new SecurityElement("CodeGroup");
1161private SecurityElement FindElement(SecurityElement element, string name) {
1170SecurityElement elPermSet = (SecurityElement)elemEnumerator.Current;
1195SecurityElement elPermSet = (SecurityElement)m_permSetElement.Children[m_permSetElement.InternalChildren.Count-1];
1321private SecurityElement NormalizeClassDeep(SecurityElement elem, Hashtable classes) {
1327NormalizeClassDeep((SecurityElement)enumerator.Current, classes);
1334private SecurityElement NormalizeClass(SecurityElement elem, Hashtable classes) {
1357private SecurityElement UnnormalizeClassDeep(SecurityElement elem, Hashtable classes) {
1364UnnormalizeClassDeep((SecurityElement)enumerator.Current, classes);
1371private SecurityElement UnnormalizeClass(SecurityElement elem, Hashtable classes) {