Implementing OnDeserialize - SmartPlant Foundation - IM Update 44 - Customization & Programming - Hexagon

SmartPlant Foundation Customization

Language
English
Product
SmartPlant Foundation
Search by Category
Customization & Programming
SmartPlant Foundation / SDx Version
10

The job of this method is to parse the XML request from the client into the arguments to be used by the method. Each method may have unique inputs to it. In fact, if you write new Client APIs, you can send any information through the query request you require.

However, if all you require is just the object, there is a helper function to do this for you:

Public Overridable Sub DeSerializeObject(ByVal pnodNode As System.Xml.XmlNode)

And a multi-object version:

Public Overridable Sub DeSerializeObjects(ByVal pnodObjectsNode As System.Xml.XmlNode)

So, unless you have specific requirements, you can implement your method like this:

Protected Overrides Sub OnDeSerialize()

MyBase.DeSerializeObject(SPFRequestContext.Instance.Request.SelectSingleNode("/Query/Object"))

End Sub