AuthorizationAttribute 成员
充当用来通过自定义元数据控制授权的类的基类。
以下各表列出了由 AuthorizationAttribute 类型公开的成员。
受保护 构造函数
名称 | 说明 | |
---|---|---|
AuthorizationAttribute | 初始化 AuthorizationAttribute 类的新实例。 |
顶部
公共 属性
名称 | 说明 | |
---|---|---|
![]() |
ErrorMessage | 获取或设置要在 ErrorMessage 中返回的文本错误消息或资源键。 |
![]() |
ResourceType | 获取或设置要用作 ErrorMessage 的资源管理器的 Type。 |
![]() |
TypeId | (继承自 Attribute) |
顶部
公共 方法
(另请参见 受保护 方法)
名称 | 说明 | |
---|---|---|
![]() |
Authorize | 确定给定的主体对象是否获得了授权来执行给定的 AuthorizationContext 所描述的特定操作。 |
![]() |
Equals | 已重载。(继承自 Attribute) |
![]() ![]() |
GetCustomAttribute | 已重载。(继承自 Attribute) |
![]() ![]() |
GetCustomAttributes | 已重载。(继承自 Attribute) |
![]() |
GetHashCode | (继承自 Attribute) |
![]() |
GetType | (继承自 Object) |
![]() |
IsDefaultAttribute | (继承自 Attribute) |
![]() ![]() |
IsDefined | 已重载。(继承自 Attribute) |
![]() |
Match | (继承自 Attribute) |
![]() ![]() |
ReferenceEquals | (继承自 Object) |
![]() |
ToString | (继承自 Object) |
顶部
受保护 方法
名称 | 说明 | |
---|---|---|
![]() |
Finalize | (继承自 Object) |
![]() |
FormatErrorMessage | 对于当前的 AuthorizationAttribute 获取要显示给用户的、带有格式的错误消息。 |
![]() |
IsAuthorized | 特定于实现的方法,用于确定给定的 IPrincipal 对象是否获得了授权来执行给定的 AuthorizationContext 对象所描述的特定操作。 |
![]() |
MemberwiseClone | (继承自 Object) |
顶部
显式接口实现
顶部
另请参见
参考
AuthorizationAttribute 类
System.ComponentModel.DataAnnotations 命名空间