Exemplo n.º 1
0
        public MainWindow()
        {
            InitializeComponent();

            var log = new ColourConsoleLog();

            service          = new BlocktraderService(log, new ExchangeProxySettings());
            timestampManager = new FileTimestampManager(log);

            TicketPicker.ItemsSource = (Ticker[])Enum.GetValues(typeof(Ticker));
            DatePicker.SelectedDate  = DateTime.Now;
            PrecPicker.Value         = 0;

            var timer = new Timer(updateInterval.TotalMilliseconds)
            {
                AutoReset = true
            };

            timer.Elapsed += (s, e) => DownloadAsync().Wait();
            timer.Start();
            log.Info($"Blocktader initializated");
        }
 public TimestampController(ITimestampManager timestampManager, ILog log)
 {
     this.timestampManager = timestampManager;
     this.log = log.ForContext("API");
 }
Exemplo n.º 3
0
 public BufferedTimestampManager(ITimestampManager innerManager)
 {
     buffer            = new Dictionary <TimestampKey, MonthTimestamp>();
     this.innerManager = innerManager;
 }