Updated to use the new target framework in project.json
This commit is contained in:
parent
b6fb7ac7df
commit
34add2249e
|
|
@ -1,4 +1,4 @@
|
|||
#if NET45
|
||||
#if ASPNET50
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
|
@ -105,4 +105,4 @@ namespace MvcSample.Web
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#if NET45
|
||||
#if ASPNET50
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using Autofac;
|
||||
|
|
@ -74,4 +74,4 @@ namespace MvcSample.Web
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ using Microsoft.Framework.DependencyInjection;
|
|||
using MvcSample.Web.Filters;
|
||||
using MvcSample.Web.Services;
|
||||
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
using Autofac;
|
||||
using Microsoft.Framework.DependencyInjection.Autofac;
|
||||
using Microsoft.Framework.OptionsModel;
|
||||
|
|
@ -19,7 +19,7 @@ namespace MvcSample.Web
|
|||
public void Configure(IBuilder app)
|
||||
{
|
||||
app.UseFileServer();
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
var configuration = new Configuration()
|
||||
.AddJsonFile(@"App_Data\config.json")
|
||||
.AddEnvironmentVariables();
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
},
|
||||
"commands": { "web": "Microsoft.AspNet.Hosting server=Microsoft.AspNet.Server.WebListener server.urls=http://localhost:5001" },
|
||||
"frameworks": {
|
||||
"net45": {
|
||||
"aspnet50": {
|
||||
"dependencies": {
|
||||
"System.ComponentModel.DataAnnotations": "",
|
||||
"Microsoft.Framework.DependencyInjection.Autofac": "1.0.0-*",
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
"System.Runtime" : "4.0.20.0"
|
||||
},
|
||||
"frameworks": {
|
||||
"net45": {},
|
||||
"aspnet50": {},
|
||||
"aspnetcore50": {
|
||||
"dependencies": {
|
||||
"System.Text.Encoding.Extensions": "4.0.10.0"
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ namespace Microsoft.AspNet.Mvc
|
|||
{
|
||||
var response = context.HttpContext.Response;
|
||||
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
response.StatusCode = (int)HttpStatusCode.NoContent;
|
||||
#else
|
||||
response.StatusCode = 204;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
|
|
@ -102,7 +102,7 @@ namespace Microsoft.AspNet.Mvc
|
|||
{
|
||||
return _innerStream.ReadAsync(buffer, offset, count, cancellationToken);
|
||||
}
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
/// <inheritdoc />
|
||||
public override IAsyncResult BeginRead(byte[] buffer, int offset, int count,
|
||||
AsyncCallback callback, object state)
|
||||
|
|
@ -157,7 +157,7 @@ namespace Microsoft.AspNet.Mvc
|
|||
{
|
||||
return _innerStream.WriteAsync(buffer, offset, count, cancellationToken);
|
||||
}
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
/// <inheritdoc />
|
||||
public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count,
|
||||
AsyncCallback callback, object state)
|
||||
|
|
@ -176,7 +176,7 @@ namespace Microsoft.AspNet.Mvc
|
|||
{
|
||||
_innerStream.WriteByte(value);
|
||||
}
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
/// <inheritdoc />
|
||||
public override void Close()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
|
|
@ -14,7 +14,7 @@ namespace Microsoft.AspNet.Mvc
|
|||
{
|
||||
public static readonly int DefaultMaxDepth = 32;
|
||||
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
public static readonly XsdDataContractExporter XsdDataContractExporter = new XsdDataContractExporter();
|
||||
#endif
|
||||
|
||||
|
|
@ -24,7 +24,7 @@ namespace Microsoft.AspNet.Mvc
|
|||
/// <returns>XmlReaderQuotas with default values</returns>
|
||||
public static XmlDictionaryReaderQuotas GetDefaultXmlReaderQuotas()
|
||||
{
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
return new XmlDictionaryReaderQuotas()
|
||||
{
|
||||
MaxArrayLength = Int32.MaxValue,
|
||||
|
|
@ -38,4 +38,4 @@ namespace Microsoft.AspNet.Mvc
|
|||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
|
|
@ -42,7 +42,7 @@ namespace Microsoft.AspNet.Mvc
|
|||
DataContractSerializer serializer = null;
|
||||
try
|
||||
{
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
// Verify that type is a valid data contract by forcing the serializer to try to create a data contract
|
||||
FormattingUtilities.XsdDataContractExporter.GetRootElementName(type);
|
||||
#endif
|
||||
|
|
@ -76,4 +76,4 @@ namespace Microsoft.AspNet.Mvc
|
|||
return Task.FromResult(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ namespace Microsoft.AspNet.Mvc
|
|||
KeyHandling = keyHandling;
|
||||
break;
|
||||
default:
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
throw new InvalidEnumArgumentException("keyHandling", (int)keyHandling, typeof (RouteKeyHandling));
|
||||
#else
|
||||
throw new ArgumentOutOfRangeException("keyHandling");
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
|
|
@ -166,7 +166,7 @@ namespace Microsoft.AspNet.Mvc.Routing
|
|||
{
|
||||
// We'd already have failed before getting here. The RouteDataActionConstraint constructor
|
||||
// would throw.
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
throw new InvalidEnumArgumentException(
|
||||
"item",
|
||||
(int)constraint.KeyHandling,
|
||||
|
|
@ -184,4 +184,4 @@ namespace Microsoft.AspNet.Mvc.Routing
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
"Newtonsoft.Json": "5.0.8"
|
||||
},
|
||||
"frameworks": {
|
||||
"net45": {
|
||||
"aspnet50": {
|
||||
"dependencies": {
|
||||
"System.Xml": ""
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"version": "1.0.0-*",
|
||||
"dependencies": {},
|
||||
"frameworks": {
|
||||
"net45": {},
|
||||
"aspnet50": {},
|
||||
"aspnetcore50": {
|
||||
"dependencies": {
|
||||
"System.Collections": "4.0.10.0",
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
"Newtonsoft.Json": "5.0.8"
|
||||
},
|
||||
"frameworks": {
|
||||
"net45": {
|
||||
"aspnet50": {
|
||||
"dependencies": {
|
||||
"System.Xml": "",
|
||||
"System.ComponentModel.DataAnnotations": "",
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
"Microsoft.Framework.Runtime.Interfaces": "1.0.0-*"
|
||||
},
|
||||
"frameworks": {
|
||||
"net45": {
|
||||
"aspnet50": {
|
||||
"dependencies": {
|
||||
"System.Collections": "",
|
||||
"System.Runtime": "",
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
"Microsoft.Framework.Runtime.Interfaces": "1.0.0-*"
|
||||
},
|
||||
"frameworks": {
|
||||
"net45": {
|
||||
"aspnet50": {
|
||||
"dependencies": {
|
||||
"System.Collections": "",
|
||||
"System.Runtime": "",
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
"Microsoft.Framework.DependencyInjection" : "1.0.0-*"
|
||||
},
|
||||
"frameworks": {
|
||||
"net45": {},
|
||||
"aspnet50": {},
|
||||
"aspnetcore50": {
|
||||
"dependencies": {
|
||||
"System.Diagnostics.Debug": "4.0.10.0",
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ using System.Text;
|
|||
using Microsoft.AspNet.Mvc.ModelBinding;
|
||||
using Microsoft.AspNet.Routing;
|
||||
using Microsoft.AspNet.Testing;
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
using Moq;
|
||||
#endif
|
||||
using Xunit;
|
||||
|
|
@ -542,7 +542,7 @@ namespace Microsoft.AspNet.Mvc.Test
|
|||
|
||||
// These tests share code with the ActionFilterAttribute tests because the various filter
|
||||
// implementations need to behave the same way.
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
[Fact]
|
||||
public async Task Controller_ActionFilter_SettingResult_ShortCircuits()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
using System;
|
||||
using Microsoft.AspNet.Http;
|
||||
using Microsoft.AspNet.Mvc.ModelBinding;
|
||||
|
|
@ -148,4 +148,4 @@ namespace Microsoft.AspNet.Mvc.Core.Test
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
|
|
@ -140,4 +140,4 @@ namespace Microsoft.AspNet.Mvc
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNet.Http;
|
||||
|
|
@ -265,4 +265,4 @@ namespace Microsoft.AspNet.Mvc.Test
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
using System.Threading.Tasks;
|
||||
using Moq;
|
||||
using Xunit;
|
||||
|
|
@ -34,4 +34,4 @@ namespace Microsoft.AspNet.Mvc.Test
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
|
@ -88,4 +88,4 @@ namespace Microsoft.AspNet.Mvc
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
|
@ -175,4 +175,4 @@ namespace Microsoft.AspNet.Mvc
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
|
@ -349,4 +349,4 @@ namespace Microsoft.AspNet.Mvc
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
|
@ -355,4 +355,4 @@ namespace Microsoft.AspNet.Mvc
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.AspNet.Http;
|
||||
|
|
@ -195,4 +195,4 @@ namespace Microsoft.AspNet.Routing.Tests
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.AspNet.Mvc.OptionDescriptors;
|
||||
|
|
@ -71,4 +71,4 @@ namespace Microsoft.AspNet.Mvc.Core.Test
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
|
@ -135,4 +135,4 @@ namespace Microsoft.AspNet.Mvc.Core.Test
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
using Microsoft.AspNet.Routing;
|
||||
using Microsoft.AspNet.Routing.Template;
|
||||
using Microsoft.Framework.OptionsModel;
|
||||
|
|
@ -72,4 +72,4 @@ namespace Microsoft.AspNet.Mvc.Routing
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
using Microsoft.AspNet.Routing;
|
||||
using Microsoft.Framework.OptionsModel;
|
||||
using Moq;
|
||||
|
|
@ -183,4 +183,4 @@ namespace Microsoft.AspNet.Mvc.Routing
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -21,6 +21,6 @@
|
|||
"test": "Xunit.KRunner"
|
||||
},
|
||||
"frameworks": {
|
||||
"net45": { }
|
||||
"aspnet50": { }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#if NET45
|
||||
#if ASPNET50
|
||||
using System;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
|
|
@ -36,4 +36,4 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
"test": "Xunit.KRunner"
|
||||
},
|
||||
"frameworks": {
|
||||
"net45": {
|
||||
"aspnet50": {
|
||||
"dependencies": {
|
||||
"AutofacWebSite": ""
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
"test": "Xunit.KRunner"
|
||||
},
|
||||
"configurations": {
|
||||
"net45": {
|
||||
"aspnet50": {
|
||||
"dependencies": {
|
||||
"System.Runtime": "4.0.20.0"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
using System.Threading.Tasks;
|
||||
using Moq;
|
||||
using Xunit;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
|
@ -125,4 +125,4 @@ namespace Microsoft.AspNet.Mvc.ModelBinding.Test
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ using System.Collections.Generic;
|
|||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
using Moq;
|
||||
#endif
|
||||
using Xunit;
|
||||
|
|
@ -14,7 +14,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding.Test
|
|||
{
|
||||
public class CollectionModelBinderTest
|
||||
{
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
[Fact]
|
||||
public async Task BindComplexCollectionFromIndexes_FiniteIndexes()
|
||||
{
|
||||
|
|
@ -124,7 +124,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding.Test
|
|||
Assert.Null(boundCollection);
|
||||
}
|
||||
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
[Fact]
|
||||
public async Task BindSimpleCollection_SubBindingSucceeds()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Moq;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
|
@ -962,4 +962,4 @@ namespace Microsoft.AspNet.Mvc.ModelBinding
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding
|
|||
|
||||
// GetMetadataForType
|
||||
|
||||
#if NET45 // No ReadOnlyAttribute in K
|
||||
#if ASPNET50 // No ReadOnlyAttribute in K
|
||||
[Fact]
|
||||
public void GetMetadataForTypeIncludesAttributesOnType()
|
||||
{
|
||||
|
|
@ -235,7 +235,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding
|
|||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
#if NET45 // No [ReadOnly] in K
|
||||
#if ASPNET50 // No [ReadOnly] in K
|
||||
[ReadOnly(true)]
|
||||
private class TypeModel
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
using Moq;
|
||||
#endif
|
||||
using Xunit;
|
||||
|
|
@ -41,7 +41,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding
|
|||
}
|
||||
}
|
||||
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
// Constructor
|
||||
|
||||
[Fact]
|
||||
|
|
@ -90,7 +90,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding
|
|||
{
|
||||
}
|
||||
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
[Theory]
|
||||
[InlineData(typeof(string))]
|
||||
[InlineData(typeof(Nullable<int>))]
|
||||
|
|
@ -331,7 +331,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding
|
|||
Assert.Equal("displayName", result);
|
||||
}
|
||||
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
[Fact]
|
||||
public void ReturnsPropertyNameWhenSetAndDisplayNameIsNull()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
using Moq;
|
||||
using Xunit;
|
||||
|
||||
|
|
@ -38,4 +38,4 @@ namespace Microsoft.AspNet.Mvc.ModelBinding.Test
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
using Moq;
|
||||
#endif
|
||||
using Xunit;
|
||||
|
|
@ -16,7 +16,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding
|
|||
{
|
||||
private readonly DataAnnotationsModelMetadataProvider _metadataProvider = new DataAnnotationsModelMetadataProvider();
|
||||
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
[Fact]
|
||||
public void GetValidators_ReturnsValidatorForIValidatableObject()
|
||||
{
|
||||
|
|
@ -164,7 +164,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding
|
|||
|
||||
// Default IValidatableObject adapter factory
|
||||
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
[Fact]
|
||||
public void IValidatableObjectGetsAValidator()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
using Moq;
|
||||
using Moq.Protected;
|
||||
#endif
|
||||
|
|
@ -49,7 +49,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding
|
|||
}
|
||||
}
|
||||
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
[Theory]
|
||||
[MemberData(nameof(ValidateSetsMemberNamePropertyDataSet))]
|
||||
public void ValidateSetsMemberNamePropertyOfValidationContextForProperties(ModelMetadata metadata,
|
||||
|
|
@ -222,4 +222,4 @@ namespace Microsoft.AspNet.Mvc.ModelBinding
|
|||
public string Name { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
|
|
@ -350,4 +350,4 @@ namespace Microsoft.AspNet.Mvc.ModelBinding
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Threading.Tasks;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using Microsoft.AspNet.Http;
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
using Moq;
|
||||
#endif
|
||||
using Xunit;
|
||||
|
|
@ -17,7 +17,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding.Test
|
|||
{
|
||||
private readonly QueryStringValueProviderFactory _factory = new QueryStringValueProviderFactory();
|
||||
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
[Fact]
|
||||
public void GetValueProvider_ReturnsQueryStringValueProviderInstaceWithInvariantCulture()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
"test": "Xunit.KRunner"
|
||||
},
|
||||
"frameworks": {
|
||||
"net45": {
|
||||
"aspnet50": {
|
||||
"dependencies": {
|
||||
"System.ComponentModel.DataAnnotations": "",
|
||||
"System.Reflection": "",
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
"test": "Xunit.KRunner"
|
||||
},
|
||||
"frameworks": {
|
||||
"net45": {
|
||||
"aspnet50": {
|
||||
"dependencies": {
|
||||
"Moq": "4.2.1312.1622"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
"test": "Xunit.KRunner"
|
||||
},
|
||||
"frameworks": {
|
||||
"net45": {
|
||||
"aspnet50": {
|
||||
"dependencies": {
|
||||
"Moq": "4.2.1312.1622",
|
||||
"System.Reflection": ""
|
||||
|
|
|
|||
|
|
@ -10,6 +10,6 @@
|
|||
"test": "Xunit.KRunner"
|
||||
},
|
||||
"frameworks": {
|
||||
"net45": { }
|
||||
"aspnet50": { }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
"Microsoft.AspNet.Mvc.TestConfiguration": ""
|
||||
},
|
||||
"frameworks": {
|
||||
"net45": { },
|
||||
"aspnet50": { },
|
||||
"aspnetcore50": { }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
"Microsoft.AspNet.Mvc.TestConfiguration": ""
|
||||
},
|
||||
"frameworks": {
|
||||
"net45": { },
|
||||
"aspnet50": { },
|
||||
"aspnetcore50": { }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
"Microsoft.AspNet.Security.Cookies": "1.0.0-*"
|
||||
},
|
||||
"frameworks": {
|
||||
"net45": { },
|
||||
"aspnet50": { },
|
||||
"aspnetcore50": { }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@
|
|||
"Autofac": "3.3.0"
|
||||
},
|
||||
"frameworks" : {
|
||||
"net45" : { }
|
||||
"aspnet50" : { }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
"Microsoft.Framework.ConfigurationModel": ""
|
||||
},
|
||||
"frameworks": {
|
||||
"net45": { },
|
||||
"aspnet50": { },
|
||||
"aspnetcore50": { }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
"Microsoft.Framework.ConfigurationModel": ""
|
||||
},
|
||||
"frameworks": {
|
||||
"net45": { },
|
||||
"aspnet50": { },
|
||||
"aspnetcore50": { }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
"Microsoft.AspNet.Mvc.TestConfiguration": ""
|
||||
},
|
||||
"frameworks": {
|
||||
"net45": { },
|
||||
"aspnet50": { },
|
||||
"aspnetcore50": { }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
"Microsoft.AspNet.Mvc.TestConfiguration": ""
|
||||
},
|
||||
"configurations": {
|
||||
"net45": { },
|
||||
"aspnet50": { },
|
||||
"aspnetcore50": { }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
"Microsoft.Framework.ConfigurationModel.Json": "1.0.0-*"
|
||||
},
|
||||
"frameworks": {
|
||||
"net45": { },
|
||||
"aspnet50": { },
|
||||
"aspnetcore50": { }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
"Microsoft.Framework.DependencyInjection": "1.0.0-*"
|
||||
},
|
||||
"frameworks" : {
|
||||
"net45" : { },
|
||||
"aspnet50" : { },
|
||||
"aspnetcore50" : { }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
"Microsoft.AspNet.Mvc.TestConfiguration": ""
|
||||
},
|
||||
"configurations": {
|
||||
"net45": { },
|
||||
"aspnet50": { },
|
||||
"aspnetcore50": { }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
"Microsoft.AspNet.Mvc.TestConfiguration": ""
|
||||
},
|
||||
"frameworks": {
|
||||
"net45": { },
|
||||
"aspnet50": { },
|
||||
"aspnetcore50": { }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
"Microsoft.AspNet.Server.IIS": "1.0.0-*"
|
||||
},
|
||||
"frameworks": {
|
||||
"net45": { },
|
||||
"aspnet50": { },
|
||||
"aspnetcore50": { }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
"Microsoft.Framework.ConfigurationModel": ""
|
||||
},
|
||||
"configurations": {
|
||||
"net45": { },
|
||||
"aspnet50": { },
|
||||
"aspnetcore50": { }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue