AW.Webapi.Sample.Areas.HelpPage.HelpPageConfigurationExtensions.SetActualRequestType C# (CSharp) Method

SetActualRequestType() public static method

Specifies the actual type of System.Net.Http.ObjectContent{T} passed to the System.Net.Http.HttpRequestMessage in an action. The help page will use this information to produce more accurate request samples.
public static SetActualRequestType ( this config, Type type, string controllerName, string actionName ) : void
config this The .
type System.Type The type.
controllerName string Name of the controller.
actionName string Name of the action.
return void
        public static void SetActualRequestType(this HttpConfiguration config, Type type, string controllerName, string actionName)
        {
            config.GetHelpPageSampleGenerator().ActualHttpMessageTypes.Add(new HelpPageSampleKey(SampleDirection.Request, controllerName, actionName, new[] { "*" }), type);
        }