private HttpResponseMessage Execute() { HttpError error = new HttpError(_message); return(NegotiatedContentResult <HttpError> .Execute(HttpStatusCode.BadRequest, error, _dependencies.ContentNegotiator, _dependencies.Request, _dependencies.Formatters)); }
private HttpResponseMessage Execute() { HttpError error = new HttpError(_exception, _dependencies.IncludeErrorDetail); return(NegotiatedContentResult <HttpError> .Execute(HttpStatusCode.InternalServerError, error, _dependencies.ContentNegotiator, _dependencies.Request, _dependencies.Formatters)); }
/// <inheritdoc /> public virtual Task <HttpResponseMessage> ExecuteAsync(CancellationToken cancellationToken) { return(Task.FromResult( NegotiatedContentResult <T> .Execute( HttpStatusCode.OK, _content, _dependencies.ContentNegotiator, _dependencies.Request, _dependencies.Formatters ) )); }