-
Notifications
You must be signed in to change notification settings - Fork 475
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for IEEE754Compatible media type parameter (#2827)
- Loading branch information
Showing
10 changed files
with
603 additions
and
278 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
test/E2ETest/Microsoft.Test.E2E.AspNet.OData/MediaTypes/MediaTypesModels.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
//----------------------------------------------------------------------------- | ||
// <copyright file="MediaTypesModels.cs" company=".NET Foundation"> | ||
// Copyright (c) .NET Foundation and Contributors. All rights reserved. | ||
// See License.txt in the project root for license information. | ||
// </copyright> | ||
//------------------------------------------------------------------------------ | ||
|
||
namespace Microsoft.Test.E2E.AspNet.OData.MediaTypes | ||
{ | ||
public class MediaTypesOrder | ||
{ | ||
public int Id { get; set; } | ||
public decimal Amount { get; set; } | ||
public long TrackingNumber { get; set; } | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
test/E2ETest/Microsoft.Test.E2E.AspNet.OData/MediaTypes/MediaTypesOrdersController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
//----------------------------------------------------------------------------- | ||
// <copyright file="MediaTypesOrdersController.cs" company=".NET Foundation"> | ||
// Copyright (c) .NET Foundation and Contributors. All rights reserved. | ||
// See License.txt in the project root for license information. | ||
// </copyright> | ||
//------------------------------------------------------------------------------ | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using Microsoft.AspNet.OData; | ||
using Microsoft.Test.E2E.AspNet.OData.Common.Controllers; | ||
|
||
namespace Microsoft.Test.E2E.AspNet.OData.MediaTypes | ||
{ | ||
public class MediaTypesOrdersController : TestODataController | ||
{ | ||
private List<MediaTypesOrder> orders = new List<MediaTypesOrder> | ||
{ | ||
new MediaTypesOrder { Id = 1, Amount = 130, TrackingNumber = 9223372036854775807L } | ||
}; | ||
|
||
[EnableQuery] | ||
public ITestActionResult Get() | ||
{ | ||
return Ok(orders); | ||
} | ||
|
||
[EnableQuery] | ||
public ITestActionResult Get(int key) | ||
{ | ||
var order = orders.FirstOrDefault(c => c.Id == key); | ||
|
||
if (order == null) | ||
{ | ||
throw new ArgumentOutOfRangeException("key"); | ||
} | ||
|
||
return Ok(order); | ||
} | ||
} | ||
} |
Oops, something went wrong.