コード例 #1
0
        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();
        }
コード例 #2
0
        public static void RegisterOperationHistoryClient(this ContainerBuilder builder, IMyNoSqlSubscriber myNoSqlSubscriber, string operationHistoryGrpcServiceUrl, int maxCachedEntities)
        {
            var factory = new BalanceHistoryClientFactory(operationHistoryGrpcServiceUrl);
            var operationHistoryService = factory.GetOperationHistoryService();

            var subs = new MyNoSqlReadRepository <OperationHistoryNoSqlEntity>(myNoSqlSubscriber, OperationHistoryNoSqlEntity.TableName);

            builder.RegisterInstance(operationHistoryService).As <IOperationHistoryService>().SingleInstance();
            builder
            .RegisterInstance(new OperationsHistoryHistoryClient(operationHistoryService, subs, maxCachedEntities))
            .As <IOperationsHistoryClient>()
            .SingleInstance();
        }
コード例 #3
0
        public static void RegisterSnapshotService(this ContainerBuilder builder, string avgPriceGrpcServiceUrl)
        {
            var factory = new BalanceHistoryClientFactory(avgPriceGrpcServiceUrl);

            builder.RegisterInstance(factory.GetSnapshotService()).As <ISnapshotService>().SingleInstance();
        }
コード例 #4
0
        public static void RegisterOperationHistoryService(this ContainerBuilder builder, string operationHistoryGrpcServiceUrl)
        {
            var factory = new BalanceHistoryClientFactory(operationHistoryGrpcServiceUrl);

            builder.RegisterInstance(factory.GetOperationHistoryService()).As <IOperationHistoryService>().SingleInstance();
        }
コード例 #5
0
        public static void RegisterBalanceHistoryClient(this ContainerBuilder builder, string balanceHistoryGrpcServiceUrl)
        {
            var factory = new BalanceHistoryClientFactory(balanceHistoryGrpcServiceUrl);

            builder.RegisterInstance(factory.GetWalletBalanceUpdateService()).As <IWalletBalanceUpdateService>().SingleInstance();
        }