PermissionSetAttribute.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. //
  2. // System.Security.Permissions.PermissionSetAttribute.cs
  3. //
  4. // Duncan Mak <[email protected]>
  5. //
  6. // (C) 2002 Ximian, Inc. http://www.ximian.com
  7. //
  8. using System;
  9. using System.Security.Permissions;
  10. namespace System.Security.Permissions
  11. {
  12. [AttributeUsage (AttributeTargets.Assembly | AttributeTargets.Class |
  13. AttributeTargets.Struct | AttributeTargets.Constructor |
  14. AttributeTargets.Method)]
  15. [Serializable]
  16. public sealed class PermissionSetAttribute : CodeAccessSecurityAttribute
  17. {
  18. // Fields
  19. private string file;
  20. private string name;
  21. private bool isUnicodeEncoded;
  22. private string xml;
  23. // Constructor
  24. public PermissionSetAttribute (SecurityAction action)
  25. : base (action)
  26. {
  27. }
  28. // Properties
  29. public string File
  30. {
  31. get { return file; }
  32. set { file = value; }
  33. }
  34. public string Name
  35. {
  36. get { return name; }
  37. set { name = value; }
  38. }
  39. public bool UnicodeEncoded
  40. {
  41. get { return isUnicodeEncoded; }
  42. set { isUnicodeEncoded = value; }
  43. }
  44. public string XML
  45. {
  46. get { return xml; }
  47. set { xml = value; }
  48. }
  49. // Methods
  50. public override IPermission CreatePermission ()
  51. {
  52. return null; // Not used, used for inheritance from SecurityAttribute
  53. }
  54. [MonoTODO]
  55. public PermissionSet CreatePermissionSet ()
  56. {
  57. return null;
  58. }
  59. }
  60. }