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
loaders: [ | |
{ | |
test: /\.(png|jpg|gif)$/, | |
loader: 'url-loader?limit=8192' | |
}, | |
{ | |
test: /\.woff(\?v=\d+\.\d+\.\d+)?$/, | |
loader: 'url?mimetype=application/font-woff' | |
}, { | |
test: /\.woff2(\?v=\d+\.\d+\.\d+)?$/, |
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
'use strict'; | |
const webpack = require('webpack'); | |
let path = require('path'); | |
let srcPath = path.join(__dirname, '/../src/'); | |
let baseConfig = require('./base'); | |
module.exports = { | |
devtool: 'inline-source-map', | |
module: { |
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
// utility | |
export function mapToAngular(comp: new() => Component) { | |
return function dirFactory($injector) { | |
var instance = $injector.instantiate(comp); | |
return { | |
templateUrl: instance.templateUrl, | |
controller: () => instance, | |
controllerAs: 'vm', | |
bindToController: true, | |
scope: instance.binding, |
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
[Fact] | |
public void user_context_should_be_registered_per_dependency_scope() | |
{ | |
EnsurePerScopeLifetime<IUserContext>(); | |
} | |
private static void EnsurePerScopeLifetime<T>() | |
where T: class | |
{ |
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
public class Test | |
{ | |
private Fixture fixture; | |
private IRepository sut; | |
public Test() | |
{ | |
fixture = new Fixture(); // with some configuration | |
sut = fixture.Freeze<IRepository>(); | |
} |
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
[AllowAnonymous] | |
public class AuthenticationController: ApiController | |
{ | |
private readonly IFormsAuthWrapper _formsAuth; | |
public AuthenticationController(IFormsAuthWrapper formsAuth) | |
{ | |
_formsAuth = formsAuth; | |
} |
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
public interface IFormsAuthWrapper | |
{ | |
FormsAuthenticationTicket Decrypt(string value); | |
string GetAuthToken(string username, bool persist); | |
} | |
public class FormsAuthWrapper : IFormsAuthWrapper | |
{ | |
private const int SessionTimeout = 300; |
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
[TestFixture] | |
public class FormsAuthenticationFilterTests | |
{ | |
private class TestController : ApiController | |
{ | |
[AllowAnonymous] | |
public void PublicMethod() | |
{ | |
} |
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
// Chosen, a Select Box Enhancer for jQuery and Prototype | |
// by Patrick Filler for Harvest, http://getharvest.com | |
// | |
// Version 1.0.0 | |
// Full source at https://github.com/harvesthq/chosen | |
// Copyright (c) 2011 Harvest http://getharvest.com | |
// MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md | |
// This file is generated by `grunt build`, do not edit it by hand. | |
(function() { |
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
// Internal recursive comparison function for `isEqual`. | |
var eq = function(a, b, aStack, bStack) { | |
// Identical objects are equal. `0 === -0`, but they aren't identical. | |
// See the Harmony `egal` proposal: http://wiki.ecmascript.org/doku.php?id=harmony:egal. | |
if (a === b) return a !== 0 || 1 / a == 1 / b; | |
// A strict comparison is necessary because `null == undefined`. | |
if (a == null || b == null) return a === b; | |
// Unwrap any wrapped objects. | |
if (a instanceof _) a = a._wrapped; | |
if (b instanceof _) b = b._wrapped; |
NewerOlder