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
# watch a file changes in the current directory, | |
# compile when a .coffee file is changed or renamed | |
# Wrapped Graeme's version up into a function so it can be installed with install-module | |
# Also changed so it invoked coffee.exe directly, you need Coffee for Windows in your PATH for it to work | |
# https://github.com/alisey/CoffeeScript-Compiler-for-Windows | |
function watch | |
{ | |
$watcher = New-Object System.IO.FileSystemWatcher | |
$watcher.Path = get-location |
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
namespace Nancy.Jsonp | |
{ | |
using System; | |
using System.IO; | |
using Nancy.Bootstrapper; | |
public static class Hooks | |
{ | |
/// <summary> | |
/// Enable JSONP support in the application |
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
// -- BEFORE -- | |
Post["/create"] = x => | |
{ | |
var be = new BeerEvent() | |
{ | |
Name = Request.Form.Name, | |
Location = Request.Form.Location, | |
EventDate = Request.Form.EventDate | |
}; |
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
namespace NancyConNegDemo | |
{ | |
using Extensions; | |
using Models; | |
using Nancy; | |
public class ConNegModule : NancyModule | |
{ | |
public ConNegModule() : base("/conneg") | |
{ |
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
[Fact] | |
public void Should_be_able_to_impliclity_cast_dynamic_member_to_int() | |
{ | |
// Given | |
this.dictionary.foo = 2; | |
// When | |
int value = this.GetIntValue(this.dictionary.foo); | |
// Then |