public RequestState(RequestStateKey key) { if (key == null) { throw new ArgumentNullException("key"); } this.key = key; }
public void Delete(RequestStateKey key) { if (key == null) { throw new ArgumentNullException("key"); } lock (SyncRoot) { if (states.ContainsKey(key)) { states.Remove(key); } } }
public RequestState Get(RequestStateKey key) { if (key == null) { throw new ArgumentNullException("key"); } lock (SyncRoot) { RequestState state; if (!states.TryGetValue(key, out state)) { state = new RequestState(key); Store(state); } return(state); } }
internal OAuthRequest(OAuthClientContext context, OAuthEndPoint resourceEndPoint, string verifier, RequestStateKey stateKey) { this.context = context; this.resourceEndPoint = resourceEndPoint; this.verifier = verifier; state = context.RequestStateStore.Get(stateKey); }