Table of Contents

Class DnnAppApiControllerService

Namespace
ToSic.Sxc.Dnn.WebApi.Custom.Sys
Assembly
ToSic.Sxc.Dnn.WebApi.dll

Special service to handle finding and compiling the correct API controller.

[InternalApi_DoNotUse_MayChangeWithoutNotice("only made public for docs")]
public class DnnAppApiControllerService : ServiceBase, IHasLog
Inheritance
object
DnnAppApiControllerService
Implements
Inherited Members

Constructors

DnnAppApiControllerService(Generator<DnnWebApiAppFolderUtilities, HttpRequestMessage>, LazySvc<DnnAppApiCompiler>, LazySvc<DnnGetBlock>, LazySvc<CodeErrorHelpService>, LazySvc<ISxcCurrentContextService>, MemoryCacheService)

Special service to handle finding and compiling the correct API controller.

public DnnAppApiControllerService(Generator<DnnWebApiAppFolderUtilities, HttpRequestMessage> dnnApiFolderUtils, LazySvc<DnnAppApiCompiler> apiCompilerLazy, LazySvc<DnnGetBlock> getBlock, LazySvc<CodeErrorHelpService> codeErrorSvc, LazySvc<ISxcCurrentContextService> currentCtxSvc, MemoryCacheService cacheSvc)

Parameters

dnnApiFolderUtils Generator<DnnWebApiAppFolderUtilities, HttpRequestMessage>
apiCompilerLazy LazySvc<DnnAppApiCompiler>
getBlock LazySvc<DnnGetBlock>
codeErrorSvc LazySvc<CodeErrorHelpService>
currentCtxSvc LazySvc<ISxcCurrentContextService>
cacheSvc MemoryCacheService

Methods

FindAndBuild(HttpConfiguration, HttpRequestMessage)

Find and build the controller descriptor referencing the correct WebApi controller class. ASP.net will pick this up and use it from there.

public HttpControllerDescriptor FindAndBuild(HttpConfiguration configuration, HttpRequestMessage request)

Parameters

configuration HttpConfiguration
request HttpRequestMessage

Returns

HttpControllerDescriptor

Remarks

This is only called if the DnnAppApiControllerSelector believes it must be used. So if it can't find a controller, it will throw an exception.