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

파일 보기 프로젝트 열기: sinch/csharp-nps-sms-delighted

공개 메소드들

메소드 설명
GetHelpPageApiModel ( this config, string apiDescriptionId ) : HelpPageApiModel

Gets the model that represents an API displayed on the help page. The model is initialized on the first call and cached for subsequent calls.

GetHelpPageSampleGenerator ( this config ) : HelpPageSampleGenerator

Gets the help page sample generator.

GetModelDescriptionGenerator ( this config ) : ModelDescriptionGenerator

Gets the model description generator.

SetActualRequestType ( this config, Type type, string controllerName, string actionName ) : void

Specifies the actual type of System.Net.Http.ObjectContent{T} passed to the System.Net.Http.HttpRequestMessage in an action. The help page will use this information to produce more accurate request samples.

SetActualResponseType ( this config, Type type, string controllerName, string actionName ) : void

Specifies the actual type of System.Net.Http.ObjectContent{T} returned as part of the System.Net.Http.HttpRequestMessage in an action. The help page will use this information to produce more accurate response samples.

SetDocumentationProvider ( this config, IDocumentationProvider documentationProvider ) : void

Sets the documentation provider for help page.

SetHelpPageSampleGenerator ( this config, HelpPageSampleGenerator sampleGenerator ) : void

Sets the help page sample generator.

SetSampleForMediaType ( this config, object sample, MediaTypeHeaderValue mediaType ) : void

Sets the sample directly for all actions with the specified media type.

SetSampleForType ( this config, object sample, MediaTypeHeaderValue mediaType, Type type ) : void

Sets the sample directly for all actions with the specified type and media type.

SetSampleObjects ( this config, object>.IDictionary sampleObjects ) : void

Sets the objects that will be used by the formatters to produce sample requests/responses.

SetSampleRequest ( this config, object sample, MediaTypeHeaderValue mediaType, string controllerName, string actionName ) : void

Sets the sample request directly for the specified media type and action.

SetSampleResponse ( this config, object sample, MediaTypeHeaderValue mediaType, string controllerName, string actionName ) : void

Sets the sample request directly for the specified media type of the action.

비공개 메소드들

메소드 설명
AddParameterDescription ( HelpPageApiModel apiModel, System.Web.Http.Description.ApiParameterDescription apiParameter, ModelDescription typeDescription ) : ParameterDescription
GenerateApiModel ( System.Web.Http.Description.ApiDescription apiDescription, System.Web.Http.HttpConfiguration config ) : HelpPageApiModel
GenerateRequestModelDescription ( HelpPageApiModel apiModel, ModelDescriptionGenerator modelGenerator, HelpPageSampleGenerator sampleGenerator ) : void
GenerateResourceDescription ( HelpPageApiModel apiModel, ModelDescriptionGenerator modelGenerator ) : void
GenerateSamples ( HelpPageApiModel apiModel, HelpPageSampleGenerator sampleGenerator ) : void
GenerateUriParameters ( HelpPageApiModel apiModel, ModelDescriptionGenerator modelGenerator ) : void
InitializeModelDescriptionGenerator ( System.Web.Http.HttpConfiguration config ) : ModelDescriptionGenerator
IsBindableWithTypeConverter ( Type parameterType ) : bool
LogInvalidSampleAsError ( HelpPageApiModel apiModel, object sample ) : void
TryGetResourceParameter ( System.Web.Http.Description.ApiDescription apiDescription, System.Web.Http.HttpConfiguration config, System.Web.Http.Description.ApiParameterDescription &parameterDescription, Type &resourceType ) : bool

메소드 상세

GetHelpPageApiModel() 공개 정적인 메소드

Gets the model that represents an API displayed on the help page. The model is initialized on the first call and cached for subsequent calls.
public static GetHelpPageApiModel ( this config, string apiDescriptionId ) : HelpPageApiModel
config this The .
apiDescriptionId string The ID.
리턴 NPSSMSVoting.Areas.HelpPage.Models.HelpPageApiModel

GetHelpPageSampleGenerator() 공개 정적인 메소드

Gets the help page sample generator.
public static GetHelpPageSampleGenerator ( this config ) : HelpPageSampleGenerator
config this The .
리턴 HelpPageSampleGenerator

GetModelDescriptionGenerator() 공개 정적인 메소드

Gets the model description generator.
public static GetModelDescriptionGenerator ( this config ) : ModelDescriptionGenerator
config this The configuration.
리턴 NPSSMSVoting.Areas.HelpPage.ModelDescriptions.ModelDescriptionGenerator

SetActualRequestType() 공개 정적인 메소드

Specifies the actual type of System.Net.Http.ObjectContent{T} passed to the System.Net.Http.HttpRequestMessage in an action. The help page will use this information to produce more accurate request samples.
public static SetActualRequestType ( this config, Type type, string controllerName, string actionName ) : void
config this The .
type System.Type The type.
controllerName string Name of the controller.
actionName string Name of the action.
리턴 void

SetActualResponseType() 공개 정적인 메소드

Specifies the actual type of System.Net.Http.ObjectContent{T} returned as part of the System.Net.Http.HttpRequestMessage in an action. The help page will use this information to produce more accurate response samples.
public static SetActualResponseType ( this config, Type type, string controllerName, string actionName ) : void
config this The .
type System.Type The type.
controllerName string Name of the controller.
actionName string Name of the action.
리턴 void

SetDocumentationProvider() 공개 정적인 메소드

Sets the documentation provider for help page.
public static SetDocumentationProvider ( this config, IDocumentationProvider documentationProvider ) : void
config this The .
documentationProvider IDocumentationProvider The documentation provider.
리턴 void

SetHelpPageSampleGenerator() 공개 정적인 메소드

Sets the help page sample generator.
public static SetHelpPageSampleGenerator ( this config, HelpPageSampleGenerator sampleGenerator ) : void
config this The .
sampleGenerator HelpPageSampleGenerator The help page sample generator.
리턴 void

SetSampleForMediaType() 공개 정적인 메소드

Sets the sample directly for all actions with the specified media type.
public static SetSampleForMediaType ( this config, object sample, MediaTypeHeaderValue mediaType ) : void
config this The .
sample object The sample.
mediaType System.Net.Http.Headers.MediaTypeHeaderValue The media type.
리턴 void

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

SetSampleObjects() 공개 정적인 메소드

Sets the objects that will be used by the formatters to produce sample requests/responses.
public static SetSampleObjects ( this config, object>.IDictionary sampleObjects ) : void
config this The .
sampleObjects object>.IDictionary The sample objects.
리턴 void

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

SetSampleResponse() 공개 정적인 메소드

Sets the sample request directly for the specified media type of the action.
public static SetSampleResponse ( this config, object sample, MediaTypeHeaderValue mediaType, string controllerName, string actionName ) : void
config this The .
sample object The sample response.
mediaType System.Net.Http.Headers.MediaTypeHeaderValue The media type.
controllerName string Name of the controller.
actionName string Name of the action.
리턴 void