2 |
3 |
4 | Razor Localization Demo
5 |
6 |
7 |
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 |
--------------------------------------------------------------------------------
/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 |
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 |
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 |
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 |
7 |
--------------------------------------------------------------------------------
/test/Nancy.ViewEngines.Spark.Tests/TestViews/Stub/ViewThatUsesTildeSubstitution.spark:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/test/Nancy.ViewEngines.Spark.Tests/TestViews/Stub/ViewThatUsesTildeSubstitutionWithSparkReplace.spark:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/test/Nancy.ViewEngines.Spark.Tests/TestViews/Stub/ViewThatUsesViewDataForViewBag.spark:
--------------------------------------------------------------------------------
1 |
2 | ${foo}
3 |
--------------------------------------------------------------------------------
/test/Nancy.ViewEngines.Spark.Tests/TestViews/Stub/ViewThatUsesViewModel.spark:
--------------------------------------------------------------------------------
1 |
2 | ${Model.Text}
3 |
--------------------------------------------------------------------------------
/test/Nancy.ViewEngines.Spark.Tests/TestViews/Stub/_Row.spark:
--------------------------------------------------------------------------------
1 | ${rowText}
--------------------------------------------------------------------------------
/test/Nancy.ViewEngines.Spark.Tests/ViewModels/FakeViewModel.cs:
--------------------------------------------------------------------------------
1 | namespace Nancy.ViewEngines.Spark.Tests.ViewModels
2 | {
3 | using System;
4 |
5 | public class FakeViewModel
6 | {
7 | public string Text { get; set; }
8 |
9 | public double Number { get; set; }
10 |
11 | public DateTime Date { get; set; }
12 | }
13 | }
--------------------------------------------------------------------------------
/tools/nuget/NuGet.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodejunkie/Nancy/b63b44526d995c93c0eec86f6358f6e92679b803/tools/nuget/NuGet.exe
--------------------------------------------------------------------------------
/tools/xunit/xunit.abstractions.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodejunkie/Nancy/b63b44526d995c93c0eec86f6358f6e92679b803/tools/xunit/xunit.abstractions.dll
--------------------------------------------------------------------------------
/tools/xunit/xunit.console.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodejunkie/Nancy/b63b44526d995c93c0eec86f6358f6e92679b803/tools/xunit/xunit.console.exe
--------------------------------------------------------------------------------
/tools/xunit/xunit.console.x86.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodejunkie/Nancy/b63b44526d995c93c0eec86f6358f6e92679b803/tools/xunit/xunit.console.x86.exe
--------------------------------------------------------------------------------
/tools/xunit/xunit.runner.reporters.desktop.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodejunkie/Nancy/b63b44526d995c93c0eec86f6358f6e92679b803/tools/xunit/xunit.runner.reporters.desktop.dll
--------------------------------------------------------------------------------
/tools/xunit/xunit.runner.utility.desktop.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thecodejunkie/Nancy/b63b44526d995c93c0eec86f6358f6e92679b803/tools/xunit/xunit.runner.utility.desktop.dll
--------------------------------------------------------------------------------
/tools/xunit/xunitmono.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | BASEDIR=$(dirname $0)
3 | TESTDIR=$(dirname $1)
4 |
5 | # we need to copy xunit to the test dir so AppDomain.CurrentDomain.BaseDirectory
6 | # points to the test dir instead of the xunit dir when using -noappdomain
7 | # as Nancy relies on this to locate views.
8 | # -noappdomain works around https://bugzilla.xamarin.com/show_bug.cgi?id=39251
9 | cp ${BASEDIR}/xunit.console.x86.exe ${TESTDIR}
10 | mono -O=-gshared ${TESTDIR}/xunit.console.x86.exe $* -noappdomain
11 |
--------------------------------------------------------------------------------