/// <summary> /// Sets the GET superglobal. /// </summary> public void SetGet(Dictionary <string, StringValues> query) { Log.PrintGet(_logger, query); foreach (var item in query) { Get.Add(item.Key, item.Value.ToString()); } }
public void Read() { using (System.IO.StreamReader r = new System.IO.StreamReader(Path, System.Text.Encoding.GetEncoding(enc))) { while (!r.EndOfStream) { Get.Add(r.ReadLine()); ++RowCount; } } }
private void InitializeServer() { Get.Add( _builder.GetV3IndexPath(), request => { return(new Action <HttpListenerResponse>(response => { var mockResponse = _builder.BuildV3IndexResponse(Uri); response.ContentType = mockResponse.ContentType; SetResponseContent(response, mockResponse.Content); })); }); Get.Add("/", request => { return(ServerHandlerV3(request)); }); }