public TestHttpServer(FixedPortAddress address, IHttpHandler handler)
        {
            Url = address.Url;
            this.handler = handler;

            Instance = this;
        }
        public HttpServer(FixedPortAddress address, IHttpHandler handler)
        {
            Contract.Requires(handler != null);

            this.address = address;
            this.handler = handler;
            listener = new HttpListener();
        }
        public void SendPut(
            FixedPortAddress address,
            Action<Stream> toPerformOnRequest,
            Action<Stream> toPerformOnResponse,
            Action<Exception> toPerformOnError,
            Action toPerformOnCompletion)
        {
            Log(address);

            PutSender.Send(toPerformOnRequest, toPerformOnResponse, toPerformOnError, toPerformOnCompletion, address.Url);
        }
 public void SendPut(FixedPortAddress address, Action<Stream> toPerformOnRequest)
 {
     Log(address);
     SendPut(address, toPerformOnRequest, s => { }, _ => { }, () => { });
 }
 static void Log(FixedPortAddress address)
 {
     Logger.Debug("Sending put to {0}", address);
 }
 public IHttpServer Build(FixedPortAddress address, IHttpHandler handler)
 {
     return new TestHttpServer(address, handler);
 }