Exemplo n.º 1
0
        static async Task Main()
        {
            var endpoint = "SimpleVirtualATMMachine.Client";

            Console.Title = endpoint;
            var configuration = BuildConfigurationBuilder();
            var logger        = LoggerConfiguration.CreateLogger(configuration, endpoint);

            LogManager.Use <SerilogFactory>().WithLogger(logger);
            var container = BuildContainer();

            _currentCardNumber = container.GetInstance <ICurrentCardNumber>();
            IEndpointInstance endpointInstance = await BusEndpointInstance.Learning(endpoint, container);;

            OptionScreen1(endpointInstance);
            await endpointInstance.Stop().ConfigureAwait(false);
        }
Exemplo n.º 2
0
        static async Task Main()
        {
            var endpoint = "Contact.Service";

            Console.Title = endpoint;
            var configuration = BuildConfigurationBuilder();
            var logger        = LoggerConfiguration.CreateLogger(configuration, endpoint);

            LogManager.Use <SerilogFactory>().WithLogger(logger);
            var container = BuildContainer(configuration);
            IEndpointInstance endpointInstance = await BusEndpointInstance.Learning(endpoint, container);

            endpointInstance = ConfigEndpointInstance(container, endpointInstance);
            Console.WriteLine("Press any key to exit");
            Console.ReadKey();
            await endpointInstance.Stop().ConfigureAwait(false);
        }