Commit Graph

2799 Commits

Author SHA1 Message Date
Ryan Nowak 78a4e78358 Fix for #975 - Implementing IActionConstraint and ActionMethodSelectorAttribute
IActionConstraint follows a provider model similar to filters. The
attributes that go on actions/controllers can be simple metadata markers,
the 'real' constraint is provided by a set of configurable providers. In
general the simplest thing to do is to be both an
IActionConstraintMetadata and IActionConstraint, and then the default
provider will take care of you.

IActionConstraint now has stages based on the Order property. Each group
of constraints with the same Order will run together on the set of
actions. This process is repeated for each value of Order until we run out
of actions or run out of constraints.

The IActionConstraint interface is beefier than the equivalent in legacy
MVC. This is to support cooperative coding between sets of constraints
that know about each other. See the changes in the sample, which implement
webapi-style overloading.
2014-10-03 18:50:01 -07:00
sornaks 0d8a7368d9 Issue #1141 - When Accept header or Accept-Charset header has invalid QualityFactor we throw.
Fix: Imitating the same behavior as it is in WebApi. We ignore the entire header even if one part of it is invalid.
2014-10-03 16:25:51 -07:00
harshgMSFT 572ec0175c Fix for 1071: Output Formatters should be invoked for writing out the response. 2014-10-03 10:54:59 -07:00
Doug Bunting 0d92a829ff Correct minor problem in `CachedDataAnnotationsModelMetadata.ComputeDisplayFormatString()`
- only affects an extreme corner case: user sets `metadata.EditFormatString` then reads
  `metadata.DisplayFormatString`
- an extreme case because `EditFormatString` is normally set only when
  `DisplayFormatString` is set and, if set, it's to the same value
- happened to see this while updating `CachedDataAnnotationsModelMetadata` for this PR

nit: an -> a in an adjacent XML comment in `CachedDataAnnotationsModelMetadata`
2014-10-02 19:13:45 -07:00
Doug Bunting a5600a74a3 Calculate `ModelMetadata.DataTypeName` based on metadata
- helps MVC helpers like `@Html.EditorFor()` select the correct template
- #933

nit: add XML doc for `DataTypeName` in base `ModelMetadata`
2014-10-02 19:13:35 -07:00
Pranav K 12477c9f52 Changes to make EnableInstrumentation conditionally enabled 2014-10-02 17:55:40 -07:00
Pranav K 5d32d224f4 Changes to support PageExecutionContext in Razor
Fixes #1083
2014-10-02 17:55:23 -07:00
jacalvar a2023d35ee [Fixes #429] FileResult
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.
2014-10-02 12:50:24 -07:00
Pranav K 2f00fc6121 Modifying test project.json to allow building on Mono 2014-10-02 12:05:03 -07:00
YishaiGalatzer 9de86892a7 Cleanup namespaces and Task.FromResult 2014-10-02 11:49:44 -07:00
Ryan Nowak 414c009b80 Removing Overloading and Automatic verb-mapping
This change removes WebAPI-style method parameter overloading and the
automatic mapping of 'unnamed' actions based on method names. For all
practicaly purposes, this change restores the MVC5 behavior for action
selection.

WebAPI-style overloading will be brought back in the future via a set of
opt-in constructs.
2014-10-01 18:46:48 -07:00
Pranav K fee3b3cc6c Reacting to Razor changes 2014-10-01 17:47:21 -07:00
Pranav K ad8ab4b8fd Adding support for ViewLocationExpanders to allow modifying view locations
without changing the view engine.

Fixes #1039
2014-10-01 16:15:25 -07:00
Ryan Nowak d8995a7767 Fix for #1192 - Support customizing reflected model through attributes
This adds support for attributes which interact with reflected model.
These conventions are applied after all of our built-in constructs so that
you can see and modify the results.
2014-10-01 14:15:34 -07:00
Pranav K 6c49d0b40e Updating SyncAction_WithException to not test for exception message
Skipping PropertyHelper_WorksForStruct on Mono until further
investigation.
2014-10-01 11:53:21 -07:00
Pranav K 7b5a97d04e Updating TokenProviderTests to use GetAuthenticatedIdentity instead of creating GenericIdentity 2014-10-01 11:35:43 -07:00
Pranav K 4b56fe157d Fixing build break 2014-10-01 11:01:11 -07:00
Pranav K ecb16db58e Remove and sort usings and fixing formatting 2014-10-01 10:28:54 -07:00
Pranav K 38e82c0aa5 Updating Microsoft.AspNet.Mvc.Core.Test to work on Mono 2014-10-01 10:05:36 -07:00
Kiran Challa 1c8582d77a [Fixes #1183] Response uses chunked encoding when returning a string 2014-10-01 07:23:11 -07:00
Pranav K 3cd5c17da7 Updating ModelBinding tests to work in Mono 2014-09-30 20:16:21 -07:00
Pranav K f33eec4845 Updating MvcRazorHost to use overload that generates pragma checksum
Fixes #1152
2014-09-30 12:54:15 -07:00
YishaiGalatzer f82516d155 Fix issue https://github.com/aspnet/Mvc/issues/1202 2014-09-30 12:47:03 -07:00
Pranav K 038b8c7f19 Commonizing Razor Host tests 2014-09-30 12:18:21 -07:00
sornaks 3d5f4a2bfd Issue #985: Adding Functional Tests for ViewComponent Activators. 2014-09-30 10:49:30 -07:00
David Fowler 6279229a7c Removed primary ctor usage 2014-09-28 09:20:06 -07:00
Kiran Challa fdeff1188b [Fixes #926] Protocol & Host name ignored when creating action link 2014-09-26 17:20:56 -07:00
Ryan Nowak 3cd6d3e060 Adding Api Explorer 2014-09-25 15:31:51 -07:00
YishaiGalatzer 6600e68fc0 Create a pre compilation module and apis to allow meta programming
to precompile razor pages.

This is limited to sites where the .cshtml are still deployed. It's
current purpose is to speed up startup. Deploying without the razor
files is a separate feature.
2014-09-25 11:26:11 -07:00
Kiran Challa 43c7ddb9b7 Making UrlHelper's methods virtual 2014-09-24 13:01:34 -07:00
David Fowler 71964a813c Renamed configurations to frameworks in project.json 2014-09-24 01:28:18 -07:00
jacalvar f2dab5eaa7 [Fixes #1156] EmptyResult should not set status code (or do anything for that matter) 2014-09-22 14:12:00 -07:00
sornaks 96318dcbc2 Issue #1072: Adding Unit Tests for GetSupportedContentTypes, CanWriteResult and for XmlFormatters with DeclaredType as object. 2014-09-22 11:17:37 -07:00
sornaks 0b1ad4ce35 Removing XmlSerializerInputFormatter from the list of Formatters.
Introducing a functional test for XmlSerializerInputFormatter.
2014-09-22 11:07:05 -07:00
sornaks 4c951cc635 Issue #1081 - XML DataContract Formatter can fail to write when instance type != declaredType.
Adding Functional tests appropriately.
2014-09-19 15:01:49 -07:00
Ryan Nowak 529b17ea70 Fix for codeplex-1120 - Move CreateSerializer out of the base class
This is a small refactor as a precursor for api-explorer work.
2014-09-17 18:07:42 -07:00
Pranav K bc7241d87a Changes to show intellisense for @inject directive 2014-09-17 12:49:56 -07:00
Pranav K 646c0d704d Limit the maximum number of Model errors to a reasonable value.
Fixes #490
2014-09-16 09:57:00 -07:00
harshgMSFT 9befa6e3a2 Fixing af tests which are failing due to hardcoded values of the tokens. 2014-09-15 18:49:55 -07:00
harshgMSFT 0c13563e33 AF Cookie should be reused within the context of same request.
Fixes issue #959
2014-09-15 16:23:45 -07:00
Ryan Nowak 7ed2de297e moving global filters to options 2014-09-15 15:34:45 -07:00
jacalvar 25838cee55 [Fixes #911] RequireHttpsAttribute does not exist in MVC 6
1. GET requests will be redirected to the equivalent HTTPS url.
2. Requests with any other http method will fail with a 400.
2014-09-15 13:07:30 -07:00
David Fowler 70e809a430 Fixed test projects
- Removed bogus reference to configuration
2014-09-15 01:27:27 -07:00
jacalvar 775a780f49 [Fixes #739] Attribute Routing: Multiple routes per-action
1. Support multiple [Http*] attributes on an action.
2. Support multiple [Route] attributes on a controller and on an action.
3. Support creating multiple attribute routes using [AcceptVerbs("...", Route = "...")]
4. Detect attribute routed actions during action discovery and return one action per [Http*],
   [Route] or [AcceptVerbs] attribute found on the method when there is at least one valid attribute route.
5. Merge all the HTTP methods of [Http*] and [AcceptVerbs] attributes in a method during
   action discovery when there are no valid attribute routes defined on the action.
6. Build one action descriptor per controller [Route] + action [Http*], [AcceptVerbs]
   or [Route] combination in an action.
7. Disallow the use of attributes that do not implement IActionHttpMethodProvider and
   IRouteTemplateProvider simultaneously in methods that define attribute routed
   actions and throw an exception during startup.
8. Disallow mixing attribute routed and non attribute routed actions on the same method
   and throw an exception during startup.
2014-09-12 14:43:19 -07:00
harshgMSFT 7a3dc352c9 1. Moving the HttpNotAcceptableOutputFormatter to product code.
2. Renaming the NoContentFormatter to HttpNoContentOutputFormatter.
3. Updating the test to use mock.
2014-09-12 14:14:44 -07:00
harshgMSFT e884a476e9 Responding to comments 2014-09-12 13:56:33 -07:00
harshgMSFT abf27d883f GetSupportedContentTypes to take in declared and runtime type. 2014-09-12 13:56:30 -07:00
harshgMSFT 7448bf2843 Responding to comments 2014-09-12 13:56:22 -07:00
harshgMSFT 33173d3031 Fix for Content negotiation should fallback to the first formatter that can write the type #1033
- Includes functional and unit tests.
2014-09-12 13:56:14 -07:00
Wei Wang 447336b4f3 React to renaming TargetFramework to RuntimeFramework 2014-09-11 11:49:53 -07:00
Chris Ross 85ad1aeb96 Handle IBuilder rename to IApplicationBuilder. 2014-09-10 14:12:08 -07:00
jacalvar cde1a95d49 [Fixes #900] Use [Route(...)] on action methods to specify an attribute route that allows all verbs.
1. Changed attribute usage on RouteAttribute.
2. Added a test on action discovery to ensure that actions with [Route] get discovered as
   attribute routed actions.
3. Added a test on reflected action descriptor provider to ensure that an action with [Route] on
   the controller and [Route] on the action results in an action that allows any Http method.
2014-09-10 10:11:42 -07:00
Wei Wang 44ccea6871 Upgrade Newtonsoft.Json to 6.0.4 version 2014-09-10 08:52:12 -07:00
jacalvar 9345afeed2 [Fixes #731] Add unit tests for ReflectedActionDescriptorProvider
1. Added tests that cover parameters in actions.
2. Added tests that cover building the reflected application model.
3. Added tests that cover attribute routed action constraints and default values.
4. Added tests that cover conventionally routed action constraints and default values.
5. Refactored and cleaned up ReflectedActionDescriptorProvider. All the refactors consist
   of extracting blocks of code to separate methods to better display the flow when building
   the action descriptors.
2014-09-09 14:03:05 -07:00
Pranav K df0b33a378 Updating ViewStartUtility to use IFileSystem.TryGetParentPath 2014-09-05 14:38:11 -07:00
sornaks 28e334d3db Issue #668: Sample should be covered by a basic functional test. 2014-09-04 14:07:46 -07:00
David Fowler 34add2249e Updated to use the new target framework in project.json 2014-09-04 02:02:40 -07:00
jacalvar b6fb7ac7df Take advantage of nameof to improve our usage of MemberData across the code base.
Substituted all instances of [MemberData("PropertyName")] for [MemberData(nameof(PropertyName))]
This change enables us to take advantage of IDE features like Navigate to source,
find all references, etc. When using Visual Studio.
2014-09-02 13:53:03 -07:00
Pranav K b8692c2c21 Updating FunctionalTests to use HttpClient abstractions 2014-09-01 11:16:54 -07:00
jacalvar ccc20a38c1 [Fixes #734] Attribute Routing: Implement Name
1. Added support for Name in attribute routing. Name can be defined using [RouteAttribute]
and the different Http*Attributes, for example [HttpGet].

2. Names defined on actions always override names defined on the controller.

3. Actions with a non empty template don't inherit the name from the controller. The name
   is only inherited from the controller when the action template is null or empty.

4. Multiple attribute routes with different templates and the same name are not allowed.
2014-08-29 17:51:12 -07:00
Pranav K a931e21456 Adding support for flush points in Razor pages
Fixes #1042
2014-08-29 09:30:23 -07:00
David Fowler 2e6e5307f6 Updated to use the new target framework in project.json 2014-08-28 22:14:10 -07:00
YishaiGalatzer e40dbcaebf Prevent flushing when writing out from the formatters.
Also make the XML formatter respect object as a return type.

Issues: MVC/1073, MVC/972, MVC/958

1072 is a followup work item to add test coverage.
2014-08-28 14:15:07 -07:00
Pranav K d604c18368 Moving IModelValidatorProvider to Options
Fixes #879
2014-08-26 11:53:32 -07:00
Pranav K d77b06f742 Fixing IFileSystem in Razor test 2014-08-26 10:30:08 -07:00
Pranav K b2750752dd Reacting to IFileSystemInfo changes 2014-08-26 09:52:52 -07:00
Pranav K 096ba08a8d Reacting to IFileSystemInfo changes 2014-08-26 09:48:19 -07:00
harshgMSFT 313a537ea1 Adding ModelStateError if there is no input formatter selected. 2014-08-22 16:52:58 -07:00
Ryan Nowak 9faca78a84 Optimize attribute routing link generation 2014-08-22 15:28:19 -07:00
Pranav K 2dcbbf70b0 Modifying RazorViewEngine to create IRazorView instances from service
container
2014-08-22 11:41:04 -07:00
Pranav K a490abc6e8 Adding support for inheriting chunks from _ViewStarts as part of host
parsing.

Fixes #881
2014-08-22 11:04:42 -07:00
sornaks 791518d44d Issue #347: Throw a better exception when the user didn't add the MVC services.
Introducing MarkerService for identifying if MvcServices were added.
2014-08-21 13:59:52 -07:00
Pranav K eccd25bedd Change ThrowIfFaulted to WaitAndThrowIfFaulted 2014-08-21 11:55:41 -07:00
Pranav K 9c4df4606f Modify TemplateRenderer to use ThrowIfFaulted instead of Task.Wait
Fixes #782
2014-08-21 08:38:12 -07:00
Chris Ross 76ecb73040 Fix abstractions break in tests. 2014-08-20 14:33:39 -07:00
sornaks b9f1586008 Changes to introduce CanWriteResult for Xml OutputFormatters. 2014-08-20 11:09:09 -07:00
dougbu 041d350d51 Test data/time templates
- focus on affect of `ModelMetadata.HasNonDefaultEditFormat` and
  `IHtmlHelper.Html5DateRenderingMode`
- work through `TemplateRenderer` because individual templates only do
  formatting in a few cases
2014-08-20 10:08:23 -07:00
dougbu 98e23075dd Test `DisplayFormatString`, `EditFormatString`, and `HasNonDefaultEditFormat`
- `DisplayFormatString` and `EditFormatString` now based on attributes
- `HasNonDefaultEditFormat` is new
- confirm `DataType` and `ScaffoldColumn` in `CachedDataAnnotationsMetadataAttributes`
2014-08-20 10:07:55 -07:00
dougbu 0595e9ebc9 Move two recently-added `[HiddenInput]` tests into `CachedDataAnnotationsModelMetadataProviderTest` 2014-08-20 10:07:49 -07:00
dougbu 266644560f Clean up `AssociatedMetadataProviderTest`
- remove unused nested class `ModelWithReadOnlyProperty`
- remove unecessary nested classes `RangeAttribute` and `RequiredAttribute`
- use `Assert.NotEmpty()` and `Assert.Single()` where appropriate
2014-08-19 15:49:06 -07:00
jacalvar 2eec0bbf6d [Fixes #1035] RouteGroupConstraint should only be added once for non attribute routed actions
1. Changed ReflectedActionDescriptorProvider to add RouteGroupConstraint only once
   for non attribute routed actions.

2. Added tests to cover the scenario.
2014-08-19 13:14:56 -07:00
harshgMSFT 6f0fa67170 Enabling basic input formatter selection.
Conflicts:
	Mvc.sln
	src/Microsoft.AspNet.Mvc.Core/Formatters/TempInputFormatterProvider.cs
	src/Microsoft.AspNet.Mvc.Core/Microsoft.AspNet.Mvc.Core.kproj
	src/Microsoft.AspNet.Mvc.Core/ReflectedActionInvoker.cs
	src/Microsoft.AspNet.Mvc.Core/ReflectedActionInvokerProvider.cs
	src/Microsoft.AspNet.Mvc/MvcServices.cs
	test/Microsoft.AspNet.Mvc.Core.Test/Microsoft.AspNet.Mvc.Core.Test.kproj
	test/Microsoft.AspNet.Mvc.Core.Test/ReflectedActionInvokerTest.cs

Conflicts:
	src/Microsoft.AspNet.Mvc.Core/Formatters/TempInputFormatterProvider.cs
2014-08-19 12:46:52 -07:00
Pranav K 764b1e64b8 RoslynCompilationService should set the generated code when compilation is successful
Fixes #895
2014-08-19 09:24:28 -07:00
harshgMSFT 64d797a489 1. Moving input formatting related classes to MVC Core.(for tests as well).
2. Cleaning up the IInputFormatter to the final version.
3. Updating the input formatters and the context to be compliant with the IInputFormatter interface.
4. Adding Functional Tests.
- Not cleaning up TempInputFormatterProvider.

Conflicts:
	src/Microsoft.AspNet.Mvc.Core/Formatters/InputFormatter.cs
	src/Microsoft.AspNet.Mvc.Core/Formatters/JsonInputFormatter.cs
	src/Microsoft.AspNet.Mvc.Core/Formatters/TempInputFormatterProvider.cs
	src/Microsoft.AspNet.Mvc.Core/Formatters/XmlDataContractSerializerInputFormatter.cs
	src/Microsoft.AspNet.Mvc.Core/Formatters/XmlSerializerInputFormatter.cs
	src/Microsoft.AspNet.Mvc.Core/Microsoft.AspNet.Mvc.Core.kproj
	src/Microsoft.AspNet.Mvc.Core/ReflectedActionInvoker.cs
	src/Microsoft.AspNet.Mvc.ModelBinding/Microsoft.AspNet.Mvc.ModelBinding.kproj
	test/Microsoft.AspNet.Mvc.Core.Test/Microsoft.AspNet.Mvc.Core.Test.kproj

Conflicts:
	src/Microsoft.AspNet.Mvc.Core/Microsoft.AspNet.Mvc.Core.kproj
	src/Microsoft.AspNet.Mvc.HeaderValueAbstractions/Microsoft.AspNet.Mvc.HeaderValueAbstractions.kproj
	src/Microsoft.AspNet.Mvc.ModelBinding/Microsoft.AspNet.Mvc.ModelBinding.kproj
	src/Microsoft.AspNet.Mvc.ModelBinding/ValueProviders/FormValueProviderFactory.cs
	test/Microsoft.AspNet.Mvc.Core.Test/Microsoft.AspNet.Mvc.Core.Test.kproj
	test/Microsoft.AspNet.Mvc.ModelBinding.Test/Microsoft.AspNet.Mvc.ModelBinding.Test.kproj

Conflicts:
	src/Microsoft.AspNet.Mvc.Core/Formatters/FormattingUtilities.cs
	src/Microsoft.AspNet.Mvc.Core/Formatters/TempInputFormatterProvider.cs
2014-08-18 17:07:19 -07:00
harshgMSFT d97a427b3d Adding Input Formatters to MVC Options and using HeaderValueAbstractions 2014-08-18 10:25:19 -07:00
Louis DeJardin 5de2bc8243 Implementing ILoggerFactory.AddProvider 2014-08-15 16:34:14 -07:00
harshgMSFT bb452f19a7 JsonResult to use ObjectResult for content negotiation to pick default json formatter. 2014-08-15 15:56:24 -07:00
sornaks 2920c55116 Changes to enable XML Output Formatters.
- Unit / Functional tests for the same.
2014-08-15 15:05:00 -07:00
dougbu 1a4bd25e0f Add `[HiddenInput]`, `ModelMetadata.HideSurroundingHtml`, and `.Properties` tests
nits:
- add a few missing default `ModelMetadata` property value checks
- cleanup some redundancies in test data initializers
2014-08-15 12:33:58 -07:00
dougbu 53432e1483 Address TODO item in default `object` editor template
- add validation elements per property in this template
- update editor template test to expect new `<span>` in result
2014-08-15 10:50:20 -07:00
harshgMSFT 3f952c153f Fixing build break due to tests 2014-08-15 10:28:11 -07:00
David Fowler fa6b3acc4a Removed source files from the project 2014-08-15 09:14:49 -07:00
harshgMSFT 1684d1d322 NoContentFormatter: Writes 204 to the response status code if the value returned is null. 2014-08-14 19:16:26 -07:00
Pranav K 538e589894 Modifying ViewDataDictionary and RouteValueDictionary to copy on write
instead of eagerly copying.

Partial fix for #878
2014-08-14 18:18:54 -07:00
Ryan Nowak b72b44c20c Implement RouteKeyHandling.CatchAll 2014-08-14 15:59:09 -07:00
Ryan Nowak 8bfb6eb8d5 implement a decision-tree-based action selector 2014-08-14 15:45:45 -07:00
harshgMSFT 28092d975b Fixing a warning 2014-08-14 14:23:03 -07:00
Ryan Nowak 3770906c3b Issue #862 Extensibility for action invoker 2014-08-14 13:25:52 -07:00
Javier Calvarro Nelson 3ab0c3af29 [Issue #733] Attribute Routing: Implement Order
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.
2014-08-14 11:21:05 -07:00
Javier Calvarro Nelson 63d9625536 [Issue #730] Attribute Routing: Flesh out attributes - Part 2
1. Unsealed the Http*Attributes so that they can be extended and customized.
2. Added the same constructors as HttpGet to the rest of the Http*Attributes.
3. Added unit tests to validate the implementations for the IActionHttpMethodProvider.
4. Added functional tests to cover extra attribute routing scenarios like a test for an
   action with an HttpDeleteAttribute on it and action with AcceptVerbsAttribute and an
   action with a custom HttpMergeAttribute implemented.
2014-08-14 11:21:03 -07:00
Javier Calvarro Nelson 21b1174d76 [Issue #730] Attribute Routing: Flesh out attributes - Part 1
1. Added a new AttributeRouteInfo class to store all the information for
   actions that are attribute routed.

2. Added a new ReflectedAttributeRouteModel class to store all the information
   related to attribute routes in the ReflectedApplicationModel.

3. Refactored ReflectedControllerModel and ReflectedActionModel to use ReflectedAttributeRouteModel
   instead of just the attribute route template.

4. Refactored ReflectedActionDescriptorProvider to use AttributeRouteInfo and ReflectedAttributeRouteModel
   instead of just the route template.

5. Added a CombineReflectedAttributeRouteModel method in ReflectedAttributeRouteModel that handles
   combining two ReflectedAttributeRouteModel instances.

6. Removed the AttributeRouteTemplate class and moved the methods for combining attribute routes to the
   ReflectedAttributeRouteModel class.

7. Added unit tests for ReflectedActionModel and  ReflectedControllerModel that
   cover the usage of AttributeRouteInfo.

8. Added unit tests for CombineReflectedAttributeRouteModel.
2014-08-14 11:21:01 -07:00
Pranav K 26f98b481a ViewComponents should render partial views
Fixes #960
2014-08-14 11:14:05 -07:00
Pranav K fb773f4814 ViewEngine shouldn't throw when it doesn't know about the extension
Fixes #984
2014-08-14 10:53:01 -07:00
sornaks 9c4d7806a7 Introducing ByteArrayModelBinder.
-Checks for ModelType before processing.
-Ignores quotes in ByteArrayModelBinder.
-Unit,functional Tests.
-ModelStateError is set when Covert.FromBase64String(value) throws.
2014-08-13 15:15:52 -07:00
harshgMSFT 8d3d15fb4a Adding a functional test for anti forgery. 2014-08-13 15:00:00 -07:00
sornaks e6f4f0fec6 Introducing Activator for ViewComponents. 2014-08-13 14:22:43 -07:00
Pranav K 90b40832ff Modify RazorView to be instantiated via TypeActivator
Partial fix for #889
2014-08-12 10:37:00 -07:00
Pranav K 9e68a163fd Make RazorPage.IUrlHelper a non-public property
* This allows for injection of the property in cshtml files wthout running
in to compilation errors
* Make IUrlHelper a default injected service

Fixes #816
2014-08-12 10:12:23 -07:00
harshgMSFT 6ee034e64f ProducesAttribute +
Adding Functional Tests

Conflicts:
	src/Microsoft.AspNet.Mvc.Core/Formatters/OutputFormatter.cs
	src/Microsoft.AspNet.Mvc.Core/Resources.resx
	src/Microsoft.AspNet.Mvc.HeaderValueAbstractions/project.json
	test/Microsoft.AspNet.Mvc.FunctionalTests/project.json

Adding Resources + tests

Conflicts:
	src/Microsoft.AspNet.Mvc.Core/Properties/Resources.Designer.cs
	src/Microsoft.AspNet.Mvc.Core/Resources.resx

Adding produces content Attribute

Conflicts:
	src/Microsoft.AspNet.Mvc.Core/Microsoft.AspNet.Mvc.Core.kproj

Conflicts:
	src/Microsoft.AspNet.Mvc.Core/Microsoft.AspNet.Mvc.Core.kproj
	test/Microsoft.AspNet.Mvc.Core.Test/Microsoft.AspNet.Mvc.Core.Test.kproj
2014-08-11 17:52:55 -07:00
Pranav K 74bb8288b0 Making RoslynCompilationService a singleton.
* Minor code cleanup from previous compilation related PR.
2014-08-11 14:36:58 -07:00
Pranav K 758c0cadef Fixing unit test 2014-08-11 10:39:42 -07:00
Pranav K c12a4795ca Removing AdditionalInfo from CompilationResult since we can't always pass
it into exception thrown

All values in Exception.Data need to be serializable which is not true for
the diagnostics. Removing this property since we can't pass it through.
2014-08-11 10:25:12 -07:00
Pranav K 5e010597cd Propogate additional compilation data from RoslynCompilationService
* Update CompilationFailedException to include path of file being compiled
* Pass in path being compiled to Rolsyn.
* Adding doc comments for compilation pieces

Fixes #869
2014-08-08 18:22:13 -07:00
Chris Ross cd3e1da219 Fix Challenge params order. 2014-08-07 16:03:34 -07:00
dougbu 56d66c090e Make HTML helper `null` handling consistent
- #874 lines 3, 4, and 6
- correct `Value()` to treat a `null` expression name the same as `string.Empty`
- add missing `[NotNull]` attributes in `EditorExtensions` and for `GenerateIdFromName()`
- consistently pass `null` for default expression names to the helpers
 - for example, from extension methods
- add test cases using `null` for expression name

nits:
- correct summary XML comment for `HtmlHelper` class
- use named parameters and prefer interface (not extension) methods in changed calls
- use `string.Empty` instead of `""` in a few tests
2014-08-06 16:04:56 -07:00
dougbu 8ab11bc073 Correct XML comment syntax
- fix problems at least with Roslyn compiler and VS IntelliSense or the Object Browser
 - `<see langref="keyword"/>` generates nothing
 - `<example>` at top level (outside `<summary>`) generates nothing
 - curly braces don't become angle brackets outside `<see cref="reference"/>` references
  - yeah, a point @yishaigalatzer asked about in a previous PR
- `<see href="reference"/>` is not valid
- correct some invalid use of angle brackets and remove useless empty elements
- correct unresolved XML comment references; generally, add namespace prefix

Symptoms for some of the above issues included
- generated XML comments such as `<!-- Badly formed XML comment ... -->`, usually indicating an unclosed element
- generated XML attributes such as `cref="!:..."`, indicating a broken reference
 - in a couple of cases we had `<typeparamref cref="TOption"/>`; attribute should be `"name"`

Few wording changes beyond
- `"opening </form> tag"` -> `"<form> start tag"`
- `"closing </form> tag"` -> `"</form> end tag"`

Also correct two typos in `HtmlHelper`

Will create a unit test to ensure XML syntax doesn't degrade going forward.  Separate PR.
- for now, check using `dir -r *.xml | sls '!'`
2014-08-05 14:24:48 -07:00
Pranav K 5168808906 Introducing RazorTextWriter
RazorTextWriter represents the result of rendering a page as a sequence of
strings rather than a concatenated string. This avoids building up large
strings in memory.
2014-08-05 10:09:04 -07:00
Pranav K 9d36a45f38 Updating tests using Moq to workaround Roslyn changes
https://roslyn.codeplex.com/workitem/246 affects usage of code with the
latest build of Roslyn with Moq v4.2. The workaround involves ensuring a
closure is created. Updating affected tests to make ToString() calls on
local variables to create these closures.
2014-08-04 17:13:19 -07:00
Ryan Nowak 383c6305e1 Fix for issue #349 2014-08-04 16:49:24 -07:00
dougbu d0d7c6aef8 Add `HtmlHelperDisplayTextTest` and `HtmlHelperValueExtensionsTest` classes 2014-08-01 21:06:28 -07:00
dougbu 126ee116cf Remove useless `.ToString()` calls in tests 2014-08-01 21:06:23 -07:00
Ben Brown 01f5fec210 Added Logging to Mvc 2014-08-01 15:33:47 -07:00
harshgMSFT 19f3f78b3e Adding TextPlainFormatter to always handle returning strings as text\plain format.
Conflicts:
	src/Microsoft.AspNet.Mvc.Common/Encodings.cs
	src/Microsoft.AspNet.Mvc.Core/Formatters/JsonOutputFormatter.cs
	src/Microsoft.AspNet.Mvc/MvcOptionsSetup.cs
	test/Microsoft.AspNet.Mvc.Core.Test/ActionResults/ObjectContentResultTests.cs
	test/Microsoft.AspNet.Mvc.Test/MvcOptionSetupTest.cs
2014-08-01 13:47:23 -07:00
Ryan Nowak 99d053ef81 Return a copy of the route values in functional tests.
This is a workaround for a Json.Net + CoreCLR issue.
2014-07-31 15:09:47 -07:00
harshgMSFT 01260515f1 Responding to comments 2014-07-29 18:25:34 -07:00
harshgMSFT 2fe2efa94a Moving to the latest pattern of Specifying formatters using options 2014-07-29 18:02:10 -07:00
harshgMSFT 307c191c17 Adding support for content negotiation.
This change consists of :
1. Conneg based on request headers, supports the following 3 scenarios:
	a. ContentType property on ObjectResult set to null or is empty.
	b. ContentType property on ObjectResult set to a single content type.
	c. ContentType property on ObjectResult set to multiple content types.

2. Parsing Helpers, comparers and extensions for comparing various http headers.
3. Tests.

Open workitems:
1. Remodel JsonResult and ContentResult to be a derivation of ObjectResult.
2. Populate DeclaredType.

Conflicts:
	src/Microsoft.AspNet.Mvc.Core/Formatters/OutputFormatterDescriptor.cs
	src/Microsoft.AspNet.Mvc.Core/Microsoft.AspNet.Mvc.Core.kproj
	src/Microsoft.AspNet.Mvc.Core/OptionDescriptors/OutputFormatterDescriptorExtensions.cs
	src/Microsoft.AspNet.Mvc.Core/Properties/Resources.Designer.cs
	src/Microsoft.AspNet.Mvc.Core/Resources.resx
	src/Microsoft.AspNet.Mvc.HeaderValueAbstractions/MediaTypeHeaderValue.cs
	src/Microsoft.AspNet.Mvc.HeaderValueAbstractions/MediaTypeWithQualityHeaderValue.cs
	src/Microsoft.AspNet.Mvc/MvcOptionsSetup.cs
	src/Microsoft.AspNet.Mvc/MvcServices.cs
	test/Microsoft.AspNet.Mvc.Core.Test/Microsoft.AspNet.Mvc.Core.Test.kproj
	test/Microsoft.AspNet.Mvc.Core.Test/OptionDescriptors/OutputFormatterDescriptorExtensionTest.cs
	test/Microsoft.AspNet.Mvc.HeaderValueAbstractions.Test/MediaTypeHeaderValueParsingTests.cs
	test/Microsoft.AspNet.Mvc.Test/MvcOptionSetupTest.cs
2014-07-29 17:26:56 -07:00
Ryan Nowak 2987f98283 Adding parameter replacement 2014-07-29 16:14:57 -07:00
Ryan Nowak 2f9501458f Add friendly name to action descriptor. Issue 820
Used in error messages for various attribute routing pieces, and anywhere
that you need a display name for an AD.
2014-07-29 15:14:59 -07:00
sornaks cee73c0af3 1. Introducing XML Input Formatters.
2. Adding DelegatingStream class
3. Unit + Functional tests for formatters.
2014-07-29 15:04:23 -07:00
Javier Calvarro Nelson b0d52f73fd [Issue #527] Revive common ActionResults - Part 1.
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.
2014-07-25 13:04:59 -07:00
Pranav K 24f74222f5 Introducing Controller.TryUpdateModel
This changeset reintroduces some of the overloads for
Controller.TryUpdateModel.

Fixes #415
2014-07-25 10:08:44 -07:00
Pranav K da0bf6f7d8 Commonizing code in option provider
* Adding ValueProviderFactoryProvider and CompositeValueProviderFactory to
  maintain parity in pattern with other option types.

Fixes #818
2014-07-25 06:52:00 -07:00
Pranav K 92e26cf8e0 RazorView should not create new ViewContext when rendering pages.
For pages that can pop back (e.g. Partial pages \ View Components), the
invoking component already creates a new ViewContext. ViewStart, Pages
and Layouts need to share the same Layout. This is required for sharing
ViewData values (such as title).

Fixes #861
2014-07-25 06:37:53 -07:00
dougbu 3746e44dc3 Add more `ModelMetadata` and HTML helper tests
- add `CachedDataAnnotationsMetadataAttributesTest`
- add `CachedDataAnnotationsModelMetadataTest`
- confirm more default property values in `ModelMetadataTest`
- confirm use of `DisplayName` in `ModelMetadataTest`
- add `HtmlHelperDisplayNameExtensionsTest`
- add `HtmlHelperLabelExtensionsTest`
- add `HtmlHelperNameExtensionsTest`
2014-07-24 18:32:35 -07:00
Pranav K 47d227cbf2 Modify FindView and FindPartialView to accept ActionContext
Fixes #787
2014-07-24 11:48:23 -07:00
harshgMSFT a2561281b7 Adding MvcOptions.OutputFormatters property. 2014-07-23 17:46:17 -07:00
harshgMSFT 1df4738a19 Adding OutputFormatter base class 2014-07-23 16:50:22 -07:00
Pranav K e28adbfb3d ViewStarts need to be executed as part of View execution
Fixes #834
2014-07-23 16:45:25 -07:00
harshgMSFT b8ab5c5063 Http Abstractions for parsing Http headers needed for conneg. 2014-07-23 16:28:32 -07:00
Ryan Nowak d13f6474d8 adding a few tests for areas 2014-07-21 14:52:44 -07:00
Ryan Nowak 1b07c89322 cr feedback 2014-07-21 14:52:41 -07:00
Ryan Nowak 745239f09f Adding Attribute Routing Link Generation 2014-07-21 14:52:38 -07:00
Pranav K 340bd7550a Adding RazorView to Microsoft.AspNet.Mvc.Razor
RazorView was part of the previous commit but was separated to make it
easier to see the diff in RazorPage that was formerly named RazorView

Adding IRazorPage and changes per code review comments
2014-07-18 21:14:45 -07:00
Pranav K 9e535f6897 Separating view execution and Razor behavior
* Introducing RazorPage and RazorPageOfT that represent the Razor
  execution aspect of view execution. Moving view execution hierarchy behavior
  (Layout, partial views etc) into a separate RazorView type.

* Renaming IVirtualPathViewFactory to IRazorPageFactory,
  IRazorViewActivator to IRazorPageActivator

* Renaming VirtualPathViewFactor to FileBasedPageFactory to
  correctly reflect what it does.

Fixes #814
2014-07-18 14:58:12 -07:00
Pranav K c1112fcaf1 Move ValueProviders to MvcOptions
Fixes #778
2014-07-17 21:02:47 -07:00
Ryan Nowak bff94f169f Fix for issue #610 - Ignore internal and nested types
This change exludes internal and nested types from being treated as
controllers. This is consistent with MVC5's behavior.

DefaultActionSelectionConventions was primarily tested through running
action selection. I wanted to also test the methods with substantial logic
in this class, so I moved a spate of a classes from private classes inside of the
integration tests to public classes so they could be shared. I also added
tests to fill gaps in DefaultActionSelectionConventions, which is the vast
vast majority of this change.
2014-07-16 16:33:26 -07:00
Pranav K 9f8c656b31 IUrlHelper and IViewComponentHelper need to be activated
* Removing Init method and using [Activate] to activate IUrlHelper.
* Moving IViewComponentHelper to default injected properties
* Adding functional tests to verify these properties are injected \
  activated

Fixes #789
2014-07-16 16:24:03 -07:00
Yishai Galatzer 472e500864 Cache file info access in viewengine
Move compilation and VirtualPathViewFactory to be singletons
And cache access to files.

The cache time is controlled by MVC options.
The cache is implemented in the ExpiringFileInfoCache.cs
2014-07-16 13:12:21 -07:00
Javier Calvarro Nelson 87c430ae19 [#732] Attribute Routing: Implement `~/` for overriding a prefix
This change allows a user to override a route prefix set using
[Route("...")] on the controller by providing a route template
on the action that starts with "~/" or "/". For example,
[HttpGet("~/...")] or [HttpGet("/...")]

If the user specifies a template in [Route] that starts with "~/"
or "/", we will just strip the prefix from the template and use
the remaining part of the template.

The reason to do this is that there's a reasonable extensibility
scenario where a user can implement a global prefix for routes as
a convention (using IReflectedApplicationModelConvention), and use
~/ to escape that prefix (just like we support with action-level routes).
2014-07-16 09:40:38 -07:00
Pranav K bbdb2dfbf2 Adding support for activating view properties
Fixes #700
2014-07-15 16:26:07 -07:00
Pranav K f6106e424e Reacting to System.Collections versioning change 2014-07-14 15:54:00 -07:00
Pranav K 3692cc7d83 Revert "Adding support for activating view properties"
This reverts commit 21bb8cb9fb.
2014-07-14 11:42:41 -07:00
Pranav K 21bb8cb9fb Adding support for activating view properties
Fixes #700
2014-07-14 10:40:07 -07:00
David Fowler 7e7c56ce48 Renamed configurations to frameworks in project.json 2014-07-13 21:58:12 -07:00
sornaks 720923a1a4 Moving UTF8EncodingWithoutBOM.cs to Common and renaming it as Encodings. 2014-07-10 10:47:54 -07:00
David Fowler b1c0792e8c Added Configuration to TestApplicationEnvironment 2014-07-10 10:22:24 -07:00
Pranav K 177aadeadf Add extra unit tests and functional tests for CompositeViewEngine
Fixes #768
2014-07-09 15:03:34 -07:00
Pranav K 23eefed31a Move setting up options to MvcOptionsSetup
Fixes #760
2014-07-09 09:45:17 -07:00
Pranav K 5194adfaf5 Moving IViewEngine to MvcOptions 2014-07-08 17:50:13 -07:00
Ryan Nowak 6c5b836070 Removing magic link generation 2014-07-08 12:17:49 -07:00
Pranav K dbd26ef9a3 Chaning unit test to use Mock.Setup instead of setting it directly 2014-07-08 11:46:47 -07:00
Chris Ross 93869a5d7b Fix test. 2014-07-08 10:40:06 -07:00
Chris Ross 240d969899 Add using statement for extension methods. 2014-07-08 10:19:16 -07:00
Ryan Nowak e396f1b451 Adding attribute routing 2014-07-03 18:53:38 -07:00
Ryan Nowak c17d33154f Fix for #617 - ViewResult can be constructed without a view engine
We want result types to be constructable without services.
2014-06-27 17:05:09 -07:00
dougbu 172a5a5500 Address review comments
- XML comments for changed `TemplateInfo` properties
- correct `DefaultDisplayTemplateTests` and `DefaultEditorTemplateTests` namespaces
- add a couple of low-level `TemplateInfo` tests
2014-06-27 15:56:51 -07:00
dougbu bbf470bd34 Also test `string.Empty` model 2014-06-27 15:56:47 -07:00
dougbu 6eb1e38e33 Add `@Html.Display()` and `@Html.Editor()` tests with values in `ViewData` 2014-06-27 15:56:43 -07:00
dougbu 1a4d59ae14 Enable us to unit test `@Html...For()` methods
- add more `DefaultTemplatesUtilities.GetHtmlHelper()` overloads, all
  returning a strongly-typed helper
- also correct that method to ensure template helpers each get a unique
  `IHtmlHelper` instance
2014-06-27 15:56:35 -07:00
Pranav K e7c2faff32 Unwrap nullable types in PropertyHelper prior to looking up properties
Fixes #721
2014-06-27 15:27:51 -07:00
Pranav K 0f0d44c6b3 Fixing ModelChunkVisitorTest to match resource name
Fixing stylecop issues
2014-06-27 11:55:24 -07:00
N. Taylor Mullen 2ad175b687 Add @model specific tests to validate output.
#568
2014-06-27 11:23:27 -07:00
N. Taylor Mullen 54d6b0b113 Modify tests to use new ModelCodeGenerator.
#568
2014-06-27 11:23:24 -07:00
Pranav K 2aacdeca4a Modify AssociatedMetadataProvider to use PropertyHelper to create accessor
Additionally change it to use TypeExtensions.GetReadableProperties to get
property list. This causes it to ignore indexers which should not be
considered.

Fixes #595
2014-06-27 10:50:37 -07:00
Pranav K 3c092cb083 Moving model binders from DI to MvcOptions 2014-06-26 21:49:46 -07:00
Ryan Nowak ba506b2976 fix build break - this wasnt referencing the right helios package 2014-06-26 14:18:41 -07:00
Ryan Nowak f194723230 Adding tests for convention-based routing 2014-06-26 14:00:42 -07:00
Chris Ross 3aae5cb4fa Fix one more test. 2014-06-26 11:06:26 -07:00
Chris Ross 1d3e6b0dd0 Fix breaks from GetFormAsync, IReadableStringCollection.Keys. 2014-06-26 10:56:56 -07:00
David Fowler e6ec6e0aba React to resource changes 2014-06-25 22:48:32 -07:00
Ryan Nowak 0d7f38e10e Commonize code to limit functional tests to a single site each 2014-06-25 09:00:34 -07:00
dougbu dd2216fa89 Remove K10 configuration from AutofacWebSite 2014-06-24 20:33:21 -07:00
dougbu 23146787dc NET45-ify our Autofac functional test
- see loads of load failures after `kvm.ps1 upgrade -svrc50` otherwise
2014-06-24 19:33:50 -07:00
dougbu 5149c7cd19 Get ModelBinding test project working on K10 again
- restore `ClientRulesWithCompareAttribute_ErrorMessageUsesResourceOverride` since
  DataAnnotations has fixed underlying problem
2014-06-24 19:33:47 -07:00
Pranav K 9bf6982168 Reacting to HttpAbstractions changes 2014-06-24 16:36:36 -07:00
Pranav K 24e1ac7ca1 Revive ModelMetadata.ShowForDisplay and ModelMetadata.ShowForEdit
Fixes #679
2014-06-23 16:50:09 -07:00
N. Taylor Mullen 6cc47cd5f1 Add Autofac functional test.
Added very simple Autofac functional test that validates that we can add custom classes to the DI system as well as just use the ones provided to us.

#669
2014-06-23 16:17:50 -07:00
dougbu 23740085f1 Catch MVC up with Helios rename
- one more file to change on dev branch
2014-06-23 15:46:57 -07:00
dougbu 2bfc3e32e9 Merge branch 'release' into dev 2014-06-23 15:45:03 -07:00
dougbu 0c6749a5e7 Catch MVC up with Helios rename
- allows builds to succeed after cleaning your repo (without NuGet.org source)
2014-06-23 14:05:47 -07:00
sornaks 15b06a4057 Fixing the TODOs dependent on SimpleDisplayText. 2014-06-23 11:55:16 -07:00
Pranav K cca78bb055 Adding support for ActivateAttribute via IControllerActivator
This mechanism replaces code in Inject that activated properties
by looking them up by names.
2014-06-23 11:00:28 -07:00
Tian Pan 4c9f19aafc Update controller methods to be all virtual
Fix #596
2014-06-20 15:40:02 -07:00
Ryan Nowak e6ba1f23a2 refactor of action descriptor pipeline
(cherry picked from commit 634f756e7fd303fc3022563fcd8fb9b1cb47fba2)
2014-06-20 11:11:08 -07:00
Brice Lambson 172dcd179b Bump version to 6.0.0-* 2014-06-19 11:21:43 -07:00
harshgMSFT 08b64a2a4a InlineConstraint Functional Test, removing the dependency on a physical file. 2014-06-18 13:42:33 -07:00
Yishai Galatzer 9e1deb7982 Fixup unit tests to mock RequestServices instead of ApplicationServices 2014-06-18 13:40:58 -07:00
Tian Pan e27742fd0b IsValidActionMethod fails to check static methods.
Fix #638
2014-06-16 18:04:09 -07:00
Pranav K 85bd056780 CreateActionResult should work when action returns Task.
Fixes #647
2014-06-16 16:13:18 -07:00
Ryan Nowak d79943d30f Fixing issues build/project issues that someone else missed. 2014-06-16 13:26:49 -07:00
harshgMSFT 170283c724 Fixing StyleCop Issues for issues reported for commit# b58083f73a 2014-06-16 13:16:37 -07:00
Ryan Nowak 1bae3bcaa2 Issue #592 - ActionResult is not being executed by ResultFilterAttribute
The issue here is actually different than described in the bug.
ResultFilter should only short circuit when .Cancel is set to true. This
is consistent with legacy MVC.

Added tests for all of this stuff. There's already good test coverage for
the invoker, what was missing was coverage for the attributes and for the
methods on Controller. ExceptionFilterAttribute and
AuthorizationFilterAttribute don't have short circuiting logic inside of
them, so they are already covered by tests for the invoker.
2014-06-16 12:42:59 -07:00
harshgMSFT 10285d7d39 This additional constraint enables adding a route to the template (and potentially to the UseMvc method) without actually implementing the actual artifact.
For example without adding an area to a controller, a route can still be added to the template.
- Also added functional tests.
2014-06-16 11:24:22 -07:00
harshgMSFT b58083f73a Renaming AntiForgeryConfig-> AntiForgeryOptions.
Adding MvcOptions and updating AntiForgery system to use AntiForgeryConfiguration from MvcOptions
2014-06-12 16:55:49 -07:00
Ryan Nowak 7f34c94de7 Adding a context class for ValueProviderFactories
This allows model binding to once again be independent of routing. Sending
RouteContext into model binding was an odd choice from a layering
point-of-view.
2014-06-11 18:03:09 -07:00
Ryan Nowak 44ed23f65e Fix a build break in k10 2014-06-11 12:49:15 -07:00
Tian Pan 31915f0b46 Remove ComponentResultHelper
Fix #598
2014-06-11 11:32:22 -07:00
Tian Pan e95585dfbd Remove ActionResultHelper
Fix #597
2014-06-11 11:17:45 -07:00
Tian Pan 60443101d5 Enable request to reach base controller class's action
Fix #378
2014-06-11 10:57:19 -07:00
sornaks 28516a0ae9 Changes to support DisplayColumn attribute. Updating the MvcSample as well to start using DisplayColumn attribute. Adding UnitTests for the same. 2014-06-10 16:45:55 -07:00
Pranav K 7396f58d99 Support ModelMetaData.IsRequired
* Update DataAnnotationsModelValidatorProvider to use ModelMetadata.IsRequired
* Adding tests and updating existing ones that didn't work with IsRequired

Fixes #533
2014-06-10 10:20:24 -07:00
Pranav K 0123b38840 Adding missing files to kproj 2014-06-09 14:55:50 -07:00
Pranav K 59e419ba0a Adding support for @Inject to Mvc 2014-06-09 13:43:08 -07:00
Javier Calvarro Nelson c98bc503e8 Check for result.Body.Length = 0 instead of checking that the body is the empty string 2014-06-09 13:35:42 -07:00
Javier Calvarro Nelson 2523d5d9ea Addressed feedback from @rynowak 2014-06-09 13:35:39 -07:00
Javier Calvarro Nelson 5ba74f500c Incorporated code review feedback 2014-06-09 13:35:35 -07:00
Javier Calvarro Nelson 16f19b5cc6 Added functional tests to cover rendering views without layout and
to return a result without content.
2014-06-09 13:35:31 -07:00
Pranav K 822d84a2b4 Use default values when binding action arguments
Fixes #545
2014-06-09 11:44:26 -07:00
harshgMSFT dd3dafddb8 Mvc Changes corresponding to Routing DI changes. Refer pr#63 2014-06-06 17:22:06 -07:00
Yishai Galatzer 6d78f8adb3 Cache action descriptor providers and provide a race safe data structure to get the version.
The default implementation has a safe race, and does not allow for action description addition at runtime.

It can be replaced with an implementation that can reload.

Consumers of the new service that do extra caching are now responsible to look at the version and change the implementation.
2014-06-06 15:19:30 -07:00
Ryan Nowak bd08a2ca62 fix a build break due to api change 2014-06-06 11:06:41 -07:00
Ryan Nowak a3314a4805 changing to use list instead of stack 2014-06-06 10:49:58 -07:00
Ryan Nowak 69034b78b8 Issue #65 merge RoutingContext and RequestContext
See the relevant PR in aspnet/Routing#60.

This incorporates the breaking changes.
2014-06-06 10:49:55 -07:00
sornaks 6b836e9e77 Introducing ChallengeResult to call Response.Challenge() 2014-06-06 10:31:18 -07:00
Ryan Nowak cf0304b897 Fixing style issues in Mvc.Core 2014-06-04 20:40:23 -07:00
Pranav K 97e06138ed Cleaning up StyleCop errors 2014-06-04 13:28:30 -07:00
harshgMSFT b96da245cb RouteCollection -> RouteBuilder changes for MVC. 2014-06-03 16:43:54 -07:00
sornaks dffc58dedc Issue #242 - Introducing ObjectContentResult 2014-06-03 16:00:36 -07:00
Pranav K 06362db5dc Adding unit test for ViewResult 2014-06-03 13:53:51 -07:00
harshgMSFT 483e9038b4 Supporting Urls With ~/ while redirecting.
Fix for Issue#304
2014-06-03 11:29:27 -07:00
Tian Pan 6082cd9f36 View components - More built in return methods (Fix #354)
Modify Content/Json/View return type as strongly-typed.
2014-06-02 23:12:42 -07:00
Pranav K 19ab3a4fc6 * Moving Utf8EncodingWithoutBOM to a shared type 2014-06-02 11:09:55 -07:00
dougbu 065ee36fdd Reflect recently-added file in .kproj
- from commit 6f3511379f
2014-05-30 19:01:33 -07:00
Pranav K 6f3511379f Modify JsonResult to generate results in UTF8 without BOM by default
Fixes #577
2014-05-30 10:52:15 -07:00
David Fowler 1284ab63b6 Re-enabled the test 2014-05-29 22:42:50 -07:00
David Fowler c6f8244f79 Unblock the build 2014-05-29 02:20:55 -07:00
Javier Calvarro Nelson 931a3cd809 Added functional tests for MVC.
Created a test project to hold functional tests, a basic
application for test purposes under test\WebSites and added
the first functional test to validate view rendering.
2014-05-28 12:46:41 -07:00
Pranav K d8ba998dec Change IValueProviderFactory.GetValueProvider to be synchronous. 2014-05-27 14:08:13 -07:00
David Fowler 7388dece9f Fixed project.json casing 2014-05-26 02:50:43 -07:00
Pranav K a834928f1a Change IsValid method in ModelStateDictionary to GetValidationState
Fixes #400
2014-05-21 19:33:36 -07:00
Pranav K 0c66074033 Modify MvcRazorHost to use a fixed namespace for generated views.
Fixes #554
2014-05-20 17:00:02 -07:00
Pranav K a53e378cf4 Updating kproj file to match tooling changes 2014-05-18 20:13:56 -07:00
Andrew Peters f13865dedc Updating copyright headers 2014-05-08 23:01:20 -07:00
Wei Wang dc8b5010a0 Merge branch 'sort-dependencies' into dev
Conflicts:
	src/Microsoft.AspNet.Mvc.Core/project.json
	src/Microsoft.AspNet.Mvc.Razor.Host/project.json
	src/Microsoft.AspNet.Mvc.Razor/project.json
2014-05-08 11:16:25 -07:00
David Fowler 3b31df3d29 React to renames 2014-05-08 03:24:18 -07:00
Wei Wang 7b2feab670 Sort dependencies and remove duplicates in dependencies 2014-05-07 18:24:04 -07:00
Pranav K 4566947e33 Change ModelState.IsValid back to bool 2014-05-07 17:41:47 -07:00
lajones 235707ec8a Microsoft.ComponentModel.DataAnnotations is being renamed to Microsoft.DataAnnotations 2014-05-07 13:35:36 -07:00
harshgMSFT bbafa0a29a Tests for AntiForgery System. 2014-05-07 10:27:01 -07:00
Pranav K 904c91d2b9 CompositeModelBinder should only validate the object graph at the top
level.
DataAnnotationsModelValidator should prefer the container to Metadata.Model

Fixes #247
2014-05-06 17:39:50 -07:00
Wei Wang e800fcd44f Eliminate duplicated dependencies 2014-05-06 15:27:10 -07:00
Pranav K 076dedcca5 Reacting to package and namespace changes 2014-05-06 14:06:29 -07:00
Ryan Nowak abbaa11212 Incorporate name changes: HttpAbstractions 2014-05-05 17:14:08 -07:00
Ryan Nowak 4ece9969bf HttpAbstractions 2014-05-05 16:29:14 -07:00
Sebastien Ros 6f16dabf08 Renaming Microsoft.AspNet.Security namespace 2014-05-05 16:13:54 -07:00
Ryan Nowak 7a8dc36553 Adding controller-as-filter support
If the controller implements IFilter, it will be added to the filters
collection.

It's hardcoded to be 'first' as it was in MVC, but can be overridden by
implementing IOrderedFilter.
2014-05-05 14:03:01 -07:00
Louis DeJardin bbcac43aaa Updating DataAnnotations version reference 2014-05-02 20:53:12 -07:00
Hao Kung 9bf42374b0 Fix for moving extension methods to IServiceCollection 2014-05-02 12:37:05 -07:00
N. Taylor Mullen 4494f40d67 Addressed code review comments. 2014-05-02 12:16:28 -07:00
N. Taylor Mullen c986c663e3 Add tests to ensure cshtml ending for full path view names.
#206
2014-05-02 12:16:26 -07:00
Ryan Nowak f5b3ae4a3b Renaming Exception Filter methods
These were accidentally the same names as the action filter methods.
Oopsies. Name taken from MVC and appended Async for the async version
because that's how we roll.
2014-05-01 23:14:47 -07:00
dougbu 392aa464b2 Oops wrong test 2014-05-01 19:22:16 -07:00
dougbu a2ba36498a TEMPORARILY disable ClientRulesWithCompareAttribute_ErrorMessageUsesOverride
- test failing under CoreCLR
- leave it running under .NET 4.5
2014-05-01 19:12:23 -07:00
dougbu 222c763b72 Revert "Correcting WebFx failure on CI machines"
- previous attempt didn't work

This reverts commit a626896b80.
2014-05-01 19:08:37 -07:00
dougbu a626896b80 Correcting WebFx failure on CI machines
- a single test is failing under CoreCLR only
- using the resource-related properties of a `ValidationAttribute` in
  precisely one place – the failing test.
- in .NET the DataAnnotations assembly is somehow able to get access to
  `internal` resources
- that doesn’t work under CoreCLR
- short-term fix is to add an `[InternalsVisibleTo]` in the test
  assembly, giving DataAnnotations access to the resource

Will also file a bug in the DataAnnotations repo
2014-05-01 19:01:53 -07:00
anpete 8208cd6b2f Update file headers 2014-05-01 17:42:33 -07:00
Ryan Nowak 81611f13da TEMPORARILY turning off warnings as errors to unblock the CI 2014-04-30 21:55:17 -07:00
harshgMSFT 3765abdfca Adding Support for LinkGeneration for named Routes.
- Adding HtmlHelpers for route link generation.
- Controller Helpers
- UrlHelper and UrlHelperExtensions
2014-04-30 18:34:46 -07:00
Ryan Nowak 8ae1865740 Fix for part of #339
Treat actions with a dynamic constraint or httpmethod constraint as
'better' than those with just route constraints.

This is the first criteria used to filter down the 'best' match, so it's
applied before parameter-arity.
2014-04-30 13:25:48 -07:00
Ryan Nowak 20c8dece7b Adding IFilterFactory
This is a generalized factory/provider for filters - TypeFilterAttribute
and ServiceFilterAttribute are now implemented in terms of this interface.
2014-04-30 13:18:10 -07:00
sornaks d63d998e95 Introducing DisplayText, DisplayTextFor, Id, IdFor, IdForModel.
Fixing CachedDataAnnotationsModelMetadata to support NullDisplayText.
2014-04-30 10:23:25 -07:00
Sebastien Ros b3046a0285 AllowAnonymous can override AuthorizeAttribute
#309
2014-04-28 14:04:10 -07:00
Sebastien Ros e5aeb738e3 Adding a unit test for AuthorizeAttribute
#314
2014-04-28 13:57:29 -07:00
Pranav K f740aabb79 Reviving RangeAttributeAdapter, RequiredAttributeAdapter,
StringLengthAttributeAdapter

* Adding remaining DataTypeAttribute adapter rules
2014-04-26 11:39:29 -07:00
Pranav K f5ba63ea1e Fixing missing files in kproj
Fixing typo in sample filter
2014-04-25 14:48:14 -07:00
Ryan Nowak 8eecad9d83 Bringing back UrlHelper.IsLocalUrl
This has been compied verbatim from MVC (intentional). The tests have been
modernized a bit as well, but all the cases covered in the original are
there.

This may be moved to HttpAbstractions at some point in the future.
2014-04-25 14:29:00 -07:00
Pranav K d61915149c DictionaryBasedValueProvider results null when value is not found
* Guard against Dictionary returning null values
2014-04-24 18:10:06 -07:00
Sebastien Ros 0fe028a4dd Implementing Authorize attribute
#272
2014-04-24 16:21:43 -07:00
Pranav K 2ba8780ee0 Reviving MinLength and MaxLength attribute adapters 2014-04-24 15:52:05 -07:00
Pranav K b0c7dc9220 Make IModelBinder and IValueProvider methods async 2014-04-24 15:16:27 -07:00
N. Taylor Mullen d46389888d Modify search location for views.
When areas are not provided area locations are not searched for views.  Also
added tests for search locations in RazorViewEngine failures.
2014-04-24 14:03:36 -07:00
Pranav K 3671e8c5b4 Reviving CompareAttributeAdapter and ModelClientValidationEqualToRule 2014-04-22 23:11:24 -07:00
Pranav K cc00d8cff7 Modify TypeConverterModelBinder to use ValueProviderResult.CanConvertFromString to determine if it can convert a
value

* Adding support for extra type conversions
2014-04-22 23:00:58 -07:00
David Fowler 40d9fa0019 Added missing dependency 2014-04-21 22:59:26 -07:00
Ryan Nowak 73670fb5d7 CR feedback for filters 2014-04-21 13:34:00 -07:00
Louis DeJardin f19fe0cbef Filters version 2.0
This is functionally much more similar to legacy MVC.

Rather than a pure single pipeline, filter execution takes place in more
stages.
2014-04-17 11:45:58 -07:00
Ryan Nowak ce1f813a82 More spot fixes for warnings as errors 2014-04-16 20:21:10 -07:00
Ryan Nowak 40e7fcc9ba Turning on warnings as errors 2014-04-16 20:21:07 -07:00
sornaks 646b711b11 Adding the missed project files for WebFX:156 - Introducing RedirectToAction and RedirectToRoute 2014-04-15 13:49:57 -07:00
Sornakumar ecd8ddeae4 WebFX 156: Adding support for RedirectToAction and RedirectToRoute 2014-04-15 10:45:57 -07:00
harshgMSFT 1536daa107 Adding NonAction Attribute 2014-04-14 16:18:16 -07:00
dougbu 0e7dff9ca7 Get CoreCLR test builds compiling again
- no Mock without .NET 4.5
- reverts part of "Reviving support for IValidatableObject in CoreCLR"
- that was commit 0f6df5405b.
2014-04-12 13:45:11 -07:00
Pranav K 0f6df5405b Reviving support for IValidatableObject in CoreCLR 2014-04-10 22:09:57 -07:00
dougbu 0d9c052e43 Restore ability to run some tests using CoreCLR
- revert part of "Made a few more changes since we have new tooling"
- was commit b1fd5cc689
2014-04-10 17:15:17 -07:00
dougbu ba08f8e8d8 Cleanup Display, Partial, and Validation extensions
- correct file and class names for some HH extensions
 - three class names were correct but didn't match containing file
 - three class and file names matched but didn't start with HtmlHelper
- clean up trailing whitespace and long lines in changed Extensions.cs files
 - `HtmlHelperPartialAsyncExtensions`, `HtmlHelperRenderPartialAsyncExtensions`
   and `HtmlHelperValidationExtensions` lacked some `[NotNull]` attributes
- merge extension files by concept
 - Display / DisplayFor / DisplayForModel methods all into `HtmlHelperDisplayExtensions`
 - Partial / RenderPartial methods all into `HtmlHelperPartialExtensions`
- use `IHtmlHelper<TModel>` everywhere
2014-04-10 17:12:16 -07:00
Ryan Nowak 408d4056b1 Rearrange ViewContext 2014-04-10 11:40:57 -07:00
harshgMSFT 53b76380eb Adding ActionName Attribute 2014-04-09 15:48:30 -07:00
David Fowler b1fd5cc689 Made a few more changes since we have new tooling
- Remove runtime interface declarations and use
  Microsoft.Net.Runtime.Interfaces package
- Made tests compile for net45 and made default
  intellisense view net45 for unit tests since Moq
  doesn't work
2014-04-09 12:24:16 -07:00
David Fowler a970fa04ab Updated to use the new tooling 2014-04-09 12:24:16 -07:00
Pranav K c8ede78582 Expanding ValueProviderResult to support more data types
* Reviving tests for ValueProviderResult
2014-04-09 09:33:29 -07:00
Pranav K ea3e958563 Adding unit tests for CompositeModelBinder 2014-04-08 18:48:01 -07:00
dougbu 4feb8f4f28 Remove reduncant `ArgumentNullOrEmpty` resource from Core project
- came from Rendering but Core already had `ArgumentCannotBeNullOrEmpty`
- moved wording from "argument must not be" to "value cannot be"

Also make similar resources consistent in this repo
- adjust Razor's `ArgumentCannotBeNullOrEmpty` resource to use same wording
  as Core, adding "The"
- update ModelBinding to also have `ArgumentCannotBeNullOrEmpty` and to use
  it consistently with Core and Razor
2014-04-08 12:03:50 -07:00
Sornakumar b25091f6c1 Merge branch 'WebFX156' into dev 2014-04-08 10:52:38 -07:00
sornaks 7c8dd45b8b WebFX 156 - Adding support for Redirect and RedirectPermanent 2014-04-08 10:49:56 -07:00
harshgMSFT 01527cd4df Adding HttpPost, HttpDelete, HttpPut, HttpPatch attributes 2014-04-07 22:31:48 -07:00
Ryan Nowak faa8251b70 Merging Mvc.Rendering and Mvc.Core 2014-04-07 17:32:49 -07:00
harshgMSFT 652e89b343 Adding HttpGetAttribute and AcceptVerbsAttribute.
HttpPost, HttpDelete, HttpPut and HttpPatch would be similar.
Also adding few tests.
2014-04-07 15:10:22 -07:00
Ryan Nowak df16982697 Adding and updating old propertyhelper code for dictionaries 2014-04-07 14:41:24 -07:00
Ryan Nowak ec4b3a29c0 Adding smart link generation
This feature will enforce a contract that link generation has to point to
a real action. Read the comments in code for more details and rationale.
2014-04-07 14:37:52 -07:00
Pranav K 931d18b851 Adding exceptions for RenderSection, DefineSection and RenderBody 2014-04-07 12:25:44 -07:00
Pranav K 94c028a5df Adding support for RazorView.IsSectionDefined 2014-04-06 17:18:37 -07:00
Pranav K fc01cf6eea Fixing typo in DefaultAssemblyControllerProvider 2014-04-04 16:29:16 -07:00
Pranav K 9291cbc50b Adding support for RenderSection
* Adding unit tests for DefineSection \ RenderSection
* Changes per code review feedback
2014-04-03 15:00:06 -07:00
Pranav K 75dae948b2 Change IViewEngine.FindView to be synchronous 2014-04-03 14:20:39 -07:00
Pranav K 2e0bed750e Adding support for Url.Content, Href and ~/ in Razor views 2014-04-03 14:12:55 -07:00
Yishai Galatzer ebd54bfc06 Dispose controllers after they have been utilized by the action invoker 2014-04-03 09:31:23 -07:00
Ryan Nowak 1b4754454b Relayering MVC Dependencies Part 1/N
Merging Mvc.Razor.Host into Mvc.Razor
2014-04-02 18:28:34 -07:00
harshgMSFT 8d4a6c760a Action Selection Convention: Changes for Treating Index method as a default Get/Post method.
Also adds unit tests for the changes.
2014-03-31 12:59:30 -07:00
Pranav K c72c80c101 Add the ability to correctly determine if a particular field has been validated.
There are several portions of model validation that attempt to avoid
revalidating if a field has been validated. However the behavior of
ModelStateDictionary makes it difficult to distinguish between an
unvalidated field and a field without validation errors. This change
resolves this issue by letting the caller distinguish between the two
cases.
2014-03-31 12:40:38 -07:00
dougbu 655b329dd0 Increment System.Threading.Tasks package version
- today's build break, mark II

also remove dangling reference to TestCommon
2014-03-27 19:56:27 -07:00
Pranav K cb21c34770 Reintroduce ModelStateDictionaryTest 2014-03-26 17:32:45 -07:00
dougbu 8ed5b7b079 Fix WebFx-169 and #118
- move `DynamicObject` derivation up to new `DynamicViewData` class, fixing [WebFx-169](http://projectk-tc:8080/browse/WEBFX-169)
- avoid direct `_data` lookup in previous `TryGetMember()`, fixing [#118](https://github.com/aspnet/WebFx/issues/118)
- rename ViewData -> ViewDataDictionary

Also
- flesh out `IDictionary<string, object>` implementation in `ViewData`
- provide `ViewData` copy constructor that allows TModel to change
- remove `TryGetIndex()` and `TrySetIndex()` implementations; use `ViewData[]` instead
- restore `ViewContext.ViewBag` from legacy MVC
2014-03-26 11:42:52 -07:00
Pranav K af7d61113b Updating test projects to use Microsoft.AspNet.Testing 2014-03-25 15:10:58 -07:00
Pranav K a2cea18529 Replacing argument not null checks in ModelBinding with NotNullAttribute
* Removing not null guard tests in ModelBinding
2014-03-25 12:35:33 -07:00
Ryan Nowak 86ac978451 Implementation of ViewComponents 2014-03-25 11:04:37 -07:00
dougbu 32d031c6eb Add `ModelMetadata` to `ViewData`
- demonstrate `ModelMetadata` is available in a view

Also
- simplify `View()` overloads in `Controller`, pending #110 decisions
- make `Model` in `RazorView<T>` readonly
2014-03-21 14:42:42 -07:00
Pranav K 857a239990 Making Moq version in Mvc.Core.Test consistent with all other test projects 2014-03-21 14:11:49 -07:00
Pranav K f1c4a8e497 Change FormValueProviderFactory to use GetContentType for media type matching
Fixes #68
2014-03-21 12:10:12 -07:00
Pranav K 8ea196023e Modify controller discovery to only look for types that reference Mvc.Core
assembly
2014-03-21 10:02:54 -07:00
Pranav K 683c5bf9b3 Adding JsonInputFormatter for reading json encoded data from the request
body
2014-03-20 20:48:25 -07:00
Pranav K f8dd52dfe3 Reintroducing BindingBehaviorAttribute attribute
* Porting MutableObjectModelBinder tests
* Fix issues in MutableObjectModelBinder introduced by changing from
  TypeDescriptors to reflection
2014-03-19 16:52:02 -07:00
harshgMSFT 9cd99a42a7 ActionExecutor implementation WebFx W113
The changes include:
1. Action executor changes required for supporting sync and async operations Taksk and Task
2. Adding test project for MVC core - This contains ActionExecutor Tests.
3. Also adding a resources file for MVC core project
2014-03-19 11:10:42 -07:00
dougbu 4bc7c36522 Merge two `TypeExtensions` classes into Common\TypeExtensions.cs
- add missing `[NotNull]` attributes
- remove now-unneeded usings for ...ModelBinding.Internal namespace

Also get ModelBinding test project working under CoreCLR
- create separate k10 and net45 folders under test in VS
- add `[InternalsVisibleTo]` to make `TypeExtensions` visible to test assembly
- correct tests' `CultureInfo` use to compile under CoreCLR
- ifdef out CoreCLR tests depending on Moq, ReadOnly, ...
- remove a couple of tests expecting TypeConverter to work
2014-03-19 09:53:40 -07:00
Pranav K 072e2cc1f1 Updating DataAnnotations version in project.json 2014-03-18 20:56:08 -07:00
dougbu 3a0add8be8 Cleanup pass: Move Rendering classes to correct namespace
- use Microsoft.AspNet.Mvc.Rendering namespace throughout assembly

Also
- move `IdAttributeDotReplacement` from `TagBuilder` to `HtmlHelper`
- remove commented-out code in `HtmlHelper`
- use `var` and `[NotNull]` more
- `String` -> `string`
- correct Resources references; add missing resources
2014-03-18 14:02:39 -07:00
dougbu 478c220ddb Revert "Merge two `TypeExtensions` classes into Common\TypeExtensions.cs"
This reverts commit d534471515.
2014-03-17 22:53:36 -07:00
dougbu d534471515 Merge two `TypeExtensions` classes into Common\TypeExtensions.cs
- add missing `[NotNull]` attributes
- remove now-unneeded usings for ...ModelBinding.Internal namespace
- remove TypeExtensionTests.cs; don't add .NET 4.5-only
  `[InternalsVisibleTo]` for low-level `IsCompatibleWith()` extension
2014-03-17 21:02:25 -07:00
dougbu ed1b2ddcc3 Run unit tests during builds
- add "test" command
- use latest (forked) XUnit packages
  update package references
  [PropertyData] -> [MemberData]
  Xunit.Extensions -> Xunit or Xunit.SDK
  Moq now available for .NET 4.5 only
- delete a couple of unit tests checking for ArgumentNullException
- provide TestCommon classes in Razor and Razor.Host test projects
- make ReplaceCulture internal because it's a shared source
2014-03-17 16:28:25 -07:00
Pranav K e434918337 Reintroduce model validation 2014-03-12 21:55:50 -07:00
Pranav K 9132d32fa4 Renaming IsCompatibleObject to IsCompatibleWith to match definition 2014-03-10 17:14:35 -07:00
Ryan Nowak 86f18f5da7 Moving ViewContext to rendering, breaking coupling to RequestContext 2014-03-10 16:15:46 -07:00
Pranav K 07974b44e2 Adding unit tests for TypeExtensions.IsCompatibleObject 2014-03-10 16:09:02 -07:00
dougbu 59eaa8f642 Fix 4 unit test failures
- NRE in TypeExtensions.IsCompatibleWith()
- ComplexModelDtoResultTest.Constructor_ThrowsIfValidationNodeIsNull() won't work w/o validation
- BindModel_Error_FormatExceptionsTurnedIntoStringsInModelState() looking for wrong message
- BindModel_Error_FormatExceptionsTurnedIntoStringsInModelState_ErrorNotAddedIfCallbackReturnsNull() a dupe
- Also add [NotNull] attributes in TypeExtensions
2014-03-10 12:27:32 -07:00
Pranav K 123089d5c7 General razor clean up
* Change Razor compilation to use ApplicationBasePath to determine the
  app root
* Change class name generation to be based on app-relative path.
2014-03-10 11:56:07 -07:00
Pranav K d920003194 Introduce FormValueProviderFactory to expose form data as a value provider 2014-02-28 11:05:39 -08:00
Pranav K b6c78de4ea Reintroduce model binding 2014-02-23 15:23:58 -08:00
Pranav K 5a22d9b52c Restore @model support in RazorHost 2014-02-13 12:48:02 -08:00
Pranav K b51fd08bab Update ViewDataOfT.SetModel to check for type compatibility when setting
model instance.
2014-02-05 14:33:11 -08:00