CodeDomSerializerBase::SerializePropertiesToResources Method (IDesignerSerializationManager^, CodeStatementCollection^, Object^, array<Attribute^>^)
Serializes the properties on the given object into the invariant culture’s resource bundle.
Assembly: System.Design (in System.Design.dll)
protected: void SerializePropertiesToResources( IDesignerSerializationManager^ manager, CodeStatementCollection^ statements, Object^ value, array<Attribute^>^ filter )
Parameters
- manager
-
Type:
System.ComponentModel.Design.Serialization::IDesignerSerializationManager^
The IDesignerSerializationManager to use for serialization.
- statements
-
Type:
System.CodeDom::CodeStatementCollection^
Not used.
- value
-
Type:
System::Object^
The object whose properties will be serialized.
- filter
-
Type:
array<System::Attribute^>^
An Attribute array that filters which properties will be serialized.
| Exception | Condition |
|---|---|
| ArgumentNullException | manager, value, or statements is null. |
The SerializePropertiesToResources method is a helper method that derived classes can call. It looks at properties on the value parameter that match the filter parameter, and then it serializes the properties into the invariant culture resource bundle. If the resource service returns a ResXResourceWriter, the property values will be stored in the metadata section of the XML resource (.resx) file. The statements parameter is not used.
To be serialized as a resource, a property must be simple (not a content property) and its value must be serializable. Properties that do not conform to this pattern will be skipped.
SerializePropertiesToResources requires an IResourceService to obtain a ResourceWriter to write resources for the invariant culture. If this service is not available, no resources will be written.
Available since 2.0