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
Ryan Nowak
ecbc179d76
Fix stylecop in Microsoft.AspNet.Mvc
2014-06-04 20:06:42 -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
harshgMSFT
483e9038b4
Supporting Urls With ~/ while redirecting.
...
Fix for Issue#304
2014-06-03 11:29:27 -07:00
Tian Pan
a6d89c4482
Copy CodePlex #1836 and #1878 fixes over ( Fix #296 ).
...
This change enables user to specify the tag for the wrapping HTML element
generated from ValidationSummary() and ValidationMessage[For]().
Clean up HtmlHelperValidationExtensions.
2014-06-03 00:18:47 -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
a5a9c03d0a
Fixing file name in kproj
2014-06-02 15:02:14 -07:00
Pranav K
19ab3a4fc6
* Moving Utf8EncodingWithoutBOM to a shared type
2014-06-02 11:09:55 -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
harshgMSFT
e9a31773a9
Fix for Issue #579
2014-05-29 16:34:18 -07:00
David Fowler
812d5328d2
React to aspnet/KRuntime#65
2014-05-28 02:00:03 -07:00
Pranav K
d8ba998dec
Change IValueProviderFactory.GetValueProvider to be synchronous.
2014-05-27 14:08:13 -07:00
Tian Pan
ec8d09dd65
Missing virtual keywords on ExceptionFilterAttribute's OnException & OnExceptionAsync methods #552 .
2014-05-27 11:40:35 -07:00
David Fowler
7388dece9f
Fixed project.json casing
2014-05-26 02:50:43 -07:00
N. Taylor Mullen
a51ae39693
Adjust context property on RazorView.
...
Context is now HttpContext which pulls from ViewContext which is now a member.
#377
2014-05-23 15:45:25 -07:00
Pranav K
a834928f1a
Change IsValid method in ModelStateDictionary to GetValidationState
...
Fixes #400
2014-05-21 19:33:36 -07:00
Pranav K
1adcf14b3d
Renaming Common to Microsoft.AspNet.Mvc.Common
2014-05-21 19:16:45 -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
dougbu
575daeb0d6
Use `+` rather than explicit `PathString.Add()` overloads
2014-05-11 22:44:34 -07:00
dougbu
37b2bf4997
Fix #522 , [MusicStore]: Html.BeginForm() while generating the action url
...
should consider the application base path
- `request.BasePath` was indeed ignored
- also simplify `formAction` calculation using the higher-level
`PathString.Add()` overloads
2014-05-11 22:31:28 -07:00
Yishai Galatzer
db3cdfb97a
Remove content (and versions from AssemblyInfo)
2014-05-11 08:42:32 -07:00
Yishai Galatzer
ece20cacce
Fix #339 , optional parameter detection was broken
2014-05-10 23:41:58 -07:00
Ryan Nowak
b9dbb6fe57
Fixing action selection with complex types - MVC scenarios with more than one parameter are broken right now
2014-05-09 18:08:54 -07:00
Ryan Nowak
88be38a506
Fix for issue #339
2014-05-09 16:54:10 -07:00
N. Taylor Mullen
9eaa62125f
Trim Razor.Host dependencies.
...
Several dependencies were added to the Razor.Host project that weren't needed. Removed them in order to reduce the dependency chain for tooling.
2014-05-09 11:36:09 -07:00
dougbu
dd4fa762d5
Change `BeginForm()` to add query string when called without parameters
...
- use the request's Path and QueryString rather than default Action() return
value
- actual special case detects all parameter values match the defaults
- this slightly expands the scenarios where the query string is added but
removes an odd inconsistency between `html.BeginForm()` and (say)
`html.BeginForm(FormMethod.Post)`
Fixes #278
2014-05-09 10:35:36 -07:00
Andrew Peters
f13865dedc
Updating copyright headers
2014-05-08 23:01:20 -07:00
Yishai Galatzer
55f4dc4f53
Remove the area routes
...
Add id? to the routes
2014-05-08 15:45:10 -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
Wei Wang
bc9cc68bf0
Fix position of brace
2014-05-08 10:50:10 -07:00
David Fowler
3b31df3d29
React to renames
2014-05-08 03:24:18 -07:00
David Fowler
6fb34c6ab7
React to renames
2014-05-08 03:06:18 -07:00
David Fowler
c94cfc5b0e
Updated to use the new Roslyn.
2014-05-07 22:53:45 -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
Ryan Nowak
b2c9b3b5d3
Unblocking the CI
...
DataAnnotations used to reference System.Reflection.Compatibility, which
was giving us a reference to some methods "for free". Really we should
have been pulling in this package all along.
2014-05-07 15:58:24 -07:00
lajones
235707ec8a
Microsoft.ComponentModel.DataAnnotations is being renamed to Microsoft.DataAnnotations
2014-05-07 13:35:36 -07:00
sornaks
3b7983181d
WebFX 98 - Adding GetValidationAttributes support
2014-05-07 12:52:48 -07:00
harshgMSFT
bbafa0a29a
Tests for AntiForgery System.
2014-05-07 10:27:01 -07:00
harshgMSFT
b444f66689
Adding ValidateAntiForgeryTokenAttribute also fixing a bug in token deserialization.
2014-05-07 10:01:06 -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
Chris Ross
18d3395a5e
Rename ServiceCollectionExtension class.
2014-05-06 16:21:17 -07:00
Pranav K
076dedcca5
Reacting to package and namespace changes
2014-05-06 14:06:29 -07:00
harshgMSFT
9b79664e2f
Fixing Build break due to namespace move.
2014-05-06 10:04:58 -07:00
Wei Wang
4210211c79
Update dependency namespace
2014-05-05 20:01:04 -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
28fee3470f
Controller base class now implements IActionFilter
2014-05-05 15:47:16 -07:00
Ryan Nowak
ae4e3bc61d
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.
2014-05-05 15:43:29 -07:00
dougbu
67b33868a3
Add `ListBox()` and `ListBoxFor()` helper methods
...
- copy from legacy MVC
- get `ListBox[For]()` methods in correct places and working
- also usual stuff: `var`, `[NotNull]`, remove `IDictionary<,>` overloads
- `ListBoxHelper()` -> `GenerateListBox`
- already had all the bits needed in `GenerateSelect()`
- special-case `null` or empty `name` in GenerateSelect()
- ensure `ArgumentException` has correct parameter name
- lower-level problem affected `CheckBox()` as well
- use `ListBox()` and `ListBoxFor()` in MVC sample
- use `ListBox()` in an editor template
2014-05-05 14:26:06 -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
Ryan Nowak
a9a7663cbd
Update MVC for reflection package changes
2014-05-05 10:38:07 -07:00
Louis DeJardin
bbcac43aaa
Updating DataAnnotations version reference
2014-05-02 20:53:12 -07:00
Ryan Nowak
9c75813c9a
Add reference to claims
...
(cherry picked from commit e1154c7dbfcf6bc91ff266da08b67cbb32b270a8)
2014-05-02 18:46:02 -07:00
N. Taylor Mullen
6dc6ba6d37
Add User helper to controllers and views.
...
#277
2014-05-02 14:48:21 -07:00
dougbu
31cdc09647
Move Microsoft.AspNet.RequestContainer dependency from MVC sample to MVC
...
- 🐛 fix; fixes #346
2014-05-02 14:29:19 -07:00
Hao Kung
1faa6f018b
Switch to use IServiceCollection
2014-05-02 12:22:49 -07:00
N. Taylor Mullen
4494f40d67
Addressed code review comments.
2014-05-02 12:16:28 -07:00
N. Taylor Mullen
3e398be1f8
Require cshtml ending for full path view names.
...
If a view represents a full path and does not end in .cshtml the FindView and FindPartialView methods will throw.
#206
2014-05-02 12:16:24 -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
anpete
71acc74899
Merge branch 'dev' of github.com:aspnet/WebFx into dev
2014-05-01 17:42:48 -07:00
anpete
8208cd6b2f
Update file headers
2014-05-01 17:42:33 -07:00
N. Taylor Mullen
af18392815
Re-updated System.IO.FileSystem version.
2014-05-01 17:11:23 -07:00
N. Taylor Mullen
40bb9d0421
Update FileSystem package version.
2014-05-01 17:01:13 -07:00
Yishai Galatzer
fe8ded0ce6
Fix dev14 crash + temporary? .gitignore
2014-05-01 15:10:48 -07:00
Ryan Nowak
81611f13da
TEMPORARILY turning off warnings as errors to unblock the CI
2014-04-30 21:55:17 -07:00
Ryan Nowak
93897b6055
Fixing a resources file that needs to be regenerated
2014-04-30 19:26:36 -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
harshgMSFT
4541295872
Updating BuilderExtensions to use the new 'Named' MapRoute overload.
2014-04-30 15:44:11 -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
185ad31491
Adding an appropriate sample to use ValidationMessage and ValidationMessageFor.
2014-04-30 11:07:02 -07:00
sornaks
f17d444b8a
Porting the ValidationMessage changes to suit WebFX requirements.
2014-04-30 10:55:45 -07:00
sornaks
458c389aae
Port of changes for ValidationMessage from MVC.
2014-04-30 10:55:43 -07:00
sornaks
d63d998e95
Introducing DisplayText, DisplayTextFor, Id, IdFor, IdForModel.
...
Fixing CachedDataAnnotationsModelMetadata to support NullDisplayText.
2014-04-30 10:23:25 -07:00
sornaks
112a5ddc50
Changes enabling TextArea, TextAreaFor.
...
Changing the interface to directly include Rows and Columns.
2014-04-30 09:42:07 -07:00
sornaks
b899cac4c8
Porting TextAreaHelper from existing MVC code.
2014-04-30 09:35:48 -07:00
sornaks
e0592d01af
Cleaning up sprinkled null checks and adding it to a centralized place - FromStringExpression
2014-04-30 09:29:30 -07:00
David Fowler
488ec2f52e
Added default routes overload
2014-04-29 18:00:49 -07:00
Ryan Nowak
2ad1cca549
Issue #312 - TypeFilterAttribute (with sample).
...
Implmentation for understanding and consuming ITypeFilter was already
there.
2014-04-29 14:18:39 -07:00
Ryan Nowak
fe6f023948
Auto-update to project file
2014-04-29 14:17:11 -07:00
Yishai Galatzer
bcd0974823
Make the controller available to filters + Sample
...
GitHub WebFX #300
2014-04-29 10:33:21 -07:00
Yishai Galatzer
297bb5d36d
Layout compilation error not showing in browser - GitHub WebFX #286
...
An exception thrown in a layout (or for that matter anything that is a rendering time exception)
is not bubbling to the end user.
The reason is that the StreamWrite is flushing because it's in a dispose pattern.
The solution is to wrap the stream and prevent writes/flushes if an exception has been thrown.
At the same time we stop writing BOM out to html files by default.
Also specified charset explicitly - so there is matches the encoding of the page.
2014-04-29 10:26:22 -07:00
dougbu
f7704ba68f
Implement `Editor*()` HTML helpers
...
- copy over legacy `Editor*()` extensions and default editor templates
- get working in the new world
- usual `var`, `String` -> `string`, `internal` -> `public`, namespaces, ...
- longest overloads into `IHtmlHelper[<TModel>]` and implementation classes
- clean up `ViewContext.ViewData` -> `ViewData`, trailing whitespace, long lines
- remove `MultilineTextTemplate()` since `TextArea()` doesn't exist yet
- remove `ColorInputTemplate()` since `Color` type doesn't exist
- use `html.Label()`, not `LabelExtensions.LabelHelper()`: equivalent helper
is protected. only downside is potential `ModelMetadata` re-discovery.
- rename `HtmlInputTemplateHelper()` -> `GenerateTextBox()`
- copy over `Html5DateRenderingMode` and `html.Html5DateRenderingMode` property
- and get them working in new world
- hook the default editor templates up
- use `Editor()`, `EditorFor()`, `EditorForModel()` in MVC sample
- add an on-disk editor template to MVC sample
2014-04-28 14:53:07 -07:00
Sebastien Ros
b3046a0285
AllowAnonymous can override AuthorizeAttribute
...
#309
2014-04-28 14:04:10 -07:00
Yishai Galatzer
3636440cae
Fix bug# 289
...
The ordering algorithm was ignoring errors that came from user code,
and only respected errors from model properties
2014-04-28 12:51:55 -07:00
David Fowler
8d53d40647
CR feedback
2014-04-28 11:19:36 -07:00
David Fowler
cff4a21e08
Make razor roslyn compilation work on mono
...
- Added a metadata cache (we need this for core clr). Will consider
moving this into the core
- Skip pdb generation on mono
2014-04-28 11:19:36 -07:00
harshgMSFT
926b335101
Fix for Issue #319
2014-04-28 11:18:15 -07:00
dougbu
66ca046135
Reintroduce `IHtmlHelper` and use it everywhere possible
...
- no more `IHtmlHelper<object>` in `DefaultDisplayTemplates` and also no
need for `ViewDataDictionary<object>` in a few places
- mostly removals from `IHtmlHelper<TModel>` but did cleanup comments and
add `[NotNull]` for `DisplayFor()`, `DisplayNameFor()`,
`DisplayNameForInnerType()`, and `LabelFor()`
- also add `[NotNull]` for `this` and `Expression` parameters in some
extension methods
2014-04-28 10:57:36 -07:00
sornaks
e21688ffb5
#190 Tighten protections around `ModelStateDictionary` additions
2014-04-28 08:46:47 -07:00
Pranav K
f740aabb79
Reviving RangeAttributeAdapter, RequiredAttributeAdapter,
...
StringLengthAttributeAdapter
* Adding remaining DataTypeAttribute adapter rules
2014-04-26 11:39:29 -07:00
Yishai Galatzer
a5afd3eb42
ActionResult implements IActionResult, and all our default implementations now use ActionResult
...
All controller methods return the specific ActionResult type
2014-04-25 15:57:02 -07:00
Pranav K
f5ba63ea1e
Fixing missing files in kproj
...
Fixing typo in sample filter
2014-04-25 14:48:14 -07:00