Beispiel #1
0
 public Admin(EndpointDb endpointDb, HttpListener listener)
 {
     _endpointDb = endpointDb;
     _listener = listener;
     _pingmethods = new Dictionary<string, Action<HttpListenerContext>>
     {
         {
             "GET",
             GoPing
         },
         {
             "HEAD",
             GoPing
         }
     };
     _statusmethods = new Dictionary<string, Action<HttpListenerContext>>
     {
         {
             "GET",
             GoStatus
         },
         {
             "HEAD",
             GoStatus
         }
     };
     _idmethods = new Dictionary<string, Action<HttpListenerContext>>
     {
         {"GET", GoGet},
         {"HEAD", GoGet},
         {"PUT", GoPut},
         {"DELETE", GoDelete}
     };
     _rootmethods = new Dictionary<string, Action<HttpListenerContext>>
     {
         {"GET", GoGetAll},
         {"HEAD", GoGetAll},
         {"POST", GoPost},
         {"DELETE", GoDeleteAll}
     };
 }
Beispiel #2
0
 public Stubs(EndpointDb endpointDb, HttpListener listener)
 {
     _endpointDb = endpointDb;
     _listener = listener;
 }
Beispiel #3
0
 public Stubs(EndpointDb endpointDb)
     : this(endpointDb, new HttpListener())
 {
 }
 public void BeforeEach()
 {
     Out.Mute = true;
     _endpointDb = new EndpointDb();
 }
Beispiel #5
0
 public Admin(EndpointDb endpointDb)
     : this(endpointDb, new HttpListener())
 {
 }