DotNetDupe 4.0.6
C++17/20 Implementation of the .NET Base Class Library (BCL)
Loading...
Searching...
No Matches
WebApplicationBuilder.h
Go to the documentation of this file.
1
3
4#pragma once
5
6#include "Common.h"
7#include "System/Object.h"
13
14namespace DotNetDupe {
15 namespace WebAppCore {
16 namespace Builder {
17
27 public:
30
33
36
40
45
49
54 template <typename TController>
56 // Create route builder
58 auto& ref = *routeBuilder;
59
60 // Capture lambda to bind routes later on WebApplication
61 m_controllerRegistrars.Add([routeBuilder](const DotNetDupe::System::SmartPointer<WebApplication>& app) {
62 routeBuilder->Register(app);
63 });
64
65 return ref;
66 }
67
71
72 private:
75 };
76
77 }
78 }
79}
Defines common cross-platform macros, export decorators, and fundamental types.
#define DOTNETDUPE_API
Platform-specific linkage decoration for exporting or importing library symbols.
Definition Common.h:20
Fluent route builder for mapping controller action methods to HTTP request endpoints.
Represents a strongly typed list of objects that can be accessed by index mirroring ....
Base object class for DotNetDupe mirroring .NET System.Object.
Provides reference-counted and weak pointer memory management primitives ensuring zero raw ownership.
Represents the web application used to configure the HTTP pipeline and routes mirroring ASP....
Default implementation of the IServiceCollection interface.
Represents a strongly typed list of objects accessible by index.
Definition List.h:29
Supports all classes in the DotNetDupe class hierarchy.
Definition Object.h:18
A unified smart pointer that supports both unique and shared ownership semantics.
Represents text as a sequence of UTF-8 code units with culture-invariant operations.
Definition String.h:74
DotNetDupe::WebAppCore::Controllers::ControllerRouteBuilder< TController > & AddController(const DotNetDupe::System::String &prefix)
Registers an MVC/REST controller and configures its route endpoints under the given URI prefix.
~WebApplicationBuilder() override=default
Destructor for WebApplicationBuilder.
WebApplicationBuilder & operator=(const WebApplicationBuilder &)=delete
DotNetDupe::Extensions::DependencyInjection::ServiceCollection & GetServices()
Gets the mutable service collection for dependency injection registrations.
DotNetDupe::System::SmartPointer< WebApplication > Build()
Builds the dependency injection service provider and constructs the configured WebApplication host.
WebApplicationBuilder()
Initializes a new instance of the WebApplicationBuilder class.
WebApplicationBuilder(const WebApplicationBuilder &)=delete
Fluent builder for binding strongly-typed controller actions to HTTP verbs and route templates.