add RazorConfig class to add Interfaces class to the view pages.
This commit is contained in:
parent
cf2f5a72ae
commit
4470db67b5
@ -1,5 +1,4 @@
|
|||||||
using System.Collections.Generic;
|
using System.IO;
|
||||||
using System.IO;
|
|
||||||
using Interfaces;
|
using Interfaces;
|
||||||
using Nancy;
|
using Nancy;
|
||||||
using Nancy.Authentication.Forms;
|
using Nancy.Authentication.Forms;
|
||||||
@ -7,7 +6,6 @@ using Nancy.Bootstrapper;
|
|||||||
using Nancy.Bootstrappers.Ninject;
|
using Nancy.Bootstrappers.Ninject;
|
||||||
using Nancy.Conventions;
|
using Nancy.Conventions;
|
||||||
using Nancy.Diagnostics;
|
using Nancy.Diagnostics;
|
||||||
using Nancy.ViewEngines.Razor;
|
|
||||||
using Ninject;
|
using Ninject;
|
||||||
using RaceLapTimer.Extensions;
|
using RaceLapTimer.Extensions;
|
||||||
using RaceLapTimer.Extensions.FileExport;
|
using RaceLapTimer.Extensions.FileExport;
|
||||||
@ -115,21 +113,4 @@ namespace RaceLapTimer
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public class RazorConfig : IRazorConfiguration
|
|
||||||
{
|
|
||||||
public IEnumerable<string> GetAssemblyNames()
|
|
||||||
{
|
|
||||||
yield return "Interfaces";
|
|
||||||
}
|
|
||||||
|
|
||||||
public IEnumerable<string> GetDefaultNamespaces()
|
|
||||||
{
|
|
||||||
yield return "Interfaces";
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool AutoIncludeModelNamespace
|
|
||||||
{
|
|
||||||
get { return true; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -126,6 +126,7 @@
|
|||||||
<Compile Include="ApiControllers\SatelliteApiModule.cs" />
|
<Compile Include="ApiControllers\SatelliteApiModule.cs" />
|
||||||
<Compile Include="ApiControllers\SoundApiModule.cs" />
|
<Compile Include="ApiControllers\SoundApiModule.cs" />
|
||||||
<Compile Include="ApiControllers\SystemApiModule.cs" />
|
<Compile Include="ApiControllers\SystemApiModule.cs" />
|
||||||
|
<Compile Include="RazorConfig.cs" />
|
||||||
<Compile Include="TestProvider.cs" />
|
<Compile Include="TestProvider.cs" />
|
||||||
<Compile Include="AuthenticationBootstrapper.cs" />
|
<Compile Include="AuthenticationBootstrapper.cs" />
|
||||||
<Compile Include="ConfigFilePathProvider.cs" />
|
<Compile Include="ConfigFilePathProvider.cs" />
|
||||||
|
|||||||
23
RaceLapTimer/RaceLapTimer/RazorConfig.cs
Normal file
23
RaceLapTimer/RaceLapTimer/RazorConfig.cs
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using Nancy.ViewEngines.Razor;
|
||||||
|
|
||||||
|
namespace RaceLapTimer
|
||||||
|
{
|
||||||
|
public class RazorConfig : IRazorConfiguration
|
||||||
|
{
|
||||||
|
public IEnumerable<string> GetAssemblyNames()
|
||||||
|
{
|
||||||
|
yield return "Interfaces";
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEnumerable<string> GetDefaultNamespaces()
|
||||||
|
{
|
||||||
|
yield return "Interfaces";
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool AutoIncludeModelNamespace
|
||||||
|
{
|
||||||
|
get { return true; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user