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

Added update for IUnvalidated and IEnumerable ValueProviders (for #696) #701

Merged
merged 2 commits into from Jan 15, 2014

Conversation

Projects
None yet
2 participants
@CGijbels
Collaborator

CGijbels commented Jan 14, 2014

This will fix #696

When the original ValueProvider implements the IEnumerableValueProvider in combination with the IUnvalidatedValueProvider then only the IEnumerableValueProvider was proxied, which means that it is not possible anymore for the MVC framework to check if it is possible to get the unvalidated value in case a viewmodel property would be decorated with the AllowHtml attribute, resulting in the exception mentioned in #696

Since the AlternateType solution is based on proxying only one type, I created an IUnvalidatedEnumerableValueProvider and corresponding UnvalidatedEnumerableValueProvider that will implement the original IUnvalidatedValueProvider and the original IEnumerableValueProvider and which will forward those calls to the original value provider that implemented both interfaces, which fixes the issue

@ghost ghost assigned CGijbels Jan 15, 2014

@nikmd23

This comment has been minimized.

Show comment
Hide comment
@nikmd23

nikmd23 Jan 15, 2014

Member

Great work @CGijbels

Member

nikmd23 commented Jan 15, 2014

Great work @CGijbels

nikmd23 added a commit that referenced this pull request Jan 15, 2014

Merge pull request #701 from Glimpse/no696-add-unvalidated-enumerable…
…-value-provider

Support IUnvalidated + IEnumerable ValueProviders

@nikmd23 nikmd23 merged commit d9fafb6 into master Jan 15, 2014

@nikmd23 nikmd23 deleted the no696-add-unvalidated-enumerable-value-provider branch Jan 15, 2014

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