JwtWebApi.Areas.HelpPage.HelpPageConfigurationExtensions.SetSampleForType C# (CSharp) Méthode

SetSampleForType() public static méthode

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.
Résultat void
        public static void SetSampleForType(this HttpConfiguration config, object sample, MediaTypeHeaderValue mediaType, Type type)
        {
            config.GetHelpPageSampleGenerator().ActionSamples.Add(new HelpPageSampleKey(mediaType, type), sample);
        }