├── .editorconfig ├── .gitattributes ├── .gitignore ├── .mailmap ├── .travis.yml ├── CONTRIBUTING.md ├── Gemfile ├── Nancy.Next.sln ├── Nancy.sln ├── Nancy.sln.DotSettings ├── NuGet.config ├── README.md ├── SharedAssemblyInfo.cs ├── appveyor.yml ├── build.ps1 ├── customassemblyinfo.rb ├── favicon.license.txt ├── global.json ├── how_to_build.txt ├── license.txt ├── rakefile.rb ├── samples ├── Nancy.Demo.Async │ ├── App.config │ ├── MainModule.cs │ ├── Nancy.Demo.Async.csproj │ └── Program.cs ├── Nancy.Demo.Authentication.Basic │ ├── AuthenticationBootstrapper.cs │ ├── MainModule.cs │ ├── Nancy.Demo.Authentication.Basic.csproj │ ├── SecureModule.cs │ ├── UserValidator.cs │ ├── Web.Debug.config │ ├── Web.Release.config │ └── Web.config ├── Nancy.Demo.Authentication.Forms.TestingDemo │ ├── LoginFixture.cs │ ├── Nancy.Demo.Authentication.Forms.TestingDemo.csproj │ ├── TestBootstrapper.cs │ ├── TestRootPathProvider.cs │ └── packages.config ├── Nancy.Demo.Authentication.Forms │ ├── FormsAuthBootstrapper.cs │ ├── MainModule.cs │ ├── Models │ │ └── UserModel.cs │ ├── Nancy.Demo.Authentication.Forms.csproj │ ├── PartlySecureModule.cs │ ├── README.txt │ ├── SecureModule.cs │ ├── UserDatabase.cs │ ├── Views │ │ ├── index.cshtml │ │ ├── login.cshtml │ │ └── secure.cshtml │ ├── Web.Debug.config │ ├── Web.Release.config │ └── Web.config ├── Nancy.Demo.Authentication.Stateless.Website │ ├── Nancy.Demo.Authentication.Stateless.Website.csproj │ ├── Scripts │ │ ├── api.js │ │ └── apiToken.js │ ├── Web.Debug.config │ ├── Web.Release.config │ ├── Web.config │ ├── index.html │ ├── login.html │ └── secure.html ├── Nancy.Demo.Authentication.Stateless │ ├── AuthModule.cs │ ├── Models │ │ └── UserModel.cs │ ├── Nancy.Demo.Authentication.Stateless.csproj │ ├── RootModule.cs │ ├── SecureModule.cs │ ├── StatelessAuthBootstrapper.cs │ ├── UserDatabase.cs │ ├── Web.Debug.config │ ├── Web.Release.config │ └── Web.config ├── Nancy.Demo.Authentication │ ├── AnotherVerySecureModule.cs │ ├── AuthenticationBootstrapper.cs │ ├── MainModule.cs │ ├── Models │ │ └── UserModel.cs │ ├── Nancy.Demo.Authentication.csproj │ ├── README.txt │ ├── SecureModule.cs │ ├── Views │ │ ├── Index.cshtml │ │ ├── Login.cshtml │ │ ├── secure.cshtml │ │ └── superSecure.cshtml │ ├── Web.Debug.config │ ├── Web.Release.config │ └── Web.config ├── Nancy.Demo.Bootstrapper.Aspnet │ ├── ApplicationDependencyClass.cs │ ├── Bootstrapper.cs │ ├── DependencyModule.cs │ ├── IApplicationDependency.cs │ ├── IRequestDependency.cs │ ├── Models │ │ ├── RatPack.cs │ │ └── RatPackWithDependencyText.cs │ ├── Nancy.Demo.Bootstrapping.Aspnet.csproj │ ├── README.txt │ ├── RequestDependencyClass.cs │ ├── Views │ │ └── razor-dependency.cshtml │ ├── Web.Debug.config │ ├── Web.Release.config │ └── Web.config ├── Nancy.Demo.Caching │ ├── CachedResponse.cs │ ├── CachingBootstrapper.cs │ ├── CachingExtensions │ │ └── ContextExtensions.cs │ ├── MainModule.cs │ ├── Nancy.Demo.Caching.csproj │ ├── README.txt │ ├── Views │ │ ├── Index.cshtml │ │ └── Payload.cshtml │ ├── Web.Debug.config │ ├── Web.Release.config │ └── Web.config ├── Nancy.Demo.ConstraintRouting │ ├── ConstraintRoutingModule.cs │ ├── EmailRouteSegmentConstraint.cs │ ├── Nancy.Demo.ConstraintRouting.csproj │ ├── Views │ │ └── Index.html │ ├── Web.Debug.config │ ├── Web.Release.config │ └── Web.config ├── Nancy.Demo.CustomModule │ ├── DemoBootstrapper.cs │ ├── MainModule.cs │ ├── Nancy.Demo.CustomModule.csproj │ ├── NancyRouteAttribute.cs │ ├── UglifiedNancyModule.cs │ ├── Views │ │ └── Index.html │ ├── Web.Debug.config │ ├── Web.Release.config │ └── Web.config ├── Nancy.Demo.Hosting.Aspnet │ ├── ApplicationDependencyClass.cs │ ├── Content │ │ ├── face.png │ │ ├── main.css │ │ └── scripts.js │ ├── CustomStatusHandler.cs │ ├── DefaultRouteMetadataProvider.cs │ ├── DemoBootstrapper.cs │ ├── DependencyModule.cs │ ├── HereBeAResponseYouScurvyDog.cs │ ├── IApplicationDependency.cs │ ├── IRequestDependency.cs │ ├── MainModule.cs │ ├── Metadata │ │ ├── MainMetadataModule.cs │ │ └── MyUberRouteMetadata.cs │ ├── Models │ │ ├── Payload.cs │ │ ├── RatPack.cs │ │ ├── RatPackWithDependencyText.cs │ │ ├── Razor2.cs │ │ └── SomeViewModel.cs │ ├── MyConfig.cs │ ├── MyConfigExtensions.cs │ ├── Nancy.Demo.Hosting.Aspnet.csproj │ ├── Piratizer4000.cs │ ├── PngSerializer.cs │ ├── README.txt │ ├── RequestDependencyClass.cs │ ├── Resources │ │ ├── Menu.Designer.cs │ │ └── Menu.resx │ ├── Views │ │ ├── FileUpload.sshtml │ │ ├── anon.spark │ │ ├── csrf.cshtml │ │ ├── dot.liquid │ │ ├── interactive-diags-methods.sshtml │ │ ├── interactive-diags-results.sshtml │ │ ├── interactive-diags.sshtml │ │ ├── javascript.html │ │ ├── meta.cshtml │ │ ├── negotiatedview.cshtml │ │ ├── nustache.nustache │ │ ├── nustachePartial.nustache │ │ ├── razor-dependency.cshtml │ │ ├── razor-divzero.cshtml │ │ ├── razor-error.cshtml │ │ ├── razor-layout-error.cshtml │ │ ├── razor-layout.cshtml │ │ ├── razor-simple.cshtml │ │ ├── razor-strong.cshtml │ │ ├── razor-strong.vbhtml │ │ ├── razor.cshtml │ │ ├── razor2.cshtml │ │ ├── routes.cshtml │ │ ├── someview.cshtml │ │ ├── spark.spark │ │ ├── ssve.sshtml │ │ ├── static.html │ │ └── uber-meta.cshtml │ ├── Web.Debug.config │ ├── Web.Release.config │ ├── Web.config │ └── packages.config ├── Nancy.Demo.Hosting.Owin │ ├── MainModule.cs │ ├── Models │ │ └── Index.cs │ ├── Nancy.Demo.Hosting.Owin.csproj │ ├── Startup.cs │ ├── Views │ │ └── Root.spark │ ├── Web.Debug.config │ ├── Web.Release.config │ ├── Web.config │ └── packages.config ├── Nancy.Demo.Hosting.Self │ ├── DemoBootstrapper.cs │ ├── Models │ │ └── Index.cs │ ├── Nancy.Demo.Hosting.Self.csproj │ ├── Program.cs │ ├── README.txt │ ├── TestModule.cs │ ├── Views │ │ ├── FileUpload.spark │ │ └── staticview.html │ └── app.config ├── Nancy.Demo.MarkdownViewEngine │ ├── Content │ │ ├── blog.css │ │ ├── images │ │ │ ├── body.png │ │ │ ├── cloud1.png │ │ │ ├── cloud2.png │ │ │ ├── cloud3.png │ │ │ ├── logo.png │ │ │ ├── mountain.png │ │ │ ├── nancy-nuget.png │ │ │ ├── post-foot.png │ │ │ ├── post-head.png │ │ │ └── post-midd.png │ │ └── js │ │ │ └── jquery.spritely-0.6.js │ ├── Model │ │ └── BlogModel.cs │ ├── Modules │ │ └── HomeModule.cs │ ├── Nancy.Demo.MarkdownViewEngine.csproj │ ├── Views │ │ ├── Posts │ │ │ ├── future-post.md │ │ │ ├── my-first-blog-post.md │ │ │ ├── readme.md │ │ │ └── why-use-nancy.md │ │ ├── blogfooter.html │ │ ├── blogheader.html │ │ ├── blogindex.html │ │ ├── master.html │ │ └── popularposts.html │ ├── packages.config │ └── web.config ├── Nancy.Demo.ModelBinding │ ├── CustomersModule.cs │ ├── Database │ │ └── DB.cs │ ├── EventsModule.cs │ ├── JsonModule.cs │ ├── MainModule.cs │ ├── ModelBinders │ │ └── CustomerModelBinder.cs │ ├── ModelBindingBootstrapper.cs │ ├── Models │ │ ├── Customer.cs │ │ ├── Event.cs │ │ └── User.cs │ ├── Nancy.Demo.ModelBinding.csproj │ ├── Views │ │ ├── Customers.spark │ │ ├── Events.spark │ │ ├── PostJson.html │ │ └── PostXml.html │ ├── Web.Debug.config │ ├── Web.Release.config │ ├── Web.config │ └── XmlModule.cs ├── Nancy.Demo.Razor.Localization │ ├── CustomResourceAssemblyProvider.cs │ ├── DemoBootstrapper.cs │ ├── Modules │ │ └── HomeModule.cs │ ├── Nancy.Demo.Razor.Localization.csproj │ ├── Resources │ │ ├── Text.Designer.cs │ │ ├── Text.de-DE.resx │ │ ├── Text.en-US.resx │ │ └── Text.resx │ ├── Views │ │ ├── CultureView-de-DE.cshtml │ │ ├── CultureView.cshtml │ │ ├── Index.cshtml │ │ └── razor-layout.cshtml │ ├── Web.Debug.config │ ├── Web.Release.config │ └── Web.config ├── Nancy.Demo.SparkViewEngine │ ├── FifthElement │ │ ├── Fifth.spark │ │ └── FifthElementModule.cs │ ├── MainModule.cs │ ├── Nancy.Demo.SparkViewEngine.csproj │ ├── Views │ │ ├── Index.spark │ │ ├── Main │ │ │ ├── test.spark │ │ │ └── test2.spark │ │ ├── Shared │ │ │ ├── application.spark │ │ │ └── html5.spark │ │ └── _SmallBit.spark │ ├── Web.Debug.config │ ├── Web.Release.config │ └── Web.config ├── Nancy.Demo.SuperSimpleViewEngine │ ├── MainModule.cs │ ├── Models │ │ └── MainModel.cs │ ├── Nancy.Demo.SuperSimpleViewEngine.csproj │ ├── Views │ │ ├── Index.sshtml │ │ ├── Login.sshtml │ │ ├── MasterPage.sshtml │ │ └── User.sshtml │ ├── Web.Debug.config │ ├── Web.Release.config │ └── Web.config └── Nancy.Demo.Validation │ ├── CustomersModule.cs │ ├── Database │ └── DB.cs │ ├── MainModule.cs │ ├── Models │ ├── Customer.cs │ ├── OddLengthStringAttribute.cs │ ├── OddLengthStringAttributeAdapter.cs │ └── Product.cs │ ├── Nancy.Demo.Validation.csproj │ ├── ProductsModule.cs │ ├── ValidationBootstrapper.cs │ ├── Views │ ├── CustomerError.spark │ └── Customers.spark │ ├── Web.Debug.config │ ├── Web.Release.config │ ├── Web.config │ └── packages.config ├── src ├── Nancy.Authentication.Basic.MSBuild │ └── Nancy.Authentication.Basic.csproj ├── Nancy.Authentication.Basic │ ├── BasicAuthentication.cs │ ├── BasicAuthenticationConfiguration.cs │ ├── BasicHttpExtensions.cs │ ├── IUserValidator.cs │ ├── Nancy.Authentication.Basic.xproj │ ├── UserPromptBehaviour.cs │ ├── nancy.authentication.basic.nuspec │ └── project.json ├── Nancy.Authentication.Forms.MSBuild │ └── Nancy.Authentication.Forms.csproj ├── Nancy.Authentication.Forms │ ├── FormsAuthentication.cs │ ├── FormsAuthenticationConfiguration.cs │ ├── IUserMapper.cs │ ├── ModuleExtensions.cs │ ├── Nancy.Authentication.Forms.xproj │ ├── nancy.authentication.forms.nuspec │ └── project.json ├── Nancy.Authentication.Stateless.MSBuild │ └── Nancy.Authentication.Stateless.csproj ├── Nancy.Authentication.Stateless │ ├── Nancy.Authentication.Stateless.xproj │ ├── StatelessAuthentication.cs │ ├── StatelessAuthenticationConfiguration.cs │ ├── nancy.authentication.stateless.nuspec │ └── project.json ├── Nancy.Embedded.MSBuild │ └── Nancy.Embedded.csproj ├── Nancy.Embedded │ ├── Conventions │ │ └── EmbeddedStaticContentConventionBuilder.cs │ ├── Nancy.Embedded.xproj │ └── project.json ├── Nancy.Encryption.MachineKey.MSBuild │ └── Nancy.Encryption.MachineKey.csproj ├── Nancy.Encryption.MachineKey │ ├── MachineKeyCryptographyConfigurations.cs │ ├── MachineKeyEncryptionProvider.cs │ ├── MachineKeyHmacProvider.cs │ ├── Nancy.Encryption.MachineKey.xproj │ ├── nancy.encryption.machinekey.nuspec │ └── project.json ├── Nancy.Hosting.Aspnet.MSBuild │ └── Nancy.Hosting.Aspnet.csproj ├── Nancy.Hosting.Aspnet │ ├── AspNetRootPathProvider.cs │ ├── BootstrapperEntry.cs │ ├── DefaultNancyAspNetBootstrapper.cs │ ├── Nancy.Hosting.Aspnet.xproj │ ├── NancyFxSection.cs │ ├── NancyHandler.cs │ ├── NancyHttpRequestHandler.cs │ ├── NancyResponseStream.cs │ ├── TinyIoCAspNetExtensions.cs │ ├── nancy.hosting.aspnet.nuspec │ ├── project.json │ └── web.config.transform ├── Nancy.Hosting.Self.MSBuild │ └── Nancy.Hosting.Self.csproj ├── Nancy.Hosting.Self │ ├── AutomaticUrlReservationCreationFailureException.cs │ ├── FileSystemRootPathProvider.cs │ ├── HostConfiguration.cs │ ├── IgnoredHeaders.cs │ ├── Nancy.Hosting.Self.xproj │ ├── NancyHost.cs │ ├── NetSh.cs │ ├── Properties │ │ └── InternalsVisibleTo.cs │ ├── UacHelper.cs │ ├── UriExtensions.cs │ ├── UrlReservations.cs │ ├── nancy.hosting.self.nuspec │ └── project.json ├── Nancy.MSBuild │ └── Nancy.csproj ├── Nancy.Metadata.Modules.MSBuild │ └── Nancy.Metadata.Modules.csproj ├── Nancy.Metadata.Modules │ ├── DefaultMetadataModuleConventions.cs │ ├── DefaultMetadataModuleResolver.cs │ ├── IMetadataModule.cs │ ├── IMetadataModuleResolver.cs │ ├── MetadataModule.cs │ ├── MetadataModuleRegistrations.cs │ ├── MetadataModuleRouteMetadataProvider.cs │ ├── Nancy.Metadata.Modules.xproj │ ├── nancy.metadata.modules.nuspec │ └── project.json ├── Nancy.Owin.MSBuild │ ├── Nancy.Owin.csproj │ └── packages.config ├── Nancy.Owin │ ├── AppBuilderExtensions.cs │ ├── Nancy.Owin.xproj │ ├── nancy.owin.nuspec │ └── project.json ├── Nancy.Testing.MSBuild │ ├── Nancy.Testing.csproj │ └── packages.config ├── Nancy.Testing │ ├── Accept.cs │ ├── AndConnector.cs │ ├── AssertEqualityComparer.cs │ ├── AssertException.cs │ ├── AssertExtensions.cs │ ├── Asserts.cs │ ├── Browser.cs │ ├── BrowserContext.cs │ ├── BrowserContextExtensions.cs │ ├── BrowserContextMultipartFormData.cs │ ├── BrowserResponse.cs │ ├── BrowserResponseBodyWrapper.cs │ ├── BrowserResponseBodyWrapperExtensions.cs │ ├── BrowserResponseExtensions.cs │ ├── ConfigurableBootstrapper.cs │ ├── ConfigurableNancyModule.cs │ ├── DocumentWrapper.cs │ ├── IBrowserContextValues.cs │ ├── IndexHelper.cs │ ├── LegacyBrowser.cs │ ├── Nancy.Testing.xproj │ ├── NancyContextExtensions.cs │ ├── NodeWrapper.cs │ ├── PassThroughStatusHandler.cs │ ├── PathHelper.cs │ ├── Properties │ │ ├── Resources.Designer.cs │ │ └── Resources.resx │ ├── QueryWrapper.cs │ ├── Resources │ │ └── Nancy Testing Cert.pfx │ ├── StaticConfigurationContext.cs │ ├── TestingViewBrowserResponseExtensions.cs │ ├── TestingViewContextKeys.cs │ ├── TestingViewFactory.cs │ ├── nancy.testing.nuspec │ └── project.json ├── Nancy.Validation.DataAnnotations.MSBuild │ └── Nancy.Validation.DataAnnotations.csproj ├── Nancy.Validation.DataAnnotations │ ├── DataAnnotationsRegistrations.cs │ ├── DataAnnotationsValidator.cs │ ├── DataAnnotationsValidatorAdapter.cs │ ├── DataAnnotationsValidatorFactory.cs │ ├── DefaultPropertyValidatorFactory.cs │ ├── DefaultValidatableObjectAdapter.cs │ ├── IDataAnnotationsValidatorAdapter.cs │ ├── IPropertyValidator.cs │ ├── IPropertyValidatorFactory.cs │ ├── IValidatableObjectAdapter.cs │ ├── Nancy.Validation.DataAnnotations.xproj │ ├── PropertyValidator.cs │ ├── RangeValidatorAdapter.cs │ ├── RegexValidatorAdapter.cs │ ├── RequiredValidatorAdapter.cs │ ├── StringLengthValidatorAdapter.cs │ ├── nancy.validation.dataannotations.nuspec │ └── project.json ├── Nancy.Validation.FluentValidation.MSBuild │ ├── Nancy.Validation.FluentValidation.csproj │ └── packages.config ├── Nancy.Validation.FluentValidation │ ├── AdapterBase.cs │ ├── DefaultFluentAdapterFactory.cs │ ├── EmailAdapter.cs │ ├── EqualAdapter.cs │ ├── ExactLengthAdapater.cs │ ├── ExclusiveBetweenAdapter.cs │ ├── FallbackAdapter.cs │ ├── FluentValidationRegistrations.cs │ ├── FluentValidationValidator.cs │ ├── FluentValidationValidatorFactory.cs │ ├── GreaterThanAdapter.cs │ ├── GreaterThanOrEqualAdapter.cs │ ├── IFluentAdapter.cs │ ├── IFluentAdapterFactory.cs │ ├── InclusiveBetweenAdapter.cs │ ├── LengthAdapter.cs │ ├── LessThanAdapter.cs │ ├── LessThanOrEqualAdapter.cs │ ├── Nancy.Validation.FluentValidation.xproj │ ├── NotEmptyAdapter.cs │ ├── NotEqualAdapter.cs │ ├── NotNullAdapter.cs │ ├── RegularExpressionAdapter.cs │ ├── nancy.validation.fluentvalidation.nuspec │ └── project.json ├── Nancy.ViewEngines.DotLiquid.MSBuild │ ├── Nancy.ViewEngines.DotLiquid.csproj │ └── packages.config ├── Nancy.ViewEngines.DotLiquid │ ├── DefaultFileSystemFactory.cs │ ├── DotLiquidRegistrations.cs │ ├── DotLiquidViewEngine.cs │ ├── DynamicDrop.cs │ ├── IFileSystemFactory.cs │ ├── LiquidNancyFileSystem.cs │ ├── Nancy.ViewEngines.DotLiquid.xproj │ ├── Resources │ │ └── 500.liquid │ ├── nancy.viewengines.dotliquid.nuspec │ └── project.json ├── Nancy.ViewEngines.Markdown.MSBuild │ ├── Nancy.ViewEngines.Markdown.csproj │ └── packages.config ├── Nancy.ViewEngines.Markdown │ ├── MarkDownViewEngine.cs │ ├── MarkdownViewEngineHost.cs │ ├── MarkdownViewengineRender.cs │ ├── Nancy.ViewEngines.Markdown.xproj │ ├── Nancy.Viewengines.Markdown.nuspec │ └── project.json ├── Nancy.ViewEngines.Nustache.MSBuild │ ├── Nancy.ViewEngines.Nustache.csproj │ └── packages.config ├── Nancy.ViewEngines.Nustache │ ├── Nancy.ViewEngines.Nustache.xproj │ ├── NustacheViewEngine.cs │ ├── nancy.viewengines.nustache.nuspec │ └── project.json ├── Nancy.ViewEngines.Razor.BuildProviders.MSBuild │ ├── Nancy.ViewEngines.Razor.BuildProviders.csproj │ └── packages.config ├── Nancy.ViewEngines.Razor.BuildProviders │ ├── Nancy.ViewEngines.Razor.BuildProviders.xproj │ ├── NancyCSharpRazorBuildProvider.cs │ └── project.json ├── Nancy.ViewEngines.Razor.MSBuild │ ├── Nancy.ViewEngines.Razor.csproj │ └── packages.config ├── Nancy.ViewEngines.Razor │ ├── AttributeValue.cs │ ├── CSharp │ │ ├── CSharpClrTypeResolver.cs │ │ ├── CSharpRazorViewRenderer.cs │ │ └── NancyCSharpRazorCodeParser.cs │ ├── ClrTypeResolver.cs │ ├── CodeParserHelper.cs │ ├── DefaultRazorConfiguration.cs │ ├── EncodedHtmlString.cs │ ├── HelperResult.cs │ ├── HtmlHelpers.cs │ ├── HtmlHelpersExtensions.cs │ ├── IHtmlString.cs │ ├── INancyRazorView.cs │ ├── IRazorConfiguration.cs │ ├── IRazorViewRenderer.cs │ ├── ModelCodeGenerator.cs │ ├── Nancy.ViewEngines.Razor.xproj │ ├── NancyRazorEngineHost.cs │ ├── NancyRazorErrorView.cs │ ├── NancyRazorViewBase.cs │ ├── NonEncodedHtmlString.cs │ ├── RazorAssemblyProvider.cs │ ├── RazorConfigurationSection.cs │ ├── RazorViewEngine.cs │ ├── RazorViewEngineApplicationStartupRegistrations.cs │ ├── Resources │ │ └── CompilationError.html │ ├── UrlHelpers.cs │ ├── app.config.transform │ ├── nancy.viewengines.razor.nuspec │ ├── project.json │ ├── targets │ │ └── Nancy.ViewEngines.Razor.targets │ └── web.config.transform ├── Nancy.ViewEngines.Spark.MSBuild │ ├── Nancy.ViewEngines.Spark.csproj │ └── packages.config ├── Nancy.ViewEngines.Spark │ ├── Descriptors │ │ ├── BuildDescriptorParams.cs │ │ ├── DefaultDescriptorBuilder.cs │ │ ├── DescriptorFilterExtensions.cs │ │ ├── IDescriptorBuilder.cs │ │ └── IDescriptorFilter.cs │ ├── Nancy.ViewEngines.Spark.xproj │ ├── NancyBindingProvider.cs │ ├── NancySparkView.cs │ ├── NancyViewData.cs │ ├── NancyViewFolder.cs │ ├── SparkRenderContextWrapper.cs │ ├── SparkViewEngine.cs │ ├── SparkViewEngineResult.cs │ ├── nancy.viewengines.spark.nuspec │ └── project.json └── Nancy │ ├── AfterPipeline.cs │ ├── AppDomainAssemblyCatalog.cs │ ├── ArrayCache.cs │ ├── AsyncNamedPipelineBase.cs │ ├── BeforePipeline.cs │ ├── Bootstrapper │ ├── BootstrapperException.cs │ ├── CollectionTypeRegistration.cs │ ├── ContainerRegistration.cs │ ├── FavIconApplicationStartup.cs │ ├── IApplicationStartup.cs │ ├── INancyBootstrapper.cs │ ├── IPipelines.cs │ ├── IRegistrations.cs │ ├── IRequestStartup.cs │ ├── InstanceRegistration.cs │ ├── Lifetime.cs │ ├── ModuleRegistrationType.cs │ ├── MultipleRootPathProvidersLocatedException.cs │ ├── NancyBootstrapperBase.cs │ ├── NancyBootstrapperLocator.cs │ ├── NancyBootstrapperWithRequestContainerBase.cs │ ├── NancyInternalConfiguration.cs │ ├── Pipelines.cs │ ├── Registrations.cs │ └── TypeRegistration.cs │ ├── Configuration │ ├── ConfigurationException.cs │ ├── DefaultNancyEnvironment.cs │ ├── DefaultNancyEnvironmentConfigurator.cs │ ├── DefaultNancyEnvironmentFactory.cs │ ├── INancyDefaultConfigurationProvider.cs │ ├── INancyEnvironment.cs │ ├── INancyEnvironmentConfigurator.cs │ ├── INancyEnvironmentExtensions.cs │ ├── INancyEnvironmentFactory.cs │ └── NancyDefaultConfigurationProvider.cs │ ├── Conventions │ ├── AcceptHeaderCoercionConventions.cs │ ├── BuiltInAcceptHeaderCoercions.cs │ ├── BuiltInCultureConventions.cs │ ├── CultureConventions.cs │ ├── DefaultAcceptHeaderCoercionConventions.cs │ ├── DefaultCultureConventions.cs │ ├── DefaultStaticContentsConventions.cs │ ├── DefaultViewLocationConventions.cs │ ├── IConvention.cs │ ├── NancyConventions.cs │ ├── StaticContentConventionBuilder.cs │ ├── StaticContentHelper.cs │ ├── StaticContentsConventions.cs │ ├── StaticContentsConventionsExtensions.cs │ ├── StaticDirectoryContent.cs │ ├── StaticFileContent.cs │ └── ViewLocationConventions.cs │ ├── Cookies │ ├── INancyCookie.cs │ └── NancyCookie.cs │ ├── Cryptography │ ├── Base64Helpers.cs │ ├── CryptographyConfiguration.cs │ ├── DefaultHmacProvider.cs │ ├── HmacComparer.cs │ ├── IEncryptionProvider.cs │ ├── IHmacProvider.cs │ ├── IKeyGenerator.cs │ ├── NoEncryptionProvider.cs │ ├── PassphraseKeyGenerator.cs │ ├── RandomKeyGenerator.cs │ └── RijndaelEncryptionProvider.cs │ ├── Culture │ ├── DefaultCultureService.cs │ └── ICultureService.cs │ ├── DefaultGlobalizationConfigurationProvider.cs │ ├── DefaultNancyBootstrapper.cs │ ├── DefaultNancyContextFactory.cs │ ├── DefaultObjectSerializer.cs │ ├── DefaultResponseFormatter.cs │ ├── DefaultResponseFormatterFactory.cs │ ├── DefaultRootPathProvider.cs │ ├── DefaultRouteConfigurationProvider.cs │ ├── DefaultRuntimeEnvironmentInformation.cs │ ├── DefaultSerializerFactory.cs │ ├── DefaultStaticContentConfigurationProvider.cs │ ├── DefaultStaticContentProvider.cs │ ├── DefaultTraceConfigurationProvider.cs │ ├── DefaultTypeCatalog.cs │ ├── DefaultViewConfigurationProvider.cs │ ├── Diagnostics │ ├── ConcurrentLimitedCollection.cs │ ├── DefaultDiagnostics.cs │ ├── DefaultDiagnosticsConfigurationProvider.cs │ ├── DefaultRequestTrace.cs │ ├── DefaultRequestTraceFactory.cs │ ├── DefaultRequestTracing.cs │ ├── DefaultTraceLog.cs │ ├── DescriptionAttribute.cs │ ├── DiagnosticModule.cs │ ├── DiagnosticsConfiguration.cs │ ├── DiagnosticsConfigurationExtensions.cs │ ├── DiagnosticsHook.cs │ ├── DiagnosticsModuleBuilder.cs │ ├── DiagnosticsModuleCatalog.cs │ ├── DiagnosticsSerializerFactory.cs │ ├── DiagnosticsSession.cs │ ├── DiagnosticsViewRenderer.cs │ ├── DisabledDiagnostics.cs │ ├── IDiagnostics.cs │ ├── IDiagnosticsProvider.cs │ ├── IInteractiveDiagnostics.cs │ ├── IRequestTrace.cs │ ├── IRequestTraceFactory.cs │ ├── IRequestTracing.cs │ ├── ITraceLog.cs │ ├── InteractiveDiagnostic.cs │ ├── InteractiveDiagnosticMethod.cs │ ├── InteractiveDiagnostics.cs │ ├── Modules │ │ ├── InfoModule.cs │ │ ├── InteractiveModule.cs │ │ ├── MainModule.cs │ │ ├── SettingsModule.cs │ │ └── TraceModule.cs │ ├── NullLog.cs │ ├── RequestData.cs │ ├── RequestTraceSession.cs │ ├── Resources │ │ ├── 960.css │ │ ├── Modules │ │ │ ├── interactive │ │ │ │ ├── methods.js │ │ │ │ ├── providers.js │ │ │ │ └── results.js │ │ │ └── tracing │ │ │ │ ├── sessions.js │ │ │ │ └── traces.js │ │ ├── backbone-min.js │ │ ├── diagnostics.js │ │ ├── handlebars.js │ │ ├── info.png │ │ ├── interactive-diagnostics.js │ │ ├── interactive.css │ │ ├── interactive.png │ │ ├── jquery-1.7.1.min.js │ │ ├── jsonreport.js │ │ ├── logo.png │ │ ├── logs.png │ │ ├── main.css │ │ ├── nancy-common.js │ │ ├── request-tracing.js │ │ ├── reset.css │ │ ├── settings.png │ │ ├── text.css │ │ └── underscore-min.js │ ├── ResponseData.cs │ ├── TemplateAttribute.cs │ ├── TestingDiagnosticProvider.cs │ └── Views │ │ ├── Dashboard.sshtml │ │ ├── Info.sshtml │ │ ├── InteractiveDiagnostics.sshtml │ │ ├── RequestTracing.sshtml │ │ ├── Settings.sshtml │ │ ├── _DiagnosticsMaster.sshtml │ │ ├── help.sshtml │ │ └── login.sshtml │ ├── DisabledStaticContentProvider.cs │ ├── DynamicDictionary.cs │ ├── DynamicDictionaryValue.cs │ ├── ErrorHandling │ ├── DefaultStatusCodeHandler.cs │ ├── Resources │ │ ├── 404.html │ │ └── 500.html │ └── RouteExecutionEarlyExitException.cs │ ├── ErrorPipeline.cs │ ├── Extensions │ ├── AssemblyExtensions.cs │ ├── CollectionExtensions.cs │ ├── ContextExtensions.cs │ ├── ModelValidationErrorExtensions.cs │ ├── ModuleExtensions.cs │ ├── RequestExtensions.cs │ ├── RequestStreamExtensions.cs │ ├── StreamExtensions.cs │ ├── StringExtensions.cs │ └── TypeExtensions.cs │ ├── FormatterExtensions.cs │ ├── GlobalizationConfiguration.cs │ ├── GlobalizationConfigurationExtensions.cs │ ├── HeadResponse.cs │ ├── Helpers │ ├── CacheHelpers.cs │ ├── ExceptionExtensions.cs │ ├── HttpEncoder.cs │ ├── HttpUtility.cs │ ├── ReflectionUtils.cs │ └── TaskHelpers.cs │ ├── HttpFile.cs │ ├── HttpMultipart.cs │ ├── HttpMultipartBoundary.cs │ ├── HttpMultipartBuffer.cs │ ├── HttpMultipartSubStream.cs │ ├── HttpStatusCode.cs │ ├── IAssemblyCatalog.cs │ ├── IHideObjectMembers.cs │ ├── INancyContextFactory.cs │ ├── INancyEngine.cs │ ├── INancyModule.cs │ ├── INancyModuleCatalog.cs │ ├── IO │ ├── RequestStream.cs │ └── UnclosableStreamWrapper.cs │ ├── IObjectSerializer.cs │ ├── IObjectSerializerSelector.cs │ ├── IResourceAssemblyProvider.cs │ ├── IResponseFormatter.cs │ ├── IResponseFormatterFactory.cs │ ├── IRootPathProvider.cs │ ├── IRuntimeEnvironmentInformation.cs │ ├── ISerializer.cs │ ├── ISerializerFactory.cs │ ├── IStaticContentProvider.cs │ ├── IStatusCodeHandler.cs │ ├── ITypeCatalog.cs │ ├── IncludeInNancyAssemblyScanningAttribute.cs │ ├── Json │ ├── Converters │ │ ├── TimeSpanConverter.cs │ │ └── TupleConverter.cs │ ├── DefaultJsonConfigurationProvider.cs │ ├── JavaScriptConverter.cs │ ├── JavaScriptPrimitiveConverter.cs │ ├── JavaScriptSerializer.cs │ ├── Json.cs │ ├── JsonConfiguration.cs │ ├── JsonConfigurationExtensions.cs │ ├── ScriptIgnoreAttribute.cs │ ├── Simple │ │ ├── NancySerializationStrategy.cs │ │ └── SimpleJson.cs │ └── StringBuilderExtensions.cs │ ├── Jsonp.cs │ ├── JsonpApplicationStartup.cs │ ├── LegacyNancyModule.cs │ ├── LibraryManagerAssemblyCatalog.cs │ ├── Localization │ ├── ITextResource.cs │ ├── ResourceBasedTextResource.cs │ └── TextResourceFinder.cs │ ├── MimeTypes.cs │ ├── ModelBinding │ ├── BindingConfig.cs │ ├── BindingContext.cs │ ├── BindingDefaults.cs │ ├── BindingMemberInfo.cs │ ├── DefaultBinder.cs │ ├── DefaultBodyDeserializers │ │ ├── JsonBodyDeserializer.cs │ │ └── XmlBodyDeserializer.cs │ ├── DefaultConverters │ │ ├── CollectionConverter.cs │ │ ├── DateTimeConverter.cs │ │ ├── FallbackConverter.cs │ │ └── NumericConverter.cs │ ├── DefaultFieldNameConverter.cs │ ├── DefaultModelBinderLocator.cs │ ├── DynamicModelBinderAdapter.cs │ ├── ExpressionExtensions.cs │ ├── IBinder.cs │ ├── IBodyDeserializer.cs │ ├── IFieldNameConverter.cs │ ├── IModelBinder.cs │ ├── IModelBinderLocator.cs │ ├── ITypeConverter.cs │ ├── ModelBindingException.cs │ ├── ModuleExtensions.cs │ └── PropertyBindingException.cs │ ├── NamedPipelineBase.cs │ ├── Nancy.xproj │ ├── NancyContext.cs │ ├── NancyEngine.cs │ ├── NancyEngineExtensions.cs │ ├── NancyModule.cs │ ├── NegotiatorExtensions.cs │ ├── NotFoundResponse.cs │ ├── Owin │ ├── DelegateExtensions.cs │ ├── NancyContextExtensions.cs │ ├── NancyMiddleware.cs │ ├── NancyOptions.cs │ └── NancyOptionsExtensions.cs │ ├── PipelineItem.cs │ ├── Properties │ └── InternalsVisibleTo.cs │ ├── Request.cs │ ├── RequestExecutionException.cs │ ├── RequestHeaders.cs │ ├── ResourceAssemblyProvider.cs │ ├── Response.cs │ ├── ResponseExtensions.cs │ ├── Responses │ ├── DefaultJsonSerializer.cs │ ├── DefaultXmlSerializer.cs │ ├── EmbeddedFileResponse.cs │ ├── GenericFileResponse.cs │ ├── HtmlResponse.cs │ ├── JsonResponse.cs │ ├── MaterialisingResponse.cs │ ├── NegotiatedResponse.cs │ ├── Negotiation │ │ ├── DefaultResponseNegotiator.cs │ │ ├── IResponseNegotiator.cs │ │ ├── IResponseProcessor.cs │ │ ├── JsonProcessor.cs │ │ ├── MatchResult.cs │ │ ├── MediaRange.cs │ │ ├── MediaRangeParameters.cs │ │ ├── MediaType.cs │ │ ├── NegotiationContext.cs │ │ ├── Negotiator.cs │ │ ├── ProcessorMatch.cs │ │ ├── ResponseProcessor.cs │ │ ├── ViewProcessor.cs │ │ └── XmlProcessor.cs │ ├── NotAcceptableResponse.cs │ ├── RedirectResponse.cs │ ├── StreamResponse.cs │ ├── TextResponse.cs │ └── XmlResponse.cs │ ├── RouteConfiguration.cs │ ├── RouteConfigurationExtensions.cs │ ├── Routing │ ├── Constraints │ │ ├── AlphaRouteSegmentConstraint.cs │ │ ├── BoolRouteSegmentConstraint.cs │ │ ├── CustomDateTimeRouteSegmentConstraint.cs │ │ ├── DateTimeRouteSegmentConstraint.cs │ │ ├── DecimalRouteSegmentConstraint.cs │ │ ├── GuidRouteSegmentConstraint.cs │ │ ├── IRouteSegmentConstraint.cs │ │ ├── IntRouteSegmentConstraint.cs │ │ ├── LengthRouteSegmentConstraint.cs │ │ ├── LongRouteSegmentConstraint.cs │ │ ├── MaxLengthRouteSegmentConstraint.cs │ │ ├── MaxRouteSegmentConstraint.cs │ │ ├── MinLengthRouteSegmentConstraint.cs │ │ ├── MinRouteSegmentConstraint.cs │ │ ├── ParameterizedRouteSegmentConstraintBase.cs │ │ ├── RangeRouteSegmentConstraint.cs │ │ ├── RouteSegmentConstraintBase.cs │ │ └── VersionRouteSegmentConstraint.cs │ ├── DefaultNancyModuleBuilder.cs │ ├── DefaultRequestDispatcher.cs │ ├── DefaultRouteCacheProvider.cs │ ├── DefaultRouteDescriptionProvider.cs │ ├── DefaultRouteInvoker.cs │ ├── DefaultRoutePatternMatcher.cs │ ├── DefaultRouteResolver.cs │ ├── DefaultRouteSegmentExtractor.cs │ ├── INancyModuleBuilder.cs │ ├── IRequestDispatcher.cs │ ├── IRouteCache.cs │ ├── IRouteCacheProvider.cs │ ├── IRouteDescriptionProvider.cs │ ├── IRouteInvoker.cs │ ├── IRouteMetadataProvider.cs │ ├── IRoutePatternMatchResult.cs │ ├── IRoutePatternMatcher.cs │ ├── IRouteResolver.cs │ ├── IRouteSegmentExtractor.cs │ ├── MethodNotAllowedRoute.cs │ ├── NotFoundRoute.cs │ ├── OptionsRoute.cs │ ├── ParameterSegmentInformation.cs │ ├── ResolveResult.cs │ ├── Route.cs │ ├── RouteCache.cs │ ├── RouteCacheExtensions.cs │ ├── RouteDescription.cs │ ├── RouteMetadata.cs │ ├── RouteMetadataProvider.cs │ ├── RoutePatternMatchResult.cs │ └── Trie │ │ ├── IRouteResolverTrie.cs │ │ ├── ITrieNodeFactory.cs │ │ ├── MatchResult.cs │ │ ├── NodeData.cs │ │ ├── NodeDataExtensions.cs │ │ ├── Nodes │ │ ├── CaptureNode.cs │ │ ├── CaptureNodeWithConstraint.cs │ │ ├── CaptureNodeWithDefaultValue.cs │ │ ├── CaptureNodeWithMultipleParameters.cs │ │ ├── GreedyCaptureNode.cs │ │ ├── GreedyRegExCaptureNode.cs │ │ ├── LiteralNode.cs │ │ ├── OptionalCaptureNode.cs │ │ ├── RegExNode.cs │ │ ├── RootNode.cs │ │ └── TrieNode.cs │ │ ├── RouteResolverTrie.cs │ │ ├── SegmentMatch.cs │ │ └── TrieNodeFactory.cs │ ├── Security │ ├── ClaimsPrincipalExtensions.cs │ ├── Csrf.cs │ ├── CsrfApplicationStartup.cs │ ├── CsrfToken.cs │ ├── CsrfTokenExtensions.cs │ ├── CsrfTokenValidationResult.cs │ ├── CsrfValidationException.cs │ ├── DefaultCsrfTokenValidator.cs │ ├── ICsrfTokenValidator.cs │ ├── ModuleSecurity.cs │ ├── SSLProxy.cs │ └── SecurityHooks.cs │ ├── Session │ ├── CookieBasedSessions.cs │ ├── CookieBasedSessionsConfiguration.cs │ ├── ISession.cs │ ├── NullSessionProvider.cs │ └── Session.cs │ ├── StaticConfiguration.cs │ ├── StaticContent.cs │ ├── StaticContentConfiguration.cs │ ├── StaticContentConfigurationExtensions.cs │ ├── TinyIoc │ └── TinyIoC.cs │ ├── TraceConfiguration.cs │ ├── TraceConfigurationExtensions.cs │ ├── TypeCatalogExtensions.cs │ ├── TypeResolveStrategies.cs │ ├── TypeResolveStrategy.cs │ ├── Url.cs │ ├── Validation │ ├── CompositeValidator.cs │ ├── DefaultValidatorLocator.cs │ ├── IModelValidator.cs │ ├── IModelValidatorFactory.cs │ ├── IModelValidatorLocator.cs │ ├── ModelValidationDescriptor.cs │ ├── ModelValidationError.cs │ ├── ModelValidationException.cs │ ├── ModelValidationResult.cs │ ├── ModelValidationRule.cs │ ├── ModuleExtensions.cs │ └── Rules │ │ ├── ComparisonOperator.cs │ │ ├── ComparisonValidationRule.cs │ │ ├── NotEmptyValidationRule.cs │ │ ├── NotNullValidationRule.cs │ │ ├── RegexValidationRule.cs │ │ └── StringLengthValidationRule.cs │ ├── ViewConfiguration.cs │ ├── ViewConfigurationExtensions.cs │ ├── ViewEngines │ ├── AmbiguousViewsException.cs │ ├── DefaultFileSystemReader.cs │ ├── DefaultRenderContext.cs │ ├── DefaultRenderContextFactory.cs │ ├── DefaultResourceReader.cs │ ├── DefaultViewCache.cs │ ├── DefaultViewFactory.cs │ ├── DefaultViewLocator.cs │ ├── DefaultViewRenderer.cs │ ├── DefaultViewResolver.cs │ ├── Extensions.cs │ ├── FileSystemViewLocationProvider.cs │ ├── FileSystemViewLocationResult.cs │ ├── IFileSystemReader.cs │ ├── IRenderContext.cs │ ├── IRenderContextFactory.cs │ ├── IResourceReader.cs │ ├── IViewCache.cs │ ├── IViewEngine.cs │ ├── IViewFactory.cs │ ├── IViewLocationProvider.cs │ ├── IViewLocator.cs │ ├── IViewRenderer.cs │ ├── IViewResolver.cs │ ├── ResourceViewLocationProvider.cs │ ├── SuperSimpleViewEngine │ │ ├── ISuperSimpleViewEngineMatcher.cs │ │ ├── IViewEngineHost.cs │ │ ├── NancyViewEngineHost.cs │ │ ├── SuperSimpleViewEngine.cs │ │ ├── SuperSimpleViewEngineRegistrations.cs │ │ └── SuperSimpleViewEngineWrapper.cs │ ├── ViewEngineApplicationStartup.cs │ ├── ViewEngineStartupContext.cs │ ├── ViewLocationContext.cs │ ├── ViewLocationResult.cs │ ├── ViewNotFoundException.cs │ └── ViewRenderException.cs │ ├── ViewRenderer.cs │ ├── Xml │ ├── DefaultXmlConfigurationProvider.cs │ ├── XmlConfiguration.cs │ └── XmlConfigurationExtensions.cs │ ├── favicon.ico │ ├── nancy.nuspec │ └── project.json ├── sub_projects.rb ├── test ├── Nancy.Authentication.Basic.Tests.MSBuild │ ├── Nancy.Authentication.Basic.Tests.csproj │ └── packages.config ├── Nancy.Authentication.Basic.Tests │ ├── BasicAuthenticationConfigurationFixture.cs │ ├── BasicAuthenticationFixture.cs │ ├── Nancy.Authentication.Basic.Tests.xproj │ ├── Properties │ │ └── AssemblyInfo.cs │ └── project.json ├── Nancy.Authentication.Forms.Tests.MSBuild │ ├── Nancy.Authentication.Forms.Tests.csproj │ └── packages.config ├── Nancy.Authentication.Forms.Tests │ ├── FormsAuthenticationConfigurationFixture.cs │ ├── FormsAuthenticationFixture.cs │ ├── Nancy.Authentication.Forms.Tests.xproj │ ├── Properties │ │ └── AssemblyInfo.cs │ └── project.json ├── Nancy.Embedded.Tests.MSBuild │ ├── Nancy.Embedded.Tests.csproj │ └── packages.config ├── Nancy.Embedded.Tests │ ├── Nancy.Embedded.Tests.xproj │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Resources │ │ ├── Subfolder-with-hyphen │ │ │ └── embedded3.txt │ │ ├── Subfolder │ │ │ └── embedded2.txt │ │ └── embedded.txt │ ├── Unit │ │ └── EmbeddedStaticContentConventionBuilderFixture.cs │ └── project.json ├── Nancy.Encryption.MachineKey.Tests.MSBuild │ ├── Nancy.Encryption.MachineKey.Tests.csproj │ └── packages.config ├── Nancy.Encryption.MachineKey.Tests │ ├── MachineConfigEncryptionProviderFixture.cs │ ├── MachineKeyHmacProviderFixture.cs │ ├── Nancy.Encryption.MachineKey.Tests.xproj │ ├── Properties │ │ └── AssemblyInfo.cs │ └── project.json ├── Nancy.Hosting.Aspnet.Tests.MSBuild │ ├── Nancy.Hosting.Aspnet.Tests.csproj │ └── packages.config ├── Nancy.Hosting.Aspnet.Tests │ ├── Nancy.Hosting.Aspnet.Tests.xproj │ ├── NancyHandlerFixture.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── project.json ├── Nancy.Hosting.Self.Tests.MSBuild │ ├── Nancy.Hosting.Self.Tests.csproj │ └── packages.config ├── Nancy.Hosting.Self.Tests │ ├── IsCaseInstensitiveBaseOfFixture.cs │ ├── MakeAppLocalPathFixture.cs │ ├── Nancy.Hosting.Self.Tests.xproj │ ├── NancySelfHostFixture.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── TestModule.cs │ └── project.json ├── Nancy.Metadata.Modules.Tests.MSBuild │ ├── Nancy.Metadata.Modules.Tests.csproj │ └── packages.config ├── Nancy.Metadata.Modules.Tests │ ├── DefaultMetadataModuleConventionsFixture.cs │ ├── FakeLegacyNancyMetadataModule.cs │ ├── FakeLegacyNancyModule.cs │ ├── FakeNancyMetadataModule.cs │ ├── Metadata │ │ └── FakeLegacyNancyMetadataModule.cs │ ├── MetadataModuleFixture.cs │ ├── MetadataModuleRouteMetadataProviderFixture.cs │ ├── Modules │ │ └── FakeLegacyNancyModule.cs │ ├── Nancy.Metadata.Modules.Tests.xproj │ ├── Properties │ │ └── AssemblyInfo.cs │ └── project.json ├── Nancy.Owin.Tests.MSBuild │ ├── Nancy.Owin.Tests.csproj │ └── packages.config ├── Nancy.Owin.Tests │ ├── AppBuilderExtensionsFixture.cs │ ├── Nancy.Owin.Tests.xproj │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── app.config │ └── project.json ├── Nancy.Testing.Tests.MSBuild │ ├── Nancy.Testing.Tests.csproj │ └── packages.config ├── Nancy.Testing.Tests │ ├── AndConnectorTests.cs │ ├── AssertEqualityComparerFixture.cs │ ├── AssertExtensionsTests.cs │ ├── BrowserContextExtensionsFixture.cs │ ├── BrowserDefaultsFixture.cs │ ├── BrowserFixture.cs │ ├── BrowserResponseBodyWrapperExtensionsFixture.cs │ ├── BrowserResponseBodyWrapperFixture.cs │ ├── BrowserResponseExtensionsTests.cs │ ├── CaseSensitivityFixture.cs │ ├── ConfigurableBootstrapperDependenciesTests.cs │ ├── ConfigurableBootstrapperFixture.cs │ ├── ContextExtensionsTests.cs │ ├── DocumentWrapperTests.cs │ ├── Nancy.Testing.Tests.xproj │ ├── PathHelperTests.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── QueryWrapperTests.cs │ ├── TestingViewExtensions │ │ ├── GetModelExtententionsTests.cs │ │ ├── GetModuleNameExtensionTests.cs │ │ ├── GetModulePathExtensionMethodTests.cs │ │ ├── GetViewNameExtensionTests.cs │ │ ├── TestingViewFactoryTestModule.cs │ │ └── ViewFactoryTest.sshtml │ └── project.json ├── Nancy.Tests.Functional.MSBuild │ ├── Nancy.Tests.Functional.csproj │ └── packages.config ├── Nancy.Tests.Functional │ ├── Content │ │ └── smiley.png │ ├── Hidden.txt │ ├── Modules │ │ ├── AbsoluteUrlTestModule.cs │ │ ├── CookieModule.cs │ │ ├── JsonpTestModule.cs │ │ ├── PerRouteAuthModule.cs │ │ ├── RazorTestModule.cs │ │ ├── RazorWithTracingTestModule.cs │ │ ├── SerializeTestModule.cs │ │ ├── SerializerTestModule.cs │ │ └── ThrowingModule.cs │ ├── Nancy.Tests.Functional.xproj │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Tests │ │ ├── AbsoluteUrlTests.cs │ │ ├── AsyncExceptionTests.cs │ │ ├── BasicRouteInvocationsFixture.cs │ │ ├── ContentNegotiationFixture.cs │ │ ├── CookieFixture.cs │ │ ├── JsonpTests.cs │ │ ├── ManualStaticContentTests.cs │ │ ├── MethodRewriteFixture.cs │ │ ├── ModelBindingTests.cs │ │ ├── PartialViewTests.cs │ │ ├── PerRouteAuthFixture.cs │ │ ├── RouteConstraintTests.cs │ │ ├── SerializeTests.cs │ │ ├── SerializerTests.cs │ │ ├── TracingSmokeTests.cs │ │ └── ViewBagTests.cs │ ├── Views │ │ ├── RazorPage.cshtml │ │ ├── RazorPageWithUnknownPartial.cshtml │ │ ├── _LayoutPage.cshtml │ │ ├── _PartialTest.cshtml │ │ └── _ViewStart.cshtml │ └── project.json ├── Nancy.Tests.MSBuild │ ├── Nancy.Tests.csproj │ └── packages.config ├── Nancy.Tests │ ├── Extensions │ │ └── ResponseExtensions.cs │ ├── Fakes │ │ ├── FakeDefaultNancyBootstrapper.cs │ │ ├── FakeHookedModule.cs │ │ ├── FakeLegacyNancyModuleNoRoutes.cs │ │ ├── FakeModuleCatalog.cs │ │ ├── FakeNancyModule.cs │ │ ├── FakeNancyModuleNoRoutes.cs │ │ ├── FakeNancyModuleWithBasePath.cs │ │ ├── FakeNancyModuleWithDependency.cs │ │ ├── FakeNancyModuleWithPreAndPostHooks.cs │ │ ├── FakeNancyModuleWithoutBasePath.cs │ │ ├── FakeObjectSerializer.cs │ │ ├── FakeRequest.cs │ │ ├── FakeRoute.cs │ │ ├── FakeRouteCache.cs │ │ ├── FakeRoutePatternMatchResult.cs │ │ ├── FakeRouteResolver.cs │ │ ├── FakeViewEngine.cs │ │ ├── FakeViewEngineHost.cs │ │ ├── MockPipelines.cs │ │ ├── Person.cs │ │ ├── PersonWithAgeField.cs │ │ ├── StructModel.cs │ │ └── ViewModel.cs │ ├── Helpers │ │ ├── CacheHelpersFixture.cs │ │ └── ExceptionExtensionsFixture.cs │ ├── Nancy.Tests.xproj │ ├── NoAppStartupsFixture.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Resources │ │ ├── Assets │ │ │ └── Styles │ │ │ │ ├── Sub.folder │ │ │ │ └── styles.css │ │ │ │ ├── Sub │ │ │ │ └── styles.css │ │ │ │ ├── css │ │ │ │ └── styles.css │ │ │ │ ├── dotted.filename.css │ │ │ │ ├── space in name.css │ │ │ │ ├── strange-css-filename.css │ │ │ │ └── styles.css │ │ ├── Link.Texts.Designer.cs │ │ ├── Link.Texts.resx │ │ ├── Menu.Designer.cs │ │ ├── Menu.Texts.Designer.cs │ │ ├── Menu.Texts.resx │ │ ├── Menu.resx │ │ ├── Views │ │ │ ├── SuperSimpleViewEngineSampleContent.cs │ │ │ └── staticviewresource.html │ │ ├── test.txt │ │ └── zip.png │ ├── Responses │ │ └── MaterialisingResponseFixture.cs │ ├── ShouldExtensions.cs │ ├── Unit │ │ ├── AfterPipelineFixture.cs │ │ ├── BeforePipelineFixture.cs │ │ ├── Bootstrapper │ │ │ ├── Base │ │ │ │ ├── BootstrapperBaseFixtureBase.cs │ │ │ │ └── ModuleCatalogFixtureBase.cs │ │ │ ├── BootstrapperLocatorFixture.cs │ │ │ ├── CollectionTypeRegistrationFixture.cs │ │ │ ├── InstanceRegistrationFixture.cs │ │ │ ├── NancyBootstrapperBaseFixture.cs │ │ │ ├── NancyBootstrapperWithRequestContainerBaseFixture.cs │ │ │ ├── NancyInternalConfigurationFixture.cs │ │ │ ├── PipelinesFixture.cs │ │ │ └── TypeRegistrationFixture.cs │ │ ├── Configuration │ │ │ ├── DefaultNancyEnvironmentConfiguratorFixture.cs │ │ │ ├── DefaultNancyEnvironmentFactoryFixture.cs │ │ │ ├── DefaultNancyEnvironmentFixture.cs │ │ │ └── INancyEnvironmentExtensionsFixture.cs │ │ ├── Conventions │ │ │ ├── DefaultAcceptHeaderCoercionConventionsFixture.cs │ │ │ ├── DefaultCultureConventionsFixture.cs │ │ │ ├── DefaultStaticContentsConventionsFixture.cs │ │ │ └── DefaultViewLocationConventionsFixture.cs │ │ ├── Cryptography │ │ │ ├── DefaultHmacProviderFixture.cs │ │ │ ├── HmacComparerFixture.cs │ │ │ ├── NoEncryptionProviderFixture.cs │ │ │ └── RijndaelEncryptionProviderFixture.cs │ │ ├── Culture │ │ │ └── BuiltInCultureConventionFixture.cs │ │ ├── DefaultNancyBootstrapperBootstrapperBaseFixture.cs │ │ ├── DefaultNancyBootstrapperFixture.cs │ │ ├── DefaultNancyBootstrapperModuleCatalogFixture.cs │ │ ├── DefaultResponseFormatterFactoryFixture.cs │ │ ├── DefaultResponseFormatterFixture.cs │ │ ├── DefaultSerializerFactoryFixture.cs │ │ ├── Diagnostics │ │ │ ├── ConcurrentLimitedCollectionFixture.cs │ │ │ ├── CustomInteractiveDiagnosticsFixture.cs │ │ │ ├── DefaultRequestTraceFactoryFixture.cs │ │ │ ├── DiagnosticsHookFixture.cs │ │ │ └── InteractiveDiagnosticsFixture.cs │ │ ├── DynamicDictionaryFixture.cs │ │ ├── DynamicDictionaryValueFixture.cs │ │ ├── ErrorHandling │ │ │ └── DefaultStatusCodeHandlerFixture.cs │ │ ├── ErrorPipelineFixture.cs │ │ ├── Extensions │ │ │ ├── ContextExtensionsFixture.cs │ │ │ ├── RequestExtensionsFixture.cs │ │ │ ├── RequestStreamExtensionsFixture.cs │ │ │ ├── StringExtensionsFixture.cs │ │ │ └── TypeExtensionsFixture.cs │ │ ├── FormatterExtensionsFixture.cs │ │ ├── HeadResponseFixture.cs │ │ ├── Helpers │ │ │ └── HttpUtilityFixture.cs │ │ ├── HttpMultipartBoundaryFixture.cs │ │ ├── HttpMultipartBufferFixture.cs │ │ ├── HttpMultipartFixture.cs │ │ ├── IO │ │ │ └── RequestStreamFixture.cs │ │ ├── Json │ │ │ ├── JavaScriptSerializerFixture.cs │ │ │ ├── Simple │ │ │ │ └── NancySerializationStrategyFixture.cs │ │ │ ├── SimpleJsonFixture.cs │ │ │ ├── TestConverter.cs │ │ │ ├── TestConverterType.cs │ │ │ ├── TestData.cs │ │ │ ├── TestPrimitiveConverter.cs │ │ │ ├── TestPrimitiveConverterType.cs │ │ │ └── TypeWithTuple.cs │ │ ├── JsonFormatterExtensionsFixtures.cs │ │ ├── JsonSerializerFixture.cs │ │ ├── LegacyNancyModuleFixture.cs │ │ ├── Localization │ │ │ └── ResourceBasedTextResourceFixture.cs │ │ ├── MimeTypesFixture.cs │ │ ├── ModelBinding │ │ │ ├── BindingMemberInfoFixture.cs │ │ │ ├── DefaultBinderFixture.cs │ │ │ ├── DefaultBodyDeserializers │ │ │ │ ├── JsonBodyDeserializerFixture.cs │ │ │ │ └── XmlBodyDeserializerfixture.cs │ │ │ ├── DefaultConverters │ │ │ │ ├── CollectionConverterFixture.cs │ │ │ │ └── FallbackConverterFixture.cs │ │ │ ├── DefaultFieldNameConverterFixture.cs │ │ │ ├── DefaultModelBinderLocatorFixture.cs │ │ │ ├── DynamicModelBinderAdapterFixture.cs │ │ │ ├── ModelBindingExceptionFixture.cs │ │ │ └── PropertyBindingExceptionFixture.cs │ │ ├── ModuleNameFixture.cs │ │ ├── NamedPipelineBaseFixture.cs │ │ ├── NancyContextFixture.cs │ │ ├── NancyCookieFixture.cs │ │ ├── NancyEngineFixture.cs │ │ ├── NancyMiddlewareFixture.cs │ │ ├── NancyModuleFixture.cs │ │ ├── NancyOptionsExtensionsFixture.cs │ │ ├── NancyOptionsFixture.cs │ │ ├── RequestFixture.cs │ │ ├── RequestHeadersFixture.cs │ │ ├── ResponseExtensionsFixture.cs │ │ ├── ResponseFixture.cs │ │ ├── Responses │ │ │ ├── DefaultJsonSerializerFixture.cs │ │ │ ├── EmbeddedFileResponseFixture.cs │ │ │ ├── GenericFileResponseFixture.cs │ │ │ ├── Negotiation │ │ │ │ └── MediaRangeFixture.cs │ │ │ ├── RedirectResponseFixture.cs │ │ │ ├── StreamResponseFixture.cs │ │ │ └── TextResponseFixture.cs │ │ ├── Routing │ │ │ ├── ConstraintNodeRouteResolverFixture.cs │ │ │ ├── ConstraintNodeRouteScoringFixture.cs │ │ │ ├── DefaultNancyModuleBuilderFixture.cs │ │ │ ├── DefaultRequestDispatcherFixture.cs │ │ │ ├── DefaultRouteCacheProviderFixture.cs │ │ │ ├── DefaultRouteInvokerFixture.cs │ │ │ ├── DefaultRoutePatternMatcherFixture.cs │ │ │ ├── DefaultRouteResolverFixture.cs │ │ │ ├── DefaultRouteSegmentExtractorFixture.cs │ │ │ ├── NotFoundRouteFixture.cs │ │ │ ├── RouteCacheFixture.cs │ │ │ ├── RouteDescriptionFixture.cs │ │ │ └── RouteFixture.cs │ │ ├── Security │ │ │ ├── ClaimsPrincipalExtensionsFixture.cs │ │ │ ├── CsrfFixture.cs │ │ │ ├── DefaultCsrfTokenValidatorFixture.cs │ │ │ ├── ModuleSecurityFixture.cs │ │ │ └── SSLProxyFixture.cs │ │ ├── Sessions │ │ │ ├── CookieBasedSessionsConfigurationFixture.cs │ │ │ ├── CookieBasedSessionsFixture.cs │ │ │ ├── DefaultSessionObjectFormatterFixture.cs │ │ │ ├── NullSessionProviderFixture.cs │ │ │ └── SessionFixture.cs │ │ ├── StaticContentConventionBuilderFixture.cs │ │ ├── TextFormatterFixture.cs │ │ ├── UrlFixture.cs │ │ ├── Validation │ │ │ ├── CompositeValidatorFixture.cs │ │ │ ├── DefaultValidatorLocatorFixture.cs │ │ │ ├── ModuleExtensionsFixture.cs │ │ │ └── ValidationResultFixture.cs │ │ ├── ViewEngines │ │ │ ├── DefaultRenderContextFixture.cs │ │ │ ├── DefaultViewFactoryFixture.cs │ │ │ ├── DefaultViewLocatorFixture.cs │ │ │ ├── DefaultViewRendererFixture.cs │ │ │ ├── DefaultViewResolverFixture.cs │ │ │ ├── FileSystemViewLocationProviderFixture.cs │ │ │ ├── FileSystemViewLocationResultFixture.cs │ │ │ ├── ResourceViewLocationProviderFixture.cs │ │ │ ├── SuperSimpleViewEngineTests.cs │ │ │ ├── ViewEngineStartupFixture.cs │ │ │ └── ViewNotFoundExceptionFixture.cs │ │ └── XmlFormatterExtensionsFixtures.cs │ ├── project.json │ └── xUnitExtensions │ │ ├── RecordAsync.cs │ │ ├── Skip.cs │ │ ├── SkipException.cs │ │ └── SkippableFactAttribute.cs ├── Nancy.Validation.DataAnnotatioins.Tests.MSBuild │ ├── Nancy.Validation.DataAnnotations.Tests.csproj │ └── packages.config ├── Nancy.Validation.DataAnnotatioins.Tests │ ├── DataAnnotationValidatorFactoryFixture.cs │ ├── DataAnnotationValidatorFixture.cs │ ├── DataAnnotationsValidatorFixture.cs │ ├── DefaultValidatableObjectAdapterFixture.cs │ ├── Nancy.Validation.DataAnnotatioins.Tests.xproj │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── PropertyValidatorFixture.cs │ └── project.json ├── Nancy.Validation.FluentValidation.Tests.MSBuild │ ├── Nancy.Validation.FluentValidation.Tests.csproj │ └── packages.config ├── Nancy.Validation.FluentValidation.Tests │ ├── DefaultFluentAdapterFactoryFixture.cs │ ├── EmailAdapterFixture.cs │ ├── FluentValidationValidatorFactoryFixture.cs │ ├── Nancy.Validation.FluentValidation.Tests.xproj │ ├── Properties │ │ └── AssemblyInfo.cs │ └── project.json ├── Nancy.ViewEngines.DotLiquid.Tests.MSBuild │ ├── Nancy.ViewEngines.DotLiquid.Tests.csproj │ └── packages.config ├── Nancy.ViewEngines.DotLiquid.Tests │ ├── DotLiquidViewEngineFixture.cs │ ├── DynamicDropFixture.cs │ ├── FakeModel.cs │ ├── Functional │ │ └── PartialRenderingFixture.cs │ ├── LiquidNancyFileSystemFixture.cs │ ├── Nancy.ViewEngines.DotLiquid.Tests.xproj │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Views │ │ ├── doublequotedpartial.liquid │ │ ├── partial.liquid │ │ ├── singlequotedpartial.liquid │ │ └── unquotedpartial.liquid │ └── project.json ├── Nancy.ViewEngines.Markdown.Tests.MSBuild │ ├── Nancy.ViewEngines.Markdown.Tests.csproj │ └── packages.config ├── Nancy.ViewEngines.Markdown.Tests │ ├── Markdown │ │ ├── home.md │ │ ├── htmlmaster.html │ │ ├── master.md │ │ ├── partial.markdown │ │ ├── standalone.md │ │ └── viewwithhtmlmaster.md │ ├── MarkdownViewEngineFixture.cs │ ├── MarkdownViewengineRenderFixture.cs │ ├── Nancy.ViewEngines.Markdown.Tests.xproj │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── UserModel.cs │ └── project.json ├── Nancy.ViewEngines.Razor.Tests.MSBuild │ ├── Nancy.ViewEngines.Razor.Tests.csproj │ └── packages.config ├── Nancy.ViewEngines.Razor.Tests.Models.MSBuild │ ├── Nancy.ViewEngines.Razor.Tests.Models.csproj │ └── packages.config ├── Nancy.ViewEngines.Razor.Tests.Models │ ├── Hobby.cs │ ├── Nancy.ViewEngines.Razor.Tests.Models.xproj │ ├── Person.cs │ └── project.json ├── Nancy.ViewEngines.Razor.Tests │ ├── GreetingViewBase.cs │ ├── Nancy.ViewEngines.Razor.Tests.xproj │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── RazorViewEngineFixture.cs │ ├── TestModel.cs │ ├── TestViews │ │ ├── Layouts │ │ │ ├── LayoutWithManySections.cshtml │ │ │ ├── LayoutWithOptionalSection.cshtml │ │ │ ├── LayoutWithOptionalSectionWithDefaults.cshtml │ │ │ ├── LayoutWithSection.cshtml │ │ │ └── SimplyLayout.cshtml │ │ ├── ViewThatUsesAttributeWithCodeInside.cshtml │ │ ├── ViewThatUsesAttributeWithDynamicNullInside.cshtml │ │ ├── ViewThatUsesAttributeWithHtmlStringInside.cshtml │ │ ├── ViewThatUsesAttributeWithNonEncodedHtmlStringInside.cshtml │ │ ├── ViewThatUsesAttributeWithRawHtmlStringInside.cshtml │ │ ├── ViewThatUsesHelper.cshtml │ │ ├── ViewThatUsesLayout.cshtml │ │ ├── ViewThatUsesLayoutAndManySection.cshtml │ │ ├── ViewThatUsesLayoutAndModel.cshtml │ │ ├── ViewThatUsesLayoutAndOptionalSection.cshtml │ │ ├── ViewThatUsesLayoutAndOptionalSectionOverridingDefaults.cshtml │ │ ├── ViewThatUsesLayoutAndOptionalSectionWithDefaults.cshtml │ │ ├── ViewThatUsesLayoutAndSection.cshtml │ │ ├── ViewThatUsesModelCSharp.cshtml │ │ └── ViewThatUsesModelVB.vbhtml │ ├── TextResourceFinderFixture.cs │ └── project.json ├── Nancy.ViewEngines.Spark.Tests.MSBuild │ ├── Nancy.ViewEngines.Spark.Tests.csproj │ └── packages.config └── Nancy.ViewEngines.Spark.Tests │ ├── App.config │ ├── NancyViewFolderFixture.cs │ ├── Properties │ └── AssemblyInfo.cs │ ├── ShadeViews │ ├── Features │ │ ├── ShadeCodeMayBeDashOrAtBraced.shade │ │ ├── ShadeElementsMayStackOnOneLine.shade │ │ ├── ShadeEvaluatesExpressions.shade │ │ ├── ShadeFileRenders.shade │ │ ├── ShadeSupportsAttributesAndMayTreatSomeElementsAsSpecialNodes.shade │ │ ├── ShadeTextMayContainExpressions.shade │ │ └── ShadeThatUsesApplicationLayout.shade │ └── Shared │ │ ├── Application.shade │ │ └── _SimpleValue.spark │ ├── SparkViewEngineFixture.cs │ ├── TestViews │ ├── Layouts │ │ └── anotherLayout.spark │ ├── Shared │ │ ├── Application.spark │ │ ├── Partial.spark │ │ ├── elementLayout.spark │ │ └── layout.spark │ └── Stub │ │ ├── Index.spark │ │ ├── List.spark │ │ ├── PartialTarget.spark │ │ ├── Subfolder │ │ └── Subfolderview.spark │ │ ├── ViewThatChangesGlobalSettings.spark │ │ ├── ViewThatExpectsALayout.spark │ │ ├── ViewThatRendersPartialsThatShareState.spark │ │ ├── ViewThatUsesANullViewModel.spark │ │ ├── ViewThatUsesAllNamedContentAreas.spark │ │ ├── ViewThatUsesAnonymousViewModel.spark │ │ ├── ViewThatUsesApplicationLayout.spark │ │ ├── ViewThatUsesForeach.spark │ │ ├── ViewThatUsesFormatting.spark │ │ ├── ViewThatUsesHtmlEncoding.spark │ │ ├── ViewThatUsesNamespaces.spark │ │ ├── ViewThatUsesNullHtmlEncoding.spark │ │ ├── ViewThatUsesPartial.spark │ │ ├── ViewThatUsesPartialImplicitly.spark │ │ ├── ViewThatUsesTildeSubstitution.spark │ │ ├── ViewThatUsesTildeSubstitutionWithSparkReplace.spark │ │ ├── ViewThatUsesViewDataForViewBag.spark │ │ ├── ViewThatUsesViewModel.spark │ │ └── _Row.spark │ └── ViewModels │ └── FakeViewModel.cs └── tools ├── nuget └── NuGet.exe └── xunit ├── HTML.xslt ├── NUnitXml.xslt ├── xUnit1.xslt ├── xunit.abstractions.dll ├── xunit.console.exe ├── xunit.console.exe.config ├── xunit.console.x86.exe ├── xunit.console.x86.exe.config ├── xunit.runner.reporters.desktop.dll ├── xunit.runner.utility.desktop.dll └── xunitmono.sh /.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | # Default settings: 7 | # A newline ending every file 8 | # Use 4 spaces as indentation 9 | [*] 10 | trim_trailing_whitespace = true 11 | insert_final_newline = true 12 | indent_style = space 13 | indent_size = 4 14 | 15 | # Xml project files 16 | [*.{csproj,vcxproj,vcxproj.filters,proj,nativeproj,locproj}] 17 | indent_size = 2 18 | 19 | # Xml files 20 | [*.{xml,stylecop,resx,ruleset}] 21 | indent_size = 2 22 | 23 | # Xml config files 24 | [*.{props,targets,config,nuspec}] 25 | indent_size = 2 26 | 27 | # Shell scripts 28 | [*.sh] 29 | end_of_line = lf 30 | [*.{cmd, bat}] 31 | end_of_line = crlf 32 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * -crlf -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.[Cc]ache 2 | *.csproj.user 3 | *.[Rr]e[Ss]harper* 4 | *.sln.cache 5 | *.suo 6 | *.user 7 | *.orig 8 | *.pidb 9 | *.ide 10 | *.userprefs 11 | /AssemblyInfo.cs 12 | .DS_Store 13 | deploy/ 14 | /build/ 15 | [Bb]in/ 16 | [Dd]ebug/ 17 | [Oo]bj/ 18 | [Rr]elease/ 19 | _[Rr]e[Ss]harper*/ 20 | *.docstates 21 | *.tss 22 | *.ncrunchproject 23 | *.ncrunchsolution 24 | *.dotCover 25 | src/_NCrunch_Nancy/ 26 | Thumbs.db 27 | .idea 28 | *.GhostDoc.xml 29 | Gemfile.lock 30 | .vs/ 31 | packages/ 32 | project.lock.json 33 | TestAssembly.dll 34 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: csharp 2 | solution: src/Nancy.sln 3 | sudo: false 4 | install: 5 | - gem install bundle 6 | - bundle 7 | - echo \#\!/bin/bash >> ./travis.sh 8 | - echo set -e >> ./travis.sh 9 | - echo set -x >> ./travis.sh 10 | - echo set -o pipefail >> ./travis.sh 11 | - echo echo Running on latest Mono >> ./travis.sh 12 | - echo rake mono >> ./travis.sh 13 | - chmod +x ./travis.sh 14 | - cat travis.sh 15 | script: ./travis.sh 16 | notifications: 17 | email: 18 | - nancy@nancyfx.org 19 | gemfile: Gemfile 20 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | #ruby=1.9.3 2 | source 'http://rubygems.org' 3 | gem "albacore", '1.0.0.rc.2' 4 | gem 'rubyzip', '>= 1.0.0' 5 | gem 'zip-zip' 6 | gem 'rake' 7 | -------------------------------------------------------------------------------- /NuGet.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SharedAssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | using System.Reflection; 3 | 4 | [assembly: AssemblyTitle("Nancy")] 5 | [assembly: AssemblyDescription("A Sinatra inspired web framework for the .NET platform")] 6 | [assembly: AssemblyCompany("Nancy")] 7 | [assembly: AssemblyProduct("Nancy")] 8 | [assembly: AssemblyCopyright("Copyright (C) Andreas Hakansson, Steven Robbins and contributors")] 9 | [assembly: AssemblyVersion("2.0.0")] 10 | [assembly: AssemblyInformationalVersion("2.0.0-alpha")] 11 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | os: Visual Studio 2015 2 | 3 | version: 2.0.0-ci000{build} 4 | configuration: Release 5 | cache: C:\Users\appveyor\.dnx\packages 6 | 7 | nuget: 8 | disable_publish_on_pr: true 9 | 10 | pull_requests: 11 | do_not_increment_build_number: true 12 | 13 | install: 14 | - set PATH=C:\Program Files (x86)\MSBuild\14.0\Bin;%PATH% 15 | 16 | build_script: 17 | - ps: .\build.ps1 18 | 19 | artifacts: 20 | - path: artifacts\packages\**\*.nupkg 21 | name: MyGet 22 | 23 | build: 24 | verbosity: minimal 25 | 26 | test: off 27 | -------------------------------------------------------------------------------- /favicon.license.txt: -------------------------------------------------------------------------------- 1 | The Nancy logo is copyright ©2011 by Andreas Håkansson and Steven Robbins. Please consult the usage guidelines in the Nancy.Portfolio repository (https://github.com/NancyFx/Nancy.Portfolio) for information on how it may be used. 2 | -------------------------------------------------------------------------------- /global.json: -------------------------------------------------------------------------------- 1 | { 2 | "projects": [ "src", "test", "samples" ], 3 | "sdk": { 4 | "version": "1.0.0-rc1-update1" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /license.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thecodejunkie/Nancy/b63b44526d995c93c0eec86f6358f6e92679b803/license.txt -------------------------------------------------------------------------------- /samples/Nancy.Demo.Async/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Authentication.Basic/AuthenticationBootstrapper.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Demo.Authentication.Basic 2 | { 3 | using Nancy.Authentication.Basic; 4 | using Nancy.Bootstrapper; 5 | using Nancy.TinyIoc; 6 | 7 | public class AuthenticationBootstrapper : DefaultNancyBootstrapper 8 | { 9 | protected override void ApplicationStartup(TinyIoCContainer container, IPipelines pipelines) 10 | { 11 | base.ApplicationStartup(container, pipelines); 12 | 13 | pipelines.EnableBasicAuthentication(new BasicAuthenticationConfiguration( 14 | container.Resolve(), 15 | "MyRealm")); 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /samples/Nancy.Demo.Authentication.Basic/MainModule.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Demo.Authentication.Basic 2 | { 3 | public class MainModule : LegacyNancyModule 4 | { 5 | public MainModule() 6 | { 7 | Get["/"] = _ => "Enter"; 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /samples/Nancy.Demo.Authentication.Basic/SecureModule.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Demo.Authentication.Basic 2 | { 3 | using Nancy.Security; 4 | 5 | public class SecureModule : LegacyNancyModule 6 | { 7 | public SecureModule() : base("/secure") 8 | { 9 | this.RequiresAuthentication(); 10 | 11 | Get["/"] = x => "Hello " + this.Context.CurrentUser.Identity.Name; 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Authentication.Basic/UserValidator.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Demo.Authentication.Basic 2 | { 3 | using System.Security.Claims; 4 | using System.Security.Principal; 5 | 6 | using Nancy.Authentication.Basic; 7 | 8 | public class UserValidator : IUserValidator 9 | { 10 | public ClaimsPrincipal Validate(string username, string password) 11 | { 12 | if (username == "demo" && password == "demo") 13 | { 14 | return new ClaimsPrincipal(new GenericIdentity(username)); 15 | } 16 | 17 | // Not recognised => anonymous. 18 | return null; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Authentication.Basic/Web.Debug.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Authentication.Basic/Web.Release.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Authentication.Basic/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Authentication.Forms.TestingDemo/TestBootstrapper.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Demo.Authentication.Forms.TestingDemo 2 | { 3 | public class TestBootstrapper : FormsAuthBootstrapper 4 | { 5 | protected override IRootPathProvider RootPathProvider 6 | { 7 | get { return new TestRootPathProvider(); } 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Authentication.Forms.TestingDemo/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Authentication.Forms/Models/UserModel.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Demo.Authentication.Forms.Models 2 | { 3 | public class UserModel 4 | { 5 | public string Username { get; private set; } 6 | 7 | public UserModel(string username) 8 | { 9 | Username = username; 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /samples/Nancy.Demo.Authentication.Forms/PartlySecureModule.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Demo.Authentication.Forms 2 | { 3 | using Nancy.Demo.Authentication.Forms.Models; 4 | using Nancy.Security; 5 | 6 | public class PartlySecureModule : LegacyNancyModule 7 | { 8 | public PartlySecureModule() 9 | : base("/partlysecure") 10 | { 11 | Get["/"] = _ => "No auth needed! Enter the secure bit!"; 12 | 13 | Get["/secured"] = x => { 14 | this.RequiresAuthentication(); 15 | 16 | var model = new UserModel(this.Context.CurrentUser.Identity.Name); 17 | return View["secure.cshtml", model]; 18 | }; 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /samples/Nancy.Demo.Authentication.Forms/README.txt: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /samples/Nancy.Demo.Authentication.Forms/SecureModule.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Demo.Authentication.Forms 2 | { 3 | using Nancy.Demo.Authentication.Forms.Models; 4 | using Nancy.Security; 5 | 6 | public class SecureModule : LegacyNancyModule 7 | { 8 | public SecureModule() : base("/secure") 9 | { 10 | this.RequiresAuthentication(); 11 | 12 | Get["/"] = x => { 13 | var model = new UserModel(this.Context.CurrentUser.Identity.Name); 14 | return View["secure.cshtml", model]; 15 | }; 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /samples/Nancy.Demo.Authentication.Forms/Views/index.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Forms Authentication Demo 5 | 6 | 7 | Enter the "Secure Zone"!
8 | 9 | Enter the "Partly Secure Zone"!
10 | 11 | 12 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Authentication.Forms/Views/secure.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Secure Page! 5 | 6 | 7 | Welcome to the secure area @Model.Username ! 8 | 9 |
10 |
11 | Logout 12 | 13 | 14 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Authentication.Forms/Web.Debug.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Authentication.Forms/Web.Release.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Authentication.Forms/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Authentication.Stateless.Website/Scripts/api.js: -------------------------------------------------------------------------------- 1 | var api = { 2 | auth: "http://localhost:55581/restApi/auth", 3 | secure: "http://localhost:55581/restApi/secure", 4 | create_user: "http://localhost:55581/restApi/secure/create_user" 5 | }; 6 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Authentication.Stateless.Website/Web.Debug.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Authentication.Stateless.Website/Web.Release.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Authentication.Stateless.Website/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Authentication.Stateless/Models/UserModel.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Demo.Authentication.Stateless.Models 2 | { 3 | public class UserModel 4 | { 5 | public string Username { get; private set; } 6 | 7 | public UserModel(string username) 8 | { 9 | Username = username; 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /samples/Nancy.Demo.Authentication.Stateless/Web.Debug.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Authentication.Stateless/Web.Release.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Authentication.Stateless/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Authentication/MainModule.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Demo.Authentication 2 | { 3 | public class MainModule : LegacyNancyModule 4 | { 5 | public MainModule() 6 | { 7 | Get["/"] = x => { 8 | return View["Index.cshtml"]; 9 | }; 10 | 11 | Get["/login"] = x => { 12 | return View["Login.cshtml", this.Request.Query.returnUrl]; 13 | }; 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /samples/Nancy.Demo.Authentication/Models/UserModel.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Demo.Authentication.Models 2 | { 3 | public class UserModel 4 | { 5 | public string Username { get; set; } 6 | 7 | public UserModel(string username) 8 | { 9 | this.Username = username; 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /samples/Nancy.Demo.Authentication/README.txt: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /samples/Nancy.Demo.Authentication/SecureModule.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Demo.Authentication 2 | { 3 | using Nancy.Demo.Authentication.Models; 4 | using Nancy.Security; 5 | 6 | public class SecureModule : LegacyNancyModule 7 | { 8 | public SecureModule() : base("/secure") 9 | { 10 | this.RequiresAuthentication(); 11 | 12 | Get["/"] = x => { 13 | var model = new UserModel(this.Context.CurrentUser.Identity.Name); 14 | return View["secure.cshtml", model]; 15 | }; 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /samples/Nancy.Demo.Authentication/Views/Index.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | Index 4 | 5 | 6 |

Nancy Authentication Demo

7 | Secure Pages 8 | Super Secure Pages 9 | More Super Secure Pages 10 | 11 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Authentication/Views/Login.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | Login 4 | 5 | 6 |

Super Secure Login Page 4000

7 |
8 | 9 | 10 |
11 | Home 12 | 13 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Authentication/Views/secure.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | Index 4 | 5 | 6 |

Secure Page

7 | Hello @Model.Username 8 | Home 9 | 10 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Authentication/Views/superSecure.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | Index 4 | 5 | 6 |

Super Secure Page

7 | Hello @Model.Username 8 | Home 9 | 10 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Authentication/Web.Debug.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Authentication/Web.Release.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Authentication/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Bootstrapper.Aspnet/IApplicationDependency.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Demo.Bootstrapping.Aspnet 2 | { 3 | public interface IApplicationDependency 4 | { 5 | string GetContent(); 6 | } 7 | } -------------------------------------------------------------------------------- /samples/Nancy.Demo.Bootstrapper.Aspnet/IRequestDependency.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Demo.Bootstrapping.Aspnet 2 | { 3 | public interface IRequestDependency 4 | { 5 | string GetContent(); 6 | } 7 | } -------------------------------------------------------------------------------- /samples/Nancy.Demo.Bootstrapper.Aspnet/Models/RatPack.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Demo.Bootstrapping.Aspnet.Models 2 | { 3 | public class RatPack 4 | { 5 | public string FirstName { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /samples/Nancy.Demo.Bootstrapper.Aspnet/Models/RatPackWithDependencyText.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Demo.Bootstrapping.Aspnet.Models 2 | { 3 | public class RatPackWithDependencyText : RatPack 4 | { 5 | public string ApplicationDependencyText { get; set; } 6 | 7 | public string RequestDependencyText { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /samples/Nancy.Demo.Bootstrapper.Aspnet/README.txt: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /samples/Nancy.Demo.Bootstrapper.Aspnet/Views/razor-dependency.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | Razor View Engine Demo 4 | 5 | 6 |

Hello @Model.FirstName

7 |

This is a Razor view..

8 |

@Model.ApplicationDependencyText

9 |

@Model.RequestDependencyText

10 | 11 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Bootstrapper.Aspnet/Web.Debug.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Bootstrapper.Aspnet/Web.Release.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Bootstrapper.Aspnet/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Caching/README.txt: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /samples/Nancy.Demo.Caching/Views/Index.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | Index 4 | 5 | 6 |

Nancy Caching Demo

7 |

Cached

8 |

Uncached

9 | 10 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Caching/Views/Payload.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | Index 4 | 5 | 6 |

Nancy Caching Demo

7 |

This page was created on: @Model

8 |

This may or may not be cached :-)

9 | Home 10 | 11 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Caching/Web.Debug.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Caching/Web.Release.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Caching/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.ConstraintRouting/Web.Debug.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.ConstraintRouting/Web.Release.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.ConstraintRouting/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.CustomModule/DemoBootstrapper.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Demo.CustomModule 2 | { 3 | using Nancy.Configuration; 4 | using Nancy.Diagnostics; 5 | 6 | public class DemoBootstrapper : DefaultNancyBootstrapper 7 | { 8 | public override void Configure(INancyEnvironment environment) 9 | { 10 | environment.Diagnostics( 11 | enabled: true, 12 | password: "password"); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.CustomModule/MainModule.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Demo.CustomModule 2 | { 3 | public class MainModule : UglifiedNancyModule 4 | { 5 | [NancyRoute("GET", "/")] 6 | public dynamic Root(dynamic parameters) 7 | { 8 | return View["Index", new { Name = "Jimbo!" }]; 9 | } 10 | 11 | public bool FilteredFilter(NancyContext context) 12 | { 13 | return false; 14 | } 15 | 16 | [NancyRoute("GET", "/filtered")] 17 | public dynamic Filtered(dynamic parameters) 18 | { 19 | return "This is filtered"; 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /samples/Nancy.Demo.CustomModule/NancyRouteAttribute.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Demo.CustomModule 2 | { 3 | using System; 4 | 5 | public class NancyRouteAttribute : Attribute 6 | { 7 | /// 8 | /// The method for the route 9 | /// 10 | public string Method { get; set; } 11 | 12 | /// 13 | /// The path for the route 14 | /// 15 | public string Path { get; set; } 16 | 17 | public NancyRouteAttribute(string method, string path) 18 | { 19 | this.Method = method; 20 | this.Path = path; 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /samples/Nancy.Demo.CustomModule/Views/Index.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Hello! 5 | 6 | 7 |

Hello @Model.Name - this was rendered using a custom module type.

8 | 9 | 10 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.CustomModule/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.CustomModule/Web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.CustomModule/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Hosting.Aspnet/Content/face.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thecodejunkie/Nancy/b63b44526d995c93c0eec86f6358f6e92679b803/samples/Nancy.Demo.Hosting.Aspnet/Content/face.png -------------------------------------------------------------------------------- /samples/Nancy.Demo.Hosting.Aspnet/Content/main.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: #fcfcfc; 3 | font-family: Verdana, Tahoma, "Sans-Serif"; 4 | } -------------------------------------------------------------------------------- /samples/Nancy.Demo.Hosting.Aspnet/Content/scripts.js: -------------------------------------------------------------------------------- 1 | alert("This script was loaded by Nancy"); -------------------------------------------------------------------------------- /samples/Nancy.Demo.Hosting.Aspnet/IApplicationDependency.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Demo.Hosting.Aspnet 2 | { 3 | public interface IApplicationDependency 4 | { 5 | string GetContent(); 6 | } 7 | } -------------------------------------------------------------------------------- /samples/Nancy.Demo.Hosting.Aspnet/IRequestDependency.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Demo.Hosting.Aspnet 2 | { 3 | public interface IRequestDependency 4 | { 5 | string GetContent(); 6 | } 7 | } -------------------------------------------------------------------------------- /samples/Nancy.Demo.Hosting.Aspnet/Metadata/MyUberRouteMetadata.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Demo.Hosting.Aspnet.Metadata 2 | { 3 | public class MyUberRouteMetadata : MyRouteMetadata 4 | { 5 | public MyUberRouteMetadata(string method, string path) 6 | : base(method, path) 7 | { 8 | } 9 | 10 | public string SuperDescription { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /samples/Nancy.Demo.Hosting.Aspnet/Models/RatPack.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Demo.Hosting.Aspnet.Models 2 | { 3 | public class RatPack 4 | { 5 | public string FirstName { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /samples/Nancy.Demo.Hosting.Aspnet/Models/RatPackWithDependencyText.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Demo.Hosting.Aspnet.Models 2 | { 3 | public class RatPackWithDependencyText : RatPack 4 | { 5 | public string ApplicationDependencyText { get; set; } 6 | 7 | public string RequestDependencyText { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /samples/Nancy.Demo.Hosting.Aspnet/Models/SomeViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Demo.Hosting.Aspnet.Models 2 | { 3 | public class SomeViewModel 4 | { 5 | } 6 | } -------------------------------------------------------------------------------- /samples/Nancy.Demo.Hosting.Aspnet/MyConfig.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Demo.Hosting.Aspnet 2 | { 3 | /// 4 | /// Sample custom configuration type. It is good practise (but not required) 5 | /// to make your config objects immutable. 6 | /// 7 | public class MyConfig 8 | { 9 | public MyConfig(string value) 10 | { 11 | this.Value = value; 12 | } 13 | 14 | public string Value { get; private set; } 15 | } 16 | } -------------------------------------------------------------------------------- /samples/Nancy.Demo.Hosting.Aspnet/README.txt: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /samples/Nancy.Demo.Hosting.Aspnet/Views/FileUpload.sshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | Nancy File Posting Demo 4 | 5 | 6 |

You uploaded: @Model.Posted

7 |

8 |

9 | 10 | 11 |
12 |

13 | 14 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Hosting.Aspnet/Views/anon.spark: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Spark View Engine Demo 5 | 6 | 7 |

The name's Spark, ${Model.FirstName} Spark

8 |

This is a sample Spark view!

9 | 10 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Hosting.Aspnet/Views/csrf.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | CSRF Demo 4 | 5 | 6 |
7 |

CSRF Test

8 |

@Model.Blurb

9 | 10 | @Html.AntiForgeryToken(); 11 | 12 |
13 | 14 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Hosting.Aspnet/Views/dot.liquid: -------------------------------------------------------------------------------- 1 |  2 | 3 | DotLiquid View Engine Demo 4 | 5 | 6 |

The name's Liquid, {{ model.name | upcase }} Liquid

7 |

This is a sample DotLiquid view!

8 | 9 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Hosting.Aspnet/Views/interactive-diags-methods.sshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Interactive Diagnostics 5 | 6 | 7 | @Each.Methods 8 |
9 | @Current.ReturnType : @Current.MethodName
10 | 11 | 12 |
13 |
14 | @EndEach 15 | 16 | 17 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Hosting.Aspnet/Views/interactive-diags.sshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Interactive Diagnostics 5 | 6 | 7 | @Each 8 | @Current.Name 9 | @EndEach 10 | 11 | 12 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Hosting.Aspnet/Views/javascript.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Nancy - Loading Javascripts 5 | 6 | 7 | 8 | The script on this page was loaded using Nancy. 9 | 10 | 11 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Hosting.Aspnet/Views/negotiatedview.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | Negotiation Demo 4 | 5 | 6 |

Hello @Model.FirstName

7 | 8 |

9 | This is a text/html representation of a RatPack model, 10 | you should be seeing this because you requested text/html either manually or 11 | via your browser. Try using Fiddler to hit this url and request JSON, or add .json to 12 | the end of this url. 13 |

14 | 15 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Hosting.Aspnet/Views/nustache.nustache: -------------------------------------------------------------------------------- 1 | {{>nustachePartial}} 2 | You have just won ${{value}}! -------------------------------------------------------------------------------- /samples/Nancy.Demo.Hosting.Aspnet/Views/nustachePartial.nustache: -------------------------------------------------------------------------------- 1 | Hello {{name}} -------------------------------------------------------------------------------- /samples/Nancy.Demo.Hosting.Aspnet/Views/razor-dependency.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | Razor View Engine Demo 4 | 5 | 6 |

Hello @Model.FirstName

7 |

This is a Razor view..

8 |

@Model.ApplicationDependencyText

9 |

@Model.RequestDependencyText

10 | 11 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Hosting.Aspnet/Views/razor-divzero.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "razor-layout.cshtml"; 3 | } 4 | @section Header 5 | { 6 | 7 | } 8 |

Hello @Model.FirstName

9 |

This is a sample Razor view! @(Model.Number / 0)

10 | @section Footer 11 | { 12 |

This is footer content!

13 | Face 14 | } 15 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Hosting.Aspnet/Views/razor-error.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "razor-layout-error.cshtml"; 3 | } 4 | @section Header 5 | { 6 | 7 | } 8 |

Hello @Model.FirstName

9 |

This is a sample Razor view!

10 | @section Footer 11 | { 12 |

This is footer content!

13 | Face 14 | } 15 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Hosting.Aspnet/Views/razor-layout-error.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | Razor View Engine Demo - @Model.FirstName 4 | @RenderSection("Header") 5 | 6 | 7 |
@RenderBody()
8 |
@ThisDoesntExist()
9 | 10 |
@RenderSection("Optional", false)
11 | 12 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Hosting.Aspnet/Views/razor-layout.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | Razor View Engine Demo - @Model.FirstName 4 | @RenderSection("Header") 5 | 6 | 7 |
@RenderBody()
8 | 9 |
@RenderSection("Optional", false)
10 | 11 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Hosting.Aspnet/Views/razor-simple.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | Razor View Engine Demo 4 | 5 | 6 |

Hello @Model.FirstName

7 |

This is a sample Razor view!

8 | Face 9 | 10 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Hosting.Aspnet/Views/razor-strong.cshtml: -------------------------------------------------------------------------------- 1 | @model Nancy.Demo.Hosting.Aspnet.Models.RatPack 2 | 3 | 4 | Razor View Engine Demo 5 | 6 | 7 |

Hello @Model.FirstName

8 |

This is a strongly typed csharp razor view!

9 | Face 10 | 11 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Hosting.Aspnet/Views/razor-strong.vbhtml: -------------------------------------------------------------------------------- 1 | @ModelType Nancy.Demo.Hosting.Aspnet.Models.RatPack 2 | 3 | 4 | Razor View Engine Demo 5 | 6 | 7 |

Hello @Model.FirstName

8 |

This is a strongly typed vb razor view!

9 | Face 10 | 11 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Hosting.Aspnet/Views/razor.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "razor-layout.cshtml"; 3 | } 4 | @section Header 5 | { 6 | 7 | } 8 |

Hello @Model.FirstName

9 |

This is a sample Razor view!

10 | @section Footer 11 | { 12 |

This is footer content!

13 | Face 14 | } 15 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Hosting.Aspnet/Views/someview.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | Razor View Engine Demo 4 | 5 | 6 |

Model: @Model.GetType().Name

7 |

View: SomeView

8 |

This is a sample of using the name of the model type to locate the view to render!

9 | 10 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Hosting.Aspnet/Views/spark.spark: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Spark View Engine Demo 5 | 6 | 7 |

The name's Spark, ${Model.FirstName} Spark

8 |

This is a sample Spark view!

9 | Face 10 | 11 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Hosting.Aspnet/Views/ssve.sshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Super Simple View Engine Demo 5 | 6 | 7 |

SSVE - so simple, even @Model.FirstName can do it.

8 |

This is a sample SSVE view!

9 | Face 10 | 11 | 12 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Hosting.Aspnet/Views/static.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | Static View Engine Demo 4 | 5 | 6 |

Hello Tina

7 |

This is a sample static view!

8 | 9 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Hosting.Aspnet/Web.Debug.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Hosting.Aspnet/Web.Release.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Hosting.Owin/Models/Index.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Demo.Hosting.Owin.Models 2 | { 3 | public class Index 4 | { 5 | public string StatusMessage { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /samples/Nancy.Demo.Hosting.Owin/Startup.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Demo.Hosting.Owin 2 | { 3 | using global::Owin; 4 | 5 | public class Startup 6 | { 7 | public void Configuration(IAppBuilder app) 8 | { 9 | app.UseNancy(); 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /samples/Nancy.Demo.Hosting.Owin/Views/Root.spark: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | Nancy OWIN Host Demo 8 | 9 | 10 |

Nancy OWIN Host Demo

11 |

This is a Spark view rendered via the OWIN hosting. ${Model.StatusMessage}

12 | 13 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Hosting.Owin/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Hosting.Self/DemoBootstrapper.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Demo.Hosting.Self 2 | { 3 | using Nancy; 4 | using Nancy.Diagnostics; 5 | 6 | public class DemoBootstrapper : DefaultNancyBootstrapper 7 | { 8 | public override void Configure(Nancy.Configuration.INancyEnvironment environment) 9 | { 10 | environment.Diagnostics( 11 | enabled: true, 12 | password: "password"); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Hosting.Self/Models/Index.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Demo.Hosting.Self.Models 2 | { 3 | public class Index 4 | { 5 | public string Name { get; set; } 6 | 7 | public string Posted { get; set; } 8 | 9 | public Index() 10 | { 11 | this.Posted = "Nothing :-("; 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /samples/Nancy.Demo.Hosting.Self/README.txt: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /samples/Nancy.Demo.Hosting.Self/Views/FileUpload.spark: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Nancy Self Host Demo 5 | 6 | 7 |

Hello ${Model.Name}!

8 |

This is a Spark view rendered via the self hosting.

9 |

You uploaded: ${Model.Posted}

10 |

11 |

12 | 13 | 14 |
15 |

16 | 17 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Hosting.Self/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.MarkdownViewEngine/Content/images/body.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thecodejunkie/Nancy/b63b44526d995c93c0eec86f6358f6e92679b803/samples/Nancy.Demo.MarkdownViewEngine/Content/images/body.png -------------------------------------------------------------------------------- /samples/Nancy.Demo.MarkdownViewEngine/Content/images/cloud1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thecodejunkie/Nancy/b63b44526d995c93c0eec86f6358f6e92679b803/samples/Nancy.Demo.MarkdownViewEngine/Content/images/cloud1.png -------------------------------------------------------------------------------- /samples/Nancy.Demo.MarkdownViewEngine/Content/images/cloud2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thecodejunkie/Nancy/b63b44526d995c93c0eec86f6358f6e92679b803/samples/Nancy.Demo.MarkdownViewEngine/Content/images/cloud2.png -------------------------------------------------------------------------------- /samples/Nancy.Demo.MarkdownViewEngine/Content/images/cloud3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thecodejunkie/Nancy/b63b44526d995c93c0eec86f6358f6e92679b803/samples/Nancy.Demo.MarkdownViewEngine/Content/images/cloud3.png -------------------------------------------------------------------------------- /samples/Nancy.Demo.MarkdownViewEngine/Content/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thecodejunkie/Nancy/b63b44526d995c93c0eec86f6358f6e92679b803/samples/Nancy.Demo.MarkdownViewEngine/Content/images/logo.png -------------------------------------------------------------------------------- /samples/Nancy.Demo.MarkdownViewEngine/Content/images/mountain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thecodejunkie/Nancy/b63b44526d995c93c0eec86f6358f6e92679b803/samples/Nancy.Demo.MarkdownViewEngine/Content/images/mountain.png -------------------------------------------------------------------------------- /samples/Nancy.Demo.MarkdownViewEngine/Content/images/nancy-nuget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thecodejunkie/Nancy/b63b44526d995c93c0eec86f6358f6e92679b803/samples/Nancy.Demo.MarkdownViewEngine/Content/images/nancy-nuget.png -------------------------------------------------------------------------------- /samples/Nancy.Demo.MarkdownViewEngine/Content/images/post-foot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thecodejunkie/Nancy/b63b44526d995c93c0eec86f6358f6e92679b803/samples/Nancy.Demo.MarkdownViewEngine/Content/images/post-foot.png -------------------------------------------------------------------------------- /samples/Nancy.Demo.MarkdownViewEngine/Content/images/post-head.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thecodejunkie/Nancy/b63b44526d995c93c0eec86f6358f6e92679b803/samples/Nancy.Demo.MarkdownViewEngine/Content/images/post-head.png -------------------------------------------------------------------------------- /samples/Nancy.Demo.MarkdownViewEngine/Content/images/post-midd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thecodejunkie/Nancy/b63b44526d995c93c0eec86f6358f6e92679b803/samples/Nancy.Demo.MarkdownViewEngine/Content/images/post-midd.png -------------------------------------------------------------------------------- /samples/Nancy.Demo.MarkdownViewEngine/Views/Posts/future-post.md: -------------------------------------------------------------------------------- 1 | @Master['master'] 2 | 3 | @Tags 4 | Date: 21/02/2099 5 | Title: Future Post 6 | Tags: Blogging,Internet 7 | @EndTags 8 | 9 | @Section['Content'] 10 | 11 | @Partial['blogheader', Model.MetaData]; 12 | 13 | # Future post! 14 | 15 | Now that we know who you are, I know who I am. I'm not a mistake! It all makes sense! In a comic, you know how you can tell who the arch-villain's going to be? He's the exact opposite of the hero. And most times they're friends, like you and me! I should've known way back when... You know why, David? Because of the kids. They called me Mr Glass. 16 | 17 | @Partial['blogfooter', Model.MetaData]; 18 | 19 | @EndSection -------------------------------------------------------------------------------- /samples/Nancy.Demo.MarkdownViewEngine/Views/blogheader.html: -------------------------------------------------------------------------------- 1 | 
2 |
3 |
4 |
5 |
6 |
7 | @Model.FriendlyDate 8 | 9 |
10 |

11 | 12 |

13 | 14 |
15 |
16 |
17 |
-------------------------------------------------------------------------------- /samples/Nancy.Demo.MarkdownViewEngine/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.ModelBinding/Database/DB.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Demo.ModelBinding.Database 2 | { 3 | using System.Collections.Generic; 4 | 5 | using Nancy.Demo.ModelBinding.Models; 6 | 7 | public static class DB 8 | { 9 | public static List Events { get; private set; } 10 | 11 | public static List Customers { get; private set; } 12 | 13 | static DB() 14 | { 15 | Events = new List(); 16 | Customers = new List(); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /samples/Nancy.Demo.ModelBinding/MainModule.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Demo.ModelBinding 2 | { 3 | public class MainModule : LegacyNancyModule 4 | { 5 | public MainModule() 6 | { 7 | Get["/"] = x => 8 | { 9 | return "Events (default model binder)
Customers (custom model binder)
Users (JSON)
Users (XML)
"; 10 | }; 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /samples/Nancy.Demo.ModelBinding/ModelBindingBootstrapper.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Demo.ModelBinding 2 | { 3 | public class ModelBindingBootstrapper : DefaultNancyBootstrapper 4 | { 5 | } 6 | } -------------------------------------------------------------------------------- /samples/Nancy.Demo.ModelBinding/Models/Customer.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Demo.ModelBinding.Models 2 | { 3 | using System; 4 | 5 | public class Customer 6 | { 7 | public int Id { get; set; } 8 | 9 | public string Name { get; set; } 10 | 11 | public DateTime RenewalDate { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /samples/Nancy.Demo.ModelBinding/Models/Event.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Demo.ModelBinding.Models 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | 6 | public class Event 7 | { 8 | public int Id { get; set; } 9 | 10 | public string Title { get; set; } 11 | 12 | public string Location { get; set; } 13 | 14 | public IEnumerable Venues { get; set; } 15 | 16 | public DateTime Time { get; set; } 17 | 18 | public Event() 19 | { 20 | this.Title = "Default"; 21 | this.Location = "Default"; 22 | this.Time = DateTime.Now; 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /samples/Nancy.Demo.ModelBinding/Models/User.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Demo.ModelBinding.Models 2 | { 3 | public class User 4 | { 5 | public string Name { get; set; } 6 | 7 | public string Address { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /samples/Nancy.Demo.ModelBinding/Web.Debug.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.ModelBinding/Web.Release.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.ModelBinding/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Razor.Localization/DemoBootstrapper.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Demo.Razor.Localization 2 | { 3 | using System; 4 | using Nancy.Bootstrapper; 5 | 6 | public class DemoBootstrapper : DefaultNancyBootstrapper 7 | { 8 | protected override Func InternalConfiguration 9 | { 10 | get 11 | { 12 | return NancyInternalConfiguration.WithOverrides(x => x.ResourceAssemblyProvider = typeof(CustomResourceAssemblyProvider)); 13 | } 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Razor.Localization/Modules/HomeModule.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Demo.Razor.Localization.Modules 2 | { 3 | using System.Globalization; 4 | 5 | public class HomeModule : LegacyNancyModule 6 | { 7 | public HomeModule() 8 | { 9 | 10 | Get["/"] = parameters => View["Index"]; 11 | 12 | Get["/cultureview"] = parameters => View["CultureView"]; 13 | 14 | Get["/cultureviewgerman"] = parameters => 15 | { 16 | this.Context.Culture = new CultureInfo("de-DE"); 17 | return View["CultureView"]; 18 | }; 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /samples/Nancy.Demo.Razor.Localization/Views/CultureView-de-DE.cshtml: -------------------------------------------------------------------------------- 1 | @inherits Nancy.ViewEngines.Razor.NancyRazorViewBase 2 | 3 | @{ 4 | Layout = "razor-layout.cshtml"; 5 | } 6 | 7 |

You're here based on the German culture set in HomeModule however the HomeModule only calls return View["CultureView"]. It uses View Location Conventions therefore there must be a file called CultureView-de-DE.cshtml

8 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Razor.Localization/Views/CultureView.cshtml: -------------------------------------------------------------------------------- 1 | @inherits Nancy.ViewEngines.Razor.NancyRazorViewBase 2 | 3 | @{ 4 | Layout = "razor-layout.cshtml"; 5 | } 6 | 7 |

You're here based on your default culture which is @Html.CurrentLocale

8 | 9 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Razor.Localization/Views/Index.cshtml: -------------------------------------------------------------------------------- 1 | @inherits Nancy.ViewEngines.Razor.NancyRazorViewBase 2 | @{ 3 | Layout = "razor-layout.cshtml"; 4 | } 5 | 6 |

The below greeting should be based on your culture:

7 | 8 |

"@Text.Text.Greeting"

9 | 10 |

11 | You will see: 12 |
13 | { "en-GB", "Hello Sir" } 14 |
15 | { "de-DE", "Guten Tag" } 16 |
17 | { "en-US", "Howdy Partner" } 18 |

19 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Razor.Localization/Views/razor-layout.cshtml: -------------------------------------------------------------------------------- 1 | @inherits Nancy.ViewEngines.Razor.NancyRazorViewBase 2 | 3 | 4 | Razor Localization Demo 5 | 6 | 7 |
8 | @RenderBody() 9 |
10 | Text Resource Example 11 |
12 | Default Culture View Example 13 |
14 | German Culture View Example 15 |
16 | 17 | 18 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Razor.Localization/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Razor.Localization/Web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.SparkViewEngine/FifthElement/Fifth.spark: -------------------------------------------------------------------------------- 1 |  2 | 3 | Is she hot or not 4 | 5 | 6 |

This is the fifth element maaaaan! Like whoaaa...

7 | 8 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.SparkViewEngine/FifthElement/FifthElementModule.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Demo.SparkViewEngine.FifthElement 2 | { 3 | public class FifthElementModule : LegacyNancyModule 4 | { 5 | /// 6 | /// Initializes a new instance of the class. 7 | /// 8 | public FifthElementModule() 9 | { 10 | Get["/5"] = (x) => 11 | { 12 | return View["Fifth.spark"]; 13 | }; 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /samples/Nancy.Demo.SparkViewEngine/MainModule.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Demo.SparkViewEngine 2 | { 3 | public class MainModule : LegacyNancyModule 4 | { 5 | /// 6 | /// Initializes a new instance of the class. 7 | /// 8 | public MainModule() 9 | { 10 | Get["/"] = (x) => 11 | { 12 | return View["Index.spark"]; 13 | }; 14 | 15 | Get[ "/test" ] = _ => View[ "test" ]; 16 | 17 | Get[ "/test2" ] = _ => View[ "test2" ]; 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /samples/Nancy.Demo.SparkViewEngine/Views/Index.spark: -------------------------------------------------------------------------------- 1 |  2 | 3 | Spark View Engine Demo 4 | 5 | 6 |

This is a sample Spark view!

7 | 8 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.SparkViewEngine/Views/Main/test.spark: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |

This is the content!

5 |
-------------------------------------------------------------------------------- /samples/Nancy.Demo.SparkViewEngine/Views/Main/test2.spark: -------------------------------------------------------------------------------- 1 |  2 |

This is the content for the page which doesn't explicitly define it's own master template.

3 |
-------------------------------------------------------------------------------- /samples/Nancy.Demo.SparkViewEngine/Views/Shared/application.spark: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | HTML 5 Template 5 | 6 | 7 | 8 | 9 |

... It's using the application.spark template!

10 | 11 | 12 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.SparkViewEngine/Views/Shared/html5.spark: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | HTML 5 Template 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.SparkViewEngine/Views/_SmallBit.spark: -------------------------------------------------------------------------------- 1 | 

This is a small bit

2 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.SparkViewEngine/Web.Debug.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.SparkViewEngine/Web.Release.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.SparkViewEngine/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.SuperSimpleViewEngine/Views/Login.sshtml: -------------------------------------------------------------------------------- 1 | 
2 | Username:
3 | Password:
4 | 5 |
-------------------------------------------------------------------------------- /samples/Nancy.Demo.SuperSimpleViewEngine/Views/MasterPage.sshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Super Simple View Engine 5 | 6 | 7 |

Super Simple View Engine

8 |

This text is in the master page, it has access to the model:

9 |

Hello @Model.Name!

10 | @Section['Content'] 11 | 12 | 13 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.SuperSimpleViewEngine/Views/User.sshtml: -------------------------------------------------------------------------------- 1 | @Each 2 | First name: @Current.FirstName
3 | Surname: @Current.LastName
4 |
5 | @EndEach -------------------------------------------------------------------------------- /samples/Nancy.Demo.SuperSimpleViewEngine/Web.Debug.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.SuperSimpleViewEngine/Web.Release.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.SuperSimpleViewEngine/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Validation/Database/DB.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Demo.Validation.Database 2 | { 3 | using System.Collections.Generic; 4 | 5 | using Nancy.Demo.Validation.Models; 6 | 7 | public static class DB 8 | { 9 | public static List Customers { get; private set; } 10 | 11 | static DB() 12 | { 13 | Customers = new List(); 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /samples/Nancy.Demo.Validation/MainModule.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Demo.Validation 2 | { 3 | public class MainModule : LegacyNancyModule 4 | { 5 | public MainModule() 6 | { 7 | Get["/"] = x => 8 | { 9 | return "Customers
Products"; 10 | }; 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /samples/Nancy.Demo.Validation/Models/OddLengthStringAttributeAdapter.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Demo.Validation.Models 2 | { 3 | using System.ComponentModel.DataAnnotations; 4 | 5 | using Nancy.Validation.DataAnnotations; 6 | 7 | public class OddLengthStringAttributeAdapter : DataAnnotationsValidatorAdapter 8 | { 9 | public OddLengthStringAttributeAdapter() : base("Compare") 10 | { 11 | } 12 | 13 | public override bool CanHandle(ValidationAttribute attribute) 14 | { 15 | return attribute.GetType() == typeof(OddLengthStringAttribute); 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /samples/Nancy.Demo.Validation/ValidationBootstrapper.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Demo.Validation 2 | { 3 | using Nancy.TinyIoc; 4 | 5 | public class ValidationBootstrapper : DefaultNancyBootstrapper 6 | { 7 | protected override void ConfigureApplicationContainer(TinyIoCContainer container) 8 | { 9 | // Disable auto-registration so that we can make sure that the 10 | // application registrations are preformed correctly by each of 11 | // the validation projects. This is for testing purposes only 12 | // and is not required to perform in your own project. 13 | 14 | //base.ConfigureApplicationContainer(container); 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /samples/Nancy.Demo.Validation/Views/CustomerError.spark: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Customers 5 | 6 | 7 |

Error submitting customer.

8 | 9 |

${k}

10 |
    11 | 12 |
  • ${e}
  • 13 |
    14 |
15 |
16 | 17 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Validation/Web.Debug.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Validation/Web.Release.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Validation/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /samples/Nancy.Demo.Validation/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/Nancy.Authentication.Basic/IUserValidator.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Authentication.Basic 2 | { 3 | using System.Security.Claims; 4 | 5 | /// 6 | /// Provides a way to validate the username and password 7 | /// 8 | public interface IUserValidator 9 | { 10 | /// 11 | /// Validates the username and password 12 | /// 13 | /// Username 14 | /// Password 15 | /// A value representing the authenticated user, null if the user was not authenticated. 16 | ClaimsPrincipal Validate(string username, string password); 17 | } 18 | } -------------------------------------------------------------------------------- /src/Nancy.Authentication.Basic/UserPromptBehaviour.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Authentication.Basic 2 | { 3 | /// 4 | /// Options to control when the browser prompts the user for credentials 5 | /// 6 | public enum UserPromptBehaviour 7 | { 8 | /// 9 | /// Never present user with login prompt 10 | /// 11 | Never, 12 | 13 | /// 14 | /// Always present user with login prompt 15 | /// 16 | Always, 17 | 18 | /// 19 | /// Only prompt the user for credentials on non-ajax requests 20 | /// 21 | NonAjax 22 | } 23 | } -------------------------------------------------------------------------------- /src/Nancy.Authentication.Basic/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0-*", 3 | 4 | "description": "A basic HTTP authentication provider for Nancy.", 5 | "authors": [ "Andreas Håkansson, Steven Robbins and contributors" ], 6 | "tags": [ "Nancy", "Authentication" ], 7 | "projectUrl": "http://nancyfx.org", 8 | "licenseUrl": "https://github.com/NancyFx/Nancy/blob/master/license.txt", 9 | "iconUrl": "http://nancyfx.org/nancy-nuget.png", 10 | 11 | "dependencies": { 12 | "Nancy": { "target": "project" } 13 | }, 14 | 15 | "frameworks": { 16 | "net451": { } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Nancy.Authentication.Forms/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0-*", 3 | 4 | "description": "A forms authentication provider for Nancy.", 5 | "authors": [ "Andreas Håkansson, Steven Robbins and contributors" ], 6 | "tags": [ "Nancy", "Authentication" ], 7 | "projectUrl": "http://nancyfx.org", 8 | "licenseUrl": "https://github.com/NancyFx/Nancy/blob/master/license.txt", 9 | "iconUrl": "http://nancyfx.org/nancy-nuget.png", 10 | 11 | "dependencies": { 12 | "Nancy": { "target": "project" } 13 | }, 14 | 15 | "frameworks": { 16 | "net451": { } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Nancy.Authentication.Stateless/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0-*", 3 | 4 | "description": "A stateless authentication provider for Nancy.", 5 | "authors": [ "Andreas Håkansson, Steven Robbins and contributors" ], 6 | "tags": [ "Nancy", "Authentication" ], 7 | "projectUrl": "http://nancyfx.org", 8 | "licenseUrl": "https://github.com/NancyFx/Nancy/blob/master/license.txt", 9 | "iconUrl": "http://nancyfx.org/nancy-nuget.png", 10 | 11 | "dependencies": { 12 | "Nancy": { "target": "project" } 13 | }, 14 | 15 | "frameworks": { 16 | "net451": { } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Nancy.Embedded/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0-*", 3 | 4 | "description": "Helpers for serving embedded static content with Nancy.", 5 | "authors": [ "Andreas Håkansson, Steven Robbins and contributors" ], 6 | "tags": [ "Nancy", "Embedded", "Static Content" ], 7 | "projectUrl": "http://nancyfx.org", 8 | "licenseUrl": "https://github.com/NancyFx/Nancy/blob/master/license.txt", 9 | "iconUrl": "http://nancyfx.org/nancy-nuget.png", 10 | 11 | "dependencies": { 12 | "Nancy": { "target": "project" } 13 | }, 14 | 15 | "frameworks": { 16 | "net451": { } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Nancy.Hosting.Aspnet/AspNetRootPathProvider.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Hosting.Aspnet 2 | { 3 | using System.Web.Hosting; 4 | 5 | public class AspNetRootPathProvider : IRootPathProvider 6 | { 7 | public string GetRootPath() 8 | { 9 | return HostingEnvironment.MapPath("~/"); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/Nancy.Hosting.Aspnet/BootstrapperEntry.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Hosting.Aspnet 2 | { 3 | public sealed class BootstrapperEntry 4 | { 5 | public BootstrapperEntry(string assembly, string name) 6 | { 7 | Assembly = assembly; 8 | Name = name; 9 | } 10 | 11 | public string Assembly { get; private set; } 12 | 13 | public string Name { get; private set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Nancy.Hosting.Aspnet/web.config.transform: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/Nancy.Hosting.Self/Properties/InternalsVisibleTo.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.CompilerServices; 2 | 3 | [assembly: InternalsVisibleTo("Nancy.Hosting.Self.Tests")] 4 | -------------------------------------------------------------------------------- /src/Nancy.Hosting.Self/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0-*", 3 | 4 | "description": "Enables hosting Nancy in any application.", 5 | "authors": [ "Andreas Håkansson, Steven Robbins and contributors" ], 6 | "tags": [ "Nancy", "Host" ], 7 | "projectUrl": "http://nancyfx.org", 8 | "licenseUrl": "https://github.com/NancyFx/Nancy/blob/master/license.txt", 9 | "iconUrl": "http://nancyfx.org/nancy-nuget.png", 10 | 11 | "compilationOptions": { 12 | "define": [ "DNX" ] 13 | }, 14 | 15 | "dependencies": { 16 | "Nancy": { "target": "project" }, 17 | "Microsoft.Extensions.PlatformAbstractions": "1.0.0-rc1-final" 18 | }, 19 | 20 | "frameworks": { 21 | "net451": { } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/Nancy.Metadata.Modules/IMetadataModuleResolver.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Metadata.Modules 2 | { 3 | /// 4 | /// Defines the functionality for resolving the metadata module for a given . 5 | /// 6 | public interface IMetadataModuleResolver 7 | { 8 | /// 9 | /// Resolves a metadata module instance based on the provided information. 10 | /// 11 | /// The . 12 | /// An instance if one could be found, otherwise . 13 | IMetadataModule GetMetadataModule(INancyModule module); 14 | } 15 | } -------------------------------------------------------------------------------- /src/Nancy.Metadata.Modules/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0-*", 3 | 4 | "description": "Nancy metadata modules to describe your APIs.", 5 | "authors": [ "Andreas Håkansson, Steven Robbins and contributors" ], 6 | "tags": [ "Nancy", "Metadata" ], 7 | "projectUrl": "http://nancyfx.org", 8 | "licenseUrl": "https://github.com/NancyFx/Nancy/blob/master/license.txt", 9 | "iconUrl": "http://nancyfx.org/nancy-nuget.png", 10 | 11 | "dependencies": { 12 | "Nancy": { "target": "project" } 13 | }, 14 | 15 | "frameworks": { 16 | "net451": { } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Nancy.Owin.MSBuild/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /src/Nancy.Owin/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0-*", 3 | 4 | "description": "Nancy extensions for OWIN hosting.", 5 | "authors": [ "Andreas Håkansson, Steven Robbins and contributors" ], 6 | "tags": [ "Nancy", "OWIN" ], 7 | "projectUrl": "http://nancyfx.org", 8 | "licenseUrl": "https://github.com/NancyFx/Nancy/blob/master/license.txt", 9 | "iconUrl": "http://nancyfx.org/nancy-nuget.png", 10 | 11 | "dependencies": { 12 | "Nancy": { "target": "project" }, 13 | "OWIN": "1.0.0" 14 | }, 15 | 16 | "frameworks": { 17 | "net451": { } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Nancy.Testing.MSBuild/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /src/Nancy.Testing/Resources/Nancy Testing Cert.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thecodejunkie/Nancy/b63b44526d995c93c0eec86f6358f6e92679b803/src/Nancy.Testing/Resources/Nancy Testing Cert.pfx -------------------------------------------------------------------------------- /src/Nancy.Validation.FluentValidation.MSBuild/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/Nancy.Validation.FluentValidation/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0-*", 3 | 4 | "description": "Adds Fluent Validation support to Nancy.", 5 | "authors": [ "Andreas Håkansson, Steven Robbins and contributors" ], 6 | "tags": [ "Nancy", "Validation", "FluentValidation" ], 7 | "projectUrl": "http://nancyfx.org", 8 | "licenseUrl": "https://github.com/NancyFx/Nancy/blob/master/license.txt", 9 | "iconUrl": "http://nancyfx.org/nancy-nuget.png", 10 | 11 | "dependencies": { 12 | "Nancy": { "target": "project" }, 13 | "FluentValidation": "3.4.0" 14 | }, 15 | 16 | "frameworks": { 17 | "net451": { } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Nancy.ViewEngines.DotLiquid.MSBuild/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/Nancy.ViewEngines.DotLiquid/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0-*", 3 | 4 | "description": "Enables using the DotLiquid view engine with Nancy.", 5 | "authors": [ "Andreas Håkansson, Steven Robbins and contributors" ], 6 | "tags": [ "Nancy", "View Engine", "DotLiquid" ], 7 | "projectUrl": "http://nancyfx.org", 8 | "licenseUrl": "https://github.com/NancyFx/Nancy/blob/master/license.txt", 9 | "iconUrl": "http://nancyfx.org/nancy-nuget.png", 10 | 11 | "dependencies": { 12 | "Nancy": { "target": "project" }, 13 | "DotLiquid": "1.7.0" 14 | }, 15 | 16 | "frameworks": { 17 | "net451": { } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Nancy.ViewEngines.Markdown.MSBuild/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/Nancy.ViewEngines.Markdown/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0-*", 3 | 4 | "description": "Enables using Markdown with Nancy.", 5 | "authors": [ "Andreas Håkansson, Steven Robbins and contributors" ], 6 | "tags": [ "Nancy", "View Engine", "Markdown" ], 7 | "projectUrl": "http://nancyfx.org", 8 | "licenseUrl": "https://github.com/NancyFx/Nancy/blob/master/license.txt", 9 | "iconUrl": "http://nancyfx.org/nancy-nuget.png", 10 | 11 | "dependencies": { 12 | "Nancy": { "target": "project" }, 13 | "MarkdownSharp": "1.13.0" 14 | }, 15 | 16 | "frameworks": { 17 | "net451": { } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Nancy.ViewEngines.Nustache.MSBuild/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/Nancy.ViewEngines.Nustache/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0-*", 3 | 4 | "description": "Enables using the Nustache view engine with Nancy.", 5 | "authors": [ "Andreas Håkansson, Steven Robbins and contributors" ], 6 | "tags": [ "Nancy", "View Engine", "Nustache" ], 7 | "projectUrl": "http://nancyfx.org", 8 | "licenseUrl": "https://github.com/NancyFx/Nancy/blob/master/license.txt", 9 | "iconUrl": "http://nancyfx.org/nancy-nuget.png", 10 | 11 | "dependencies": { 12 | "Nancy": { "target": "project" }, 13 | "Nustache": "1.13.8.22" 14 | }, 15 | 16 | "frameworks": { 17 | "net451": { } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Nancy.ViewEngines.Razor.BuildProviders.MSBuild/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/Nancy.ViewEngines.Razor.BuildProviders/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0-*", 3 | 4 | "dependencies": { 5 | "Nancy": { "target": "project" }, 6 | "Nancy.ViewEngines.Razor": { "target": "project" } 7 | }, 8 | 9 | "frameworks": { 10 | "net451": { 11 | "frameworkAssemblies": { 12 | "System.Web": "4.0.0.0" 13 | } 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Nancy.ViewEngines.Razor/IHtmlString.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.ViewEngines.Razor 2 | { 3 | public interface IHtmlString 4 | { 5 | /// 6 | /// Returns an HTML-encoded string. 7 | /// 8 | /// An HTML-encoded string. 9 | string ToHtmlString(); 10 | } 11 | } -------------------------------------------------------------------------------- /src/Nancy.ViewEngines.Razor/INancyRazorView.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.ViewEngines.Razor 2 | { 3 | public interface INancyRazorView 4 | { 5 | } 6 | } -------------------------------------------------------------------------------- /src/Nancy.ViewEngines.Spark.MSBuild/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/Nancy/ArrayCache.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy 2 | { 3 | /// 4 | /// A cache for empty arrays. 5 | /// 6 | public class ArrayCache 7 | { 8 | /// 9 | /// Gets a cached, empty array of the specified type. 10 | /// 11 | /// the type of array to get. 12 | public static T[] Empty() 13 | { 14 | return EmptyArray.Value; 15 | } 16 | 17 | private static class EmptyArray 18 | { 19 | public static readonly T[] Value = new T[0]; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Nancy/Bootstrapper/IApplicationStartup.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Bootstrapper 2 | { 3 | /// 4 | /// Provides a hook to execute code during application startup. 5 | /// 6 | public interface IApplicationStartup 7 | { 8 | /// 9 | /// Perform any initialisation tasks 10 | /// 11 | /// Application pipelines 12 | void Initialize(IPipelines pipelines); 13 | } 14 | } -------------------------------------------------------------------------------- /src/Nancy/Bootstrapper/IRequestStartup.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Bootstrapper 2 | { 3 | /// 4 | /// Provides a hook to execute code during request startup. 5 | /// 6 | public interface IRequestStartup 7 | { 8 | /// 9 | /// Perform any initialisation tasks 10 | /// 11 | /// Application pipelines 12 | /// The current context 13 | void Initialize(IPipelines pipelines, NancyContext context); 14 | } 15 | } -------------------------------------------------------------------------------- /src/Nancy/Bootstrapper/ModuleRegistrationType.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Bootstrapper 2 | { 3 | using System; 4 | 5 | public sealed class ModuleRegistration 6 | { 7 | /// 8 | /// Represents a module type for registration into a container 9 | /// 10 | /// Type of the module 11 | public ModuleRegistration(Type moduleType) 12 | { 13 | ModuleType = moduleType; 14 | } 15 | 16 | public Type ModuleType { get; private set; } 17 | } 18 | } -------------------------------------------------------------------------------- /src/Nancy/Configuration/INancyEnvironmentFactory.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Configuration 2 | { 3 | /// 4 | /// Defines the functionality for creating a instance. 5 | /// 6 | public interface INancyEnvironmentFactory : IHideObjectMembers 7 | { 8 | /// 9 | /// Creates a new instance. 10 | /// 11 | /// A instance. 12 | INancyEnvironment CreateEnvironment(); 13 | } 14 | } -------------------------------------------------------------------------------- /src/Nancy/Cryptography/Base64Helpers.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Cryptography 2 | { 3 | using System; 4 | 5 | public static class Base64Helpers 6 | { 7 | /// 8 | /// Calculates how long a byte array of X length will be after base64 encoding 9 | /// 10 | /// The normal, 8bit per byte, length of the byte array 11 | /// Base64 encoded length 12 | public static int GetBase64Length(int normalLength) 13 | { 14 | var inputPadding = (normalLength % 3 != 0) ? (3 - (normalLength % 3)) : 0; 15 | 16 | return (int)Math.Ceiling((normalLength + inputPadding) * 4.0 / 3.0); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/Nancy/Cryptography/IEncryptionProvider.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Cryptography 2 | { 3 | /// 4 | /// Provides symmetrical encryption support 5 | /// 6 | public interface IEncryptionProvider 7 | { 8 | /// 9 | /// Encrypt and base64 encode the string 10 | /// 11 | /// Data to encrypt 12 | /// Encrypted string 13 | string Encrypt(string data); 14 | 15 | /// 16 | /// Decrypt string 17 | /// 18 | /// Data to decrypt 19 | /// Decrypted string 20 | string Decrypt(string data); 21 | } 22 | } -------------------------------------------------------------------------------- /src/Nancy/Cryptography/IKeyGenerator.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Cryptography 2 | { 3 | /// 4 | /// Provides key byte generation 5 | /// 6 | public interface IKeyGenerator 7 | { 8 | /// 9 | /// Generate a sequence of bytes 10 | /// 11 | /// Number of bytes to return 12 | /// Array bytes 13 | byte[] GetBytes(int count); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Nancy/Cryptography/RandomKeyGenerator.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Cryptography 2 | { 3 | using System.Security.Cryptography; 4 | 5 | /// 6 | /// Generates random secure keys using RNGCryptoServiceProvider 7 | /// 8 | public class RandomKeyGenerator : IKeyGenerator 9 | { 10 | private readonly RNGCryptoServiceProvider provider = new RNGCryptoServiceProvider(); 11 | 12 | public byte[] GetBytes(int count) 13 | { 14 | var buffer = new byte[count]; 15 | 16 | this.provider.GetBytes(buffer); 17 | 18 | return buffer; 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /src/Nancy/Culture/ICultureService.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Culture 2 | { 3 | using System.Globalization; 4 | 5 | /// 6 | /// Provides current culture for Nancy context 7 | /// 8 | public interface ICultureService 9 | { 10 | /// 11 | /// Determine current culture for NancyContext 12 | /// 13 | /// NancyContext 14 | /// CultureInfo 15 | CultureInfo DetermineCurrentCulture(NancyContext context); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Nancy/Diagnostics/DescriptionAttribute.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Diagnostics 2 | { 3 | using System; 4 | 5 | [AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, AllowMultiple = false, Inherited = false)] 6 | public class DescriptionAttribute : Attribute 7 | { 8 | public string Description { get; set; } 9 | 10 | public DescriptionAttribute(string description) 11 | { 12 | this.Description = description; 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /src/Nancy/Diagnostics/DisabledDiagnostics.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Diagnostics 2 | { 3 | using Nancy.Bootstrapper; 4 | 5 | /// 6 | /// Implementation of the interface that does nothing. 7 | /// 8 | public class DisabledDiagnostics : IDiagnostics 9 | { 10 | /// 11 | /// Initialise diagnostics 12 | /// 13 | /// Application pipelines 14 | public void Initialize(IPipelines pipelines) 15 | { 16 | // Do nothing :-) 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/Nancy/Diagnostics/IDiagnostics.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Diagnostics 2 | { 3 | using Nancy.Bootstrapper; 4 | 5 | public interface IDiagnostics 6 | { 7 | /// 8 | /// Initialise diagnostics 9 | /// 10 | /// Application pipelines 11 | void Initialize(IPipelines pipelines); 12 | } 13 | } -------------------------------------------------------------------------------- /src/Nancy/Diagnostics/IInteractiveDiagnostics.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Diagnostics 2 | { 3 | using System.Collections.Generic; 4 | 5 | public interface IInteractiveDiagnostics 6 | { 7 | IEnumerable AvailableDiagnostics { get; } 8 | 9 | object ExecuteDiagnostic(InteractiveDiagnosticMethod interactiveDiagnosticMethod, object[] arguments); 10 | 11 | string GetTemplate(InteractiveDiagnosticMethod interactiveDiagnosticMethod); 12 | 13 | InteractiveDiagnostic GetDiagnostic(string providerName); 14 | 15 | InteractiveDiagnosticMethod GetMethod(string providerName, string methodName); 16 | } 17 | } -------------------------------------------------------------------------------- /src/Nancy/Diagnostics/IRequestTraceFactory.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Diagnostics 2 | { 3 | /// 4 | /// Defines the functionality for creating an instance. 5 | /// 6 | public interface IRequestTraceFactory 7 | { 8 | /// 9 | /// Creates an instance. 10 | /// 11 | /// A instance. 12 | /// An instance. 13 | IRequestTrace Create(Request request); 14 | } 15 | } -------------------------------------------------------------------------------- /src/Nancy/Diagnostics/ITraceLog.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Diagnostics 2 | { 3 | using System; 4 | using System.Text; 5 | 6 | /// 7 | /// Provides request trace logging. 8 | /// Uses a delegate to write to the log, rather than creating strings regardless 9 | /// of whether the log is enabled or not. 10 | /// 11 | public interface ITraceLog 12 | { 13 | /// 14 | /// Write to the log 15 | /// 16 | /// Log writing delegate 17 | void WriteLog(Action logDelegate); 18 | } 19 | } -------------------------------------------------------------------------------- /src/Nancy/Diagnostics/InteractiveDiagnostic.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Diagnostics 2 | { 3 | using System.Collections.Generic; 4 | 5 | public class InteractiveDiagnostic 6 | { 7 | public string Name { get; set; } 8 | 9 | public string Description { get; set; } 10 | 11 | public IEnumerable Methods { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /src/Nancy/Diagnostics/Modules/MainModule.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Diagnostics.Modules 2 | { 3 | public class MainModule : DiagnosticModule 4 | { 5 | public MainModule() 6 | { 7 | Get["/"] = async (_, __) => 8 | { 9 | return View["Dashboard"]; 10 | }; 11 | 12 | Post["/"] = async (_, __) => this.Response.AsRedirect("~/"); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Nancy/Diagnostics/Resources/diagnostics.js: -------------------------------------------------------------------------------- 1 | diagnostics = { 2 | // Create this closure to contain the cached modules 3 | module: (function () { 4 | // Internal module cache. 5 | var modules = {}; 6 | 7 | // Create a new module reference scaffold or load an 8 | // existing module. 9 | return function (name) { 10 | // If this module has already been created, return it. 11 | if (modules[name]) { 12 | return modules[name]; 13 | } 14 | 15 | // Create a module and save it under this name 16 | return (modules[name] = { Views: {} }); 17 | }; 18 | } ()), 19 | 20 | app: _.extend({}, Backbone.Events) 21 | }; 22 | -------------------------------------------------------------------------------- /src/Nancy/Diagnostics/Resources/info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thecodejunkie/Nancy/b63b44526d995c93c0eec86f6358f6e92679b803/src/Nancy/Diagnostics/Resources/info.png -------------------------------------------------------------------------------- /src/Nancy/Diagnostics/Resources/interactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thecodejunkie/Nancy/b63b44526d995c93c0eec86f6358f6e92679b803/src/Nancy/Diagnostics/Resources/interactive.png -------------------------------------------------------------------------------- /src/Nancy/Diagnostics/Resources/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thecodejunkie/Nancy/b63b44526d995c93c0eec86f6358f6e92679b803/src/Nancy/Diagnostics/Resources/logo.png -------------------------------------------------------------------------------- /src/Nancy/Diagnostics/Resources/logs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thecodejunkie/Nancy/b63b44526d995c93c0eec86f6358f6e92679b803/src/Nancy/Diagnostics/Resources/logs.png -------------------------------------------------------------------------------- /src/Nancy/Diagnostics/Resources/nancy-common.js: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /src/Nancy/Diagnostics/Resources/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thecodejunkie/Nancy/b63b44526d995c93c0eec86f6358f6e92679b803/src/Nancy/Diagnostics/Resources/settings.png -------------------------------------------------------------------------------- /src/Nancy/Diagnostics/Resources/text.css: -------------------------------------------------------------------------------- 1 | body{font:13px/1.5 'Helvetica Neue',Arial,'Liberation Sans',FreeSans,sans-serif}pre,code{font-family:'DejaVu Sans Mono',Menlo,Consolas,monospace}hr{border:0 #ccc solid;border-top-width:1px;clear:both;height:0}h1{font-size:25px}h2{font-size:23px}h3{font-size:21px}h4{font-size:19px}h5{font-size:17px}h6{font-size:15px}ol{list-style:decimal}ul{list-style:disc}li{margin-left:30px}p,dl,hr,h1,h2,h3,h4,h5,h6,ol,ul,pre,table,address,fieldset,figure{margin-bottom:20px} -------------------------------------------------------------------------------- /src/Nancy/Diagnostics/TemplateAttribute.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Diagnostics 2 | { 3 | using System; 4 | 5 | [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)] 6 | public class TemplateAttribute : Attribute 7 | { 8 | public string Template { get; set; } 9 | 10 | public TemplateAttribute(string template) 11 | { 12 | this.Template = template; 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /src/Nancy/Diagnostics/Views/Info.sshtml: -------------------------------------------------------------------------------- 1 | @Master['_DiagnosticsMaster'] 2 | 3 | @Section['Title']Info@EndSection 4 | 5 | @Section['Header'] 6 | 7 | @EndSection 8 | 9 | @Section['Page_Title'] 10 |

Info

11 | @EndSection 12 | 13 | @Section['Body'] 14 |
15 |
16 | 17 | 24 | @EndSection 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/Nancy/Diagnostics/Views/help.sshtml: -------------------------------------------------------------------------------- 1 | @Master['_DiagnosticsMaster'] 2 | 3 | @Section['Title']Diagnostics Disabled@EndSection 4 | 5 | @Section['Header'] 6 | @EndSection 7 | 8 | @Section['Page_Title'] 9 |

Diagnostics Disabled

10 | @EndSection 11 | 12 | @Section['Body'] 13 |
 
14 |
15 |

Diagnostics is currently not correctly configured for this website. Please review your diagnostic configuration and try again.

16 |
17 |
 
18 | @EndSection 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/Nancy/Diagnostics/Views/login.sshtml: -------------------------------------------------------------------------------- 1 | @Master['_DiagnosticsMaster'] 2 | 3 | @Section['Title']Login@EndSection 4 | 5 | @Section['Header'] 6 | @EndSection 7 | 8 | @Section['Page_Title'] 9 |

Login

10 | @EndSection 11 | 12 | @Section['Body'] 13 |
 
14 |
Password:
15 |
16 |
17 | 18 | 19 |
20 |
21 |
 
22 | 25 | @EndSection 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/Nancy/DisabledStaticContentProvider.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy 2 | { 3 | /// 4 | /// A "disabled" static content provider - always returns null 5 | /// so no content is served. 6 | /// 7 | public class DisabledStaticContentProvider : IStaticContentProvider 8 | { 9 | /// 10 | /// Gets the static content response, if possible. 11 | /// 12 | /// Current context 13 | /// Response if serving content, null otherwise 14 | public Response GetContent(NancyContext context) 15 | { 16 | return null; 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /src/Nancy/Helpers/HttpEncoder.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thecodejunkie/Nancy/b63b44526d995c93c0eec86f6358f6e92679b803/src/Nancy/Helpers/HttpEncoder.cs -------------------------------------------------------------------------------- /src/Nancy/Helpers/HttpUtility.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thecodejunkie/Nancy/b63b44526d995c93c0eec86f6358f6e92679b803/src/Nancy/Helpers/HttpUtility.cs -------------------------------------------------------------------------------- /src/Nancy/Helpers/TaskHelpers.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Helpers 2 | { 3 | using System; 4 | using System.Threading.Tasks; 5 | 6 | public static class TaskHelpers 7 | { 8 | public static readonly Task CompletedTask = Task.FromResult(null); 9 | 10 | public static Task GetFaultedTask(Exception exception) 11 | { 12 | var tcs = new TaskCompletionSource(); 13 | tcs.SetException(exception); 14 | return tcs.Task; 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /src/Nancy/IAssemblyCatalog.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy 2 | { 3 | using System.Collections.Generic; 4 | using System.Reflection; 5 | 6 | /// 7 | /// Defines the functionality of an assembly catalog. 8 | /// 9 | public interface IAssemblyCatalog 10 | { 11 | /// 12 | /// Gets all instances in the catalog. 13 | /// 14 | /// An of instances. 15 | IReadOnlyCollection GetAssemblies(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Nancy/INancyContextFactory.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy 2 | { 3 | /// 4 | /// Creates NancyContext instances 5 | /// 6 | public interface INancyContextFactory 7 | { 8 | /// 9 | /// Create a new NancyContext 10 | /// 11 | /// NancyContext instance 12 | NancyContext Create(Request request); 13 | } 14 | } -------------------------------------------------------------------------------- /src/Nancy/IObjectSerializerSelector.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy 2 | { 3 | /// 4 | /// Allows setting of the serializer for session object storage 5 | /// 6 | public interface IObjectSerializerSelector : IHideObjectMembers 7 | { 8 | /// 9 | /// Using the specified serializer 10 | /// 11 | /// Serializer to use 12 | void WithSerializer(IObjectSerializer newSerializer); 13 | } 14 | } -------------------------------------------------------------------------------- /src/Nancy/IResourceAssemblyProvider.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy 2 | { 3 | using System.Collections.Generic; 4 | using System.Reflection; 5 | 6 | /// 7 | /// Defines the functionality for retrieving which assemblies that should be used by Nancy. 8 | /// 9 | public interface IResourceAssemblyProvider 10 | { 11 | /// 12 | /// Gets a list of assemblies that should be scanned. 13 | /// 14 | /// An of instances. 15 | IEnumerable GetAssembliesToScan(); 16 | } 17 | } -------------------------------------------------------------------------------- /src/Nancy/IResponseFormatterFactory.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy 2 | { 3 | /// 4 | /// Defines the functionality of a factory. 5 | /// 6 | public interface IResponseFormatterFactory 7 | { 8 | /// 9 | /// Creates a new instance. 10 | /// 11 | /// The instance that should be used by the response formatter. 12 | /// An instance. 13 | IResponseFormatter Create(NancyContext context); 14 | } 15 | } -------------------------------------------------------------------------------- /src/Nancy/IRootPathProvider.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy 2 | { 3 | /// 4 | /// Defines the functionality to retrieve the root folder path of the current Nancy application. 5 | /// 6 | public interface IRootPathProvider : IHideObjectMembers 7 | { 8 | /// 9 | /// Returns the root folder path of the current Nancy application. 10 | /// 11 | /// A containing the path of the root folder. 12 | string GetRootPath(); 13 | } 14 | } -------------------------------------------------------------------------------- /src/Nancy/IRuntimeEnvironmentInformation.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy 2 | { 3 | /// 4 | /// Defines functionality for getting information about the runtime execution environment. 5 | /// 6 | public interface IRuntimeEnvironmentInformation 7 | { 8 | /// 9 | /// Gets a value indicating if the application is running in debug mode. 10 | /// 11 | /// if the application is running in debug mode, otherwise . 12 | bool IsDebug { get; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Nancy/ISerializerFactory.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy 2 | { 3 | using Nancy.Responses.Negotiation; 4 | 5 | /// 6 | /// Defines the functionality of an factory. 7 | /// 8 | public interface ISerializerFactory 9 | { 10 | /// 11 | /// Gets the implementation that can serialize the provided . 12 | /// 13 | /// The to get a serializer for. 14 | /// An instance, or if not match was found. 15 | ISerializer GetSerializer(MediaRange mediaRange); 16 | } 17 | } -------------------------------------------------------------------------------- /src/Nancy/IStaticContentProvider.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy 2 | { 3 | /// 4 | /// Provides static content delivery 5 | /// 6 | public interface IStaticContentProvider 7 | { 8 | /// 9 | /// Gets the static content response, if possible. 10 | /// 11 | /// Current context 12 | /// Response if serving content, null otherwise 13 | Response GetContent(NancyContext context); 14 | } 15 | } -------------------------------------------------------------------------------- /src/Nancy/IncludeInNancyAssemblyScanningAttribute.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy 2 | { 3 | using System; 4 | 5 | /// 6 | /// Add this attribute to an assembly to make sure 7 | /// it is included in Nancy's assembly scanning. 8 | /// 9 | /// 10 | /// Apply the attribute, typically in AssemblyInfo.(cs|fs|vb), as follows: 11 | /// [assembly: IncludeInNancyAssemblyScanning] 12 | /// 13 | [AttributeUsage(AttributeTargets.Assembly)] 14 | public sealed class IncludeInNancyAssemblyScanningAttribute : Attribute 15 | { 16 | } 17 | } -------------------------------------------------------------------------------- /src/Nancy/Localization/ITextResource.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Localization 2 | { 3 | /// 4 | /// Used to return string values 5 | /// 6 | public interface ITextResource 7 | { 8 | /// 9 | /// Gets a translation based on the provided key. 10 | /// 11 | /// The key to look up the translation for. 12 | /// The current instance. 13 | string this[string key, NancyContext context] { get; } 14 | } 15 | } -------------------------------------------------------------------------------- /src/Nancy/ModelBinding/IFieldNameConverter.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.ModelBinding 2 | { 3 | /// 4 | /// Provides the capability to supply a convention to 5 | /// convert form field names to property names if required. 6 | /// 7 | public interface IFieldNameConverter 8 | { 9 | /// 10 | /// Converts a field name to a property name 11 | /// 12 | /// Field name 13 | /// Property name 14 | string Convert(string fieldName); 15 | } 16 | } -------------------------------------------------------------------------------- /src/Nancy/ModelBinding/IModelBinder.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.ModelBinding 2 | { 3 | using System; 4 | 5 | /// 6 | /// Provides a way to bind an incoming request, via the context, to a model type 7 | /// 8 | public interface IModelBinder : IBinder 9 | { 10 | /// 11 | /// Whether the binder can bind to the given model type 12 | /// 13 | /// Required model type 14 | /// True if binding is possible, false otherwise 15 | bool CanBind(Type modelType); 16 | } 17 | } -------------------------------------------------------------------------------- /src/Nancy/ModelBinding/IModelBinderLocator.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.ModelBinding 2 | { 3 | using System; 4 | 5 | /// 6 | /// Locates model binders for a particular model 7 | /// 8 | public interface IModelBinderLocator 9 | { 10 | /// 11 | /// Gets a binder for the given type 12 | /// 13 | /// Destination type to bind to 14 | /// The instance of the current request. 15 | /// IModelBinder instance or null if none found 16 | IBinder GetBinderForType(Type modelType, NancyContext context); 17 | } 18 | } -------------------------------------------------------------------------------- /src/Nancy/NotFoundResponse.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy 2 | { 3 | public class NotFoundResponse : Response 4 | { 5 | public NotFoundResponse() 6 | { 7 | this.ContentType = "text/html"; 8 | this.StatusCode = HttpStatusCode.NotFound; 9 | } 10 | } 11 | } -------------------------------------------------------------------------------- /src/Nancy/Properties/InternalsVisibleTo.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.CompilerServices; 2 | 3 | [assembly: InternalsVisibleTo("Nancy.Tests")] 4 | [assembly: InternalsVisibleTo("Nancy.Hosting.Self.Tests")] 5 | -------------------------------------------------------------------------------- /src/Nancy/Responses/Negotiation/IResponseNegotiator.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Responses.Negotiation 2 | { 3 | /// 4 | /// Creates a response from a given result and context. 5 | /// 6 | public interface IResponseNegotiator 7 | { 8 | /// 9 | /// Negotiates the response based on the given result and context. 10 | /// 11 | /// The route result. 12 | /// The context. 13 | /// A . 14 | Response NegotiateResponse(dynamic routeResult, NancyContext context); 15 | } 16 | } -------------------------------------------------------------------------------- /src/Nancy/Responses/NotAcceptableResponse.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Responses 2 | { 3 | /// 4 | /// Response with status code 406 (Not Acceptable). 5 | /// 6 | public class NotAcceptableResponse : Response 7 | { 8 | /// 9 | /// Initializes a new instance of the class. 10 | /// 11 | public NotAcceptableResponse() 12 | { 13 | this.StatusCode = HttpStatusCode.NotAcceptable; 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /src/Nancy/Routing/Constraints/BoolRouteSegmentConstraint.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Routing.Constraints 2 | { 3 | /// 4 | /// Constraint for route segments. 5 | /// 6 | public class BoolRouteSegmentConstraint : RouteSegmentConstraintBase 7 | { 8 | public override string Name 9 | { 10 | get { return "bool"; } 11 | } 12 | 13 | protected override bool TryMatch(string constraint, string segment, out bool matchedValue) 14 | { 15 | return bool.TryParse(segment, out matchedValue); 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /src/Nancy/Routing/Constraints/DateTimeRouteSegmentConstraint.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Routing.Constraints 2 | { 3 | using System; 4 | 5 | /// 6 | /// Constraint for route segments. 7 | /// 8 | public class DateTimeRouteSegmentConstraint : RouteSegmentConstraintBase 9 | { 10 | public override string Name 11 | { 12 | get { return "datetime"; } 13 | } 14 | 15 | protected override bool TryMatch(string constraint, string segment, out DateTime matchedValue) 16 | { 17 | return DateTime.TryParse(segment, out matchedValue); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /src/Nancy/Routing/Constraints/DecimalRouteSegmentConstraint.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Routing.Constraints 2 | { 3 | using System.Globalization; 4 | 5 | /// 6 | /// Constraint for route segments. 7 | /// 8 | public class DecimalRouteSegmentConstraint : RouteSegmentConstraintBase 9 | { 10 | public override string Name 11 | { 12 | get { return "decimal"; } 13 | } 14 | 15 | protected override bool TryMatch(string constraint, string segment, out decimal matchedValue) 16 | { 17 | return decimal.TryParse(segment, NumberStyles.Number, CultureInfo.InvariantCulture, out matchedValue); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /src/Nancy/Routing/Constraints/GuidRouteSegmentConstraint.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Routing.Constraints 2 | { 3 | using System; 4 | 5 | /// 6 | /// Constraint for route segments. 7 | /// 8 | public class GuidRouteSegmentConstraint : RouteSegmentConstraintBase 9 | { 10 | public override string Name 11 | { 12 | get { return "guid"; } 13 | } 14 | 15 | protected override bool TryMatch(string constraint, string segment, out Guid matchedValue) 16 | { 17 | return Guid.TryParse(segment, out matchedValue); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /src/Nancy/Routing/Constraints/IntRouteSegmentConstraint.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Routing.Constraints 2 | { 3 | using System.Globalization; 4 | 5 | /// 6 | /// Constraint for route segments. 7 | /// 8 | public class IntRouteSegmentConstraint : RouteSegmentConstraintBase 9 | { 10 | public override string Name 11 | { 12 | get { return "int"; } 13 | } 14 | 15 | protected override bool TryMatch(string constraint, string segment, out int matchedValue) 16 | { 17 | return int.TryParse(segment, NumberStyles.Integer, CultureInfo.InvariantCulture, out matchedValue); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /src/Nancy/Routing/Constraints/LongRouteSegmentConstraint.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Routing.Constraints 2 | { 3 | using System.Globalization; 4 | 5 | /// 6 | /// Constraint for route segments. 7 | /// 8 | public class LongRouteSegmentConstraint : RouteSegmentConstraintBase 9 | { 10 | public override string Name 11 | { 12 | get { return "long"; } 13 | } 14 | 15 | protected override bool TryMatch(string constraint, string segment, out long matchedValue) 16 | { 17 | return long.TryParse(segment, NumberStyles.Integer, CultureInfo.InvariantCulture, out matchedValue); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /src/Nancy/Routing/Constraints/VersionRouteSegmentConstraint.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Routing.Constraints 2 | { 3 | using System; 4 | 5 | /// 6 | /// Constraint for version route segments. 7 | /// 8 | public class VersionRouteSegmentConstraint : RouteSegmentConstraintBase 9 | { 10 | public override string Name 11 | { 12 | get { return "version"; } 13 | } 14 | 15 | protected override bool TryMatch(string constraint, string segment, out Version matchedValue) 16 | { 17 | return Version.TryParse(segment, out matchedValue); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Nancy/Routing/IRequestDispatcher.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Routing 2 | { 3 | using System.Threading; 4 | using System.Threading.Tasks; 5 | 6 | /// 7 | /// Functionality for processing an incoming request. 8 | /// 9 | public interface IRequestDispatcher 10 | { 11 | /// 12 | /// Dispatches a requests. 13 | /// 14 | /// The for the current request. 15 | /// Cancellation token 16 | Task Dispatch(NancyContext context, CancellationToken cancellationToken); 17 | } 18 | } -------------------------------------------------------------------------------- /src/Nancy/Routing/IRouteCache.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Routing 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | 6 | /// 7 | /// Contains a cache of all routes registered in the system 8 | /// 9 | public interface IRouteCache : IDictionary>> 10 | { 11 | /// 12 | /// Gets a boolean value that indicates of the cache is empty or not. 13 | /// 14 | /// if the cache is empty, otherwise . 15 | bool IsEmpty(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Nancy/Routing/IRouteCacheProvider.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Routing 2 | { 3 | /// 4 | /// It's not safe for a module to take a dependency on the cache (cyclic dependency) 5 | /// 6 | /// We provide an instead. 7 | /// 8 | /// It is *not* safe to call GetCache() inside a NancyModule constructor, although that shouldn't be necessary anyway. 9 | /// 10 | public interface IRouteCacheProvider 11 | { 12 | /// 13 | /// Gets an instance of the route cache. 14 | /// 15 | /// An instance. 16 | IRouteCache GetCache(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Nancy/Routing/IRouteResolver.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Routing 2 | { 3 | /// 4 | /// Returns a route that matches the request 5 | /// 6 | public interface IRouteResolver 7 | { 8 | /// 9 | /// Gets the route, and the corresponding parameter dictionary from the URL 10 | /// 11 | /// Current context 12 | /// A containing the resolved route information. 13 | ResolveResult Resolve(NancyContext context); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Nancy/Routing/IRouteSegmentExtractor.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Routing 2 | { 3 | using System.Collections.Generic; 4 | 5 | /// 6 | /// Defines the functionality for extracting the individual segments from a route path. 7 | /// 8 | public interface IRouteSegmentExtractor 9 | { 10 | /// 11 | /// Extracts the segments from the ; 12 | /// 13 | /// The path that the segments should be extracted from. 14 | /// An , containing the extracted segments. 15 | IEnumerable Extract(string path); 16 | } 17 | } -------------------------------------------------------------------------------- /src/Nancy/Routing/Trie/ITrieNodeFactory.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Routing.Trie 2 | { 3 | using Nancy.Routing.Trie.Nodes; 4 | 5 | /// 6 | /// Factory for creating trie nodes from route definition segments 7 | /// 8 | public interface ITrieNodeFactory 9 | { 10 | /// 11 | /// Gets the correct Trie node type for the given segment 12 | /// 13 | /// Parent node 14 | /// Segment 15 | /// Corresponding TrieNode instance 16 | TrieNode GetNodeForSegment(TrieNode parent, string segment); 17 | } 18 | } -------------------------------------------------------------------------------- /src/Nancy/Security/CsrfValidationException.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Security 2 | { 3 | using System; 4 | 5 | public class CsrfValidationException : Exception 6 | { 7 | public CsrfTokenValidationResult Result { get; private set; } 8 | 9 | public CsrfValidationException(CsrfTokenValidationResult result) 10 | : base(result.ToString()) 11 | { 12 | Result = result; 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /src/Nancy/TypeResolveStrategy.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy 2 | { 3 | using System; 4 | 5 | /// 6 | /// Predicate used to decide if a should be included when resolving types. 7 | /// 8 | /// The that is being inspected. 9 | /// if the type should be included in the result, otherwise . 10 | public delegate bool TypeResolveStrategy(Type type); 11 | } 12 | -------------------------------------------------------------------------------- /src/Nancy/Validation/IModelValidatorFactory.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Validation 2 | { 3 | using System; 4 | 5 | /// 6 | /// Creates instances of IValidator. 7 | /// 8 | public interface IModelValidatorFactory 9 | { 10 | /// 11 | /// Creates a validator for the given type. 12 | /// 13 | /// The type. 14 | /// A validator for the given type or null if none exists. 15 | IModelValidator Create(Type type); 16 | } 17 | } -------------------------------------------------------------------------------- /src/Nancy/Validation/IModelValidatorLocator.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Validation 2 | { 3 | using System; 4 | 5 | /// 6 | /// Locates a validator for a given type. 7 | /// 8 | public interface IModelValidatorLocator 9 | { 10 | /// 11 | /// Gets a validator for a given type. 12 | /// 13 | /// The type to validate. 14 | /// An instance or if none found. 15 | IModelValidator GetValidatorForType(Type type); 16 | } 17 | } -------------------------------------------------------------------------------- /src/Nancy/ViewEngines/IRenderContextFactory.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.ViewEngines 2 | { 3 | /// 4 | /// Defines the functionality required to manufacture instances. 5 | /// 6 | public interface IRenderContextFactory 7 | { 8 | /// 9 | /// Gets a for the specified . 10 | /// 11 | /// The for which the context should be created. 12 | /// A instance. 13 | IRenderContext GetRenderContext(ViewLocationContext viewLocationContext); 14 | } 15 | } -------------------------------------------------------------------------------- /src/Nancy/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thecodejunkie/Nancy/b63b44526d995c93c0eec86f6358f6e92679b803/src/Nancy/favicon.ico -------------------------------------------------------------------------------- /sub_projects.rb: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | 3 | # Placeholder for future refactoring of subproject rake files 4 | -------------------------------------------------------------------------------- /test/Nancy.Authentication.Basic.Tests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using Xunit; 2 | 3 | [assembly: CollectionBehavior(DisableTestParallelization = true)] -------------------------------------------------------------------------------- /test/Nancy.Authentication.Basic.Tests/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "FakeItEasy": "2.0.0-beta011", 4 | "Nancy": { "target": "project" }, 5 | "Nancy.Authentication.Basic": { "target": "project" }, 6 | "xunit": "2.1.0", 7 | "xunit.runner.dnx": "2.1.0-*" 8 | }, 9 | 10 | "commands": { 11 | "test": "xunit.runner.dnx" 12 | }, 13 | 14 | "compilationOptions": { 15 | "define": [ "DNX" ] 16 | }, 17 | 18 | "compileFiles": [ 19 | "../Nancy.Tests/Fakes/FakeRequest.cs", 20 | "../Nancy.Tests/ShouldExtensions.cs" 21 | ], 22 | 23 | "frameworks": { 24 | "dnx451": { } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /test/Nancy.Authentication.Forms.Tests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using Xunit; 2 | 3 | [assembly: CollectionBehavior(DisableTestParallelization = true)] -------------------------------------------------------------------------------- /test/Nancy.Embedded.Tests.MSBuild/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /test/Nancy.Embedded.Tests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using Xunit; 2 | 3 | [assembly: CollectionBehavior(DisableTestParallelization = true)] -------------------------------------------------------------------------------- /test/Nancy.Embedded.Tests/Resources/Subfolder-with-hyphen/embedded3.txt: -------------------------------------------------------------------------------- 1 | Embedded3 Text -------------------------------------------------------------------------------- /test/Nancy.Embedded.Tests/Resources/Subfolder/embedded2.txt: -------------------------------------------------------------------------------- 1 | Embedded2 Text -------------------------------------------------------------------------------- /test/Nancy.Embedded.Tests/Resources/embedded.txt: -------------------------------------------------------------------------------- 1 | Embedded Text -------------------------------------------------------------------------------- /test/Nancy.Encryption.MachineKey.Tests.MSBuild/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /test/Nancy.Encryption.MachineKey.Tests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using Xunit; 2 | 3 | [assembly: CollectionBehavior(DisableTestParallelization = true)] -------------------------------------------------------------------------------- /test/Nancy.Encryption.MachineKey.Tests/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "FakeItEasy": "2.0.0-beta011", 4 | "Nancy": { "target": "project" }, 5 | "Nancy.Encryption.MachineKey": { "target": "project" }, 6 | "xunit": "2.1.0", 7 | "xunit.runner.dnx": "2.1.0-*" 8 | }, 9 | 10 | "commands": { 11 | "test": "xunit.runner.dnx" 12 | }, 13 | 14 | "compilationOptions": { 15 | "define": [ "DNX" ] 16 | }, 17 | 18 | "compileFiles": [ 19 | "../Nancy.Tests/ShouldExtensions.cs" 20 | ], 21 | 22 | "frameworks": { 23 | "dnx451": { } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /test/Nancy.Hosting.Aspnet.Tests.MSBuild/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /test/Nancy.Hosting.Aspnet.Tests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using Xunit; 2 | 3 | [assembly: CollectionBehavior(DisableTestParallelization = true)] -------------------------------------------------------------------------------- /test/Nancy.Hosting.Aspnet.Tests/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "FakeItEasy": "2.0.0-beta011", 4 | "Nancy": { "target": "project" }, 5 | "Nancy.Hosting.Aspnet": { "target": "project" }, 6 | "xunit": "2.1.0", 7 | "xunit.runner.dnx": "2.1.0-*" 8 | }, 9 | 10 | "commands": { 11 | "test": "xunit.runner.dnx" 12 | }, 13 | 14 | "compilationOptions": { 15 | "define": [ "DNX" ] 16 | }, 17 | 18 | "compileFiles": [ 19 | "../Nancy.Tests/ShouldExtensions.cs" 20 | ], 21 | 22 | "frameworks": { 23 | "dnx451": { } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /test/Nancy.Hosting.Self.Tests.MSBuild/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /test/Nancy.Hosting.Self.Tests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using Xunit; 2 | 3 | [assembly: CollectionBehavior(DisableTestParallelization = true)] -------------------------------------------------------------------------------- /test/Nancy.Metadata.Modules.Tests.MSBuild/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /test/Nancy.Metadata.Modules.Tests/FakeLegacyNancyMetadataModule.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Metadata.Modules.Tests 2 | { 3 | public class FakeLegacyNancyMetadataModule : MetadataModule 4 | { 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/Nancy.Metadata.Modules.Tests/FakeNancyMetadataModule.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Metadata.Modules.Tests 2 | { 3 | public class FakeNancyMetadataModule : MetadataModule 4 | { 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/Nancy.Metadata.Modules.Tests/Metadata/FakeLegacyNancyMetadataModule.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Metadata.Modules.Tests.Metadata 2 | { 3 | public class FakeLegacyNancyMetadataModule : MetadataModule 4 | { 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/Nancy.Metadata.Modules.Tests/Modules/FakeLegacyNancyModule.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Metadata.Modules.Tests.Modules 2 | { 3 | public class FakeLegacyNancyModule : LegacyNancyModule 4 | { 5 | } 6 | } -------------------------------------------------------------------------------- /test/Nancy.Metadata.Modules.Tests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using Xunit; 2 | 3 | [assembly: CollectionBehavior(DisableTestParallelization = true)] -------------------------------------------------------------------------------- /test/Nancy.Metadata.Modules.Tests/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "FakeItEasy": "2.0.0-beta011", 4 | "Nancy": { "target": "project" }, 5 | "Nancy.Metadata.Modules": { "target": "project" }, 6 | "xunit": "2.1.0", 7 | "xunit.runner.dnx": "2.1.0-*" 8 | }, 9 | 10 | "commands": { 11 | "test": "xunit.runner.dnx" 12 | }, 13 | 14 | "compilationOptions": { 15 | "define": [ "DNX" ] 16 | }, 17 | 18 | "compileFiles": [ 19 | "../Nancy.Tests/ShouldExtensions.cs" 20 | ], 21 | 22 | "frameworks": { 23 | "dnx451": { } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /test/Nancy.Owin.Tests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using Xunit; 2 | 3 | [assembly: CollectionBehavior(DisableTestParallelization = true)] -------------------------------------------------------------------------------- /test/Nancy.Owin.Tests/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /test/Nancy.Testing.Tests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using Xunit; 2 | 3 | [assembly: CollectionBehavior(DisableTestParallelization = true)] -------------------------------------------------------------------------------- /test/Nancy.Testing.Tests/TestingViewExtensions/ViewFactoryTest.sshtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Super Simple View Engine 5 | 6 | 7 |

Super Simple View Engine

8 |

Hello @Model.AString!

9 | 10 | 11 | -------------------------------------------------------------------------------- /test/Nancy.Tests.Functional.MSBuild/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /test/Nancy.Tests.Functional/Content/smiley.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thecodejunkie/Nancy/b63b44526d995c93c0eec86f6358f6e92679b803/test/Nancy.Tests.Functional/Content/smiley.png -------------------------------------------------------------------------------- /test/Nancy.Tests.Functional/Hidden.txt: -------------------------------------------------------------------------------- 1 | Hidden from the content conventions -------------------------------------------------------------------------------- /test/Nancy.Tests.Functional/Modules/AbsoluteUrlTestModule.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Tests.Functional.Modules 2 | { 3 | public class AbsoluteUrlTestModule : LegacyNancyModule 4 | { 5 | public AbsoluteUrlTestModule() 6 | { 7 | Get["/"] = _ => "hi"; 8 | 9 | Get["/querystring"] = _ => this.Request.Query.myKey; 10 | } 11 | 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /test/Nancy.Tests.Functional/Modules/JsonpTestModule.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Tests.Functional.Modules 2 | { 3 | public class JsonpTestModule : LegacyNancyModule 4 | { 5 | public JsonpTestModule() : base("/test") 6 | { 7 | Get["/string"] = x => "Normal Response"; 8 | Get["/json"] = x => this.Response.AsJson(true); 9 | Get["/{name}"] = parameters => this.Response.AsJson(new { parameters.name }); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /test/Nancy.Tests.Functional/Modules/RazorWithTracingTestModule.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Tests.Functional.Modules 2 | { 3 | public class RazorWithTracingTestModule : LegacyNancyModule 4 | { 5 | public RazorWithTracingTestModule() 6 | { 7 | Get["/tracing/razor-viewbag"] = _ => 8 | { 9 | this.ViewBag.Name = "Bob"; 10 | 11 | return View["RazorPage"]; 12 | }; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /test/Nancy.Tests.Functional/Modules/SerializeTestModule.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Tests.Functional.Modules 2 | { 3 | public class SerializeTestModule : LegacyNancyModule 4 | { 5 | public SerializeTestModule() 6 | { 7 | Post["/serializedform"] = _ => 8 | { 9 | var data = Request.Form.ToDictionary(); 10 | 11 | return data; 12 | }; 13 | 14 | Get["/serializedquerystring"] = _ => 15 | { 16 | var data = Request.Query.ToDictionary(); 17 | 18 | return data; 19 | }; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /test/Nancy.Tests.Functional/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using Xunit; 2 | 3 | [assembly: CollectionBehavior(DisableTestParallelization = true)] 4 | -------------------------------------------------------------------------------- /test/Nancy.Tests.Functional/Tests/CookieFixture.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Tests.Functional.Tests 2 | { 3 | using System.Threading.Tasks; 4 | using Modules; 5 | 6 | using Testing; 7 | using Xunit; 8 | 9 | public class CookieFixture 10 | { 11 | [Fact] 12 | public async Task Cookie_should_decode_value_correctly() 13 | { 14 | // Given 15 | var browser = new Browser(with => with.Module()); 16 | 17 | // When 18 | await browser.Get("/setcookie"); 19 | 20 | var result = await browser.Get("/getcookie"); 21 | 22 | // Then 23 | Assert.Equal(HttpStatusCode.OK, result.StatusCode); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /test/Nancy.Tests.Functional/Views/RazorPage.cshtml: -------------------------------------------------------------------------------- 1 | @inherits Nancy.ViewEngines.Razor.NancyRazorViewBase 2 | 3 | Hello @ViewBag.Name 4 | 5 | @Html.Partial("_PartialTest.cshtml") -------------------------------------------------------------------------------- /test/Nancy.Tests.Functional/Views/RazorPageWithUnknownPartial.cshtml: -------------------------------------------------------------------------------- 1 | @inherits Nancy.ViewEngines.Razor.NancyRazorViewBase 2 | 3 | Hello @ViewBag.Name 4 | 5 | @Html.Partial("_UnknownPartialTest.cshtml") -------------------------------------------------------------------------------- /test/Nancy.Tests.Functional/Views/_LayoutPage.cshtml: -------------------------------------------------------------------------------- 1 | @inherits Nancy.ViewEngines.Razor.NancyRazorViewBase 2 | 3 | 4 | 5 | Hello 6 | 7 | 8 |

Hello World, this is the View Start...

9 | 10 | @RenderBody() 11 | 12 | -------------------------------------------------------------------------------- /test/Nancy.Tests.Functional/Views/_PartialTest.cshtml: -------------------------------------------------------------------------------- 1 | 

This is a partial view...

-------------------------------------------------------------------------------- /test/Nancy.Tests.Functional/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_LayoutPage.cshtml"; 3 | } -------------------------------------------------------------------------------- /test/Nancy.Tests.Functional/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "Nancy": { "target": "project" }, 4 | "Nancy.Testing": { "target": "project" }, 5 | "Nancy.ViewEngines.Razor": { "target": "project" }, 6 | "xunit": "2.1.0", 7 | "xunit.runner.dnx": "2.1.0-*" 8 | }, 9 | 10 | "commands": { 11 | "test": "xunit.runner.dnx" 12 | }, 13 | 14 | "compilationOptions": { 15 | "define": [ "DNX" ] 16 | }, 17 | 18 | "compileFiles": [ 19 | "../Nancy.Tests/xUnitExtensions/RecordAsync.cs" 20 | ], 21 | 22 | "frameworks": { 23 | "dnx451": { } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /test/Nancy.Tests.MSBuild/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /test/Nancy.Tests/Extensions/ResponseExtensions.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Tests.Extensions 2 | { 3 | using System.IO; 4 | 5 | public static class ResponseExtensions 6 | { 7 | public static string GetStringContentsFromResponse(this Response response) 8 | { 9 | var memory = new MemoryStream(); 10 | response.Contents.Invoke(memory); 11 | memory.Position = 0; 12 | using (var reader = new StreamReader(memory)) 13 | { 14 | return reader.ReadToEnd(); 15 | } 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /test/Nancy.Tests/Fakes/FakeHookedModule.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Tests.Fakes 2 | { 3 | public class FakeHookedModule : NancyModule 4 | { 5 | public FakeHookedModule(BeforePipeline before = null, AfterPipeline after = null) 6 | { 7 | this.Before = before; 8 | this.After = after; 9 | } 10 | } 11 | } -------------------------------------------------------------------------------- /test/Nancy.Tests/Fakes/FakeLegacyNancyModuleNoRoutes.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Tests.Fakes 2 | { 3 | public class FakeLegacyNancyModuleNoRoutes : LegacyNancyModule 4 | { 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/Nancy.Tests/Fakes/FakeNancyModuleNoRoutes.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Tests.Fakes 2 | { 3 | public class FakeNancyModuleNoRoutes : NancyModule 4 | { 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/Nancy.Tests/Fakes/FakeNancyModuleWithPreAndPostHooks.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Tests.Fakes 2 | { 3 | public class FakeNancyModuleWithPreAndPostHooks : LegacyNancyModule 4 | { 5 | public FakeNancyModuleWithPreAndPostHooks() 6 | { 7 | this.Before += (c) => null; 8 | this.After += (c) => { }; 9 | 10 | Get["/PrePost"] = x => 11 | { 12 | return new Response(); 13 | }; 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /test/Nancy.Tests/Fakes/FakeRouteResolver.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Tests.Fakes 2 | { 3 | using Nancy.Routing; 4 | 5 | public class FakeRouteResolver : IRouteResolver 6 | { 7 | public string Path { get; private set; } 8 | 9 | public string ModulePath { get; private set; } 10 | 11 | ResolveResult IRouteResolver.Resolve(NancyContext context) 12 | { 13 | return new ResolveResult 14 | { 15 | Route = new FakeRoute(), 16 | Parameters = new DynamicDictionary(), 17 | Before = null, 18 | After = null, 19 | OnError = null 20 | }; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /test/Nancy.Tests/Fakes/MockPipelines.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Tests.Fakes 2 | { 3 | using Nancy.Bootstrapper; 4 | 5 | public class MockPipelines : IPipelines 6 | { 7 | public BeforePipeline BeforeRequest { get; set; } 8 | 9 | public AfterPipeline AfterRequest { get; set; } 10 | 11 | public ErrorPipeline OnError { get; set; } 12 | 13 | public MockPipelines() 14 | { 15 | this.BeforeRequest = new BeforePipeline(); 16 | this.AfterRequest = new AfterPipeline(); 17 | this.OnError = new ErrorPipeline(); 18 | } 19 | } 20 | 21 | } -------------------------------------------------------------------------------- /test/Nancy.Tests/Fakes/Person.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Tests.Fakes 2 | { 3 | public class Person 4 | { 5 | public string FirstName { get; set; } 6 | public string LastName { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /test/Nancy.Tests/Fakes/PersonWithAgeField.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Tests.Fakes 2 | { 3 | public class PersonWithAgeField : Person 4 | { 5 | public int Age; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/Nancy.Tests/Fakes/StructModel.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Tests.Fakes 2 | { 3 | public struct StructModel 4 | { 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/Nancy.Tests/Fakes/ViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Tests.Fakes 2 | { 3 | public class ViewModel 4 | { 5 | 6 | } 7 | } -------------------------------------------------------------------------------- /test/Nancy.Tests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using Xunit; 2 | 3 | [assembly: CollectionBehavior(DisableTestParallelization = true)] -------------------------------------------------------------------------------- /test/Nancy.Tests/Resources/Assets/Styles/Sub.folder/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: white; 3 | } -------------------------------------------------------------------------------- /test/Nancy.Tests/Resources/Assets/Styles/Sub/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: white; 3 | } -------------------------------------------------------------------------------- /test/Nancy.Tests/Resources/Assets/Styles/css/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: white; 3 | } -------------------------------------------------------------------------------- /test/Nancy.Tests/Resources/Assets/Styles/dotted.filename.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: white; 3 | } -------------------------------------------------------------------------------- /test/Nancy.Tests/Resources/Assets/Styles/space in name.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: white; 3 | } -------------------------------------------------------------------------------- /test/Nancy.Tests/Resources/Assets/Styles/strange-css-filename.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: white; 3 | } -------------------------------------------------------------------------------- /test/Nancy.Tests/Resources/Assets/Styles/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: white; 3 | } -------------------------------------------------------------------------------- /test/Nancy.Tests/Resources/Views/staticviewresource.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test/Nancy.Tests/Resources/test.txt: -------------------------------------------------------------------------------- 1 | Testing Text -------------------------------------------------------------------------------- /test/Nancy.Tests/Resources/zip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thecodejunkie/Nancy/b63b44526d995c93c0eec86f6358f6e92679b803/test/Nancy.Tests/Resources/zip.png -------------------------------------------------------------------------------- /test/Nancy.Tests/Unit/Configuration/DefaultNancyEnvironmentFactoryFixture.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Tests.Unit.Configuration 2 | { 3 | using Nancy.Configuration; 4 | using Xunit; 5 | 6 | public class DefaultNancyEnvironmentFactoryFixture 7 | { 8 | [Fact] 9 | public void Should_return_instance_of_default_environment() 10 | { 11 | // Given 12 | var factory = new DefaultNancyEnvironmentFactory(); 13 | 14 | // When 15 | var result = factory.CreateEnvironment(); 16 | 17 | // Then 18 | result.ShouldBeOfType(); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /test/Nancy.Tests/Unit/Json/TestConverterType.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Tests.Unit.Json 2 | { 3 | using System; 4 | 5 | public class TestConverterType : IEquatable 6 | { 7 | public int Data; 8 | 9 | public bool Equals(TestConverterType other) 10 | { 11 | if (other == null) 12 | return false; 13 | 14 | return (this.Data == other.Data); 15 | } 16 | 17 | public override bool Equals(object obj) 18 | { 19 | return this.Equals(obj as TestConverterType); 20 | } 21 | 22 | public override int GetHashCode() 23 | { 24 | return this.Data.GetHashCode(); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /test/Nancy.Tests/Unit/Json/TestPrimitiveConverterType.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Tests.Unit.Json 2 | { 3 | using System; 4 | 5 | public class TestPrimitiveConverterType : IEquatable 6 | { 7 | public int Data; 8 | 9 | public bool Equals(TestPrimitiveConverterType other) 10 | { 11 | if (other == null) 12 | return false; 13 | 14 | return (this.Data == other.Data); 15 | } 16 | 17 | public override bool Equals(object obj) 18 | { 19 | return this.Equals(obj as TestPrimitiveConverterType); 20 | } 21 | 22 | public override int GetHashCode() 23 | { 24 | return this.Data.GetHashCode(); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /test/Nancy.Tests/Unit/Json/TypeWithTuple.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Tests.Unit.Json 2 | { 3 | using System; 4 | 5 | public class TypeWithTuple 6 | { 7 | public Tuple Value { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /test/Nancy.Tests/xUnitExtensions/SkipException.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 Andrew Arnott 2 | // Licensed under the Ms-PL 3 | 4 | namespace Nancy.Tests.xUnitExtensions 5 | { 6 | using System; 7 | 8 | /// 9 | /// The exception to throw to register a skipped test. 10 | /// 11 | public class SkipException : Exception 12 | { 13 | /// 14 | /// Initializes a new instance of the class. 15 | /// 16 | /// The reason the test is skipped. 17 | public SkipException(string reason) 18 | : base(reason) 19 | { 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /test/Nancy.Validation.DataAnnotatioins.Tests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using Xunit; 2 | 3 | [assembly: CollectionBehavior(DisableTestParallelization = true)] -------------------------------------------------------------------------------- /test/Nancy.Validation.FluentValidation.Tests/EmailAdapterFixture.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.Validation.FluentValidation.Tests 2 | { 3 | using global::FluentValidation.Internal; 4 | using global::FluentValidation.Validators; 5 | 6 | public class EmailAdapterFixture 7 | { 8 | public EmailAdapterFixture() 9 | { 10 | //var member = 11 | // typeof (ClassUnderTest).GetProperty("Email"); 12 | 13 | //var rule = 14 | // new PropertyRule(member, ) 15 | } 16 | 17 | private class ClassUnderTest 18 | { 19 | public string Email { get; set; } 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /test/Nancy.Validation.FluentValidation.Tests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using Xunit; 2 | 3 | [assembly: CollectionBehavior(DisableTestParallelization = true)] -------------------------------------------------------------------------------- /test/Nancy.Validation.FluentValidation.Tests/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "FakeItEasy": "2.0.0-beta011", 4 | "FluentValidation": "3.4.0", 5 | "Nancy": { "target": "project" }, 6 | "Nancy.Validation.FluentValidation": { "target": "project" }, 7 | "xunit": "2.1.0", 8 | "xunit.runner.dnx": "2.1.0-*" 9 | }, 10 | 11 | "commands": { 12 | "test": "xunit.runner.dnx" 13 | }, 14 | 15 | "compilationOptions": { 16 | "define": [ "DNX" ] 17 | }, 18 | 19 | "compileFiles": [ 20 | "../Nancy.Tests/ShouldExtensions.cs" 21 | ], 22 | 23 | "frameworks": { 24 | "dnx451": { } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.DotLiquid.Tests/FakeModel.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.ViewEngines.DotLiquid.Tests 2 | { 3 | public class FakeModel 4 | { 5 | public string Name { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.DotLiquid.Tests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using Xunit; 2 | 3 | [assembly: CollectionBehavior(DisableTestParallelization = true)] -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.DotLiquid.Tests/Views/doublequotedpartial.liquid: -------------------------------------------------------------------------------- 1 | {% include "views/partial.liquid" %} -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.DotLiquid.Tests/Views/partial.liquid: -------------------------------------------------------------------------------- 1 | This content is from the partial -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.DotLiquid.Tests/Views/singlequotedpartial.liquid: -------------------------------------------------------------------------------- 1 | {% include 'views/partial.liquid' %} -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.DotLiquid.Tests/Views/unquotedpartial.liquid: -------------------------------------------------------------------------------- 1 | {% include views/partial.liquid %} -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.DotLiquid.Tests/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "DotLiquid": "1.7.0", 4 | "FakeItEasy": "2.0.0-beta011", 5 | "Nancy": { "target": "project" }, 6 | "Nancy.Testing": { "target": "project" }, 7 | "Nancy.ViewEngines.DotLiquid": { "target": "project" }, 8 | "xunit": "2.1.0", 9 | "xunit.runner.dnx": "2.1.0-*" 10 | }, 11 | 12 | "commands": { 13 | "test": "xunit.runner.dnx" 14 | }, 15 | 16 | "compilationOptions": { 17 | "define": [ "DNX" ] 18 | }, 19 | 20 | "compileFiles": [ 21 | "../Nancy.Tests/ShouldExtensions.cs" 22 | ], 23 | 24 | "frameworks": { 25 | "dnx451": { } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Markdown.Tests/Markdown/home.md: -------------------------------------------------------------------------------- 1 | @Master['master'] 2 | 3 | @Section['Content'] 4 | 5 | A First Level Header in Page 6 | ==================== 7 | 8 | A Second Level Header in Page 9 | --------------------- 10 | 11 | Now is the time for all good men to come to 12 | the aid of their country. This is just a 13 | regular paragraph. 14 | 15 | The quick brown fox jumped over the lazy 16 | dog's back. 17 | 18 | ### Header 3 19 | 20 | > This is a blockquote. 21 | > 22 | > This is the second paragraph in the blockquote. 23 | > 24 | > ## This is an H2 in a blockquote 25 | 26 | My name is @Model.FullName and I come from the model 27 | 28 | @Partial['partial']; 29 | 30 | @EndSection 31 | 32 | 33 | -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Markdown.Tests/Markdown/htmlmaster.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | @Section['Content']; 10 | 11 | -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Markdown.Tests/Markdown/partial.markdown: -------------------------------------------------------------------------------- 1 | ####This is from a partial 2 | 3 | -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Markdown.Tests/Markdown/viewwithhtmlmaster.md: -------------------------------------------------------------------------------- 1 | @Master['htmlmaster'] 2 | 3 | @Section['Content'] 4 | 5 | Bacon ipsum dolor sit amet tongue biltong pig brisket, beef corned beef swine rump. Drumstick beef ribs jowl, shoulder swine spare ribs ham hock chicken biltong salami doner chuck venison. Beef ribs bresaola ham andouille filet mignon frankfurter t-bone pancetta tongue tail sirloin kielbasa pork chop bacon. Beef leberkas shoulder ground round tenderloin bacon rump sausage pork belly. Tail short ribs hamburger jowl cow bacon sirloin spare ribs capicola, pig biltong drumstick rump chicken. Chuck kielbasa hamburger, ham hock swine flank boudin shoulder shankle tri-tip leberkas. 6 | 7 | @EndSection -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Markdown.Tests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using Xunit; 2 | 3 | [assembly: CollectionBehavior(DisableTestParallelization = true)] -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Markdown.Tests/UserModel.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.ViewEngines.Markdown.Tests 2 | { 3 | public class UserModel 4 | { 5 | public string FirstName { get; private set; } 6 | 7 | public string LastName { get; private set; } 8 | 9 | public string FullName { get { return FirstName + " " + LastName; } } 10 | 11 | /// 12 | /// Initializes a new instance of the class. 13 | /// 14 | public UserModel(string firstName, string lastName) 15 | { 16 | this.FirstName = firstName; 17 | this.LastName = lastName; 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Markdown.Tests/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "DotLiquid": "1.7.0", 4 | "FakeItEasy": "2.0.0-beta011", 5 | "Nancy": { "target": "project" }, 6 | "Nancy.ViewEngines.Markdown": { "target": "project" }, 7 | "MarkdownSharp": "1.13.0", 8 | "xunit": "2.1.0", 9 | "xunit.runner.dnx": "2.1.0-*" 10 | }, 11 | 12 | "commands": { 13 | "test": "xunit.runner.dnx" 14 | }, 15 | 16 | "compilationOptions": { 17 | "define": [ "DNX" ] 18 | }, 19 | 20 | "compileFiles": [ 21 | "../Nancy.Tests/ShouldExtensions.cs" 22 | ], 23 | 24 | "frameworks": { 25 | "dnx451": { } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Razor.Tests.MSBuild/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Razor.Tests.Models.MSBuild/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Razor.Tests.Models/Hobby.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.ViewEngines.Razor.Tests.Models 2 | { 3 | public class Hobby 4 | { 5 | public string Name { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Razor.Tests.Models/Person.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.ViewEngines.Razor.Tests.Models 2 | { 3 | public class Person 4 | { 5 | public string Name { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Razor.Tests.Models/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "frameworks": { 3 | "net451": { } 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Razor.Tests/GreetingViewBase.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.ViewEngines.Razor.Tests 2 | { 3 | public abstract class GreetingViewBase : NancyRazorViewBase 4 | { 5 | public string Greet() 6 | { 7 | return "Hi, Nancy!"; 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Razor.Tests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using Xunit; 2 | 3 | [assembly: CollectionBehavior(DisableTestParallelization = true)] -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Razor.Tests/TestModel.cs: -------------------------------------------------------------------------------- 1 | namespace Nancy.ViewEngines.Razor.Tests 2 | { 3 | public class TestModel 4 | { 5 | public string Slug { get; set; } 6 | 7 | public string Name { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Razor.Tests/TestViews/Layouts/LayoutWithManySections.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 |

SimplyLayout

8 |
9 | @RenderSection("FirstSection") 10 |
11 |
12 | @RenderSection("SecondSection") 13 |
14 |
15 | @RenderBody() 16 |
17 |
18 | @RenderSection("ThirdSection") 19 |
20 | 21 | -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Razor.Tests/TestViews/Layouts/LayoutWithOptionalSection.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 |

SimplyLayout

8 |
9 | @RenderSection("FirstSection", required: false) 10 |
11 |
12 | @RenderBody() 13 |
14 | 15 | -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Razor.Tests/TestViews/Layouts/LayoutWithOptionalSectionWithDefaults.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 |

SectionWithDefaultsLayout

8 |
9 | @if (IsSectionDefined("FirstSection")) { 10 | @RenderSection("FirstSection", required: false) 11 | } else { 12 |
OptionalSectionDefault
13 | } 14 |
15 |
16 | @RenderBody() 17 |
18 | 19 | -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Razor.Tests/TestViews/Layouts/LayoutWithSection.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 |

SimplyLayout

8 |
9 | @RenderSection("FirstSection") 10 |
11 |
12 | @RenderBody() 13 |
14 | 15 | -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Razor.Tests/TestViews/Layouts/SimplyLayout.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 |

SimplyLayout

8 |
9 | @RenderBody() 10 |
11 | 12 | -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Razor.Tests/TestViews/ViewThatUsesAttributeWithCodeInside.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | @Model.Name 10 | 11 | -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Razor.Tests/TestViews/ViewThatUsesAttributeWithDynamicNullInside.cshtml: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Razor.Tests/TestViews/ViewThatUsesAttributeWithHtmlStringInside.cshtml: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Razor.Tests/TestViews/ViewThatUsesAttributeWithNonEncodedHtmlStringInside.cshtml: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Razor.Tests/TestViews/ViewThatUsesAttributeWithRawHtmlStringInside.cshtml: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Razor.Tests/TestViews/ViewThatUsesHelper.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "SimplyLayout"; 3 | } 4 | 5 |
ViewThatUsesHelper
6 | 7 | @test("className") 8 | 9 | @helper test(string className) 10 | { 11 |

12 | } -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Razor.Tests/TestViews/ViewThatUsesLayout.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "SimplyLayout"; 3 | } 4 | 5 |
ViewThatUsesLayout
-------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Razor.Tests/TestViews/ViewThatUsesLayoutAndManySection.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "LayoutWithManySections"; 3 | } 4 | 5 | @section FirstSection { 6 |
First section in ViewThatUsesLayoutAndManySection
7 | } 8 | 9 | @section SecondSection { 10 |
Second section in ViewThatUsesLayoutAndManySection
11 | } 12 | 13 | @section ThirdSection { 14 |
Third section in ViewThatUsesLayoutAndManySection
15 | } 16 | 17 |
ViewThatUsesLayoutAndManySection
-------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Razor.Tests/TestViews/ViewThatUsesLayoutAndModel.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "SimplyLayout"; 3 | } 4 | 5 |
ViewThatUsesLayoutAndModel: @Model.Name
-------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Razor.Tests/TestViews/ViewThatUsesLayoutAndOptionalSection.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "LayoutWithOptionalSection"; 3 | } 4 | 5 |
ViewThatUsesLayoutAndOptionalSection
-------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Razor.Tests/TestViews/ViewThatUsesLayoutAndOptionalSectionOverridingDefaults.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "LayoutWithOptionalSectionWithDefaults"; 3 | } 4 | @section FirstSection { 5 |
OptionalSectionOverride
6 | } 7 |
ViewThatUsesLayoutAndOptionalSectionOverridingDefaults
-------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Razor.Tests/TestViews/ViewThatUsesLayoutAndOptionalSectionWithDefaults.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "LayoutWithOptionalSectionWithDefaults"; 3 | } 4 | 5 |
ViewThatUsesLayoutAndOptionalSectionWithDefaults
-------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Razor.Tests/TestViews/ViewThatUsesLayoutAndSection.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "LayoutWithSection"; 3 | } 4 | 5 | @section FirstSection { 6 |
First section in ViewThatUsesLayoutAndSection
7 | } 8 | 9 | 10 |
ViewThatUsesLayoutAndSection
-------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Razor.Tests/TestViews/ViewThatUsesModelCSharp.cshtml: -------------------------------------------------------------------------------- 1 | @model System.DateTime 2 | 3 |

Hello at @Model.ToString("MM/dd/yyyy")

-------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Razor.Tests/TestViews/ViewThatUsesModelVB.vbhtml: -------------------------------------------------------------------------------- 1 | @ModelType System.DateTime 2 | 3 |

Hello at @Model.ToString("MM/dd/yyyy")

-------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Spark.Tests/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Spark.Tests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using Xunit; 2 | 3 | [assembly: CollectionBehavior(DisableTestParallelization = true)] -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Spark.Tests/ShadeViews/Features/ShadeElementsMayStackOnOneLine.shade: -------------------------------------------------------------------------------- 1 |  2 | html 3 | head title |offset test 4 | body div.container h1#top |offset test 5 | -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Spark.Tests/ShadeViews/Features/ShadeEvaluatesExpressions.shade: -------------------------------------------------------------------------------- 1 |  2 | p 3 | span =5+3 4 | span 5 | =(3 6 | -1) 7 | | and 8 | =42/6 9 | -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Spark.Tests/ShadeViews/Features/ShadeFileRenders.shade: -------------------------------------------------------------------------------- 1 |  2 | html 3 | head 4 | title |offset test 5 | body 6 | .container 7 | h1#top |offset test 8 | -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Spark.Tests/ShadeViews/Features/ShadeSupportsAttributesAndMayTreatSomeElementsAsSpecialNodes.shade: -------------------------------------------------------------------------------- 1 |  2 | use namespace="System.Collections.Generic" 3 | var words="'Welcome to the Machine'.Split((char)' ')" 4 | 5 | |!{Show(words)} 6 | p 7 | SimpleValue foo="words.Length" 8 | 9 | macro name="Show" data="IEnumerable" 10 | ul.nav 11 | li each="var x in data" =x 12 | 13 | -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Spark.Tests/ShadeViews/Features/ShadeTextMayContainExpressions.shade: -------------------------------------------------------------------------------- 1 |  2 | p 3 | span =5+3 4 | span |${3 5 | -1} and ${42/6} 6 | -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Spark.Tests/ShadeViews/Features/ShadeThatUsesApplicationLayout.shade: -------------------------------------------------------------------------------- 1 | set title='"Child View That Expects Application Layout by default"' 2 | h1 =title 3 | var x="5" y="10" rowclass='new[] {"bar", "bar-alt"}' 4 | div |Hello Spark 5 | var z="x+y" 6 | h3 =z 7 | -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Spark.Tests/ShadeViews/Shared/Application.shade: -------------------------------------------------------------------------------- 1 | html 2 | head 3 | global title='"Default Title"' type="string" 4 | title =title 5 | use content="head" 6 | body 7 | div#header 8 | use content="header" 9 | div |main application header by default 10 | div#main 11 | use content="view" 12 | div#footer 13 | use content="footer" 14 | div |main application footer by default 15 | -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Spark.Tests/ShadeViews/Shared/_SimpleValue.spark: -------------------------------------------------------------------------------- 1 | ${foo} 2 | -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Spark.Tests/TestViews/Layouts/anotherLayout.spark: -------------------------------------------------------------------------------- 1 | 
Another Layout
-------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Spark.Tests/TestViews/Shared/Application.spark: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | ${title} 5 | 6 | 7 | 8 | 13 |
14 | 15 |
16 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Spark.Tests/TestViews/Shared/Partial.spark: -------------------------------------------------------------------------------- 1 | 
  • Partial where x="${x}"
  • -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Spark.Tests/TestViews/Shared/elementLayout.spark: -------------------------------------------------------------------------------- 1 | 
    Element Layout
    -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Spark.Tests/TestViews/Shared/layout.spark: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | ${title} 5 | 6 | 7 | 12 |
    13 | 14 |
    15 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Spark.Tests/TestViews/Stub/Index.spark: -------------------------------------------------------------------------------- 1 | 
    index
    -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Spark.Tests/TestViews/Stub/List.spark: -------------------------------------------------------------------------------- 1 | 
    list
    -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Spark.Tests/TestViews/Stub/PartialTarget.spark: -------------------------------------------------------------------------------- 1 |  2 |
    tiger
    3 |
    elephant
    4 |
    The Target
    5 | 6 |
  • three
  • 7 | 8 | beta 9 | gamma 10 | -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Spark.Tests/TestViews/Stub/Subfolder/Subfolderview.spark: -------------------------------------------------------------------------------- 1 | 
    Subfolder
    -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Spark.Tests/TestViews/Stub/ViewThatChangesGlobalSettings.spark: -------------------------------------------------------------------------------- 1 |  2 |
    default: ${title}
    3 | 4 |
    7==${title}
    5 | 6 | 7 | -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Spark.Tests/TestViews/Stub/ViewThatExpectsALayout.spark: -------------------------------------------------------------------------------- 1 |  2 | 3 |

    ${title}

    4 | 5 |
    Hello Spark
    6 | 7 |

    ${z}

    8 | -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Spark.Tests/TestViews/Stub/ViewThatRendersPartialsThatShareState.spark: -------------------------------------------------------------------------------- 1 | 
    start
    2 |
    lion
    3 |
  • one
  • 4 | alpha 5 |
    6 | delta 7 |
  • two
  • 8 |
    hippo
    9 |
    leopard
    10 |
    Willow
    11 |
    Oak
    12 |
    middle
    13 | 14 |
      15 | 16 |
    17 | 18 | 19 |
    end
    20 | -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Spark.Tests/TestViews/Stub/ViewThatUsesANullViewModel.spark: -------------------------------------------------------------------------------- 1 |  2 |
    ${Model ?? "nothing"}
    -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Spark.Tests/TestViews/Stub/ViewThatUsesAllNamedContentAreas.spark: -------------------------------------------------------------------------------- 1 |  2 |
    3 | 4 |
    Here is some footer stuff defined at the top
    5 |
    6 |
    OK - this is the main content by default because it is not contained
    7 | 8 |
    Funny, we can put the header anywhere we like with a name
    9 | 10 |
    Much better place for footer stuff - or is it?
    11 |
    12 |
    13 |
    14 | -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Spark.Tests/TestViews/Stub/ViewThatUsesAnonymousViewModel.spark: -------------------------------------------------------------------------------- 1 | 2 |

    ${#Foo} ${#Bar.Text}

    3 | 4 | 5 | -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Spark.Tests/TestViews/Stub/ViewThatUsesApplicationLayout.spark: -------------------------------------------------------------------------------- 1 |  2 |

    ${title}

    3 | 4 |
    Hello Spark
    5 | 6 |

    ${z}

    7 | -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Spark.Tests/TestViews/Stub/ViewThatUsesForeach.spark: -------------------------------------------------------------------------------- 1 |  2 | 3 | View that uses foreach 4 | 5 | 6 |

    View that uses foreach

    7 |
    ${System.DateTime.Now}
    8 | 9 |
      10 | 11 | 12 |
    • ${i}: ${item}
    • 13 |
      14 |
      15 |
    16 | 17 | 18 | -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Spark.Tests/TestViews/Stub/ViewThatUsesFormatting.spark: -------------------------------------------------------------------------------- 1 | 
    ${#Number "#,##0.00"}
    2 |
    ${#Date 'yyyy/MM/dd'}
    -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Spark.Tests/TestViews/Stub/ViewThatUsesHtmlEncoding.spark: -------------------------------------------------------------------------------- 1 | 
    ${H(SomeHtml())}
    2 | 3 | 4 |
    <>
    5 |
    6 | -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Spark.Tests/TestViews/Stub/ViewThatUsesNamespaces.spark: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 |
    ${arg}
    7 | 8 |
    9 | 10 |
    ${fakeViewModel.Text}
    11 | -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Spark.Tests/TestViews/Stub/ViewThatUsesNullHtmlEncoding.spark: -------------------------------------------------------------------------------- 1 | 
    ${H(null)}
    -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Spark.Tests/TestViews/Stub/ViewThatUsesPartial.spark: -------------------------------------------------------------------------------- 1 | 
      2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
    12 | -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Spark.Tests/TestViews/Stub/ViewThatUsesPartialImplicitly.spark: -------------------------------------------------------------------------------- 1 | 
      2 | 3 | 4 | 5 | 6 |
    7 | -------------------------------------------------------------------------------- /test/Nancy.ViewEngines.Spark.Tests/TestViews/Stub/ViewThatUsesTildeSubstitution.spark: -------------------------------------------------------------------------------- 1 |  2 |