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.Net; | |
using System.Net.Http; | |
using System.Web; | |
using Moq; | |
using NUnit.Framework; | |
using MyApp.Tests.Stubs; | |
using MyApp.Web.Api.Infrastructure; | |
namespace MyApp.Tests.Web.Api.Infrastructure |
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> | |
/// Special JsonConvert resolver that allows you to ignore properties. See http://stackoverflow.com/a/13588192/1037948 | |
/// </summary> | |
public class IgnorableSerializerContractResolver : DefaultContractResolver { | |
protected readonly Dictionary<Type, HashSet<string>> Ignores; | |
public IgnorableSerializerContractResolver() { | |
this.Ignores = new Dictionary<Type, HashSet<string>>(); | |
} |
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.Data.SqlClient; | |
using System.IO; | |
using System.IO.Compression; | |
using System.Data.Entity.Migrations.Infrastructure; | |
using System.Xml.Linq; | |
using MyApplication.Migrations; | |
using NUnit.Framework; | |
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
$(document).ready(function () { | |
var sortableList = $('.sortable-list').kendoSortable({ | |
hint: function(element){ | |
return element.clone().addClass('sortable-list-hint'); | |
}, | |
cursor: "n-resize" | |
}); | |
$('#sortable-submit').on('click', function (e) { |
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 interface IDomainEventDispatcher | |
{ | |
void Dispatch<TEvent>(TEvent eventToDispatch) where TEvent : IDomainEvent; | |
} | |
public static class DomainEvents | |
{ | |
public static IDomainEventDispatcher Dispatcher { get; set; } | |
public static void Raise<TEvent>(TEvent eventToRaise) where TEvent : IDomainEvent |
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 |
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
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
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.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 |