GetSerializedDataContract

.NET Vuser Functions

Deserializes a Data Contract from the specified file.

Object LrReplayUtils.GetSerializedDataContract<T>( string strFilename );

VB.NET

Function LrReplayUtils.GetSerializedDataContract<T>( ByVal strFilename As String ) as Object
T The type of the DataContract.
strFilenameThe XML file containing the serialized object. The file must be located in the script's data\SerializedObjects directory.

GetSerializedObject deserializes a DataContract object from the specified file located under the script data\SerializedObjects directory. The method returns an object of the type specified by argument T.

Note: Do not add this function manually to a script. It is generated by VuGen automatically.

Parameterization

Parameterization is not applicable to this function.

Example

This examples shows the use of GetSerializedObject to get a serialized object from a file, deserialized it, cast it to the appropriate type, and assign to a variable.

arg_1 = ((StructWithPrimitive)(LrReplayUtils.GetSerializedObject("Serialization_1.bin")));