How can I implement similar deserialize functionality from XML to object as seen below on a .NET code snippet?
What I understand is that it is using the .NET System.XML.Serialization(4.0.0.0) GAC. If I select this GAC on a step using .NET adapter in TestStand2016 I can't see any classes. Is this correct way to do this?
Computer has .NET framework 4.6.1 SDK installed.
private Macro.Macro[] ReadMacroFile(string macroFileName)
{
FileStream fs = null;
try
{
var ser = newXmlSerializer(typeof(Macro.Macro[]));
fs = newFileStream((newFileInfo(macroFileName)).FullName, FileMode.Open);
var macroList = (Macro.Macro[])ser.Deserialize(fs);
return macroList;
}
finally
{
if (fs != null) fs.Close();
}
}
Best Regards
Petri