Before, it has been possible to use something like...
var scriptFactory = ServiceCache.ScriptFactory;
var connectionInfo = scriptFactory.CurrentlyActiveWndConnectionInfo;
var conn = connectionInfo.UIConnectionInfo;
Now I am completely lost about how to get the connection that is used by the active document. Does anyone have any idea of how to do something similiar? Or should it still work but I just failed to do so?