The middleware triggers the invocation of this handler just before a Service Instance is destroyed.

C# |
public virtual void OnDestroyService()

This handler should do any cleanup for any resources that were used in the [OnCreateService] method. Exceptions that are thrown in onDestroyService are not returned to the client, they are logged in the SIM log file. Default implementation does nothing.

Exception | Condition |
---|---|
[SoamException] | The application developer can throw SoamException (or subclassed exceptions: FailureException or FatalException) from this method to indicate that an error occurred during the destruction/uninitializion of the service instance. |

[ServiceContainer.OnCreateService]