C# 클래스 NPSSMSVoting.Areas.HelpPage.HelpPageSampleGenerator

This class will generate the samples for the help page.
파일 보기 프로젝트 열기: sinch/csharp-nps-sms-delighted 1 사용 예제들

Private Properties

프로퍼티 타입 설명
DefaultSampleObjectFactory object
GetAllActionSamples object>>.IEnumerable
GetSampleObject object
IsFormatSupported bool
ResolveType System.Type
TryFormatJson string
TryFormatXml string
UnwrapException System.Exception
WrapSampleIfString object
WriteSampleObjectUsingFormatter object

공개 메소드들

메소드 설명
GetActionSample ( string controllerName, string actionName, IEnumerable parameterNames, Type type, System.Net.Http.Formatting.MediaTypeFormatter formatter, MediaTypeHeaderValue mediaType, SampleDirection sampleDirection ) : object

Search for samples that are provided directly through ActionSamples.

GetSample ( System.Web.Http.Description.ApiDescription api, SampleDirection sampleDirection ) : object>.IDictionary

Gets the request or response body samples.

GetSampleRequests ( System.Web.Http.Description.ApiDescription api ) : object>.IDictionary

Gets the request body samples for a given ApiDescription.

GetSampleResponses ( System.Web.Http.Description.ApiDescription api ) : object>.IDictionary

Gets the response body samples for a given ApiDescription.

HelpPageSampleGenerator ( ) : System

Initializes a new instance of the HelpPageSampleGenerator class.

ResolveHttpRequestMessageType ( System.Web.Http.Description.ApiDescription api ) : Type

Resolves the actual type of System.Net.Http.ObjectContent{T} passed to the System.Net.Http.HttpRequestMessage in an action.

비공개 메소드들

메소드 설명
DefaultSampleObjectFactory ( HelpPageSampleGenerator sampleGenerator, Type type ) : object
GetAllActionSamples ( string controllerName, string actionName, IEnumerable parameterNames, SampleDirection sampleDirection ) : object>>.IEnumerable
GetSampleObject ( Type type ) : object
IsFormatSupported ( SampleDirection sampleDirection, System.Net.Http.Formatting.MediaTypeFormatter formatter, Type type ) : bool
ResolveType ( System.Web.Http.Description.ApiDescription api, string controllerName, string actionName, IEnumerable parameterNames, SampleDirection sampleDirection, Collection &formatters ) : Type
TryFormatJson ( string str ) : string
TryFormatXml ( string str ) : string
UnwrapException ( Exception exception ) : Exception
WrapSampleIfString ( object sample ) : object
WriteSampleObjectUsingFormatter ( System.Net.Http.Formatting.MediaTypeFormatter formatter, object value, Type type, MediaTypeHeaderValue mediaType ) : object

메소드 상세

GetActionSample() 공개 메소드

Search for samples that are provided directly through ActionSamples.
public GetActionSample ( string controllerName, string actionName, IEnumerable parameterNames, Type type, System.Net.Http.Formatting.MediaTypeFormatter formatter, MediaTypeHeaderValue mediaType, SampleDirection sampleDirection ) : object
controllerName string Name of the controller.
actionName string Name of the action.
parameterNames IEnumerable The parameter names.
type System.Type The CLR type.
formatter System.Net.Http.Formatting.MediaTypeFormatter The formatter.
mediaType System.Net.Http.Headers.MediaTypeHeaderValue The media type.
sampleDirection SampleDirection The value indicating whether the sample is for a request or for a response.
리턴 object

GetSample() 공개 메소드

Gets the request or response body samples.
public GetSample ( System.Web.Http.Description.ApiDescription api, SampleDirection sampleDirection ) : object>.IDictionary
api System.Web.Http.Description.ApiDescription The .
sampleDirection SampleDirection The value indicating whether the sample is for a request or for a response.
리턴 object>.IDictionary

GetSampleRequests() 공개 메소드

Gets the request body samples for a given ApiDescription.
public GetSampleRequests ( System.Web.Http.Description.ApiDescription api ) : object>.IDictionary
api System.Web.Http.Description.ApiDescription The .
리턴 object>.IDictionary

GetSampleResponses() 공개 메소드

Gets the response body samples for a given ApiDescription.
public GetSampleResponses ( System.Web.Http.Description.ApiDescription api ) : object>.IDictionary
api System.Web.Http.Description.ApiDescription The .
리턴 object>.IDictionary

HelpPageSampleGenerator() 공개 메소드

Initializes a new instance of the HelpPageSampleGenerator class.
public HelpPageSampleGenerator ( ) : System
리턴 System

ResolveHttpRequestMessageType() 공개 메소드

Resolves the actual type of System.Net.Http.ObjectContent{T} passed to the System.Net.Http.HttpRequestMessage in an action.
public ResolveHttpRequestMessageType ( System.Web.Http.Description.ApiDescription api ) : Type
api System.Web.Http.Description.ApiDescription The .
리턴 System.Type