Beispiel #1
0
 public Session(SessionOptions sessionOptions) //for ReferenceData and HistoricalData (sync)
 {
     this._sessionResponse = SessionResponseType.sync;
     this._sessionOptions = sessionOptions;
     this._sentRequests = new Queue<Request>();
     this._asyncHandler = null;
     this._subscriptions = null;
     this._marketSimulatorTimer = null;
 }
Beispiel #2
0
 public Session(SessionOptions sessionOptions, EventHandler handler) //for MarketData (async)
 {
     this._sessionResponse      = SessionResponseType.async;
     this._sessionOptions       = sessionOptions;
     this._sentRequests         = null;
     this._asyncHandler         = handler;
     this._subscriptions        = new List <Subscription>();
     this._marketSimulatorTimer = new Timer(new TimerCallback(this.MarketSimulatorTimerStep), null, (int)TimeSpan.FromSeconds(0).TotalMilliseconds, Timeout.Infinite);
 }
Beispiel #3
0
 public Session(SessionOptions sessionOptions) //for ReferenceData and HistoricalData (sync)
 {
     this._sessionResponse      = SessionResponseType.sync;
     this._sessionOptions       = sessionOptions;
     this._sentRequests         = new Queue <Request>();
     this._asyncHandler         = null;
     this._subscriptions        = null;
     this._marketSimulatorTimer = null;
 }
 public Session(SessionOptions sessionOptions, EventHandler handler) //for MarketData (async)
 {
     this._sessionResponse      = SessionResponseType.async;
     this._sessionOptions       = sessionOptions;
     this._sentRequests         = null;
     this._asyncHandler         = handler;
     this._subscriptions        = new List <Subscription>();
     this._marketSimulatorTimer = Observable.Interval(TimeSpan.FromSeconds(1));
     timer = _marketSimulatorTimer.Subscribe(_ => MarketSimulatorTimerStep());
 }
Beispiel #5
0
 public Session(SessionOptions sessionOptions, EventHandler handler) //for MarketData (async)
 {
     this._sessionResponse = SessionResponseType.async;
     this._sessionOptions = sessionOptions;
     this._sentRequests = null;
     this._asyncHandler = handler;
     this._subscriptions = new List<Subscription>();
     this._marketSimulatorTimer = new Timer(new TimerCallback(this.MarketSimulatorTimerStep), null, (int)TimeSpan.FromSeconds(0).TotalMilliseconds, Timeout.Infinite);
 }