private WebResponse GetResponseInternal() { if (webResponse != null) { return(webResponse); } lock (this) { if (requesting) { requestEndEvent = new AutoResetEvent(initialState: false); } } if (requestEndEvent != null) { requestEndEvent.WaitOne(); } FileStream fileStream = null; try { fileStream = new FileWebStream(this, FileMode.Open, FileAccess.Read, FileShare.Read); } catch (Exception ex) { throw new WebException(ex.Message, ex); IL_0073 :; } webResponse = new FileWebResponse(uri, fileStream); return(webResponse); }
WebResponse GetResponseInternal() { if (webResponse != null) { return(webResponse); } lock (this) { if (requesting) { requestEndEvent = new AutoResetEvent(false); } } if (requestEndEvent != null) { requestEndEvent.WaitOne(); } FileStream fileStream = null; try { fileStream = new FileWebStream(this, FileMode.Open, FileAccess.Read, FileShare.Read); this.webResponse = new FileWebResponse(this.uri, fileStream); } catch (Exception ex) { this.webResponse = new FileWebResponse(this.uri, new WebException(ex.Message, ex)); } return(this.webResponse); }
WebResponse GetResponseInternal () { if (webResponse != null) return webResponse; lock (this) { if (requesting) { requestEndEvent = new AutoResetEvent (false); } } if (requestEndEvent != null) { requestEndEvent.WaitOne (); } FileStream fileStream = null; try { fileStream = new FileWebStream (this, FileMode.Open, FileAccess.Read, FileShare.Read); this.webResponse = new FileWebResponse (this.uri, fileStream); } catch (Exception ex) { this.webResponse = new FileWebResponse (this.uri, new WebException (ex.Message, ex)); } return this.webResponse; }