WebPartStorageAttribute 类
指定应如何存储一个属性。
继承层次结构
System.Object
System.Attribute
Microsoft.SharePoint.WebPartPages.WebPartStorageAttribute
命名空间: Microsoft.SharePoint.WebPartPages
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
<AttributeUsageAttribute(AttributeTargets.Property, AllowMultiple := False)> _
<AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
Public NotInheritable Class WebPartStorageAttribute _
Inherits Attribute
用法
Dim instance As WebPartStorageAttribute
[AttributeUsageAttribute(AttributeTargets.Property, AllowMultiple = false)]
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public sealed class WebPartStorageAttribute : Attribute
备注
如果未为属性指定WebPartStorageAttribute属性,默认情况下使用Personal 。如果WebPartStorageAttribute属性指定的属性,但未设置ControlledExport属性,则假定值设置为false。
如果要开发 SharePoint 2003 Web 部件,您可以应用PersonalizableAttribute属性和WebPartStorageAttribute属性更改的序列化方法。但是,对于的 SharePoint 的更高版本、 PersonalizableAttribute属性是用于反序列化 web 部件,使用WebPartStorageAttribute属性之前的默认选项。
线程安全性
该类型的任何公共 静态 (已共享 在 Visual Basic 中) 成员都是线程安全的。不保证任何实例成员都是线程安全的。