relocate IDbProvider and SatelliteLog classes to interfaces.

This commit is contained in:
chris.watts90@outlook.com 2017-06-26 21:02:33 +01:00
parent af14e57725
commit 19d53cb33b
4 changed files with 13 additions and 8 deletions

View File

@ -1,6 +1,5 @@
using System.Collections.Generic;
using Interfaces;
using RaceLapTimer.ApiControllers;
namespace RaceLapTimer
{
@ -27,5 +26,6 @@ namespace RaceLapTimer
void StoreTransponderLog(SatelliteLog log);
bool DeletePilot(int id);
bool RemoveTransponderAssociation(int pilotId);
}
}

View File

@ -42,6 +42,7 @@
<ItemGroup>
<Compile Include="IConfigFilePathProvider.cs" />
<Compile Include="IContainerHelper.cs" />
<Compile Include="IDbProvider.cs" />
<Compile Include="ILoggerService.cs" />
<Compile Include="IPluginInformation.cs" />
<Compile Include="IPluginLocator.cs" />
@ -64,6 +65,7 @@
<Compile Include="IUserStorage.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="RaceMode.cs" />
<Compile Include="SatelliteLog.cs" />
<Compile Include="User.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

View File

@ -0,0 +1,8 @@
namespace Interfaces
{
public class SatelliteLog
{
public int TransponderToken { get; set; }
public int LapTimeMs { get; set; }
}
}

View File

@ -1,11 +1,12 @@
using System;
using Interfaces;
using Nancy;
namespace RaceLapTimer.ApiControllers
{
public class SatelliteApiModule:NancyModule
{
private IDbProvider _provider;
private readonly IDbProvider _provider;
public SatelliteApiModule(IDbProvider provider) : base("/api/satellite")
{
_provider = provider;
@ -26,10 +27,4 @@ namespace RaceLapTimer.ApiControllers
return HttpStatusCode.OK;
}
}
public class SatelliteLog
{
public int TransponderToken { get; set; }
public int LapTimeMs { get; set; }
}
}