Граф коммитов

845 Коммитов

Автор SHA1 Сообщение Дата
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
Pranav K a468986155 Removing unused variable from RoslynCompilationService 2014-09-15 14:44:39 -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 18400481b5 Cleaned up the mvc sample
- Removed unnecessary dependencies
- Removed web.config
- Use overload of UseServices that automatically adds options
2014-09-15 09:51:00 -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
Ryan Nowak d57c34392f stylecop fix 2014-09-12 13:02:24 -07:00
Wei Wang 447336b4f3 React to renaming TargetFramework to RuntimeFramework 2014-09-11 11:49:53 -07:00
David Fowler 29baf80161 Allow MvcRazorHost to run on vanilla .NET45
- Added net45 target and removed specific aspnet50 and aspnetcore50 APIs
from that code path.
2014-09-11 10:42:08 -07:00
Pranav K 6944fd4bc4 Reacting to System.Text.Encoding package version change 2014-09-11 10:06:55 -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
YishaiGalatzer 8fd7cd51e2 Fix the sample to await when writing directly to the output stream in a controller. 2014-09-09 08:39:44 -07:00
Pranav K df0b33a378 Updating ViewStartUtility to use IFileSystem.TryGetParentPath 2014-09-05 14:38:11 -07:00
David Fowler 103693b61c Updated build.cmd 2014-09-05 01:50:09 -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 88eb29b5d0 Changed remaining ifdefs from K10 and ASPNETCORE50 2014-08-28 22:39:13 -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 ddea73b934 Fixing build break by updating comment 2014-08-26 12:14:42 -07:00
Pranav K 5beed03b10 Removing unused namespaces 2014-08-26 11:58:12 -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
Shannon Deminick f6547d63e8 Update RazorView.RenderAsync to be virtual
Would be nice if this method is virtual so people can extend the RazorView easily, this functionality is available in the current MVC which I utilize.
2014-08-22 11:17:15 -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
dougbu 7a1242f162 Remove `using` for Microsoft.AspNet.Mvc.Razor namespace from views
- eventually will clean up IntelliSense -- removing classes users don't
  need when editing a view
- will _not_ cleanup IntelliSense 'til VS stops using a private copy of
  Microsoft.AspNet.Mvc.Razor.Host.dll or we update that copy
- all tests and MVC sample views still work fine
- issue #969
2014-08-21 14:26:40 -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