Example #1
0
        static void Main(string[] args)
        {
            TflClientService tflClient = new TflClientService(_response);

            _factory   = new JObjectFactory();
            _response  = new ResponseFactory();
            _validator = new RequestValidatorService(_response, _factory);

            var services = new ServiceCollection();

            //JB. Register TflClientService (httpClient for Tfl)
            services.AddHttpClient <HttpClientFactoryService>();

            var serviceProvider = services.BuildServiceProvider();

            SetUpDi(services);
            SetUpLogging(services, serviceProvider);

            //JB. Begin execution of client and configuration of the App.
            Execute(tflClient, services).Wait();

            Console.ReadKey();
        }
Example #2
0
 public RequestValidatorService(IResponseFactory response, IJObjectFactory jObjectFactory)
 {
     _jObjectFactory = jObjectFactory;
     _response       = response;
 }