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
namespace Yarrrr | |
{ | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
/// <summary> | |
/// Pirate dictionary be plundered from Davie Reed ( http://nifty.stanford.edu/2004/TalkLikeAPirate/pirate3.html ) | |
/// Yarrr! | |
/// </summary> |
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
namespace NancyAuthenticationDemo | |
{ | |
using Extensions; | |
using Models; | |
using Nancy; | |
/// <summary> | |
/// A module that only people with SuperSecure clearance are allowed to access | |
/// </summary> | |
public class VerySecureModule : NancyModule |
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
namespace NancyConNegDemo | |
{ | |
using Extensions; | |
using Models; | |
using Nancy; | |
public class ConNegModule : NancyModule | |
{ | |
public ConNegModule() : base("/conneg") | |
{ |
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
namespace TinyTemplates.ViewEngine | |
{ | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Dynamic; | |
using System.Linq; | |
using System.Reflection; | |
using System.Text.RegularExpressions; |
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
namespace Nancy.BindingDemo | |
{ | |
using System.Linq; | |
using Nancy.BindingDemo.Database; | |
using Nancy.BindingDemo.Models; | |
using Nancy.ModelBinding; | |
public class MainModule : NancyModule | |
{ |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using Nancy; | |
using Simple.Data.Mocking; | |
using Simple.Data; | |
using System.IO; | |
using System.Reflection; | |
using System.Dynamic; |
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
namespace AppDomainTypeScanning | |
{ | |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Reflection; | |
/// <summary> | |
/// Scans the app domain for assemblies and types |
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
namespace Nancy | |
{ | |
using System.IO; | |
public class RequestStream : MemoryStream | |
{ | |
private bool disableThresholdSwitching; | |
private int thesholdLength; | |
protected static int ThreshHoldLength { get; set; } |
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 RequestStream : Stream | |
{ | |
private Stream stream; | |
private readonly long expectedLength; | |
private readonly long threshHoldLength; | |
private readonly bool disableStreamSwapping; | |
public RequestStream(long expectedLength, long threshHoldLength, bool disableStreamSwapping) | |
: this(null, expectedLength, threshHoldLength, disableStreamSwapping) | |
{ |
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
[SkippableFact] | |
public void Should_set_query_string_and_uri_correctly() | |
{ | |
Request nancyRequest = null; | |
var fakeEngine = A.Fake<INancyEngine>(); | |
A.CallTo(() => fakeEngine.HandleRequest(A<Request>.Ignored)) | |
.Invokes((f) => nancyRequest = (Request)f.Arguments[0]); | |
var fakeBootstrapper = A.Fake<INancyBootstrapper>(); | |
A.CallTo(() => fakeBootstrapper.GetEngine()).Returns(fakeEngine); |