HelpPageSampleGenerator Class

This class will generate the samples for the help page.
Public Class HelpPageSampleGenerator
This language is not supported or no code example is available.
public class HelpPageSampleGenerator
This language is not supported or no code example is available.
public ref class HelpPageSampleGenerator 
This language is not supported or no code example is available.
public class HelpPageSampleGenerator
This language is not supported or no code example is available.
Name Description
Public constructor HelpPageSampleGenerator() Initializes a new instance of the HelpPageSampleGenerator class.
Top
Name Description
Public property ActionSamples Gets the objects that are used directly as samples for certain actions.
Public property ActualHttpMessageTypes Gets CLR types that are used as the content of HttpRequestMessage or HttpResponseMessage.
Public property SampleObjectFactories Gets factories for the objects that the supported formatters will serialize as samples. Processed in order, stopping when the factory successfully returns a non-<default> object.
Public property SampleObjects Gets the objects that are serialized as samples by the supported formatters.
Top
Methods
 
Name Description
Public method GetActionSample(string, string, IEnumerable<String>, Type, MediaTypeFormatter, MediaTypeHeaderValue, SampleDirection) Search for samples that are provided directly through ActionSamples.
Public method GetSample(ApiDescription, SampleDirection) Gets the request or response body samples.
Public method GetSampleObject(Type) Gets the sample object that will be serialized by the formatters. First, it will look at the SampleObjects. If no sample object is found, it will try to create one using DefaultSampleObjectFactory (which wraps an ObjectGenerator) and other factories in SampleObjectFactories.
Public method GetSampleRequests(ApiDescription) Gets the request body samples for a given ApiDescription.
Public method GetSampleResponses(ApiDescription) Gets the response body samples for a given ApiDescription.
Public method ResolveHttpRequestMessageType(ApiDescription) Resolves the actual type of ObjectContent<T> passed to the HttpRequestMessage in an action.
Public method ResolveType(ApiDescription, string, string, IEnumerable<String>, SampleDirection, out Collection<MediaTypeFormatter>) Resolves the type of the action parameter or return value when HttpRequestMessage or HttpResponseMessage is used.
Public method WriteSampleObjectUsingFormatter(MediaTypeFormatter, object, Type, MediaTypeHeaderValue) Writes the sample object using formatter.
Top
Name Description
Public extension method NameOf(this object) (Defined by NLogHelper).
Top

.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