Incremental Sample Solutions

This page contains the sample solutions created throughout this chapter. Each solution represents an incremental architectural step and corresponds to one or more conceptual documentation pages.

The solutions are intentionally organized as a gradual progression rather than as one large final project. This makes it easier to understand how each architectural concept evolves naturally into the next one.

All solutions are built using .NET 10 and ASP.NET Core, and they can be opened in Visual Studio 2026. Every solution or one of its project contains a .dm file with documentation, explanations of the code structure, and examples of API calls.

01 - Basic JSON-RPC Endpoint

Introduces a single JSON-RPC endpoint capable of receiving requests and dispatching operations by method name.

Download Solution

02 - Dependency Injection Dispatching

Replaces hardcoded dispatching logic with dependency-injection based handler resolution.

Download Solution

03 - Modular Architecture

Demonstrates how to move business-related functionality out of the API host project into separate business-related projects.

Download Solution

04 - Automatic Discovery and Registration

Introduces assembly scanning and attribute-based registration for automatic discovery of request handlers.

Download Solution

05 - Swagger Integration

Demonstrates how a JSON-RPC server can expose HTTP-level metadata through Swagger while maintaining operation-oriented APIs.

Download Solution

06 - AI-Friendly Operation Catalog

Introduces structured operation descriptors and machine-readable metadata used by AI applications to understand available operations.

Download Solution

07 - MCP Concepts and Tool Discovery

Adds MCP-compatible discovery and invocation endpoints using standardized JSON-RPC-style messages.

Download Solution

08 - Plugin-Based Request Handler Assemblies

Demonstrates how request handlers can be packaged into independent assemblies and loaded dynamically from a configured plugin folder. Only handlers decorated by [ExposeAsMcpTool] attribute are included into AI-Friendly Operation Catalog.

Download Solution

 

Table of Content Operation-Oriented APIs and AI Tools Previous: Production Hardening Checklist

 


Business Process Programming in .Net
© 2004–2026 Laskarzhevsky Software Inc.
Unless otherwise noted, the content of this website is licensed under the Creative Commons Attribution 4.0 International License (CC BY 4.0).
Code examples are provided under the MIT License.
You are free to share and adapt the material provided that appropriate credit is given and any modifications are clearly indicated.
The information provided on this website is for educational purposes only.
The author and publisher make no warranties regarding the completeness or suitability of the information and are not responsible for any damages resulting from its use.