CodeDomSerializerBase.DeserializePropertiesFromResources Method

Definition

Deserializes properties on the given object from the invariant culture's resource bundle.

protected:
 void DeserializePropertiesFromResources(System::ComponentModel::Design::Serialization::IDesignerSerializationManager ^ manager, System::Object ^ value, cli::array <Attribute ^> ^ filter);
protected void DeserializePropertiesFromResources (System.ComponentModel.Design.Serialization.IDesignerSerializationManager manager, object value, Attribute[] filter);
member this.DeserializePropertiesFromResources : System.ComponentModel.Design.Serialization.IDesignerSerializationManager * obj * Attribute[] -> unit
Protected Sub DeserializePropertiesFromResources (manager As IDesignerSerializationManager, value As Object, filter As Attribute())

Parameters

manager
IDesignerSerializationManager

The IDesignerSerializationManager to use for serialization.

value
Object

The object from which the properties are to be deserialized.

filter
Attribute[]

An Attribute array that filters which properties will be deserialized.

Remarks

The DeserializePropertiesFromResources method is a helper method that derived classes can call. It looks for properties on the given object and attempts to load their values out of the invariant culture's resource bundle. This is generally used to handle design-time properties that are not emitted into source code. It should not be used for localized properties because it only operates on the invariant culture.

This method inspects all of the properties of the value parameter that match the attributes specified by the filter parameter, and then checks for those properties in a resource binary object. This is useful for deserializing properties that cannot be represented in code, such as design-time properties.

This method requires that a designer loader offers an IResourceService to read resources. If the IResourceService provides a ResXResourceReader for the invariant culture, then DeserializePropertiesFromResources will read resources from the XML resource (.resx) file's metadata section, which is not included in final compiled code. If this service is not available, no resources will be read.

Applies to

See also