예제 #1
0
        public async Task OnTransactionReceivedEvent(object sender, TransactionRegistrationEventArgs eventArgs)
        {
            //Console.WriteLine("** Customer received transaction **");
            this.LogHandler?.Invoke(this, new LogReceivedEventArgs(
                                        new Exception("CustomerSubscriber: Error."),
                                        false,
                                        "CustomerSubscriber - Logging message",
                                        $"CustomerSubscriber: ** Customer received transaction **",
                                        eventArgs.TransactionId));

            var random = new Random();

            var customerNumber = random.Next(1, 1000);

            await OnCustomerCheckEvent(customerNumber, eventArgs.TransactionId).ConfigureAwait(false);
        }
예제 #2
0
        public async Task OnTransactionReceivedEvent(object sender, TransactionRegistrationEventArgs eventArgs)
        {
            //Console.WriteLine("** Site received transaction **");
            //Console.WriteLine($"Site: Transaction Message: {eventArgs.Message}.");

            this.LogHandler?.Invoke(this, new LogReceivedEventArgs(
                                        new Exception("SiteSubscriber: Error."),
                                        false,
                                        "SiteSubscriber - Logging message",
                                        $"SiteSubscriber: ** Site received transaction **",
                                        eventArgs.TransactionId));

            this.LogHandler?.Invoke(this, new LogReceivedEventArgs(
                                        new Exception("SiteSubscriber: Error."),
                                        false,
                                        "SiteSubscriber - Logging message",
                                        $"SiteSubscriber: Site: Transaction Message: {eventArgs.Message}.",
                                        eventArgs.TransactionId));

            OnSiteCheckEvent(eventArgs.SiteNumber, eventArgs.TransactionId);
        }