Return() public method

public Return ( Func body ) : ResponseBuilder
body Func
return ResponseBuilder
Ejemplo n.º 1
0
        public ResponseBuilder Get(HttpRequestHead request)
        {
            var stubNotFoundResponseBuilder = new ResponseBuilder();

            stubNotFoundResponseBuilder.Return(string.Format("Stub not found for {0} : {1}", request.Method, request.Uri));
            stubNotFoundResponseBuilder.WithStatus(HttpStatusCode.NotFound);
            return(stubNotFoundResponseBuilder);
        }
Ejemplo n.º 2
0
 public IRequestStub Return(string responseBody)
 {
     _webResponseBuilder.Return(responseBody);
     return(this);
 }
Ejemplo n.º 3
0
		public ResponseBuilder Get(HttpRequestHead request) {
			var stubNotFoundResponseBuilder = new ResponseBuilder();
			stubNotFoundResponseBuilder.Return(string.Format("Stub not found for {0} : {1}", request.Method, request.Uri));
			stubNotFoundResponseBuilder.WithStatus(HttpStatusCode.NotFound);
			return stubNotFoundResponseBuilder;
		}