csf-dev/ZPT-Sharp

To avoid extra work when only one document provider is enabled, it should be used automatically

craigfowler opened this issue · 0 comments

Presently when using implementations of IRendersZptDocument, a document provider must always be specified, either via config or by pre-registering the document provider interface with DI.

This can mean some extra jumping-through-hoops for developers consuming the API, if they actually only have one document provider implementation installed and enabled. If there is only one installed/enabled then why not just use that?

Acceptance criteria

If only a single document provider is installed into the environment then it should be selected for use automatically, without needing to use configuration or any additional dependency injection registrations.