Add list of external calls to IGateway.Send to ApiDocumentation
wwwlicious opened this issue · comments
Background:
By capturing the DTO calls to IGateway.Send
that are not part of the local service operations list, we can provide a list of the external service dependencies.
This list will be used to validate and provide warnings during service validation/registration for missing instances of any of those dependencies via the service registry, It can also be used when deploying the dependent services by enforcing their service contract consistency when in use by other services in the service registry.
Implementation:
- First establish a list of the usages of
IGateway.Send
method. - Eliminate calls where the parameter type is in the service operations list
Notes:
To find all the usages, we can use a reflection-based disassembler to find all the references to the method.
Going forward, an alternative approach would be using Roslyn to provide compile-time syntax rewriting of a class to hold the list of external DTOs, but at present the hooks to autowire this via ICompileModule
are inelegant and part of future roslyn plans to further develop.