コード例 #1
0
 public IHttpActionResult OkResultWithContentNegotiatorAction()
 {
     return(new OkNegotiatedContentResult <int>(
                5,
                TestObjectFactory.GetCustomContentNegotiator(),
                TestObjectFactory.GetCustomHttpRequestMessage(),
                TestObjectFactory.GetFormatters()));
 }
コード例 #2
0
 public IHttpActionResult CreatedActionWithCustomContentNegotiator()
 {
     return(new CreatedNegotiatedContentResult <ICollection <ResponseModel> >(
                TestObjectFactory.GetUri(),
                this.responseModel,
                TestObjectFactory.GetCustomContentNegotiator(),
                TestObjectFactory.GetCustomHttpRequestMessage(),
                TestObjectFactory.GetFormatters()));
 }
コード例 #3
0
 public IHttpActionResult ContentActionWithCustomFormatters()
 {
     return(new NegotiatedContentResult <int>(
                HttpStatusCode.OK,
                5,
                TestObjectFactory.GetCustomContentNegotiator(),
                TestObjectFactory.GetCustomHttpRequestMessage(),
                TestObjectFactory.GetFormatters()));
 }