你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
AuthorizeLevelAttribute 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重要
此 API 不符合 CLS。
将此属性应用于 SignalR Microsoft.AspNet.SignalR.Hub 类或方法来控制对这些类的访问。 根据 AuthorizationLevel 指定的 ,对目标操作的访问将限制为已被授予该级别或更高级别的请求。
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)]
[System.CLSCompliant(false)]
public class AuthorizeLevelAttribute : Microsoft.AspNet.SignalR.AuthorizeAttribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)>]
[<System.CLSCompliant(false)>]
type AuthorizeLevelAttribute = class
inherit AuthorizeAttribute
Public Class AuthorizeLevelAttribute
Inherits AuthorizeAttribute
- 继承
-
Microsoft.AspNet.SignalR.AuthorizeAttributeAuthorizeLevelAttribute
- 属性
构造函数
AuthorizeLevelAttribute(AuthorizationLevel) |
使用给定 |
属性
Level |
访问资源所需的最低授权级别。 |
方法
UserAuthorized(IPrincipal) |
将此属性应用于 SignalR Microsoft.AspNet.SignalR.Hub 类或方法来控制对这些类的访问。 根据 AuthorizationLevel 指定的 ,对目标操作的访问将限制为已被授予该级别或更高级别的请求。 |