public static void RegisterSnapshotClient(this ContainerBuilder builder, string avgPriceGrpcServiceUrl, IMyNoSqlSubscriber myNoSqlSubscriber) { var factory = new BalanceHistoryClientFactory(avgPriceGrpcServiceUrl); var snapshotService = factory.GetSnapshotService(); var subs = new MyNoSqlReadRepository <SnapshotNoSqlEntity>(myNoSqlSubscriber, SnapshotNoSqlEntity.TableName); builder .RegisterInstance(new SnapshotClient(subs, snapshotService)) .As <ISnapshotClient>() .SingleInstance(); }
public static void RegisterSnapshotService(this ContainerBuilder builder, string avgPriceGrpcServiceUrl) { var factory = new BalanceHistoryClientFactory(avgPriceGrpcServiceUrl); builder.RegisterInstance(factory.GetSnapshotService()).As <ISnapshotService>().SingleInstance(); }