CanvasControlLibrary.Areas.HelpPage.HelpPageConfigurationExtensions.SetSampleRequest C# (CSharp) 메소드

SetSampleRequest() 공개 정적인 메소드

Sets the sample request directly for the specified media type and action.
public static SetSampleRequest ( this config, object sample, MediaTypeHeaderValue mediaType, string controllerName, string actionName ) : void
config this The .
sample object The sample request.
mediaType System.Net.Http.Headers.MediaTypeHeaderValue The media type.
controllerName string Name of the controller.
actionName string Name of the action.
리턴 void
        public static void SetSampleRequest(this HttpConfiguration config, object sample, MediaTypeHeaderValue mediaType, string controllerName, string actionName)
        {
            config.GetHelpPageSampleGenerator().ActionSamples.Add(new HelpPageSampleKey(mediaType, SampleDirection.Request, controllerName, actionName, new[] { "*" }), sample);
        }