IVersioningPersonalizable.Load(IDictionary) 方法
定义
将个性化数据加载到一个 Web 部件控件,该控件由于版本更改而没有相应的数据个性化属性。Loads personalization data to a Web Parts control that does not have a corresponding personalized property for the data due to a version change.
public:
void Load(System::Collections::IDictionary ^ unknownProperties);
public void Load (System.Collections.IDictionary unknownProperties);
abstract member Load : System.Collections.IDictionary -> unit
Public Sub Load (unknownProperties As IDictionary)
参数
- unknownProperties
- IDictionary
一个无法应用于控件的个性化数据字典。A dictionary of personalization data that could not be applied to a control.
注解
unknownProperties参数包含无法应用于控件的 "用户" 和 "共享" 范围的未知个性化数据的合并表示形式。The unknownProperties parameter contains a merged representation of unknown personalization data, of both "User" and "Shared" scope, that could not be applied to the control. 当页面在用户范围中运行时,将 (提供未知的用户范围值(如果可用)) 而不是未知的共享范围值。When a page is running in user scope, the unknown user-scope values are supplied (if available) rather than unknown shared-scope values. 此信息存储为一系列名称/值对,其中每个名称都是在控件上找不到的属性的字符串名称,每个值都包含属性值。This information is stored as a series of name/value pairs where each name is the string name of a property that was not found on the control and each value contains the property value. 控件负责将值强制转换或转换为适当的类型并执行进一步的处理 (例如,将数据从旧属性映射到新属性) 。It is the responsibility of the control to cast or convert the value to the appropriate type and carry out further processing (such as mapping data from an old property to a new property).
如果控件的状态发生更改,则它应调用 SetPersonalizationDirty 继承方法 (; 如果控件不是派生自) ,则为公共静态方法 WebPart 。If a control's state changes, it should call SetPersonalizationDirty (either the inherited method, or the public static method in the case of a control that does not derive from WebPart). 如果控件将其自身标记为 "已更新",则 Web 部件控件集将从控件提取个性化设置数据,而不考虑控件的 "已更新" 状态,并将其保存回个性化生命周期中的基础数据存储区。If a control marks itself as "dirty", the Web Parts control set will extract personalization data from the control, regardless of the control's "dirty" state, and save it back to the underlying data store later in the personalization life cycle. 如果由于处理参数中的值 unknownProperties 而导致控件的状态发生更改,则控件应将其标记为 "已更新"。A control should mark itself as "dirty" if, as a result of processing the values in the unknownProperties parameter, the control's state has changed.
请注意,如果在导入 Web 部件控件时检测到孤立属性,则会自动调用此方法。Note that if orphaned properties are detected when importing Web Parts controls, this method is automatically called.