Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feedback needed: People are omitting ITypeProvider registration #239

Open
petrsvihlik opened this issue Oct 1, 2020 · 3 comments
Open

Comments

@petrsvihlik
Copy link
Contributor

petrsvihlik commented Oct 1, 2020

Motivation

We receive a lot of various error reports (on StackOverflow, GitHub, support chat on intercom) that all have one common denominator: they are caused by a missing registration of the ITypeProvider implementation.

There are more ways to register the implementation and they are described here: https://github.com/Kentico/kontent-delivery-sdk-net/wiki/Working-with-strongly-typed-models#adding-support-for-runtime-type-resolution

For simplicity (and historical reasons), the registration is not included in the README (so probably a lot of people miss it at that point).
The fact is that the ITypeProvider is not required for the simplest scenarios such as retrieving a 1st level model without complex types. However, for anything more complex (linked items, rich text, etc.) it absolutely necessary to have it registered.

Proposed solution

We have a few options:

  1. link the wiki page from the readme
  2. make the readme a bit longer and add the registration there + link the wiki page
  3. move all best practices to README
  4. implement automatic lookup of ITypeProvider (in calling assemblies) and allow developers to override it
  5. make the registration of ITypeProvider mandatory and throw an exception if omitted
  6. something else???

Your opinion

Let us know what would be an appropriate solution for you (if you were a new user of the SDK).

@vletierce

This comment has been minimized.

@petrsvihlik

This comment has been minimized.

@petrsvihlik
Copy link
Contributor Author

e.g. #271

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants