add fonts directory for folders.
Add mapping for IDocumentPathProvider Add implementation for IDocumentPathProvider
This commit is contained in:
parent
6268922ab0
commit
675479d2cf
@ -31,6 +31,7 @@ namespace RaceLapTimer
|
||||
container.Bind<IContainerHelper>().To<ContainerHelper>();
|
||||
container.Bind<IPluginPathProvider>().To<PluginPathProvider>();
|
||||
container.Bind<IConfigFilePathProvider>().To<ConfigFilePathProvider>();
|
||||
container.Bind<IDocumentPathProvider>().To<DocumentPathProvider>();
|
||||
container.Bind<IPluginLocator>().To<PluginLocator>();
|
||||
container.Bind<IDbProvider>().To<TestProvider>().InSingletonScope();
|
||||
//load dynamic plugins..:
|
||||
@ -97,19 +98,22 @@ namespace RaceLapTimer
|
||||
}
|
||||
}
|
||||
|
||||
protected override IRootPathProvider RootPathProvider { get {return new NancyRootPathProvider();} }
|
||||
protected override IRootPathProvider RootPathProvider { get { return new NancyRootPathProvider(); } }
|
||||
|
||||
protected override void ConfigureConventions(NancyConventions conventions)
|
||||
{
|
||||
base.ConfigureConventions(conventions);
|
||||
conventions.StaticContentsConventions.Add(
|
||||
StaticContentConventionBuilder.AddDirectory("images","images")
|
||||
StaticContentConventionBuilder.AddDirectory("images", "images")
|
||||
);
|
||||
conventions.StaticContentsConventions.Add(
|
||||
StaticContentConventionBuilder.AddDirectory("js", "js")
|
||||
);
|
||||
conventions.StaticContentsConventions.Add(
|
||||
StaticContentConventionBuilder.AddDirectory("css","css")
|
||||
StaticContentConventionBuilder.AddDirectory("css", "css")
|
||||
);
|
||||
conventions.StaticContentsConventions.Add(
|
||||
StaticContentConventionBuilder.AddDirectory("fonts", "fonts")
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
20
RaceLapTimer/RaceLapTimer/DocumentPathProvider.cs
Normal file
20
RaceLapTimer/RaceLapTimer/DocumentPathProvider.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using System.IO;
|
||||
using Interfaces;
|
||||
using Nancy;
|
||||
|
||||
namespace RaceLapTimer
|
||||
{
|
||||
class DocumentPathProvider : IDocumentPathProvider
|
||||
{
|
||||
private IRootPathProvider _rootPathProvider;
|
||||
|
||||
public DocumentPathProvider(IRootPathProvider rootPathProvider)
|
||||
{
|
||||
_rootPathProvider = rootPathProvider;
|
||||
}
|
||||
public string GetPath()
|
||||
{
|
||||
return Path.Combine(_rootPathProvider.GetRootPath(), "documents");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -114,6 +114,8 @@
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ApiControllers\OldRaceSessionApiModule.cs" />
|
||||
<Compile Include="DocumentPathProvider.cs" />
|
||||
<Compile Include="Extensions\FileExport\FileExportManager.cs" />
|
||||
<Compile Include="Extensions\PluginLocator.cs" />
|
||||
<Compile Include="Extensions\SystemControl\SystemControlManager.cs" />
|
||||
|
||||
Loading…
Reference in New Issue
Block a user