Commit Graph

28 Commits

Author SHA1 Message Date
Ryan Nowak e91ce4560f Fix #2338 - Add ViewComponentResult
Makes it easier to render a view component from inside a controller. This
makes it possible to implement behavior where an ajax request refreshes
part of a page.
2015-07-23 17:52:52 -07:00
Doug Bunting 8a701726b3 Rename _GlobalImport.cshtml files to _ViewImports.cshtml
- also rename files and directories with "GlobalImport" in name
 - nearly blind but avoid "ViewImportss" in new names
- public API change: `ViewHierarchyUtility.GetGlobalImportLocations()` -> `GetViewImportsLocations()`
 - primary source updates were comments, tests, and implementation details

nit:
- rename NestedGlobalImports.cs file to NestedViewImportsController.cs, matching class
2015-05-21 12:27:08 -07:00
N. Taylor Mullen 64e726d2b2 Update LICENSE.txt and license header on files. 2015-05-01 13:55:25 -07:00
Ajay Bhargav Baaskaran 3ca018375a Issue #1885 - Updated startup code in few websites 2015-04-28 10:42:01 -07:00
Doug Bunting 393aa54545 Update .xproj files for Microsoft.Web.AspNet.* -> Microsoft.DNX.* rename 2015-04-02 13:49:27 -07:00
Doug Bunting fc1017fba8 Quick fixes: Clean up test code
- remove useless `configuration` variables and `Configuration` instances
- remove "Review" code comment
 - unintentionally included in commit 4b5dd19
- reduce repeated code in `TestHelper` for functional tests
 - `CreateServer()` methods had duplicate code, an ambiguous match, and an odd order
- rename `GetTestConfiguration()` to `UseCultureReplacer()` in functional tests
2015-03-24 13:42:27 -07:00
Hao Kung 4b5dd199ca React to hosting changes 2015-03-19 11:07:25 -07:00
Kiran Challa f06007d428 [Fixes #2156] Remove IConfiguration from AddMvc 2015-03-14 00:02:53 -07:00
N. Taylor Mullen c1a026cbf7 Update .kproj => .xproj. 2015-03-11 14:01:43 -07:00
Doug Bunting e7ee4278a5 Correct case of web site folder and project names
- work around aspnet/DNX#1361 and inconsistent dev boxes (from previous fix attempts)
 - had inconsistent case in test/WebSites and test/WebSites/ConnegWebSite
- ConnegWebsite -> ContentNegotiationWebSite
- RazorInstrumentationWebsite -> RazorPageExecutionInstrumentationWebSite
- RazorViewEngineOptionsWebsite -> RazorEmbeddedViewsWebSite

nits:
- sort dependencies in functional test project.json
- correct a few readme.md files
2015-03-10 09:34:06 -07:00
N. Taylor Mullen 1d578ca2fd Remove BOM from project.json, *.cmd, *.sh and *.shade files. 2015-03-09 12:56:42 -07:00
N. Taylor Mullen e829ba7646 Update aspnet50/aspnetcore50 => dnx451/dnxcore50. 2015-03-08 12:52:24 -07:00
Harsh Gupta e0f7c1b810 Fixing Readme 2015-02-19 10:20:16 -08:00
Pranav K eb7b0d6ae3 * Introduce _GlobalImports to inherit directives.
* Remove inheritance from _ViewStarts

Fixes #825
2015-02-18 10:02:37 -08:00
Pranav K 071c697318 Modify BuilderExtensions.UseMvc to not add any routes by default
Fixes #1879
2015-01-23 16:51:38 -08:00
Harsh Gupta 106b9fc30c Adding proper descriptions in readme.md files for functional tests. 2015-01-15 11:12:48 -08:00
sornaks 07043ce1a9 Merge branch 'release' into dev 2014-12-16 14:52:16 -08:00
sornaks 1570e198ef Bug #1354 - ViewComponent View() fails on CoreCLR with IEnumerable<> passed in.
Fix - When the model is passed in to a View, ViewDataDictionary sets it. During this process, we recurse through all the properties and create FastPropertyGetters for each of them. In this case, since it is an enumerable, the properties which we recurse through are not the elements of the collection but the properties of the Enumerable instead. i.e - Enumerable.Current. Creating getters for these properties are not necessary. The fix moves the property iteration step to a place where the properties are actually requested.
- Splitting TypeInformation class into two and separating their caches appropriately.
2014-12-16 12:19:38 -08:00
Ryan Nowak e65218d6df Adding servers and wwwroot folder to test websites
Adding dependencies and commands for iis, web listener and khestrel to each
site.

Each website comes with a readme.md to 'anchor' the otherwise empty
folder. We have another work item tracking adding content to these.

Once VS sees a project with a wwwroot, it wants to assign a port for iis,
so I let it.
2014-12-10 14:16:11 -08:00
ianhong 5b1eae494e Update templates\samples\tests to use ensure viewstart.cshtml and views directory names are cased appropriately. #1559 2014-12-05 13:27:22 -08:00
Pranav K 765f113515 Checkin VS auto-modifications to kproj files 2014-12-03 11:11:43 -08:00
Victor Hurdugaci 99b5f430ff Add schema version to kproj files 2014-11-25 10:57:58 -08:00
Ryan Nowak 99a1848598 Checkin VS modifications to kproj
My up-to-date VS wants these projects to have port numbers. Makes sense
because they are web projects.
2014-11-19 16:11:46 -08:00
Doug Bunting f7ef604b86 Regenerate .kproj files
- does not seem to have a negative impact
- e.g. sample web projects run / debug fine
2014-11-04 22:41:53 -08:00
Ryan Nowak 83187945d1 Fix for #1052 - ViewComponents should support fully qualified names
This change adds the concept of a full-name to viewcomponents. View
components can be invoked using either the short name or long name. If the
provided string contains a '.' character, then it will be compared against
full names, otherwise it will be matched against short names only.

The short name is used for view lookups.

If the name is explicitly set via ViewComponent attribute, then the full
name is the name provided. The short name is the portion of the name after
the last '.'. If there are no dots, then the short name and full name are
the same.

If the name is not set explicitly, then it is inferred from the Type and
namespace name. The short name is the Type name, minus the 'ViewComponent'
suffix (if present). The full name is the namespace of the defining class,
plus the short name.
2014-10-29 17:34:01 -07:00
Ryan Nowak df8f84b772 Fix #1287 - Port WebAPI parameter binding behavior
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
2014-10-17 16:51:48 -07:00
sornaks 5b1bcb6079 Issue #1214: Cannot pass a int parameter to the views from ViewComponent.
Fix: Checking if the model is not null in the Copy constructor of ViewDataDictionary.
2014-10-17 16:40:25 -07:00
Pranav K 5119d16b64 ViewComponent.Invoke() should be able to invoke views
Fixes #285
2014-10-17 12:23:18 -07:00