Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Problems.GrammaticalOptimization/SharpVectorCore/Utils/Net/DataWebRequest.cs @ 13825

Last change on this file since 13825 was 12762, checked in by aballeit, 9 years ago

#2283 GUI updates, Tree-chart, MCTS Version 2 (prune leaves)

File size: 704 bytes
Line 
1using System;
2using System.Net;
3
4namespace SharpVectors.Net
5{
6  public class DataWebRequest : WebRequest, IWebRequestCreate
7  {
8    public static bool Register()
9    {
10      return WebRequest.RegisterPrefix("data", new DataWebRequest());
11    }
12
13    public new WebRequest Create(Uri uri)
14    {
15      return new DataWebRequest(uri);
16    }
17
18    //only for use from Register();
19    private DataWebRequest()
20    {
21    }
22
23    public DataWebRequest(Uri uri)
24    {
25      requestUri = uri;
26    }
27
28    private Uri requestUri;
29    public override Uri RequestUri
30    {
31      get
32      {
33        return requestUri;
34      }
35    }
36
37    public override WebResponse GetResponse()
38    {
39      return new DataWebResponse(RequestUri);
40    }
41  }
42}
Note: See TracBrowser for help on using the repository browser.