From 4470db67b5ee388ff0fe459b6ecfb09fe99a55f2 Mon Sep 17 00:00:00 2001 From: "chris.watts90@outlook.com" Date: Thu, 6 Jul 2017 19:23:04 +0100 Subject: [PATCH] add RazorConfig class to add Interfaces class to the view pages. --- .../AuthenticationBootstrapper.cs | 21 +---------------- RaceLapTimer/RaceLapTimer/RaceLapTimer.csproj | 1 + RaceLapTimer/RaceLapTimer/RazorConfig.cs | 23 +++++++++++++++++++ 3 files changed, 25 insertions(+), 20 deletions(-) create mode 100644 RaceLapTimer/RaceLapTimer/RazorConfig.cs diff --git a/RaceLapTimer/RaceLapTimer/AuthenticationBootstrapper.cs b/RaceLapTimer/RaceLapTimer/AuthenticationBootstrapper.cs index bb0a7bf..d593241 100644 --- a/RaceLapTimer/RaceLapTimer/AuthenticationBootstrapper.cs +++ b/RaceLapTimer/RaceLapTimer/AuthenticationBootstrapper.cs @@ -1,5 +1,4 @@ -using System.Collections.Generic; -using System.IO; +using System.IO; using Interfaces; using Nancy; using Nancy.Authentication.Forms; @@ -7,7 +6,6 @@ using Nancy.Bootstrapper; using Nancy.Bootstrappers.Ninject; using Nancy.Conventions; using Nancy.Diagnostics; -using Nancy.ViewEngines.Razor; using Ninject; using RaceLapTimer.Extensions; using RaceLapTimer.Extensions.FileExport; @@ -115,21 +113,4 @@ namespace RaceLapTimer ); } } - public class RazorConfig : IRazorConfiguration - { - public IEnumerable GetAssemblyNames() - { - yield return "Interfaces"; - } - - public IEnumerable GetDefaultNamespaces() - { - yield return "Interfaces"; - } - - public bool AutoIncludeModelNamespace - { - get { return true; } - } - } } diff --git a/RaceLapTimer/RaceLapTimer/RaceLapTimer.csproj b/RaceLapTimer/RaceLapTimer/RaceLapTimer.csproj index 946a220..7421c84 100644 --- a/RaceLapTimer/RaceLapTimer/RaceLapTimer.csproj +++ b/RaceLapTimer/RaceLapTimer/RaceLapTimer.csproj @@ -126,6 +126,7 @@ + diff --git a/RaceLapTimer/RaceLapTimer/RazorConfig.cs b/RaceLapTimer/RaceLapTimer/RazorConfig.cs new file mode 100644 index 0000000..9677840 --- /dev/null +++ b/RaceLapTimer/RaceLapTimer/RazorConfig.cs @@ -0,0 +1,23 @@ +using System.Collections.Generic; +using Nancy.ViewEngines.Razor; + +namespace RaceLapTimer +{ + public class RazorConfig : IRazorConfiguration + { + public IEnumerable GetAssemblyNames() + { + yield return "Interfaces"; + } + + public IEnumerable GetDefaultNamespaces() + { + yield return "Interfaces"; + } + + public bool AutoIncludeModelNamespace + { + get { return true; } + } + } +} \ No newline at end of file