HelpPageConfigurationExtensions.SetSampleResponse (HttpConfiguration, Object, MediaTypeHeaderValue, String, String, String()) Method

Sets the sample response directly for the specified media type of the action with specific parameters.
<Extension()> _ 
Public Shared Sub SetSampleResponse( _ 
ByVal config As HttpConfiguration, _ 
ByVal sample As Object, _ 
ByVal mediaType As MediaTypeHeaderValue, _ 
ByVal controllerName As String, _ 
ByVal actionName As String, _ 
ByVal ParamArray parameterNames As String() _ 
)
This language is not supported or no code example is available.
public static void SetSampleResponse( 
this HttpConfiguration config
object sample
MediaTypeHeaderValue mediaType
string controllerName
string actionName
params string[] parameterNames 
)
This language is not supported or no code example is available.
[Extension()] 
public:  
static void SetSampleResponse( 
HttpConfiguration^ config
object^ sample
MediaTypeHeaderValue^ mediaType
String^ controllerName
String^ actionName
...array< array< String^ >^ >^ parameterNames 
)
This language is not supported or no code example is available.
public  
Extension() 
static function SetSampleResponse( 
config : HttpConfiguration
sample : object
mediaType : MediaTypeHeaderValue
controllerName : String
actionName : String
... parameterNames : String[] 
);
This language is not supported or no code example is available.

Parameters

config
HttpConfiguration

The HttpConfiguration.

sample
object

The sample response.

mediaType
MediaTypeHeaderValue

The media type.

controllerName
string

Name of the controller.

actionName
string

Name of the action.

parameterNames
string[]

The parameter names.

.NET Framework

Supported in: 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8

In this article

Definition