This repository was archived by the owner on Jan 24, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Data annotations improvements #1279
Merged
thecodejunkie
merged 13 commits into
NancyFx:master
from
thecodejunkie:data-annotations-improvements
Nov 4, 2013
Merged
Data annotations improvements #1279
thecodejunkie
merged 13 commits into
NancyFx:master
from
thecodejunkie:data-annotations-improvements
Nov 4, 2013
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 tasks
Removed the old, static, factory that was used to create the adapters between Nancy.Validation types and the various ValidationAttributes that are used by Data Annotations * DataAnnotationAdapters are now registered in the container and later resolved from there. This means auto-discovery of new adapters + they can take ctor dependencies just like any other moving part in Nancy * Added auto-discovery of all the other types that are used by the Nancy.Validation.DataAnnotations package * The following types are registered using RegisterWithDefault: IPropertyValidatorFactory and IValidateableObjectAdapter
How do we handle the Currently we manually create the shim https://github.com/NancyFx/Nancy.Bootstrappers.Unity/blob/master/src/Nancy.Bootstrappers.Unity/UnityNancyBootstrapper.cs#L91 for any Nancy-core types, but the |
thecodejunkie
added a commit
that referenced
this pull request
Nov 4, 2013
…ents Data annotations improvements
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Re-designed the internals of the Data Annotations support. The various adapters are now discovered automatically and registered in the container.