Line data Source code
1 : #region Copyright
2 : // // -----------------------------------------------------------------------
3 : // // <copyright company="Chinchilla Software Limited">
4 : // // Copyright Chinchilla Software Limited. All rights reserved.
5 : // // </copyright>
6 : // // -----------------------------------------------------------------------
7 : #endregion
8 :
9 : using System;
10 : using Cqrs.MongoDB.Events;
11 : using Cqrs.MongoDB.Factories;
12 : using Ninject.Modules;
13 :
14 : namespace Cqrs.Ninject.MongoDB.Configuration
15 : {
16 : /// <summary>
17 : /// A <see cref="INinjectModule"/> that wires up <see cref="TestMongoDbDataStoreConnectionStringFactory"/> as the
18 : /// <see cref="IMongoDbEventStoreConnectionStringFactory"/> and <see cref="IMongoDbDataStoreConnectionStringFactory"/>.
19 : /// </summary>
20 : /// <typeparam name="TAuthenticationToken">The <see cref="Type"/> of the authentication token.</typeparam>
21 : public class TestMongoDbDataStoreModule<TAuthenticationToken> : MongoDbEventStoreModule<TAuthenticationToken>
22 1 : {
23 : /// <summary>
24 : /// Register the all factories
25 : /// </summary>
26 1 : public override void RegisterFactories()
27 : {
28 : Bind<IMongoDbEventStoreConnectionStringFactory>()
29 : .To<TestMongoDbDataStoreConnectionStringFactory>()
30 : .InSingletonScope();
31 : Bind<IMongoDbDataStoreConnectionStringFactory>()
32 : .To<TestMongoDbDataStoreConnectionStringFactory>()
33 : .InSingletonScope();
34 : }
35 : }
36 : }
|