A request-response approach to unleash libraries for applications using WebAPI like routing.
-
Download the repository;
-
Open it in Visual Studio;
-
See the tests.
-
Add a reference to OperationMessaging;
-
Add a service class to the library you want to extend with OperationMessaging OR create a facade if you don't have access to the library;
-
Make the service class inherit from OperationService;
-
Add the routes to the service using it's constructor or mapping method (whatever you prefer);
-
Start using your library as an API.
- OperationService.Execute, support data;
-
Will Charczuk, RouteParser.cs, https://gist.github.com/wcharczuk/2284226
-
markmnl, OperationResult, https://www.codeproject.com/Articles/1022462/Error-Handling-in-SOLID-Csharp-NET-The-Operation-R