SecurityManager.cs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. //
  2. // System.Security.SecurityManager.cs
  3. //
  4. // Author:
  5. // Nick Drochak([email protected])
  6. //
  7. // (C) Nick Drochak
  8. //
  9. using System.Security.Policy;
  10. using System.Collections;
  11. namespace System.Security {
  12. public sealed class SecurityManager {
  13. private static bool checkExecutionRights;
  14. private static bool securityEnabled;
  15. private SecurityManager () {}
  16. public static bool CheckExecutionRights {
  17. get{
  18. return checkExecutionRights;
  19. }
  20. set{
  21. checkExecutionRights = value;
  22. }
  23. }
  24. public static bool SecurityEnabled {
  25. get{
  26. return securityEnabled;
  27. }
  28. set{
  29. securityEnabled = value;
  30. }
  31. }
  32. public static bool IsGranted(IPermission perm){
  33. return false;
  34. }
  35. public static PolicyLevel LoadPolicyLevelFromFile(
  36. string path,
  37. PolicyLevelType type)
  38. {
  39. return null;
  40. }
  41. public static PolicyLevel LoadPolicyLevelFromString(
  42. string str,
  43. PolicyLevelType type)
  44. {
  45. if (null == str){
  46. throw new ArgumentNullException("str");
  47. }
  48. return null;
  49. }
  50. public static IEnumerator PolicyHierarchy(){
  51. return null;
  52. }
  53. public static PermissionSet ResolvePolicy(Evidence evidence){
  54. return null;
  55. }
  56. public static PermissionSet ResolvePolicy(
  57. Evidence evidence,
  58. PermissionSet reqdPset,
  59. PermissionSet optPset,
  60. PermissionSet denyPset,
  61. out PermissionSet denied)
  62. {
  63. denied = null;
  64. return null;
  65. }
  66. public static IEnumerator ResolvePolicyGroups(Evidence evidence){
  67. return null;
  68. }
  69. public static void SavePolicy(){}
  70. public static void SavePolicyLevel(PolicyLevel level){}
  71. }
  72. }