WebPartAuthorizationEventArgs 类
定义
为 AuthorizeWebPart 事件提供数据。Provides data for the AuthorizeWebPart event.
public ref class WebPartAuthorizationEventArgs : EventArgs
public class WebPartAuthorizationEventArgs : EventArgs
type WebPartAuthorizationEventArgs = class
inherit EventArgs
Public Class WebPartAuthorizationEventArgs
Inherits EventArgs
- 继承
注解
AuthorizeWebPart事件发生在将 WebPart 控件添加到页面之前。The AuthorizeWebPart event occurs before a WebPart control is added to a page. 在许多常见情况下,可以将控件添加到页面中。There are a number of common scenarios where a control can be added to a page. 有关这些内容的完整说明,请参阅方法的 "备注" 部分 WebPartManager.IsAuthorized 。For a full description of these, see the Remarks section for the WebPartManager.IsAuthorized method.
WebPartAuthorizationEventArgs类提供对要添加到页面的 Web 部件控件的属性的访问。The WebPartAuthorizationEventArgs class provides access to properties about the Web Parts control being added to the page. 添加控件时,必须对其进行检查,以确定是否已 AuthorizationFilter 设置控件的属性,如果是,是否已授权控件添加到页中。When a control is added, it must be checked to see whether its AuthorizationFilter property has been set and, if so, whether the control is authorized to be added to the page.
构造函数
| WebPartAuthorizationEventArgs(Type, String, String, Boolean) |
初始化 WebPartAuthorizationEventArgs 类的新实例。Initializes a new instance of the WebPartAuthorizationEventArgs class. |
属性
| AuthorizationFilter |
获取分配给 AuthorizationFilter 控件的 WebPart 属性的字符串值,该值用于授权控件是否可以添加到页。Gets the string value assigned to the AuthorizationFilter property of a WebPart control, used for authorizing whether a control can be added to a page. |
| IsAuthorized |
获取或设置指示 Web 部件控件是否可以添加到页的值。Gets or sets the value indicating whether a Web Parts control can be added to a page. |
| IsShared |
获取一个值,该值指示 Web 部件控件是否对 Web 部件页的所有用户可见。Gets a value that indicates whether a Web Parts control is visible to all users of a Web Parts page. |
| Path |
获取被授权的控件的源文件的相对应用程序路径(如果该控件为用户控件)。Gets the relative application path to the source file for the control being authorized, if the control is a user control. |
| Type |
获取被检查授权情况的 Web 部件控件的 Type。Gets the Type of the Web Parts control being checked for authorization. |
方法
| Equals(Object) |
确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object. (继承自 Object) |
| GetHashCode() |
作为默认哈希函数。Serves as the default hash function. (继承自 Object) |
| GetType() |
获取当前实例的 Type。Gets the Type of the current instance. (继承自 Object) |
| MemberwiseClone() |
创建当前 Object 的浅表副本。Creates a shallow copy of the current Object. (继承自 Object) |
| ToString() |
返回表示当前对象的字符串。Returns a string that represents the current object. (继承自 Object) |