Overriding a server API - 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

It will be quite common for a customizer to want to change the behavior of a Server API, although when the training examples were put together we couldn't think of an example!

However the facility is there, should you need to do it. In the example we force a column set when serializing the information coming back from a query. This isn't a great example because this is possible by setting an argument on the Query method.

It uses .NET inheritance to allow you to override the three main Server API methods (OnDeSerialize, OnHandlerBody and OnSerialize).

When the Server API is called, the server handler will look for any classes named after the Server API, and if there is more than one (for example, your override), then it will call the one that inherits off a class with the same name.