public void ClearState( XboxLiveAPIName xboxLiveApi ) { lock (instanceLock) { this.apiStateMap.Remove(xboxLiveApi); } }
public bool GetState( XboxLiveAPIName xboxLiveApi, out HttpRetryAfterApiState returnValue ) { lock (instanceLock) { return(this.apiStateMap.TryGetValue(xboxLiveApi, out returnValue)); } }
public void SetState( XboxLiveAPIName xboxLiveApi, HttpRetryAfterApiState state ) { lock (instanceLock) { this.apiStateMap[xboxLiveApi] = state; } }
internal XboxLiveHttpResponse( int httpStatusCode, bool networkFailure, HttpWebResponse response, DateTime responseReceivedTime, DateTime requestStartTime, string xboxUserId, XboxLiveSettings contextSettings, string url, XboxLiveAPIName xboxLiveAPI, string method, string requestBody, HttpCallResponseBodyType responseBodyType ) { this.HttpStatus = httpStatusCode; this.NetworkFailure = networkFailure; this.response = response; this.ResponseReceivedTime = responseReceivedTime; this.RequestStartTime = requestStartTime; this.XboxUserId = xboxUserId; this.ContextSettings = contextSettings; this.Url = url; this.XboxLiveAPI = xboxLiveAPI; this.Method = method; this.RequestBody = requestBody; this.ResponseBodyType = responseBodyType; if (response != null) { using (Stream body = response.GetResponseStream()) { this.Initialize((int)response.StatusCode, body, response.ContentLength, "utf-8", response.Headers); } } }