The following example shows you how to get the ServerContext instance for a DBConnectionContext and shut down the server:
// A method that uses an instance of the ServerContext to shut down the server
public void ShutDownServer() {
ServerContext context = _cc.GetServerContext();
context.Shutdown();
}