internal static SecurityToken EndGetMessagingToken(this TokenProvider tokenProvider, IAsyncResult result) { Exception exception; SecurityToken securityToken; try { securityToken = tokenProvider.EndGetToken(result); } catch (Exception exception1) { if (TokenProviderUtility.HandleTokenException(exception1, out exception)) { throw exception; } throw; } return(securityToken); }
internal static IAsyncResult BeginGetMessagingToken(this TokenProvider tokenProvider, Uri namespaceAddress, string appliesTo, string action, bool bypassCache, TimeSpan timeout, AsyncCallback callback, object state) { Exception exception; IAsyncResult asyncResult; try { asyncResult = tokenProvider.BeginGetToken(namespaceAddress, appliesTo, action, bypassCache, timeout, callback, state); } catch (Exception exception1) { if (TokenProviderUtility.HandleTokenException(exception1, out exception)) { throw exception; } throw; } return(asyncResult); }