services
* Added WithControllersFromServiceProvider that replaces the default
controller activator with a service based one.
* Move activation to DefaultControllerFactory
* Modify [Activate] behavior so that it no longer activates services. Use
[FromService] attribute to hydrate services
Fixes#1707
- Support for binding posted file to type IFormFile
- Support for multipart/form-data in FormValueProviderFactory
- Updated Mvc Sample
- Added relevant unit and functional tests
- #EngineeringDay
- license present but incorrect in just a few files
- skip generated files such as Resources.Designer.cs and files under
test\Microsoft.AspNet.Mvc.Razor.Host.Test\TestFiles\Output
1) Implemented FilePathResult to efficiently return files from disk.
2) Implemented FileStreamResult to return content from a stream.
3) Implemented FileContentResult to return content from a byte array.
1. Added an Order property to IRouteTemplateProvider, ReflectedAttributeRouteModel,
AttributeRouteInfo, AttributeRouteLinkGenerationEntry and AttributeRouteMatchingEntry.
2. Changed the implementation of AttributeRoute to take the order into account when routing
incomming requests and generating links.
3. Ensured a stable ordering of route entries with the same order and precedence for route
matching and link generation based on the template text.
4. Added tests to validate that the precedence gets respected in route matching and link generation.
5. Added tests to validate that the order gets respected in route matching and link generation.
6. Added tests to validate that the order gets respected over the precedence for route matching
and link generation.
7. Added tests to validate that routes with the same order and precedence expose a stable ordering
for route matching and link generation.
1. Added HttpNotFound() to Controller.
2. Updated HttpStatusCodeResult to expose the StatusCode as a property.
3. Added unit tests for HttpNotFound() and for HttpStatusCodeResult.
4. Updated the MvcSample to add an action that uses HttpNotFound().
5. Brought back HttpNotFoundResult and added unit tests for it.
- copy from legacy MVC
- get `ListBox[For]()` methods in correct places and working
- also usual stuff: `var`, `[NotNull]`, remove `IDictionary<,>` overloads
- `ListBoxHelper()` -> `GenerateListBox`
- already had all the bits needed in `GenerateSelect()`
- special-case `null` or empty `name` in GenerateSelect()
- ensure `ArgumentException` has correct parameter name
- lower-level problem affected `CheckBox()` as well
- use `ListBox()` and `ListBoxFor()` in MVC sample
- use `ListBox()` in an editor template
- copy over legacy MVC's `SelectExtensions`, `SelectListItem` and `SelectListGroup`
- plus expected `SelectList` and `MultiSelectList`
- fixup select HTML helpers to meet WebFx standards and work in new world
- usual stuff: `[NotNull]`, `var`, `String` -> `string`, long lines, ...
- remove `IDictionary<string, object> htmlAttributes` overloads
- move longest extension method overloads into correct classes / interfaces
- add `ViewDataEvaluator.Eval()` overload for an `object` container
- rename lower-level helpers to make purposes more obvious
- nit: move Raw() methods up from bottom of HtmlHelper.cs
- use `DropDownList[For]()` in MVC sample
- add `CheckBox[For]()`, `Hidden[For]()`, `Password[For]()`, and
`RadioButton[For]()`
- also make `FormatValue()` visible to users, as it is in legacy MVC
- and spread the boxes out a bit in MyView 😺
Showcased a lot of the core pieces of Display in the sample. Some pieces are still missing such as DataType handling. The infrastructure is there to handle it in the TemplateRenderer but the model metadata providers do not construct the metadata with the data types.
- demonstrate `ModelMetadata` is available in a view
Also
- simplify `View()` overloads in `Controller`, pending #110 decisions
- make `Model` in `RazorView<T>` readonly