This change modifies the default parameter binding behavior for an
ApiController to use the WebAPI rules.
'simple types' default to use route data or query string
'complex types' default to use the body (formatters)
Adds ModelBindingAttribute to enabled model binding
- #704 part 2 of 2
- change `@Html.Id()` to sanitize return value; was identical to `@Html.Name()`
Copied `TagBuilder.CreateSanitizedId()` and `TagBuilder.Html401IdUtil` from MVC 5.2
- except this `CreateSanitizedId()` returns a valid identifier if first `char` is not a letter
- e.g. "[0].Name"
nits:
- expand variable names, use lots of `var`, put `public` members first
- add doc comments for `CreateSanitizedId()`
Note users will be able to apply different sanitization once we fix#1188.
- also make `TagHelperOutputExtensions.MergeAttributes()` case-insensitive
nits:
- deliniate attribute names in all resource strings
- update validation messages in TagHelperSample.Web
- Changed TagHelper property accessors from private to protected internal.
- Changed throw tests to be shorter.
- Changed reflection setting to now use the internal accessibility of the TagHelpers
- Removed activator to just use internal accessibility of TagHelpers.
- Changed new StringWriter() instances where we didn't need the StringWriter to be TextWriter.Null
- Added a TagHelper that targets the <a> tag and allows users to do the equivalent of Html.ActionLink or Html.RouteLink.
- Added tests to validate AnchorTagHelper functionality.
#1247
- Added the FormTagHelper.
- Utilized the IHtmlGenerator to share base functionality with the HTMLHelper counterparts.
- Added tests to validate FormTagHelper functionality.
#1246
- make a few more methods available as `internal static` in `DefaultHtmlGenerator`
- remove `IHtmlGenerator.GenerateOption()`; now `internal static`
nits:
- add `IHtmlGenerator.IdAttributeDotReplacement`
- move `DefaultHtmlGenerator.IdAttributeDotReplacement` after constructor
- move `HtmlHelper.ActionLink()` below static methods
- move newly-`internal` methods together in `DefaultHtmlGenerator`
- correct placement of `DefaultHtmlGenerator.GetValidationAttributes()` comment
- new Microsoft.AspNet.Mvc.TagHelpers.Test project
- bit of test infrastructure -- `TestableHtmlGenerator`
- short-curcuits validation attribute and AntiForgery additions
- should help when testing all MVC tag helpers
Fix: The MvcOptions takes in a list of ExcludeFromValidationDelegate (Func<Type,bool>). This func verifies if the type is excluded in validation or not.
- #965
- test call-throughs from `Html.Editor[For]()` to inner `IHtmlHelper`
- add another parameter to `DefaultTemplatesUtilities.GetHtmlHelper()`
nit: reorder dictionaries at the top of `TemplateRenderer` slightly
Fix: Using TypeConverter solves this problem.
-Issue #1123 - TypeConverterModelBinder cannot bind "byte" and "short".
Fix: Modified code to use TypeConverter which can handle these scenarios.
-Removing the GetConverterDelegate method and making the code similar to the WebApi.
1) Expose the simplified relative path template by cleaning up constraints, optional and catch all tokens from the template.
2) Expose the parameters on the route template as API parameters.
3) Combine parameters from the route and the action descriptor when the parameter doesn't come from the body. #886 will refine this.
4) Expose optionality and constraints for path parameters. Open question: Should we explicitly expose IsCatchAll?