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

SetSampleForType() 공개 정적인 메소드

Sets the sample directly for all actions with the specified type and media type.
public static SetSampleForType ( this config, object sample, MediaTypeHeaderValue mediaType, Type type ) : void
config this The .
sample object The sample.
mediaType System.Net.Http.Headers.MediaTypeHeaderValue The media type.
type System.Type The parameter type or return type of an action.
리턴 void
        public static void SetSampleForType(this HttpConfiguration config, object sample, MediaTypeHeaderValue mediaType, Type type)
        {
            config.GetHelpPageSampleGenerator().ActionSamples.Add(new HelpPageSampleKey(mediaType, type), sample);
        }