public static SetSampleResponse ( this config, object sample, |
||
config | this | The |
sample | object | The sample response. |
mediaType | The media type. | |
controllerName | string | Name of the controller. |
actionName | string | Name of the action. |
return | void |
public static void SetSampleResponse(this HttpConfiguration config, object sample, MediaTypeHeaderValue mediaType, string controllerName, string actionName)
{
config.GetHelpPageSampleGenerator().ActionSamples.Add(new HelpPageSampleKey(mediaType, SampleDirection.Response, controllerName, actionName, new[] { "*" }), sample);
}