Commit Graph

1451 Commits

Author SHA1 Message Date
N. Taylor Mullen c1a026cbf7 Update .kproj => .xproj. 2015-03-11 14:01:43 -07:00
Kirthi Krishnamraju 7b18d1d3f1 Clear ModelState errors of model before TryValidateModel or TryUpdateModel 2015-03-11 10:14:28 -07:00
Doug Bunting e9f56055eb Need `[NotNull]` for all `TextWriter parameters in `RazorPage`
- #2102
- `PositionTagged<string>` and `RenderAsyncDelegate` parameters too
- and a few `string` parameters dereferenced or used as `Dictionary` keys
2015-03-10 23:26:41 -07:00
Doug Bunting cc7b319cb7 Remove use of `ServiceDescriber` in MVC and cleanup related hacks
- see issues aspnet/DependencyInjection#193 and #1612
- use `TryAdd()` in `MvcServices` for the `IAssemblyProvider`

Move `ApplicationBasePath` handling into `RazorPreCompileModule`
- restores view precompilation in functional tests of sample sites
- if we need this, others will as well
- override `IApplicationEnvironment` but get folder from `ProjectContext`
 - also remove remaining `IServiceProvider` implementations in this code

test fixes:
- simplify `IApplicationEnvironment` override
- move override logic into `TestHelper.CreateServer()` methods
- remove `LoggerFactory` setup
 - does not seem to require special-casing
- remove unused `ITestConfigurationProvider` / `TestConfigurationProvider`
- remove `TestAssemblyProvider` classes
 - no longer required
- remove `ReplaceCallContextServiceLocationService` test helper
 - change MVC sample to fully-qualify config.json path
  - avoids `ReplaceCallContextServiceLocationService` need in `MvcSampleTests`
 - no longer required for other tests

nit: remove unused `_serviceProvider` and constructor overload in `RazorPreCompiler`
2015-03-10 22:25:42 -07:00
Ajay Bhargav Baaskaran db728cd386 Introducing TempData
- Issue #455
 - Updated MVC sample
 - Added relevant tests
2015-03-10 12:04:05 -07:00
Praburaj 4e9e33fc07 Renaming Nuget.org feed key name to Nuget.
fixes https://github.com/aspnet/Universe/issues/174
2015-03-10 11:37:28 -07:00
Doug Bunting e7ee4278a5 Correct case of web site folder and project names
- work around aspnet/DNX#1361 and inconsistent dev boxes (from previous fix attempts)
 - had inconsistent case in test/WebSites and test/WebSites/ConnegWebSite
- ConnegWebsite -> ContentNegotiationWebSite
- RazorInstrumentationWebsite -> RazorPageExecutionInstrumentationWebSite
- RazorViewEngineOptionsWebsite -> RazorEmbeddedViewsWebSite

nits:
- sort dependencies in functional test project.json
- correct a few readme.md files
2015-03-10 09:34:06 -07:00
Doug Bunting a4e01bfe35 Correct setup of three tests added in prior commit
- compiler given `ApplicationName`, not `ApplicationBasePath`
- @pranavkm wrote the tests prior to 64ddbe0160

nit: rewrap long line introduced in prior commit
2015-03-10 09:28:17 -07:00
Pranav K 717c2bfd39 * Redesign CompilationResult so that it does not throw when CompiledType is
accessed.
* Update to use ICompilationException interface from
  Microsoft.Framework.Runtime
* Update to use RoslynCompilationException

Fixes #955
2015-03-09 14:39:10 -07:00
N. Taylor Mullen 1d578ca2fd Remove BOM from project.json, *.cmd, *.sh and *.shade files. 2015-03-09 12:56:42 -07:00
N. Taylor Mullen 35fc8279dd Updated missed dnx name changes. 2015-03-09 02:17:58 -07:00
N. Taylor Mullen 39db3ffc2b Update build.sh to use dnvm correctly. 2015-03-08 12:52:51 -07:00
N. Taylor Mullen 2f5cc19e2d Update kvm/KVM/Kvm => dnvm/DNVM/Dnvm. 2015-03-08 12:52:50 -07:00
N. Taylor Mullen 9f3955ee55 Update K_BUILD_VERSION/kre/KRE/.k => DNX_BUILD_VERSION/dnx/DNX/.dnx. 2015-03-08 12:52:38 -07:00
N. Taylor Mullen e829ba7646 Update aspnet50/aspnetcore50 => dnx451/dnxcore50. 2015-03-08 12:52:24 -07:00
Praburaj c483b846e4 Fixing the test to expect characters produced by new IHtmlEncoder
Diagnostics packages are now using the new IHtmlEncoder.
2015-03-06 14:35:47 -08:00
ianhong 1144ba72d5 Porting HttpUnauthorizedResult 2015-03-06 10:18:51 -08:00
damianedwards 7c18e666a3 Added FormTagHelperOptions for configuring default behavior of FormTagHelper:
- #1689
2015-03-05 20:12:36 -08:00
Praburaj a9feed4de1 Rename Microsoft.AspNet.Http.Interfaces => Microsoft.AspNet.Http 2015-03-05 16:25:15 -08:00
Ryan Nowak f8453d1a9a Fix docs errors 2015-03-05 14:57:37 -08:00
Ryan Nowak 4a5c5e59a2 Fix build break 2015-03-05 14:18:58 -08:00
Ryan Nowak 15bb080b7d Remove commented out legacy tests
Reviewed with @HarshGMSFT - we don't think there's anything here that
isn't already covered elsewhere.
2015-03-05 14:13:23 -08:00
Ryan Nowak df358f8b98 fix build break in razor tests and tests for resources 2015-03-05 13:54:24 -08:00
Ryan Nowak 90cef3b9ca Refactor of the model metadata provider
Separates the MMP into two phases:
1). Creation of the ModelMetadata, discovery of properties and attributes
(reflection) is part of the MMP
2). Lookup of details based on attributes is now part of another phase,
and has its results cached.

Users can now implements and register an IFooMetadataProvider to customize
a single aspect of metadata (see how data annotations does it).
2015-03-05 13:19:10 -08:00
Hao Kung ccb9f70545 Go back to LoggerFactory temporarily
- needed to unblock Hosting PR:
https://github.com/aspnet/Hosting/pull/146
- Service fallback currently is broken with generic services (ILogger<>
no worky)

Hosting issue tracking: https://github.com/aspnet/Hosting/issues/180
2015-03-05 12:28:30 -08:00
sornaks eeabe27606 Including Mvc.js script which enables Mvc.stringify(data) used in JQuery.Post() to send data understandable by MVC.
Adding Bower and Grunt components to pull JQuery from an appropriate source. Addressing PR Comments.
2015-03-05 08:07:01 -08:00
Brennan f4ea1b82fa Logging API changes 2015-03-04 21:07:45 -08:00
Hao Kung c290e897b0 React to DI 2015-03-04 19:26:54 -08:00
sornaks b581ff343c Making RazorPage.Write() handle TagHelperContent. 2015-03-04 18:26:20 -08:00
sornaks 284eb9ac6a Reacting to Razor changes - TagHelperOutput is writing to TextWriter instead of string. 2015-03-04 12:56:58 -08:00
Ajay Bhargav Baaskaran 81c3b75980 Replaced WebUtility.HtmlEnode with IHtmlEncoder.HtmlEncode 2015-03-03 13:57:36 -08:00
N. Taylor Mullen e4b1242328 Update missed GlobalImport naming bits in MvcRazorParser.
- These names used to be ViewStart based but were changed (for directive inheritance) to come from GlobalImport.
2015-03-02 21:56:16 -08:00
N. Taylor Mullen bc0ac4d0ea React to aspnet/Razor#309.
- Type and property names changed for a core type that we override, AddOrRemoveTagHelperSpanVisitor => TagHelperDirectiveSpanVisitor.
2015-03-02 21:51:20 -08:00
Hao Kung 46aaf790c4 React to AuthN changes 2015-03-02 16:14:38 -08:00
Doug Bunting ae4cafc002 Correct evaluation of expression result in `GenerateSelect()`
- #1468
- Always use `ModelExplorer` in `<select/>`, `DropDownListFor()` and `ListBoxFor()` cases
 - allows evaluation of more-complex expressions
- Use `ViewData.Model` in `DropDownList()` and `ListBox()` template cases
 - `ViewData` was previously ignored in these cases

nit: change `ViewDataDictionary.Eval()` to return `Model` if `expression` is `null` or empty
- now `throw` on `null` or empty `expression` name in `ViewDataEvaluator.Eval()`
- simplifies some of the higher-level code
 - no change to `selectList` fallback; `Model` incorrect for that case
 - no change to `GenerateRadioButton()`; would change behaviour unrelated to #1468
  - this helper uses incorrect `ViewData` lookup text, see #1487
2015-03-02 12:07:43 -08:00
Praburaj e447546e4e Reacting to hosting API changes 2015-03-02 12:03:01 -08:00
Doug Bunting 28561e9924 Follow up to `ModelExplorer` creation
- see commit 9d5364c
- never correct to pass a `Func<object>` to `GetExplorerForExpression()`
- `<label/>` tests succeeded because that tag helper doesn't use expression result
- `<select/>` tests succeeded because that tag helper gets result from `ViewData`
 - does not use `ModelExplorer` due to #1468

nit: update variable names `metadata` -> `modelExplorer`
2015-03-01 09:39:36 -08:00
Praburaj 698af6d1d3 Reacting to hosting API changes 2015-02-27 16:18:05 -08:00
damianedwards 72533d66df Update functional test:
- #1577
2015-02-27 10:44:35 -08:00
damianedwards 8b64e3c7bb Add support for globbing to ScriptTagHelper:
- Fixes #1577
2015-02-27 10:37:36 -08:00
damianedwards 6490b113d8 Make LinkTagHelper JS down-level browser safe:
- #2088
2015-02-27 10:20:29 -08:00
Wei Wang 64ddbe0160 React to runtime perf changes in functional tests 2015-02-27 02:53:46 -08:00
Wei Wang 69294f06d6 React to runtime perf changes 2015-02-27 00:27:29 -08:00
Pranav K ed3f5118e3 Reacting to NullLoggerFactory removal 2015-02-26 17:52:50 -08:00
Pranav K 73f44889f2 ViewLocationExpanderContext should have a flag that indicates if the
lookup is for a full or partial view

Fixes #1212
2015-02-26 16:41:54 -08:00
Levi B b821b706b7 React to DataProtection rename 2015-02-25 17:31:02 -08:00
Levi B e8e2fbbdeb Reference WebEncoders package 2015-02-25 16:04:36 -08:00
Ajay Bhargav Baaskaran 9f9dcbe6ec Additional functional tests for ElementalValueProvider 2015-02-25 10:22:43 -08:00
damianedwards e282d2a861 Ensure results of GlobbingUrlBuilder are sorted:
- #2062
2015-02-24 15:07:36 -08:00
Brennan 9b69e6f234 LogFormatter API change 2015-02-24 13:41:30 -08:00