Commit Graph

31 Commits

Author SHA1 Message Date
Pranav K 5d1603c37f Replace ProblemDetailsAttribute with ApiControllerAttribute 2017-09-22 10:26:13 -07:00
Pranav K 7f214492b8 Introduce a filter to send bad request results with details when ModelState is invalid (#6849)
* Introduce a filter to send bad request results with details when ModelState is invalid

Fixes #6789
2017-09-21 11:09:32 -07:00
Pranav K 776c2604f8 Introduce opinionated API defaults.
* Introduce ProblemDescriptionAttribute to enhance some 4xx messages and produce better API description.
* Introduce IErrorDescriptionProvider to modify the shape of error response.

Fixes #6785, Fixes #6786
2017-09-14 17:07:34 -07:00
bchavez 16c267d95e House Cleaning - Spelling and grammar 🚿 2017-08-30 14:58:44 -07:00
Pranav K 900a5c7c4c Add support for ResponseCache in Razor Pages
Fixes #6437
2017-08-18 16:25:40 -07:00
Pranav K 8963b83dd3 Remove ParseOptions and CompilationOptions from RazorViewEngineOptions (#6487)
* Remove ParseOptions and CompilationOptions from RazorViewEngineOptions

Fixes #6009
2017-07-05 14:18:49 -07:00
Pranav K 8df3032540 Add support for specifying filters on page models.
Fixes #6334
2017-06-28 14:43:02 -07:00
Pranav K 8f883e8e13 Use RazorViewAttribute \ RazorPageAttribute for view discovery 2017-06-07 13:49:24 -07:00
Hao Kung dbd340a5e0 Fix test 2017-06-02 12:28:56 -07:00
Ryan Nowak a6d97d35e3 Add back support for AddTagHelpersAsServices
This doesn't go through the Razor tag helper discovery pipeline because
this can really only ever work for ITagHelper based taghelpers. So
there's really no point in reusing that logic, which would be hard
anyway.
2017-05-23 14:04:42 -07:00
Pranav K 39f1f5c933 Move Pages filter creation to application model provider
Fixes #6198
2017-05-23 11:03:19 -07:00
Ryan Nowak a8eb5bee70 Implement view search for pages
The View Engine now needs to know about pages :(. This isn't ideal but the
view engine needs to know what set of search paths to use. This was
already hardcoded for controllers vs controllers + areas. It felt right to
further hardcode instead of introduce a wierd abstraction that we only
use.

Additionally pages use a view location expander to implement an ascending
directory search.
2017-04-18 16:11:24 -07:00
Pranav K 8ed55107e7 Add support for page precompilation 2017-04-17 10:43:50 -07:00
Ryan Brandenburg 270f66198f Remove Razor from projects 2017-03-17 15:00:39 -07:00
Jass Bagga 1197657e5b TempData property attribute
Addresses #5600
2017-03-16 16:34:35 -07:00
Ryan Brandenburg d9d280d1ef Make CookieTempDataProvider the default ITempDataProvider (#5892) 2017-03-07 16:04:47 -08:00
Pranav K 9f3dfd9819 Make RazorPages work E2E 2017-02-06 19:05:31 -08:00
Jass Bagga 07c22f2b29 Mutate API description parameter type from JsonPatchDocument to Operation[]
Addresses #5464
2017-01-13 16:39:08 -08:00
Doug Bunting 6d4361218e Add builder extensions to simplify use of `CookieTempDataProvider`
- #5515
2016-11-08 15:32:09 -08:00
Ryan Brandenburg 43a0a5a9f1 Replace ConfigureOptions with IConfigureOptions 2016-09-08 15:19:07 -07:00
Pranav K c942eab6e2 Adding support for Razor precompilation
Fixes #3917
2016-08-19 07:27:51 -07:00
Ryan Nowak b80f4d31f3 Add a test to verify our service lifetimes
This test uses the new features in the service provider to verify that we
don't reference any scoped services from singletons.

Note that this can't really cover the cases where we have optional
services or where we replace default services (like DI for controllers).
You'll just have to be careful.
2016-07-20 17:10:52 -07:00
ivano scifoni 3d2bb673ee Add IMvcCoreBuilder.AddJsonOptions extension method
Fixes #4967
2016-07-08 09:00:59 -07:00
Pranav K ab76f743f4 Use dependency context from all application parts when compiling views
Fixes #4498
2016-05-24 10:28:51 -07:00
jacalvar 574ecbb3eb [Fixes #4087] Add support for AddTagHelpersAsServices()
* Added TagHelperFeature and TagHelperFeatureProvider to perform tag helper discovery.
* Changed tag helper discovery to use application parts when using tag helpers as services.
* Added FeatureTagHelperTypeResolver to resolve tag helper type definitions from the list of application parts.
* Added AddTagHelpersAsServices extension method on IMvcBuilder and IMvcCoreBuilder that
  performs tag helper discovery through the ApplicationPartManager and registers those tag helpers as
  services in the service collection. Assemblies should be added to the ApplicationPartManager
  in order to discover tag helpers in them in them. The @addTagHelper directive is still required on
  Razor pages to indicate what tag helpers to use.
2016-04-02 10:32:48 -07:00
jacalvar 5246125cb7 [Fixes #4087] Add AddViewComponentsAsServices() and ServiceBasedViewComponentActivator
* Added ViewComponentFeture and ViewComponentFeatureProvider to perform view component discovery.
* Changed view component discovery to use application parts.
* Changed ViewComponentDescriptorProvider to make use of Application parts.
* Added AddViewComponentsAsServices method on IMvcBuilder that performs view component
  discovery through the ApplicationPartManager and registers those view components as
  services in the service collection. Assemblies should be added to the ApplicationPartManager
  in order to discover view components in them in them.
2016-04-01 10:55:04 -07:00
jacalvar 1bd66ffda0 [Fixes #4089] Add support for application parts
This commit introduces application parts as a concept on MVC.

An application part is an abstraction that allows you to expose some
feature or corncern in a way that is decoupled from their underlying source.
Examples of this include types in an assembly, emdeded resources, files on
disk etc.

Application parts are configured during startup by adding or removing them from
the application part manager available as part of IMvcBuilder and IMvcCoreBuilder.

The application part manager provides the ability to populate features from the
list of available application parts by using a list of application feature providers.
Application feature providers are responsible for populating a given feature given a
list of application parts.

Examples of application providers can be a ControllerFeatureProvider
that goes through the list of application parts, sees which one of those parts exposes types,
determines which of those types are controller types, and adds them to a ControllerFeature
that holds a list of all the types that will be considered controllers in the application.
2016-03-31 12:14:04 -07:00
Pranav K 80b6996701 * Moving DNX dependencies to test only
* Updating Mvc tests to use dotnet test to run on dnxcore50
2016-02-23 18:58:42 -08:00
Pranav K 5b805bb12d Updating to use cli
Fixes #3908
2016-02-22 17:49:51 -08:00
N. Taylor Mullen 3be7fbdf9f Rename AspNet 5 file contents.
See https://github.com/aspnet/Announcements/issues/144 for more information.
2016-01-22 12:18:33 -08:00
N. Taylor Mullen 6a6c8ca544 Rename AspNet 5 folders and files.
See https://github.com/aspnet/Announcements/issues/144 for more information.
2016-01-22 12:17:07 -08:00