Right now you can use an override/implementation of the Decorate method to return a custom client type. This works, but the factory will always yield an IHalHttpClient instance. You can only expose custom methods on it by creating extension methods. While this works great in most cases, it falls apart when a consumer has to communicate with multiple HAL based API's and thus uses multiple both decorated and non-decorated clients. Extensions methods are bound to the interface, and will thus be bound to all instantiated clients.
Right now you can use an override/implementation of the
Decorate
method to return a custom client type. This works, but the factory will always yield anIHalHttpClient
instance. You can only expose custom methods on it by creating extension methods. While this works great in most cases, it falls apart when a consumer has to communicate with multiple HAL based API's and thus uses multiple both decorated and non-decorated clients. Extensions methods are bound to the interface, and will thus be bound to all instantiated clients.