Export (0) Print
Expand All

CodeDomSerializerBase.SerializePropertiesToResources Method

Serializes the properties on the given object into the invariant culture’s resource bundle.

Namespace:  System.ComponentModel.Design.Serialization
Assembly:  System.Design (in System.Design.dll)

protected void SerializePropertiesToResources(
	IDesignerSerializationManager manager,
	CodeStatementCollection statements,
	Object value,
	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: System.Attribute[]

An Attribute array that filters which properties will be serialized.

ExceptionCondition
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.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft