Skip to content

Commit

Permalink
Provider bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
cwetanow committed Mar 2, 2017
1 parent a1ad350 commit cba4eb5
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Logs.Web/App_Start/NinjectModules/ProvidersNinjectModule.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using Logs.Providers;
using Logs.Providers.Contracts;
using Ninject.Modules;

namespace Logs.Web.App_Start.NinjectModules
{
public class ProvidersNinjectModule : NinjectModule
{
public override void Load()
{
this.Bind<IDateTimeProvider>().To<DateTimeProvider>().InSingletonScope();
}
}
}
1 change: 1 addition & 0 deletions src/Logs.Web/App_Start/NinjectWebCommon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ private static void RegisterServices(IKernel kernel)
kernel.Load(new DataNinjectModule());
kernel.Load(new FactoryNinjectModule());
kernel.Load(new ServiceNinjectModule());
kernel.Load(new ProvidersNinjectModule());
}
}
}
5 changes: 5 additions & 0 deletions src/Logs.Web/Logs.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@
<Compile Include="App_Start\NinjectModules\AuthNinjectModule.cs" />
<Compile Include="App_Start\NinjectModules\DataNinjectModule.cs" />
<Compile Include="App_Start\NinjectModules\FactoryNinjectModule.cs" />
<Compile Include="App_Start\NinjectModules\ProvidersNinjectModule.cs" />
<Compile Include="App_Start\NinjectModules\ServiceNinjectModule.cs" />
<Compile Include="App_Start\NinjectWebCommon.cs" />
<Compile Include="App_Start\RouteConfig.cs" />
Expand Down Expand Up @@ -327,6 +328,10 @@
<Project>{42C607C4-8FB1-490C-AAD4-5AC9921F91FC}</Project>
<Name>Logs.Models</Name>
</ProjectReference>
<ProjectReference Include="..\Logs.Providers\Logs.Providers.csproj">
<Project>{FB8CF5FD-A33C-44D0-8517-A2D55CC7B470}</Project>
<Name>Logs.Providers</Name>
</ProjectReference>
<ProjectReference Include="..\Logs.Services\Logs.Services.csproj">
<Project>{4BD34CDB-E6CE-415C-95EF-5E04CC0A2FA0}</Project>
<Name>Logs.Services</Name>
Expand Down

0 comments on commit cba4eb5

Please sign in to comment.