public AuthorizationState CreateNewAuthAwaiter() { var awaiter = AuthorizationState.GetNewAuth(); AuthorizationStates.TryAdd(awaiter.State, awaiter); return(awaiter); }
public AuthorizationState CreateNewAuthentificationAwaiter() { var authAwaiter = AuthorizationState.GetNewAuth(); if (_authorizationStates.TryAdd(authAwaiter.State, authAwaiter)) { return(authAwaiter); } throw new Exception("Couldn't create new authentification state."); }