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

1594 Коммитов

Автор SHA1 Сообщение Дата
AMooreMicrosoft 2fbe1eaa80 WA34: WebAPI: ReflectedHttpActionDescriptor: Cache repeated calls to MethodInfo.GetParameters.
In WebAPI scenarios involving paramters, there are repeated calls to extract the same set of paramters on the long lifetime ReflectedHttpActionDescriptor. This changes caches them and will prevent one array allocation per request and should improve throughput by 0.3-0.5% depending on the scenario.
2013-11-08 10:59:12 -08:00
dougbu d442ee5fd7 Merge branch 'fix1373' 2013-11-07 18:28:05 -08:00
dougbu 1ce9aecc5e CR comments on last iteration of FxCop fixes
- Back to previous MaxDepth handling
- ... but seal property overrides in BaseJsonMediaTypeFormatter subclasses
- Remove unnecessary suppressions; add a couple that were missing
2013-11-07 16:35:50 -08:00
dougbu 5ce679813f Fix 1373, Improve EDDL() Exception message in the [Flags] case
- https://aspnetwebstack.codeplex.com/workitem/1373
- "Error message is not clear when enum that has flags attribute calls EnumDropDownListFor html helper"
- Add new message for case where ModelType has a [Flags] attribute
- Provide EnumHelper.HasFlags(Type) internal method to make determination easy for EDDL()
- Leads to a duplicate call to Nullable.GetUnderlyingType(Type) but only in the failure case
2013-11-07 15:52:51 -08:00
davidmatson 168ed8227f Restore explicit attribute usages per FxCop. 2013-11-07 15:10:28 -08:00
davidmatson 9cac3aebf5 Correct route provider attribute usages (fixes #1405).
Also cleanup redundant attribute usage attributes on MVC filter overrides.
2013-11-07 14:39:06 -08:00
dougbu d778f9c0f9 Fix: Web API Help Page projects don't build in command prompt for VS2013
- $(VisualStudioVersion) has value '12.0' in this command window; copied from environment
- build.cmd consistently builds using MsBuild.exe v4
- But VS uses its native MsBuild version and this .targets file works within VS
- Guard v12 settings using $(BuildingInsideVisualStudio)
2013-11-07 12:32:49 -08:00
davidmatson 5c254517ef Add convenience property getters to exception services contexts. 2013-11-07 11:52:03 -08:00
davidmatson 865c16c32e Move CallsHandler property to ExceptionContextCatchBlock.
Whether or not an exception can be handled depends of the catch block
code, so the CallsHandler properly belongs on the catch block class
rather than varying per context on the exception logger context class.
2013-11-07 11:51:48 -08:00
Yishai Galatzer 7cdde3363d Guarantee ports created by integration tests are unique 2013-11-06 17:49:12 -08:00
davidmatson 7701713ce6 Use Content-Length for initial request buffer capacity in OWIN host. 2013-11-06 15:10:53 -08:00
davidmatson 5118a14040 Removed unused code from TaskHelpers and TaskHelpersExtensions. 2013-11-06 12:31:04 -08:00
davidmatson b8aa0e557c Improve MediaTypeFormatter use of canceled tasks. 2013-11-06 12:28:57 -08:00
davidmatson 29048b8ba0 Add RequestContext convenience property to HttpActionContext. 2013-11-06 12:27:06 -08:00
Ryan Nowak 642bb11d04 CR feedback 2013-11-06 12:00:16 -08:00
Ryan Nowak 8f3ad84452 Merging test classes into shared source (CR Feedback) 2013-11-06 11:58:24 -08:00
davidmatson da797e67a3 Dispose resources in web host exception cases (fixes #1345). 2013-11-06 10:52:15 -08:00
raghuramn a14733ff07 1340: support modelbinding nonstring data from route data 2013-11-05 17:51:15 -08:00
raghuramn b7f192b56c Moving Validate method to ApiController instead of ODataController 2013-11-05 16:17:08 -08:00
raghuramn a8470366b8 Issue 617: Provide overload to supply entitysetconfiguration while
defining action return type
2013-11-05 14:54:36 -08:00
raghuramn e23c166787 Issue 518: Throw error when user registers entity type as returntype
without entityset
2013-11-05 14:33:10 -08:00
davidmatson 10bca6e6ad Use prettier nested quotes in Runtime.msbuild. 2013-11-05 14:24:03 -08:00
davidmatson e78b6b8f74 Fix intermittent test failures due to port conflict. 2013-11-05 14:19:01 -08:00
dougbu b29c044ed0 Fix 1389, Fix EDDL() read from ModelState in invalid Create submission cases
- https://aspnetwebstack.codeplex.com/workitem/1389
- "EnumDropDownListFor helper throws unhandled exception when model state is invalid and create page is loaded again "
- EnumDropDownListFor() attempted to convert ModelState.Value.RawValue to general Enum type
- Fix is to use actual ModelType
2013-11-05 14:11:16 -08:00
Alexander Batishchev 5be1f41fe1 Enclose SkipStrongNamesExe and Xml path in quotes in Runtime.msbuild.
We need to make sure the paths are passed to the command line inside of
quotes for cases where the repository path contains a space.
2013-11-05 14:02:08 -08:00
Ryan Nowak 465a224add CR feedback 2013-11-05 13:34:34 -08:00
davidmatson a86db25f20 Include portable libraries in build by default. 2013-11-05 11:33:20 -08:00
davidmatson 68657bee4b Support custom constraints in MVC attribute routing (fixes #1149). 2013-11-05 11:09:00 -08:00
davidmatson e6e36d1141 Refactor MVC attribute route building for further extensibility. 2013-11-05 11:06:36 -08:00
dougbu 2c5c80d3fb Merge branch 'removeBranch' 2013-11-05 09:33:13 -08:00
davidmatson aed4ac8667 Preserve exception stack trace in ActionFilterAttribute (fixes #1316). 2013-11-05 09:32:03 -08:00
dougbu 7cdd908408 BSON support fixup round 3: One last FxCop warning
- Ensure JSON reader gets cleaned up
2013-11-05 09:31:58 -08:00
dougbu 6f15e84855 Address FxCop warnings that showed up in CI builds
- For e.g. http://wsr-teamcity/viewLog.html?buildId=10081&tab=buildResultsDiv&buildTypeId=bt4
2013-11-05 09:31:45 -08:00
Ryan Nowak c1318b3d03 Fix for codeplex-1357
This change allows users to configure the casing behavior of simple
membership provider. The simple membership provider will by default
generate a database query that normalizes the case of usernames on the
database side.

This comes with the side effect of obviating any index that the user may
have configured for the user name column.

The fix is to make this behavior configurable. With the new option, it
will be possible to turn off casing normalization, and allow the database
to handle it specific to its collation.
2013-11-05 09:31:35 -08:00
davidmatson d8cc699872 Preserve exception stack trace in ActionFilterAttribute (fixes #1316). 2013-11-05 09:24:52 -08:00
dougbu 0c27186bb7 BSON support fixup round 3: One last FxCop warning
- Ensure JSON reader gets cleaned up
2013-11-05 09:06:18 -08:00
dougbu e34d96bc22 Merge branch 'bsonCodeAnalysis' 2013-11-05 08:53:46 -08:00
dougbu cf1e0ed6d7 Address FxCop warnings that showed up in CI builds
- For e.g. http://wsr-teamcity/viewLog.html?buildId=10081&tab=buildResultsDiv&buildTypeId=bt4
2013-11-04 23:52:07 -08:00
Ryan Nowak 256968e02c Fix for codeplex-1357
This change allows users to configure the casing behavior of simple
membership provider. The simple membership provider will by default
generate a database query that normalizes the case of usernames on the
database side.

This comes with the side effect of obviating any index that the user may
have configured for the user name column.

The fix is to make this behavior configurable. With the new option, it
will be possible to turn off casing normalization, and allow the database
to handle it specific to its collation.
2013-11-04 23:30:47 -08:00
dougbu 679d450616 Correct build break in BSON support checkin
- Update PCL project files
- Correct usings to provide all necessary types
- Hack a TypeDescriptor.GetConverter(type).CanConvertFrom(typeof(string)) substitute for PCL

Nit: Remove one unused using
2013-11-04 22:18:13 -08:00
dougbu 8b1440decc Add BSON support for Json.NET MediaTypeFormatter
- https://aspnetwebstack.codeplex.com/workitem/241
- Refactor JsonMediaTypeFormatter, moving much of it into new BaseJsonMediaTypeFormatter
- All DataContractJsonSerializer support remains in JsonMediaTypeFormatter
- Add new BsonMediaTypeFormatter, another BaseJsonMediaTypeFormatter subclass
- Add (non-standard) MediaTypeConstants.ApplicationBsonMediaType
- Add Dictionary<string, T> and null test data variations -- gaps in previous formatter round-trip tests

Note BSON-specific special cases for null (empty content) and for simple
types and byte[] (Dictionary<string, object> with a single property named
"Value").  May want to publish these workarounds as well as issues with
decimal, uint, and ulong (see BsonMediaTypeFormatterTests.cs).

Nits:
- Make JsonMediaTypeFormatter comments more consistent
- Tighten JsonMediaTypeFormatter contract enforcement
- Merge adjacent #if blocks
- Correct comments referencing JsonMediaTypeFormatter

Test nits:
- Refactor MediaTypeFormatterTestBase slightly to support testing with binary serializations
- Correct value of CommonUnitTestDataSets.ValueAndRefTypeTestDataCollection and remove duplicates from tests using it
- Remove unused DataContractJsonMediaTypeFormatterTests.ValueAndRefTypeTestDataCollectionExceptULong
- Remove unecessary exclusion of TimeSpan data set in HttpAssert.CanRoundTrip(); formatters instead have trouble with DateTime (losing Kind property value)
2013-11-04 20:46:44 -08:00
davidmatson d6907b8dd0 Add unit tests for fix for bug #1315. 2013-11-04 16:46:38 -08:00
Will Huang a8c44a8770 Fix MVC filter override attributes base classes (fixes #1315).
Change MVC Override*Attribute classes to derive from FilterAttribute, not
Attribute.
2013-11-04 16:46:15 -08:00
davidmatson 40854d1b7e Provide RequestContext.Url for batch requests (fixes #1301). 2013-11-04 14:12:59 -08:00
davidmatson a55ca0cee1 Use HttpActionDescriptor in attribute routing pipeline. 2013-11-04 14:10:37 -08:00
Yishai Galatzer 5122540a20 Code review feedback (use ICollection instead of IList) 2013-11-04 13:41:53 -08:00
raghuramn 3d986818a2 Issue 1358: MultipartFormDataStreamProvider.ExecutePostProcessingAsync()
doesn't get called
2013-11-04 10:56:45 -08:00
raghuramn 186370d3ce Issue 1324: Delta<T>.Patch doesn't perform validation on the entity
Adding a helper method on the ODataController to perform validation
after the delta has been applied.
2013-11-04 10:45:37 -08:00
raghuramn b45b947e21 Issue 1302: MediaTypeFormatter's WriteToStreamAsync overload taking in
CancellationToken not being invoked

HttpContent.SerializeToStreamAsync doesn't take in a CancellationToken.
So, there is no easy way to get the CancellationToken to the formatter
while writing response. We are cheating here by passing fake cancellation
tokens. We should fix this when we fix HttpContent.
2013-11-04 10:45:35 -08:00
raghuramn aee843f398 Issue 1041: parse errors in OData $filter and $orderby are not sent back
to the client properly
2013-11-04 10:45:33 -08:00