C# Class Pomona.PomonaResponseProcessorBase

Default response processor base class for Pomona.
Inheritance: IResponseProcessor
ファイルを表示 Open project: Pomona/Pomona

Public Methods

Method Description
CanProcess ( Nancy.Responses.Negotiation.MediaRange requestedMediaRange, dynamic model, Nancy.NancyContext context ) : Nancy.Responses.Negotiation.ProcessorMatch

Determines whether this instance can process the specified requested media range.

Process ( Nancy.Responses.Negotiation.MediaRange requestedMediaRange, dynamic model, Nancy.NancyContext context ) : Response

Process the response

Protected Methods

Method Description
GetSerializerFactory ( Nancy.NancyContext context ) : ITextSerializerFactory
IsTextHtmlContentType ( Nancy.Responses.Negotiation.MediaRange requestedMediaRange ) : bool
PomonaResponseProcessorBase ( IRouteCacheProvider routeCacheProvider ) : System

Initializes a new instance of the PomonaResponseProcessorBase class.

Private Methods

Method Description
GetHtmlLinks ( Nancy.NancyContext context ) : string
GetSerializer ( Nancy.NancyContext context ) : ITextSerializer

Method Details

CanProcess() public abstract method

Determines whether this instance can process the specified requested media range.
public abstract CanProcess ( Nancy.Responses.Negotiation.MediaRange requestedMediaRange, dynamic model, Nancy.NancyContext context ) : Nancy.Responses.Negotiation.ProcessorMatch
requestedMediaRange Nancy.Responses.Negotiation.MediaRange The requested media range.
model dynamic The model.
context Nancy.NancyContext The context.
return Nancy.Responses.Negotiation.ProcessorMatch

GetSerializerFactory() protected abstract method

protected abstract GetSerializerFactory ( Nancy.NancyContext context ) : ITextSerializerFactory
context Nancy.NancyContext
return ITextSerializerFactory

IsTextHtmlContentType() protected method

protected IsTextHtmlContentType ( Nancy.Responses.Negotiation.MediaRange requestedMediaRange ) : bool
requestedMediaRange Nancy.Responses.Negotiation.MediaRange
return bool

PomonaResponseProcessorBase() protected method

Initializes a new instance of the PomonaResponseProcessorBase class.
routeCacheProvider
protected PomonaResponseProcessorBase ( IRouteCacheProvider routeCacheProvider ) : System
routeCacheProvider IRouteCacheProvider The route cache provider.
return System

Process() public method

Process the response
public Process ( Nancy.Responses.Negotiation.MediaRange requestedMediaRange, dynamic model, Nancy.NancyContext context ) : Response
requestedMediaRange Nancy.Responses.Negotiation.MediaRange Content type requested by the client
model dynamic The model for the given media range
context Nancy.NancyContext The nancy context
return Nancy.Response