AdvantageCMS.Core.Common.BaseClasses Namespace
Advantage CSP

ObjectXMLSerializer<(Of <(<'T>)>)>..::..Save Method (T, String, IsolatedStorageFile, array<Type>[]()[][])

Saves an object to an XML file in Document format, located in a specified isolated storage area, and supplying extra data types to enable serialization of custom types within the object.

Namespace:  AdvantageCMS.Core.Utils
Assembly:  AdvantageCMS.Core (in AdvantageCMS.Core.dll)

Syntax


public static void Save(
	T serializableObject,
	string fileName,
	IsolatedStorageFile isolatedStorageDirectory,
	Type[] extraTypes
)

Parameters

serializableObject
Type: T
Serializable object to be saved to file.
fileName
Type: String
Name of the file in the isolated storage area to save the object to.
isolatedStorageDirectory
Type: IsolatedStorageFile
Isolated storage area directory containing the XML file to save the object to.
extraTypes
Type: array<Type>[]()[][]
Extra data types to enable serialization of custom types within the object.

Examples


C#
SerializableObject serializableObject = new SerializableObject();
ObjectXMLSerializer<SerializableObject>.Save(serializableObject, "XMLObjects.xml", IsolatedStorageFile.GetUserStoreForAssembly(), new Type[] { typeof(MyCustomType) });