Exemple #1
0
 public Session(AccountDetails accountDetails, string baseUri, IHttpInvoker httpInvoker, IXmlParser xmlParser, EventStreamHandler eventStreamHandler, DefaultHandler eventHandler, string sessionId, bool restartStreamOnFailure)
 {
     this._accountDetails         = accountDetails;
     this._baseUri                = baseUri;
     this._httpInvoker            = httpInvoker;
     this._xmlParser              = xmlParser;
     this._eventHandler           = eventHandler;
     this._eventStreamHandler     = eventStreamHandler;
     this._sessionId              = sessionId;
     this._restartStreamOnFailure = restartStreamOnFailure;
 }
Exemple #2
0
 public Session(AccountDetails accountDetails, string baseUri, IHttpInvoker httpInvoker, IXmlParser xmlParser, string sessionId, bool restartStreamOnFailure)
 {
     this._accountDetails         = accountDetails;
     this._baseUri                = baseUri;
     this._httpInvoker            = httpInvoker;
     this._xmlParser              = xmlParser;
     this._eventHandler           = new DefaultHandler();
     this._eventStreamHandler     = new EventStreamHandler((ISaxContentHandler) new SaxContentHandler((Handler)this._eventHandler));
     this._sessionId              = sessionId;
     this._restartStreamOnFailure = restartStreamOnFailure;
     this._eventHandler.AddHandler((Handler)this._orderBookEventHandler);
     this._eventHandler.AddHandler((Handler)this._orderBookStatusEventHandler);
     this._eventHandler.AddHandler((Handler)this._orderStateEventHandler);
     this._eventHandler.AddHandler((Handler)this._instructionRejectedEventHandler);
     this._eventHandler.AddHandler((Handler)this._positionEventHandler);
     this._eventHandler.AddHandler((Handler)this._accountStateEventHandler);
     this._eventHandler.AddHandler((Handler)this._historicMarketDataEventHandler);
     this._eventHandler.AddHandler((Handler)this._heartbeatEventHandler);
 }
Exemple #3
0
        public void RequestHeartbeat(HeartbeatRequest heartbeatRequest, OnSuccess successCallback, OnFailure failureCallback)
        {
            DefaultHandler handler = new DefaultHandler();

            SendRequest(heartbeatRequest, handler, delegate() { successCallback(); }, failureCallback);
        }
Exemple #4
0
        public void RequestHistoricMarketData(IHistoricMarketDataRequest historicMarketDataRequest, OnSuccess successCallback, OnFailure failureCallback)
        {
            DefaultHandler handler = new DefaultHandler();

            SendRequest(historicMarketDataRequest, handler, delegate() { successCallback(); }, failureCallback);
        }
Exemple #5
0
        public void RequestAccountState(AccountStateRequest accountStateRequest, OnSuccess successCallback, OnFailure failureCallback)
        {
            DefaultHandler handler = new DefaultHandler();

            SendRequest(accountStateRequest, handler, delegate() { successCallback(); }, failureCallback);
        }
Exemple #6
0
        public void Subscribe(ISubscriptionRequest subscriptionRequest, OnSuccess successCallback, OnFailure failureCallback)
        {
            DefaultHandler handler = new DefaultHandler();

            SendRequest(subscriptionRequest, handler, delegate() { successCallback(); }, failureCallback);
        }
 public void RequestHeartbeat(HeartbeatRequest heartbeatRequest, OnSuccess successCallback, OnFailure failureCallback)
 {
     DefaultHandler handler = new DefaultHandler();
     SendRequest(heartbeatRequest, handler, delegate() { successCallback(); }, failureCallback);
 }
 public void RequestHistoricMarketData(IHistoricMarketDataRequest historicMarketDataRequest, OnSuccess successCallback, OnFailure failureCallback)
 {
     DefaultHandler handler = new DefaultHandler();
     SendRequest(historicMarketDataRequest, handler, delegate() { successCallback(); }, failureCallback);
 }
 public void RequestAccountState(AccountStateRequest accountStateRequest, OnSuccess successCallback, OnFailure failureCallback)
 {
     DefaultHandler handler = new DefaultHandler();
     SendRequest(accountStateRequest, handler, delegate() { successCallback(); }, failureCallback);
 }
 public void Subscribe(ISubscriptionRequest subscriptionRequest, OnSuccess successCallback, OnFailure failureCallback)
 {
     DefaultHandler handler = new DefaultHandler();
     SendRequest(subscriptionRequest, handler, delegate() { successCallback(); }, failureCallback);
 }
 // exposed for testing
 public Session(AccountDetails accountDetails, string baseUri, IHttpInvoker httpInvoker, IXmlParser xmlParser,
      EventStreamHandler eventStreamHandler, DefaultHandler eventHandler, string sessionId, bool restartStreamOnFailure)
 {
     _accountDetails = accountDetails;
     _baseUri = baseUri;
     _httpInvoker = httpInvoker;
     _xmlParser = xmlParser;
     _eventHandler = eventHandler;
     _eventStreamHandler = eventStreamHandler;
     _sessionId = sessionId;
     _restartStreamOnFailure = restartStreamOnFailure;
 }
 public Session(AccountDetails accountDetails, string baseUri, IHttpInvoker httpInvoker, IXmlParser xmlParser,
                string sessionId, bool restartStreamOnFailure)
 {
     _accountDetails = accountDetails;
     _baseUri = baseUri;
     _httpInvoker = httpInvoker;
     _xmlParser = xmlParser;
     _eventHandler = new DefaultHandler();
     _eventStreamHandler = new EventStreamHandler(new SaxContentHandler(_eventHandler));
     _sessionId = sessionId;
     _restartStreamOnFailure = restartStreamOnFailure;
     _eventHandler.AddHandler(_orderBookEventHandler);
     _eventHandler.AddHandler(_orderBookStatusEventHandler);
     _eventHandler.AddHandler(_orderStateEventHandler);
     _eventHandler.AddHandler(_instructionRejectedEventHandler);
     _eventHandler.AddHandler(_positionEventHandler);
     _eventHandler.AddHandler(_accountStateEventHandler);
     _eventHandler.AddHandler(_historicMarketDataEventHandler);
     _eventHandler.AddHandler(_heartbeatEventHandler);
 }