зеркало из https://github.com/aspnet/Identity.git
Updated to use the new target framework in project.json
This commit is contained in:
Родитель
0705d3a5ae
Коммит
9d26c40144
|
@ -1,4 +1,4 @@
|
|||
using Microsoft.AspNet.Identity;
|
||||
using Microsoft.AspNet.Identity;
|
||||
using Microsoft.AspNet.Mvc;
|
||||
using IdentitySample.Models;
|
||||
using System.Security.Principal;
|
||||
|
@ -92,7 +92,7 @@ namespace IdentitySample
|
|||
return View(model);
|
||||
}
|
||||
// Generate the token and send it
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
var code = await UserManager.GenerateChangePhoneNumberTokenAsync(await GetCurrentUserAsync(), model.Number);
|
||||
if (UserManager.SmsService != null)
|
||||
{
|
||||
|
@ -165,7 +165,7 @@ namespace IdentitySample
|
|||
{
|
||||
// This code allows you exercise the flow without actually sending codes
|
||||
// For production use please register a SMS provider in IdentityConfig and generate a code here.
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
var code = await UserManager.GenerateChangePhoneNumberTokenAsync(await GetCurrentUserAsync(), phoneNumber);
|
||||
ViewBag.Status = "For DEMO purposes only, the current code is " + code;
|
||||
#endif
|
||||
|
@ -377,4 +377,4 @@ namespace IdentitySample
|
|||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
"run": "run server.urls=http://localhost:5003"
|
||||
},
|
||||
"frameworks": {
|
||||
"net451": {
|
||||
"aspnet50": {
|
||||
},
|
||||
"aspnetcore50": {
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"System.Security.Claims" : "1.0.0-*"
|
||||
},
|
||||
"frameworks": {
|
||||
"net45": {},
|
||||
"aspnet50": {},
|
||||
"aspnetcore50": {
|
||||
"dependencies": {
|
||||
"System.Collections": "4.0.10.0",
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"System.Security.Claims" : "1.0.0-*"
|
||||
},
|
||||
"frameworks": {
|
||||
"net451": {
|
||||
"aspnet50": {
|
||||
"dependencies": {
|
||||
"System.Collections": "",
|
||||
"System.Runtime": ""
|
||||
|
|
|
@ -5,7 +5,7 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
using System.Net.Mail;
|
||||
#endif
|
||||
using System.Threading;
|
||||
|
@ -120,7 +120,7 @@ namespace Microsoft.AspNet.Identity
|
|||
errors.Add(String.Format(CultureInfo.CurrentCulture, Resources.PropertyTooShort, "Email"));
|
||||
return;
|
||||
}
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
try
|
||||
{
|
||||
var m = new MailAddress(email);
|
||||
|
@ -139,4 +139,4 @@ namespace Microsoft.AspNet.Identity
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"System.Security.Claims" : "1.0.0-*"
|
||||
},
|
||||
"frameworks": {
|
||||
"net45": {},
|
||||
"aspnet50": {},
|
||||
"aspnetcore50": {
|
||||
"dependencies": {
|
||||
"System.Collections": "4.0.10.0",
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace Microsoft.AspNet.Identity.Authentication.Test
|
|||
|
||||
public class HttpSignInTest
|
||||
{
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
//[Theory]
|
||||
//[InlineData(true)]
|
||||
//[InlineData(false)]
|
||||
|
@ -527,4 +527,4 @@ namespace Microsoft.AspNet.Identity.Authentication.Test
|
|||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
},
|
||||
"code": "**\\*.cs;..\\Shared\\*.cs",
|
||||
"frameworks": {
|
||||
"net45": {
|
||||
"aspnet50": {
|
||||
"dependencies": {
|
||||
"Moq" : "4.2.1312.1622",
|
||||
"System.Runtime": "",
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace Microsoft.AspNet.Identity.InMemory.Test
|
|||
|
||||
public class HttpSignInTest
|
||||
{
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
[Theory]
|
||||
[InlineData(true)]
|
||||
[InlineData(false)]
|
||||
|
@ -63,4 +63,4 @@ namespace Microsoft.AspNet.Identity.InMemory.Test
|
|||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
},
|
||||
"code": "**\\*.cs;..\\Shared\\*.cs",
|
||||
"frameworks": {
|
||||
"net45": {
|
||||
"aspnet50": {
|
||||
"dependencies": {
|
||||
"Moq" : "4.2.1312.1622",
|
||||
"System.Collections": "",
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
},
|
||||
"code": "**\\*.cs;..\\Shared\\*.cs",
|
||||
"frameworks": {
|
||||
"net451": {
|
||||
"aspnet50": {
|
||||
"dependencies": {
|
||||
"Moq" : "4.2.1312.1622",
|
||||
"System.Collections": "",
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
},
|
||||
"code": "**\\*.cs;..\\Shared\\*.cs",
|
||||
"frameworks": {
|
||||
"net451": {
|
||||
"aspnet50": {
|
||||
"dependencies": {
|
||||
"Moq" : "4.2.1312.1622",
|
||||
"System.Collections": "",
|
||||
|
@ -23,7 +23,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"code": "**\\*.cs;..\\Shared\\*.cs",
|
||||
"commands": {
|
||||
"test": "Xunit.KRunner"
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace Microsoft.AspNet.Identity.Test
|
|||
async () => await factory.CreateAsync(new TestUser(), null));
|
||||
}
|
||||
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
//TODO: Mock fails in K (this works fine in net45)
|
||||
[Theory]
|
||||
[InlineData(false, false, false)]
|
||||
|
@ -102,4 +102,4 @@ namespace Microsoft.AspNet.Identity.Test
|
|||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
},
|
||||
"code": "**\\*.cs;..\\Shared\\*.cs",
|
||||
"frameworks": {
|
||||
"net45": {
|
||||
"aspnet50": {
|
||||
"dependencies": {
|
||||
"Moq" : "4.2.1312.1622",
|
||||
"System.Collections": "",
|
||||
|
|
|
@ -125,7 +125,7 @@ namespace Microsoft.AspNet.Identity.Test
|
|||
IdentityResultAssert.IsFailure(await manager.CreateAsync(user), "Email cannot be null or empty.");
|
||||
}
|
||||
|
||||
#if NET45
|
||||
#if ASPNET50
|
||||
[Theory]
|
||||
[InlineData("@@afd")]
|
||||
[InlineData("bogus")]
|
||||
|
@ -1564,4 +1564,4 @@ namespace Microsoft.AspNet.Identity.Test
|
|||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче