C# Class ChaosTest.WebService.Extensions.ApiControllerExtentions

Extension methods for ApiController to help render HTML and JS files. This is here because we are using Web API but want to also render an HTML page. Normally we use ASP.NET MVC for this, but that still requires IIS (System.Web) at this time and we need to self-host, for which we use OWIN. ASP.NET vNext will allow self-host with MVC, at which point we won't need these extensions any more.
Show file Open project: Azure-Samples/service-fabric-dotnet-testing-chaos-service

Public Methods

Method Description
View ( this instance, string view, string mediaType ) : HttpResponseMessage

Creates an HttpResponseMessage from the specified view with the specified media type. The view must a fully-qualified assembly name of an embedded resources.

Method Details

View() public static method

Creates an HttpResponseMessage from the specified view with the specified media type. The view must a fully-qualified assembly name of an embedded resources.
public static View ( this instance, string view, string mediaType ) : HttpResponseMessage
instance this
view string
mediaType string
return System.Net.Http.HttpResponseMessage