This file contains hidden or 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
public async Task<ActionResult> DoSeed() | |
{ | |
return await InitializeIdentityForEF(db) | |
} | |
private async Task InitializeIdentityForEF(ApplicationDbContext db) | |
{ | |
var userManager = HttpContext.Current.GetOwinContext().GetUserManager<ApplicationUserManager>(); | |
var roleManager = HttpContext.Current.GetOwinContext().Get<ApplicationRoleManager>(); |
This file contains hidden or 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
using System.Data.Entity; | |
using System.Threading.Tasks; | |
using IoCIdentity.Models; | |
using Microsoft.AspNet.Identity.EntityFramework; | |
namespace IoCIdentity.Identity | |
{ | |
public class ApplicationDbContext : IdentityDbContext<ApplicationUser>, IApplicationDbContext | |
{ |
This file contains hidden or 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
{ | |
"color_scheme": "Packages/Color Scheme - Default/Sunburst.tmTheme", | |
"dictionary": "Packages/Language - English/en_GB.dic", | |
"font_face": "Source Code Pro Light", | |
"font_size": 11, | |
"highlight_line": true, | |
"highlight_modified_tabs": true, | |
"ignored_packages": | |
[ | |
"Vintage" |
This file contains hidden or 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
using System; | |
using CommonDomain.Core; | |
using CommonDomain.Persistence.EventStore; | |
using FluentAssertions; | |
using NEventStore; | |
using Xunit; | |
public class NEventStoreRepositoryTests | |
{ |
This file contains hidden or 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
public class LogOutFilterAttribute : ActionFilterAttribute | |
{ | |
public override void OnActionExecuting(ActionExecutingContext filterContext) | |
{ | |
var authenticationManager = filterContext.HttpContext.GetOwinContext().Authentication; | |
authenticationManager.SignOut(); | |
base.OnActionExecuting(filterContext); | |
} |
This file contains hidden or 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
using System; | |
using System.Runtime.CompilerServices; | |
using System.Security.Cryptography; | |
namespace Microsoft.AspNet.Identity | |
{ | |
static class Crypto | |
{ | |
private const int PBKDF2IterCount = 1000; // default for Rfc2898DeriveBytes | |
private const int PBKDF2SubkeyLength = 256/8; // 256 bits |
This file contains hidden or 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
public class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
Func<IBar> barFunc = () => | |
{ | |
var barr = new Bar(); | |
return barr; | |
}; |
This file contains hidden or 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
using System; | |
using System.Security.Claims; | |
using System.Threading.Tasks; | |
using Microsoft.Owin.Security.Cookies; | |
namespace Microsoft.AspNet.Identity.Owin | |
{ | |
/// <summary> | |
/// Static helper class used to configure a CookieAuthenticationProvider to validate a cookie against a user's security | |
/// stamp |
This file contains hidden or 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
/// <summary> | |
/// Ambient Context for Configuration. Basically statically accessible configuration, | |
/// but we can override it. Use with caution, only in places where you can't inject through constructor | |
/// http://blogs.msdn.com/b/ploeh/archive/2007/07/23/ambientcontext.aspx | |
/// </summary> | |
public static class ConfigurationContext | |
{ | |
private static IConfiguration configuration; | |
public static IConfiguration Current |
This file contains hidden or 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
choco install 7zip | |
choco install chocolateygui | |
choco install ConEmu | |
choco install DotNet4.5.2 | |
choco install DotNet4.6.1 | |
choco install dotnet4.7.1 | |
choco install dotnet4.7.2 | |
choco install dotnetcore-sdk | |
choco install dotnetfx | |
choco install dotPeek |