PolicyHierarchy : SecurityManager : Security C# Source Code


Custom Search

C# Source Code » Security » SecurityManager »

 

PolicyHierarchy








    
 

using System;
using System.Security.Policy;
using System.Security;
using System.Collections;

class Class1 {
    static void Main() {
        IEnumerator PolicyEnum = SecurityManager.PolicyHierarchy();
        while (PolicyEnum.MoveNext()) {
            PolicyLevel levelPolicy = (PolicyLevel)PolicyEnum.Current;
            Console.WriteLine(levelPolicy.Label);
            IEnumerator PermissionEnum = levelPolicy.NamedPermissionSets.GetEnumerator();
            while (PermissionEnum.MoveNext()) {
                NamedPermissionSet permissionSet = (NamedPermissionSet)PermissionEnum.Current;
                Console.WriteLine("\tPermission Set: \n\t\t Name: {0} \n\t\t Description {1}", permissionSet.Name, permissionSet.Description);
            }
        }
    }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Security
» SecurityManager