SecurityAttribute 成员

CodeAccessSecurityAttribute 派生自的声明安全性指定基属性类。

下表列出了由 SecurityAttribute 类型公开的成员。

受保护的构造函数

  名称 说明
Protected method SecurityAttribute 用指定的 SecurityAction 初始化 SecurityAttribute 的新实例。

页首

公共属性

  名称 说明
Public property Action 获取或设置安全性操作。
Public property TypeId  当在派生类中实现时,获取该 Attribute 的唯一标识符。(从 Attribute 继承。)
Public property Unrestricted 获取或设置一个值,该值指示是否声明了对受该属性 (Attribute) 保护的资源有完全(无限制的)权限。

页首

公共方法

(请参见 受保护的方法 )

  名称 说明
Public method CreatePermission 在派生类中重写时,将创建一个权限对象,该对象随后可序列化为二进制格式并与 SecurityAction 一起永久地存储在程序集的元数据中。
Public method Equals  已重载。 (从 Attribute 继承。)
Public method Static GetCustomAttribute  已重载。 检索应用于程序集、模块、类型成员或方法参数的指定类型的自定义属性。 (从 Attribute 继承。)
Public method Static GetCustomAttributes  已重载。 检索应用于程序集、模块、类型成员或方法参数的自定义属性的数组。 (从 Attribute 继承。)
Public method GetHashCode  返回此实例的哈希代码。 (从 Attribute 继承。)
Public method GetType  获取当前实例的 Type。 (从 Object 继承。)
Public method IsDefaultAttribute  当在派生类中重写时,指示此实例的值是否是派生类的默认值。 (从 Attribute 继承。)
Public method Static IsDefined  已重载。 确定是否将指定类型的任意自定义属性应用于程序集、模块、类型成员或方法参数。 (从 Attribute 继承。)
Public method Match  当在派生类中重写时,返回一个指示此实例是否等于指定对象的值。 (从 Attribute 继承。)
Public method Static ReferenceEquals  确定指定的 Object 实例是否是相同的实例。 (从 Object 继承。)
Public method ToString  返回表示当前 ObjectString。 (从 Object 继承。)

页首

受保护的方法

  名称 说明
Protected method Finalize  允许 Object 在“垃圾回收”回收 Object 之前尝试释放资源并执行其他清理操作。 (从 Object 继承。)
Protected method MemberwiseClone  创建当前 Object 的浅表副本。 (从 Object 继承。)

页首

请参见

参考

SecurityAttribute 类
System.Security.Permissions 命名空间

其他资源

利用属性扩展元数据