PersonalizationProvider.LoadPersonalizationBlobs(WebPartManager, String, String, Byte[], Byte[]) 方法

定义

在派生类中重写时,从基础数据存储区加载原始个性化设置数据。When overridden in a derived class, loads raw personalization data from the underlying data store.

protected:
 abstract void LoadPersonalizationBlobs(System::Web::UI::WebControls::WebParts::WebPartManager ^ webPartManager, System::String ^ path, System::String ^ userName, cli::array <System::Byte> ^ % sharedDataBlob, cli::array <System::Byte> ^ % userDataBlob);
protected abstract void LoadPersonalizationBlobs (System.Web.UI.WebControls.WebParts.WebPartManager webPartManager, string path, string userName, ref byte[] sharedDataBlob, ref byte[] userDataBlob);
abstract member LoadPersonalizationBlobs : System.Web.UI.WebControls.WebParts.WebPartManager * string * string * Byte[] * Byte[] -> unit
Protected MustOverride Sub LoadPersonalizationBlobs (webPartManager As WebPartManager, path As String, userName As String, ByRef sharedDataBlob As Byte(), ByRef userDataBlob As Byte())

参数

webPartManager
WebPartManager

管理个性化设置数据的 WebPartManagerThe WebPartManager managing the personalization data.

path
String

要用作检索关键字的个性化设置信息的路径。The path for personalization information to be used as the retrieval key.

userName
String

要用作检索关键字的个性化设置信息的用户名。The user name for personalization information to be used as the retrieval key.

sharedDataBlob
Byte[]

Shared 范围返回的数据。The returned data for the Shared scope.

userDataBlob
Byte[]

User 范围返回的数据。The returned data for the User scope.

注解

派生自 PersonalizationProvider 并实现此方法的类应将 webPartManagerpathusername 参数用作检索键。Classes that derive from PersonalizationProvider and implement this method should use the webPartManager, path, and username parameters as retrieval keys. 无论数据存储在数据存储中的方式如何 (某些数据存储可能会执行某种类型的智能存储) ,必须在两个数组中以打包的字节集的形式返回个性化数据。Regardless of how the data is stored in the data store (some data stores might perform some type of intelligent storage), the personalization data must be returned as a packed set of bytes in two arrays. 返回的数据必须符合以下规则:The returned data must conform to the following rules:

  • 范围的数据 Shared 必须始终在参数中返回 sharedDataBlobThe data for the Shared scope must always be returned in the sharedDataBlob parameter.

  • 根据键值,将在 User 参数中返回数据 userDataBlobDepending on the key values, User data is returned in the userDataBlob parameter. 参数的非 nulluserName 指示 User 还应检索数据。A non-null value for the userName parameter indicates that User data should also be retrieved.

从派生并实现此方法的个性化设置提供程序 PersonalizationProvider 可以通过在一次往返过程中检索所有个性化数据来优化与其数据存储区的交互,而不是 Shared User 在两个单独的往返行程中检索和数据。A personalization provider that derives from PersonalizationProvider and implements this method can optimize interactions with its data store by retrieving all personalization data in one round trip, as opposed to retrieving Shared and User data in two separate round trips.

适用于