Pranav K
f568d3c2bc
Support finding "sibling" pages when using RedirecToPage
...
Fixes #6083
2017-04-21 18:12:52 -07:00
Ryan Nowak
297196baa0
Design updates to handler methods and binding
...
Implements #6091 , #6072 , #6090 , #5927
2017-04-21 17:29:25 -07:00
Ryan Brandenburg
908b4c8d62
FormAction from QueryString
2017-04-21 15:04:37 -07:00
Ajay Bhargav Baaskaran
8eac7c2d6c
[ Fixes #6117 ] Added RedirectToPage overloads to Controller
2017-04-21 12:19:35 -07:00
N. Taylor Mullen
83faaebdb6
Upgrade Roslyn dependency to 2.0.0.
...
- Added C# 7 unit and functional test to validate features work end-to-end.
#6149
2017-04-21 11:41:31 -07:00
Christopher Dresel
025870e8b9
Fix #6159 - Fix deep copy for ControllerModel and ActionModel
2017-04-21 07:41:14 -07:00
Ryan Brandenburg
5a184df808
Remove Binder from Page and PageModel
2017-04-20 17:54:50 -07:00
Kiran Challa
f4d84f50cd
Upgrading Moq to 4.7.1
2017-04-20 17:07:50 -07:00
Pranav K
681b798a2e
RedirectToPage doesn't trim /Index from URL
...
Fixes #6080
2017-04-20 11:15:45 -07:00
Andrew Stanton-Nurse
a975d7fa01
react to removal of PlatformAbstractions ( #6164 )
2017-04-20 11:09:18 -07:00
Ryan Nowak
4bf518b09b
Fix #6140 - Allow linking between controller and page
...
The issue here is that route values used for action selection are
'global'. That means that pages need to have a 'null' route value for
'action' and controllers need to have a 'null' route value for pages. This
is the same way that areas work.
The fix is to move the 'merge' of route values up to a level where pages
and controllers can work together. Since ADPs use the russian-doll
pattern, the fix is to run this 'merge' in the controller ADP, but after
all of the ADs have been created.
2017-04-19 16:48:38 -07:00
Ryan Brandenburg
c9bfd2296d
Parity between Controller and Page/PageModel
2017-04-19 15:02:06 -07:00
Hao Kung
3e8cd1e7c9
MVC => Auth 2.0
2017-04-19 11:57:04 -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
Ryan Brandenburg
c56b64fc41
Add factory methods
2017-04-17 16:11:34 -07:00
Pranav K
8ed55107e7
Add support for page precompilation
2017-04-17 10:43:50 -07:00
Mike Harder
e766a259ed
Revert "Skip test `AssemblyPartTest.GetReferencePaths_ReturnsReferencesFromDependencyContext_IfPreserveCompilationContextIsSet`"
...
This reverts commit c69e48f06b .
2017-04-14 18:41:31 -07:00
Pranav K
49628bca2e
Use case invariant lookups for DependencyModel to workaround CLI version differences
2017-04-14 17:03:20 -07:00
Pranav K
8fa95d66d4
Add support for suppressing inbound and outbound routing
2017-04-14 17:02:45 -07:00
Mike Harder
c69e48f06b
Skip test `AssemblyPartTest.GetReferencePaths_ReturnsReferencesFromDependencyContext_IfPreserveCompilationContextIsSet`
...
- Workaround for "Can not find compilation library location for package" (https://github.com/dotnet/cli/issues/6318 )
2017-04-14 15:37:54 -07:00
Ryan Nowak
ed3aa4d918
Adding functional tests for @namespace
2017-04-14 14:47:29 -07:00
Jass Bagga
3eae7cc393
Add AggregateExceptionTest ( #6135 )
...
Test for aspnet/Common#215
2017-04-14 14:20:31 -07:00
Jass Bagga
d8a95c731b
Move RazorViewEngineOptionsSetup to internal namespace ( #6125 )
...
Addresses #6116
2017-04-13 13:35:35 -07:00
Pranav K
c8a1bb6914
React to deps file casing change
...
Fixes #6122
2017-04-13 13:09:00 -07:00
Pranav K
dfbf6d43ff
Temporarily skipping ReferenceAssemblies_ReturnsLoadableReferenceAssemblies
2017-04-12 14:31:21 -07:00
Pranav K
3474bdf776
RedirectToPage from a form-action handler includes the formaction
...
Fixes #6104
2017-04-12 09:27:08 -07:00
Kiran Challa
106b34867d
Temporarily skipping ErrorPageMiddleware functional test to unblock mirror
2017-04-11 17:40:01 -07:00
Ryan Brandenburg
59a3aade9b
Fix [TempData] for PageModel's
2017-04-11 16:45:44 -07:00
Jass Bagga
1a8ac88da7
Add PreserveMethod ( #6075 )
...
Addresses #5609
2017-04-10 17:31:59 -07:00
N. Taylor Mullen
36e272fdc2
React to Microsoft.AspNetCore.Razor.Evolution => Microsoft.AspNetCore.Razor.Language.
...
aspnet/Razor#1169
2017-04-10 10:20:19 -07:00
Steve Sanderson
90acd055fe
Make [FromBody] treat empty request bodies as invalid ( #4750 )
2017-04-10 16:55:14 +01:00
Pranav K
1e7972bd8f
Add convenience methods for redirecting from a Razor Page back to itself
...
Fuxes #5953
2017-04-07 10:03:42 -07:00
Ryan Nowak
4032de064e
Removing _PageStart.cshtml
...
Pages now also use _ViewStart.cshtml
Also contains some naming/text cleanup that was missed in the previous
commit.
2017-04-06 08:14:37 -07:00
Ryan Nowak
c6e4609096
Getting rid of _PageImports
...
Pages will just use _ViewImports.
2017-04-06 08:14:37 -07:00
Ryan Brandenburg
9e8d4db7d8
Move TempDataPropertyProvider into filter
2017-04-05 12:04:02 -07:00
Ajay Bhargav Baaskaran
3424e20c67
Re-enable skipped test
2017-04-04 19:25:50 -07:00
Pranav K
925ad75cdf
Add convenience methods for redirecting to another Razor Page
...
Fixes #5956
2017-04-04 14:36:22 -07:00
Pranav K
2d19a82678
Update more resource designer files
2017-04-04 13:54:20 -07:00
Ryan Brandenburg
e5ccac8bf6
Add functional tests for RazorPage routes
2017-04-04 11:14:52 -07:00
Ajay Bhargav Baaskaran
3ab9feca3a
Temporarily skipping failing test
2017-04-03 23:24:09 -07:00
Kiran Challa
19cb15be54
Revert "Skipping model validation tests temporarily to unblock mirror"
...
This reverts commit e25bfa8919 .
2017-04-03 17:13:49 -07:00
Pranav K
d37b1548f8
Update to new resx format
2017-04-03 16:37:22 -07:00
Hisham Bin Ateya
fe3d45fad1
Adding AllowAnonymousToPage & AllowAnonymousToFolder
...
Fixes #5884
2017-03-31 20:17:31 -07:00
Doug Bunting
2cabd589ac
Add more `ExpressionHelper` tests
...
- #5792
2017-03-31 15:22:29 -07:00
Kiran Challa
e25bfa8919
Skipping model validation tests temporarily to unblock mirror
...
- A fix was already checked in f3d0e4d0dd but this did not make into the netcoreapp2.0 shared runtime
2017-03-31 12:38:10 -07:00
Ryan Nowak
951341f612
Add a comment for our cool workaround
2017-03-31 11:19:22 -07:00
Ryan Nowak
7904c7756d
Add a simple action selection benchmark
2017-03-31 11:19:22 -07:00
Ryan Nowak
7d4ccd9c58
Add benchmark project and boilerplate
2017-03-31 11:19:22 -07:00
Steve Sanderson
4f351bd37c
Add support for media type suffixes ( #5273 , #6032 )
2017-03-31 10:20:43 +01:00
Ryan Brandenburg
c47825944d
Remove Microsoft.AspNetCore.Mvc.Razor.Host
2017-03-29 16:50:39 -07:00
Ajay Bhargav Baaskaran
5fca8da665
React to razor changes
2017-03-29 16:45:37 -07:00
Doug Bunting
1672820e4e
Add functional test covering an `IList<T>` property
...
- #5656
2017-03-29 12:32:06 -07:00
Jass Bagga
eda5028cf4
Add TagHelperComponentTagHelper
...
Addresses #5728
2017-03-29 11:29:24 -07:00
Kiran Challa
c18f0780c1
[ Fixes #5413 ] JsonOutputFormatter adds all closing brackets when exceptions are thrown
2017-03-28 23:09:18 -07:00
Pranav K
b22326323a
Add properties to Page and PageModel
...
Fixes #6008
2017-03-28 13:26:38 -07:00
twirpx
58317b18ce
Fixing NRE when CacheTagHelper throws and exception ( #5989 )
...
Fixes #5988
2017-03-27 12:45:22 -07:00
Derek Gray
575fe68b2b
Order enum values by DisplayAttribute.Order
...
Fixes #4297
2017-03-27 12:22:35 -07:00
Doug Bunting
824d65ca3d
Remove `ValueProviderResultExtensions`
...
- #5063
- update tests that used one extension method to instead use `ModelBindingHelper` directly
nit: `mbc` -> `context`
2017-03-24 22:17:34 -07:00
Pranav K
e7101f248a
Support model binding to Razor Pages properties on page and PageModel classes
...
Fixes #5952
2017-03-24 07:45:19 -07:00
Pranav K
f3ee4064a2
React to Razor changes
2017-03-22 19:58:46 -07:00
Pranav K
705c36921a
Use alternate workaround for #6005
2017-03-22 19:14:46 -07:00
Pranav K
18785dbed6
Add System.Reflection.TypeExtensions to fix net46 tests
2017-03-22 06:33:04 -07:00
Pranav K
badb6ce8e5
Remove net451 as a cross-compile target
2017-03-22 06:32:50 -07:00
Ryan Brandenburg
66deaf0b3f
Make test of @page/@model whitespace
2017-03-20 10:36:58 -07:00
Ryan Brandenburg
e6cb639cc0
Add handler functional test
2017-03-20 10:05:29 -07:00
Ryan Brandenburg
270f66198f
Remove Razor from projects
2017-03-17 15:00:39 -07:00
Ajay Bhargav Baaskaran
1fdc5132cb
React to TagHelper descriptors api cleanup
2017-03-17 10:51:02 -07:00
Jass Bagga
1197657e5b
TempData property attribute
...
Addresses #5600
2017-03-16 16:34:35 -07:00
Ajay Bhargav Baaskaran
ce28117b8b
Normalize line endings in RazorEngine tests
2017-03-16 15:51:10 -07:00
Ajay Bhargav Baaskaran
74889c8f99
Modified MvcRazorHost tests to use new Razor
2017-03-16 11:13:42 -07:00
Nate McMaster
6f7717a381
Unify dependency versions to one file
2017-03-15 16:54:32 -07:00
Pranav K
bee1a55cff
Use RazorPagesOptions.RootDirectory when looking for page hierarchies.
...
Fixes #5915
2017-03-14 18:56:50 -07:00
Pranav K
de25357c28
Do not throw if a library does not have a runtime component
...
Fixes #5690
2017-03-14 15:07:50 -07:00
Ryan Brandenburg
82d87df166
Fix warning as error
2017-03-14 12:44:57 -07:00
Ajay Bhargav Baaskaran
2ffaa88830
Using NullLogger types from Logging.Abstractions
2017-03-14 12:24:18 -07:00
Ryan Brandenburg
365ae19c8b
Add InvalidTagHelperIndexerAssignment to RazorPageBase
2017-03-14 10:04:15 -07:00
hishamco
e44d875df4
Adding AuthorizePage & AuthorizeFolder without requiring a policy
...
Refactoring
2017-03-13 16:39:52 -07:00
Pranav K
f7fd5114b3
Introduce MvcRazorTemplateEngine
2017-03-13 16:33:13 -07:00
Pranav K
4faef7afaf
Cache more things in HandlerMethodDescriptor
...
Add tests for DefaultPageHandlerMethodSelector
2017-03-13 13:15:26 -07:00
Pranav K
7b53ba1f6b
Reacting to https://github.com/aspnet/Razor/issues/1063
2017-03-13 09:46:36 -07:00
Jass Bagga
cd9899363f
React to new ctor for TagHelperContext
...
Razor issue: aspnet/Razor#1065
Razor PR: aspnet/Razor#1066
2017-03-10 13:45:14 -08:00
Ryan Brandenburg
1c74e31715
Add tests for PageActionInvokerProvider ( #5882 )
2017-03-09 16:19:20 -08:00
Ryan Brandenburg
7f3f6957be
Set path in DefaultPageFactory ( #5911 )
2017-03-09 16:15:43 -08:00
Nick Chapsas
015dafc25f
[Feature] String should be an acceptable value for a checkbox if it can be parsed as a boolean ( #5845 )
...
- `string` should be an acceptable value for a checkbox if it can be parsed as a `bool`
- `throw` with different resources when `ModelType` isn't `bool` or `string` and when `string` value is not acceptable
2017-03-08 14:22:28 -08:00
Ryan Brandenburg
d9d280d1ef
Make CookieTempDataProvider the default ITempDataProvider ( #5892 )
2017-03-07 16:04:47 -08:00
Ryan Brandenburg
4a20c849cb
Add functional test for Page.View() ( #5896 )
2017-03-06 16:19:41 -08:00
Doug Bunting
5c96a7cdef
Use an alternate workaround for #5873
...
- use specific workaround for Microsoft/vstest#428
- generating an executable for a test project is a bit too weird
- also work around dotnet/sdk#926
- generating an executable covered this as well
nit: add and update comments about other workarounds in the functional tests project
2017-03-06 14:05:21 -08:00
Doug Bunting
3fe0b569d6
Fix tests on Windows with `core.autocrlf=input`
...
- #5907
2017-03-06 13:59:06 -08:00
Pranav K
145d27f9b3
Add a PagesOption type that allows configuring the root for Page file discovery
...
Fixes #5785
2017-03-03 17:20:07 -08:00
Ryan Brandenburg
85e28ae478
Trim quotes from template ( #5838 )
2017-03-03 09:52:36 -08:00
Pranav K
7cadb58e12
Add convenience extension methods for IPageApplicationModelConvention
2017-03-02 17:38:04 -08:00
Doug Bunting
9b3b3e91bd
Re-enable functional tests on full .NET Framework
...
- #5873
- creating an EXE for the test project seems to work around #5873
- also avoids dotnet/sdk#926 when building in Visual Studio
nit: clean up duplicate test data
2017-03-01 23:08:46 -08:00
Ajay Bhargav Baaskaran
f7c2e5bffc
[ Fixes #5844 ] Using ExtensionIRNode for Inject directive
2017-03-01 09:45:47 -08:00
N. Taylor Mullen
acfad83aa6
Migrate to MSBuild
...
- thanx to @NTaylorMullen for initial conversion
- e.g. AssemblyInfo.cs files were already minimized or removed :)
- allow `>=` RC3 CLI's to build and run MVC
- work around several dotnet migration issues; see #5482
- disable full .NET Framework runs of functional tests; see #5873
- remove `Microsoft.DotNet.InternalAbstractions` and `System.Xml.XmlDocument` dependencies
- remove project.json (!!), *.xproj, .notest, and web.config files
Redo earlier changes:
- apply test migration to .NET 4.5.2 in *.csproj world
- see 63507c8 for previous, project.json work
- apply dependency version downgrade from 0097e40 in *.csproj world
Make other test-related changes:
- make Microsoft.AspNetCore.Mvc.TestDiagnosticListener a regular class library
- add support for `/p:GenerateBaselines=true` for functional and Razor.Host tests
- separate `GetCSharpTypeName_ReturnsCorrectTypeNames_ForOutParameter()` test
- work around inability to deserialize a odd `ref` type
- xUnit and vstest now serialize / deserialze test data more often
- skip poor test mentioned in #5768
- work around Microsoft/vstest#392
- rename tests to avoid duplicates
- work around Microsoft/vstest#419
- set up created `AppDomain`s with current `ApplicationBase`
2017-02-28 21:20:39 -08:00
Pranav K
de30c5822a
* Cache ExecutorFactory as part of CompiledActionDescriptor
...
* Add tests for ExecutorFactory
2017-02-24 11:56:13 -08:00
martincostello
498c1c570d
Update error message
...
Update error message based on PR feedback to less C# specific.
2017-02-23 14:21:58 -08:00
martincostello
9950325269
Update view compilation error message
...
Update view compilation error message for csproj instead of
project.json.
2017-02-23 14:21:58 -08:00
Ryan Nowak
e11e6b3be7
Add TempData property and some functional tests
2017-02-22 08:14:02 -08:00
Ajay Bhargav Baaskaran
ed9025cc5b
React to aspnet/Razor#1030 - Enable skipped test
2017-02-21 17:32:44 -08:00
Ryan Nowak
19331f9532
Adding some basic functional tests
...
I ran into a blocking issue where page handlers aren't picked up, so I
fixed it. Logging another issue to follow up with better tests for this.
2017-02-21 16:41:25 -08:00
Ryan Nowak
36e4dbe941
Adding a functional test project for Razor Pages
2017-02-21 08:25:30 -08:00
Doug Bunting
63507c8da9
Bump test projects up to .NET 4.5.2
...
- aspnet/Testing#248
- xUnit no longer supports .NET 4.5.1
- update AppVeyor config so this framework version is available
- build tests for desktop .NET only on Windows
2017-02-21 07:15:36 -08:00
Ajay Bhargav Baaskaran
11d747fc33
React to CSharpTokenIRNode being removed
2017-02-17 19:31:33 -08:00
Ajay Bhargav Baaskaran
0f5d5ff3b5
React to aspnet/Razor#1017
2017-02-17 16:01:54 -08:00
Jass Bagga
927e75870d
Add BindingSourceMetadataProvider
...
Addresses #5673
2017-02-17 13:22:10 -08:00
Ryan Brandenburg
366dbde378
Add culture constructor to RouteValueProvider
2017-02-16 14:47:34 -08:00
Nate McMaster
0097e40e46
Downgrade to stable packages
2017-02-15 14:23:48 -08:00
Kiran Challa
a00acceaa9
Merge branch 'rel/1.1.2' into dev
2017-02-15 12:43:37 -08:00
Kiran Challa
29647fda33
[ Fixes #5801 ] Move call to validate constructor in ComplexTypeModelBinder into CreateModel
2017-02-15 12:33:01 -08:00
Ajay Bhargav Baaskaran
38e1e7d14e
React to aspnet/Razor#996
2017-02-14 15:11:39 -08:00
Pranav K
eb820106e2
Generate the class name from relative path
2017-02-14 09:41:05 -08:00
Ajay Bhargav Baaskaran
44048331e9
Make `ViewComponent.View()` overloads respect explicitly passed in model even when `null`
2017-02-13 17:08:48 -08:00
Pranav K
35edc299d7
Fix test failures
...
Fixes #5794
2017-02-13 12:03:10 -08:00
Ryan Nowak
2cdd84f437
Remove pranav's hack
...
This is part 1 of the right fix for the directive getting removed. This
pass has the wrong order, an it should be running sooner before the
directive is processed by the default processor.
2017-02-13 09:23:58 -08:00
Ryan Nowak
af5648c1f7
Merge branch 'rel/1.1.2' into dev
2017-02-13 08:34:18 -08:00
Ryan Nowak
531c11df2a
Fix 5594 - ExceptionHandled + Result is broken
...
This change ensures that setting ExceptionContext.Result will always
execute if set. The problem with 1.1.0 is that when we had a real short
circuit the wrong set of conditions were checked. I suspect that when you
set ExceptionFilter.Result and didn't short circuit that result filters
were also running (which is a bug).
Added a few tests that verify that the result doesn't trigger result
filters.
I did some general cleanup on this code path to make the state transitions
more clear.
No exception was thrown -> BeginResult
Exception was handled -> ExceptionHandled
Exception was not handled -> gets rethrown
2017-02-13 07:58:32 -08:00
Doug Bunting
a5c7a7e491
Bring tests from fa710e6 (rel/1.0.3) into dev
...
- relates to #5595 which was a 1.0.x-only problem
2017-02-11 13:48:21 -08:00
Doug Bunting
fc40985412
Merge branch 'rel/1.1.2' into dev
2017-02-10 14:55:32 -08:00
Doug Bunting
8ee3d45ef1
Do not cache expressions containing method calls
...
- #5655
- also make `ExpressionTextCache` more robust for defence-in-depth
nits:
- two `null` expression nodes are equal
- declare data properties as `TheoryData<T>`
2017-02-10 14:50:09 -08:00
Kiran Challa
842d661ac2
[ Fixes #5698 ] Regression in 1.1 model binding for model types without default constructor
...
- Also reverts "Check for default constructor in ComplexTypeModelBinderProvider" commit d09e921c4a .
2017-02-10 11:10:02 -08:00
Pranav K
bc3a741eee
Use DocumentClassifierPassBase
...
Workaround issue with the model directive disappearing
2017-02-09 20:30:31 -08:00
Ryan Brandenburg
bd9e431873
Order IgnoreAntiforgeryTokenAttribute and add test ( #5765 )
2017-02-08 09:37:43 -08:00
Pranav K
f474d8bc52
React to optional Razor directive token feature
2017-02-07 21:58:31 -08:00
Ryan Nowak
314aa366e1
Add TempData property support for Pages
2017-02-07 15:27:02 -08:00
Pranav K
2ff80ffb49
Porting DefaultPageHandlerMethodSelector and ExecutorFactory
2017-02-07 12:44:27 -08:00
Pranav K
624909763b
Make _PageImports work
...
Add support for generating the Model property
2017-02-07 11:13:15 -08:00
Pranav K
9f3dfd9819
Make RazorPages work E2E
2017-02-06 19:05:31 -08:00
Ajay Bhargav Baaskaran
c349929cc1
Port old Razor tests to new Razor
2017-02-03 17:09:18 -08:00
Pranav K
8d5abd433f
Add support for PageStarts
2017-02-03 15:57:00 -08:00
Kiran Challa
c95c2a5a6d
[ Fixes #5686 ] Extend `ModelMetadata` to reduce ugliness
2017-02-03 11:37:28 -08:00
Ryan Brandenburg
dc0be8d747
SaveTempDataFilter handle write to body
...
(cherry picked from commit 03cdd15e5c )
2017-02-03 10:41:36 -08:00
Ryan Nowak
cf70ed663b
Merge tag 'rel/1.1.1' into dev
2017-02-03 10:31:17 -08:00
Ajay Bhargav Baaskaran
1777f7babd
Enabling Razor Instrumentation
2017-02-01 15:29:09 -08:00
Ryan Nowak
4c62eb89af
Unit tests for VCTH and model directive
2017-01-31 13:14:20 -08:00
Ryan Nowak
3ade209bf0
Delete using chunk tests
...
This feature is implemented by Razor and already has tests there.
2017-01-31 12:42:57 -08:00
Ryan Nowak
6c55754823
Fix failing linemappings tests
...
Need to use a consistent newline, since these fail on xplat.
2017-01-31 12:41:54 -08:00
Ryan Nowak
705369ee51
Add unit tests for ModelExpressionPass
...
Add unit tests for @inject
2017-01-30 19:08:39 -08:00
Ryan Nowak
b79f8384b0
Make some methods public for ViewCompilation.
2017-01-30 13:46:27 -08:00
Ryan Nowak
84d2e027f5
Use new Razor in MVC
2017-01-30 10:55:49 -08:00
Jass Bagga
7449ffad74
Add include and exclude attributes to EnvironmentTagHelper
...
Addresses #5671
2017-01-27 14:46:53 -08:00
Joonas Westlin
d44c9aee1e
Added printing of route values when a route is not matched
2017-01-27 11:31:05 -08:00
Kiran Challa
17dc23a024
[ Fixes #5637 ] Make CookieName of CookieTempDataProvider configurable
2017-01-27 11:01:26 -08:00
Ryan Brandenburg
03cdd15e5c
SaveTempDataFilter handle write to body
2017-01-27 10:54:00 -08:00
Pranav K
3e214e2399
Introducing IPageModelActivatorProvider
...
Fixes #5480
2017-01-26 11:31:14 -08:00
Doug Bunting
cc584ada39
Remove extra lines in 1840d68
2017-01-26 08:20:52 -08:00
Andrei Ignat
1840d6823b
Addresses #5694 ( #5695 )
...
* Add "
`Microsoft.AspNetCore.StaticFiles": "1.2.0-*"`
to project,json
Add
`app.UseStaticFiles();`
in the
`public void Configure(IApplicationBuilder app)`
from `Startup` class.
Addresses #5694
2017-01-26 08:18:19 -08:00
Jass Bagga
9b1271ba19
Remove obsolete DefaultHtmlGenerator ctor ( #5711 )
2017-01-25 16:25:12 -08:00
Kiran Challa
42ae78a360
[ Fixes #5012 ] ProducesAttribute should not inherit from ResultFilterAttribute
2017-01-25 14:00:35 -08:00
Kiran Challa
8ac6b6699f
[ Fixes #4945 ] Simple string returned by controller action is not a valid JSON!
2017-01-25 13:29:18 -08:00
Ryan Nowak
5885feb7c0
Fixes a parsing bug with the AcceptHeaderParser
...
When we find an invalid character at the end of a media type value we
should advance and skip over it.
2017-01-23 13:12:40 -08:00
Ryan Brandenburg
305748a800
Move classes out of .Internal
2017-01-19 11:11:28 -08:00
Ryan Brandenburg
6396e14504
Add null-check back to MediaType
2017-01-18 16:56:08 -08:00
Pranav K
24efd4268b
Pin the version of RazorTooling packages to 1.1.0-preview4-final
2017-01-17 11:55:15 -08:00
Pranav K
e749a80b30
Check for empty location in ViewsFeatureProvider
...
Fixes #5675
2017-01-17 11:07:48 -08:00
Doug Bunting
ce53675b87
Add `[ValidateNever]` and `IPropertyValidationFilter`
...
- #5642
- lazy-load `ValidationEntry.Model`
- avoids `Exception`s when moving to a property that will not be validated
nits:
- remove duplicate code in `ValidationVisitor`
- clarify "all properties of" doc comments
- also add missing `<param>` doc in `ViewDataInfo`
2017-01-15 21:40:29 -08:00
Jass Bagga
07c22f2b29
Mutate API description parameter type from JsonPatchDocument to Operation[]
...
Addresses #5464
2017-01-13 16:39:08 -08:00
Jass Bagga
f95d49c870
Change datetime to datetime-local
...
Addresses #4871
2017-01-13 15:40:30 -08:00
Ryan Brandenburg
93774a0234
Mitigate MediaType overflow
2017-01-13 12:51:19 -08:00
Pranav K
a7abdeabcd
Introducing PageActionInvoker
2017-01-13 11:49:02 -08:00
Pranav K
6b0282fa84
Commonize code from ControllerActionInvokerCache and PageFilterFactoryProvider
2017-01-11 10:53:23 -08:00
Kiran Challa
de0f277892
Fix attribute routing error message related to replace tokens
2017-01-04 15:43:57 -08:00
Pranav K
78492b39d8
Introduce a base type for executing auth and resource filters.
2017-01-03 11:14:15 -08:00
Pranav K
2b8233932a
Add IPageFactory and IPageActivator
2016-12-29 15:11:29 -08:00
Jass Bagga
9146fce4ec
Add extension method for IParameterModelConvention. ( #5640 )
2016-12-27 16:49:12 -08:00
Pranav K
a42006d295
Workarond type collision
...
Fixes compilation error "The type 'XmlNode' exists in both 'System.Xml.ReaderWriter, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' and 'System.Xml.XmlDocument, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'"
2016-12-21 16:47:14 -08:00
Pranav K
2b50ec99df
Updating to 4.4 CoreFx packages
2016-12-21 16:47:14 -08:00
Ryan Brandenburg
b2340d327e
Order IgnoreAntiforgeryTokenAttribute and add test
2016-12-12 14:55:36 -08:00
Pranav K
cfa9631ce8
Resolve path traversals in RazorViewEngine
...
This change moves the onus of path resolution from individual IFileProvider instances to RazorViewEngine.
Fixes #5574
Fixes https://github.com/aspnet/MvcPrecompilation/issues/33
2016-12-08 11:20:06 -08:00
Joonas Westlin
1dd1d49321
Redirects with fragment ( #5519 )
...
- Added implementation of overloads where you can specify the fragment to redirect to.
- Added unit tests
- Added XML comments, including missing documentation of existing members
2016-12-06 10:32:01 -08:00
Doug Bunting
48546dbb28
Add more to `MvcCoreServiceCollectionExtensionsTest`
...
- 2nd half of #5554
- follow-on to #5540 PR
2016-12-05 20:05:24 -08:00
Ryan Brandenburg
8f8bf5af34
Seperate view and model for enum display
2016-11-30 11:13:38 -08:00
Pranav K
52ee9afc31
Adding PageActionDescriptorProvider
...
Fixes #5353
2016-11-23 16:53:06 -08:00
Pranav K
5b2a4aecb6
Make Microsoft.AspNetCore.Mvc.TestCommon a regular project
...
* This allows specifying all it's dependencies rather than for consuming projects to do this
* Remove unused APIs
* Fix weird downgrade warnings that show up due to P2P references
2016-11-23 16:23:56 -08:00
Steve Smith
34dd9472ba
Comment typo ( #5557 )
2016-11-22 13:55:24 -08:00
Pranav K
296b12abc3
Pinning missed tools and dependencies
2016-11-18 12:41:45 -08:00
Pranav K
74c9194aee
Pinning versions for 1.1.0 release
2016-11-18 12:12:52 -08:00
Pranav K
3b4d8e2e3d
Fix downgrade warnings during restore
2016-11-17 10:50:47 -08:00
Pranav K
975dc212b7
Fix package versions
2016-11-17 10:19:48 -08:00
Pranav K
c5a5ba1fee
Add support for updateable ActionDescriptorCollection
...
Fixes #5350
2016-11-17 10:08:38 -08:00
Pranav K
177fb2a6b1
Temporarily disable running tests on Microsoft.AspNetCore.RazorPages.Test
2016-11-17 10:08:38 -08:00
Pranav K
29cd24f66b
Add Microsoft.AspNetCore.Mvc.RazorPages projects
2016-11-17 10:08:38 -08:00
Pranav K
1506a44cd5
Fix downgrade warnings
2016-11-10 09:22:11 -08:00
Pranav K
b82969a557
Updating versions to 1.2.0-*
2016-11-09 14:18:46 -08:00
Doug Bunting
6d4361218e
Add builder extensions to simplify use of `CookieTempDataProvider`
...
- #5515
2016-11-08 15:32:09 -08:00
Jass Bagga
576c0e6a65
Throw an exception if configurationType to CreateConfigureDelegate is abstract/has no parameterless ctor
...
Addresses #5431
2016-11-08 14:16:03 -08:00
Kiran Challa
07a2f1de06
Fixes CookieTempDataProvider to set the secure attribute of a cookie only if a request is secure
2016-11-08 13:30:28 -08:00
Kiran Challa
a3c06b00cc
Fixes CookieTempDataProvider to handle empty request PathBase while setting cookie options
2016-11-08 13:30:27 -08:00
Marcus Schweda
24d5dfb552
Dynamic assembly checks to prevent NotSupprotedExceptions from System.Reflection.Emit
...
Fixes #5487
2016-11-07 12:49:49 -08:00
Jass Bagga
9caa688a30
Modified exception message for duplicate keys exception in CandidateResolver
...
Addresses #5289
2016-11-07 11:16:11 -08:00
Jass Bagga
304000095a
Added logging for precompiled views in RazorViewEngine
...
Addresses #5462
2016-11-07 10:46:54 -08:00
Hugh Bellamy
1dc4b28bbe
Add AcceptedAtActionResult tests
2016-11-07 09:53:19 -08:00
Kiran Challa
0cee00aae1
[ Fixes #5352 ] When replacing Controller.Dispose with an explicit implementation the base Dispose is an action
2016-11-04 09:34:30 -07:00
Ajay Bhargav Baaskaran
7985121bab
[ Fixes #5207 ] Support IsIndexer for ViewComponent tag helpers
2016-11-03 16:50:22 -07:00
Kiran Challa
047def1aaf
Added/Updated JsonPatchExtensionsTest
2016-11-03 14:49:48 -07:00
Doug Bunting
f04286562e
Treat `ContentType==null` and `MediaType.GetEncoding(ContentType)==null` differently
...
- now, if client sends e.g. `Content-type: text/json;charset=[invalid]`, service will respond with HTTP/415
- if client sends `Content-type: text/json`, service will still try UTF-8 (or updated default encoding)
- intentional (and slight) behaviour change from 1ac7315
- include and a few new tests and some cleanup from same commit
2016-11-03 10:51:39 -07:00
Doug Bunting
116c927e61
Revert "Do not call `Encoding.GetEncoding()` with a string from the request"
...
- #5351 should be Won't Fix
This reverts commit 1ac731519a .
2016-11-03 10:51:39 -07:00
Pranav K
8ad7c19379
Remove references to Iddentity
2016-11-03 10:42:20 -07:00
Ryan Brandenburg
01b237dda9
Antiforgery goes at the end of filters
2016-11-02 16:50:27 -07:00
Kiran Challa
82b2e9c75c
Added functional tests for Antiforgery related to setting no-cache headers
2016-11-02 16:29:34 -07:00
Ajay Bhargav Baaskaran
c28ad48e98
[ Fixes #5216 ] Make generic parameters work with ViewComponent tag helpers
2016-11-02 15:55:23 -07:00
Kiran Challa
32710bbfbe
[ #5430 ] CookieTempDataProvider chunking broken
2016-11-01 16:13:27 -07:00
Jass Bagga
5d5b282dbd
Moved CaseSensitiveTagHelperAttributeComparer to Razor.TagHelpers.Testing.Sources
...
Addresses #5323
2016-11-01 14:51:37 -07:00
Pranav K
dd29d562b8
Adding functional test to verify error page middleware includes raw compilation content.
2016-10-31 10:28:04 -07:00
Doug Bunting
ada42ea913
Move value source information from `<remarks>` to `<summary>`
...
- #1999
- may have reordered the precedence comments as I double-checked the implementations
- `CheckBox()` and `RadioButton()` were examples of such updates
nits:
- use SSL in documentation links
- simplify mentions of format strings
- remove a few phrases that didn't say much and duplicated `<remarks>`
2016-10-28 16:43:59 -07:00
Jass Bagga
0eea3c2651
Log messages added to BodyModelBinder for input formatters ( #5451 )
...
Addresses #5367
2016-10-27 09:43:53 -07:00
Doug Bunting
1ac731519a
Do not call `Encoding.GetEncoding()` with a string from the request
...
- #5351
- fix affects only `TextInputFormatter`
- `TextOutputFormatter` already does the Right Thing™️ with `Accept-Charset` headers
- `ResponseContentTypeHelper` uses `Encoding.GetEncoding()` but is not passed request data
2016-10-24 14:59:49 -07:00
Ryan Brandenburg
60c59b576e
Replace HashSet with a Hybrid HashSet/List
...
to improve performance on less nested models
2016-10-24 14:47:49 -07:00
Doug Bunting
3fdcaecaa8
Correctly handle quoted media type parameter values
...
- #5349
- fix or add comments about other parsing errors and inconsistencies
- `MediaType` did not skip whitespace before the type
nits:
- use `+=`
- `<code>` -> `<c>` since the former is not for use within a paragraph
- split tests up to remove `bool expectedResult` parameters
2016-10-24 13:16:09 -07:00
Ajay Bhargav Baaskaran
5b9c01e54d
Added a functional test for ViewComponent tag helpers
...
- Added Copyright ViewComponent tag helper
- Added Dan ViewComponent tag helper
2016-10-21 16:17:13 -07:00
Jass Bagga
f629f9a659
Check for null arguments in GetArgumentDictionary
...
Addresses #5423
2016-10-20 13:40:39 -07:00
Jass Bagga
79e576b86c
ProducesResponseTypeAttribute(int statusCode) ctor added
...
Addresses #4863
2016-10-19 17:08:06 -07:00
jacalvar
d5b0ebd10c
Merge branch 'rel/1.1.0-preview1' into dev
2016-10-18 14:26:12 -07:00
jacalvar
9579806306
[ Fixes #5150 ] parsing issue on asp.net when request quality factor is specified
2016-10-18 12:52:53 -07:00
joheredi
38aa48651f
Fix for Issue#5150
2016-10-18 12:52:30 -07:00
John Luo
d8c6c4ab34
Add support for VaryByQueryKey #2894
2016-10-18 12:31:04 -07:00
Ajay Bhargav Baaskaran
3004fb822b
Merge branch 'rel/1.1.0-preview1' into dev
2016-10-18 12:02:42 -07:00
Ajay Bhargav Baaskaran
61de7fec6f
[ Fixes #5421 ] Visit children when accepting TagHelperChunk
...
- Fixes ViewComponentTagHelpers in nested scenarios
2016-10-18 12:00:07 -07:00
Jaspreet Bagga
c2fee4d74d
AcceptedResult(), AcceptedAtActionResult(), AcceptedAtRouteResult() support
...
Addresses #4937
2016-10-18 09:48:26 -07:00
Jaspreet Bagga
e7c992ff06
Added fragment to FormActionTagHelper and FormActionTagHelper
...
Addresses #4917
2016-10-18 09:46:50 -07:00
Doug Bunting
eea297975d
Reduce `HtmlContentBuilder` allocations
...
- #3918
- lazy-load `TagBuilder.InnerHtml`; add `HasInnerHtml` property for conservative use
- depends on aspnet/HtmlAbstractions@0781b5a (adds `HtmlContentBuilder.Count`)
- don't use a `HtmlContentBuilder` at all in `DefaultHtmlGenerator.GenerateValidationSummary()`
- avoid instantiating `HtmlContentBuilder` when short-circuits make it unnecessary
- provide correct `HtmlContentBuilder` capacity where known
2016-10-17 14:38:30 -07:00
Pranav K
a52d692de0
Updating to netcoreapp1.1
2016-10-13 11:21:09 -07:00
Pranav K
ed1378a365
Revert "Updating to netcoreapp1.1"
...
This reverts commit 398a104810 .
2016-10-12 16:09:12 -07:00
Pranav K
398a104810
Updating to netcoreapp1.1
2016-10-12 14:24:52 -07:00
Kiran Challa
d09e921c4a
Check for default constructor in ComplexTypeModelBinderProvider
2016-10-07 16:46:13 -07:00
Kiran Challa
e7fe635dab
Modified FormCollectionModelBinderProvider to throw when binding for FormCollection model type.
...
[Fixes #4895 ] No parameterless Constructor defined
2016-10-07 16:46:11 -07:00
Ajay Bhargav Baaskaran
e987e2107f
[ Fixes #5379 ] Dont generate TagHelperDescriptors for ViewComponents with generic parameters
2016-10-07 12:26:53 -07:00
Yves57
ed3b750ad2
Less allocations in ViewBuffer when there is only one ViewBufferPage
2016-10-07 11:25:30 -07:00
Kiran Challa
80da4611d9
Updated JsonPatchExtensionsTest exception message (Reacting to JsonPatch repo commit: 393c25988a)
2016-10-07 05:40:52 -07:00
jbagga
41f00eea23
Default Status Code for void types changed to 200
...
Fixes #4838
2016-10-06 14:39:04 -07:00
Kiran Challa
de7cea4000
Getting RouteDataRequestCultureProvider from Microsoft.AspNetCore.Localization.Routing package
2016-10-04 12:39:57 -07:00
Doug Bunting
4e6fd823cf
Fix bounds checking in `PagedCharBuffer` and related code
...
- #5347
- inconsistent bounds checking caused problems after `ArrayPool<char>` fell back to `new char[2048]`
- would fail a `Debug` assertion in Debug builds and loop endlessly in Release builds
- change to `CacheTagHelper+CharBufferHtmlContent` is for correctness only
- always uses a `CharArrayBufferSource` and that returns arrays of the exact size requested
2016-10-04 10:19:44 -07:00
Pranav K
7481151086
Revert skipped StackTrace test
2016-10-04 10:12:22 -07:00
Pranav K
6fe683c585
Add Microsoft.DotNet.InternalAbstractions to fix tests
2016-10-04 10:11:09 -07:00
Pranav K
6d235e4ef5
Update partner package versions
2016-10-03 14:27:20 -07:00
Pranav K
da3a457fc5
Temporarily skip test to workaround CoreCLR failure
2016-10-03 14:27:20 -07:00
Kiran Challa
89bd6dc1cd
[ Fixes #5212 ] Added a cookie based ITempDataProvider
2016-10-03 14:04:57 -07:00
Doug Bunting
4cca6b09f0
Reduce allocations during HTML generation
...
- #3918
- precompute size of `StringBuilder` in `ExpressionHelper`
- reduce `string` allocations in `ViewDataEvaluator`
- also get rid of `Enumeration` state machines
- reduce the size of a few objects; use more expression-valued properties
- e.g. don't store `_modelType` in `ModelExplorer`
- add `EmptyArray<TElement>`; make empty arrays consistently `static`
- avoid `string.Split()` in HTML and tag helpers
nits:
- make `ExpressionHelperTest` tests more stringent
- correct `Message` for an `ArgumentNullException`
- remove excess `using`s in classes I touched (but often ended up leaving otherwise unchanged)
- improve doc comments
- remove `ToString()` call on a `string`
- avoid encoding `string.Empty`
- fix test file name
- remove useless variables
- correct spelling
- improve whitespace
2016-10-03 12:17:47 -07:00
Ryan Brandenburg
261f73abc7
Add NonViewComponentAttribute
2016-09-30 10:56:08 -07:00
cjrosa
60d600dd5c
Issue #5310 ( #5334 )
...
* Issue #5310
2016-09-30 09:40:53 -07:00
Doug Bunting
0a4c06eefb
Suppress validation summary `<div>` when nothing is generated
...
- #2372
- make the `ValidationSummaryTagHelper` behave consistently with `Html.ValidationSummar()`
2016-09-27 15:51:51 -07:00
Ryan Brandenburg
6cdd0451da
DisplayMetadata use DisplayNameAttribute
2016-09-27 15:24:21 -07:00
Doug Bunting
f222fa4349
Correct examination of `IHtmlHelper.Label()` return value
...
- #5317
- previously worked only because `TagBuilder` cannot be empty and `HtmlString` overrides `ToString()`
- `TagBuilder.ToString()` (now the type's `FullName`) is also never empty
- copy `NullHtmlEncoder` from Razor and give it a better name (`PassThroughHtmlEncoder`)
- not available in this project and (from its namespace) not intended for general use
2016-09-27 10:00:29 -07:00
Doug Bunting
27e4822a7b
Preserve `class` casing when merging a `TagBuilder` into a `TagHelperOutput`
...
- #5313
Also:
- preserve existing `TagHelperAttribute.ValueStyle`
- fix this in `UrlResolutionTagHelper`, `LinkTagHelper`, and `ScriptTagHelper` as well
- correct handling of non-`string` `classAttribute.Value`s in `TagHelperOutputExtensions`
- relates to #3918 because new `ClassAttributeHtmlContent` is smaller than any concatenated attribute value
nit: clean up `CacheTagHelper` whitespace and `using`s
2016-09-26 15:56:30 -07:00
Ryan Brandenburg
03b3d6bec8
Use DataAnnotationLocalizerProvider for Display localization
2016-09-23 10:05:42 -07:00
Doug Bunting
9c6c8410e2
Get rid of some duplicate test data
...
- remove a few warnings from output when testing in VS
2016-09-21 14:52:52 -07:00
Steve Smith
3866ee72e0
Fixing typos Dowload -> Download
2016-09-20 15:55:19 -07:00
Kiran Challa
01f7ecd9d9
[ Fixes #5154 ] Stream should be suppressed from model metadata validation
2016-09-19 11:10:03 -07:00
Ajay Bhargav Baaskaran
b3fe8b30ac
Moved VCTHDFactory to .Internal namespace
2016-09-16 15:50:44 -07:00
Ajay Bhargav Baaskaran
0cfd5363f8
Added ViewComponentTagHelperDescriptorResolver and related stuff
2016-09-15 17:12:43 -07:00
Pranav K
760c8f3867
Ensure Append writes to the right page after Clear
2016-09-14 18:57:21 -07:00