Exemple #1
0
        static void Main(string[] args)
        {
            var security = new Security(15978, "", "", 123, 10000, 15000, new SymbolBaseSecurity("CDB", 1, 2, SymbolBaseMarket.FixedIncome));

            var applicationValue = new ApplicationValue(security.Price, 1000);

            var movimentoRendaFixa       = new MovimentoRendaFixa(5090016, security);
            var movimentoRendaFixaCompra = new MovimentoRendaFixaCompra(movimentoRendaFixa, applicationValue);

            if (!movimentoRendaFixaCompra.VerificaLimite)
            {
            }
            new MovimentoRendaFixaRespository().Inserir(movimentoRendaFixa);

            var bus = Bus.Factory.CreateKingsCrossRabbitMq(configBus =>
            {
                var host = configBus.CreateHost("connectionString", parameters =>
                {
                    parameters.UserName("guest");
                    parameters.Password("guest");
                });

                configBus.ReceiveEndPoint(host, "customer_created_event", endPoint =>
                {
                    endPoint.SubScriber <CustomerCreatedEvent>();

                    endPoint.SubScriber <CustomerUpdatedEvent>(subscriberConfig =>
                    {
                    });
                });
            });

            //Bus.Factory.CreateKingsCrossInMemory()

            //var bus = Bus.Factory.CreateRabbitMq(configBus =>
            //{
            //    var host = configBus.CreateHost("connectionString", parameters =>
            //    {
            //        parameters.UserName("");
            //        parameters.Password("");
            //    });

            //    configBus.ReceiveEndPoint(host, "customer_created_event", endPoint =>
            //    {
            //        endPoint.SubScriber<CustomerCreatedEvent>();
            //    });

            //    configBus.ReceiveEndPoint(host, "customer_updated_event", endPoint =>
            //    {
            //        endPoint.SubScriber<CustomerUpdatedEvent>(configSubscriber =>
            //        {
            //            configSubscriber.DeadLetterExchange = true;
            //            configSubscriber.AutoDelete = false;
            //            configSubscriber.ExchangeType = "";
            //        });
            //    });
            //});

            //bus.Start();
        }
Exemple #2
0
 public void Inserir(MovimentoRendaFixa movimentoRendaFixa)
 {
     Console.WriteLine(movimentoRendaFixa);
 }
Exemple #3
0
 public MovimentoRendaFixaCompra(MovimentoRendaFixa movimentoRendaFixa, ApplicationValue applicationValue)
 {
     MovimentoRendaFixa = movimentoRendaFixa;
     ApplicationValue   = applicationValue;
 }