Ejemplo n.º 1
0
        public RequestState(RequestStateKey key)
        {
            if (key == null)
            {
                throw new ArgumentNullException("key");
            }

            this.key = key;
        }
Ejemplo n.º 2
0
        public void Delete(RequestStateKey key)
        {
            if (key == null)
            {
                throw new ArgumentNullException("key");
            }

            lock (SyncRoot) {
                if (states.ContainsKey(key))
                {
                    states.Remove(key);
                }
            }
        }
Ejemplo n.º 3
0
        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);
            }
        }
Ejemplo n.º 4
0
 internal OAuthRequest(OAuthClientContext context, OAuthEndPoint resourceEndPoint, string verifier, RequestStateKey stateKey)
 {
     this.context          = context;
     this.resourceEndPoint = resourceEndPoint;
     this.verifier         = verifier;
     state = context.RequestStateStore.Get(stateKey);
 }