Class DnnAppApiControllerService
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
-
objectDnnAppApiControllerService
- 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
dnnApiFolderUtilsGenerator<DnnWebApiAppFolderUtilities, HttpRequestMessage>apiCompilerLazyLazySvc<DnnAppApiCompiler>getBlockLazySvc<DnnGetBlock>codeErrorSvcLazySvc<CodeErrorHelpService>currentCtxSvcLazySvc<ISxcCurrentContextService>cacheSvcMemoryCacheService
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
configurationHttpConfigurationrequestHttpRequestMessage
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.