Example #1
0
        private void StartApplication(LineTrader.Properties.Settings settings, Model.Oanda.RestClient restClient)
        {
            var service = new Model.Service(restClient, settings.Instruments.Split(','));
            var win     = new View.MainWindow(service);

            logger.Debug("showing window");
            win.Show();
            logger.Debug("window shown");
            var mt4Server = new MT4Server(service);

            logger.Debug("start mt4 server");
            mt4Server.Start();
            logger.Debug("app started");
        }
Example #2
0
 public WebApp(Model.Service service)
 {
     this.service = service;
 }
Example #3
0
 public MT4Server(Model.Service service)
 {
     this.host = new ServiceHost(new WebApp(service), new Uri("http://localhost/"));
     this.host.Description.Behaviors.Find <ServiceDebugBehavior>().HttpHelpPageEnabled = false;
     this.host.AddServiceEndpoint(typeof(WebApp), new WebHttpBinding(), "").EndpointBehaviors.Add(new WebHttpBehavior());
 }