|
2 | 2 | using Shouldly; |
3 | 3 | using static Pure.DI.Tag; |
4 | 4 | using static Pure.DI.Lifetime; |
| 5 | +// ReSharper disable InvertIf |
| 6 | +// ReSharper disable LocalizableElement |
| 7 | +// ReSharper disable NotAccessedPositionalProperty.Global |
| 8 | +// ReSharper disable ClassNeverInstantiated.Global |
5 | 9 |
|
6 | 10 | DI.Setup(nameof(Composition)) |
7 | 11 | .Bind<IClock>().As(Singleton).To<SystemClock>() |
|
10 | 14 | .Bind<IConfiguration>().As(Singleton).To<AppConfiguration>() |
11 | 15 | .Bind<IEnvironmentInfo>().As(Singleton).To<EnvironmentInfo>() |
12 | 16 | .Bind<IRepository<TT>>().As(PerBlock).To<InMemoryRepository<TT>>() |
13 | | - .Bind<IExternalApiClient>(Public, default).As(Singleton).To<PublicApiClient>() |
| 17 | + .Bind<IExternalApiClient>(Public, null).As(Singleton).To<PublicApiClient>() |
14 | 18 | .Bind<IExternalApiClient>(Internal).As(Singleton).To<InternalApiClient>() |
15 | | - .Bind<INotificationSender>(Email, default).To<EmailNotificationSender>() |
| 19 | + .Bind<INotificationSender>(Email, null).To<EmailNotificationSender>() |
16 | 20 | .Bind<INotificationSender>(Sms).To<SmsNotificationSender>() |
17 | 21 | .Bind<INotificationSender>(Push).To<PushNotificationSender>() |
18 | | - .Bind<IPaymentGateway>(Card, default).As(Singleton).To<StripePaymentGateway>() |
| 22 | + .Bind<IPaymentGateway>(Card, null).As(Singleton).To<StripePaymentGateway>() |
19 | 23 | .Bind<IPaymentGateway>(Wallet).As(Singleton).To<WalletPaymentGateway>() |
20 | 24 | #pragma warning disable DIW003 |
21 | 25 | .Bind<IPaymentGateway>(Offline).To<OfflinePaymentGateway>() |
@@ -142,7 +146,7 @@ interface ICache |
142 | 146 | string GetOrAdd(string key, Func<string> valueFactory); |
143 | 147 | } |
144 | 148 |
|
145 | | -interface IRepository<T> |
| 149 | +interface IRepository<in T> |
146 | 150 | { |
147 | 151 | void Save(T entity); |
148 | 152 | int Count { get; } |
|
0 commit comments