Ejemplo n.º 1
0
        /// <summary>
        /// Register interfaces:
        ///   * IClientWalletService
        /// </summary>
        public static void RegisterClientWalletsClientsWithoutCache(this ContainerBuilder builder, string clientWalletsGrpcServiceUrl)
        {
            var factory = new ClientWalletsClientFactory(clientWalletsGrpcServiceUrl, null);

            builder
            .RegisterInstance(factory.ClientWalletService())
            .As <IClientWalletService>()
            .AutoActivate()
            .SingleInstance();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Register interfaces:
        ///   * IClientWalletService
        /// </summary>
        public static void RegisterClientWalletsClients(this ContainerBuilder builder, IMyNoSqlSubscriber myNoSqlSubscriber, string clientWalletsGrpcServiceUrl)
        {
            var subs = new MyNoSqlReadRepository <ClientWalletNoSqlEntity>(myNoSqlSubscriber, ClientWalletNoSqlEntity.TableName);

            var factory = new ClientWalletsClientFactory(clientWalletsGrpcServiceUrl, subs);

            builder
            .RegisterInstance(subs)
            .As <IMyNoSqlServerDataReader <ClientWalletNoSqlEntity> >()
            .SingleInstance();

            builder
            .RegisterInstance(factory.ClientWalletService())
            .As <IClientWalletService>()
            .AutoActivate()
            .SingleInstance();
        }