102 m_controllerRegistrars = std::move(registrars);
Encapsulates a delegate method that has parameters and returns void.
Defines common cross-platform macros, export decorators, and fundamental types.
#define DOTNETDUPE_API
Platform-specific linkage decoration for exporting or importing library symbols.
Encapsulates a method that has parameters and returns a value of the type specified by the TResult pa...
HTTP request, response, and context abstractions for WebAppCore processing pipelines.
Defines a mechanism for retrieving a service object; that is, an object that provides custom support ...
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.
High-performance UTF-8 / UTF-16 string manipulation class mirroring .NET System.String.
Listens for connections from TCP network clients.
Context and handler abstractions for WebSockets integrated into the WebAppCore HTTP server pipeline.
Encapsulates a method that has parameters and does not return a value.
Represents a collection of keys and values.
Represents a strongly typed list of objects accessible by index.
Primary template declaration for the Func delegate family.
Supports all classes in the DotNetDupe class hierarchy.
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.
Facilitates initialization and configuration of dependency injection services, controllers,...
void MapDelete(const DotNetDupe::System::String &pattern, DotNetDupe::System::Func< DotNetDupe::System::String, DotNetDupe::System::SmartPointer< Http::HttpContext > > handler)
Registers an HTTP DELETE route endpoint with a synchronous lambda or delegate handler.
void MapPost(const DotNetDupe::System::String &pattern, DotNetDupe::System::Func< DotNetDupe::System::String, DotNetDupe::System::SmartPointer< Http::HttpContext > > handler)
Registers an HTTP POST route endpoint with a synchronous lambda or delegate handler.
DotNetDupe::System::Action< const DotNetDupe::System::SmartPointer< WebApplication > & > ControllerRegistrar
DotNetDupe::System::Collections::Generic::List< DotNetDupe::System::String > GetWebSocketRoutes() const
Retrieves the list of all currently mapped WebSocket route patterns.
void Stop()
Stops the active TCP listener and releases connection worker threads.
bool HasWebSocketRoute(const DotNetDupe::System::String &path) const
Determines whether a registered WebSocket route matches the specified path.
void MapWebSocket(const DotNetDupe::System::String &pattern, DotNetDupe::System::SmartPointer< WebSockets::IWebSocketHandler > handler)
Maps an RFC 6455 WebSocket endpoint to an asynchronous lifecycle handler.
WebApplication(const WebApplication &)=delete
void MapControllers()
Dispatches and binds all registered controller routes to this application pipeline.
WebApplication(const DotNetDupe::System::SmartPointer< DotNetDupe::System::IServiceProvider > &spServices)
friend class WebApplicationBuilder
void MapPut(const DotNetDupe::System::String &pattern, DotNetDupe::System::Func< DotNetDupe::System::String, DotNetDupe::System::SmartPointer< Http::HttpContext > > handler)
Registers an HTTP PUT route endpoint with a synchronous lambda or delegate handler.
static DotNetDupe::System::SmartPointer< WebApplicationBuilder > CreateBuilder()
Initializes a new instance of the WebApplicationBuilder class with pre-configured defaults.
DotNetDupe::System::SmartPointer< DotNetDupe::System::IServiceProvider > GetServices() const
Gets the service provider holding the configured application dependencies.
WebApplication & operator=(const WebApplication &)=delete
void Run(const DotNetDupe::System::String &url="http://127.0.0.1:5000", int threadCount=10)
Starts the embedded HTTP/WebSocket server listener on the specified URL and worker thread pool.
void MapGet(const DotNetDupe::System::String &pattern, DotNetDupe::System::Func< DotNetDupe::System::String, DotNetDupe::System::SmartPointer< Http::HttpContext > > handler)
Registers an HTTP GET route endpoint with a synchronous lambda or delegate handler.